Each meta-mirror value renders to a Lean expression that, when elaborated, reconstructs the same value. The bridge's loop now closes at the source level: an Edit's .cterm content can be written to a .lean file and parsed back via Lean's own parser/elaborator — no custom parser required. · nameToLeanSource — Lean.Name → constructor-call source. · MetaClassifier.toLeanSource — lattice → Infoductor.MetaClassifier.* calls. · MetaCTerm.toLeanSource — full structural mirror → constructor source. · MetaArtifact.toLeanSource — artifact layer wrapping the above. Foundation.Restructure's EditOp.apply for .cterm now uses MetaCTerm.toLeanSource instead of toString (repr t). The headless interpreter writes valid Lean source. The recursive helper for Lean.Name lives at Infoductor.nameToLeanSource rather than Lean.Name.toLeanSource — defining a Lean.Name.* function inside `namespace Infoductor` would otherwise create an Infoductor.Lean namespace and shadow the global Lean library. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Comonad | ||
| Foundation | ||
| Comonad.lean | ||
| Foundation.lean | ||
| Test.lean | ||