agentleFS
r-irber-irbe/proof-skills/skills/hol-metamath-adapter/SKILL.md

hol-metamath-adapter

Skill3 starsChanged 26 days agoApache-2.0View on GitHub

USE FOR: translating HOL Light (.ml tactical scripts) and Metamath (set.mm ZFC proofs) into Lean 4. DO NOT USE FOR: Rocq ports (@rocq-proof-adapter) or Isabelle ports (@isabelle-isar-adapter). TRIGGERS: HOL Light, Metamath, set.mm, MESON_TAC, REAL_ARITH_TAC, WORD_BLAST, uzind, 3eqtri.

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/hol_light.json or references/dialects/metamath.json and query lean_search(source: …

    line 40
  2. Very specific:

    STOP: when porting Metamath m - n where m, n e.

    line 52
  3. Very specific:

    STOP: when porting HOL Light has_integral on improper oscillating functions.

    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

HOL Light & Metamath (set.mm) Proof Adapter (hol_light / metamath -> lean4)

Translate HOL Light OCaml tactical scripts (THEN, THENL, MESON_TAC, REAL_ARITH_TAC, REAL_RING, WORD_BLAST, real^N analysis) and Metamath set.mm ZFC deduction trees (syl, mpd, 3eqtri, uzind, fsum, extensible slot structures) into structured Lean 4 + Mathlib4.

Routing

  • USE FOR: porting HOL Light .ml theorems (multivariate analysis, Flyspeck, s2n-bignum word proofs) and Metamath set.mm / iset.mm theorems into Lean 4.
  • DO NOT USE FOR: Rocq/MathComp .v ports (delegate to @rocq-proof-adapter); Isabelle/Isar .thy ports (delegate to @isabelle-isar-adapter).
  • TRIGGERS: HOL Light, Metamath, set.mm, MESON_TAC, REAL_ARITH_TAC, REAL_RING, WORD_BLAST, SUBGOAL_THEN, 3eqtri, uzind, fsum.

Workflow

  1. Load Dialect & Concordance Map: Read references/dialects/hol_light.json or references/dialects/metamath.json and query lean_search(source: "concordance") for CONC-01..20.
  2. Lift Untyped / Predicate Domains to Lean Types (CONC-04, CONC-14):
    • Metamath x e. N, y e. R, G e. Grp -> typed binders (x : Nat), (y : Real), {G : Type*} [Group G].
    • HOL Light s : A -> bool finite sums nsum (m..n) f -> ∑ i ∈ Finset.Icc m n, f i.
  3. Collapse Low-Level Plumbing Chains into High-Level Tactics (CONC-05, CONC-13, CONC-18):
    • Collapse 20-100 step Metamath syl/mpd/addass/leadd1i chains into tauto, ring, linarith, omega, or positivity.

Recovery & STOP

  • STOP when porting Metamath m - n where m, n e. N: in set.mm, N c_ Z c_ C so 2 - 5 = -3, whereas in Lean (2 - 5 : Nat) = 0! Either cast to Int via zify or prove n <= m before using Nat.sub.
  • STOP when porting HOL Light has_integral on improper oscillating functions; verify IntegrableOn f s volume for Mathlib Bochner integration.

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/hol-metamath-adapter-handbook.md .

See also

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