Skip to content

Commit e48715a

Browse files
committed
fix
1 parent 14c3308 commit e48715a

9 files changed

Lines changed: 86 additions & 123 deletions

File tree

Foundation/FirstOrder/Basic/Calculus.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def equiv (𝔖 : Schema L) (φ) :
279279
invFun := fun ⟨⟨Γ, hΓ⟩, d⟩ ↦ ⟨Γ, hΓ, d⟩
280280

281281
instance : Entailment.Compact (Schema L) where
282-
core b := fun φ ↦ φ ∈ b.axioms
282+
core b := {φ | φ ∈ b.axioms}
283283
corePrf b := ⟨b.axioms, by simp, b.derivation⟩
284284
core_finite b := by simp [AdjunctiveSet.Finite, AdjunctiveSet.set]
285285
core_subset b := by simpa [AdjunctiveSet.subset_iff] using b.axioms_mem
@@ -372,7 +372,7 @@ open Entailment Derivation
372372
lemma iff_context {𝔖 : Schema L} : 𝔖 ⊢ φ ↔ 𝔖 *⊢[𝐋𝐊¹] φ := by
373373
constructor
374374
· rintro ⟨d⟩
375-
have : 𝐋𝐊¹ ⊢! ⋀d.axioms φ :=
375+
have : 𝐋𝐊¹ ⊢! ⋀d.axioms 🡒 φ :=
376376
have : ⊢ᴷ ∼d.axioms ++ [φ] := d.derivation.weakening
377377
this.disj₂.or.cast <| by simp [Semiformula.imp_eq]
378378
refine ⟨⟨d.axioms, by simpa using d.axioms_mem, this⟩⟩
@@ -388,7 +388,7 @@ open Classical in
388388
noncomputable instance : Entailment.Deduction (Schema L) where
389389
ofInsert {φ ψ 𝔖 b} :=
390390
have : insert φ ↑𝔖 *⊢[𝐋𝐊¹] ψ := iff_context.mp ⟨b⟩
391-
have : ↑𝔖 *⊢[𝐋𝐊¹] φ ψ := Context.deduct! this
391+
have : ↑𝔖 *⊢[𝐋𝐊¹] φ 🡒 ψ := Context.deduct! this
392392
(iff_context.mpr this).get
393393
inv {φ ψ 𝔖 b} :=
394394
have : ↑(adjoin φ 𝔖) *⊢[𝐋𝐊¹] ψ := Context.deductInv! (iff_context.mp ⟨b⟩)

Foundation/FirstOrder/Basic/CutFree.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,15 @@ variable {Γ Δ : Sequent L}
5757
?_ ?_ ?_ ?_ ?_ ?_ ?_
5858
all_goals simp
5959

60+
set_option backward.isDefEq.respectTransparency false in
6061
@[simp] lemma isCutFree_rewrite_iff_isCutFree {f : ℕ → SyntacticTerm L} {d : ⊢ᴷ Γ} :
6162
IsCutFree (rewrite f d) ↔ IsCutFree d := by
6263
induction d generalizing f <;> simp [rewrite, *]
6364

6465
@[simp] lemma isCutFree_map_iff_isCutFree {f : ℕ → ℕ} {d : ⊢ᴷ Γ} :
6566
IsCutFree (Derivation.map d f) ↔ IsCutFree d := isCutFree_rewrite_iff_isCutFree
6667

68+
set_option backward.isDefEq.respectTransparency false in
6769
@[simp] lemma IsCutFree.genelalizeByNewver_isCutFree {φ : Semiproposition L 1} (hp : ¬φ.FVar? m) (hΔ : ∀ ψ ∈ Δ, ¬ψ.FVar? m)
6870
(d : ⊢ᴷ φ/[&m] :: Δ) : IsCutFree (genelalizeByNewver hp hΔ d) ↔ IsCutFree d := by simp [genelalizeByNewver]
6971

Foundation/FirstOrder/Basic/Eq.lean

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ namespace Eq
2525

2626
protected abbrev refl (t : Term L ℕ) : Proposition L := op(=).operator ![t, t]
2727

