跳到正文
cccskills
免费在 GitHub 公开

chain-of-states

CoSProver framework for translating informal proofs to Lean4 via intermediate formal proof states.

中文简介正在准备中。当前显示原文说明。

实测评分 未实测

查看安装方法

包含的文件(2)

  • SKILL.md4.5 KB
  • CONCOMITANT_SKILLS.md890 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Chain of States (CoS) Skill 🐸

Trit: -1 (MINUS - Validator) GF(3) Triad: chain-of-states (-1) ⊗ proof-of-frog (0) ⊗ alife (+1) = 0

Overview

CoSProver framework for translating informal proofs to Lean4 via intermediate formal proof states.

From Wang et al. (2025): "Translating Informal Proofs into Formal Proofs Using a Chain of States"

Core Insight

Informal Proof (natural language)
    ↓ Stage 1: Extract CoS
Chain of States [s₀ → s₁ → ... → sₙ]
    ↓ Stage 2: Generate tactics
Formal Lean4 Proof

Key Observations:

  1. Informal proofs use logical transitions (implications/equivalences) without explicit intermediate states
  2. Lean requires explicit proof states + tactics connecting them
  3. CoS bridges this gap with explicit intermediate representations

Two-Stage Framework

Stage 1: CoS Extraction

"Let x > 0. Since x > 0, we have x² > 0."
    ↓
[⊢ x > 0 → x² > 0]  →  [h : x > 0 ⊢ x² > 0]  →  [⊢ True]

Stage 2: Tactic Generation

theorem sq_pos (x : ℝ) (h : x > 0) : x² > 0 := by
  -- Tactic for s₀ → s₁
  intro h
  -- Tactic for s₁ → s₂  
  exact sq_pos_of_pos h

Connection to Proof-of-Frog

CoS ConceptProof-of-Frog Equivalent
Proof state sᵢKnowledge nugget
Tactic τᵢFrog leap
State transitionEating a frog
Full proofPond traversal

Frog Lifecycle as CoS

🥒 TADPOLE (s₀)     -- Initial goal state
    ↓ τ₁ (intro)
🐸 FROGLET (s₁)     -- Hypothesis introduced
    ↓ τ₂ (apply)
🦎 MATURE FROG (sₙ) -- QED

Implementation

Lean4 CoS Type

structure ProofState where
  goal : Expr
  context : List Expr
  trit : Int  -- GF(3) stage

structure ChainOfStates where
  states : List ProofState
  transitions : List Tactic
  
def cos_invariant (cos : ChainOfStates) : Prop :=
  (cos.states.map (·.trit)).sum % 3 = 0

Python CoS Extraction

def extract_cos(informal_proof: str) -> List[ProofState]:
    """
    Extract Chain of States from informal proof text.
    Each state is a formal representation of proof progress.
    """
    steps = segment_proof(informal_proof)
    return [formalize_state(s) for s in steps]

Comparison to Chain-of-Thought

DimensionChain-of-Thought (CoT)Chain of States (CoS)
TargetReasoning traceProof states
GranularityNatural languageFormal expressions
VerificationNoneLean type checker
ComposabilityWeakStrong (tactic composition)

Performance (Wang et al. 2025)

BenchmarkminiF2FProofNet
Direct generation36.2%18.4%
CoSProver42.8%24.1%
Improvement+6.6%+5.7%

Usage

# Load skill
skill chain-of-states

# Extract CoS from informal proof
python cos_extract.py "Let n be even. Then n² is even."

# Generate Lean4 tactics
lean4 cos_to_tactics.lean

References

  • Wang et al. (2025). "Translating Informal Proofs into Formal Proofs Using a Chain of States." arXiv:2512.10317
  • Ahuja et al. (2024). "ImProver: Agent-Based Automated Proof Optimization" - Chain-of-States technique. arXiv:2410.04753

Либиди Фрог Connection

Либиди Фрог (Proof-of-Frog) + Chain of States = compositional proof verification:

proof-chain(-1) ⊗ proof-of-frog(0) ⊗ alife(+1) = 0 ✓

Where Chain of States provides the -1 (validator) role:
- Validates each state transition
- Ensures GF(3) conservation across proof steps
- Connects informal human reasoning to formal verification

Gay.jl Colors

using Gay
seed = gay_seed(2512)  # arXiv paper ID
palette(3)  # CoS triad colors
StageColorMeaning
Initial#B0285FUnproven goal
Intermediate#77DEB1Progress state
Terminal#8ADB6EQED

Autopoietic Marginalia

The interaction IS the skill improving itself.

Every use of this skill is an opportunity for worlding:

  • MEMORY (-1): Record what was learned
  • REMEMBERING (0): Connect patterns to other skills
  • WORLDING (+1): Evolve the skill based on use

Add Interaction Exemplars here as the skill is used.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Model ElevenLabs voice synthesis as an ACSet schema with Unison ability handlers for typed voice operations. Use when integrating ElevenLabs TTS into category-theoretic pipelines, building typed voice synthesis workflows, or managing multi-voice narration with GF(3) conservation.

中文简介正在准备中。当前显示原文说明。

plurigrid/asi702026年7月10日 更新

Systematic process for analyzing and modernizing legacy applications to comply with the 12-Factor App methodology. Covers code analysis, configuration externalization, dependency management, and container/Kubernetes best practices.

中文简介正在准备中。当前显示原文说明。

plurigrid/asi702026年7月10日 更新

13c0e3

免费

Gay MCP skill at invocation 26

中文简介正在准备中。当前显示原文说明。

plurigrid/asi702026年7月10日 更新

19d57d

免费

Gay MCP skill at invocation 5

中文简介正在准备中。当前显示原文说明。

plurigrid/asi702026年7月10日 更新

1ea91a

免费

Gay MCP skill at invocation 27

中文简介正在准备中。当前显示原文说明。

plurigrid/asi702026年7月10日 更新

1eab21

免费

Gay MCP skill at invocation 3

中文简介正在准备中。当前显示原文说明。

plurigrid/asi702026年7月10日 更新

查看 plurigrid 的全部技能

报告此技能的问题