pith. machine review for the scientific record. sign in
structure

SelfReferentialCode

definition
show as:
view math explainer →
module
IndisputableMonolith.RRF.Foundation.SelfReference
domain
RRF
line
42 · github
papers citing
none yet

open explainer

Generate a durable explainer page for this declaration.

open lean source

IndisputableMonolith.RRF.Foundation.SelfReference on GitHub at line 42.

browse module

All declarations in this module, on Recognition.

explainer page

Tracked in the explainer inventory; generation is lazy so crawlers do not trigger LLM jobs.

open explainer

depends on

used by

formal source

  39  | failure (error : String) : TypeCheckResult
  40
  41/-- A self-referential code structure. -/
  42structure SelfReferentialCode where
  43  /-- The code being analyzed. -/
  44  code : LeanCode
  45  /-- The code compiles (type-checks). -/
  46  compiles : TypeCheckResult
  47  /-- The code refers to itself (as a proposition).
  48      Refined: check if source contains module name. -/
  49  self_referential : code.source.contains code.module.toSubstring
  50
  51/-- If code compiles, it is "recognized" (valid in the type theory). -/
  52def isRecognized (s : SelfReferentialCode) : Bool :=
  53  match s.compiles with
  54  | .success => true
  55  | .failure _ => false
  56
  57/-! ## The Meta-RRF Structure -/
  58
  59/-- A description of the RRF in Lean. -/
  60structure RRFDescription where
  61  /-- Core definitions exist.
  62      Witnessed by golden ratio φ. -/
  63  core_witness : ℝ
  64  /-- Theorems are proved. -/
  65  theorem_count : ℕ
  66  /-- Models exist (consistency). -/
  67  model_witness : Nonempty (ℝ → ℝ)
  68  /-- Hypotheses are explicit. -/
  69  hypothesis_count : ℕ
  70
  71/-- The current RRF formalization. -/
  72def currentRRF : RRFDescription := {