-
Notifications
You must be signed in to change notification settings - Fork 1
/
Soundness.v
226 lines (209 loc) · 4.43 KB
/
Soundness.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
Require Import Modal_Library Classical List Deductive_System.
(* p -> (q -> p) *)
Lemma Hilbert_Axiom_1_soundness:
forall M w φ ψ,
M ' w ||- φ .-> (ψ .-> φ).
Proof.
simpl; intros.
assumption.
Qed.
(* (p -> (q -> r)) -> ((p -> q) -> (p -> r)) *)
Lemma Hilbert_Axiom_2_soundness:
forall M w φ ψ Ɣ,
M ' w ||- (φ .-> (ψ .-> Ɣ)) .-> ((φ .-> ψ) .-> (φ .-> Ɣ)).
Proof.
simpl; intros.
apply H.
- auto.
- apply H0; auto.
Qed.
(* (~ q -> ~ p) -> (p -> q) *)
Lemma Hilbert_Axiom_3_soundness:
forall M w φ ψ,
M ' w ||- (.~ ψ .-> .~ φ) .-> (φ .-> ψ).
Proof.
simpl; intros.
pose (classic (M ' w ||- ψ)) as Hip.
destruct Hip.
- auto.
- apply H in H1.
contradiction.
Qed.
(* p -> (q -> (p /\ q)) *)
Lemma Hilbert_Axiom_4_soundness:
forall M w φ ψ,
M ' w ||- φ .-> (ψ .-> (φ ./\ ψ)).
Proof.
simpl; intros.
split; auto.
Qed.
(* (p /\ q) -> p *)
Lemma Hilbert_Axiom_5_soundness:
forall M w φ ψ,
M ' w ||- (φ ./\ ψ) .-> φ.
Proof.
simpl; intros.
destruct H as [Hip1 Hip2].
assumption.
Qed.
(* (p /\ q) -> q *)
Lemma Hilbert_Axiom_6_soundness:
forall M w φ ψ,
M ' w ||- (φ ./\ ψ) .-> ψ.
Proof.
simpl; intros.
destruct H as [Hip1 Hip2].
assumption.
Qed.
(* p -> (p \/ q) *)
Lemma Hilbert_Axiom_7_soundness:
forall M w φ ψ,
M ' w ||- (φ .-> (φ .\/ ψ)).
Proof.
simpl; intros.
left.
assumption.
Qed.
(* q -> (p \/ q) *)
Lemma Hilbert_Axiom_8_soundness:
forall M w φ ψ,
M ' w ||- (ψ .-> (φ .\/ ψ)).
Proof.
simpl; intros.
right.
assumption.
Qed.
(* (p -> r) -> (q -> r) -> (p \/ q) -> r *)
Lemma Hilbert_Axiom_9_soundness:
forall M w φ ψ Ɣ,
M ' w ||- (φ .-> Ɣ) .-> (ψ .-> Ɣ) .-> (φ .\/ ψ) .-> Ɣ.
Proof.
simpl; intros.
destruct H1.
- apply H.
assumption.
- apply H0.
assumption.
Qed.
(* ~~p -> p *)
Lemma Hilbert_Axiom_10_soundness:
forall M w φ,
M ' w ||- .~.~φ .-> φ.
Proof.
simpl; intros.
apply NNPP in H.
assumption.
Qed.
(* <>(p \/ q) -> (<>p \/ <>q) *)
Lemma Axiom_Possibility_soundness:
forall M w φ ψ,
M ' w ||- .<> (φ .\/ ψ) .-> (.<> φ .\/ .<> ψ).
Proof.
simpl; intros.
destruct H as [ w' [ Hip1 [ Hip2 | Hip3 ] ]].
- left; exists w'; split.
+ assumption.
+ assumption.
- right; exists w'; split.
+ assumption.
+ assumption.
Qed.
(* [](p -> q) -> ([]p -> []q) *)
Lemma Axiom_K_soundness:
forall M w φ ψ,
M ' w ||- .[](φ .-> ψ) .-> (.[]φ .-> .[]ψ).
Proof.
simpl; intros.
apply H.
- assumption.
- apply H0.
assumption.
Qed.
(* φ ∈ Γ -> Γ ||= φ *)
Lemma case_two :
forall Γ φ,
In φ Γ ->
Γ ||= φ.
Proof.
unfold entails_modal, validate_model; intros.
apply exact_deduction with Γ.
- assumption.
- assumption.
Qed.
(* a /\ (a -> b) -> b *)
Lemma Modus_Ponens_soundness:
forall M w φ ψ,
((M ' w ||- φ) /\
(M ' w ||- φ .-> ψ)) ->
(M ' w ||- ψ).
Proof.
simpl; intros.
destruct H.
apply H0; auto.
Qed.
Lemma Necessitation_soundness:
forall M φ,
(M |= φ) ->
(M |= .[]φ).
Proof.
unfold validate_model; simpl; intros.
apply H.
Qed.
Theorem soundness:
forall (G: theory) (φ: modalFormula),
(K; G |-- φ) ->
(G ||= φ).
Proof.
induction 1.
- intros M ?H.
apply exact_deduction with t.
+ apply nth_error_In with i.
assumption.
+ assumption.
- destruct H; destruct H0; simpl.
+ intros M ?H w.
apply Hilbert_Axiom_1_soundness.
+ intros M ?H w.
apply Hilbert_Axiom_2_soundness.
+ intros M ?H w.
apply Hilbert_Axiom_3_soundness.
+ intros M ?H w.
apply Hilbert_Axiom_4_soundness.
+ intros M ?H w.
apply Hilbert_Axiom_5_soundness.
+ intros M ?H w.
apply Hilbert_Axiom_6_soundness.
+ intros M ?H w.
apply Hilbert_Axiom_7_soundness.
+ intros M ?H w.
apply Hilbert_Axiom_8_soundness.
+ intros M ?H w.
apply Hilbert_Axiom_9_soundness.
+ intros M ?H w.
apply Hilbert_Axiom_10_soundness.
+ intros M ?H w.
apply Axiom_K_soundness.
+ intros M ?H w.
apply Axiom_Possibility_soundness.
- intros M ?H w.
apply Modus_Ponens_soundness with f.
split.
+ apply IHdeduction2.
assumption.
+ apply IHdeduction1.
assumption.
- intros M ?H w.
apply Necessitation_soundness.
apply IHdeduction.
assumption.
Qed.
Corollary soundness2:
forall M G w φ,
theoryModal M G ->
(K; G |-- φ) -> M ' w ||- φ.
Proof.
intros.
eapply soundness.
- eassumption.
- assumption.
Qed.