4 Compilare i seguenti campi:
21 Non modificare quanto segue
23 include "nat/minus.ma".
24 definition if_then_else ≝ λT:Type.λe,t,f.match e return λ_.T with [ true ⇒ t | false ⇒ f].
25 notation > "'if' term 19 e 'then' term 19 t 'else' term 90 f" non associative with precedence 19 for @{ 'if_then_else $e $t $f }.
26 notation < "'if' \nbsp term 19 e \nbsp 'then' \nbsp term 19 t \nbsp 'else' \nbsp term 90 f \nbsp" non associative with precedence 19 for @{ 'if_then_else $e $t $f }.
27 interpretation "Formula if_then_else" 'if_then_else e t f = (if_then_else _ e t f).
28 definition max ≝ λn,m. if eqb (n - m) 0 then m else n.
29 definition min ≝ λn,m. if eqb (n - m) 0 then n else m.
34 Il linguaggio delle formule, dove gli atomi sono
35 rapperesentati da un numero naturale
37 inductive Formula : Type ≝
40 | FAtom: nat → Formula
41 | FAnd: Formula → Formula → Formula
42 | FOr: Formula → Formula → Formula
43 | FImpl: Formula → Formula → Formula
44 | FNot: Formula → Formula
47 let rec sem (v: nat → nat) (F: Formula) on F : nat ≝
51 | FAtom n ⇒ min (v n) 1
52 | FAnd F1 F2 ⇒ min (sem v F1) (sem v F2)
53 | FOr F1 F2 ⇒ max (sem v F1) (sem v F2)
54 | FImpl F1 F2 ⇒ max (1 - sem v F1) (sem v F2)
55 | FNot F1 ⇒ 1 - (sem v F1)
62 Non modificare quanto segue.
64 notation < "[[ \nbsp term 19 a \nbsp ]] \nbsp \sub term 90 v" non associative with precedence 90 for @{ 'semantics $v $a }.
65 notation > "[[ term 19 a ]] \sub term 90 v" non associative with precedence 90 for @{ 'semantics $v $a }.
66 notation > "[[ term 19 a ]]_ term 90 v" non associative with precedence 90 for @{ sem $v $a }.
67 interpretation "Semantic of Formula" 'semantics v a = (sem v a).
74 Gli strumenti per la dimostrazione assistita sono corredati da
75 librerie di teoremi già dimostrati. Per portare a termine l'esercitazione
76 sono necessari i seguenti lemmi:
78 * lemma `sem_le_1` : `∀F,v. [[ F ]]_v ≤ 1`
79 * lemma `min_1_1` : `∀x. x ≤ 1 → 1 - (1 - x) = x`
80 * lemma `min_bool` : `∀n. min n 1 = 0 ∨ min n 1 = 1`
81 * lemma `min_max` : `∀F,G,v.min (1 - [[F]]_v) (1 - [[G]]_v) = 1 - max [[F]]_v [[G]]_v`
82 * lemma `max_min` : `∀F,G,v.max (1 - [[F]]_v) (1 - [[G]]_v) = 1 - min [[F]]_v [[G]]_v`
83 * lemma `decidable_eq_nat` : `∀x,y.x = y ∨ x ≠ y`
91 Non modificare quanto segue.
93 lemma sem_bool : ∀F,v. [[ F ]]_v = 0 ∨ [[ F ]]_v = 1. intros; elim F; simplify; [left;reflexivity; |right;reflexivity; |cases (v n);[left;|cases n1;right;]reflexivity; |4,5,6: cases H; cases H1; rewrite > H2; rewrite > H3; simplify; first [ left;reflexivity | right; reflexivity ]. |cases H; rewrite > H1; simplify;[right|left]reflexivity;] qed.
94 lemma min_bool : ∀n. min n 1 = 0 ∨ min n 1 = 1. intros; cases n; [left;reflexivity] cases n1; right; reflexivity; qed.
95 lemma min_max : ∀F,G,v. min (1 - [[F]]_v) (1 - [[G]]_v) = 1 - max [[F]]_v [[G]]_v. intros; cases (sem_bool F v);cases (sem_bool G v); rewrite > H; rewrite >H1; simplify; reflexivity; qed.
96 lemma max_min : ∀F,G,v. max (1 - [[F]]_v) (1 - [[G]]_v) = 1 - min [[F]]_v [[G]]_v. intros; cases (sem_bool F v);cases (sem_bool G v); rewrite > H; rewrite >H1; simplify; reflexivity; qed.
97 lemma min_1_1 : ∀x.x ≤ 1 → 1 - (1 - x) = x. intros; inversion H; intros; destruct; [reflexivity;] rewrite < (le_n_O_to_eq ? H1); reflexivity;qed.
98 lemma sem_le_1 : ∀F,v.[[F]]_v ≤ 1. intros; cases (sem_bool F v); rewrite > H; [apply le_O_n|apply le_n]qed.
99 let rec subst (x:nat) (G: Formula) (F: Formula) on F ≝
102 | FTop ⇒ (*BEGIN*)FTop(*END*)
103 | FAtom n ⇒ if (*BEGIN*)eqb n x(*END*) then (*BEGIN*)G(*END*) else ((*BEGIN*)FAtom n(*END*))
105 | FAnd F1 F2 ⇒ FAnd (subst x G F1) (subst x G F2)
106 | FOr F1 F2 ⇒ FOr (subst x G F1) (subst x G F2)
107 | FImpl F1 F2 ⇒ FImpl (subst x G F1) (subst x G F2)
109 | FNot F ⇒ FNot (subst x G F)
112 notation < "t [ \nbsp term 19 a / term 19 b \nbsp ]" non associative with precedence 19 for @{ 'substitution $b $a $t }.
113 notation > "t [ term 90 a / term 90 b]" non associative with precedence 19 for @{ 'substitution $b $a $t }.
114 interpretation "Substitution for Formula" 'substitution b a t = (subst b a t).
115 definition equiv ≝ λF1,F2. ∀v.[[ F1 ]]_v = [[ F2 ]]_v.
116 notation "hvbox(a \nbsp break mstyle color #0000ff (≡) \nbsp b)" non associative with precedence 45 for @{ 'equivF $a $b }.
117 notation > "a ≡ b" non associative with precedence 50 for @{ equiv $a $b }.
118 interpretation "equivalence for Formulas" 'equivF a b = (equiv a b).
121 ∀F,x,v. [[ if eqb [[FAtom x]]_v 0 then F[FBot/x] else (F[FTop/x]) ]]_v = [[F]]_v.
125 we proceed by induction on F to prove ([[ if eqb [[FAtom x]]_v 0 then F[FBot/x] else (F[FTop/x]) ]]_v = [[F]]_v).
127 the thesis becomes ([[ if eqb [[FAtom x]]_v 0 then FBot[FBot/x] else (FBot[FTop/x]) ]]_v = [[FBot]]_v).
128 we proceed by cases on (eqb [[ FAtom x ]]_v 0)
129 to prove ([[ if eqb [[FAtom x]]_v 0 then FBot[FBot/x] else (FBot[FTop/x]) ]]_v = [[FBot]]_v).
131 the thesis becomes ([[ if true then FBot[FBot/x] else (FBot[FTop/x]) ]]_v = [[FBot]]_v).
132 the thesis becomes ([[ FBot[FBot/x]]]_v = [[FBot]]_v).
133 the thesis becomes ([[ FBot ]]_v = [[FBot]]_v).
134 the thesis becomes (0 = 0).
139 we proceed by cases on (eqb [[ FAtom x ]]_v 0)
140 to prove ([[ if eqb [[FAtom x]]_v 0 then FTop[FBot/x] else (FTop[FTop/x]) ]]_v = [[FTop]]_v).
147 the thesis becomes ([[ if eqb [[ FAtom x ]]_v O then (FAtom n)[ FBot/x ] else (FAtom n[ FTop/x ]) ]]_v = [[ FAtom n ]]_ v).
148 by decidable_eq_nat we proved (n = x ∨ n ≠ x) (H).
149 by sem_bool we proved ([[ FAtom x ]]_v = 0 ∨ [[ FAtom x ]]_v = 1) (H1).
150 we proceed by cases on H to prove
151 ([[ if eqb [[ FAtom x ]]_v O then (FAtom n)[ FBot/x ] else (FAtom n[ FTop/x ]) ]]_v = [[ FAtom n ]]_ v).
152 case Left. (* H2 : n = x *)
153 we proceed by cases on H1 to prove
154 ([[ if eqb [[ FAtom x ]]_v O then (FAtom n)[ FBot/x ] else (FAtom n[ FTop/x ]) ]]_v = [[ FAtom n ]]_ v).
155 case Left. (* H3 : [[ FAtom x ]]_v = 0 *)
157 ([[ if eqb [[ FAtom x ]]_v O then (FAtom n)[ FBot/x ] else (FAtom n[ FTop/x ]) ]]_v)
158 = ([[ if eqb 0 0 then (FAtom n)[ FBot/x ] else (FAtom n[ FTop/x ]) ]]_v) by H3.
159 = ([[ if true then (FAtom n)[ FBot/x ] else (FAtom n[ FTop/x ]) ]]_v).
160 = ([[ (FAtom n)[ FBot/x ] ]]_v).
161 = ([[ if eqb n x then FBot else (FAtom n) ]]_v).
162 = ([[ if eqb n n then FBot else (FAtom n) ]]_v) by H2.
163 = ([[ if true then FBot else (FAtom n) ]]_v) by eqb_n_n.
166 = [[ FAtom x ]]_v by H3.
167 = [[ FAtom n ]]_v by H2.
171 ([[ if eqb [[ FAtom x ]]_v O then (FAtom n)[ FBot/x ] else (FAtom n[ FTop/x ]) ]]_v)
172 = ([[ if eqb 1 0 then (FAtom n)[ FBot/x ] else (FAtom n[ FTop/x ]) ]]_v) by H3.
173 = ([[ if false then (FAtom n)[ FBot/x ] else (FAtom n[ FTop/x ]) ]]_v).
174 = ([[ (FAtom n)[ FTop/x ] ]]_v).
175 = ([[ if eqb n x then FTop else (FAtom n) ]]_v).
176 = ([[ if eqb n n then FTop else (FAtom n) ]]_v) by H2.
177 = ([[ if true then FTop else (FAtom n) ]]_v) by eqb_n_n.
180 = [[ FAtom x ]]_v by H3.
181 = [[ FAtom n ]]_v by H2.
184 we proceed by cases on H1 to prove
185 ([[ if eqb [[ FAtom x ]]_v O then (FAtom n)[ FBot/x ] else (FAtom n[ FTop/x ]) ]]_v = [[ FAtom n ]]_ v).
188 ([[ if eqb [[ FAtom x ]]_v O then (FAtom n)[ FBot/x ] else (FAtom n[ FTop/x ]) ]]_v)
189 = ([[ if eqb 0 O then (FAtom n)[ FBot/x ] else (FAtom n[ FTop/x ]) ]]_v) by H3.
190 = [[ (FAtom n)[ FBot/x ] ]]_v.
191 = [[ if eqb n x then FBot else (FAtom n) ]]_v.
192 = [[ if false then FBot else (FAtom n) ]]_v by (not_eq_to_eqb_false ?? H2).
197 ([[ if eqb [[ FAtom x ]]_v O then (FAtom n)[ FBot/x ] else (FAtom n[ FTop/x ]) ]]_v)
198 = ([[ if eqb 1 O then (FAtom n)[ FBot/x ] else (FAtom n[ FTop/x ]) ]]_v) by H3.
199 = [[ FAtom n[ FTop/x ] ]]_v.
200 = [[ if eqb n x then FTop else (FAtom n) ]]_v.
201 = [[ if false then FTop else (FAtom n) ]]_v by (not_eq_to_eqb_false ?? H2).
206 by induction hypothesis we know ([[ if eqb [[ FAtom x ]]_v O then f[ FBot/x ] else (f[ FTop/x ]) ]]_v = [[ f ]]_v) (H).
208 by induction hypothesis we know ([[ if eqb [[ FAtom x ]]_v O then f1[ FBot/x ] else (f1[ FTop/x ]) ]]_v = [[ f1 ]]_v) (H1).
210 ([[ if eqb [[ FAtom x ]]_v O then ((FAnd f f1)[ FBot/x ]) else ((FAnd f f1)[ FTop/x ]) ]]_v = [[ FAnd f f1 ]]_v).
211 by sem_bool we proved ([[ FAtom x ]]_v = 0 ∨ [[ FAtom x ]]_v = 1) (H2).
212 we proceed by cases on H2 to prove
213 ([[ if eqb [[ FAtom x ]]_v O then ((FAnd f f1)[ FBot/x ]) else ((FAnd f f1)[ FTop/x ]) ]]_v = [[ FAnd f f1 ]]_v).
216 ([[ if eqb 0 O then f[ FBot/x ] else (f[ FTop/x ]) ]]_v = [[ f ]]_v) (H4).
217 using H4 we proved ([[ f[FBot/x ] ]]_v = [[ f ]]_v) (H5).
219 ([[ if eqb 0 O then f1[ FBot/x ] else (f1[ FTop/x ]) ]]_v = [[ f1 ]]_v) (H6).
220 using H6 we proved ([[ f1[FBot/x ] ]]_v = [[ f1 ]]_v) (H7).
222 ([[ if eqb [[ FAtom x ]]_v O then ((FAnd f f1)[ FBot/x ]) else ((FAnd f f1)[ FTop/x ]) ]]_v)
223 = ([[ if eqb 0 O then ((FAnd f f1)[ FBot/x ]) else ((FAnd f f1)[ FTop/x ]) ]]_v) by H3.
224 = ([[ if true then ((FAnd f f1)[ FBot/x ]) else ((FAnd f f1)[ FTop/x ]) ]]_v).
225 = ([[ (FAnd f f1)[ FBot/x ] ]]_v).
226 = ([[ FAnd (f[ FBot/x ]) (f1[ FBot/x ]) ]]_v).
227 = (min [[ f[ FBot/x ] ]]_v [[ f1[ FBot/x ] ]]_v).
228 = (min [[ f ]]_v [[ f1[ FBot/x ] ]]_v) by H5.
229 = (min [[ f ]]_v [[ f1 ]]_v) by H6.
230 = ([[ FAnd f f1 ]]_v).
234 ([[ if eqb 1 O then f[ FBot/x ] else (f[ FTop/x ]) ]]_v = [[ f ]]_v) (H4).
235 using H4 we proved ([[ f[FTop/x ] ]]_v = [[ f ]]_v) (H5).
237 ([[ if eqb 1 O then f1[ FBot/x ] else (f1[ FTop/x ]) ]]_v = [[ f1 ]]_v) (H6).
238 using H6 we proved ([[ f1[FTop/x ] ]]_v = [[ f1 ]]_v) (H7).
240 ([[ if eqb [[ FAtom x ]]_v O then ((FAnd f f1)[ FBot/x ]) else ((FAnd f f1)[ FTop/x ]) ]]_v)
241 = ([[ if eqb 1 O then ((FAnd f f1)[ FBot/x ]) else ((FAnd f f1)[ FTop/x ]) ]]_v) by H3.
242 = ([[ if false then ((FAnd f f1)[ FBot/x ]) else ((FAnd f f1)[ FTop/x ]) ]]_v).
243 = ([[ (FAnd f f1)[ FTop/x ] ]]_v).
244 = ([[ FAnd (f[ FTop/x ]) (f1[ FTop/x ]) ]]_v).
245 = (min [[ f[ FTop/x ] ]]_v [[ f1[ FTop/x ] ]]_v).
246 = (min [[ f ]]_v [[ f1[ FTop/x ] ]]_v) by H5.
247 = (min [[ f ]]_v [[ f1 ]]_v) by H6.
248 = ([[ FAnd f f1 ]]_v).
252 by induction hypothesis we know ([[ if eqb [[ FAtom x ]]_v O then f[ FBot/x ] else (f[ FTop/x ]) ]]_v = [[ f ]]_v) (H).
254 by induction hypothesis we know ([[ if eqb [[ FAtom x ]]_v O then f1[ FBot/x ] else (f1[ FTop/x ]) ]]_v = [[ f1 ]]_v) (H1).
256 ([[ if eqb [[ FAtom x ]]_v O then ((FOr f f1)[ FBot/x ]) else ((FOr f f1)[ FTop/x ]) ]]_v = [[ FOr f f1 ]]_v).
257 by sem_bool we proved ([[ FAtom x ]]_v = 0 ∨ [[ FAtom x ]]_v = 1) (H2).
258 we proceed by cases on H2 to prove
259 ([[ if eqb [[ FAtom x ]]_v O then ((FOr f f1)[ FBot/x ]) else ((FOr f f1)[ FTop/x ]) ]]_v = [[ FOr f f1 ]]_v).
262 ([[ if eqb 0 O then f[ FBot/x ] else (f[ FTop/x ]) ]]_v = [[ f ]]_v) (H4).
263 using H4 we proved ([[ f[FBot/x ] ]]_v = [[ f ]]_v) (H5).
265 ([[ if eqb 0 O then f1[ FBot/x ] else (f1[ FTop/x ]) ]]_v = [[ f1 ]]_v) (H6).
266 using H6 we proved ([[ f1[FBot/x ] ]]_v = [[ f1 ]]_v) (H7).
268 ([[ if eqb [[ FAtom x ]]_v O then ((FOr f f1)[ FBot/x ]) else ((FOr f f1)[ FTop/x ]) ]]_v)
269 = ([[ if eqb 0 O then ((FOr f f1)[ FBot/x ]) else ((FOr f f1)[ FTop/x ]) ]]_v) by H3.
270 = ([[ if true then ((FOr f f1)[ FBot/x ]) else ((FOr f f1)[ FTop/x ]) ]]_v).
271 = ([[ (FOr f f1)[ FBot/x ] ]]_v).
272 = ([[ FOr (f[ FBot/x ]) (f1[ FBot/x ]) ]]_v).
273 = (max [[ f[ FBot/x ] ]]_v [[ f1[ FBot/x ] ]]_v).
274 = (max [[ f ]]_v [[ f1[ FBot/x ] ]]_v) by H5.
275 = (max [[ f ]]_v [[ f1 ]]_v) by H6.
276 = ([[ FOr f f1 ]]_v).
280 ([[ if eqb 1 O then f[ FBot/x ] else (f[ FTop/x ]) ]]_v = [[ f ]]_v) (H4).
281 using H4 we proved ([[ f[FTop/x ] ]]_v = [[ f ]]_v) (H5).
283 ([[ if eqb 1 O then f1[ FBot/x ] else (f1[ FTop/x ]) ]]_v = [[ f1 ]]_v) (H6).
284 using H6 we proved ([[ f1[FTop/x ] ]]_v = [[ f1 ]]_v) (H7).
286 ([[ if eqb [[ FAtom x ]]_v O then ((FOr f f1)[ FBot/x ]) else ((FOr f f1)[ FTop/x ]) ]]_v)
287 = ([[ if eqb 1 O then ((FOr f f1)[ FBot/x ]) else ((FOr f f1)[ FTop/x ]) ]]_v) by H3.
288 = ([[ if false then ((FOr f f1)[ FBot/x ]) else ((FOr f f1)[ FTop/x ]) ]]_v).
289 = ([[ (FOr f f1)[ FTop/x ] ]]_v).
290 = ([[ FOr (f[ FTop/x ]) (f1[ FTop/x ]) ]]_v).
291 = (max [[ f[ FTop/x ] ]]_v [[ f1[ FTop/x ] ]]_v).
292 = (max [[ f ]]_v [[ f1[ FTop/x ] ]]_v) by H5.
293 = (max [[ f ]]_v [[ f1 ]]_v) by H6.
294 = ([[ FOr f f1 ]]_v).
298 by induction hypothesis we know ([[ if eqb [[ FAtom x ]]_v O then f[ FBot/x ] else (f[ FTop/x ]) ]]_v = [[ f ]]_v) (H).
300 by induction hypothesis we know ([[ if eqb [[ FAtom x ]]_v O then f1[ FBot/x ] else (f1[ FTop/x ]) ]]_v = [[ f1 ]]_v) (H1).
302 ([[ if eqb [[ FAtom x ]]_v O then ((FImpl f f1)[ FBot/x ]) else ((FImpl f f1)[ FTop/x ]) ]]_v = [[ FImpl f f1 ]]_v).
303 by sem_bool we proved ([[ FAtom x ]]_v = 0 ∨ [[ FAtom x ]]_v = 1) (H2).
304 we proceed by cases on H2 to prove
305 ([[ if eqb [[ FAtom x ]]_v O then ((FImpl f f1)[ FBot/x ]) else ((FImpl f f1)[ FTop/x ]) ]]_v = [[ FImpl f f1 ]]_v).
308 ([[ if eqb 0 O then f[ FBot/x ] else (f[ FTop/x ]) ]]_v = [[ f ]]_v) (H4).
309 using H4 we proved ([[ f[FBot/x ] ]]_v = [[ f ]]_v) (H5).
311 ([[ if eqb 0 O then f1[ FBot/x ] else (f1[ FTop/x ]) ]]_v = [[ f1 ]]_v) (H6).
312 using H6 we proved ([[ f1[FBot/x ] ]]_v = [[ f1 ]]_v) (H7).
314 ([[ if eqb [[ FAtom x ]]_v O then ((FImpl f f1)[ FBot/x ]) else ((FImpl f f1)[ FTop/x ]) ]]_v)
315 = ([[ if eqb 0 O then ((FImpl f f1)[ FBot/x ]) else ((FImpl f f1)[ FTop/x ]) ]]_v) by H3.
316 = ([[ if true then ((FImpl f f1)[ FBot/x ]) else ((FImpl f f1)[ FTop/x ]) ]]_v).
317 = ([[ (FImpl f f1)[ FBot/x ] ]]_v).
318 = ([[ FImpl (f[ FBot/x ]) (f1[ FBot/x ]) ]]_v).
319 = (max (1 - [[ f[ FBot/x ] ]]_v) [[ f1[ FBot/x ] ]]_v).
320 = (max (1 - [[ f ]]_v) [[ f1[ FBot/x ] ]]_v) by H5.
321 = (max (1 - [[ f ]]_v) [[ f1 ]]_v) by H6.
322 = ([[ FImpl f f1 ]]_v).
326 ([[ if eqb 1 O then f[ FBot/x ] else (f[ FTop/x ]) ]]_v = [[ f ]]_v) (H4).
327 using H4 we proved ([[ f[FTop/x ] ]]_v = [[ f ]]_v) (H5).
329 ([[ if eqb 1 O then f1[ FBot/x ] else (f1[ FTop/x ]) ]]_v = [[ f1 ]]_v) (H6).
330 using H6 we proved ([[ f1[FTop/x ] ]]_v = [[ f1 ]]_v) (H7).
332 ([[ if eqb [[ FAtom x ]]_v O then ((FImpl f f1)[ FBot/x ]) else ((FImpl f f1)[ FTop/x ]) ]]_v)
333 = ([[ if eqb 1 O then ((FImpl f f1)[ FBot/x ]) else ((FImpl f f1)[ FTop/x ]) ]]_v) by H3.
334 = ([[ if false then ((FImpl f f1)[ FBot/x ]) else ((FImpl f f1)[ FTop/x ]) ]]_v).
335 = ([[ (FImpl f f1)[ FTop/x ] ]]_v).
336 = ([[ FImpl (f[ FTop/x ]) (f1[ FTop/x ]) ]]_v).
337 = (max (1 - [[ f[ FTop/x ] ]]_v) [[ f1[ FTop/x ] ]]_v).
338 = (max (1 - [[ f ]]_v) [[ f1[ FTop/x ] ]]_v) by H5.
339 = (max (1 - [[ f ]]_v) [[ f1 ]]_v) by H6.
340 = ([[ FImpl f f1 ]]_v).
344 by induction hypothesis we know ([[ if eqb [[ FAtom x ]]_v O then f[ FBot/x ] else (f[ FTop/x ]) ]]_v = [[ f ]]_v) (H).
346 ([[ if eqb [[ FAtom x ]]_v O then ((FNot f)[ FBot/x ]) else ((FNot f)[ FTop/x ]) ]]_v = [[ FNot f ]]_v).
347 by sem_bool we proved ([[ FAtom x ]]_v = 0 ∨ [[ FAtom x ]]_v = 1) (H2).
348 we proceed by cases on H2 to prove
349 ([[ if eqb [[ FAtom x ]]_v O then ((FNot f)[ FBot/x ]) else ((FNot f)[ FTop/x ]) ]]_v = [[ FNot f ]]_v).
352 ([[ if eqb 0 O then f[ FBot/x ] else (f[ FTop/x ]) ]]_v = [[ f ]]_v) (H4).
353 using H4 we proved ([[ f[FBot/x ] ]]_v = [[ f ]]_v) (H5).
355 ([[ if eqb [[ FAtom x ]]_v O then ((FNot f)[ FBot/x ]) else ((FNot f)[ FTop/x ]) ]]_v)
356 = ([[ if eqb 0 O then ((FNot f)[ FBot/x ]) else ((FNot f)[ FTop/x ]) ]]_v) by H1.
357 = ([[ if true then ((FNot f)[ FBot/x ]) else ((FNot f)[ FTop/x ]) ]]_v).
358 = ([[ (FNot f)[ FBot/x ] ]]_v).
359 = ([[ FNot (f[ FBot/x ]) ]]_v).
360 change with (1 - [[ f[ FBot/x ] ]]_v = [[ FNot f ]]_v).
361 = (1 - [[ f ]]_v) by H5.
362 change with ([[ FNot f ]]_v = [[ FNot f ]]_v).
366 ([[ if eqb 1 O then f[ FBot/x ] else (f[ FTop/x ]) ]]_v = [[ f ]]_v) (H4).
367 using H4 we proved ([[ f[FTop/x ] ]]_v = [[ f ]]_v) (H5).
369 ([[ if eqb [[ FAtom x ]]_v O then ((FNot f)[ FBot/x ]) else ((FNot f)[ FTop/x ]) ]]_v)
370 = ([[ if eqb 1 O then ((FNot f)[ FBot/x ]) else ((FNot f)[ FTop/x ]) ]]_v) by H1.
371 = ([[ if false then ((FNot f)[ FBot/x ]) else ((FNot f)[ FTop/x ]) ]]_v).
372 = ([[ (FNot f)[ FTop/x ] ]]_v).
373 = ([[ FNot (f[ FTop/x ]) ]]_v).
374 change with (1 - [[ f[ FTop/x ] ]]_v = [[ FNot f ]]_v) .
375 = (1 - [[ f ]]_v) by H5.
376 change with ([[ FNot f ]]_v = [[ FNot f ]]_v).