Skip to content

Commit 147aeb0

Browse files
SnO2WMaNThis Name
authored andcommitted
refactor(Incompleteness): Provability Abstraction Pt.3 (#797)
1 parent 55f13b6 commit 147aeb0

14 files changed

Lines changed: 127 additions & 149 deletions

File tree

Foundation/FirstOrder/Incompleteness/ProvabilityAbstraction/Basic.lean

Lines changed: 69 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public import Foundation.Meta.ClProver
1010

1111
namespace LO
1212

13+
open LO.Entailment
1314

1415
namespace FirstOrder
1516

@@ -22,7 +23,7 @@ namespace ProvabilityAbstraction
2223
structure Provability [L.ReferenceableBy L₀] (T₀ : Theory L₀) (T : Theory L) where
2324
prov : Semisentence L₀ 1
2425
/-- Derivability condition `D1` -/
25-
prov_def {σ : Sentence L} : T ⊢ σ → T₀ ⊢ prov/[⌜σ⌝]
26+
bew_def {σ : Sentence L} : T ⊢ σ → T₀ ⊢ prov/[⌜σ⌝]
2627

2728
namespace Provability
2829

@@ -38,15 +39,17 @@ abbrev dia (𝔅 : Provability T₀ T) (φ : Sentence L) : Sentence L₀ := ∼
3839
end Provability
3940

4041

42+
section
43+
44+
namespace Provability
45+
4146
section
4247

4348
variable
4449
{L₀ L : Language} [L.ReferenceableBy L₀]
4550
{T₀ : Theory L₀} {T : Theory L}
4651

47-
lemma D1 {𝔅 : Provability T₀ T} {σ : Sentence L} : T ⊢ σ → T₀ ⊢ 𝔅 σ := fun h ↦ 𝔅.prov_def h
48-
49-
namespace Provability
52+
lemma D1 {𝔅 : Provability T₀ T} {σ : Sentence L} : T ⊢ σ → T₀ ⊢ 𝔅 σ := fun h ↦ 𝔅.bew_def h
5053

5154
class HBL2 [L.ReferenceableBy L₀] {T₀ : Theory L₀} {T : Theory L} (𝔅 : Provability T₀ T) where
5255
D2 {σ τ : Sentence L} : T₀ ⊢ 𝔅 (σ ➝ τ) ➝ 𝔅 σ ➝ 𝔅 τ
@@ -62,70 +65,56 @@ class HBL extends 𝔅.HBL2, 𝔅.HBL3
6265

6366
class Mono [L.ReferenceableBy L₀] {T₀ : Theory L₀} {T : Theory L} (𝔅 : Provability T₀ T) where
6467
mono {σ τ : Sentence L} : T ⊢ σ ➝ τ → T₀ ⊢ 𝔅 σ ➝ 𝔅 τ
68+
export Mono (mono)
6569

66-
class Equiv [L.ReferenceableBy L₀] {T₀ : Theory L₀} {T : Theory L} (𝔅 : Provability T₀ T) where
67-
equiv {σ τ : Sentence L} : T ⊢ σ ⭤ τ → T₀ ⊢ 𝔅 σ ⭤ 𝔅 τ
68-
69-
class Löb where
70-
LT {σ : Sentence L} : T ⊢ 𝔅 σ ➝ σ → T ⊢ σ
71-
export Löb (LT)
72-
73-
class FormalizedLöb where
74-
FLT {σ : Sentence L} : T₀ ⊢ 𝔅 (𝔅 σ ➝ σ) ➝ 𝔅 σ
75-
export FormalizedLöb (FLT)
70+
class Ext [L.ReferenceableBy L₀] {T₀ : Theory L₀} {T : Theory L} (𝔅 : Provability T₀ T) where
71+
ext {σ τ : Sentence L} : T ⊢ σ ⭤ τ → T₀ ⊢ 𝔅 σ ⭤ 𝔅 τ
72+
export Ext (ext)
7673

7774
class Rosser [L.ReferenceableBy L₀] {T₀ : Theory L₀} {T : Theory L} (𝔅 : Provability T₀ T) where
7875
Ros {σ : Sentence L} : T ⊢ ∼σ → T₀ ⊢ ∼𝔅 σ
7976
export Rosser (Ros)
8077

8178

8279
/--
83-
Abstract version of formalized `Γ`-completeness for provability `𝔅`
80+
Abstract version of formalized `Γ`-completeness for provability `𝔅`.
8481
85-
example: `[∀ σ ∈ 𝚺₁, 𝔅.FormalizedCompleteOn σ]` for formalized `𝚺₁`-completeness
82+
example: `[∀ σ ∈ 𝚺₁, 𝔅.FormalizedCompleteOn σ]` for formalized `𝚺₁`-completeness.
8683
-/
8784
class FormalizedCompleteOn (𝔅 : Provability T₀ T) (σ) where
88-
formalized_complete_on : T ⊢ σ ➝ 𝔅 σ
85+
formalized_complete_on : T ⊢ σ ➝ 𝔅 σ
8986
export FormalizedCompleteOn (formalized_complete_on)
9087
attribute [simp, grind .] formalized_complete_on
9188

89+
instance [∀ σ, 𝔅.FormalizedCompleteOn (𝔅 σ)] : 𝔅.HBL3 := ⟨by simp⟩
90+
9291
/--
9392
NOTE: Named after [Vis21].
9493
-/
95-
class Kreisel [L.ReferenceableBy L] {T₀ T : Theory L} (𝔅 : Provability T₀ T) (σ) where
96-
KR : T ⊢ 𝔅 σ → T ⊢ σ
94+
class Kreisel [L.ReferenceableBy L] {T₀ T : Theory L} (𝔅 : Provability T₀ T) where
95+
KR {σ : Sentence L} : T ⊢ 𝔅 σ → T ⊢ σ
9796
export Kreisel (KR)
9897
attribute [simp, grind .] KR
9998

100-
class WeakKreisel [L.ReferenceableBy L] {T₀ T : Theory L} (𝔅 : Provability T₀ T) (σ) where
101-
WKR : T₀ ⊢ 𝔅 σ → T ⊢ σ
102-
export WeakKreisel (WKR)
103-
attribute [simp, grind .] WKR
104-
10599

106100
class SoundOn
107101
[L.ReferenceableBy L₀] {T₀ : Theory L₀} {T : Theory L}
108-
(𝔅 : Provability T₀ T)
109-
(M : outParam Type*) [Nonempty M] [Structure L₀ M]
110-
(σ)
102+
(𝔅 : Provability T₀ T) (M : outParam Type*) [Nonempty M] [Structure L₀ M]
111103
where
112-
sound_on : M ⊧ₘ 𝔅 σ → T ⊢ σ
104+
sound_on {σ} : M ⊧ₘ 𝔅 σ → T ⊢ σ
113105
export SoundOn (sound_on)
114106
attribute [simp, grind .] sound_on
115107

116-
117-
instance [Nonempty M] [Structure L M] [𝔅.SoundOn M σ] [M ⊧ₘ* T₀] : 𝔅.WeakKreisel σ where
118-
WKR h := SoundOn.sound_on $ models_of_provable inferInstance h;
119-
120-
end Provability
121-
108+
lemma syntactical_sound (M) [Nonempty M] [Structure L M] [SoundOn 𝔅 M] [M ⊧ₘ* T₀] : ∀ {σ}, T₀ ⊢ 𝔅 σ → T ⊢ σ := by
109+
intro σ h;
110+
apply 𝔅.sound_on;
111+
apply models_of_provable (T := T₀);
112+
. infer_instance;
113+
. exact h;
122114

123115
end
124116

125117

126-
open LO.Entailment
127-
open Provability
128-
129118
section
130119

131120
variable
@@ -134,34 +123,29 @@ variable
134123
{𝔅 : Provability T₀ T}
135124
{σ τ : Sentence L}
136125

137-
lemma D2' [𝔅.HBL2] : T₀ ⊢ 𝔅 (σ ➝ τ) → T₀ ⊢ 𝔅 σ ➝ 𝔅 τ := by
138-
intro h;
139-
exact D2 ⨀ h;
126+
lemma bew_distribute_imply [𝔅.HBL2] (h : T₀ ⊢ 𝔅 (σ ➝ τ)) : T₀ ⊢ 𝔅 σ ➝ 𝔅 τ := D2 ⨀ h
140127

141-
lemma prov_distribute_imply [𝔅.HBL2] (h : T ⊢ σ ➝ τ) : T₀ ⊢ 𝔅 σ ➝ 𝔅 τ := D2' $ D1 h
128+
instance [𝔅.HBL2] : 𝔅.Mono := ⟨λ h => bew_distribute_imply $ D1 h⟩
129+
instance [𝔅.HBL2] : 𝔅.Ext := ⟨λ h => E!_intro (mono (K!_left h)) (mono (K!_right h))⟩
142130

143-
lemma prov_distribute_iff [𝔅.HBL2] (h : T ⊢ σ ⭤ τ) : T₀ ⊢ 𝔅 σ ⭤ 𝔅 τ := by
144-
apply E!_intro;
145-
. exact prov_distribute_imply $ K!_left h;
146-
. exact prov_distribute_imply $ K!_right h;
147-
148-
lemma dia_distribute_imply [L₀.DecidableEq] [L.DecidableEq] [𝔅.HBL2]
149-
(h : T ⊢ σ ➝ τ) : T₀ ⊢ 𝔅.dia σ ➝ 𝔅.dia τ := by
150-
have : T₀ ⊢ 𝔅 (∼τ) ➝ 𝔅 (∼σ) := prov_distribute_imply $ by cl_prover [h];
151-
cl_prover [this]
152-
153-
lemma prov_distribute_and [𝔅.HBL2] [L₀.DecidableEq] : T₀ ⊢ 𝔅 (σ ⋏ τ) ➝ 𝔅 σ ⋏ 𝔅 τ := by
154-
have h₁ : T₀ ⊢ 𝔅 (σ ⋏ τ) ➝ 𝔅 σ := D2' $ D1 and₁!;
155-
have h₂ : T₀ ⊢ 𝔅 (σ ⋏ τ) ➝ 𝔅 τ := D2' $ D1 and₂!;
131+
lemma bew_distribute_and [𝔅.HBL2] [L₀.DecidableEq] : T₀ ⊢ 𝔅 (σ ⋏ τ) ➝ 𝔅 σ ⋏ 𝔅 τ := by
132+
have h₁ : T₀ ⊢ 𝔅 (σ ⋏ τ) ➝ 𝔅 σ := bew_distribute_imply $ D1 and₁!;
133+
have h₂ : T₀ ⊢ 𝔅 (σ ⋏ τ) ➝ 𝔅 τ := bew_distribute_imply $ D1 and₂!;
156134
cl_prover [h₁, h₂];
157135

158-
lemma prov_distribute_and' [𝔅.HBL2] [L₀.DecidableEq] : T₀ ⊢ 𝔅 (σ ⋏ τ) → T₀ ⊢ 𝔅 σ ⋏ 𝔅 τ := λ h => prov_distribute_and ⨀ h
136+
lemma bew_distribute_and' [𝔅.HBL2] [L₀.DecidableEq] : T₀ ⊢ 𝔅 (σ ⋏ τ) → T₀ ⊢ 𝔅 σ ⋏ 𝔅 τ := λ h => bew_distribute_and ⨀ h
159137

160-
lemma prov_collect_and [𝔅.HBL2] [L₀.DecidableEq] [L.DecidableEq] : T₀ ⊢ 𝔅 σ ⋏ 𝔅 τ ➝ 𝔅 (σ ⋏ τ) := by
161-
have h₁ : T₀ ⊢ 𝔅 σ ➝ 𝔅 (τ ➝ σ ⋏ τ) := prov_distribute_imply $ by cl_prover
138+
lemma bew_collect_and [𝔅.HBL2] [L₀.DecidableEq] [L.DecidableEq] : T₀ ⊢ 𝔅 σ ⋏ 𝔅 τ ➝ 𝔅 (σ ⋏ τ) := by
139+
have h₁ : T₀ ⊢ 𝔅 σ ➝ 𝔅 (τ ➝ σ ⋏ τ) := 𝔅.mono $ by cl_prover
162140
have h₂ : T₀ ⊢ 𝔅 (τ ➝ σ ⋏ τ) ➝ 𝔅 τ ➝ 𝔅 (σ ⋏ τ) := D2;
163141
cl_prover [h₁, h₂];
164142

143+
144+
lemma dia_mono [L₀.DecidableEq] [L.DecidableEq] [𝔅.Mono]
145+
(h : T ⊢ σ ➝ τ) : T₀ ⊢ 𝔅.dia σ ➝ 𝔅.dia τ := by
146+
have : T₀ ⊢ 𝔅 (∼τ) ➝ 𝔅 (∼σ) := 𝔅.mono $ by cl_prover [h];
147+
cl_prover [this]
148+
165149
end
166150

167151
section
@@ -171,27 +155,17 @@ variable
171155
{𝔅 : Provability T₀ T}
172156
{σ τ : Sentence L}
173157

174-
lemma D1_shift : T ⊢ σ → T ⊢ 𝔅 σ := by
175-
intro h;
176-
apply Entailment.WeakerThan.pbl (𝓢 := T₀);
177-
apply D1 h;
158+
lemma mono' [𝔅.Mono] (h : T₀ ⊢ σ ➝ τ) : T₀ ⊢ 𝔅 σ ➝ 𝔅 τ := 𝔅.mono $ WeakerThan.pbl h
159+
lemma ext' [𝔅.Ext] (h : T₀ ⊢ σ ⭤ τ) : T₀ ⊢ 𝔅 σ ⭤ 𝔅 τ := 𝔅.ext $ WeakerThan.pbl h
178160

179-
lemma D2_shift [𝔅.HBL2] : T ⊢ 𝔅 (σ ➝ τ) ➝ 𝔅 σ ➝ 𝔅 τ := by
180-
apply Entailment.WeakerThan.pbl (𝓢 := T₀) $ D2;
161+
end
181162

182-
lemma D3_shift [𝔅.HBL3] : T ⊢ 𝔅 σ ➝ 𝔅 (𝔅 σ) := by
183-
apply Entailment.WeakerThan.pbl (𝓢 := T₀) $ D3;
163+
end Provability
184164

185-
lemma FLT_shift [𝔅.FormalizedLöb] : T ⊢ 𝔅 (𝔅 σ ➝ σ) ➝ 𝔅 σ := by
186-
apply Entailment.WeakerThan.pbl (𝓢 := T₀) $ FLT;
187165

188-
lemma prov_distribute_imply' [𝔅.HBL2] (h : T₀ ⊢ σ ➝ τ) : T₀ ⊢ 𝔅 σ ➝ 𝔅 τ :=
189-
prov_distribute_imply $ WeakerThan.pbl h
166+
end
190167

191-
lemma prov_distribute_imply'' [𝔅.HBL2] (h : T ⊢ σ ➝ τ) : T ⊢ 𝔅 σ ➝ 𝔅 τ :=
192-
WeakerThan.pbl $ prov_distribute_imply h
193168

194-
end
195169

196170

197171
class Diagonalization [L.ReferenceableBy L] (T : Theory L) where
@@ -216,25 +190,25 @@ variable [T₀ ⪯ T] [Consistent T]
216190

217191
theorem unprovable_gödel : T ⊬ (gödel 𝔅) := by
218192
intro h;
219-
have h₁ : T ⊢ 𝔅 (gödel 𝔅) := D1_shift h;
193+
have h₁ : T ⊢ 𝔅 (gödel 𝔅) := WeakerThan.pbl $ D1 h;
220194
have h₂ : T ⊢ (gödel 𝔅) ⭤ ∼𝔅 (gödel 𝔅) := WeakerThan.pbl $ gödel_spec;
221195
have : T ⊢ ⊥ := by cl_prover [h₁, h₂, h];
222196
have : ¬Consistent T := not_consistent_iff_inconsistent.mpr <| inconsistent_iff_provable_bot.mpr this;
223197
contradiction
224198

225-
theorem unrefutable_gödel [𝔅.Kreisel (gödel 𝔅)] : T ⊬ ∼(gödel 𝔅) := by
199+
theorem unrefutable_gödel [𝔅.Kreisel] : T ⊬ ∼(gödel 𝔅) := by
226200
intro h₂;
227201
have h₁ : T ⊢ (gödel 𝔅) := WeakerThan.pbl $ 𝔅.KR $ by cl_prover [gödel_spec (T₀ := T₀), h₂];
228202
have : T ⊢ ⊥ := (N!_iff_CO!.mp $ WeakerThan.pbl $ h₂) ⨀ h₁;
229203
have : ¬Consistent T := not_consistent_iff_inconsistent.mpr <| inconsistent_iff_provable_bot.mpr this
230204
contradiction;
231205

232-
theorem gödel_independent [𝔅.Kreisel (gödel 𝔅)] : Independent T (gödel 𝔅) := by
206+
theorem gödel_independent [𝔅.Kreisel] : Independent T (gödel 𝔅) := by
233207
constructor
234208
. apply unprovable_gödel
235209
. apply unrefutable_gödel
236210

237-
theorem first_incompleteness [𝔅.Kreisel (gödel 𝔅)] : Incomplete T :=
211+
theorem first_incompleteness [𝔅.Kreisel] : Incomplete T :=
238212
incomplete_def.mpr ⟨(gödel 𝔅), gödel_independent⟩
239213

240214
end First
@@ -255,8 +229,7 @@ variable [L.DecidableEq] [T₀ ⪯ T]
255229
theorem formalized_unprovable_gödel : T₀ ⊢ 𝔅.con ➝ ∼𝔅 𝐆 := by
256230
suffices T₀ ⊢ ∼𝔅 ⊥ ➝ ∼𝔅 𝐆 from this
257231
have h₁ : T₀ ⊢ 𝔅 𝐆 ➝ 𝔅 (𝔅 𝐆) := D3
258-
have h₂ : T₀ ⊢ 𝔅 𝐆 ➝ 𝔅 (𝔅 𝐆 ➝ ⊥) := prov_distribute_imply $ by
259-
cl_prover [gödel_spec (T₀ := T₀)]
232+
have h₂ : T₀ ⊢ 𝔅 𝐆 ➝ 𝔅 (𝔅 𝐆 ➝ ⊥) := 𝔅.mono' $ by cl_prover [gödel_spec (T₀ := T₀)]
260233
have h₃ : T₀ ⊢ 𝔅 (𝔅 𝐆 ➝ ⊥) ➝ 𝔅 (𝔅 𝐆) ➝ 𝔅 ⊥ := D2
261234
cl_prover [h₁, h₂, h₃]
262235

@@ -272,13 +245,13 @@ theorem con_unprovable [Consistent T] : T ⊬ 𝔅.con := by
272245
have : T ⊢ 𝐆 := by cl_prover [h, this]
273246
exact unprovable_gödel this
274247

275-
theorem con_unrefutable [Consistent T] [𝔅.Kreisel (gödel 𝔅)] : T ⊬ ∼𝔅.con := by
248+
theorem con_unrefutable [Consistent T] [𝔅.Kreisel] : T ⊬ ∼𝔅.con := by
276249
intro h
277-
have : T ⊢ 𝐆 ⭤ 𝔅.con := gödel_iff_con
250+
have : T ⊢ 𝐆 ⭤ 𝔅.con := WeakerThan.pbl $ gödel_iff_con;
278251
have : T ⊢ ∼𝐆 := by cl_prover [h, this]
279252
exact unrefutable_gödel this
280253

281-
theorem con_independent [Consistent T] [𝔅.Kreisel (gödel 𝔅)] : Independent T 𝔅.con := by
254+
theorem con_independent [Consistent T] [𝔅.Kreisel] : Independent T 𝔅.con := by
282255
constructor
283256
. apply con_unprovable
284257
. apply con_unrefutable
@@ -290,6 +263,8 @@ section Löb
290263

291264
def kreisel [Diagonalization T₀] (𝔅 : Provability T₀ T) (σ : Sentence L) : Sentence L := fixedpoint T₀ “x. !𝔅.prov x → !σ”
292265

266+
variable {σ : Sentence L}
267+
293268
local notation "𝐊" => kreisel 𝔅
294269

295270
lemma kreisel_spec : T₀ ⊢ (𝐊 σ) ⭤ (𝔅 (𝐊 σ) ➝ σ) := by
@@ -306,38 +281,30 @@ variable [L.DecidableEq] [T₀ ⪯ T]
306281

307282
theorem löb_theorem (H : T ⊢ 𝔅 σ ➝ σ) : T ⊢ σ := by
308283
have d₁ : T ⊢ 𝔅 (𝐊 σ) ➝ σ := C!_trans (WeakerThan.pbl kreisel_specAux₁) H;
309-
have d₂ : T ⊢ 𝔅 (𝐊 σ) := WeakerThan.pbl (𝓢 := T₀) (D1 $ WeakerThan.pbl kreisel_specAux₂ ⨀ d₁);
284+
have d₂ : T ⊢ 𝔅 (𝐊 σ) := WeakerThan.pbl $ D1 $ WeakerThan.pbl kreisel_specAux₂ ⨀ d₁;
310285
exact d₁ ⨀ d₂;
311286

312-
instance : 𝔅.Löb := ⟨löb_theorem⟩
313-
314287
theorem formalized_löb_theorem : T₀ ⊢ 𝔅 (𝔅 σ ➝ σ) ➝ 𝔅 σ := by
315288
have h₁ : T₀ ⊢ 𝔅 (𝐊 σ) ➝ 𝔅 σ := kreisel_specAux₁;
316-
have : T₀ ⊢ (𝔅 σ ➝ σ) ➝ (𝔅 (𝐊 σ) ➝ σ) := CCC!_of_C!_left h₁;
317-
have : T ⊢ (𝔅 σ ➝ σ) ➝ 𝐊 σ := WeakerThan.pbl (𝓢 := T₀) $ C!_trans this kreisel_specAux₂;
318-
exact C!_trans (D2 ⨀ (D1 this)) h₁;
319-
320-
instance : 𝔅.FormalizedLöb := ⟨formalized_löb_theorem (T := T)⟩
321-
322-
/-
323-
lemma unprovable_con_via_löb [Consistent T] [L.DecidableEq] [𝔅.Löb] : T ⊬ 𝔅.con := by
324-
by_contra hC;
325-
have : T ⊢ ⊥ := Löb.LT $ N!_iff_CO!.mp hC;
326-
have : ¬Consistent T := not_consistent_iff_inconsistent.mpr $ inconsistent_iff_provable_bot.mpr this
327-
contradiction
328-
-/
289+
have h₂ : T₀ ⊢ (𝔅 σ ➝ σ) ➝ (𝔅 (𝐊 σ) ➝ σ) := CCC!_of_C!_left h₁;
290+
have h₃ : T ⊢ (𝔅 σ ➝ σ) ➝ 𝐊 σ := WeakerThan.pbl $ C!_trans (CCC!_of_C!_left h₁) kreisel_specAux₂;
291+
exact C!_trans (D2 ⨀ (D1 h₃)) h₁;
329292

330-
lemma formalized_unprovable_not_con [Consistent T] [𝔅.Kreisel (gödel 𝔅)] : T ⊬ 𝔅.con ➝ ∼𝔅 (∼𝔅.con) := by
293+
lemma formalized_unprovable_not_con [Consistent T] [𝔅.Kreisel] : T ⊬ 𝔅.con ➝ ∼𝔅 (∼𝔅.con) := by
331294
by_contra hC;
332-
have : T ⊢ ∼𝔅.con := Löb.LT $ CN!_of_CN!_right hC;
295+
have : T ⊢ ∼𝔅.con := löb_theorem $ CN!_of_CN!_right hC;
333296
have : T ⊬ ∼𝔅.con := con_unrefutable;
334297
contradiction;
335298

336-
lemma formalized_unrefutable_gödel [Consistent T] [𝔅.Kreisel (gödel 𝔅)] : T ⊬ 𝔅.con ➝ ∼𝔅 (∼(gödel 𝔅)) := by
299+
lemma formalized_unrefutable_gödel [Consistent T] [𝔅.Kreisel] : T ⊬ 𝔅.con ➝ ∼𝔅 (∼(gödel 𝔅)) := by
337300
by_contra hC;
338301
have : T ⊬ 𝔅.con ➝ ∼𝔅 (∼𝔅.con) := formalized_unprovable_not_con;
339-
have : T ⊢ 𝔅.con ➝ ∼𝔅 (∼𝔅.con) := C!_trans hC $ WeakerThan.pbl <| K!_left <| ENN!_of_E!
340-
<| prov_distribute_iff <| ENN!_of_E! <| WeakerThan.pbl gödel_iff_con;
302+
have : T ⊢ 𝔅.con ➝ ∼𝔅 (∼𝔅.con) := C!_trans hC
303+
$ WeakerThan.pbl
304+
$ K!_left $ ENN!_of_E!
305+
$ 𝔅.ext
306+
$ ENN!_of_E!
307+
$ WeakerThan.pbl gödel_iff_con;
341308
contradiction;
342309

343310
end Löb

Foundation/FirstOrder/Incompleteness/ProvabilityAbstraction/Height.lean

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ lemma boxBot_monotone [T₀ ⪯ T] [𝔅.HBL] : n ≤ m → T ⊢ 𝔅^[n] ⊥
3232
case succ k ih =>
3333
simp only [← add_assoc, Function.iterate_succ_apply']
3434
have b₀ : T ⊢ 𝔅^[n] ⊥ ➝ 𝔅 (𝔅^[n] ⊥) := by
35-
cases n
36-
· simp
37-
· simpa only [Function.iterate_succ_apply'] using D3_shift
38-
have b₁ : T ⊢ 𝔅 (𝔅^[n] ⊥) ➝ 𝔅 (𝔅^[n + k] ⊥) := prov_distribute_imply'' ih
35+
match n with
36+
| 0 => simp;
37+
| n + 1 =>
38+
have : T ⊢ 𝔅 ((𝔅)^[n] ⊥) ➝ 𝔅 (𝔅 ((𝔅)^[n] ⊥)) := Entailment.WeakerThan.pbl $ 𝔅.D3;
39+
simpa only [Function.iterate_succ_apply'] using this
40+
have b₁ : T ⊢ 𝔅 (𝔅^[n] ⊥) ➝ 𝔅 (𝔅^[n + k] ⊥) := Entailment.WeakerThan.pbl $ 𝔅.mono ih;
3941
cl_prover [b₀, b₁]
4042

41-
lemma iIncon_unprovable_of_sigma1_sound [∀ n, 𝔅.Kreisel (𝔅^[n] ⊥)] [Entailment.Consistent T] : ∀ n, T ⊬ 𝔅^[n] ⊥
43+
lemma iIncon_unprovable_of_sigma1_sound [𝔅.Kreisel] [Entailment.Consistent T] : ∀ n, T ⊬ 𝔅^[n] ⊥
4244
| 0 => Entailment.consistent_iff_unprovable_bot.mp inferInstance
4345
| n + 1 => fun h ↦
4446
have : T ⊢ 𝔅 (𝔅^[n] ⊥) := by simpa [Function.iterate_succ_apply'] using h
@@ -47,15 +49,17 @@ lemma iIncon_unprovable_of_sigma1_sound [∀ n, 𝔅.Kreisel (𝔅^[n] ⊥)] [En
4749

4850
namespace Provability
4951

52+
5053
lemma height_eq_top_iff : 𝔅.height = ⊤ ↔ ∀ n, T ⊬ 𝔅^[n] ⊥ := ENat.find_eq_top_iff _
5154

5255
lemma height_le_of_boxBot {n : ℕ} (h : T ⊢ 𝔅^[n] ⊥) : 𝔅.height ≤ n :=
5356
ENat.find_le (T ⊢ 𝔅^[·] ⊥) n h
5457

55-
lemma height_lt_pos_of_boxBot {n : ℕ} (pos : 0 < n) [𝔅.WeakKreisel (𝔅^[n.pred] ⊥)] (h : T₀ ⊢ 𝔅^[n] ⊥) : 𝔅.height < n := by
58+
lemma height_lt_pos_of_boxBot (hSound : ∀ {σ}, T₀ ⊢ 𝔅 σ → T ⊢ σ)
59+
{n : ℕ} (pos : 0 < n) (h : T₀ ⊢ 𝔅^[n] ⊥) : 𝔅.height < n := by
5660
have e : n.pred.succ = n := Eq.symm <| (Nat.sub_eq_iff_eq_add pos).mp rfl
5761
have : T₀ ⊢ 𝔅 (𝔅^[n.pred] ⊥) := by rwa [←Function.iterate_succ_apply' (f := 𝔅), e];
58-
have : 𝔅.height ≤ n.pred := height_le_of_boxBot $ 𝔅.WKR this;
62+
have : 𝔅.height ≤ n.pred := height_le_of_boxBot $ hSound this
5963
have : 𝔅.height < n := by
6064
rw [←e]
6165
exact lt_of_le_of_lt this <| ENat.coe_lt_coe.mpr <| by simp
@@ -70,7 +74,7 @@ lemma height_le_iff_boxBot [T₀ ⪯ T] [𝔅.HBL] {n : ℕ} :
7074
exact boxBot_monotone hmn ⨀ hm
7175
· exact height_le_of_boxBot
7276

73-
lemma height_eq_top_of_sound_and_consistent [∀ n, 𝔅.Kreisel (𝔅^[n] ⊥)] [Entailment.Consistent T] : 𝔅.height = ⊤ :=
77+
lemma height_eq_top_of_sound_and_consistent [𝔅.Kreisel] [Entailment.Consistent T] : 𝔅.height = ⊤ :=
7478
height_eq_top_iff.mpr iIncon_unprovable_of_sigma1_sound
7579

7680
@[grind =>]

Foundation/FirstOrder/Incompleteness/ProvabilityAbstraction/Refutability.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ variable
106106
local notation "𝐉" => jeroslow 𝔚
107107

108108
lemma jeroslow_not_safe [𝔅.FormalizedCompleteOn 𝐉] : T ⊢ 𝐉 ➝ (𝔅 𝐉 ⋏ 𝔚 𝐉) := by
109-
have h₁ : T ⊢ 𝐉 ➝ 𝔅 𝐉 := 𝔅.formalized_complete_on;
109+
have h₁ : T ⊢ 𝐉 ➝ 𝔅 𝐉 := Entailment.WeakerThan.pbl $ 𝔅.formalized_complete_on;
110110
have h₂ : T ⊢ 𝐉 ⭤ 𝔚 𝐉 := jeroslow_def';
111111
cl_prover [h₁, h₂];
112112

0 commit comments

Comments
 (0)