28-
protected abbrev symm (t u : Term L ℕ) : Proposition L := op(=).operator ![t, u] op(=).operator ![u, t]
28+
protected abbrev symm (t u : Term L ℕ) : Proposition L := op(=).operator ![t, u] 🡒 op(=).operator ![u, t]
2929

30-
protected abbrev trans (t u v : Term L ℕ) : Proposition L := op(=).operator ![t, u] op(=).operator ![u, v] op(=).operator ![t, v]
30+
protected abbrev trans (t u v : Term L ℕ) : Proposition L := op(=).operator ![t, u] 🡒 op(=).operator ![u, v] 🡒 op(=).operator ![t, v]
3131

3232
def funcExt {k} (f : L.Func k) (v w : Fin k → Term L ℕ) : Proposition L :=
33-
(Matrix.conj fun i ↦ op(=).operator ![v i, w i]) op(=).operator ![Semiterm.func f v, Semiterm.func f w]
33+
(Matrix.conj fun i ↦ op(=).operator ![v i, w i]) 🡒 op(=).operator ![Semiterm.func f v, Semiterm.func f w]
3434

3535
@[simp] lemma rew_funcExt (ω : Rew L ℕ 00) {k} (f : L.Func k) (v w : Fin k → Term L ℕ) :
3636
ω ▹ funcExt f v w = funcExt f (ω ∘ v) (ω ∘ w) := by
@@ -73,7 +73,7 @@ variable (L) (M : Type*) [Nonempty M] [Structure L M]
7373
intro σ h
7474
have : ∃ φ, Eq.EqSchema φ ∧ Semiformula.univCl φ = σ := by simpa using h
7575
rcases this with ⟨φ, (_ | _ | _ | _ | _), rfl⟩ <;> simp [models_iff, Eq.funcExt, Eq.relExt]
76-
· simp at h; grind
76+
· grind
7777
· grind
7878
· simp [Function.comp_def]; grind
7979
· simp [Function.comp_def]; grind⟩
@@ -84,7 +84,7 @@ def eqv (a b : M) : Prop := (@Semiformula.Operator.Eq.eq L _).val ![a, b]
8484

8585
variable {L}
8686

87-
variable [H : M↓[L] ⊧* 𝗘𝗤 L]
87+
variable [H : M↓[L] ⊧* ↑↑(𝗘𝗤 L)]
8888

8989
open Semiterm Theory Semiformula
9090

@@ -212,52 +212,52 @@ end Eq
212212
end Structure
213213

214214
lemma consequence_iff_eq {𝔖 : Schema L} [𝗘𝗤 L ⪯ 𝔖] {σ : Sentence L} :
215-
𝔖 ⊨[Struc.{v, u} L] σ ↔ (∀ (M : Type v) [Nonempty M] [Structure L M] [Structure.Eq L M], M↓[L] ⊧* 𝔖 → M↓[L] ⊧ σ) := by
215+
↑↑𝔖 ⊨[Struc.{v, u} L] σ ↔ (∀ (M : Type v) [Nonempty M] [Structure L M] [Structure.Eq L M], M↓[L] ⊧* ↑↑𝔖 → M↓[L] ⊧ σ) := by
216216
simp only [consequence_iff, Nonempty.forall]
217217
constructor
218218
· intro h M x s _ hM; exact h M x hM
219219
· intro h M x s hM
220220
have : Nonempty M := ⟨x⟩
221-
have H : M↓[L] ⊧* 𝗘𝗤 L := models_of_subtheory hM
221+
have H : M↓[L] ⊧* ↑↑(𝗘𝗤 L) := models_of_subtheory hM
222222
have e : Structure.Eq.QuotEq L M ≡ₑ[L] M := Structure.Eq.QuotEq.elementaryEquiv L M
223223
exact e.models.mp <| h (Structure.Eq.QuotEq L M) ⟦x⟧ (e.modelsTheory.mpr hM)
224224

