@@ -79,19 +79,31 @@ theorem IsAtomic.isQF {φ : L.BoundedFormula α n} : IsAtomic φ → IsQF φ :=
79
79
theorem isQF_bot : IsQF (⊥ : L.BoundedFormula α n) :=
80
80
IsQF.falsum
81
81
82
- theorem IsQF.not {φ : L.BoundedFormula α n} (h : IsQF φ) : IsQF φ.not :=
82
+ namespace IsQF
83
+
84
+ theorem not {φ : L.BoundedFormula α n} (h : IsQF φ) : IsQF φ.not :=
83
85
h.imp isQF_bot
84
86
85
- theorem IsQF.relabel {m : ℕ} {φ : L.BoundedFormula α m} (h : φ.IsQF) (f : α → β ⊕ (Fin n)) :
87
+ theorem top : IsQF (⊤ : L.BoundedFormula α n) := isQF_bot.not
88
+
89
+ theorem sup {φ ψ : L.BoundedFormula α n} (hφ : IsQF φ) (hψ : IsQF ψ) : IsQF (φ ⊔ ψ) :=
90
+ hφ.not.imp hψ
91
+
92
+ theorem inf {φ ψ : L.BoundedFormula α n} (hφ : IsQF φ) (hψ : IsQF ψ) : IsQF (φ ⊓ ψ) :=
93
+ (hφ.imp hψ.not).not
94
+
95
+ protected theorem relabel {m : ℕ} {φ : L.BoundedFormula α m} (h : φ.IsQF) (f : α → β ⊕ (Fin n)) :
86
96
(φ.relabel f).IsQF :=
87
97
IsQF.recOn h isQF_bot (fun h => (h.relabel f).isQF) fun _ _ h1 h2 => h1.imp h2
88
98
89
- theorem IsQF. liftAt {k m : ℕ} (h : IsQF φ) : (φ.liftAt k m).IsQF :=
99
+ protected theorem liftAt {k m : ℕ} (h : IsQF φ) : (φ.liftAt k m).IsQF :=
90
100
IsQF.recOn h isQF_bot (fun ih => ih.liftAt.isQF) fun _ _ ih1 ih2 => ih1.imp ih2
91
101
92
- theorem IsQF. castLE {h : l ≤ n} (hφ : IsQF φ) : (φ.castLE h).IsQF :=
102
+ protected theorem castLE {h : l ≤ n} (hφ : IsQF φ) : (φ.castLE h).IsQF :=
93
103
IsQF.recOn hφ isQF_bot (fun ih => ih.castLE.isQF) fun _ _ ih1 ih2 => ih1.imp ih2
94
104
105
+ end IsQF
106
+
95
107
theorem not_all_isQF (φ : L.BoundedFormula α (n + 1 )) : ¬φ.all.IsQF := fun con => by
96
108
cases' con with _ con
97
109
exact φ.not_all_isAtomic con
@@ -315,6 +327,41 @@ theorem induction_on_exists_not {P : ∀ {m}, L.BoundedFormula α m → Prop} (
315
327
(fun {_ φ} hφ => (hse φ.all_semanticallyEquivalent_not_ex_not).2 (hnot (hex (hnot hφ))))
316
328
(fun {_ _} => hex) fun {_ _ _} => hse
317
329
330
+ section Preservation
331
+
332
+ variable {M : Type *} [L.Structure M] {N : Type *} [L.Structure N]
333
+ variable {F : Type *} [FunLike F M N]
334
+
335
+ lemma IsAtomic.realize_comp_of_injective {φ : L.BoundedFormula α n} (hA : φ.IsAtomic)
336
+ [L.HomClass F M N] {f : F} (hInj : Function.Injective f) {v : α → M} {xs : Fin n → M} :
337
+ φ.Realize v xs → φ.Realize (f ∘ v) (f ∘ xs) := by
338
+ induction hA with
339
+ | equal t₁ t₂ => simp only [realize_bdEqual, ← Sum.comp_elim, HomClass.realize_term, hInj.eq_iff,
340
+ imp_self]
341
+ | rel R ts =>
342
+ simp only [realize_rel, ← Sum.comp_elim, HomClass.realize_term]
343
+ exact HomClass.map_rel f R (fun i => Term.realize (Sum.elim v xs) (ts i))
344
+
345
+ lemma IsAtomic.realize_comp {φ : L.BoundedFormula α n} (hA : φ.IsAtomic)
346
+ [EmbeddingLike F M N] [L.HomClass F M N] (f : F) {v : α → M} {xs : Fin n → M} :
347
+ φ.Realize v xs → φ.Realize (f ∘ v) (f ∘ xs) :=
348
+ hA.realize_comp_of_injective (EmbeddingLike.injective f)
349
+
350
+ lemma IsQF.realize_embedding {φ : L.BoundedFormula α n} (hQF : φ.IsQF)
351
+ [EmbeddingLike F M N] [L.StrongHomClass F M N] (f : F) {v : α → M} {xs : Fin n → M} :
352
+ φ.Realize (f ∘ v) (f ∘ xs) ↔ φ.Realize v xs := by
353
+ induction hQF with
354
+ | falsum => rfl
355
+ | of_isAtomic hA => induction hA with
356
+ | equal t₁ t₂ => simp only [realize_bdEqual, ← Sum.comp_elim, HomClass.realize_term,
357
+ (EmbeddingLike.injective f).eq_iff]
358
+ | rel R ts =>
359
+ simp only [realize_rel, ← Sum.comp_elim, HomClass.realize_term]
360
+ exact StrongHomClass.map_rel f R (fun i => Term.realize (Sum.elim v xs) (ts i))
361
+ | imp _ _ ihφ ihψ => simp only [realize_imp, ihφ, ihψ]
362
+
363
+ end Preservation
364
+
318
365
end BoundedFormula
319
366
320
367
theorem Formula.isAtomic_graph (f : L.Functions n) : (Formula.graph f).IsAtomic :=
0 commit comments