@@ -7,16 +7,15 @@ set_option autoImplicit false
7
7
open Syntax
8
8
open Semantics
9
9
10
- /- ## 3.3 Models, Validity, and Satisfiability -/
10
+ /-! ## 3.3 Models, Validity, and Satisfiability -/
11
11
12
12
namespace Models
13
13
14
14
variable {sig : Signature} {X : Variables} {univ : Universes}
15
15
16
- /- ### Σ-Algebra A with assignment β
17
- > I, β ⊨ F :⇔ I(β)(F) = True
18
- -/
16
+ /- ### Truth and Validity -/
19
17
18
+ /-- I,β ⊨ F -/
20
19
@[simp]
21
20
def EntailsInterpret [DecidableEq X]
22
21
(I : Interpretation sig univ) (β : Assignment X univ) (F : Formula sig X) : Prop :=
@@ -27,39 +26,32 @@ theorem not_entails_not [DecidableEq X]
27
26
EntailsInterpret I β F → ¬EntailsInterpret I β (Formula.neg F) :=
28
27
fun a a_1 ↦ a_1 a
29
28
29
+ /-- F is true/valid in I: I ⊨ F -/
30
30
@[simp]
31
31
def ValidIn [DecidableEq X] (F : Formula sig X) (I : Interpretation sig univ) : Prop :=
32
32
∀ (β : Assignment X univ), EntailsInterpret I β F
33
33
34
- /- ### Validity / Tautology
35
- > ⊨ F :⇔ A |= F for all A ∈ Σ-Alg
36
- -/
37
-
34
+ /-- Tautology: ⊨ F -/
38
35
@[simp]
39
36
def Valid [DecidableEq X] (F : Formula sig X) : Prop :=
40
37
∀ (I : Interpretation sig univ) (β : Assignment X univ), Formula.eval I β F
41
38
42
- /- ### Entailment
43
- F ⊨ G, if for all A ∈ Σ-Alg and β ∈ X → UA, we have A, β |= F ⇒ A, β |= G
44
- -/
39
+ /- ### Entailment -/
45
40
41
+ /-- Semantic entailment: F ⊨ G -/
46
42
@[simp]
47
43
def Entails [DecidableEq X] (F G : Formula sig X) : Prop :=
48
44
∀ (I : Interpretation sig univ) (β : Assignment X univ),
49
45
EntailsInterpret I β F → EntailsInterpret I β G
50
46
infix :60 " ⊨ " => Entails
51
47
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 -/
57
49
theorem entails_iff_imp_valid [inst : DecidableEq X]
58
50
(F G : Formula sig X) : @Entails _ _ univ _ F G ↔ @Valid _ _ univ _ (Formula.imp F G) :=
59
51
Eq.to_iff rfl
60
52
53
+ /- ### Satsfiability -/
61
54
62
- /- ### Sat -/
63
55
@[simp]
64
56
def Satisfiable [DecidableEq X] (F : Formula sig X) : Prop :=
65
57
∃ (I : Interpretation sig univ) (β : Assignment X univ), EntailsInterpret I β F
@@ -164,13 +156,8 @@ theorem setEntails_iff_union_not_unsat [inst : DecidableEq X]
164
156
cases hGornegN I β
165
157
aesop
166
158
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. -/
174
161
lemma validIn_of_entails_closed {sig : Signature} {X : Variables} [inst : DecidableEq X]
175
162
(I : Interpretation sig univ) (F : Formula sig X) (hclosed : Formula.closed F) :
176
163
(∃ (β : 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
180
167
rw [EntailsInterpret, heval, ← EntailsInterpret]
181
168
exact hγ
182
169
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
+
184
173
@[simp]
185
174
def Assignment.compose [DecidableEq X] (I : Interpretation sig univ) (β : Assignment X univ)
186
175
(σ : Substitution sig X) : Assignment X univ :=
@@ -302,7 +291,6 @@ lemma valid_sub_of_valid {I : Interpretation sig univ} [DecidableEq X] (C : Clau
302
291
rw [three_three_five]
303
292
exact hvalid
304
293
305
- /- ### Lemma 3.3.8 -/
306
294
lemma three_three_eight {sig : Signature} {X : Variables} [DecidableEq X] (C : Clause sig X)
307
295
(I : Interpretation sig univ) (σ : Substitution sig X) (n m : ℕ)
308
296
(xs ys : List X) (hxuniq : xs.Nodup) (hn : xs.length = n)
0 commit comments