LeanPool.FormalizationOfBoundedArithmetic.V0 #
class
V0Model
(num : Type)
(str : outParam Type)
extends FirstOrder.Language.HasLen str num, Membership num str, BASICModel num :
Type u_1
Two-sorted V0-style models used by this development.
This is a strengthened bundled API: besides the finite V0 comprehension axioms, it includes induction, order, and algebraic laws as fields so later files can build the string-addition theory over a compact typeclass interface.
- len : str → num
- SE {X Y : str} : FirstOrder.Language.HasLen.len X = FirstOrder.Language.HasLen.len Y → (∀ y < FirstOrder.Language.HasLen.len X, y ∈ X ↔ y ∈ Y) → X = Y
- comp10 (Q : str) (b : num) : ∃ (Y : str), FirstOrder.Language.HasLen.len Y ≤ b ∧ ∀ x < b, x ∈ Y ↔ x ∉ Q
- xmin_comp_ax (X : str) : ∃ (Y : str), FirstOrder.Language.HasLen.len Y ≤ FirstOrder.Language.HasLen.len X ∧ ∀ z < FirstOrder.Language.HasLen.len X, z ∈ Y ↔ ∀ y ≤ z, y ∉ X
- open_induction_ax {n : FvName} {a : Type} [IsEnum a] (phi : FirstOrder.Language.peano.BoundedFormula (Vars1 n ⊕ a) 0) : phi.IsOpen → num ⊨ mkInductionSentence phi
- delta0_induction_ax {n : FvName} {a : Type} [IsEnum a] (phi : FirstOrder.Language.peano.BoundedFormula (Vars1 n ⊕ a) 0) : phi.IsDelta0 → num ⊨ mkInductionSentence phi
- add_left_cancel (x : num) : IsAddLeftRegular x
- add_right_cancel (x : num) : IsAddRightRegular x
- toDecidableLE : DecidableLE num
Decidability of the order relation on numbers.
Instances
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[implicit_reducible]
Equations
- V0Model.instAddZeroClass = { toZero := FirstOrder.Language.peano.instZeroOfStructure, toAdd := FirstOrder.Language.peano.instAddOfStructure, zero_add := ⋯, add_zero := ⋯ }
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[implicit_reducible]
Equations
- One or more equations did not get rendered due to their size.
@[implicit_reducible]
Equations
- V0Model.instAddCommMonoid = { toAddMonoid := V0Model.instAddMonoid, add_comm := ⋯ }
@[implicit_reducible]
Equations
- V0Model.instPartialOrder_1 = { toPreorder := V0Model.instPartialOrder.toPreorder, le_antisymm := ⋯ }
theorem
V0Model.xmin_comp
{num str : Type}
[M : V0Model num str]
(X : str)
:
∃ (Y : str),
FirstOrder.Language.HasLen.len Y ≤ FirstOrder.Language.HasLen.len X ∧ ∀ z < FirstOrder.Language.HasLen.len X, z ∈ Y ↔ ∀ y ≤ z, y ∉ X
theorem
V0Model.ex_elt_of_len_pos
{num str : Type}
[M : V0Model num str]
{X : str}
:
0 < FirstOrder.Language.HasLen.len X → ∃ x ∈ X, x + 1 = FirstOrder.Language.HasLen.len X
theorem
V0Model.xmin
{num str : Type}
[M : V0Model num str]
{X : str}
:
0 < FirstOrder.Language.HasLen.len X → ∃ x < FirstOrder.Language.HasLen.len X, x ∈ X ∧ ∀ y < x, y ∉ X
theorem
V0Model.len_ne_zero_of_in
{num str : Type}
[M : V0Model num str]
{x : num}
{X : str}
:
x ∈ X → FirstOrder.Language.HasLen.len X ≠ 0
Named alias emphasizing that this induction theorem uses the strengthened V0Model bundle.
@[implicit_reducible]
Equations
- V0Model.instIDelta0Model = { toBASICModel := M.toBASICModel, open_induction := ⋯, delta0_induction := ⋯ }
class
V0ExtModel
(num : Type)
(str : outParam Type)
extends Zero str, HasSucc str, Add str, V0Model num str :
Type u_1
Extension of V0 with string successor and string addition.
- zero : str
- succ : str → str
- add : str → str → str
- len : str → num
- SE {X Y : str} : FirstOrder.Language.HasLen.len X = FirstOrder.Language.HasLen.len Y → (∀ y < FirstOrder.Language.HasLen.len X, y ∈ X ↔ y ∈ Y) → X = Y
- xmin_comp_ax (X : str) : ∃ (Y : str), FirstOrder.Language.HasLen.len Y ≤ FirstOrder.Language.HasLen.len X ∧ ∀ z < FirstOrder.Language.HasLen.len X, z ∈ Y ↔ ∀ y ≤ z, y ∉ X
- comp_xind_ax (X : str) (z : num) : ∃ (Y : str), FirstOrder.Language.HasLen.len Y ≤ z + 1 ∧ ∀ y < z + 1, y ∈ Y ↔ y ∉ X
- open_induction_ax {n : FvName} {a : Type} [IsEnum a] (phi : FirstOrder.Language.peano.BoundedFormula (Vars1 n ⊕ a) 0) : phi.IsOpen → num ⊨ mkInductionSentence phi
- delta0_induction_ax {n : FvName} {a : Type} [IsEnum a] (phi : FirstOrder.Language.peano.BoundedFormula (Vars1 n ⊕ a) 0) : phi.IsDelta0 → num ⊨ mkInductionSentence phi
- toDecidableLE : DecidableLE num
Instances
theorem
exists_of_len_lt
{num str : Type}
[M : V0ExtModel num str]
{X Y : str}
:
FirstOrder.Language.HasLen.len X < FirstOrder.Language.HasLen.len Y →
∃ z ∈ Y, z ∉ X ∧ z + 1 = FirstOrder.Language.HasLen.len Y
theorem
exists_of_len_lt'
{num str : Type}
[M : V0ExtModel num str]
{X : str}
{i : num}
:
i < FirstOrder.Language.HasLen.len X → ∃ z ∈ X, i ≤ z ∧ z + 1 = FirstOrder.Language.HasLen.len X
theorem
len_pos_of_exists
{num str : Type}
[M : V0ExtModel num str]
{i : num}
{X : str}
:
i ∈ X → FirstOrder.Language.HasLen.len X > 0
theorem
lt_add_right_of_mem_left
{num str : Type}
[M : V0ExtModel num str]
{X : str}
{b i : num}
(h : i ∈ X)
:
A position belonging to X lies below len X + b for any bound b.
theorem
lt_add_left_of_mem_right
{num str : Type}
[M : V0ExtModel num str]
{Y : str}
{a i : num}
(h : i ∈ Y)
:
A position belonging to Y lies below a + len Y for any bound a.
theorem
carry_lt_add_len
{num str : Type}
[M : V0ExtModel num str]
{X Y : str}
{i : num}
:
Carry i X Y → i < FirstOrder.Language.HasLen.len X + FirstOrder.Language.HasLen.len Y