@@ -79,136 +79,17 @@ abbrev Derivable (S : Sequent) : Prop := Nonempty (⊢ᵍ S)
79
79
prefix :70 "⊢ᵍ! " => Derivable
80
80
81
81
82
- section
83
-
84
- theorem soundness {S : Sequent} : ⊢ᵍ S → ∀ (M : Kripke.Model), ∀ (f : Assignment M), S.Satisfies M f := by
85
- intro d;
86
- induction d with
87
- | axA =>
88
- rintro M f ⟨hΓ, hX⟩;
89
- simp_all;
90
- | axBot =>
91
- rintro M f ⟨hΓ, hX⟩;
92
- simp at hΓ;
93
- | @impL Γ Δ x φ ψ d₁ d₂ ih₁ ih₂ =>
94
- rintro M f ⟨hΓ, hX⟩;
95
- have ⟨hΓ₁, hΓ₂⟩ : f ⊧ (x ∶ φ ➝ ψ) ∧ ∀ a ∈ Γ.fmls, f ⊧ a := by simpa using hΓ;
96
- replace hX : ∀ x y, ⟨x, y⟩ ∈ Γ.rels → LabelTerm.evaluated f ⟨x, y⟩ := by simpa using hX;
97
- have : ¬(f x ⊧ φ) ∨ (f x ⊧ ψ) := by
98
- simpa [LabelledFormula.Satisfies.imp_def, Semantics.Imp.realize_imp, imp_iff_not_or] using hΓ₁;
99
- rcases this with (_ | h);
100
- . replace ih₁ :
101
- (∀ lφ ∈ Γ.fmls, f ⊧ lφ) →
102
- (∀ a b, (a, b) ∈ Γ.rels → LabelTerm.evaluated f (a, b)) →
103
- ((f x) ⊧ φ ∨ ∃ a ∈ Δ.fmls, f ⊧ a) ∨ ∃ a b, (a, b) ∈ Δ.rels ∧ LabelTerm.evaluated f (a, b)
104
- := by simpa [Sequent.Satisfies] using ih₁ M f;
105
- rcases ih₁ hΓ₂ hX with (_ | ⟨lψ, _, _⟩) | _;
106
- . simp_all;
107
- . left; use lψ;
108
- . simp_all;
109
- . replace ih₂ :
110
- (f x) ⊧ ψ →
111
- (∀ a ∈ Γ.fmls, f ⊧ a) →
112
- (∀ a b, (a, b) ∈ Γ.rels → LabelTerm.evaluated f (a, b)) →
113
- (∃ lφ ∈ Δ.fmls, f ⊧ lφ) ∨ ∃ a b, (a, b) ∈ Δ.rels ∧ LabelTerm.evaluated f (a, b)
114
- := by simpa [Sequent.Satisfies] using ih₂ M f;
115
- rcases ih₂ h hΓ₂ hX with _ | _ <;> simp_all;
116
- | @impR Γ Δ x φ ψ d ih =>
117
- rintro M f ⟨hΓ, hX⟩;
118
- suffices ((¬(f x) ⊧ φ ∨ (f x) ⊧ ψ) ∨ ∃ a ∈ Δ.fmls, f ⊧ a) ∨ ∃ a b, (a, b) ∈ Δ.rels ∧ LabelTerm.evaluated f (a, b) by
119
- simpa [LabelledFormula.Satisfies.imp_def, Semantics.Imp.realize_imp, imp_iff_not_or];
120
- wlog _ : (f x) ⊧ φ;
121
- . tauto;
122
- replace ih :
123
- (f ⊧ x ∶ φ) →
124
- (∀ a ∈ Γ.fmls, f ⊧ a) →
125
- (∀ a b, (a, b) ∈ Γ.rels → LabelTerm.evaluated f (a, b)) →
126
- ((f ⊧ x ∶ ψ) ∨ ∃ a ∈ Δ.fmls, f ⊧ a) ∨ ∃ a b, (a, b) ∈ Δ.rels ∧ LabelTerm.evaluated f (a, b)
127
- := by simpa [Sequent.Satisfies] using ih M f;
128
- rcases ih (by simpa) (by simpa using hΓ) (by simpa using hX) with (h | _) | _;
129
- . tauto;
130
- . simp_all;
131
- . simp_all;
132
- | @boxL Γ Δ x y φ d ih =>
133
- rintro M f ⟨hΓ, hX⟩;
134
-
135
- have ⟨hxbφ, hΓ₂⟩ : (f ⊧ x ∶ □φ) ∧ ∀ a ∈ Γ.fmls, f ⊧ a := by simpa using hΓ;
136
- have ⟨hxy, hX₂⟩ : LabelTerm.evaluated f (x, y) ∧ ∀ a b, (a, b) ∈ Γ.rels → LabelTerm.evaluated f (a, b) := by simpa using hX;
137
- have hyφ : f ⊧ y ∶ φ := Formula.Kripke.Satisfies.box_def.mp (LabelledFormula.Satisfies.box_def.mp hxbφ) _ hxy;
138
-
139
- replace ih :
140
- (f ⊧ x ∶ □φ) →
141
- (f ⊧ y ∶ φ) →
142
- (∀ a ∈ Γ.fmls, f ⊧ a) →
143
- LabelTerm.evaluated f (x, y) →
144
- (∀ a b, (a, b) ∈ Γ.rels → LabelTerm.evaluated f (a, b)) →
145
- (∃ lφ ∈ Δ.fmls, f ⊧ lφ) ∨ ∃ a b, (a, b) ∈ Δ.rels ∧ LabelTerm.evaluated f (a, b) := by simpa [Sequent.Satisfies] using ih M f;
146
-
147
- rcases ih hxbφ hyφ hΓ₂ hxy hX₂ with _ | _ <;> simp_all;
148
- | @boxR Γ Δ x y φ hxy hyΓ hyΔ d ih =>
149
- rintro M f ⟨hΓ, hX⟩;
150
-
151
- suffices ((f ⊧ x ∶ □φ) ∨ ∃ a ∈ Δ.fmls, f ⊧ a) ∨ ∃ a b, (a, b) ∈ Δ.rels ∧ LabelTerm.evaluated f (a, b) by simpa;
152
- apply or_iff_not_imp_right.mpr;
153
- intro hΔ₁; push_neg at hΔ₁;
154
- apply or_iff_not_imp_right.mpr;
155
- intro hΔ₂; push_neg at hΔ₂;
156
-
157
- intro w hw;
158
- let g : Assignment M := λ z => if z = y then w else f z;
159
-
160
- replace ih :
161
- (∀ lφ ∈ Γ.fmls, g ⊧ lφ) →
162
- LabelTerm.evaluated g (x, y) →
163
- (∀ a b, (a, b) ∈ Γ.rels → LabelTerm.evaluated g (a, b)) →
164
- ((g ⊧ y ∶ φ) ∨ ∃ a ∈ Δ.fmls, g ⊧ a) ∨ ∃ a b, (a, b) ∈ Δ.rels ∧ LabelTerm.evaluated g (a, b)
165
- := by simpa [Sequent.Satisfies] using ih M g;
166
- have : ∀ lφ ∈ Γ.fmls, g ⊧ lφ := by
167
- rintro ⟨a, ψ⟩ hz;
168
- have ha : a ≠ y := by
169
- rintro rfl;
170
- have := SequentPart.not_include_labelledFml_of_isFreshLabel hyΓ ψ;
171
- contradiction;
172
- simpa [g, ha] using hΓ _ hz
173
- have : LabelTerm.evaluated g (x, y) := by simpa [LabelTerm.evaluated, g, hxy];
174
- have : ∀ a b, (a, b) ∈ Γ.rels → LabelTerm.evaluated g (a, b) := (by
175
- intro a b r;
176
- have ha : a ≠ y := by
177
- rintro rfl;
178
- have := SequentPart.not_include_relTerm_of_isFreshLabel₁ hyΓ b;
179
- contradiction;
180
- have hb : b ≠ y := by
181
- rintro rfl;
182
- have := SequentPart.not_include_relTerm_of_isFreshLabel₂ hyΓ a;
183
- contradiction;
184
- simpa [LabelTerm.evaluated, g, ha, hb] using hX (a, b) r;
185
- )
186
- rcases ih (by assumption) (by assumption) (by assumption) with (h | ⟨⟨z, ψ⟩, h₁, h₂⟩) | ⟨a, b, h₁, h₂⟩;
187
- . simpa [g, LabelledFormula.Satisfies.iff_models] using h;
188
- . have hz : z ≠ y := by
189
- rintro rfl;
190
- have := SequentPart.not_include_labelledFml_of_isFreshLabel hyΔ ψ;
191
- contradiction;
192
- have : f ⊧ z ∶ ψ := by simpa [g, hz] using h₂;
193
- have : ¬f ⊧ z ∶ ψ := hΔ₂ _ h₁;
194
- contradiction;
195
- . have ha : a ≠ y := by
196
- rintro rfl;
197
- have := SequentPart.not_include_relTerm_of_isFreshLabel₁ hyΔ b;
198
- contradiction;
199
- have hb : b ≠ y := by
200
- rintro rfl;
201
- have := SequentPart.not_include_relTerm_of_isFreshLabel₂ hyΔ a;
202
- contradiction;
203
- have : (f a) ≺ (f b) := by simpa [LabelTerm.evaluated, g, ha, hb] using h₂;
204
- have : ¬(f a) ≺ (f b) := hΔ₁ a b h₁;
205
- contradiction;
206
-
207
- theorem soundness_fml : ⊢ᵍ! ⟨⟨∅, ∅⟩, ⟨{0 ∶ φ}, ∅⟩⟩ → ∀ (M : Kripke.Model), ∀ (f : Assignment M), f 0 ⊧ φ := by
208
- rintro ⟨d⟩ M f;
209
- simpa [Sequent.Satisfies] using soundness d M f
210
-
211
- end
82
+ section height
83
+
84
+ def Derivation.height {S : Sequent} : ⊢ᵍ S → ℕ
85
+ | axA => 1
86
+ | axBot => 1
87
+ | impL d₁ d₂ => max d₁.height d₂.height + 1
88
+ | impR d => d.height + 1
89
+ | boxL d => d.height + 1
90
+ | boxR _ _ _ d => d.height + 1
91
+
92
+ end height
212
93
213
94
def axF {Γ Δ : SequentPart} {x} {φ} : ⊢ᵍ (⟨(x ∶ φ) ::ₘ Γ.fmls, Γ.rels⟩ ⟹ ⟨(x ∶ φ) ::ₘ Δ.fmls, Δ.rels⟩) := by
214
95
induction φ using Formula.rec' generalizing Γ Δ x with
0 commit comments