agentleFS
r-irber-irbe/proof-skills/skills/itp-cross-porting/SKILL.md

itp-cross-porting

Skill3 starsChanged 24 days agoApache-2.0View on GitHub

USE FOR: porting proofs across Lean 4, Rocq, Isabelle, HOL Light, Agda, and Metamath (CONC-01..20). DO NOT USE FOR: single-prover Lean 4 proving (@lean-proof) or Mathlib PRs (@lean-upstream-porting). TRIGGERS: cross-ITP port, translate proof, Agda to Lean, concordance, CONC-01.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    STOP: if a foreign proof relies on untyped partiality or set-theoretic junk values that falsify the naïve Lean 4 translation.

    line 58
  2. Very specific:

    STOP: if porting from Agda/Coq introduces a custom axiom in Lean 4.

    line 62

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Cross-ITP Proof Porting & Concordance Router (CONC-01..20)

Coordinate proof and specification translation across the 6 supported Interactive Theorem Prover (ITP) families (lean4, coq_mathcomp, isabelle_hol, hol_light, agda, metamath) using vendor/itp-ontology/cross-itp-concordance.v1.json and references/dialects/*.json.

Routing

  • USE FOR: end-to-end cross-prover translation planning, Agda <-> Lean 4 ports, multi-prover concordance queries (lean_search(source: "concordance")), and routing dialect-specific translations to @rocq-proof-adapter, @isabelle-isar-adapter, or @hol-metamath-adapter.
  • DO NOT USE FOR: standard Lean 4 proof authoring without a foreign source proof (delegate to @lean-proof); porting existing Lean 4 corpus lemmas into Mathlib4 PRs (delegate to @lean-upstream-porting).
  • TRIGGERS: cross-ITP port, translate proof, Agda to Lean, Coq to Lean, Isabelle to Lean, HOL Light to Lean, Metamath to Lean, CONC-01..CONC-20.

Workflow

  1. Identify Source Prover & Foundation Delta: Classify the source artifact (coq_mathcomp, isabelle_hol, hol_light, agda, metamath) and load its dialect table from references/dialects/<dialect>.json.
  2. Query Concordance (lean_search(source: "concordance")): Map each foreign proof mechanism (CONC-01 through CONC-20) to its idiomatic Lean 4 counterpart rather than translating line-by-line tactical plumbing.
  3. Dispatch Dialect Adapter when Specialized:
    • Rocq / Coq / SSReflect / MathComp -> @rocq-proof-adapter
    • Isabelle/HOL / Isar / locales -> @isabelle-isar-adapter
    • HOL Light / Metamath (set.mm) -> @hol-metamath-adapter

Recovery & STOP

  • STOP if a foreign proof relies on untyped partiality or set-theoretic junk values that falsify the naïve Lean 4 translation; add explicit domain preconditions via @lean-specification.
  • STOP if porting from Agda/Coq introduces a custom axiom in Lean 4; map classical/extensional postulates to Lean's standard [propext, Classical.choice, Quot.sound].

Handoffs

  • Predecessors: skill:lean-gateway, skill:lean-research, skill:lean-specification.
  • Successors: skill:rocq-proof-adapter, skill:isabelle-isar-adapter, skill:hol-metamath-adapter, skill:lean-proof, skill:lean-proof-review.

Detailed reference

Full encyclopedic reference, decision trees, and lookup tables live in references/itp-cross-porting-handbook.md .

See also

  • ../../references/itp-cross-porting-handbook.md -- Complete itp-cross-porting Handbook
  • ../lean-gateway/SKILL.md -- Top-level skill router

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.