@@ -7,16 +7,15 @@ set_option autoImplicit false
77open Syntax
88open Semantics
99
10- /- ## 3.3 Models, Validity, and Satisfiability -/
10+ /-! ## 3.3 Models, Validity, and Satisfiability -/
1111
1212namespace Models
1313
1414variable {sig : Signature} {X : Variables} {univ : Universes}
1515
16- /- ### Σ-Algebra A with assignment β
17- > I, β ⊨ F :⇔ I(β)(F) = True
18- -/
16+ /- ### Truth and Validity -/
1917
18+ /-- I,β ⊨ F -/
2019@[simp]
2120def EntailsInterpret [DecidableEq X]
2221 (I : Interpretation sig univ) (β : Assignment X univ) (F : Formula sig X) : Prop :=
@@ -27,39 +26,32 @@ theorem not_entails_not [DecidableEq X]
2726 EntailsInterpret I β F → ¬EntailsInterpret I β (Formula.neg F) :=
2827 fun a a_1 ↦ a_1 a
2928
29+ /-- F is true/valid in I: I ⊨ F -/
3030@[simp]
3131def ValidIn [DecidableEq X] (F : Formula sig X) (I : Interpretation sig univ) : Prop :=
3232 ∀ (β : Assignment X univ), EntailsInterpret I β F
3333
34- /- ### Validity / Tautology
35- > ⊨ F :⇔ A |= F for all A ∈ Σ-Alg
36- -/
37-
34+ /-- Tautology: ⊨ F -/
3835@[simp]
3936def Valid [DecidableEq X] (F : Formula sig X) : Prop :=
4037 ∀ (I : Interpretation sig univ) (β : Assignment X univ), Formula.eval I β F
4138
42- /- ### Entailment
43- F ⊨ G, if for all A ∈ Σ-Alg and β ∈ X → UA, we have A, β |= F ⇒ A, β |= G
44- -/
39+ /- ### Entailment -/
4540
41+ /-- Semantic entailment: F ⊨ G -/
4642@[simp]
4743def Entails [DecidableEq X] (F G : Formula sig X) : Prop :=
4844 ∀ (I : Interpretation sig univ) (β : Assignment X univ),
4945 EntailsInterpret I β F → EntailsInterpret I β G
5046infix :60 " ⊨ " => Entails
5147
52- /- ### Equivalence
53-
54- ##### Proposition 3.3.1
55- > F ⊨ G if and only if F → G is valid`
56- -/
48+ /-- F ⊨ G ↔ ⊨ F → G -/
5749theorem entails_iff_imp_valid [inst : DecidableEq X]
5850 (F G : Formula sig X) : @Entails _ _ univ _ F G ↔ @Valid _ _ univ _ (Formula.imp F G) :=
5951 Eq.to_iff rfl
6052
53+ /- ### Satsfiability -/
6154
62- /- ### Sat -/
6355@[simp]
6456def Satisfiable [DecidableEq X] (F : Formula sig X) : Prop :=
6557 ∃ (I : Interpretation sig univ) (β : Assignment X univ), EntailsInterpret I β F
@@ -164,13 +156,8 @@ theorem setEntails_iff_union_not_unsat [inst : DecidableEq X]
164156 cases hGornegN I β
165157 aesop
166158
167- /- lemma term_eval_of_closed {sig : Signature} {X : Variables} [inst : DecidableEq X]
168- (I : Interpretation sig univ) (F : Formula sig X) (hclosed : Formula.closed F) : -/
169-
170- /- lemma validIn_of_entails_closed {sig : Signature} {X : Variables} [inst : DecidableEq X]
171- (I : Interpretation sig univ) (F : Formula sig X) (hclosed : Formula.closed F) :
172- (∃ (β : Assignment X univ), EntailsInterpret I β F) → ValidIn F I := by -/
173-
159+ /-- This lemma allows us to disregard assignments when considering the entailment of closed
160+ formulas. -/
174161lemma validIn_of_entails_closed {sig : Signature} {X : Variables} [inst : DecidableEq X]
175162 (I : Interpretation sig univ) (F : Formula sig X) (hclosed : Formula.closed F) :
176163 (∃ (β : Assignment X univ), EntailsInterpret I β F) → ValidIn F I := by
@@ -180,7 +167,9 @@ lemma validIn_of_entails_closed {sig : Signature} {X : Variables} [inst : Decida
180167 rw [EntailsInterpret, heval, ← EntailsInterpret]
181168 exact hγ
182169
183- /- ### 3.3.4 Substitution Lemma -/
170+ /- ### Lemmas Related to Entailment
171+ In the following section, we prove several lemmas that will be vital in our soundness proof. -/
172+
184173@[simp]
185174def Assignment.compose [DecidableEq X] (I : Interpretation sig univ) (β : Assignment X univ)
186175 (σ : Substitution sig X) : Assignment X univ :=
@@ -302,7 +291,6 @@ lemma valid_sub_of_valid {I : Interpretation sig univ} [DecidableEq X] (C : Clau
302291 rw [three_three_five]
303292 exact hvalid
304293
305- /- ### Lemma 3.3.8 -/
306294lemma three_three_eight {sig : Signature} {X : Variables} [DecidableEq X] (C : Clause sig X)
307295 (I : Interpretation sig univ) (σ : Substitution sig X) (n m : ℕ)
308296 (xs ys : List X) (hxuniq : xs.Nodup) (hn : xs.length = n)
0 commit comments