225225
lemma consequence_iff_eq' {𝔖 : Schema L} [𝗘𝗤 L ⪯ 𝔖] {σ : Sentence L} :
226-
𝔖 ⊨[Struc.{v, u} L] σ ↔ (∀ (M : Type v) [Nonempty M] [Structure L M] [Structure.Eq L M] [M↓[L] ⊧* 𝔖], M↓[L] ⊧ σ) := by
226+
↑↑𝔖 ⊨[Struc.{v, u} L] σ ↔ (∀ (M : Type v) [Nonempty M] [Structure L M] [Structure.Eq L M] [M↓[L] ⊧* ↑↑𝔖], M↓[L] ⊧ σ) := by
227227
rw [consequence_iff_eq]
228228

229229
lemma satisfiable_iff_eq {𝔖 : Schema L} [𝗘𝗤 L ⪯ 𝔖] :
230-
Semantics.Satisfiable (Struc.{v, u} L) 𝔖 ↔ (∃ (M : Type v) (_ : Nonempty M) (_ : Structure L M) (_ : Structure.Eq L M), M↓[L] ⊧* 𝔖) := by
230+
Semantics.Satisfiable (Struc.{v, u} L) ↑↑𝔖 ↔ (∃ (M : Type v) (_ : Nonempty M) (_ : Structure L M) (_ : Structure.Eq L M), M↓[L] ⊧* ↑↑𝔖) := by
231231
simp only [satisfiable_iff, Nonempty.exists, exists_prop]
232232
constructor
233233
· intro ⟨M, x, s, hM⟩;
234234
have : Nonempty M := ⟨x⟩
235-
have H : M↓[L] ⊧* 𝗘𝗤 L := models_of_subtheory hM
235+
have H : M↓[L] ⊧* ↑↑(𝗘𝗤 L) := models_of_subtheory hM
236236
have e : Structure.Eq.QuotEq L M ≡ₑ[L] M := Structure.Eq.QuotEq.elementaryEquiv L M
237237
exact ⟨Structure.Eq.QuotEq L M, ⟦x⟧, inferInstance, inferInstance, e.modelsTheory.mpr hM⟩
238238
· intro ⟨M, i, s, _, hM⟩; exact ⟨M, i, s, hM⟩
239239

240-
instance {𝔖 : Schema L} [𝗘𝗤 L ⪯ 𝔖] (sat : Semantics.Satisfiable (Struc.{v, u} L) 𝔖) :
241-
(ModelOfSat sat)↓[L] ⊧* 𝗘𝗤 L := models_of_subtheory (ModelOfSat.models sat)
240+
instance {𝔖 : Schema L} [𝗘𝗤 L ⪯ 𝔖] (sat : Semantics.Satisfiable (Struc.{v, u} L) ↑↑𝔖) :
241+
(ModelOfSat sat)↓[L] ⊧* ↑↑(𝗘𝗤 L) := models_of_subtheory (ModelOfSat.models sat)
242242

243-
def ModelOfSatEq {𝔖 : Schema L} [𝗘𝗤 L ⪯ 𝔖] (sat : Semantics.Satisfiable (Struc.{v, u} L) 𝔖) : Type _ :=
243+
def ModelOfSatEq {𝔖 : Schema L} [𝗘𝗤 L ⪯ 𝔖] (sat : Semantics.Satisfiable (Struc.{v, u} L) ↑↑𝔖) : Type _ :=
244244
Structure.Eq.QuotEq L (ModelOfSat sat)
245245

246246
namespace ModelOfSatEq
247247

248-
variable {𝔖 : Schema L} [𝗘𝗤 L ⪯ 𝔖] (sat : Semantics.Satisfiable (Struc.{v, u} L) 𝔖)
248+
variable {𝔖 : Schema L} [𝗘𝗤 L ⪯ 𝔖] (sat : Semantics.Satisfiable (Struc.{v, u} L) ↑↑𝔖)
249249

250250
noncomputable instance : Nonempty (ModelOfSatEq sat) := Structure.Eq.QuotEq.inhabited
251251

252252
noncomputable instance struc : Structure L (ModelOfSatEq sat) := Structure.Eq.QuotEq.struc
253253

