LeanCode
LeanCode packages a source string and module name for Lean code that admits type-checking. Researchers modeling self-referential formal systems cite it when treating the RRF formalization as its own recognition event. The declaration is a plain structure with two String fields and no computational content or proof obligations.
claimA record type whose instances hold a string field for source text and a string field for the module name, representing Lean code that can be type-checked.
background
The RRF Foundation module treats the Lean formalization as self-describing: the code is a recognition event, its compilation a proof, and its type-checking a measurement. The RRF formalization itself forms an octave of the RRF, allowing internal consistency checks without proving consistency from within, per the Gödel-like limit noted in the module.
proof idea
This declaration is a structure definition introducing the two fields source and module with no proof body or tactics.
why it matters in Recognition Science
LeanCode supplies the base type for CompilationAsRecognition (treating type-check success as recognition), FormalizationAsOctave (modeling proof complexity as strain in the logical octave), MetaRRF (closing self-description), and SelfReferentialCode. It realizes the module's self-reference claim and aligns with the eight-tick octave and T7 forcing step.
scope and limits
- Does not embed the actual RRF source text.
- Does not record or perform type-checking.
- Does not constrain the module name beyond string type.
- Does not link directly to J-cost or spectral structures.
formal statement (Lean)
30structure LeanCode where
31 /-- The source code (as a string). -/
32 source : String
33 /-- The module name. -/
34 module : String
35
36/-- The result of type-checking code. -/