agentleFS
r-irber-irbe/proof-skills/skills/isabelle-isar-adapter/SKILL.md

isabelle-isar-adapter

Skill3 starsChanged 25 days agoApache-2.0View on GitHub

USE FOR: translating Isabelle/HOL and Isar proofs (locales, transfer, HOL-Analysis) into Lean 4. DO NOT USE FOR: Rocq ports (@rocq-proof-adapter) or HOL/Metamath (@hol-metamath-adapter). TRIGGERS: Isabelle, Isar, locale, lift_definition, transfer, Sledgehammer, Isabelle to Lean.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 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.

  • 3

    Very specific

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

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

    Load Dialect & Concordance Map: Read references/dialects/isabelle.json and query lean_search(source: "concordance") for CONC-01..20.

    line 40
  2. Very specific:

    STOP: when porting (f ⤏ l) (at x within s): Isabelle's at x within s excludes x (𝓝[s \ {x}] x), whereas Mathlib's 𝓝[s] x includes x!

    line 52
  3. Very specific:

    STOP: if an Isabelle type definition relies on non-emptiness (typedef) where the Lean Type* requires an [Inhabited α] or [Nonempty α] …

    line 56

≈ “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

Isabelle/HOL & Isar Structured Proof Adapter (isabelle_hol -> lean4)

Translate Isabelle/HOL theories (.thy) -- including structured Isar blocks (fix / assume / obtain / have / moreover / ultimately / show), locale hierarchies, Krauss function packages, Lifting & Transfer, and HOL-Analysis filter/measure proofs -- into idiomatic Lean 4.

Routing

  • USE FOR: porting Isabelle/HOL .thy files, Archive of Formal Proofs (AFP) developments, seL4/word theories, and HOL-Analysis / HOL-Probability proofs into Lean 4 + Mathlib4.
  • DO NOT USE FOR: Rocq/Coq .v ports (delegate to @rocq-proof-adapter); HOL Light .ml or Metamath .mm ports (delegate to @hol-metamath-adapter).
  • TRIGGERS: Isabelle, Isar, .thy, locale, interpretation, obtain ... where, also have, finally show, lift_definition, by transfer, sledgehammer, meson.

Workflow

  1. Load Dialect & Concordance Map: Read references/dialects/isabelle.json and query lean_search(source: "concordance") for CONC-01..20.
  2. Translate Locales & Type Definitions (CONC-04, CONC-13, CONC-14):
    • Single-carrier locale / class -> Lean 4 class ([Group G]).
    • Multi-carrier locale -> Lean 4 bundled structure or multi-parameter typeclass ([Module R M]).
    • quotient_type + lift_definition + by transfer -> Quotient + Quotient.lift + Quotient.inductionOn.
  3. Translate Isar Structured Blocks (CONC-02, CONC-06):
    • fix x assume h: "P x" -> intro x h.
    • obtain w where hw: "Q w" using h by blast -> obtain ⟨w, hw⟩ := h.

Recovery & STOP

  • STOP when porting (f ⤏ l) (at x within s): Isabelle's at x within s excludes x (𝓝[s \ {x}] x), whereas Mathlib's 𝓝[s] x includes x! Verify whether x ∈ s matters before choosing 𝓝[≠] x vs 𝓝 x.
  • STOP if an Isabelle type definition relies on non-emptiness (typedef) where the Lean Type* requires an [Inhabited α] or [Nonempty α] typeclass hypothesis.

Handoffs

  • Predecessors: skill:lean-gateway, skill:itp-cross-porting, skill:lean-specification.
  • Successors: skill:lean-proof, skill:lean-proof-review, skill:lean-axiom-closure.

Detailed reference

Full encyclopedic reference, decision trees, and lookup tables live in references/isabelle-isar-adapter-handbook.md .

See also

  • ../../references/isabelle-isar-adapter-handbook.md -- Complete isabelle-isar-adapter 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.