Documentation

ReflectiveSubsystems.GodelInternalization

Internalizing the bounded proof relation ([Decoupling] §6.3, Theorem 6.3, Levels L2a/L2b) #

Provenance: [Decoupling], §4.6 (Proposition 4.5, minimality — finite products + bounded recursor, no exponential), §5.4 (Proposition 5.4, the necessity counterpart), §6.1–6.3 (Definition 6.1, Theorem 6.2, Theorem 6.3 the internalization).

This extends the Level-1 Gödel skeleton (ReflectiveSubsystems/GodelCore.lean, …GodelThreshold.lean, …Reflective.lean) to the concrete §6.3 internalization, machine-checking an explicit capacity polynomial. Gödel incompleteness stays the imported black box (the ReflectiveSubsystems.Incompleteness hypothesis, discharged from Foundation in ReflectiveSubsystems/GodelComplete.lean); we do NOT re-prove it. By Proposition 4.5 the whole construction lives in the finite-product + bounded-recursor fragment Rep₀(S) — no Cartesian-closed structure is used here.

The quantitative model (the point of this file) #

For a Gödel number g, write n := Nat.clog 2 (g+1) — the bit-length of g (the size of the Gödel sentence, §5.3). Two budgets enter (Definition 6.1), kept apart:

Capacities are bit-lengths: hosting depth M_chk costs working memory |s_work| ≥ log₂ M_chk. The explicit capacity polynomial is capacity n := 2 * n (§6.3: |s_work| = poly(n)): with M_chk ≤ g^2 (a concrete poly(g)) we prove M_chk + 1 ≤ 2 ^ (capacity n) by Nat/omega reasoning, and tie the necessity direction to the sharp pigeonhole ParamNNO.depth_succ_le_two_pow. The bounded search ranges over ProofCode M_chk := {p // p ≤ M_chk} (a Fintype) and is the finite fold along the orbit of the bounded recursor cyclicParamNNO M_chk — no exponential.

What this DOES establish (the abstract conditional — axiom-clean) #

What this does NOT establish (flagged) #

Hypotheses: paper-stated vs added #

The proof-code index set and its recursor orbit #

@[reducible, inline]

§6.3: ProofCode := {p ∈ S_work : p ≤ M_chk}, the proof codes within the working budget. A Fintype of cardinality M_chk + 1, in bijection with the orbit Fin (M_chk+1) of the bounded recursor cyclicParamNNO M_chk.

Equations
Instances For

    ProofCode M_chk ≃ Fin (M_chk+1): the proof codes are exactly the recursor's orbit indices.

    Equations
    Instances For

      The bounded-proof interface and the L2b decision morphism #

      The abstract §6.3 bounded-proof interface (Theorem 6.3, L2a inputs): a Formula type with a size map gnum, an internal Derivable predicate, a recursion budget Mchk, and a decidable bounded proof relation Prf φ p ("p is a proof of φ," codes p ≤ Mchk) that is sound — accepting a code implies derivability (one direction; the only direction §6.3 L2b needs).

      • Formula : Type

        the type of sentences the checker reasons about.

      • gnum : self.Formula → ℕ

        the size (Gödel number) of a sentence.

      • Derivable : self.Formula → Prop

        the subsystem's own derivability — the predicate the checker under-approximates.

      • Mchk : ℕ

        the recursion budget: proof codes are searched only up to Mchk.

      • Prf : self.Formula → ℕ → Bool

        the bounded proof relation, decidable by construction: Prf φ p = true says the code p is a proof of φ. Being Bool-valued is what makes the decision morphism a total fold.

      • sound (φ : self.Formula) (p : ℕ) : self.Prf φ p = true → self.Derivable φ

        soundness: accepting a code implies derivability. Only this direction is needed — the decision morphism concludes non-provability from the checker finding nothing.

      Instances For

        §6.3 L2b — the decision morphism Decide(φ) = ⋀_{p ≤ M_chk} ¬Prf(φ, p). Total by construction: a decidable Fintype fold over ProofCode M_chk (finite products + bounded recursor — no exponential, Proposition 4.5).

        Equations
        Instances For

          C.Decide φ = true ↔ no proof code within budget is accepted — the defining property of the L2b bounded-non-provability decision.

          The L2b fold as a finite fold along the recursor orbit of cyclicParamNNO M_chk: C.Decide φ = true iff ¬Prf(φ, p) for every p enumerated as ZMod.val of an orbit element. This is the precise §6.3 sense in which the bounded search is "a single finite fold along the orbit of the bounded recursor N_{M_chk}".

          theorem ReflectiveSubsystems.BoundedChecker.decide_godel (C : BoundedChecker) (True_ : C.Formula → Prop) (gTS : ℕ) (hInc : Incompleteness C.gnum C.Derivable True_ gTS) :
          ∃ (G : C.Formula), C.gnum G = gTS ∧ True_ G ∧ C.Decide G = true

          §6.3 L2b ∧ L3 (the capstone): from the imported Gödel fact Incompleteness (a representable sentence G, true and not derivable) and the checker's soundness, the decision morphism returns true on G: Rep(S) decides bounded non-provability of G_{T_S}. The step from "no bounded proof" (decided here) to "no proof of any length" is L3, the imported theorem — used only as the hypothesis ¬ Derivable G.

          The explicit capacity polynomial (§6.3 / Theorem 6.2) and Proposition 5.4 #

          The explicit §6.3 capacity polynomial P(n) = 2n (work-memory bit-count): for the concrete proof-code budget M_chk ≤ g^2 it hosts the recursor of depth M_chk (M_chk + 1 ≤ 2^{P(n)}).

          Equations
          Instances For
            theorem ReflectiveSubsystems.capacity_bound (g Mchk : ℕ) (hM : Mchk ≤ g ^ 2) :
            Mchk + 1 ≤ 2 ^ capacity (Nat.clog 2 (g + 1))

            Explicit capacity bound (Theorem 6.2 / §6.3): with M_chk ≤ g^2 (a concrete poly(g)), the recursor depth M_chk is hosted by capacity n = 2n work bits, n := Nat.clog 2 (g+1) the size of the Gödel sentence: M_chk + 1 ≤ 2 ^ (capacity n). Pure Nat/omega reasoning.

            theorem ReflectiveSubsystems.proofcode_workspace_bound (g Mchk : ℕ) (hM : Mchk ≤ g ^ 2) {p : ℕ} (hp : p ≤ Mchk) :
            Nat.clog 2 (p + 1) ≤ capacity (Nat.clog 2 (g + 1))

            §5.4 / §6.3 — the per-proof verification workspace is within the linear capacity 2n. Every candidate proof code p ≤ M_chk (hence the workspace to hold one candidate proof, the part that was previously flagged "not yet bounded") fits in capacity n = 2n work bits, n := Nat.clog 2 (g+1), given the concrete budget M_chk ≤ g^2. So the per-proof workspace is poly(n) — indeed within the same 2n as the syntax objects and the recursor — and the two-sidedness of Proposition 5.4 is tight up to a constant, not open at the verification step. (The remaining Δ₀/poly-time check of a held candidate, Buss 1986, runs in poly(n) scratch — paper-level.) The assembly of these per-constituent bounds into the scratch bound of the enumeration itself is machine-checked in checker_scratch_closure — the loop over all M_chk + 1 candidates runs in a workspace bounded independently of M_chk — with the per-candidate check entering there as its hstep hypothesis, exactly the paper-level input named above.

            theorem ReflectiveSubsystems.proofCodes_embed (Mchk sworkBits : ℕ) {W : Type u_1} [Fintype W] (hW : Fintype.card W = 2 ^ sworkBits) (h : Mchk + 1 ≤ 2 ^ sworkBits) :

            §6.3 "ProofCode ⊆ S_work": once the work memory W (with |W| = 2^{|s_work|}) is large enough to host the recursor depth M_chk (M_chk + 1 ≤ 2^{|s_work|}), the proof codes embed into it. Fintype.card (ProofCode M_chk) = M_chk + 1 ≤ |W|.

            theorem ReflectiveSubsystems.prop_5_4 {W : Type u_1} [Fintype W] (P : ParamNNO W) (sworkBits g : ℕ) (hW : Fintype.card W = 2 ^ sworkBits) (hg : g ≤ P.depth) :
            Nat.clog 2 (g + 1) ≤ sworkBits

            Proposition 5.4 (Necessity of capacity; two-sided threshold). A bounded recursor on work memory W with |W| = 2^{|s_work|} whose indexing depth reaches g (g ≤ P.depth, i.e. g is in range, Level 1) forces |s_work| ≥ Nat.clog 2 (g+1). Below this capacity no decoupled subsystem even indexes G_{T_S}, hence none of the Gödel phenomenon of §6. Rides the machine-checked pigeonhole depth_succ_le_two_pow.

            Theorem 6.3 (the bundled internalization: L1 ∧ L2b ∧ capacity) #

            theorem ReflectiveSubsystems.BoundedChecker.internalization (C : BoundedChecker) (True_ : C.Formula → Prop) (g : ℕ) (hidx : g ≤ C.Mchk) (hpoly : C.Mchk ≤ g ^ 2) (hInc : Incompleteness C.gnum C.Derivable True_ g) :
            ∃ (G : C.Formula), C.gnum G = g ∧ True_ G ∧ g ≤ C.Mchk ∧ C.Decide G = true ∧ C.Mchk + 1 ≤ 2 ^ capacity (Nat.clog 2 (g + 1))

            Theorem 6.3 (Internalization), Levels L1 ∧ L2b with the capacity bound. For a bounded checker with budget M_chk ≤ g^2, indexing budget reaching g (g ≤ M_chk, so g is in range — L1), under imported incompleteness at gTS = g:

            • (L1) g ≤ M_chk: the Gödel number is a value of the recursor (in range);
            • (L2b) Decide(G) = true: Rep(S) decides bounded non-provability of G;
            • (capacity) M_chk + 1 ≤ 2 ^ (capacity n), n := Nat.clog 2 (g+1): hosted by poly(n) bits. Uses finite products + the bounded recursor only (Proposition 4.5); incompleteness imported (L3/L4).