cyberneticlibrary

Convert EDN Proofs to Lean

edn-to-leancommandsetup L1141
tobiasosborne/alethfeld
What it does

Convert EDN mathematical proof to Lean 4 formalization

Best for

Formalizing proofs from symbolic logic systems into Lean when step-by-step mapping of justifications to tactics is needed.

Inputs
  • · Path to EDN proof file with :theorem, :symbols, :assumptions, :steps, :qed
Outputs
  • · Lean 4 file at lean/AlethfeldLean/path.lean
  • · Type signatures, imports, proof skeleton with sorry placeholders
  • · Comments linking steps to EDN proof IDs
Requires
  • · Lean 4
  • · Mathlib (for type definitions and tactics)
  • · lake (Lean build tool)
Preconditions
  • · Lean 4 and lake installed
  • · Mathlib available
  • · EDN file is well-formed (valid :theorem, :symbols)
  • · Types in EDN map to Lean equivalents (ℝ->Real, ℕ->Nat)
Failure modes
  • · EDN type unmapped to Lean = type errors at lake build
  • · Proof step justification not recognized = tactic mismatch (e.g., :definition-expansion != unfold)
  • · lake build fails = missing imports or type signature errors
  • · sorry placeholders not filled = proof incomplete
Trust signals
  • · Includes EDN->Lean type mapping table (ℝ, ℕ, operators)
  • · Maps proof justifications to specific tactics (:modus-ponens -> apply)
  • · Verification step via lake build prevents broken scaffolds