Skip to content

Commit 6632f0a

Browse files
authored
Change bootstrapping 2 (#825)
1 parent 8bc1aa7 commit 6632f0a

91 files changed

Lines changed: 1390 additions & 1155 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Foundation.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public import Foundation.FirstOrder.Basic.Semantics.Semantics
5353
public import Foundation.FirstOrder.Basic.Soundness
5454
public import Foundation.FirstOrder.Basic.Syntax.Formula
5555
public import Foundation.FirstOrder.Basic.Syntax.Rew
56-
public import Foundation.FirstOrder.Basic.Syntax.Schema
5756
-- public import Foundation.FirstOrder.Bootstrapping.DerivabilityCondition.D1
5857
-- public import Foundation.FirstOrder.Bootstrapping.DerivabilityCondition.D2
5958
-- public import Foundation.FirstOrder.Bootstrapping.DerivabilityCondition.D3
@@ -75,8 +74,9 @@ public import Foundation.FirstOrder.Basic.Syntax.Schema
7574
-- public import Foundation.FirstOrder.Bootstrapping.Syntax.Term.Functions
7675
-- public import Foundation.FirstOrder.Bootstrapping.Syntax.Term.Typed
7776
-- public import Foundation.FirstOrder.Bootstrapping.Syntax.Theory
78-
public import Foundation.FirstOrder.Completeness.BooleanValuedModel
7977
public import Foundation.FirstOrder.Completeness.CanonicalModel
78+
public import Foundation.FirstOrder.Completeness.CountableSublanguage
79+
public import Foundation.FirstOrder.Completeness.CounterModel
8080
-- public import Foundation.FirstOrder.Hauptsatz
8181
-- public import Foundation.FirstOrder.Incompleteness.Consistency
8282
-- public import Foundation.FirstOrder.Incompleteness.Dense
@@ -116,7 +116,7 @@ public import Foundation.FirstOrder.Polarity
116116
-- public import Foundation.FirstOrder.SetTheory.TransitiveModel
117117
-- public import Foundation.FirstOrder.SetTheory.Universe
118118
-- public import Foundation.FirstOrder.SetTheory.Z
119-
public import Foundation.FirstOrder.Skolemization.Hull
119+
-- public import Foundation.FirstOrder.Skolemization.Hull
120120
public import Foundation.FirstOrder.Ultraproduct
121121
public import Foundation.Init
122122
public import Foundation.InterpretabilityLogic.Axioms
@@ -375,7 +375,7 @@ public import Foundation.Modal.VanBentham.StandardTranslation
375375
public import Foundation.Propositional.Boolean.Basic
376376
public import Foundation.Propositional.Boolean.Hilbert
377377
public import Foundation.Propositional.Boolean.NNFormula
378-
public import Foundation.Propositional.Boolean.Tait
378+
-- public import Foundation.Propositional.Boolean.Tait
379379
public import Foundation.Propositional.Boolean.ZeroSubst
380380
public import Foundation.Propositional.ConsistentTableau
381381
public import Foundation.Propositional.Dialectica.Basic
@@ -458,7 +458,7 @@ public import Foundation.Propositional.Neighborhood.NB.Basic
458458
public import Foundation.Propositional.Neighborhood.NB.Hilbert.Basic
459459
public import Foundation.Propositional.Neighborhood.NB.Hilbert.WF
460460
public import Foundation.Propositional.Slash
461-
public import Foundation.Propositional.Tait.Calculus
461+
-- public import Foundation.Propositional.Tait.Calculus
462462
public import Foundation.Propositional.Translation
463463
-- public import Foundation.ProvabilityLogic.Arithmetic
464464
-- public import Foundation.ProvabilityLogic.Classification.LetterlessTrace

Foundation/FirstOrder/Arithmetic/Basic/Hierarchy.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ lemma sigma_of_sigma_ex {φ : Semiformula L ξ (n + 1)} : Hierarchy 𝚺 s (∃
256256

257257
set_option linter.flexible false in
258258
lemma rew (ω : Rew L ξ₁ n₁ ξ₂ n₂) {φ : Semiformula L ξ₁ n₁} : Hierarchy Γ s φ → Hierarchy Γ s (ω ▹ φ) := by
259-
intro h; induction h generalizing n₂ <;> try simp [*, Semiformula.rew_rel, Semiformula.rew_nrel]
259+
intro h; induction h generalizing n₂ <;> try simp [*]
260260
case sigma ih => exact (ih _).accum _
261261
case pi ih => exact (ih _).accum _
262262
case dummy_pi ih => exact (ih _).dummy_pi
@@ -476,7 +476,7 @@ end Arithmetic
476476
abbrev ArithmeticTheory.SoundOnHierarchy (T : ArithmeticTheory) (Γ : Polarity) (k : ℕ) := T.SoundOn (Arithmetic.Hierarchy Γ k)
477477

478478
lemma ArithmeticTheory.soundOnHierarchy (T : ArithmeticTheory) (Γ : Polarity) (k : ℕ) [T.SoundOnHierarchy Γ k] :
479-
T ⊢ σ → Arithmetic.Hierarchy Γ k σ → ℕ ⊧ₘ σ := SoundOn.sound
479+
T ⊢ σ → Arithmetic.Hierarchy Γ k σ → ℕ↓[ℒₒᵣ] ⊧ σ := SoundOn.sound
480480

481481
instance (T : ArithmeticTheory) [T.SoundOnHierarchy 𝚺 1] : Entailment.Consistent T :=
482482
T.consistent_of_sound (Arithmetic.Hierarchy 𝚺 1) (by simp)

Foundation/FirstOrder/Arithmetic/Basic/Misc.lean

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,12 @@ def bexsLTSucc (t : Semiterm L ξ n) (φ : Semiformula L ξ (n + 1)) : Semiformu
135135

136136
variable {M : Type*} {s : Structure L M} [LT M] [One M] [Add M] [Structure.LT L M] [Structure.One L M] [Structure.Add L M]
137137

138-
variable {t : Semiterm L ξ n} {φ : Semiformula L ξ (n + 1)}
139-
140-
lemma eval_ballLTSucc {e ε} :
141-
Eval s e ε (φ.ballLTSucc t) ↔ ∀ x < t.val s e ε + 1, Eval s (x :> e) ε φ := by
138+
lemma eval_ballLTSucc {φ : Semiformula L ξ (n + 1)} {t : Semiterm L ξ n} {fv bv} :
139+
(φ.ballLTSucc t).Eval (M := M) fv bv ↔ ∀ x < t.val (M := M) fv bv + 1, φ.Eval (M := M) (x :> fv) bv := by
142140
simp [ballLTSucc, Semiterm.Operator.numeral]
143141

144-
lemma eval_bexsLTSucc {e ε} :
145-
Eval s e ε (φ.bexsLTSucc t) ↔ ∃ x < t.val s e ε + 1, Eval s (x :> e) ε φ := by
142+
lemma eval_bexsLTSucc {φ : Semiformula L ξ (n + 1)} {t : Semiterm L ξ n} {fv bv} :
143+
(φ.bexsLTSucc t).Eval (M := M) fv bv ↔ ∃ x < t.val (M := M) fv bv + 1, φ.Eval (M := M) (x :> fv) bv := by
146144
simp [bexsLTSucc, Semiterm.Operator.numeral]
147145

148146
end Semiformula
@@ -167,8 +165,6 @@ macro_rules
167165

168166
end BinderNotation
169167

170-
abbrev ArithmeticTheory := Theory ℒₒᵣ
171-
172168
end FirstOrder
173169

174170
end LO

Foundation/FirstOrder/Arithmetic/Basic/Model.lean

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ public import Foundation.FirstOrder.Arithmetic.Basic.Misc
55
@[expose] public section
66
namespace LO.FirstOrder.Arithmetic
77

8-
private lemma consequence_of_aux (T : ArithmeticTheory) [𝗘𝗤 ⪯ T] (φ : Sentence ℒₒᵣ)
8+
private lemma complete_aux (T : ArithmeticTheory) [𝗘𝗤 ℒₒᵣ ⪯ T] (φ : Sentence ℒₒᵣ)
99
(H : ∀ (M : Type w)
1010
[ORingStructure M]
1111
[Structure ℒₒᵣ M]
1212
[Structure.ORing ℒₒᵣ M]
13-
[M ⊧ₘ* T],
14-
M ⊧ₘ φ) :
15-
T φ := consequence_iff_consequence.{_, w}.mp <| consequence_iff_eq.mpr fun M _ _ _ hT =>
16-
letI : Structure.Model ℒₒᵣ M ⊧ₘ* T := Structure.ElementaryEquiv.modelsTheory.mp hT
13+
[M↓[ℒₒᵣ] ⊧* T],
14+
M↓[ℒₒᵣ] ⊧ φ) :
15+
T φ := Theory.Proof.complete <| consequence_iff_eq.mpr fun M _ _ _ hT
16+
letI : (Structure.Model ℒₒᵣ M)↓[ℒₒᵣ] ⊧* T := Structure.ElementaryEquiv.modelsTheory.mp hT
1717
Structure.ElementaryEquiv.models.mpr (H (Structure.Model ℒₒᵣ M))
1818

1919
open Language
@@ -23,38 +23,40 @@ section semantics
2323
variable (M : Type*) [ORingStructure M]
2424

2525
instance standardModel : Structure ℒₒᵣ M where
26-
func := fun _ f =>
26+
func := fun _ f
2727
match f with
28-
| ORing.Func.zero => fun _ => 0
29-
| ORing.Func.one => fun _ => 1
30-
| ORing.Func.add => fun v => v 0 + v 1
31-
| ORing.Func.mul => fun v => v 0 * v 1
32-
rel := fun _ r =>
28+
| ORing.Func.zero => fun _ 0
29+
| ORing.Func.one => fun _ 1
30+
| ORing.Func.add => fun v v 0 + v 1
31+
| ORing.Func.mul => fun v v 0 * v 1
32+
rel := fun _ r
3333
match r with
34-
| ORing.Rel.eq => fun v => v 0 = v 1
35-
| ORing.Rel.lt => fun v => v 0 < v 1
34+
| ORing.Rel.eq => fun v v 0 = v 1
35+
| ORing.Rel.lt => fun v v 0 < v 1
3636

37-
instance : Structure.Eq ℒₒᵣ M :=
38-
by intro a b; simp [standardModel, Semiformula.Operator.val, Semiformula.Operator.Eq.sentence_eq, Semiformula.eval_rel]⟩
37+
instance : Structure.Eq ℒₒᵣ M where
38+
eq a b := by
39+
unfold standardModel
40+
simp [Semiformula.Operator.val, Semiformula.Operator.Eq.sentence_eq]
3941

4042
instance : Structure.Zero ℒₒᵣ M := ⟨rfl⟩
4143

4244
instance : Structure.One ℒₒᵣ M := ⟨rfl⟩
4345

44-
instance : Structure.Add ℒₒᵣ M := ⟨fun _ _ => rfl⟩
46+
instance : Structure.Add ℒₒᵣ M := ⟨fun _ _ rfl⟩
4547

46-
instance : Structure.Mul ℒₒᵣ M := ⟨fun _ _ => rfl⟩
48+
instance : Structure.Mul ℒₒᵣ M := ⟨fun _ _ rfl⟩
4749

48-
instance : Structure.Eq ℒₒᵣ M := ⟨fun _ _ => iff_of_eq rfl⟩
50+
instance : Structure.Eq ℒₒᵣ M := ⟨fun _ _ iff_of_eq rfl⟩
4951

50-
instance : Structure.LT ℒₒᵣ M := ⟨fun _ _ => iff_of_eq rfl⟩
52+
instance : Structure.LT ℒₒᵣ M := ⟨fun _ _ iff_of_eq rfl⟩
5153

5254
instance : ORing ℒₒᵣ := ORing.mk
5355

5456
lemma standardModel_unique' (s : Structure ℒₒᵣ M)
5557
(hZero : Structure.Zero ℒₒᵣ M) (hOne : Structure.One ℒₒᵣ M) (hAdd : Structure.Add ℒₒᵣ M) (hMul : Structure.Mul ℒₒᵣ M)
5658
(hEq : Structure.Eq ℒₒᵣ M) (hLT : Structure.LT ℒₒᵣ M) : s = standardModel M := Structure.ext
57-
(funext₃ fun k f _ =>
59+
(funext₃ fun k f _
5860
match k, f with
5961
| _, Language.Zero.zero => by simp [Matrix.empty_eq]
6062
| _, Language.One.one => by simp [Matrix.empty_eq]
@@ -72,31 +74,29 @@ lemma standardModel_unique (s : Structure ℒₒᵣ M)
7274

7375
end semantics
7476

75-
lemma consequence_of_models (T : ArithmeticTheory) [𝗘𝗤 ⪯ T] (φ : Sentence ℒₒᵣ) (H : ∀ (M : Type*) [ORingStructure M] [M ⊧ₘ* T], M ⊧ₘ φ) :
76-
T ⊨ φ := consequence_of_aux T φ fun M _ s _ _ ↦ by
77+
/-- provable_of_models -/
78+
lemma complete (T : ArithmeticTheory) [𝗘𝗤 ℒₒᵣ ⪯ T] (φ : Sentence ℒₒᵣ) (H : ∀ (M : Type*) [ORingStructure M] [M↓[ℒₒᵣ] ⊧* T], M↓[ℒₒᵣ] ⊧ φ) :
79+
T ⊢ φ := complete_aux T φ fun M _ s _ _ ↦ by
7780
rcases standardModel_unique M s
7881
exact H M
7982

80-
lemma provable_of_models (T : ArithmeticTheory) [𝗘𝗤 ⪯ T] (φ : Sentence ℒₒᵣ) (H : ∀ (M : Type*) [ORingStructure M] [M ⊧ₘ* T], M ⊧ₘ φ) :
81-
T ⊢ φ := complete <| consequence_of_models _ _ H
82-
83-
lemma weakerThan_of_models (T S : ArithmeticTheory) [𝗘𝗤 ⪯ S]
83+
lemma weakerThan_of_models (T S : ArithmeticTheory) [𝗘𝗤 ℒₒᵣ ⪯ S]
8484
(H : ∀ (M : Type*)
8585
[ORingStructure M]
86-
[M ⊧ₘ* S],
87-
M ⊧ₘ* T) : T ⪯ S :=
88-
Entailment.weakerThan_iff.mpr fun h ↦ complete <| consequence_of_models _ _ fun M _ _ ↦ sound! h (H M)
86+
[M↓[ℒₒᵣ] ⊧* S],
87+
M↓[ℒₒᵣ] ⊧* T) : T ⪯ S :=
88+
Entailment.weakerThan_iff.mpr fun h ↦ complete _ _ fun M _ _ ↦ Theory.Proof.sound h (H M)
8989

9090
end Arithmetic
9191

9292
class ArithmeticTheory.SoundOn (T : ArithmeticTheory) (F : Sentence ℒₒᵣ → Prop) where
93-
sound : ∀ {σ}, T ⊢ σ → F σ → ℕ ⊧ₘ σ
93+
sound : ∀ {σ}, T ⊢ σ → F σ → ℕ↓[ℒₒᵣ] ⊧ σ
9494

9595
namespace ArithmeticTheory
9696

9797
variable (T : ArithmeticTheory) (F : Sentence ℒₒᵣ → Prop)
9898

99-
instance [ℕ ⊧ₘ* T] : T.SoundOn F := ⟨fun b _ ↦ consequence_iff.mp (sound! b) ℕ inferInstance⟩
99+
instance [ℕ↓[ℒₒᵣ] ⊧* T] : T.SoundOn F := ⟨fun b _ ↦ consequence_iff.mp (Theory.Proof.sound b) ℕ inferInstance⟩
100100

101101
lemma consistent_of_sound [SoundOn T F] (hF : F ⊥) : Entailment.Consistent T :=
102102
Entailment.consistent_iff_unprovable_bot.mpr fun b ↦ SoundOn.sound b hF

Foundation/FirstOrder/Arithmetic/Basic/Monotone.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ namespace Monotone
1414

1515
variable {L : Language} {M : Type*} [LE M] [Structure L M] [Monotone L M]
1616

17-
lemma term_monotone (t : Semiterm L ξ n) {e₁ e₂ : Fin n → M} {ε₁ ε₂ : ξ → M}
18-
(he : ∀ i, e₁ i ≤ e₂ i) (hε : ∀ i, ε₁ i ≤ ε₂ i) :
19-
t.valm M e₁ ε₁ ≤ t.valm M e₂ ε₂ := by
17+
lemma term_monotone (t : Semiterm L ξ n) {fv₁ fv₂ : Fin n → M} {bv₁ bv₂ : ξ → M}
18+
(he : ∀ i, fv₁ i ≤ fv₂ i) (hε : ∀ i, bv₁ i ≤ bv₂ i) :
19+
t.val fv₁ bv₁ ≤ t.val fv₂ bv₂ := by
2020
induction t <;> simp [*, Semiterm.val_func, Monotone.monotone]
2121

2222
end Monotone

Foundation/FirstOrder/Arithmetic/Definability/Absoluteness.lean

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,76 +8,78 @@ namespace LO.FirstOrder.Arithmetic
88
open PeanoMinus R0
99

1010
lemma nat_modelsWithParam_iff_models_substs {v : Fin k → ℕ} {φ : Semisentence ℒₒᵣ k} :
11-
ℕ ⊧/v φ ↔ ℕ ⊧ₘ (φ ⇜ (fun i ↦ Semiterm.Operator.numeral ℒₒᵣ (v i))) := by
12-
simp [models_iff]
11+
φ.Evalb v ↔ ℕ↓[ℒₒᵣ] ⊧ (φ ⇜ (fun i ↦ Semiterm.Operator.numeral ℒₒᵣ (v i))) := by
12+
simp [models_iff, Function.comp_def, Matrix.empty_eq]
1313

14-
variable (V : Type*) [ORingStructure V] [V ⊧ₘ* 𝗣𝗔⁻]
14+
variable (V : Type*) [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗣𝗔⁻]
1515

1616
lemma modelsWithParam_iff_models_substs {v : Fin k → ℕ} {φ : Semisentence ℒₒᵣ k} :
17-
V ⊧/(v ·) φ ↔ V ⊧ₘ (φ ⇜ (fun i ↦ Semiterm.Operator.numeral ℒₒᵣ (v i))) := by
18-
simp [models_iff, numeral_eq_natCast]
17+
φ.Evalb (M := V) (Nat.cast ∘ v) ↔ V↓[ℒₒᵣ] ⊧ (φ ⇜ (fun i ↦ Semiterm.Operator.numeral ℒₒᵣ (v i))) := by
18+
simp [models_iff, Function.comp_def, Matrix.empty_eq, numeral_eq_natCast]
1919

2020
lemma shigmaZero_absolute {k} (φ : 𝚺₀.Semisentence k) (v : Fin k → ℕ) :
21-
ℕ ⊧/v φ.val ↔ V ⊧/(v ·) φ.val :=
21+
φ.val.Evalb v ↔ φ.val.Evalb (M := V) (Nat.cast ∘ v) :=
2222
by simpa [nat_modelsWithParam_iff_models_substs, modelsWithParam_iff_models_substs] using nat_extention_sigmaOne V (by simp),
2323
by simpa [nat_modelsWithParam_iff_models_substs, modelsWithParam_iff_models_substs] using nat_extention_piOne V (by simp)⟩
2424

2525
lemma Defined.shigmaZero_absolute {k} {R : (Fin k → ℕ) → Prop} {R' : (Fin k → V) → Prop} {φ : 𝚺₀.Semisentence k}
2626
(hR : 𝚺₀.Defined R φ) (hR' : 𝚺₀.Defined R' φ) (v : Fin k → ℕ) :
27-
R v ↔ R' (fun i ↦ (v i : V)) := by
27+
R v ↔ R' (Nat.cast ∘ v) := by
2828
simpa [hR.iff, hR'.iff] using Arithmetic.shigmaZero_absolute V φ v
2929

3030
lemma DefinedFunction.shigmaZero_absolute_func {k} {f : (Fin k → ℕ) → ℕ} {f' : (Fin k → V) → V} {φ : 𝚺₀.Semisentence (k + 1)}
3131
(hf : 𝚺₀.DefinedFunction f φ) (hf' : 𝚺₀.DefinedFunction f' φ) (v : Fin k → ℕ) :
32-
(f v : V) = f' (fun i ↦ (v i)) := by
32+
(f v : V) = f' (Nat.cast ∘ v) := by
3333
simpa using Defined.shigmaZero_absolute V hf hf' (f v :> v)
3434

3535
lemma sigmaOne_upward_absolute {k} (φ : 𝚺₁.Semisentence k) (v : Fin k → ℕ) :
36-
ℕ ⊧/v φ.val → V ⊧/(v ·) φ.val := by
36+
φ.val.Evalb v → φ.val.Evalb (M := V) (Nat.cast ∘ v) := by
3737
simpa [nat_modelsWithParam_iff_models_substs, modelsWithParam_iff_models_substs]
3838
using nat_extention_sigmaOne V (by simp)
3939

4040
lemma piOne_downward_absolute {k} (φ : 𝚷₁.Semisentence k) (v : Fin k → ℕ) :
41-
V ⊧/(v ·) φ.val → ℕ ⊧/v φ.val := by
41+
φ.val.Evalb (M := V) (Nat.cast ∘ v) → φ.val.Evalb v := by
4242
simpa [nat_modelsWithParam_iff_models_substs, modelsWithParam_iff_models_substs]
4343
using nat_extention_piOne V (by simp)
4444

4545
lemma deltaOne_absolute {k} (φ : 𝚫₁.Semisentence k)
4646
(properNat : φ.ProperOn ℕ) (proper : φ.ProperOn V) (v : Fin k → ℕ) :
47-
ℕ ⊧/v φ.val ↔ V ⊧/(v ·) φ.val :=
47+
φ.val.Evalb v ↔ φ.val.Evalb (M := V) (Nat.cast ∘ v) :=
4848
by simpa [HierarchySymbol.Semiformula.val_sigma] using sigmaOne_upward_absolute V φ.sigma v,
4949
by simpa [proper.iff', properNat.iff'] using piOne_downward_absolute V φ.pi v⟩
5050

5151
lemma Defined.shigmaOne_absolute {k} {R : (Fin k → ℕ) → Prop} {R' : (Fin k → V) → Prop} {φ : 𝚫₁.Semisentence k}
5252
(hR : 𝚫₁.Defined R φ) (hR' : 𝚫₁.Defined R' φ) (v : Fin k → ℕ) :
53-
R v ↔ R' (fun i ↦ (v i : V)) := by
53+
R v ↔ R' (Nat.cast ∘ v) := by
5454
simpa using deltaOne_absolute V φ hR.proper hR'.proper v
5555

5656
lemma DefinedFunction.shigmaOne_absolute_func {k} {f : (Fin k → ℕ) → ℕ} {f' : (Fin k → V) → V} {φ : 𝚺₁.Semisentence (k + 1)}
5757
(hf : 𝚺₁.DefinedFunction f φ) (hf' : 𝚺₁.DefinedFunction f' φ) (v : Fin k → ℕ) :
58-
(f v : V) = f' (fun i ↦ (v i)) := by
58+
(f v : V) = f' (Nat.cast ∘ v) := by
5959
simpa using Defined.shigmaOne_absolute V hf.graph_delta hf'.graph_delta (f v :> v)
6060

6161
variable {V}
6262

6363
lemma models_iff_of_Sigma0 {σ : Semisentence ℒₒᵣ n} (hσ : Hierarchy 𝚺 0 σ) {e : Fin n → ℕ} :
64-
V ⊧/(e ·) σ ↔ ℕ ⊧/e σ := by
65-
by_cases h : ℕ ⊧/e σ <;> simp [h]
66-
· have : V ⊧/(e ·) σ := by
64+
σ.Evalb (M := V) (Nat.cast ∘ e) ↔ σ.Evalb e := by
65+
by_cases h : σ.Evalb e <;> simp [h]
66+
· have : σ.Evalb (M := V) (Nat.cast ∘ e) := by
6767
simpa [numeral_eq_natCast] using bold_sigma_one_completeness' (M := V) (by simp [Hierarchy.of_zero hσ]) h
6868
simpa [HierarchySymbol.Semiformula.val_sigma] using this
69-
· have : ℕ ⊧/e (∼σ) := by simpa using h
70-
have : V ⊧/(e ·) (∼σ) := by simpa [numeral_eq_natCast] using bold_sigma_one_completeness' (M := V) (by simp [Hierarchy.of_zero hσ]) this
69+
· have : (∼σ).Evalb (M := ℕ) e := by simpa using h
70+
have : (∼σ).Evalb (M := V) (Nat.cast ∘ e) := by
71+
simpa [numeral_eq_natCast] using bold_sigma_one_completeness' (M := V) (by simp [Hierarchy.of_zero hσ]) this
7172
simpa using this
7273

7374
lemma models_iff_of_Delta1 {σ : 𝚫₁.Semisentence n} (hσ : σ.ProperOn ℕ) (hσV : σ.ProperOn V) {e : Fin n → ℕ} :
74-
V ⊧/(e ·) σ.val ↔ ℕ ⊧/e σ.val := by
75-
by_cases h : ℕ ⊧/e σ.val <;> simp [h]
76-
· have : ℕ ⊧/e σ.sigma.val := by simpa [HierarchySymbol.Semiformula.val_sigma] using h
77-
have : V ⊧/(e ·) σ.sigma.val := by simpa [numeral_eq_natCast] using bold_sigma_one_completeness' (M := V) (by simp) this
75+
σ.val.Evalb (M := V) (Nat.cast ∘ e) ↔ σ.val.Evalb e := by
76+
by_cases h : σ.val.Evalb e <;> simp [h]
77+
· have : σ.sigma.val.Evalb e := by simpa [HierarchySymbol.Semiformula.val_sigma] using h
78+
have : σ.sigma.val.Evalb (M := V) (Nat.cast ∘ e) := by simpa [numeral_eq_natCast] using bold_sigma_one_completeness' (M := V) (by simp) this
7879
simpa [HierarchySymbol.Semiformula.val_sigma] using this
79-
· have : ℕ ⊧/e (∼σ.pi.val) := by simpa [hσ.iff'] using h
80-
have : V ⊧/(e ·) (∼σ.pi.val) := by simpa [numeral_eq_natCast] using bold_sigma_one_completeness' (M := V) (by simp) this
80+
· have : (∼σ.pi.val).Evalb (M := ℕ) e := by simpa [hσ.iff'] using h
81+
have : (∼σ.pi.val).Evalb (M := V) (Nat.cast ∘ e) := by
82+
simpa [numeral_eq_natCast] using bold_sigma_one_completeness' (M := V) (by simp) this
8183
simpa [hσV.iff'] using this
8284

8385
variable {T : ArithmeticTheory} [𝗣𝗔⁻ ⪯ T] [T.SoundOnHierarchy 𝚺 1]
@@ -86,21 +88,21 @@ noncomputable instance : 𝗥₀ ⪯ T := Entailment.WeakerThan.trans (𝓣 :=
8688

8789
theorem sigma_one_completeness_iff_param {σ : Semisentence ℒₒᵣ n} (hσ : Hierarchy 𝚺 1 σ) {e : Fin n → ℕ} :
8890
ℕ ⊧/e σ ↔ T ⊢ (σ ⇜ fun x ↦ Semiterm.Operator.numeral ℒₒᵣ (e x)) := Iff.trans
89-
(by simp [models_iff, Semiformula.eval_substs])
91+
(by simp [models_iff, Semiformula.eval_substs, Function.comp_def, Matrix.empty_eq])
9092
(sigma_one_completeness_iff (T := T) (by simp [hσ]))
9193

92-
lemma models_iff_provable_of_Sigma0_param [V ⊧ₘ* T] {σ : Semisentence ℒₒᵣ n} (hσ : Hierarchy 𝚺 0 σ) {e : Fin n → ℕ} :
93-
V ⊧/(e ·) σ ↔ T ⊢ (σ ⇜ fun x ↦ Semiterm.Operator.numeral ℒₒᵣ (e x)) := by
94+
lemma models_iff_provable_of_Sigma0_param [V↓[ℒₒᵣ] ⊧* T] {σ : Semisentence ℒₒᵣ n} (hσ : Hierarchy 𝚺 0 σ) {e : Fin n → ℕ} :
95+
V ⊧/(Nat.cast ∘ e) σ ↔ T ⊢ (σ ⇜ fun x ↦ Semiterm.Operator.numeral ℒₒᵣ (e x)) := by
9496
calc
95-
V ⊧/(e ·) σ ↔ ℕ ⊧/e σ := by
97+
V ⊧/(Nat.cast ∘ e) σ ↔ ℕ ⊧/e σ := by
9698
simp [models_iff_of_Sigma0 hσ]
9799
_ ↔ T ⊢ (σ ⇜ fun x ↦ Semiterm.Operator.numeral ℒₒᵣ (e x)) := by
98100
apply sigma_one_completeness_iff_param (by simp [Hierarchy.of_zero hσ])
99101

100-
lemma models_iff_provable_of_Delta1_param [V ⊧ₘ* T] {σ : 𝚫₁.Semisentence n} (hσ : σ.ProperOn ℕ) (hσV : σ.ProperOn V) {e : Fin n → ℕ} :
101-
V ⊧/(e ·) σ.val ↔ T ⊢ (σ.val ⇜ fun x ↦ Semiterm.Operator.numeral ℒₒᵣ (e x)) := by
102+
lemma models_iff_provable_of_Delta1_param [V↓[ℒₒᵣ] ⊧* T] {σ : 𝚫₁.Semisentence n} (hσ : σ.ProperOn ℕ) (hσV : σ.ProperOn V) {e : Fin n → ℕ} :
103+
V ⊧/(Nat.cast ∘ e) σ.val ↔ T ⊢ (σ.val ⇜ fun x ↦ Semiterm.Operator.numeral ℒₒᵣ (e x)) := by
102104
calc
103-
V ⊧/(e ·) σ.val ↔ ℕ ⊧/e σ.val := by
105+
V ⊧/(Nat.cast ∘ e) σ.val ↔ ℕ ⊧/e σ.val := by
104106
simp [models_iff_of_Delta1 hσ hσV]
105107
_ ↔ ℕ ⊧/e σ.sigma.val := by
106108
simp [HierarchySymbol.Semiformula.val_sigma]

0 commit comments

Comments
 (0)