$\Delta_1$-definability of the induction schemata, and of 𝗜𝚺₁ and 𝗣𝗔 #
This file discharges the two axioms that previously sat in Examples.lean:
PA_delta1Definable : 𝗣𝗔.Δ₁ and ISigma1_delta1Definable : 𝗜𝚺₁.Δ₁.
The route:
𝗣𝗔 = 𝗣𝗔⁻ + InductionScheme ℒₒᵣ Set.univ
𝗜𝚺₁ = 𝗣𝗔⁻ + InductionScheme ℒₒᵣ (Arithmetic.Hierarchy 𝚺 1)
𝗣𝗔⁻ is a finite set of sentences, so Theory.Δ₁.ofFinite gives 𝗣𝗔⁻.Δ₁.
Theory.Δ₁.add/.ofEq then reduce both headline instances to the single obligation
(InductionScheme ℒₒᵣ C).Δ₁, which is the mathematical content of this file.
Internal iterated universal quantifier qqAlls #
qqAlls p k = ^∀ ^∀ … ^∀ p (k quantifiers), the internal counterpart of the meta universal
closure ∀¹*. This is part (a) of arithmetizing univCl (part (b), the free→bound fixitr
rewrite, is still open). The headline of this section is quote_allClosure:
⌜∀¹* φ⌝ = qqAlls ⌜φ⌝ n.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
qqAlls p k = ^∀ ^∀ ... ^∀ p (k universal quantifiers).
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
closing k variables of an (n+k)-formula yields an n-formula
The internal iterated-^∀ computes the universal-closure code:
⌜∀¹* φ⌝ = qqAlls ⌜φ⌝ n.
The Gödel code of a sentence univCl ψ agrees with that of its 0-ary semiformula
unfolding univCl' ψ (which prepends fvSup ψ universals to the fixitr-rewritten body).
⌜univCl' ψ⌝ = qqAlls ⌜fixitr 0 (fvSup ψ) ▹ ψ⌝ (fvSup ψ): the universal closure is the
internal iterated-^∀ applied to the freevar-free fixitr-image of ψ.
Combined: the code of the universal closure of ψ.
Closure inversion at the code level. Substituting the free-variable atoms &0 … &(m-1)
back into the fixitr-image recovers ⌜φ⌝. This is the DECODE direction: the recognizer can
recover ⌜succInd ψ⌝ (hence ψ) from the freevar-free closure body using the already-proven
internal subst, with no need for an internal fixitr. Meta witness: subst_comp_fixitr.
Sup attained. The largest free-variable index of φ is fvSup φ - 1 (when φ has free
variables). Together with lt_fvSup_of_fvar? this pins fvSup as exactly the count of universals
in univCl', and is what the recognizer's bv b = m clause checks (no over-recognition by padding
leading ∀s).
castLE-invariance of the Gödel code and free variables #
Raising the de Bruijn level of a (semi)term/(semi)formula by Rew.castLE changes neither its raw
Gödel code (the underlying variable indices are preserved) nor its set of free variables. These are
the bookkeeping lemmas behind the bv-pin bridge below: an IsSemiformula j-witness of a code that
"really" sits at level n ≥ j factors through castLE, letting us read off the free-variable
budget.
The bv-pin bridge #
The recognizer pins the number of leading universals m to fvSup of the core formula via a clause
forcing bv b = m. Soundness of that pin rests on the bridge below: the freevar-free universal-closure
body uses exactly fvSup χ bound slots, so closing fewer than fvSup χ quantifiers cannot reach a
sentence — forbidding over-recognition by vacuous leading ∀s.
bv-pin bridge (over ℕ): bv ⌜fixitr 0 (fvSup χ) ▹ χ⌝ = fvSup χ.
≤is immediate fromquote_univCl_eq+bv_qqAlls(closingfvSupquantifiers reaches a sentence, whosebvis0).≥is by level-factoring: were the body anIsSemiformula jfor somej < fvSup,IsSemiformula.soundcastLE-invariance would re-expressχasγ ⇜ ![&0, …, &(j-1)]withγfree-variable-free, forcingfvSup χ ≤ j < fvSup χ.
Internal free-variable vector fvarVec #
fvarVec k = ⟨^&0, ^&1, …, ^&(k-1)⟩, the code of the substitution vector mapping bound var #i
to free var &i. The recognizer applies subst (fvarVec m) · to invert the universal closure
(undo fixitr), recovering ⌜succInd ψ⌝ from the freevar-free body — see quote_subst_fvar_fixitr.
This is a 𝚺₁ vector recursion (fvarVec (k+1) = concat (fvarVec k) (^&k)).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
fvarVec k = ⟨^&0, …, ^&(k-1)⟩.
Equations
Instances For
fvarVec is the code of the typed substitution vector fun i ↦ ^&i (over a standard length).
Raw closure inversion. subst (fvarVec (fvSup φ)) ⌜fixitr 0 (fvSup φ) ▹ φ⌝ = ⌜φ⌝: the
internal substitution by fvarVec undoes the universal-closure fixitr at the code level. This
is the recognizer's mechanism for recovering ⌜succInd ψ⌝ from the freevar-free closure body.
Generalized free-ization. For any β : _root_.LO.FirstOrder.ArithmeticSemiformula ℕ m, substituting the
free-variable atoms &0 … &(m-1) for its m bound slots equals ⌜β ⇜ (&·)⌝. This is the forward
recognizer's tool: once IsSemiformula.sound yields a β with ⌜β⌝ = b, this computes
subst (fvarVec m) b. (Specializes to subst_fvarVec_quote when β is a fixitr-image.)
Σ₁ side condition: internal IsSigma1 predicate (for C = Hierarchy 𝚺 1) #
IsSigma1 p recognizes codes of 𝚺₁ formulas over ℒₒᵣ. By Hierarchy.sigma₁_induction', over
ℒₒᵣ a formula is 𝚺₁ iff built from atoms (=,≠,<,≮,⊤,⊥) by ∧, ∨, (unbounded) ∃, and
bounded ∀ ∀¹[“#0 < !!(bShift t)”] φ, whose body desugars to (^#0 ^≮ u) ^⋎ φ with
u = termBShift t. The recognizer is applied to a code already known to be a semiformula, so atoms
are matched purely structurally (no IsUTermVec guard). Positivity (u is a bShift-image) is
Δ₁: termBShift only grows codes (le_termBShift), so ∃ t < u+1, u = termBShift t is a
bounded ∃ over the Δ₁ graph termBShiftGraph.
termBShift only grows codes: t ≤ termBShift t for well-formed terms. The ^#z → ^#(z+1)
bvar shift grows, ^&x is fixed, and functions recurse componentwise. Bounds the ∃ t guard in
the bounded-∀ clause.
termBShift shifts the bound-variable depth up by exactly one (on well-formed terms): so t is
a level-m term iff termBShift t is level-(m+1). The ←-direction recovers the lowered arity,
which is how the bounded-∀ bound (a termBShift-image) is recognized as a bShift of a real term
of the outer arity.
Internal bounded-∀ code: qqBall u q = ^∀ ((^#0 ^≮ u) ^⋎ q), the code of ∀¹[“#0 < u”] q.
Packaged as a single 𝚺₁-function (mirroring qqNLT/qqRel) so the IsSigma1 fixpoint clause is
flat.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Single-step operator: p is 𝚺₁ given that its immediate subformulas in C are. Atoms carry
no well-formedness guard (the recognizer is applied to a code already known to be a semiformula);
the bounded-∀ clause requires the bound u to be a termBShift-image of a well-formed term.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- LO.FirstOrder.Arithmetic.Bootstrapping.IsSigma1F.construction = { Φ := fun (x : Fin 0 → V) => LO.FirstOrder.Arithmetic.Bootstrapping.IsSigma1F.Phi, defined := ⋯, monotone := ⋯ }
Instances For
IsSigma1 p: p codes a 𝚺₁ formula over ℒₒᵣ (assuming p is a semiformula).
Equations
Instances For
Alias of the forward direction of LO.FirstOrder.Arithmetic.Bootstrapping.IsSigma1.case_iff.
Alias of the reverse direction of LO.FirstOrder.Arithmetic.Bootstrapping.IsSigma1.case_iff.
B1 — 𝗣𝗔⁻ is Δ₁ (it is finite) #
Typed decomposition of succInd #
The crux relates the code ⌜univCl (succInd φ)⌝ to internal primitives. The macro !φ t in
formula position desugars to φ ⇜ ![t] (Rew.substs, not embSubsts as an earlier handoff
claimed), so ⌜succInd φ⌝ collapses under the already-present typed_quote_substs/map_imply/
LCWQIsoGödelQuote.all simp set — no typed_quote_embSubsts bridge is needed.
The typed Gödel code of the induction axiom body, built from the typed code ⌜φ⌝ purely with
the existing typed constructors (subst, 🡒, ∀¹).
The typed succInd shape as a function of the (typed) core code K = ⌜ψ⌝. The recognizer
checks subst (fvarVec m) b = (indBody K).val to recover the core K and verify the body has
the induction-axiom shape.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The raw V → V form of (indBody ·).val — a composition of the 𝚺₁-definable internal
operations subst, imp (p ^→ q = ∼p ^⋎ q), ^∀. This is the function the recognizer's clause
subst (fvarVec m) b = indBodyVal K uses (K a code with IsSemiformula ℒₒᵣ 1 K); it is the
target of the eventual 𝚺₁-graph for the ch assembly.
Equations
- One or more equations did not get rendered due to their size.
Instances For
indBodyVal K.val = (indBody K).val: the raw function computes the typed indBody.
k ≤ indBodyVal k: the core k sits as the bound body of the ^∀ k conclusion inside the
succInd shape, so its code is below the whole axiom's code. This is the clean half of the old
size race — it bounds the recovered core K by the (functionally pinned) subst (fvarVec m) b,
which equals indBodyVal K.
indBodyVal ⌜γ⌝ = ⌜succInd γ⌝: the raw recognizer body computes the succInd shape.
A concrete 𝚺₁-graph for indBodyVal #
The definability tactic above only gives a Prop-level Definable witness; the ch assembly
needs an extractable 𝚺₁.Semisentence with a via correctness instance, mirroring impGraph /
iffGraph. The two substitution constants are the standard codes of the closed substitution
vectors ![⌜‘0’⌝] and ![⌜‘#0+1’⌝]; their absoluteness (↑constant = SemitermVec.val …) is
LO.FirstOrder.Semiterm.quote_eq_encode'.
Standard ℕ-code of the substitution vector ![⌜‘0’⌝] (the ψ(0) instance).
Equations
- LO.FirstOrder.Arithmetic.indSubstConst0 = Matrix.vecToNat fun (i : Fin 1) => Encodable.encode (![↑0] i)
Instances For
Standard ℕ-code of the substitution vector ![⌜‘#0+1’⌝] (the ψ(x+1) instance).
Equations
- LO.FirstOrder.Arithmetic.indSubstConst1 = Matrix.vecToNat fun (i : Fin 1) => Encodable.encode (![‘(!!(LO.FirstOrder.Semiterm.bvar 0) + 1)’] i)
Instances For
Concrete 𝚺₁-graph of indBodyVal, a chain of the subst/imp/qqAll graphs.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The crux — the induction schema is Δ₁ #
We build a concrete recognizer ch : 𝚫₁.Semisentence 1 whose ℕ-extension recognizes exactly the
codes ⌜univCl (succInd ψ)⌝. The recognizer:
R(p) := ∃ m ≤ p, ∃ b ≤ p,
p = qqAlls b m ∧ IsUFormula b ∧ shift b = b ∧ bv b = m
∧ ∃ K ≤ subst (fvarVec m) b, IsSemiformula 1 K
∧ subst (fvarVec m) b = indBodyVal K
bv b = m pins m = fvSup, forbidding over-recognition by padding leading ∀s
(bv_quote_fixitr); the last clause recovers ⌜succInd ψ⌝ from the freevar-free body b.
Concrete 𝚫₁.Semisentence 1 recognizer for the universal induction scheme.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The crux — the induction schema is Δ₁ #
RHS of chUniv_mem_iff reduced to a clean ∃ψ over the syntactic universal closure.
Closure inversion (forward keystone). A freevar-free level-m formula β whose internal
bv is m and which substitutes back to succInd γ is exactly the fixitr-image, so its
m-fold closure is (succInd γ).univCl'. Mirror of bv_quote_fixitr's ≥-direction inversion;
the genuine remaining math.
mem_iff math (C = univ). The recognizer fires on ⌜φ⌝ exactly when φ is the universal
closure of succInd ψ for some one-variable ψ. Forward inverts via IsSemiformula.sound +
closure_inversion; backward composes quote_univCl'/subst_fvarVec_quote'/indBodyVal_quote.
The induction schema InductionScheme ℒₒᵣ Set.univ is Δ₁, via the recognizer chUniv.
Equations
- LO.FirstOrder.Arithmetic.InductionScheme.delta1_univ = { ch := LO.FirstOrder.Arithmetic.chUniv, mem_iff := ⋯, isDelta1 := LO.FirstOrder.Arithmetic.InductionScheme.delta1_univ._proof_1 }
The code of the bounded universal ∀¹[#0 < bShift t] φ is qqBall (termBShift ⌜t⌝) ⌜φ⌝.
The raw code of bShift s is termBShift ⌜s⌝.
(⟸) Every 𝚺₁ formula has a 𝚺₁-recognized code. By sigma₁_induction'.
(⟹) A 𝚺₁-recognized code is the code of a 𝚺₁ formula. Meta-induction on the formula:
atoms are 𝚺₁ unconditionally; ∧/∨/∃ recurse; the ^∀ case is forced into the bounded shape by
the recognizer (IsSigma1.of_all), and the bound is a bShift-image (positivity via
termBV_termBShift_le), so Hierarchy.ball applies.
Correctness of the 𝚺₁-code recognizer: IsSigma1 ⌜ψ⌝ ↔ Hierarchy 𝚺 1 ψ.
The recognizer for InductionScheme ℒₒᵣ (Hierarchy 𝚺 1): InductionUnivR plus the side
condition IsSigma1 K on the recovered core K.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Concrete 𝚫₁.Semisentence 1 recognizer for the 𝚺₁ induction scheme.
Equations
- One or more equations did not get rendered due to their size.
Instances For
RHS of chSigma1_mem_iff reduced to a clean ∃ψ (with the 𝚺₁ side condition).
mem_iff math (C = Hierarchy 𝚺 1). Mirrors chUniv_mem_iff, threading the IsSigma1 K
side condition through isSigma1_iff_hierarchy.
The induction schema InductionScheme ℒₒᵣ (Hierarchy 𝚺 1) is Δ₁, via chSigma1.