Formalizing qec claims in lean

From AndyLiuin/QEC-Autoresearch-Skills · View interactive version

Formalizing qec claims in lean is an AI agent skill from the GitHub repository AndyLiuin/QEC-Autoresearch-Skills. Guides translation of QEC claims into Lean workflows with explicit theorem obligations, build checks, and honest boundaries between formalized results and still-informal reasoning.

How to use this skill

Skill file

Formalizing QEC Claims In Lean

What This Skill Is For

Use this skill when a QEC task needs formalization rather than only prose:

When To Use It Versus Alternatives

Use this skill when the task is about:

Do not use this skill when the task is primarily:

Required Artifacts And Assumptions

Expected inputs:

Expected outputs:

Assumptions to make explicit:

Standard Workflow Checklist

  1. Read CODE0 and decide if Lean is the right tool for the current claim.
  2. Rewrite the English claim into a precise theorem obligation using CODE0.
  3. Separate definitions, assumptions, and the target conclusion before writing Lean code.
  4. Identify the smallest proof slice that is worth checking first instead of formalizing the whole paper at once.
  5. If no Lean project exists yet, plan the minimal project bootstrap and dependency imports before proving anything.
  6. Record build failures, unresolved goals, and notation mismatches as artifacts of progress instead of hiding them in prose.
  7. Keep the repo claim honest: documentation-first support now, executable formalization service later.

Validation Loop

Before closing work:

  1. confirm the theorem statement matches the intended English claim,
  2. confirm assumptions and imported definitions are explicit,
  3. confirm the current proof status is one of proved, partially formalized, or blocked,
  4. confirm unresolved goals or sorry placeholders are surfaced as gaps, not buried,
  5. confirm any future LeanBundle output would be traceable to a named theorem obligation.

Common Issues And Fixes

Formalizing a vague claim

Problem: the statement sounds plausible in prose but is still too ambiguous for Lean.

Fix: stop and rewrite the claim with precise quantifiers, domains, and assumptions before touching the prover.

Skipping easier falsification

Problem: Lean is started before a quick counterexample search or finite sanity check.

Fix: run the cheaper check first when the claim might simply be false or misstated.

Hidden dependency explosion

Problem: a small claim quietly depends on a large stack of unstated notation and imported theory.

Fix: isolate the minimal dependency frontier and formalize only the slice that can be stated cleanly.

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.