254254
noncomputable instance : Structure.Eq L (ModelOfSatEq sat) := Structure.Eq.QuotEq.structureEq
255255

256-
lemma models : (ModelOfSatEq sat)↓[L] ⊧* 𝔖 :=
256+
lemma models : (ModelOfSatEq sat)↓[L] ⊧* ↑↑𝔖 :=
257257
have e : ModelOfSatEq sat ≡ₑ[L] ModelOfSat sat := Structure.Eq.QuotEq.elementaryEquiv L (ModelOfSat sat)
258258
e.modelsTheory.mpr (ModelOfSat.models _)
259259

260-
instance mod : (ModelOfSatEq sat)↓[L] ⊧* 𝔖 := models sat
260+
instance mod : (ModelOfSatEq sat)↓[L] ⊧* ↑↑𝔖 := models sat
261261

262262
open Semiterm Semiformula
263263

Foundation/FirstOrder/Basic/Operator.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ abbrev gödelNumber' (a : α) : Semiterm L ξ n := const (gödelNumber a)
222222

223223
instance : GödelQuote α (Semiterm L ξ n) := ⟨gödelNumber'⟩
224224

225-
def ofEncodable [Operator.Zero L] [Operator.One L] [Operator.Add L] {α : Type*} [Encodable α] : GödelNumber L α := ⟨Operator.encode L⟩
225+
abbrev ofEncodable [Operator.Zero L] [Operator.One L] [Operator.Add L] {α : Type*} [Encodable α] : GödelNumber L α := ⟨Operator.encode L⟩
226226

227227
end GödelNumber
228228

@@ -379,19 +379,19 @@ lemma LE.def_of_Eq_of_LT [Operator.Eq L] [Operator.LT L] :
379379

380380
lemma lt_def [L.LT] (t u : Semiterm L ξ n) :
381381
LT.lt.operator ![t, u] = Semiformula.rel Language.LT.lt ![t, u] := by
382-
simp [operator, LT.sentence_eq, Matrix.fun_eq_vec_two']
382+
simp [operator, LT.sentence_eq, Matrix.fun_eq_vec_two]
383383

384384
lemma eq_def [L.Eq] (t u : Semiterm L ξ n) :
385385
Eq.eq.operator ![t, u] = Semiformula.rel Language.Eq.eq ![t, u] := by
386-
simp [operator, Eq.sentence_eq, Matrix.fun_eq_vec_two']
386+
simp [operator, Eq.sentence_eq, Matrix.fun_eq_vec_two]
387387

388388
lemma mem_def [L.Mem] (t u : Semiterm L ξ n) :
389389
Mem.mem.operator ![t, u] = Semiformula.rel Language.Mem.mem ![t, u] := by
390-
simp [operator, Mem.sentence_eq, Matrix.fun_eq_vec_two']
390+
simp [operator, Mem.sentence_eq, Matrix.fun_eq_vec_two]
391391

392392
lemma le_def [L.Eq] [L.LT] (t u : Semiterm L ξ n) :
393393
LE.le.operator ![t, u] = Semiformula.rel Language.Eq.eq ![t, u] ⋎ Semiformula.rel Language.LT.lt ![t, u] := by
394-
simp [operator, Eq.sentence_eq, LT.sentence_eq, LE.sentence_eq, Matrix.fun_eq_vec_two']
394+
simp [operator, Eq.sentence_eq, LT.sentence_eq, LE.sentence_eq, Matrix.fun_eq_vec_two]
395395

396396
variable {L : Language}
397397

Foundation/FirstOrder/Basic/Semantics/Semantics.lean

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ instance unit : Structure L Unit where
4343
func := fun _ _ _ ↦ ()
4444
rel := fun _ _ _ ↦ True
4545

46-
protected def lMap (φ : L₁ →ᵥ L₂) {M : Type w} (S : Structure L₂ M) : Structure L₁ M where
46+
protected abbrev lMap (φ : L₁ →ᵥ L₂) {M : Type w} (S : Structure L₂ M) : Structure L₁ M where
4747
func _ f := S.func (φ.func f)
4848
rel _ r := S.rel (φ.rel r)
4949

@@ -53,7 +53,7 @@ variable (φ : L₁ →ᵥ L₂) {M : Type w} (s₂ : Structure L₂ M)
5353

5454
@[simp] lemma lMap_rel {k} {r : L₁.Rel k} {v : Fin k → M} : (s₂.lMap φ).rel r v ↔ s₂.rel (φ.rel r) v := of_eq rfl
5555

56-
def ofEquiv {M : Type w} [Structure L M] {N : Type w'} (Θ : M ≃ N) : Structure L N where
56+
abbrev ofEquiv {M : Type w} [Structure L M] {N : Type w'} (Θ : M ≃ N) : Structure L N where
5757
func := fun _ f v ↦ Θ (func f (Θ.symm ∘ v))
5858
rel := fun _ r v ↦ rel r (Θ.symm ∘ v)
5959

@@ -527,7 +527,7 @@ lemma models_iff_proposition {φ : Proposition L} : M↓[L] ⊧ φ.univCl ↔
527527

528528
lemma models_theory_iff : M↓[L] ⊧* T ↔ (∀ {φ}, φ ∈ T → M↓[L] ⊧ φ) := Semantics.modelsSet_iff
529529

530-
lemma models_schema_iff {𝔖 : Schema L} : M↓[L] ⊧* 𝔖 ↔ (∀ {φ : Proposition L}, φ ∈ 𝔖 → ∀ f : ℕ → M, φ.Evalf f) := by
530+
lemma models_schema_iff {𝔖 : Schema L} : M↓[L] ⊧* (𝔖 : Theory L) ↔ (∀ {φ : Proposition L}, φ ∈ 𝔖 → ∀ f : ℕ → M, φ.Evalf f) := by
531531
simp [models_theory_iff, models_iff]
532532

533533
lemma models_of_mem {T : Theory L} [M↓[L] ⊧* T] {φ} (h : φ ∈ T) : M↓[L] ⊧ φ := Semantics.ModelsSet.models _ h
@@ -627,16 +627,16 @@ variable {M}
627627
lemma models_of_ss {T U : Theory L} (h : M↓[L] ⊧* U) (ss : T ⊆ U) : M↓[L] ⊧* T :=
628628
Semantics.ModelsSet.of_subset h ss
629629

630-
lemma models_of_le {𝓢₁ 𝓢₂ : Schema L} (h : M↓[L] ⊧* 𝓢₂) (le : 𝓢₁ ≤ 𝓢₂) : M↓[L] ⊧* 𝓢₁ :=
630+
lemma models_of_le {𝔖₁ 𝔖₂ : Schema L} (h : M↓[L] ⊧* ↑↑𝔖₂) (le : 𝔖₁ ≤ 𝔖₂) : M↓[L] ⊧* ↑↑𝔖₁ :=
631631
Semantics.ModelsSet.of_subset h (Schema.coe_subset_coe_of_le le)
632632

633-
instance models_schema_sup (𝓢₁ 𝓢₂ : Schema L) [M↓[L] ⊧* 𝓢₁] [M↓[L] ⊧* 𝓢₂] : M↓[L] ⊧* 𝓢₁ ⊔ 𝓢₂ := by
634-
simp only [Set.sup_eq_union, Semantics.ModelsSet.union_iff]
633+
instance models_schema_sup (𝔖₁ 𝔖₂ : Schema L) [M↓[L] ⊧* ↑↑𝔖₁] [M↓[L] ⊧* ↑↑𝔖₂] : M↓[L] ⊧* ↑↑(𝔖₁ ∪ 𝔖₂) := by
634+
simp only [Schema.coe_sup, Semantics.ModelsSet.union_iff]
635635
constructor
636636
· infer_instance
637637
· infer_instance
638638

639-
lemma modelsUnivCl_of_mem_schema {𝔖 : Schema L} [h : M↓[L] ⊧* 𝔖] (hf : φ ∈ 𝔖) : M↓[L] ⊧ φ.univCl :=
639+
lemma modelsUnivCl_of_mem_schema {𝔖 : Schema L} [h : M↓[L] ⊧* ↑↑𝔖] (hf : φ ∈ 𝔖) : M↓[L] ⊧ φ.univCl :=
640640
h.models _ <| by simp; grind
641641

642642
end schema

Foundation/FirstOrder/Basic/Syntax/Schema.lean

Lines changed: 22 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -13,75 +13,30 @@ First-order schema `Schema L` is defined as a set of propositions, which may con
1313

1414
namespace LO.FirstOrder
1515

16-
structure Schema (L : Language) where
17-
Mem : Proposition L → Prop
16+
abbrev Schema (L : Language) := Set (Proposition L)
1817

1918
abbrev Theory (L : Language) := Set (Sentence L)
2019

2120
namespace Schema
2221

2322
variable {L : Language}
2423

25-
instance : SetLike (Schema L) (Proposition L) where
26-
coe 𝓢 := { φ | 𝓢.Mem φ }
27-
coe_injective' := by
28-
rintro ⟨⟩ ⟨⟩ _
29-
congr
30-
31-
lemma mem_def (𝓢 : Schema L) (φ : Proposition L) : 𝓢.Mem φ ↔ φ ∈ 𝓢 := Iff.rfl
32-
33-
@[simp] lemma mem_mk_iff (φ : Proposition L) (P : Proposition L → Prop) : φ ∈ Schema.mk P ↔ P φ := Iff.rfl
34-
35-
lemma le_def (𝓢₁ 𝓢₂ : Schema L) : 𝓢₁ ≤ 𝓢₂ ↔ ∀ φ, φ ∈ 𝓢₁ → φ ∈ 𝓢₂ := Iff.rfl
36-
37-
instance : CompleteLattice (Schema L) where
38-
sup 𝓢₁ 𝓢₂ := ⟨fun φ ↦ φ ∈ 𝓢₁ ∨ φ ∈ 𝓢₂⟩
39-
le_sup_left _ _ := by simp [le_def]; grind
40-
le_sup_right _ _ := by simp [le_def]; grind
41-
sup_le _ _ _ := by simp [le_def]; grind
42-
inf 𝓢₁ 𝓢₂ := ⟨fun φ ↦ φ ∈ 𝓢₁ ∧ φ ∈ 𝓢₂⟩
43-
inf_le_left _ _ := by simp [le_def]; grind
44-
inf_le_right _ _ := by simp [le_def]
45-
le_inf _ _ _ := by simp [le_def]; grind
46-
sSup s := ⟨fun φ ↦ ∃ 𝓢 ∈ s, φ ∈ 𝓢⟩
47-
le_sSup _ _ := by simp [le_def]; grind
48-
sSup_le _ _ := by simp [le_def]; grind
49-
sInf s := ⟨fun φ ↦ ∀ 𝓢 ∈ s, φ ∈ 𝓢⟩
50-
sInf_le _ _ := by simp [le_def]; grind
51-
le_sInf _ _ := by simp [le_def]; grind
52-
top := ⟨fun _ ↦ True⟩
53-
le_top _ _ := by simp
54-
bot := ⟨fun _ ↦ False⟩
55-
bot_le _ _ := by simp
56-
57-
@[simp] lemma mem_sup_iff (𝓢₁ 𝓢₂ : Schema L) (φ : Proposition L) : φ ∈ 𝓢₁ ⊔ 𝓢₂ ↔ φ ∈ 𝓢₁ ∨ φ ∈ 𝓢₂ := Iff.rfl
58-
59-
@[simp] lemma mem_inf_iff (𝓢₁ 𝓢₂ : Schema L) (φ : Proposition L) : φ ∈ 𝓢₁ ⊓ 𝓢₂ ↔ φ ∈ 𝓢₁ ∧ φ ∈ 𝓢₂ := Iff.rfl
60-
61-
@[simp] lemma mem_sSup_iff (s : Set (Schema L)) (φ : Proposition L) : φ ∈ sSup s ↔ ∃ 𝓢 ∈ s, φ ∈ 𝓢 := Iff.rfl
62-
63-
@[simp] lemma mem_sInf_iff (s : Set (Schema L)) (φ : Proposition L) : φ ∈ sInf s ↔ ∀ 𝓢 ∈ s, φ ∈ 𝓢 := Iff.rfl
64-
65-
@[simp] lemma mem_top (φ : Proposition L) : φ ∈ (⊤ : Schema L) := by trivial
66-
67-
@[simp] lemma not_mem_bot (φ : Proposition L) : φ ∉ (⊥ : Schema L) := by rintro ⟨⟩
68-
69-
@[coe] def ofProposition (φ : Proposition L) : Schema L := ⟨(· = φ)⟩
24+
@[coe] def ofProposition (φ : Proposition L) : Schema L := {φ}
7025

7126
instance : Coe (Proposition L) (Schema L) := ⟨fun φ ↦ ofProposition φ⟩
7227

7328
@[simp] lemma mem_coe (φ ψ : Proposition L) : ψ ∈ (φ : Schema L) ↔ ψ = φ := by rfl
7429

7530
instance : AdjunctiveSet (Proposition L) (Schema L) where
76-
Subset 𝓢₁ 𝓢₂ := 𝓢₁ ≤ 𝓢
31+
Subset 𝔖₁ 𝔖₂ := 𝔖₁ ≤ 𝔖
7732
emptyCollection := ⊥
78-
adjoin φ 𝓢 := φ ⊔ 𝓢
79-
subset_iff := by simp [le_def]
33+
adjoin φ 𝔖 := φ ⊔ 𝔖
34+
subset_iff := by simp [Set.subset_def]
8035
not_mem_empty _ := by simp
8136
mem_cons_iff := by simp
8237

83-
class IsClosed (𝓢 : Schema L) : Prop where
84-
closed : ∀ ω : Rew L ℕ 00, ∀ φ ∈ 𝓢, ω ▹ φ ∈ 𝓢
38+
class IsClosed (𝔖 : Schema L) : Prop where
39+
closed : ∀ ω : Rew L ℕ 00, ∀ φ ∈ 𝔖, ω ▹ φ ∈ 𝔖
8540

8641
namespace IsClosed
8742

@@ -91,27 +46,27 @@ instance : IsClosed (⊤ : Schema L) where
9146
instance : IsClosed (⊥ : Schema L) where
9247
closed _ _ := by rintro ⟨⟩
9348

94-
instance sup (𝓢₁ 𝓢₂ : Schema L) [IsClosed 𝓢₁] [IsClosed 𝓢₂] : IsClosed (𝓢₁ ⊔ 𝓢₂) where
49+
instance sup (𝔖₁ 𝔖₂ : Schema L) [IsClosed 𝔖₁] [IsClosed 𝔖₂] : IsClosed (𝔖₁ ∪ 𝔖₂) where
9550
closed ω φ h := by
96-
have : φ ∈ 𝓢₁ ∨ φ ∈ 𝓢₂ := by simpa using h
51+
have : φ ∈ 𝔖₁ ∨ φ ∈ 𝔖₂ := by simpa using h
9752
rcases this with (h |h )
9853
· left; apply IsClosed.closed ω φ h
9954
· right; apply IsClosed.closed ω φ h
10055

101-
instance inf (𝓢₁ 𝓢₂ : Schema L) [IsClosed 𝓢₁] [IsClosed 𝓢₂] : IsClosed (𝓢₁ ⊓ 𝓢₂) where
56+
instance inf (𝔖₁ 𝔖₂ : Schema L) [IsClosed 𝔖₁] [IsClosed 𝔖₂] : IsClosed (𝔖₁ ∩ 𝔖₂) where
10257
closed ω φ h := by
103-
have : φ ∈ 𝓢₁ ∧ φ ∈ 𝓢₂ := by simpa using h
58+
have : φ ∈ 𝔖₁ ∧ φ ∈ 𝔖₂ := by simpa using h
10459
rcases this with ⟨h₁, h₂⟩
10560
constructor
10661
· apply IsClosed.closed ω φ h₁
10762
· apply IsClosed.closed ω φ h₂
10863

109-
lemma sSup (s : Set (Schema L)) (H : ∀ 𝓢 ∈ s, IsClosed 𝓢) : IsClosed (sSup s) where
64+
lemma sSup (s : Set (Schema L)) (H : ∀ 𝔖 ∈ s, IsClosed 𝔖) : IsClosed (sSup s) where
11065
closed ω φ h := by
111-
have : ∃ 𝓢 ∈ s, φ ∈ 𝓢 := by simpa using h
112-
rcases this with𝓢, hs, hφ⟩
113-
have : IsClosed 𝓢 := H 𝓢 hs
114-
exact ⟨𝓢, hs, IsClosed.closed _ _ hφ⟩
66+
have : ∃ 𝔖 ∈ s, φ ∈ 𝔖 := by simpa using h
67+
rcases this with𝔖, hs, hφ⟩
68+
have : IsClosed 𝔖 := H 𝔖 hs
69+
exact ⟨𝔖, hs, IsClosed.closed _ _ hφ⟩
11570

11671
instance sentence (σ : Sentence L) : IsClosed (σ : Schema L) where
11772
closed _ φ h := by
@@ -121,25 +76,25 @@ instance sentence (σ : Sentence L) : IsClosed (σ : Schema L) where
12176

12277
end IsClosed
12378

124-
@[coe] def uniClosure (𝓢 : Schema L) : Theory L := Set.image Semiformula.univCl {φ | φ ∈ 𝓢}
79+
@[coe] def uniClosure (𝔖 : Schema L) : Theory L := Set.image Semiformula.univCl {φ | φ ∈ 𝔖}
12580

12681
instance : Coe (Schema L) (Theory L) := ⟨uniClosure⟩
12782

128-
variable {𝓢 : Schema L}
83+
variable {𝔖 : Schema L}
12984

13085
@[simp] lemma mem_uniClosure :
131-
σ ∈ (𝓢 : Theory L) ↔ ∃ φ ∈ 𝓢, Semiformula.univCl φ = σ := by simp [uniClosure]
86+
σ ∈ (𝔖 : Theory L) ↔ ∃ φ ∈ 𝔖, Semiformula.univCl φ = σ := by simp [uniClosure]
13287

133-
@[simp] lemma coe_sup (𝓢₁ 𝓢₂ : Schema L) : ((𝓢₁ ⊔ 𝓢₂ : Schema L) : Theory L) = (𝓢₁ : Theory L) ∪ (𝓢₂ : Theory L) := by
88+
@[simp] lemma coe_sup (𝔖₁ 𝔖₂ : Schema L) : ((𝔖₁ ∪ 𝔖₂ : Schema L) : Theory L) = (𝔖₁ : Theory L) ∪ (𝔖₂ : Theory L) := by
13489
ext σ; simp [uniClosure]; grind
13590

136-
@[simp] lemma coe_sSup (s : Set (Schema L)) : ((sSup s : Schema L) : Theory L) = ⋃ 𝓢 ∈ s, (𝓢 : Theory L) := by
91+
@[simp] lemma coe_sSup (s : Set (Schema L)) : ((sSup s : Schema L) : Theory L) = ⋃ 𝔖 ∈ s, (𝔖 : Theory L) := by
13792
ext σ; simp [uniClosure, sSup]; grind
13893

13994
@[simp] lemma coe_coe_proposition (φ : Proposition L) : ((φ : Schema L) : Theory L) = {φ.univCl} := by
14095
ext σ; simp [uniClosure]
14196

142-
@[grind <-] lemma coe_subset_coe_of_le {𝓢₁ 𝓢₂ : Schema L} (h : 𝓢₁ ≤ 𝓢₂) : (𝓢₁ : Theory L) ⊆ (𝓢₂ : Theory L) :=
97+
@[grind <-] lemma coe_subset_coe_of_le {𝔖₁ 𝔖₂ : Schema L} (h : 𝔖₁ ≤ 𝔖₂) : (𝔖₁ : Theory L) ⊆ (𝔖₂ : Theory L) :=
14398
Set.image_mono h
14499

145100
end Schema

0 commit comments

Comments
 (0)