Theory AOT_PLM

1(*<*)
2theory AOT_PLM
3  imports AOT_Axioms
4begin
5(*>*)
6
7section‹The Deductive System PLM›
8text‹\label{PLM: 9}›
9
10(* constrain sledgehammer to the abstraction layer *)
11unbundle AOT_no_atp
12
13subsection‹Primitive Rule of PLM: Modus Ponens›
14text‹\label{PLM: 9.1}›
15
16AOT_theorem "modus-ponens":
17  assumes φ and φ  ψ
18  shows ψ
19  (* NOTE: semantics needed *)
20  using assms by (simp add: AOT_sem_imp)
21lemmas MP = "modus-ponens"
22
23subsection‹(Modally Strict) Proofs and Derivations›
24text‹\label{PLM: 9.2}›
25
26AOT_theorem "non-con-thm-thm":
27  assumes  φ
28  shows  φ
29  using assms by simp
30
31AOT_theorem "vdash-properties:1[1]":
32  assumes φ  Λ
33  shows  φ
34  (* NOTE: semantics needed *)
35  using assms unfolding AOT_model_act_axiom_def by blast
36
37text‹Convenience attribute for instantiating modally-fragile axioms.›
38attribute_setup act_axiom_inst =
39  Scan.succeed (Thm.rule_attribute []
40    (K (fn thm => thm RS @{thm "vdash-properties:1[1]"})))
41  "Instantiate modally fragile axiom as modally fragile theorem."
42lemmas "act_axiom_inst" = "vdash-properties:1[1]"
43declare "act_axiom_inst"[AOT_inst AOT_model_act_axiom]
44
45AOT_theorem "vdash-properties:1[2]":
46  assumes φ  Λ
47  shows  φ
48  (* NOTE: semantics needed *)
49  using assms unfolding AOT_model_axiom_def by blast
50
51text‹Convenience attribute for instantiating modally-strict axioms.›
52attribute_setup axiom_inst =
53  Scan.succeed (Thm.rule_attribute []
54    (K (fn thm => thm RS @{thm "vdash-properties:1[2]"})))
55  "Instantiate axiom as theorem."
56lemmas "axiom_inst" = "vdash-properties:1[2]"
57declare "axiom_inst"[AOT_inst AOT_model_axiom]
58
59text‹Convenience methods and theorem sets for applying "cqt:2".›
60method cqt_2_lambda_inst_prover =
61  (fast intro: AOT_instance_of_cqt_2_intro)
62method "cqt:2[lambda]" =
63  (rule "cqt:2[lambda]"[axiom_inst]; cqt_2_lambda_inst_prover)
64lemmas "cqt:2" =
65  "cqt:2[const_var]"[axiom_inst] "cqt:2[lambda]"[axiom_inst]
66  AOT_instance_of_cqt_2_intro
67method "cqt:2" = (safe intro!: "cqt:2")
68
69AOT_theorem "vdash-properties:3":
70  assumes  φ
71  shows Γ  φ
72  using assms by blast
73
74AOT_theorem "vdash-properties:5":
75  assumes Γ1  φ and Γ2  φ  ψ
76  shows Γ1, Γ2  ψ
77  using MP assms by blast
78
79AOT_theorem "vdash-properties:6":
80  assumes φ and φ  ψ
81  shows ψ
82  using MP assms by blast
83
84AOT_theorem "vdash-properties:8":
85  assumes Γ  φ and φ  ψ
86  shows Γ  ψ
87  using assms by argo
88
89AOT_theorem "vdash-properties:9":
90  assumes φ
91  shows ψ  φ
92  using MP "pl:1"[axiom_inst] assms by blast
93
94AOT_theorem "vdash-properties:10":
95  assumes φ  ψ and φ
96  shows ψ
97  using MP assms by blast
98lemmas "→E" = "vdash-properties:10"
99declare "→E"[AOT_elim AOT_imp]
100
101subsection‹Two Fundamental Metarules: GEN and RN›
102text‹\label{PLM: 9.3}›
103
104AOT_theorem "rule-gen":
105  assumes for arbitrary α: φ{α}
106  shows α φ{α}
107  (* NOTE: semantics needed *)
108  using assms by (metis AOT_var_of_term_inverse AOT_sem_denotes AOT_sem_forall)
109lemmas GEN = "rule-gen"
110
111AOT_theorem "RN[prem]":
112  assumes Γ  φ
113  shows Γ  φ
114  by (meson AOT_sem_box assms image_iff) (* NOTE: semantics needed *)
115AOT_theorem RN:
116  assumes  φ
117  shows φ
118  using "RN[prem]" assms by blast
119
120subsection‹The Inferential Role of Definitions›
121text‹\label{PLM: 9.4}›
122
123AOT_axiom "df-rules-formulas[1]":
124  assumes φ df ψ
125  shows φ  ψ
126  (* NOTE: semantics needed *)
127  using assms
128  by (auto simp: assms AOT_model_axiomI AOT_model_equiv_def AOT_sem_imp)
129AOT_axiom "df-rules-formulas[2]":
130  assumes φ df ψ
131  shows ψ  φ
132  (* NOTE: semantics needed *)
133  using assms
134  by (auto simp: AOT_model_axiomI AOT_model_equiv_def AOT_sem_imp)
135(* NOTE: for convenience also state the above as regular theorems *)
136AOT_theorem "df-rules-formulas[3]":
137  assumes φ df ψ
138  shows φ  ψ
139  using "df-rules-formulas[1]"[axiom_inst, OF assms].
140AOT_theorem "df-rules-formulas[4]":
141  assumes φ df ψ
142  shows ψ  φ
143  using "df-rules-formulas[2]"[axiom_inst, OF assms].
144
145
146AOT_axiom "df-rules-terms[1]":
147  assumes τ{α1...αn} =df σ{α1...αn}
148  shows (σ{τ1...τn}  τ{τ1...τn} = σ{τ1...τn}) &
149         (¬σ{τ1...τn}  ¬τ{τ1...τn})
150  (* NOTE: semantics needed *)
151  using assms
152  by (simp add: AOT_model_axiomI AOT_sem_conj AOT_sem_imp AOT_sem_eq
153                AOT_sem_not AOT_sem_denotes AOT_model_id_def)
154AOT_axiom "df-rules-terms[2]":
155  assumes τ =df σ
156  shows (σ  τ = σ) & (¬σ  ¬τ)
157  by (metis "df-rules-terms[1]" case_unit_Unity assms)
158(* NOTE: for convenience also state the above as regular theorems *)
159AOT_theorem "df-rules-terms[3]":
160  assumes τ{α1...αn} =df σ{α1...αn}
161  shows (σ{τ1...τn}  τ{τ1...τn} = σ{τ1...τn}) &
162         (¬σ{τ1...τn}  ¬τ{τ1...τn})
163  using "df-rules-terms[1]"[axiom_inst, OF assms].
164AOT_theorem "df-rules-terms[4]":
165  assumes τ =df σ
166  shows (σ  τ = σ) & (¬σ  ¬τ)
167  using "df-rules-terms[2]"[axiom_inst, OF assms].
168
169subsection‹The Theory of Negations and Conditionals›
170text‹\label{PLM: 9.5}›
171
172AOT_theorem "if-p-then-p": φ  φ
173  by (meson "pl:1"[axiom_inst] "pl:2"[axiom_inst] MP)
174
175AOT_theorem "deduction-theorem":
176  assumes φ  ψ
177  shows φ  ψ
178  (* NOTE: semantics needed *)
179  using assms by (simp add: AOT_sem_imp)
180lemmas CP = "deduction-theorem"
181lemmas "→I" = "deduction-theorem"
182
183AOT_theorem "ded-thm-cor:1":
184  assumes Γ1  φ  ψ and Γ2  ψ  χ
185  shows Γ1, Γ2  φ  χ
186  using "→E" "→I" assms by blast
187AOT_theorem "ded-thm-cor:2":
188  assumes Γ1  φ  (ψ  χ) and Γ2  ψ
189  shows Γ1, Γ2  φ  χ
190  using "→E" "→I" assms by blast
191
192AOT_theorem "ded-thm-cor:3":
193  assumes φ  ψ and ψ  χ
194  shows φ  χ
195  using "→E" "→I" assms by blast
196declare "ded-thm-cor:3"[trans]
197AOT_theorem "ded-thm-cor:4":
198  assumes φ  (ψ  χ) and ψ
199  shows φ  χ
200  using "→E" "→I" assms by blast
201
202lemmas "Hypothetical Syllogism" = "ded-thm-cor:3"
203
204AOT_theorem "useful-tautologies:1": ¬¬φ  φ
205  by (metis "pl:3"[axiom_inst] "→I" "Hypothetical Syllogism")
206
207AOT_theorem "useful-tautologies:2": φ  ¬¬φ
208  by (metis "pl:3"[axiom_inst] "→I" "ded-thm-cor:4")
209AOT_theorem "useful-tautologies:3": ¬φ  (φ  ψ)
210  by (meson "ded-thm-cor:4" "pl:3"[axiom_inst] "→I")
211AOT_theorem "useful-tautologies:4": (¬ψ  ¬φ)  (φ  ψ)
212  by (meson "pl:3"[axiom_inst] "Hypothetical Syllogism" "→I")
213AOT_theorem "useful-tautologies:5": (φ  ψ)  (¬ψ  ¬φ)
214  by (metis "useful-tautologies:4" "Hypothetical Syllogism" "→I")
215
216AOT_theorem "useful-tautologies:6": (φ  ¬ψ)  (ψ  ¬φ)
217  by (metis "→I" MP "useful-tautologies:4")
218
219AOT_theorem "useful-tautologies:7": (¬φ  ψ)  (¬ψ  φ)
220  by (metis "→I" MP "useful-tautologies:3" "useful-tautologies:5")
221
222AOT_theorem "useful-tautologies:8": φ  (¬ψ  ¬(φ  ψ))
223  by (metis "→I" MP "useful-tautologies:5")
224
225AOT_theorem "useful-tautologies:9": (φ  ψ)  ((¬φ  ψ)  ψ)
226  by (metis "→I" MP "useful-tautologies:6")
227
228AOT_theorem "useful-tautologies:10": (φ  ¬ψ)  ((φ  ψ)  ¬φ)
229  by (metis "→I" MP "pl:3"[axiom_inst])
230
231AOT_theorem "dn-i-e:1":
232  assumes φ
233  shows ¬¬φ
234  using MP "useful-tautologies:2" assms by blast
235lemmas "¬¬I" = "dn-i-e:1"
236AOT_theorem "dn-i-e:2":
237  assumes ¬¬φ
238  shows φ
239  using MP "useful-tautologies:1" assms by blast
240lemmas "¬¬E" = "dn-i-e:2"
241
242AOT_theorem "modus-tollens:1":
243  assumes φ  ψ and ¬ψ
244  shows ¬φ
245  using MP "useful-tautologies:5" assms by blast
246AOT_theorem "modus-tollens:2":
247  assumes φ  ¬ψ and ψ
248  shows ¬φ
249  using "¬¬I" "modus-tollens:1" assms by blast
250lemmas MT = "modus-tollens:1" "modus-tollens:2"
251
252AOT_theorem "contraposition:1[1]":
253  assumes φ  ψ
254  shows ¬ψ  ¬φ
255  using "→I" MT(1) assms by blast
256AOT_theorem "contraposition:1[2]":
257  assumes ¬ψ  ¬φ
258  shows φ  ψ
259  using "→I" "¬¬E" MT(2) assms by blast
260
261AOT_theorem "contraposition:2":
262  assumes φ  ¬ψ
263  shows ψ  ¬φ
264  using "→I" MT(2) assms by blast
265
266AOT_theorem "reductio-aa:1":
267  assumes ¬φ  ¬ψ and ¬φ  ψ
268  shows φ
269  using "→I" "¬¬E" MT(2) assms by blast
270AOT_theorem "reductio-aa:2":
271  assumes φ  ¬ψ and φ  ψ
272  shows ¬φ
273  using "reductio-aa:1" assms by blast
274lemmas "RAA" = "reductio-aa:1" "reductio-aa:2"
275
276AOT_theorem "exc-mid": φ  ¬φ
277  using "df-rules-formulas[4]" "if-p-then-p" MP
278        "conventions:2" by blast
279
280AOT_theorem "non-contradiction": ¬(φ & ¬φ)
281  using "df-rules-formulas[3]" MT(2) "useful-tautologies:2"
282        "conventions:1" by blast
283
284AOT_theorem "con-dis-taut:1": (φ & ψ)  φ
285  by (meson "→I" "df-rules-formulas[3]" MP RAA(1) "conventions:1")
286AOT_theorem "con-dis-taut:2": (φ & ψ)  ψ
287  by (metis "→I" "df-rules-formulas[3]" MT(2) RAA(2)
288            "¬¬E" "conventions:1")
289lemmas "Conjunction Simplification" = "con-dis-taut:1" "con-dis-taut:2"
290
291AOT_theorem "con-dis-taut:3": φ  (φ  ψ)
292  by (meson "contraposition:1[2]" "df-rules-formulas[4]"
293            MP "→I" "conventions:2")
294AOT_theorem "con-dis-taut:4": ψ  (φ  ψ)
295  using "Hypothetical Syllogism" "df-rules-formulas[4]"
296        "pl:1"[axiom_inst] "conventions:2" by blast
297lemmas "Disjunction Addition" = "con-dis-taut:3" "con-dis-taut:4"
298
299AOT_theorem "con-dis-taut:5": φ  (ψ  (φ & ψ))
300  by (metis "contraposition:2" "Hypothetical Syllogism" "→I"
301            "df-rules-formulas[4]" "conventions:1")
302lemmas Adjunction = "con-dis-taut:5"
303
304AOT_theorem "con-dis-taut:6": (φ & φ)  φ
305  by (metis Adjunction "→I" "df-rules-formulas[4]" MP
306            "Conjunction Simplification"(1) "conventions:3")
307lemmas "Idempotence of &" = "con-dis-taut:6"
308
309AOT_theorem "con-dis-taut:7": (φ  φ)  φ
310proof -
311  {
312    AOT_assume φ  φ
313    AOT_hence ¬φ  φ
314      using "conventions:2"[THEN "df-rules-formulas[3]"] MP by blast
315    AOT_hence φ using "if-p-then-p" RAA(1) MP by blast
316  }
317  moreover {
318    AOT_assume φ
319    AOT_hence φ  φ using "Disjunction Addition"(1) MP by blast
320  }
321  ultimately AOT_show (φ  φ)  φ
322    using "conventions:3"[THEN "df-rules-formulas[4]"] MP
323    by (metis Adjunction "→I")
324qed
325lemmas "Idempotence of ∨" = "con-dis-taut:7"
326
327AOT_theorem "con-dis-i-e:1":
328  assumes φ and ψ
329  shows φ & ψ
330  using Adjunction MP assms by blast
331lemmas "&I" = "con-dis-i-e:1"
332declare "&I"[AOT_intro]
333
334AOT_theorem "con-dis-i-e:2:a":
335  assumes φ & ψ
336  shows φ
337  using "Conjunction Simplification"(1) MP assms by blast
338AOT_theorem "con-dis-i-e:2:b":
339  assumes φ & ψ
340  shows ψ
341  using "Conjunction Simplification"(2) MP assms by blast
342lemmas "&E" = "con-dis-i-e:2:a" "con-dis-i-e:2:b"
343declare "&E"(1)[AOT_elim AOT_conj]
344declare "&E"(2)[AOT_elim AOT_conj]
345
346AOT_theorem "con-dis-i-e:3:a":
347  assumes φ
348  shows φ  ψ
349  using "Disjunction Addition"(1) MP assms by blast
350AOT_theorem "con-dis-i-e:3:b":
351  assumes ψ
352  shows φ  ψ
353  using "Disjunction Addition"(2) MP assms by blast
354AOT_theorem "con-dis-i-e:3:c":
355  assumes φ  ψ and φ  χ and ψ  Θ
356  shows χ  Θ
357  by (metis "con-dis-i-e:3:a" "Disjunction Addition"(2)
358            "df-rules-formulas[3]" MT(1) RAA(1)
359            "conventions:2" assms)
360lemmas "∨I" = "con-dis-i-e:3:a" "con-dis-i-e:3:b" "con-dis-i-e:3:c"
361
362AOT_theorem "con-dis-i-e:4:a":
363  assumes φ  ψ and φ  χ and ψ  χ
364  shows χ
365  by (metis MP RAA(2) "df-rules-formulas[3]" "conventions:2" assms)
366AOT_theorem "con-dis-i-e:4:b":
367  assumes φ  ψ and ¬φ
368  shows ψ
369  using "con-dis-i-e:4:a" RAA(1) "→I" assms by blast
370AOT_theorem "con-dis-i-e:4:c":
371  assumes φ  ψ and ¬ψ
372  shows φ
373  using "con-dis-i-e:4:a" RAA(1) "→I" assms by blast
374lemmas "∨E" = "con-dis-i-e:4:a" "con-dis-i-e:4:b" "con-dis-i-e:4:c"
375
376AOT_theorem "raa-cor:1":
377  assumes ¬φ  ψ & ¬ψ
378  shows φ
379  using "&E" "∨E"(3) "∨I"(2) RAA(2) assms by blast
380AOT_theorem "raa-cor:2":
381  assumes φ  ψ & ¬ψ
382  shows ¬φ
383  using "raa-cor:1" assms by blast
384AOT_theorem "raa-cor:3":
385  assumes φ and ¬ψ  ¬φ
386  shows ψ
387  using RAA assms by blast
388AOT_theorem "raa-cor:4":
389  assumes ¬φ and ¬ψ  φ
390  shows ψ
391  using RAA assms by blast
392AOT_theorem "raa-cor:5":
393  assumes φ and ψ  ¬φ
394  shows ¬ψ
395  using RAA assms by blast
396AOT_theorem "raa-cor:6":
397  assumes ¬φ and ψ  φ
398  shows ¬ψ
399  using RAA assms by blast
400
401AOT_theorem "oth-class-taut:1:a": (φ  ψ)  ¬(φ & ¬ψ)
402  by (rule "conventions:3"[THEN "df-rules-formulas[4]", THEN "→E"])
403     (metis "&E" "&I" "raa-cor:3" "→I" MP)
404AOT_theorem "oth-class-taut:1:b": ¬(φ  ψ)  (φ & ¬ψ)
405  by (rule "conventions:3"[THEN "df-rules-formulas[4]", THEN "→E"])
406     (metis "&E" "&I" "raa-cor:3" "→I" MP)
407AOT_theorem "oth-class-taut:1:c": (φ  ψ)  (¬φ  ψ)
408  by (rule "conventions:3"[THEN "df-rules-formulas[4]", THEN "→E"])
409     (metis "&I" "∨I"(1, 2) "∨E"(3) "→I" MP "raa-cor:1")
410
411AOT_theorem "oth-class-taut:2:a": (φ & ψ)  (ψ & φ)
412  by (rule "conventions:3"[THEN "df-rules-formulas[4]", THEN "→E"])
413     (meson "&I" "&E" "→I")
414lemmas "Commutativity of &" = "oth-class-taut:2:a"
415AOT_theorem "oth-class-taut:2:b": (φ & (ψ & χ))  ((φ & ψ) & χ)
416  by (rule "conventions:3"[THEN "df-rules-formulas[4]", THEN "→E"])
417     (metis "&I" "&E" "→I")
418lemmas "Associativity of &" = "oth-class-taut:2:b"
419AOT_theorem "oth-class-taut:2:c": (φ  ψ)  (ψ  φ)
420  by (rule "conventions:3"[THEN "df-rules-formulas[4]", THEN "→E"])
421     (metis "&I" "∨I"(1, 2) "∨E"(1) "→I")
422lemmas "Commutativity of ∨" = "oth-class-taut:2:c"
423AOT_theorem "oth-class-taut:2:d": (φ  (ψ  χ))  ((φ  ψ)  χ)
424  by (rule "conventions:3"[THEN "df-rules-formulas[4]", THEN "→E"])
425     (metis "&I" "∨I"(1, 2) "∨E"(1) "→I")
426lemmas "Associativity of ∨" = "oth-class-taut:2:d"
427AOT_theorem "oth-class-taut:2:e": (φ  ψ)  (ψ  φ)
428  by (rule "conventions:3"[THEN "df-rules-formulas[4]", THEN "→E"]; rule "&I";
429      metis "&I" "df-rules-formulas[4]" "conventions:3" "&E"
430            "Hypothetical Syllogism" "→I" "df-rules-formulas[3]")
431lemmas "Commutativity of ≡" = "oth-class-taut:2:e"
432AOT_theorem "oth-class-taut:2:f": (φ  (ψ  χ))  ((φ  ψ)  χ)
433  using "conventions:3"[THEN "df-rules-formulas[4]"]
434        "conventions:3"[THEN "df-rules-formulas[3]"]
435        "→I" "→E" "&E" "&I"
436  by metis
437lemmas "Associativity of ≡" = "oth-class-taut:2:f"
438
439AOT_theorem "oth-class-taut:3:a": φ  φ
440  using "&I" "vdash-properties:6" "if-p-then-p"
441        "df-rules-formulas[4]" "conventions:3" by blast
442AOT_theorem "oth-class-taut:3:b": φ  ¬¬φ
443  using "&I" "useful-tautologies:1" "useful-tautologies:2" "→E"
444        "df-rules-formulas[4]" "conventions:3" by blast
445AOT_theorem "oth-class-taut:3:c": ¬(φ  ¬φ)
446  by (metis "&E" "→E" RAA "df-rules-formulas[3]" "conventions:3")
447
448AOT_theorem "oth-class-taut:4:a": (φ  ψ)  ((ψ  χ)  (φ  χ))
449  by (metis "→E" "→I")
450AOT_theorem "oth-class-taut:4:b": (φ  ψ)  (¬φ  ¬ψ)
451  using "conventions:3"[THEN "df-rules-formulas[4]"]
452        "conventions:3"[THEN "df-rules-formulas[3]"]
453        "→I" "→E" "&E" "&I" RAA by metis
454AOT_theorem "oth-class-taut:4:c": (φ  ψ)  ((φ  χ)  (ψ  χ))
455  using "conventions:3"[THEN "df-rules-formulas[4]"]
456        "conventions:3"[THEN "df-rules-formulas[3]"]
457        "→I" "→E" "&E" "&I" by metis
458AOT_theorem "oth-class-taut:4:d": (φ  ψ)  ((χ  φ)  (χ  ψ))
459  using "conventions:3"[THEN "df-rules-formulas[4]"]
460        "conventions:3"[THEN "df-rules-formulas[3]"]
461        "→I" "→E" "&E" "&I" by metis
462AOT_theorem "oth-class-taut:4:e": (φ  ψ)  ((φ & χ)  (ψ & χ))
463  using "conventions:3"[THEN "df-rules-formulas[4]"]
464        "conventions:3"[THEN "df-rules-formulas[3]"]
465        "→I" "→E" "&E" "&I" by metis
466AOT_theorem "oth-class-taut:4:f": (φ  ψ)  ((χ & φ)  (χ & ψ))
467  using "conventions:3"[THEN "df-rules-formulas[4]"]
468        "conventions:3"[THEN "df-rules-formulas[3]"]
469        "→I" "→E" "&E" "&I" by metis
470AOT_theorem "oth-class-taut:4:g": (φ  ψ)  ((φ & ψ)  (¬φ & ¬ψ))
471proof(safe intro!: "conventions:3"[THEN "df-rules-formulas[4]", THEN "→E"]
472                   "&I" "→I"
473           dest!: "conventions:3"[THEN "df-rules-formulas[3]", THEN "→E"])
474  AOT_show φ & ψ  (¬φ & ¬ψ) if (φ  ψ) & (ψ  φ)
475    using "&E" "∨I" "→E" "&I" "raa-cor:1" "→I" "∨E" that by metis
476next
477  AOT_show ψ if φ & ψ  (¬φ & ¬ψ) and φ
478    using that "∨E" "&E" "raa-cor:3" by blast
479next
480  AOT_show φ if φ & ψ  (¬φ & ¬ψ) and ψ
481    using that "∨E" "&E" "raa-cor:3" by blast
482qed
483AOT_theorem "oth-class-taut:4:h": ¬(φ  ψ)  ((φ & ¬ψ)  (¬φ & ψ))
484proof (safe intro!: "conventions:3"[THEN "df-rules-formulas[4]", THEN "→E"]
485                    "&I" "→I")
486  AOT_show φ & ¬ψ  (¬φ & ψ) if ¬(φ  ψ)
487    by (metis that "&I" "∨I"(1, 2) "→I" MT(1) "df-rules-formulas[4]"
488              "raa-cor:3" "conventions:3")
489next
490  AOT_show ¬(φ  ψ) if φ & ¬ψ  (¬φ & ψ)
491    by (metis that "&E" "∨E"(2) "→E" "df-rules-formulas[3]"
492              "raa-cor:3" "conventions:3")
493qed
494AOT_theorem "oth-class-taut:5:a": (φ & ψ)  ¬(¬φ  ¬ψ)
495  using "conventions:3"[THEN "df-rules-formulas[4]"]
496        "→I" "→E" "&E" "&I" "∨I" "∨E" RAA by metis
497AOT_theorem "oth-class-taut:5:b": (φ  ψ)  ¬(¬φ & ¬ψ)
498  using "conventions:3"[THEN "df-rules-formulas[4]"]
499        "→I" "→E" "&E" "&I" "∨I" "∨E" RAA by metis
500AOT_theorem "oth-class-taut:5:c": ¬(φ & ψ)  (¬φ  ¬ψ)
501  using "conventions:3"[THEN "df-rules-formulas[4]"]
502        "→I" "→E" "&E" "&I" "∨I" "∨E" RAA by metis
503AOT_theorem "oth-class-taut:5:d": ¬(φ  ψ)  (¬φ & ¬ψ)
504  using "conventions:3"[THEN "df-rules-formulas[4]"]
505        "→I" "→E" "&E" "&I" "∨I" "∨E" RAA by metis
506
507lemmas DeMorgan = "oth-class-taut:5:c" "oth-class-taut:5:d"
508
509AOT_theorem "oth-class-taut:6:a":
510  (φ & (ψ  χ))  ((φ & ψ)  (φ & χ))
511  using "conventions:3"[THEN "df-rules-formulas[4]"]
512        "→I" "→E" "&E" "&I" "∨I" "∨E" RAA by metis
513AOT_theorem "oth-class-taut:6:b":
514  (φ  (ψ & χ))  ((φ  ψ) & (φ  χ))
515  using "conventions:3"[THEN "df-rules-formulas[4]"]
516        "→I" "→E" "&E" "&I" "∨I" "∨E" RAA by metis
517
518AOT_theorem "oth-class-taut:7:a": ((φ & ψ)  χ)  (φ  (ψ  χ))
519  by (metis "&I" "→E" "→I")
520lemmas Exportation = "oth-class-taut:7:a"
521AOT_theorem "oth-class-taut:7:b": (φ  (ψ χ))  ((φ & ψ)  χ)
522  by (metis "&E" "→E" "→I")
523lemmas Importation = "oth-class-taut:7:b"
524
525AOT_theorem "oth-class-taut:8:a":
526  (φ  (ψ  χ))  (ψ  (φ  χ))
527  using "conventions:3"[THEN "df-rules-formulas[4]"] "→I" "→E" "&E" "&I"
528  by metis
529lemmas Permutation = "oth-class-taut:8:a"
530AOT_theorem "oth-class-taut:8:b":
531  (φ  ψ)  ((φ  χ)  (φ  (ψ & χ)))
532  by (metis "&I" "→E" "→I")
533lemmas Composition = "oth-class-taut:8:b"
534AOT_theorem "oth-class-taut:8:c":
535  (φ  χ)  ((ψ  χ)  ((φ  ψ)  χ))
536  by (metis "∨E"(2) "→E" "→I" RAA(1))
537AOT_theorem "oth-class-taut:8:d":
538  ((φ  ψ) & (χ  Θ))  ((φ & χ)  (ψ & Θ))
539  by (metis "&E" "&I" "→E" "→I")
540lemmas "Double Composition" = "oth-class-taut:8:d"
541AOT_theorem "oth-class-taut:8:e":
542  ((φ & ψ)  (φ & χ))  (φ  (ψ  χ))
543  by (metis "conventions:3"[THEN "df-rules-formulas[4]"]
544            "conventions:3"[THEN "df-rules-formulas[3]"]
545            "→I" "→E" "&E" "&I")
546AOT_theorem "oth-class-taut:8:f":
547  ((φ & ψ)  (χ & ψ))  (ψ  (φ  χ))
548  by (metis "conventions:3"[THEN "df-rules-formulas[4]"]
549            "conventions:3"[THEN "df-rules-formulas[3]"]
550            "→I" "→E" "&E" "&I")
551AOT_theorem "oth-class-taut:8:g":
552  (ψ  χ)  ((φ  ψ)  (φ  χ))
553  by (metis "conventions:3"[THEN "df-rules-formulas[4]"]
554            "conventions:3"[THEN "df-rules-formulas[3]"]
555            "→I" "→E" "&E" "&I" "∨I" "∨E"(1))
556AOT_theorem "oth-class-taut:8:h":
557  (ψ  χ)  ((ψ  φ)  (χ  φ))
558  by (metis "conventions:3"[THEN "df-rules-formulas[4]"]
559            "conventions:3"[THEN "df-rules-formulas[3]"]
560            "→I" "→E" "&E" "&I" "∨I" "∨E"(1))
561AOT_theorem "oth-class-taut:8:i":
562  (φ  (ψ & χ))  (ψ  (φ  χ))
563  by (metis "conventions:3"[THEN "df-rules-formulas[4]"]
564            "conventions:3"[THEN "df-rules-formulas[3]"]
565            "→I" "→E" "&E" "&I")
566
567AOT_theorem "intro-elim:1":
568  assumes φ  ψ and φ  χ and ψ  Θ
569  shows χ  Θ
570  by (metis assms "∨I"(1, 2) "∨E"(1) "→I" "→E" "&E"(1)
571            "conventions:3"[THEN "df-rules-formulas[3]"])
572
573AOT_theorem "intro-elim:2":
574  assumes φ  ψ and ψ  φ
575  shows φ  ψ
576  by (meson "&I" "conventions:3" "df-rules-formulas[4]" MP assms)
577lemmas "≡I" = "intro-elim:2"
578
579AOT_theorem "intro-elim:3:a":
580  assumes φ  ψ and φ
581  shows ψ
582  by (metis "∨I"(1) "→I" "∨E"(1) "intro-elim:1" assms)
583AOT_theorem "intro-elim:3:b":
584  assumes φ  ψ and ψ
585  shows φ
586  using "intro-elim:3:a" "Commutativity of ≡" assms by blast
587AOT_theorem "intro-elim:3:c":
588  assumes φ  ψ and ¬φ
589  shows ¬ψ
590  using "intro-elim:3:b" "raa-cor:3" assms by blast
591AOT_theorem "intro-elim:3:d":
592  assumes φ  ψ and ¬ψ
593  shows ¬φ
594  using "intro-elim:3:a" "raa-cor:3" assms by blast
595AOT_theorem "intro-elim:3:e":
596  assumes φ  ψ and ψ  χ
597  shows φ  χ
598  by (metis "≡I" "→I" "intro-elim:3:a" "intro-elim:3:b" assms)
599declare "intro-elim:3:e"[trans]
600AOT_theorem "intro-elim:3:f":
601  assumes φ  ψ and φ  χ
602  shows χ  ψ
603  by (metis "≡I" "→I" "intro-elim:3:a" "intro-elim:3:b" assms)
604lemmas "≡E" = "intro-elim:3:a" "intro-elim:3:b" "intro-elim:3:c"
605              "intro-elim:3:d" "intro-elim:3:e" "intro-elim:3:f"
606declare "≡E"(1)[AOT_elim AOT_equiv]
607declare "≡E"(2)[AOT_elim AOT_equiv]
608
609declare "Commutativity of ≡"[THEN "≡E"(1), sym]
610
611AOT_theorem "rule-eq-df:1":
612  assumes φ df ψ
613  shows φ  ψ
614  by (simp add: "≡I" "df-rules-formulas[3]" "df-rules-formulas[4]" assms)
615lemmas "≡Df" = "rule-eq-df:1"
616AOT_theorem "rule-eq-df:2":
617  assumes φ df ψ and φ
618  shows ψ
619  using "≡Df" "≡E"(1) assms by blast
620lemmas "dfE" = "rule-eq-df:2"
621declare "dfE"[AOT_elim AOT_model_equiv_def]
622
623AOT_theorem "rule-eq-df:3":
624  assumes φ df ψ and ψ
625  shows φ
626  using "≡Df" "≡E"(2) assms by blast
627lemmas "dfI" = "rule-eq-df:3"
628declare "dfI"[AOT_elim AOT_model_equiv_def]
629
630AOT_theorem  "df-simplify:1":
631  assumes φ  (ψ & χ) and ψ
632  shows φ  χ
633  by (metis "&E"(2) "&I" "≡E"(1, 2) "≡I" "→I" assms)
634(* Note: this is a slight variation from PLM *)
635AOT_theorem  "df-simplify:2":
636  assumes φ  (ψ & χ) and χ
637  shows φ  ψ
638  by (metis "&E"(1) "&I" "≡E"(1, 2) "≡I" "→I" assms)
639lemmas "≡S" = "df-simplify:1"  "df-simplify:2"
640
641subsection‹The Theory of Quantification›
642text‹\label{PLM: 9.6}›
643
644AOT_theorem "rule-ui:1":
645  assumes α φ{α} and τ
646  shows φ{τ}
647  using "→E" "cqt:1"[axiom_inst] assms by blast
648AOT_theorem "rule-ui:2[const_var]":
649  assumes α φ{α}
650  shows φ{β}
651  by (simp add: "rule-ui:1" "cqt:2[const_var]"[axiom_inst] assms)
652AOT_theorem "rule-ui:2[lambda]":
653  assumes F φ{F} and INSTANCE_OF_CQT_2(ψ)
654  shows φ{ν1...νn ψ{ν1...νn}]}
655  by (simp add: "rule-ui:1" "cqt:2[lambda]"[axiom_inst] assms)
656AOT_theorem "rule-ui:3":
657  assumes α φ{α}
658  shows φ{α}
659  by (simp add: "rule-ui:2[const_var]" assms)
660lemmas "∀E" = "rule-ui:1" "rule-ui:2[const_var]"
661              "rule-ui:2[lambda]" "rule-ui:3"
662declare "∀E"(1)[AOT_elim AOT_forall]
663
664AOT_theorem "cqt-orig:1[const_var]": α φ{α}  φ{β}
665  by (simp add: "∀E"(2) "→I")
666AOT_theorem "cqt-orig:1[lambda]":
667  assumes INSTANCE_OF_CQT_2(ψ)
668  shows F φ{F}  φ{ν1...νn ψ{ν1...νn}]}
669  by (simp add: "∀E"(3) "→I" assms)
670AOT_theorem "cqt-orig:2": α (φ  ψ{α})  (φ  α ψ{α})
671  by (metis "→I" GEN "vdash-properties:6" "∀E"(4))
672AOT_theorem "cqt-orig:3": α φ{α}  φ{α}
673  using "cqt-orig:1[const_var]".
674
675AOT_theorem universal:
676  assumes for arbitrary β: φ{β}
677  shows α φ{α}
678  using GEN assms .
679lemmas "∀I" = universal
680
681(* Generalized mechanism for ∀I followed by ∀E *)
682ML683fun get_instantiated_allI' ctxt match thm = let
684val trm = Thm.concl_of thm
685val trm =
686  case trm of (@{const Trueprop} $ (@{const AOT_model_valid_in} $ _ $ x)) => x
687  | _ => raise Term.TERM ("Expected simple theorem.", [trm])
688fun extractVars (Const (const_nameAOT_term_of_var, _) $ Var v) =
689    (if match v then [Var v] else [])
690  | extractVars (t1 $ t2) = extractVars t1 @ extractVars t2
691  | extractVars (Abs (_, _, t)) = extractVars t
692  | extractVars _ = []
693val vars = extractVars trm
694val vars = fold Term.add_vars vars []
695val var = hd vars
696val trmty =
697  case (snd var) of (Type (type_nameAOT_var, [t])) => (t)
698  | _ => raise Term.TYPE ("Expected variable type.", [snd var], [Var var])
699val trm = Abs (Term.string_of_vname (fst var), trmty, Term.abstract_over (
700      Const (const_nameAOT_term_of_var, Type ("fun", [snd var, trmty]))
701       $ Var var, trm))
702val trm = Thm.cterm_of (Context.proof_of ctxt) trm
703val ty = hd (Term.add_tvars (Thm.prop_of @{thm "∀I"}) [])
704val typ = Thm.ctyp_of (Context.proof_of ctxt) trmty
705val allthm = Drule.instantiate_normalize (TVars.make [(ty, typ)], Vars.empty) @{thm "∀I"}
706val phi = hd (Term.add_vars (Thm.prop_of allthm) [])
707val allthm = Drule.instantiate_normalize (TVars.empty, Vars.make [(phi,trm)]) allthm
708val allthm = Thm.put_name_hint ("unvarify_"^fst (fst var)) allthm
709in
710allthm
711end
712fun get_instantiated_allI ctxt varname thm = get_instantiated_allI' ctxt (fn v => fst (fst v) = fst varname) thm
713
714
715local_setupAOT_add_varify_rule (const_nameAOT_var.AOT_term_of_var,
716fn ctxt => (
717  fn (Var arg) => (fn thm => SOME (get_instantiated_allI' ctxt (fn var => var = arg) thm))
718   | x => K NONE
719))
720
721attribute_setup "∀I" =
722  Scan.lift (Scan.repeat1 Args.var) >> (fn args => Thm.rule_attribute []
723  (fn ctxt => fn thm => fold (fn arg => fn thm =>
724    thm RS get_instantiated_allI ctxt arg thm) args thm))
725  "Quantify over a variable in a theorem using GEN."
726
727attribute_setup "unvarify" =
728  Scan.lift (Scan.repeat1 Args.var) >> (fn args => Thm.rule_attribute []
729  (fn ctxt => fn thm =>
730    let
731      fun get_inst_allI arg thm = thm RS get_instantiated_allI ctxt arg thm
732      val thm = fold get_inst_allI args thm
733      val thm = fold (K (fn thm => thm RS @{thm "∀E"(1)})) args thm
734    in
735     Object_Logic.rulify (Context.proof_of ctxt) thm
736    end))
737  "Generalize a statement about variables to a statement about denoting terms."
738
739(* Note: rereplace-lem does not apply to the embedding *)
740
741AOT_theorem "cqt-basic:1": αβ φ{α,β}  βα φ{α,β}
742  by (metis "≡I" "∀E"(2) "∀I" "→I")
743
744AOT_theorem "cqt-basic:2":
745  α(φ{α}  ψ{α})  (α(φ{α}  ψ{α}) & α(ψ{α}  φ{α}))
746proof (rule "≡I"; rule "→I")
747  AOT_assume α(φ{α}  ψ{α})
748  AOT_hence φ{α}  ψ{α} for α using "∀E"(2) by blast
749  AOT_hence φ{α}  ψ{α} and ψ{α}  φ{α} for α
750    using "≡E"(1,2) "→I" by blast+
751  AOT_thus α(φ{α}  ψ{α}) & α(ψ{α}  φ{α})
752    by (auto intro: "&I" "∀I")
753next
754  AOT_assume α(φ{α}  ψ{α}) & α(ψ{α}  φ{α})
755  AOT_hence φ{α}  ψ{α} and ψ{α}  φ{α} for α
756    using "∀E"(2) "&E" by blast+
757  AOT_hence φ{α}  ψ{α} for α
758    using "≡I" by blast
759  AOT_thus α(φ{α}  ψ{α}) by (auto intro: "∀I")
760qed
761
762AOT_theorem "cqt-basic:3": α(φ{α}  ψ{α})  (α φ{α}  α ψ{α})
763proof(rule "→I")
764  AOT_assume α(φ{α}  ψ{α})
765  AOT_hence 1: φ{α}  ψ{α} for α using "∀E"(2) by blast
766  {
767    AOT_assume α φ{α}
768    AOT_hence α ψ{α} using 1 "∀I" "∀E"(4) "≡E" by metis
769  }
770  moreover {
771    AOT_assume α ψ{α}
772    AOT_hence α φ{α} using 1 "∀I" "∀E"(4) "≡E" by metis
773  }
774  ultimately AOT_show α φ{α}  α ψ{α}
775    using "≡I" "→I" by auto
776qed
777
778AOT_theorem "cqt-basic:4": α(φ{α} & ψ{α})  (α φ{α} & α ψ{α})
779proof(safe intro!: "≡I" "→I")
780  AOT_assume 0: α(φ{α} & ψ{α})
781  AOT_have φ{α} and ψ{α} for α using "∀E"(2) 0 "&E" by blast+
782  AOT_thus α φ{α} & α ψ{α}
783    by (auto intro: "∀I" "&I")
784next
785  AOT_assume 1: α φ{α} & α ψ{α}
786  AOT_hence φ{α} and ψ{α} for α
787    using "∀E" "&E" apply blast
788    using "1" "con-dis-i-e:2:b" "rule-ui:3" by blast
789  AOT_thus α (φ{α} & ψ{α})
790    using "&I" "∀I" by meson
791qed
792
793AOT_theorem "cqt-basic:5": (α1...∀αn(φ{α1...αn}))  φ{α1...αn}
794  using "cqt-orig:3" by blast
795
796AOT_theorem "cqt-basic:6": αα φ{α}  α φ{α}
797  by (meson "≡I" "→I" GEN "cqt-orig:1[const_var]")
798
799AOT_theorem "cqt-basic:7": (φ  α ψ{α})  α(φ  ψ{α})
800  by (metis "→I" "vdash-properties:6" "rule-ui:3" "≡I" GEN)
801
802AOT_theorem "cqt-basic:8": (α φ{α}  α ψ{α})  α (φ{α}  ψ{α})
803  by (simp add: "∨I"(3) "→I" GEN "cqt-orig:1[const_var]")
804
805AOT_theorem "cqt-basic:9":
806  (α (φ{α}  ψ{α}) & α (ψ{α}  χ{α}))  α(φ{α}  χ{α})
807proof -
808  {
809    AOT_assume α (φ{α}  ψ{α})
810    moreover AOT_assume α (ψ{α}  χ{α})
811    ultimately AOT_have φ{α}  ψ{α} and ψ{α}  χ{α} for α
812      using "∀E" by blast+
813    AOT_hence φ{α}  χ{α} for α by (metis "→E" "→I")
814    AOT_hence α(φ{α}  χ{α}) using "∀I" by fast
815  }
816  thus ?thesis using "&I" "→I" "&E" by meson
817qed
818
819AOT_theorem "cqt-basic:10":
820  (α(φ{α}  ψ{α}) & α(ψ{α}  χ{α}))  α (φ{α}  χ{α})
821proof(rule "→I"; rule "∀I")
822  fix β
823  AOT_assume α(φ{α}  ψ{α}) & α(ψ{α}  χ{α})
824  AOT_hence φ{β}  ψ{β} and ψ{β}  χ{β} using "&E" "∀E" by blast+
825  AOT_thus φ{β}  χ{β} using "≡I" "≡E" by blast
826qed
827
828AOT_theorem "cqt-basic:11": α(φ{α}  ψ{α})  α (ψ{α}  φ{α})
829proof (rule "≡I"; rule "→I")
830  AOT_assume 0: α(φ{α}  ψ{α})
831  {
832    fix α
833    AOT_have φ{α}  ψ{α} using 0 "∀E" by blast
834    AOT_hence ψ{α}  φ{α} using "≡I" "≡E" "→I" "→E" by metis
835  }
836  AOT_thus α(ψ{α}  φ{α}) using "∀I" by fast
837next
838  AOT_assume 0: α(ψ{α}  φ{α})
839  {
840    fix α
841    AOT_have ψ{α}  φ{α} using 0 "∀E" by blast
842    AOT_hence φ{α}  ψ{α} using "≡I" "≡E" "→I" "→E" by metis
843  }
844  AOT_thus α(φ{α}  ψ{α}) using "∀I" by fast
845qed
846
847AOT_theorem "cqt-basic:12": α φ{α}  α (ψ{α}  φ{α})
848  by (simp add: "∀E"(2) "→I" GEN)
849
850AOT_theorem "cqt-basic:13": α φ{α}  β φ{β}
851  using "≡I" "→I" by blast
852
853AOT_theorem "cqt-basic:14":
854  (α1...∀αn (φ{α1...αn}  ψ{α1...αn})) 
855   ((α1...∀αn φ{α1...αn})  (α1...∀αn ψ{α1...αn}))
856  using "cqt:3"[axiom_inst] by auto
857
858AOT_theorem "cqt-basic:15":
859  (α1...∀αn (φ  ψ{α1...αn}))  (φ  (α1...∀αn ψ{α1...αn}))
860  using "cqt-orig:2" by auto
861
862AOT_theorem "universal-cor":
863  assumes for arbitrary β: φ{β}
864  shows α φ{α}
865  using GEN assms .
866
867AOT_theorem "existential:1":
868  assumes φ{τ} and τ
869  shows α φ{α}
870proof(rule "raa-cor:1")
871  AOT_assume ¬α φ{α}
872  AOT_hence α ¬φ{α}
873    using "dfI" "conventions:4" RAA "&I" by blast
874  AOT_hence ¬φ{τ} using assms(2) "∀E"(1) "→E" by blast
875  AOT_thus φ{τ} & ¬φ{τ} using assms(1) "&I" by blast
876qed
877
878AOT_theorem "existential:2[const_var]":
879  assumes φ{β}
880  shows α φ{α}
881  using "existential:1" "cqt:2[const_var]"[axiom_inst] assms by blast
882
883AOT_theorem "existential:2[lambda]":
884  assumes φ{ν1...νn ψ{ν1...νn}]} and INSTANCE_OF_CQT_2(ψ)
885  shows α φ{α}
886  using "existential:1" "cqt:2[lambda]"[axiom_inst] assms by blast
887lemmas "∃I" = "existential:1" "existential:2[const_var]"
888              "existential:2[lambda]" 
889
890AOT_theorem "instantiation":
891  assumes for arbitrary β: φ{β}  ψ and α φ{α}
892  shows ψ
893  by (metis (no_types, lifting) "dfE" GEN "raa-cor:3" "conventions:4" assms)
894lemmas "∃E" = "instantiation"
895lemmas "∃E'" = "∃E"[rotated]
896declare "∃E'"[AOT_elim AOT_exists]
897
898AOT_theorem "cqt-further:1": α φ{α}  α φ{α}
899  using "∀E"(4) "∃I"(2) "→I" by metis
900
901AOT_theorem "cqt-further:2": ¬α φ{α}  α ¬φ{α}
902  using "∀I" "∃I"(2) "→I" RAA by metis
903
904AOT_theorem "cqt-further:3": α φ{α}  ¬α ¬φ{α}
905  using "∀E"(4) "∃E" "→I" RAA
906  by (metis "cqt-further:2" "≡I" "modus-tollens:1")
907
908AOT_theorem "cqt-further:4": ¬α φ{α}  α ¬φ{α}
909  using "∀I" "∃I"(2)"→I" RAA by metis
910
911AOT_theorem "cqt-further:5": α (φ{α} & ψ{α})  (α φ{α} & α ψ{α})
912  by (metis (no_types, lifting) "&E" "&I" "∃E" "∃I"(2) "→I")
913
914AOT_theorem "cqt-further:6": α (φ{α}  ψ{α})  (α φ{α}  α ψ{α})
915  by (metis (mono_tags, lifting) "∃E" "∃I"(2) "∨E"(3) "∨I"(1, 2) "→I" RAA(2))
916
917(* NOTE: vacuous in the embedding *)
918AOT_theorem "cqt-further:7": α φ{α}  β φ{β}
919  by (simp add: "oth-class-taut:3:a")
920
921AOT_theorem "cqt-further:8":
922  (α φ{α} & α ψ{α})  α (φ{α}  ψ{α})
923  by (metis (mono_tags, lifting) "&E" "≡I" "∀E"(2) "→I" GEN)
924
925AOT_theorem "cqt-further:9":
926  (¬α φ{α} & ¬α ψ{α})  α (φ{α}  ψ{α})
927  by (metis (mono_tags, lifting) "&E" "≡I" "∃I"(2) "→I" GEN "raa-cor:4")
928
929AOT_theorem "cqt-further:10":
930  (α φ{α} & ¬α ψ{α})  ¬α (φ{α}  ψ{α})
931proof(rule "→I"; rule "raa-cor:2")
932  AOT_assume 0: α φ{α} & ¬α ψ{α}
933  then AOT_obtain α where φ{α} using "∃E" "&E"(1) by metis
934  moreover AOT_assume α (φ{α}  ψ{α})
935  ultimately AOT_have ψ{α} using "∀E"(4) "≡E"(1) by blast
936  AOT_hence α ψ{α} using "∃I" by blast
937  AOT_thus α ψ{α} & ¬α ψ{α} using 0 "&E"(2) "&I" by blast
938qed
939
940AOT_theorem "cqt-further:11": αβ φ{α,β}  βα φ{α,β}
941  using "≡I" "→I" "∃I"(2) "∃E" by metis
942
943subsection‹Logical Existence, Identity, and Truth›
944text‹\label{PLM: 9.7}›
945
946AOT_theorem "log-prop-prop:1":  φ]
947  using "cqt:2[lambda0]"[axiom_inst] by auto
948
949AOT_theorem "log-prop-prop:2": φ
950  by (rule "dfI"[OF "existence:3"]) "cqt:2[lambda]"
951declare "log-prop-prop:2"[AOT_intro]
952
953AOT_theorem "exist-nec": τ  τ
954proof -
955  AOT_have β β
956    by (simp add: GEN RN "cqt:2[const_var]"[axiom_inst])
957  AOT_thus τ  τ
958    using "cqt:1"[axiom_inst] "→E" by blast
959qed
960
961(* TODO: replace this mechanism by a "proof by types" command *)
962class AOT_Term_id = AOT_Term +
963  assumes "t=t-proper:1"[AOT]: [v  τ = τ'  τ]
964      and "t=t-proper:2"[AOT]: [v  τ = τ'  τ']
965
966instance κ :: AOT_Term_id
967proof
968  AOT_modally_strict {
969    AOT_show κ = κ'  κ for κ κ'
970    proof(rule "→I")
971      AOT_assume κ = κ'
972      AOT_hence O!κ  A!κ
973        by (rule "∨I"(3)[OF "dfE"[OF "identity:1"]])
974           (meson "→I" "∨I"(1) "&E"(1))+
975      AOT_thus κ
976        by (rule "∨E"(1))
977           (metis "cqt:5:a"[axiom_inst] "→I" "→E" "&E"(2))+
978    qed
979  }
980next
981  AOT_modally_strict {
982    AOT_show κ = κ'  κ' for κ κ'
983    proof(rule "→I")
984      AOT_assume κ = κ'
985      AOT_hence O!κ'  A!κ'
986        by (rule "∨I"(3)[OF "dfE"[OF "identity:1"]])
987           (meson "→I" "∨I" "&E")+
988      AOT_thus κ'
989        by (rule "∨E"(1))
990           (metis "cqt:5:a"[axiom_inst] "→I" "→E" "&E"(2))+
991    qed
992  }
993qed
994
995instance rel :: (AOT_κs) AOT_Term_id
996proof
997  AOT_modally_strict {
998    AOT_show Π = Π'  Π for Π Π' :: <'a>
999    proof(rule "→I")
1000      AOT_assume Π = Π'
1001      AOT_thus Π using "dfE"[OF "identity:3"[of Π Π']] "&E" by blast
1002    qed
1003  }
1004next
1005  AOT_modally_strict {
1006    AOT_show Π = Π'  Π' for Π Π' :: <'a>
1007    proof(rule "→I")
1008      AOT_assume Π = Π'
1009      AOT_thus Π' using "dfE"[OF "identity:3"[of Π Π']] "&E" by blast
1010    qed
1011  }
1012qed
1013
1014instance 𝗈 :: AOT_Term_id
1015proof
1016  AOT_modally_strict {
1017    fix φ ψ
1018    AOT_show φ = ψ  φ
1019    proof(rule "→I")
1020      AOT_assume φ = ψ
1021      AOT_thus φ using "dfE"[OF "identity:4"[of φ ψ]] "&E" by blast
1022    qed
1023  }
1024next
1025  AOT_modally_strict {
1026    fix φ ψ
1027    AOT_show φ = ψ  ψ
1028    proof(rule "→I")
1029      AOT_assume φ = ψ
1030      AOT_thus ψ using "dfE"[OF "identity:4"[of φ ψ]] "&E" by blast
1031    qed
1032  }
1033qed
1034
1035instance prod :: (AOT_Term_id, AOT_Term_id) AOT_Term_id
1036proof
1037  AOT_modally_strict {
1038    fix τ τ' :: 'a×'b
1039    AOT_show τ = τ'  τ
1040    proof (induct τ; induct τ'; rule "→I")
1041      fix τ1 τ1' :: 'a and τ2  τ2' :: 'b
1042      AOT_assume «(τ1, τ2)» = «(τ1', τ2')»
1043      AOT_hence (τ1 = τ1') & (τ2 = τ2') by (metis "dfE" tuple_identity_1)
1044      AOT_hence τ1 and τ2
1045        using "t=t-proper:1" "&E" "vdash-properties:10" by blast+
1046      AOT_thus «(τ1, τ2)» by (metis "dfI" "&I" tuple_denotes)
1047    qed
1048  }
1049next
1050  AOT_modally_strict {
1051    fix τ τ' :: 'a×'b
1052    AOT_show τ = τ'  τ'
1053    proof (induct τ; induct τ'; rule "→I")
1054      fix τ1 τ1' :: 'a and τ2  τ2' :: 'b
1055      AOT_assume «(τ1, τ2)» = «(τ1', τ2')»
1056      AOT_hence (τ1 = τ1') & (τ2 = τ2') by (metis "dfE" tuple_identity_1)
1057      AOT_hence τ1' and τ2'
1058        using "t=t-proper:2" "&E" "vdash-properties:10" by blast+
1059      AOT_thus «(τ1', τ2')» by (metis "dfI" "&I" tuple_denotes)
1060    qed
1061  }
1062qed
1063
1064(* This is the end of the "proof by types" and
1065   makes the results available on new theorems *)
1066AOT_register_type_constraints
1067  Term: _::AOT_Term_id _::AOT_Term_id
1068AOT_register_type_constraints
1069  Individual: κ _::{AOT_κs, AOT_Term_id}
1070AOT_register_type_constraints
1071  Relation: <_::{AOT_κs, AOT_Term_id}>
1072
1073AOT_theorem "id-rel-nec-equiv:1":
1074  Π = Π'  x1...∀xn ([Π]x1...xn  [Π']x1...xn)
1075proof(rule "→I")
1076  AOT_assume assumption: Π = Π'
1077  AOT_hence Π and Π'
1078    using "t=t-proper:1" "t=t-proper:2" MP by blast+
1079  moreover AOT_have FG (F = G  ((x1...∀xn ([F]x1...xn  [F]x1...xn)) 
1080                                     x1...∀xn ([F]x1...xn  [G]x1...xn)))
1081    apply (rule GEN)+ using "l-identity"[axiom_inst] by force
1082  ultimately AOT_have Π = Π'  ((x1...∀xn ([Π]x1...xn  [Π]x1...xn)) 
1083                                   x1...∀xn ([Π]x1...xn  [Π']x1...xn))
1084    using "∀E"(1) by blast
1085  AOT_hence (x1...∀xn ([Π]x1...xn  [Π]x1...xn)) 
1086             x1...∀xn ([Π]x1...xn  [Π']x1...xn)
1087    using assumption "→E" by blast
1088  moreover AOT_have x1...∀xn ([Π]x1...xn  [Π]x1...xn)
1089    by (simp add: RN "oth-class-taut:3:a" "universal-cor")
1090  ultimately AOT_show x1...∀xn ([Π]x1...xn  [Π']x1...xn)
1091    using "→E" by blast
1092qed
1093
1094AOT_theorem "id-rel-nec-equiv:2": φ = ψ  (φ  ψ)
1095proof(rule "→I")
1096  AOT_assume assumption: φ = ψ
1097  AOT_hence φ and ψ
1098    using "t=t-proper:1" "t=t-proper:2" MP by blast+
1099  moreover AOT_have pq (p = q  (((p  p)  (p  q))))
1100    apply (rule GEN)+ using "l-identity"[axiom_inst] by force
1101  ultimately AOT_have φ = ψ  ((φ  φ)  (φ  ψ))
1102    using "∀E"(1) by blast
1103  AOT_hence (φ  φ)  (φ  ψ)
1104    using assumption "→E" by blast
1105  moreover AOT_have (φ  φ)
1106    by (simp add: RN "oth-class-taut:3:a" "universal-cor")
1107  ultimately AOT_show (φ  ψ)
1108    using "→E" by blast
1109qed
1110
1111AOT_theorem "rule=E":
1112  assumes φ{τ} and τ = σ
1113  shows φ{σ}
1114proof -
1115  AOT_have τ and σ
1116    using assms(2) "t=t-proper:1" "t=t-proper:2" "→E" by blast+
1117  moreover AOT_have αβ(α = β  (φ{α}  φ{β}))
1118    apply (rule GEN)+ using "l-identity"[axiom_inst] by blast
1119  ultimately AOT_have τ = σ  (φ{τ}  φ{σ})
1120    using "∀E"(1) by blast
1121  AOT_thus φ{σ} using assms "→E" by blast
1122qed
1123lemmas "rule=E'" = "rule=E"[rotated]
1124declare "rule=E'"[AOT_elim AOT_eq]
1125
1126AOT_theorem "propositions-lemma:1":  φ] = φ
1127proof -
1128  AOT_have φ by (simp add: "log-prop-prop:2")
1129  moreover AOT_have p  p] = p
1130    using "lambda-predicates:3[zero]"[axiom_inst] "∀I" by fast
1131  ultimately AOT_show  φ] = φ
1132    using "∀E" by blast
1133qed
1134
1135AOT_theorem "propositions-lemma:2":  φ]  φ
1136proof -
1137  AOT_have  φ]   φ] by (simp add: "oth-class-taut:3:a")
1138  AOT_thus  φ]  φ using "propositions-lemma:1" "rule=E" by blast
1139qed
1140
1141text‹propositions-lemma:3 through propositions-lemma:5 hold implicitly›
1142
1143AOT_theorem "propositions-lemma:6": (φ  ψ)  ( φ]   ψ])
1144  by (metis "≡E"(1) "≡E"(5) "Associativity of ≡" "propositions-lemma:2")
1145
1146text‹dr-alphabetic-rules holds implicitly›
1147
1148AOT_theorem "oa-exist:1": O!
1149proof -
1150  AOT_have x [E!]x] by "cqt:2[lambda]"
1151  AOT_hence 1: O! = x [E!]x]
1152    using "df-rules-terms[4]"[OF "oa:1", THEN "&E"(1)] "→E" by blast
1153  AOT_show O! using "t=t-proper:1"[THEN "→E", OF 1] by simp
1154qed
1155
1156AOT_theorem "oa-exist:2": A!
1157proof -
1158  AOT_have x ¬[E!]x] by "cqt:2[lambda]"
1159  AOT_hence 1: A! = x ¬[E!]x]
1160    using "df-rules-terms[4]"[OF "oa:2", THEN "&E"(1)] "→E" by blast
1161  AOT_show A! using "t=t-proper:1"[THEN "→E", OF 1] by simp
1162qed
1163
1164AOT_theorem "oa-exist:3": O!x  A!x
1165proof(rule "raa-cor:1")
1166  AOT_assume ¬(O!x  A!x)
1167  AOT_hence A: ¬O!x and B: ¬A!x
1168    using "Disjunction Addition"(1) "modus-tollens:1"
1169          "∨I"(2) "raa-cor:5" by blast+
1170  AOT_have C: O! = x [E!]x]
1171    by (rule "df-rules-terms[4]"[OF "oa:1", THEN "&E"(1), THEN "→E"]) "cqt:2"
1172  AOT_have D: A! = x ¬[E!]x]
1173    by (rule "df-rules-terms[4]"[OF "oa:2", THEN "&E"(1), THEN "→E"]) "cqt:2"
1174  AOT_have E: ¬x [E!]x]x
1175    using A C "rule=E" by fast
1176  AOT_have F: ¬x ¬[E!]x]x
1177    using B D "rule=E" by fast
1178  AOT_have G: x [E!]x]x  [E!]x
1179    by (rule "lambda-predicates:2"[axiom_inst, THEN "→E"]) "cqt:2"
1180  AOT_have H: x ¬[E!]x]x  ¬[E!]x
1181    by (rule "lambda-predicates:2"[axiom_inst, THEN "→E"]) "cqt:2"
1182  AOT_show ¬[E!]x & ¬¬[E!]x using G E "≡E" H F "≡E" "&I" by metis
1183qed
1184
1185AOT_theorem "p-identity-thm2:1": F = G  x(x[F]  x[G])
1186proof -
1187  AOT_have F = G  F & G & x(x[F]  x[G])
1188    using "identity:2" "df-rules-formulas[3]" "df-rules-formulas[4]"
1189          "→E" "&E" "≡I" "→I" by blast
1190  moreover AOT_have F and G
1191    by (auto simp: "cqt:2[const_var]"[axiom_inst])
1192  ultimately AOT_show F = G  x(x[F]  x[G])
1193    using "≡S"(1) "&I" by blast
1194qed
1195
1196AOT_theorem "p-identity-thm2:2[2]":
1197  F = G  y1(x [F]xy1] = x [G]xy1] & x [F]y1x] = x [G]y1x])
1198proof -
1199  AOT_have F = G  F & G &
1200              y1(x [F]xy1] = x [G]xy1] & x [F]y1x] = x [G]y1x])
1201    using "identity:3[2]" "df-rules-formulas[3]" "df-rules-formulas[4]"
1202          "→E" "&E" "≡I" "→I" by blast
1203  moreover AOT_have F and G
1204    by (auto simp: "cqt:2[const_var]"[axiom_inst])
1205  ultimately show ?thesis
1206    using "≡S"(1) "&I" by blast
1207qed
1208    
1209AOT_theorem "p-identity-thm2:2[3]":
1210  F = G  y1y2(x [F]xy1y2] = x [G]xy1y2] &
1211                  x [F]y1xy2] = x [G]y1xy2] &
1212                  x [F]y1y2x] = x [G]y1y2x])
1213proof -
1214  AOT_have F = G  F & G & y1y2(x [F]xy1y2] = x [G]xy1y2] &
1215                                     x [F]y1xy2] = x [G]y1xy2] &
1216                                     x [F]y1y2x] = x [G]y1y2x])
1217    using "identity:3[3]" "df-rules-formulas[3]" "df-rules-formulas[4]"
1218          "→E" "&E" "≡I" "→I" by blast
1219  moreover AOT_have F and G
1220    by (auto simp: "cqt:2[const_var]"[axiom_inst])
1221  ultimately show ?thesis
1222    using "≡S"(1) "&I" by blast
1223qed
1224
1225AOT_theorem "p-identity-thm2:2[4]":
1226  F = G  y1y2y3(x [F]xy1y2y3] = x [G]xy1y2y3] &
1227                     x [F]y1xy2y3] = x [G]y1xy2y3] &
1228                     x [F]y1y2xy3] = x [G]y1y2xy3] &
1229                     x [F]y1y2y3x] = x [G]y1y2y3x])
1230proof -
1231  AOT_have F = G  F & G & y1y2y3(x [F]xy1y2y3] = x [G]xy1y2y3] &
1232                                        x [F]y1xy2y3] = x [G]y1xy2y3] &
1233                                        x [F]y1y2xy3] = x [G]y1y2xy3] &
1234                                        x [F]y1y2y3x] = x [G]y1y2y3x])
1235    using "identity:3[4]" "df-rules-formulas[3]" "df-rules-formulas[4]"
1236          "→E" "&E" "≡I" "→I" by blast
1237  moreover AOT_have F and G
1238    by (auto simp: "cqt:2[const_var]"[axiom_inst])
1239  ultimately show ?thesis
1240    using "≡S"(1) "&I" by blast
1241qed
1242
1243AOT_theorem "p-identity-thm2:2":
1244  F = G  x1...∀xn «AOT_sem_proj_id x1xn (λ τ . «[F]τ») (λ τ . «[G]τ»)»
1245proof -
1246  AOT_have F = G  F & G &
1247              x1...∀xn «AOT_sem_proj_id x1xn (λ τ . «[F]τ») (λ τ . «[G]τ»)»
1248    using "identity:3" "df-rules-formulas[3]" "df-rules-formulas[4]"
1249          "→E" "&E" "≡I" "→I" by blast
1250  moreover AOT_have F and G
1251    by (auto simp: "cqt:2[const_var]"[axiom_inst])
1252  ultimately show ?thesis
1253    using "≡S"(1) "&I" by blast
1254qed
1255
1256AOT_theorem "p-identity-thm2:3":
1257  p = q  x p] = x q]
1258proof -
1259  AOT_have p = q  p & q & x p] = x q]
1260    using "identity:4" "df-rules-formulas[3]" "df-rules-formulas[4]"
1261          "→E" "&E" "≡I" "→I" by blast
1262  moreover AOT_have p and q
1263    by (auto simp: "cqt:2[const_var]"[axiom_inst])
1264  ultimately show ?thesis
1265    using "≡S"(1) "&I" by blast
1266qed
1267
1268class AOT_Term_id_2 = AOT_Term_id + assumes "id-eq:1": [v  α = α]
1269
1270instance κ :: AOT_Term_id_2
1271proof
1272  AOT_modally_strict {
1273    fix x
1274    {
1275      AOT_assume O!x
1276      moreover AOT_have F([F]x  [F]x)
1277        using RN GEN "oth-class-taut:3:a" by fast
1278      ultimately AOT_have O!x & O!x & F([F]x  [F]x) using "&I" by simp
1279    }
1280    moreover {
1281      AOT_assume A!x
1282      moreover AOT_have F(x[F]  x[F])
1283        using RN GEN "oth-class-taut:3:a" by fast
1284      ultimately AOT_have A!x & A!x & F(x[F]  x[F]) using "&I" by simp
1285    }
1286    ultimately AOT_have (O!x & O!x & F([F]x  [F]x)) 
1287                         (A!x & A!x & F(x[F]  x[F]))
1288      using "oa-exist:3" "∨I"(1) "∨I"(2) "∨E"(3) "raa-cor:1" by blast
1289    AOT_thus x = x
1290      using "identity:1"[THEN "df-rules-formulas[4]"] "→E" by blast
1291  }
1292qed
1293
1294instance rel :: ("{AOT_κs,AOT_Term_id_2}") AOT_Term_id_2
1295proof
1296  AOT_modally_strict {
1297    fix F :: "<'a> AOT_var"
1298    AOT_have 0: x1...xn [F]x1...xn] = F
1299      by (simp add: "lambda-predicates:3"[axiom_inst])
1300    AOT_have x1...xn [F]x1...xn]
1301      by "cqt:2[lambda]"
1302    AOT_hence x1...xn [F]x1...xn] = x1...xn [F]x1...xn]
1303      using "lambda-predicates:1"[axiom_inst] "→E" by blast
1304    AOT_show F = F using "rule=E" 0 by force 
1305  }
1306qed
1307
1308instance 𝗈 :: AOT_Term_id_2
1309proof
1310  AOT_modally_strict {
1311    fix p
1312    AOT_have 0:  p] = p
1313      by (simp add: "lambda-predicates:3[zero]"[axiom_inst])
1314    AOT_have  p]
1315      by (rule "cqt:2[lambda0]"[axiom_inst])
1316    AOT_hence  p] =  p]
1317      using "lambda-predicates:1[zero]"[axiom_inst] "→E" by blast
1318    AOT_show p = p using "rule=E" 0 by force
1319  }
1320qed
1321
1322instance prod :: (AOT_Term_id_2, AOT_Term_id_2) AOT_Term_id_2
1323proof
1324  AOT_modally_strict {
1325    fix α :: ('a×'b) AOT_var
1326    AOT_show α = α
1327    proof (induct)
1328      AOT_show τ = τ if τ for τ :: 'a×'b
1329        using that
1330      proof (induct τ)
1331        fix τ1 :: 'a and τ2 :: 'b
1332        AOT_assume «(τ1,τ2)»
1333        AOT_hence τ1 and τ2
1334          using "dfE" "&E" tuple_denotes by blast+
1335        AOT_hence τ1 = τ1 and τ2 = τ2
1336          using "id-eq:1"[unvarify α] by blast+
1337        AOT_thus «(τ1, τ2)» = «(τ1, τ2)»
1338          by (metis "dfI" "&I" tuple_identity_1)
1339      qed
1340    qed
1341  }
1342qed
1343
1344AOT_register_type_constraints
1345  Term: _::AOT_Term_id_2 _::AOT_Term_id_2
1346AOT_register_type_constraints
1347  Individual: κ _::{AOT_κs, AOT_Term_id_2}
1348AOT_register_type_constraints
1349  Relation: <_::{AOT_κs, AOT_Term_id_2}>
1350
1351AOT_theorem "id-eq:2": α = β  β = α
1352  by (meson "rule=E" "deduction-theorem")
1353
1354AOT_theorem "id-eq:3": α = β & β = γ  α = γ
1355  using "rule=E" "→I" "&E" by blast
1356
1357AOT_theorem "id-eq:4": α = β  γ (α = γ  β = γ)
1358proof (rule "≡I"; rule "→I")
1359  AOT_assume 0: α = β
1360  AOT_hence 1: β = α using "id-eq:2" "→E" by blast
1361  AOT_show γ (α = γ  β = γ)
1362    by (rule GEN) (metis "≡I" "→I" 0 "1" "rule=E")
1363next
1364  AOT_assume γ (α = γ  β = γ)
1365  AOT_hence α = α  β = α using "∀E"(2) by blast
1366  AOT_hence α = α  β = α using "≡E"(1) "→I" by blast
1367  AOT_hence β = α using "id-eq:1" "→E" by blast
1368  AOT_thus α = β using "id-eq:2" "→E" by blast
1369qed
1370
1371AOT_theorem "rule=I:1":
1372  assumes τ
1373  shows τ = τ
1374proof -
1375  AOT_have α (α = α)
1376    by (rule GEN) (metis "id-eq:1")
1377  AOT_thus τ = τ using assms "∀E" by blast
1378qed
1379
1380AOT_theorem "rule=I:2[const_var]": "α = α"
1381  using "id-eq:1".
1382
1383AOT_theorem "rule=I:2[lambda]":
1384  assumes INSTANCE_OF_CQT_2(φ)
1385  shows "ν1...νn φ{ν1...νn}] = ν1...νn φ{ν1...νn}]"
1386proof -
1387  AOT_have α (α = α)
1388    by (rule GEN) (metis "id-eq:1")
1389  moreover AOT_have ν1...νn φ{ν1...νn}]
1390    using assms by (rule "cqt:2[lambda]"[axiom_inst])
1391  ultimately AOT_show ν1...νn φ{ν1...νn}] = ν1...νn φ{ν1...νn}]
1392    using assms "∀E" by blast
1393qed
1394
1395lemmas "=I" = "rule=I:1" "rule=I:2[const_var]" "rule=I:2[lambda]"
1396
1397AOT_theorem "rule-id-df:1":
1398  assumes τ{α1...αn} =df σ{α1...αn} and σ{τ1...τn}
1399  shows τ{τ1...τn} = σ{τ1...τn}
1400proof -
1401  AOT_have σ{τ1...τn}  τ{τ1...τn} = σ{τ1...τn}
1402    using "df-rules-terms[3]" assms(1) "&E" by blast
1403  AOT_thus τ{τ1...τn} = σ{τ1...τn}
1404    using assms(2) "→E" by blast
1405qed
1406
1407AOT_theorem "rule-id-df:1[zero]":
1408  assumes τ =df σ and σ
1409  shows τ = σ
1410proof -
1411  AOT_have σ  τ = σ
1412    using "df-rules-terms[4]" assms(1) "&E" by blast
1413  AOT_thus τ = σ
1414    using assms(2) "→E" by blast
1415qed
1416
1417AOT_theorem "rule-id-df:2:a":
1418  assumes τ{α1...αn} =df σ{α1...αn} and σ{τ1...τn} and φ{τ{τ1...τn}}
1419  shows φ{σ{τ1...τn}}
1420proof -
1421  AOT_have τ{τ1...τn} = σ{τ1...τn} using "rule-id-df:1" assms(1,2) by blast
1422  AOT_thus φ{σ{τ1...τn}} using assms(3) "rule=E" by blast
1423qed
1424
1425AOT_theorem "rule-id-df:2:a[2]":
1426  assumes τ{«(α1,α2)»} =df σ{«(α1,α2)»}
1427    and σ{«(τ1,τ2)»}
1428      and φ{τ{«(τ1,τ2)»}}
1429  shows φ{σ{«(τ1::'a::AOT_Term_id_2,τ2::'b::AOT_Term_id_2)»}}
1430proof -
1431  AOT_have τ{«(τ1,τ2)»} = σ{«(τ1,τ2)»}
1432    using "rule-id-df:1" assms(1,2) by auto
1433  AOT_thus φ{σ{«(τ1,τ2)»}} using assms(3) "rule=E" by blast
1434qed
1435
1436AOT_theorem "rule-id-df:2:a[zero]":
1437  assumes τ =df σ and σ and φ{τ}
1438  shows φ{σ}
1439proof -
1440  AOT_have τ = σ using "rule-id-df:1[zero]" assms(1,2) by blast
1441  AOT_thus φ{σ} using assms(3) "rule=E" by blast
1442qed
1443
1444lemmas "=dfE" = "rule-id-df:2:a" "rule-id-df:2:a[zero]"
1445
1446AOT_theorem "rule-id-df:2:b":
1447  assumes τ{α1...αn} =df σ{α1...αn} and σ{τ1...τn} and φ{σ{τ1...τn}}
1448  shows φ{τ{τ1...τn}}
1449proof -
1450  AOT_have τ{τ1...τn} = σ{τ1...τn}
1451    using "rule-id-df:1" assms(1,2) by blast
1452  AOT_hence σ{τ1...τn} = τ{τ1...τn}
1453    using "rule=E" "=I"(1) "t=t-proper:1" "→E" by fast
1454  AOT_thus φ{τ{τ1...τn}} using assms(3) "rule=E" by blast
1455qed
1456
1457AOT_theorem "rule-id-df:2:b[2]":
1458  assumes τ{«(α1,α2)»} =df σ{«(α1,α2)»}
1459      and σ{«(τ1,τ2)»}
1460      and φ{σ{«(τ1,τ2)»}}
1461  shows φ{τ{«(τ1::'a::AOT_Term_id_2,τ2::'b::AOT_Term_id_2)»}}
1462proof -
1463  AOT_have τ{«(τ1,τ2)»} = σ{«(τ1,τ2)»}
1464    using "=I"(1) "rule-id-df:2:a[2]" RAA(1) assms(1,2) "→I" by metis
1465  AOT_hence σ{«(τ1,τ2)»} = τ{«(τ1,τ2)»}
1466    using "rule=E" "=I"(1) "t=t-proper:1" "→E" by fast
1467  AOT_thus φ{τ{«(τ1,τ2)»}} using assms(3) "rule=E" by blast
1468qed
1469
1470AOT_theorem "rule-id-df:2:b[zero]":
1471  assumes τ =df σ and σ and φ{σ}
1472  shows φ{τ}
1473proof -
1474  AOT_have τ = σ using "rule-id-df:1[zero]" assms(1,2) by blast
1475  AOT_hence σ = τ
1476    using "rule=E" "=I"(1) "t=t-proper:1" "→E" by fast
1477  AOT_thus φ{τ} using assms(3) "rule=E" by blast
1478qed
1479
1480lemmas "=dfI" = "rule-id-df:2:b" "rule-id-df:2:b[zero]"
1481
1482AOT_theorem "free-thms:1": τ  β (β = τ)
1483  by (metis "∃E" "rule=I:1" "t=t-proper:2" "→I" "∃I"(1) "≡I" "→E")
1484
1485AOT_theorem "free-thms:2": α φ{α}  (β (β = τ)  φ{τ})
1486  by (metis "∃E" "rule=E" "cqt:2[const_var]"[axiom_inst] "→I" "∀E"(1))
1487
1488AOT_theorem "free-thms:3[const_var]": β (β = α)
1489  by (meson "∃I"(2) "id-eq:1")
1490
1491AOT_theorem "free-thms:3[lambda]":
1492  assumes INSTANCE_OF_CQT_2(φ)
1493  shows β (β = ν1...νn φ{ν1...νn}])
1494  by (meson "=I"(3) assms "cqt:2[lambda]"[axiom_inst] "existential:1")
1495
1496AOT_theorem "free-thms:4[rel]":
1497  ([Π]κ1...κn  κ1...κn[Π])  β (β = Π)
1498  by (metis "rule=I:1" "&E"(1) "∨E"(1) "cqt:5:a"[axiom_inst]
1499            "cqt:5:b"[axiom_inst] "→I" "∃I"(1))
1500
1501AOT_theorem "free-thms:4[vars]":
1502  ([Π]κ1...κn  κ1...κn[Π])  β1...∃βn (β1...βn = κ1...κn)
1503  by (metis "rule=I:1" "&E"(2) "∨E"(1) "cqt:5:a"[axiom_inst]
1504            "cqt:5:b"[axiom_inst] "→I" "∃I"(1))
1505
1506AOT_theorem "free-thms:4[1,rel]":
1507  ([Π]κ  κ[Π])  β (β = Π)
1508  by (metis "rule=I:1" "&E"(1) "∨E"(1) "cqt:5:a"[axiom_inst]
1509            "cqt:5:b"[axiom_inst] "→I" "∃I"(1))
1510AOT_theorem "free-thms:4[1,1]":
1511  ([Π]κ  κ[Π])  β (β = κ)
1512  by (metis "rule=I:1" "&E"(2) "∨E"(1) "cqt:5:a"[axiom_inst]
1513            "cqt:5:b"[axiom_inst] "→I" "∃I"(1))
1514
1515AOT_theorem "free-thms:4[2,rel]":
1516  ([Π]κ1κ2  κ1κ2[Π])  β (β = Π)
1517  by (metis "rule=I:1" "&E"(1) "∨E"(1) "cqt:5:a[2]"[axiom_inst]
1518            "cqt:5:b[2]"[axiom_inst] "→I" "∃I"(1))
1519AOT_theorem "free-thms:4[2,1]":
1520  ([Π]κ1κ2  κ1κ2[Π])  β (β = κ1)
1521  by (metis "rule=I:1" "&E" "∨E"(1) "cqt:5:a[2]"[axiom_inst]
1522            "cqt:5:b[2]"[axiom_inst] "→I" "∃I"(1))
1523AOT_theorem "free-thms:4[2,2]":
1524  ([Π]κ1κ2  κ1κ2[Π])  β (β = κ2)
1525  by (metis "rule=I:1" "&E"(2) "∨E"(1) "cqt:5:a[2]"[axiom_inst]
1526            "cqt:5:b[2]"[axiom_inst] "→I" "∃I"(1))
1527AOT_theorem "free-thms:4[3,rel]":
1528  ([Π]κ1κ2κ3  κ1κ2κ3[Π])  β (β = Π)
1529  by (metis "rule=I:1" "&E"(1) "∨E"(1) "cqt:5:a[3]"[axiom_inst]
1530            "cqt:5:b[3]"[axiom_inst] "→I" "∃I"(1))
1531AOT_theorem "free-thms:4[3,1]":
1532  ([Π]κ1κ2κ3  κ1κ2κ3[Π])  β (β = κ1)
1533  by (metis "rule=I:1" "&E" "∨E"(1) "cqt:5:a[3]"[axiom_inst]
1534            "cqt:5:b[3]"[axiom_inst] "→I" "∃I"(1))
1535AOT_theorem "free-thms:4[3,2]":
1536  ([Π]κ1κ2κ3  κ1κ2κ3[Π])  β (β = κ2)
1537  by (metis "rule=I:1" "&E" "∨E"(1) "cqt:5:a[3]"[axiom_inst]
1538            "cqt:5:b[3]"[axiom_inst] "→I" "∃I"(1))
1539AOT_theorem "free-thms:4[3,3]":
1540  ([Π]κ1κ2κ3  κ1κ2κ3[Π])  β (β = κ3)
1541  by (metis "rule=I:1" "&E"(2) "∨E"(1) "cqt:5:a[3]"[axiom_inst]
1542            "cqt:5:b[3]"[axiom_inst] "→I" "∃I"(1))
1543AOT_theorem "free-thms:4[4,rel]":
1544  ([Π]κ1κ2κ3κ4  κ1κ2κ3κ4[Π])  β (β = Π)
1545  by (metis "rule=I:1" "&E"(1) "∨E"(1) "cqt:5:a[4]"[axiom_inst]
1546            "cqt:5:b[4]"[axiom_inst] "→I" "∃I"(1))
1547AOT_theorem "free-thms:4[4,1]":
1548  ([Π]κ1κ2κ3κ4  κ1κ2κ3κ4[Π])  β (β = κ1)
1549  by (metis "rule=I:1" "&E" "∨E"(1) "cqt:5:a[4]"[axiom_inst]
1550            "cqt:5:b[4]"[axiom_inst] "→I" "∃I"(1))
1551AOT_theorem "free-thms:4[4,2]":
1552  ([Π]κ1κ2κ3κ4  κ1κ2κ3κ4[Π])  β (β = κ2)
1553  by (metis "rule=I:1" "&E" "∨E"(1) "cqt:5:a[4]"[axiom_inst]
1554            "cqt:5:b[4]"[axiom_inst] "→I" "∃I"(1))
1555AOT_theorem "free-thms:4[4,3]":
1556  ([Π]κ1κ2κ3κ4  κ1κ2κ3κ4[Π])  β (β = κ3)
1557  by (metis "rule=I:1" "&E" "∨E"(1) "cqt:5:a[4]"[axiom_inst]
1558            "cqt:5:b[4]"[axiom_inst] "→I" "∃I"(1))
1559AOT_theorem "free-thms:4[4,4]":
1560  ([Π]κ1κ2κ3κ4  κ1κ2κ3κ4[Π])  β (β = κ4)
1561  by (metis "rule=I:1" "&E"(2) "∨E"(1) "cqt:5:a[4]"[axiom_inst]
1562            "cqt:5:b[4]"[axiom_inst] "→I" "∃I"(1))
1563
1564AOT_theorem "ex:1:a": α α
1565  by (rule GEN) (fact "cqt:2[const_var]"[axiom_inst])
1566AOT_theorem "ex:1:b": αβ(β = α)
1567  by (rule GEN) (fact "free-thms:3[const_var]")
1568
1569AOT_theorem "ex:2:a": α
1570  by (rule RN) (fact "cqt:2[const_var]"[axiom_inst])
1571AOT_theorem "ex:2:b": β(β = α)
1572  by (rule RN) (fact "free-thms:3[const_var]")
1573
1574AOT_theorem "ex:3:a": α α
1575  by (rule RN) (fact "ex:1:a")
1576AOT_theorem "ex:3:b": αβ(β = α)
1577  by (rule RN) (fact "ex:1:b")
1578
1579AOT_theorem "ex:4:a": α α
1580  by (rule GEN; rule RN) (fact "cqt:2[const_var]"[axiom_inst])
1581AOT_theorem "ex:4:b": αβ(β = α)
1582  by (rule GEN; rule RN) (fact "free-thms:3[const_var]")
1583
1584AOT_theorem "ex:5:a": α α
1585  by (rule RN) (simp add: "ex:4:a")
1586AOT_theorem "ex:5:b": αβ(β = α)
1587  by (rule RN) (simp add: "ex:4:b")
1588
1589AOT_theorem "all-self=:1": α(α = α)
1590  by (rule RN; rule GEN) (fact "id-eq:1")
1591AOT_theorem "all-self=:2": α(α = α)
1592  by (rule GEN; rule RN) (fact "id-eq:1")
1593
1594AOT_theorem "id-nec:1": α = β  (α = β)
1595proof(rule "→I")
1596  AOT_assume α = β
1597  moreover AOT_have (α = α)
1598    by (rule RN) (fact "id-eq:1")
1599  ultimately AOT_show (α = β) using "rule=E" by fast
1600qed
1601
1602AOT_theorem "id-nec:2": τ = σ  (τ = σ)
1603proof(rule "→I")
1604  AOT_assume asm: τ = σ
1605  moreover AOT_have τ
1606    using calculation "t=t-proper:1" "→E" by blast
1607  moreover AOT_have (τ = τ)
1608    using calculation "all-self=:2" "∀E"(1) by blast
1609  ultimately AOT_show (τ = σ) using "rule=E" by fast
1610qed
1611
1612AOT_theorem "term-out:1": φ{α}  β (β = α & φ{β})
1613proof (rule "≡I"; rule "→I")
1614  AOT_assume asm: φ{α}
1615  AOT_show β (β = α & φ{β})
1616    by (rule "∃I"(2)[where β=α]; rule "&I")
1617       (auto simp: "id-eq:1" asm)
1618next
1619  AOT_assume 0: β (β = α & φ{β})
1620  AOT_obtain β where β = α & φ{β}
1621    using "∃E"[rotated, OF 0] by blast
1622  AOT_thus φ{α} using "&E" "rule=E" by blast
1623qed
1624
1625AOT_theorem "term-out:2": τ  (φ{τ}  α(α = τ & φ{α}))
1626proof(rule "→I")
1627  AOT_assume τ
1628  moreover AOT_have α (φ{α}  β (β = α & φ{β}))
1629    by (rule GEN) (fact "term-out:1")
1630  ultimately AOT_show φ{τ}  α(α = τ & φ{α})
1631    using "∀E" by blast
1632qed
1633
1634AOT_theorem "term-out:3":
1635  (φ{α} & β(φ{β}  β = α))  β(φ{β}  β = α)
1636  apply (rule "≡I"; rule "→I")
1637   apply (frule "&E"(1))
1638   apply (drule "&E"(2))
1639   apply (rule GEN; rule "≡I"; rule "→I")
1640  using "rule-ui:2[const_var]" "vdash-properties:5"
1641    apply blast
1642   apply (meson "rule=E" "id-eq:1")
1643  apply (rule "&I")
1644  using "id-eq:1" "≡E"(2) "rule-ui:3"
1645   apply blast
1646  apply (rule GEN; rule "→I")
1647  using "≡E"(1) "rule-ui:2[const_var]"
1648  by blast
1649
1650(* Note: generalized alphabetic variant of the last theorem. *)
1651AOT_theorem "term-out:4":
1652  (φ{β} & α(φ{α}  α = β))  α(φ{α}  α = β)
1653  using "term-out:3" .
1654
1655(* TODO: Provide a nicer mechanism for introducing custom binders. *)
1656AOT_define AOT_exists_unique :: α  φ  φ "uniqueness:1":
1657  «AOT_exists_unique φ» df α (φ{α} & β (φ{β}  β = α))
1658syntax (input) "_AOT_exists_unique" :: α  φ  φ ("∃!_ _" [1,40])
1659syntax (output) "_AOT_exists_unique" :: α  φ  φ ("∃!_'(_')" [1,40])
1660AOT_syntax_print_translations
1661  "_AOT_exists_unique τ φ" <= "CONST AOT_exists_unique (_abs τ φ)"
1662syntax
1663   "_AOT_exists_unique_ellipse" :: id_position  id_position  φ  φ
1664   (∃!_...∃!_ _› [1,40])
1665parse_ast_translation1666[(syntax_const‹_AOT_exists_unique_ellipse›,
1667  fn ctx => fn [a,b,c] => Ast.mk_appl (Ast.Constant "AOT_exists_unique")
1668  [parseEllipseList "_AOT_vars" ctx [a,b],c]),
1669 (syntax_const‹_AOT_exists_unique›,
1670  AOT_restricted_binder
1671    const_nameAOT_exists_unique
1672    const_syntaxAOT_conj)]
1673print_translationAOT_syntax_print_translations [
1674  AOT_preserve_binder_abs_tr'
1675    const_syntaxAOT_exists_unique
1676    syntax_const‹_AOT_exists_unique›
1677    (syntax_const‹_AOT_exists_unique_ellipse›, true)
1678    const_nameAOT_conj,
1679  AOT_binder_trans
1680    @{theory}
1681    @{binding "AOT_exists_unique_binder"}
1682    syntax_const‹_AOT_exists_unique›
1683]
1684
1685
1686context AOT_meta_syntax
1687begin
1688notation AOT_exists_unique (binder "!" 20)
1689end
1690context AOT_no_meta_syntax
1691begin
1692no_notation AOT_exists_unique (binder "!" 20)
1693end
1694
1695AOT_theorem "uniqueness:2": ∃!α φ{α}  αβ(φ{β}  β = α)
1696proof(rule "≡I"; rule "→I")
1697    AOT_assume ∃!α φ{α}
1698    AOT_hence α (φ{α} & β (φ{β}  β = α))
1699      using "uniqueness:1" "dfE" by blast
1700    then AOT_obtain α where φ{α} & β (φ{β}  β = α)
1701      using "instantiation"[rotated] by blast
1702    AOT_hence β(φ{β}  β = α)
1703      using "term-out:3" "≡E" by blast
1704    AOT_thus αβ(φ{β}  β = α)
1705      using "∃I" by fast
1706next
1707    AOT_assume αβ(φ{β}  β = α)
1708    then AOT_obtain α where β (φ{β}  β = α)
1709      using "instantiation"[rotated] by blast
1710    AOT_hence φ{α} & β (φ{β}  β = α)
1711      using "term-out:3" "≡E" by blast
1712    AOT_hence α (φ{α} & β (φ{β}  β = α))
1713      using "∃I" by fast
1714    AOT_thus ∃!α φ{α}
1715      using "uniqueness:1" "dfI" by blast
1716qed
1717
1718AOT_theorem "uni-most": ∃!α φ{α}  βγ((φ{β} & φ{γ})  β = γ)
1719proof(rule "→I"; rule GEN; rule GEN; rule "→I")
1720  fix β γ
1721  AOT_assume ∃!α φ{α}
1722  AOT_hence αβ(φ{β}  β = α)
1723    using "uniqueness:2" "≡E" by blast
1724  then AOT_obtain α where β(φ{β}  β = α)
1725    using "instantiation"[rotated] by blast
1726  moreover AOT_assume φ{β} & φ{γ}
1727  ultimately AOT_have β = α and γ = α
1728    using "∀E"(2) "&E" "≡E"(1,2) by blast+
1729  AOT_thus β = γ
1730    by (metis "rule=E" "id-eq:2" "→E")
1731qed
1732
1733AOT_theorem "nec-exist-!": α(φ{α}  φ{α})  (∃!α φ{α}  ∃!α φ{α})
1734proof (rule "→I"; rule "→I")
1735  AOT_assume a: α(φ{α}  φ{α})
1736  AOT_assume ∃!α φ{α}
1737  AOT_hence α (φ{α} & β (φ{β}  β = α))
1738    using "uniqueness:1" "dfE" by blast
1739  then AOT_obtain α where ξ: φ{α} & β (φ{β}  β = α)
1740    using "instantiation"[rotated] by blast
1741  AOT_have φ{α}
1742    using ξ a "&E" "∀E" "→E" by fast
1743  moreover AOT_have β (φ{β}  β = α)
1744    apply (rule GEN; rule "→I")
1745    using ξ[THEN "&E"(2), THEN "∀E"(2), THEN "→E"]
1746          "qml:2"[axiom_inst, THEN "→E"] by blast
1747  ultimately AOT_have (φ{α} & β (φ{β}  β = α))
1748    using "&I" by blast
1749  AOT_thus ∃!α φ{α}
1750    using "uniqueness:1" "dfI" "∃I" by fast
1751qed
1752
1753subsection‹The Theory of Actuality and Descriptions›
1754text‹\label{PLM: 9.8}›
1755
1756AOT_theorem "act-cond": 𝒜(φ  ψ)  (𝒜φ  𝒜ψ)
1757  using "→I" "≡E"(1) "logic-actual-nec:2"[axiom_inst] by blast
1758
1759AOT_theorem "nec-imp-act": φ  𝒜φ
1760  by (metis "act-cond" "contraposition:1[2]" "≡E"(4)
1761            "qml:2"[THEN act_closure, axiom_inst]
1762            "qml-act:2"[axiom_inst] RAA(1) "→E" "→I")
1763
1764AOT_theorem "act-conj-act:1": 𝒜(𝒜φ  φ)
1765  using "→I" "≡E"(2) "logic-actual-nec:2"[axiom_inst]
1766        "logic-actual-nec:4"[axiom_inst] by blast
1767
1768AOT_theorem "act-conj-act:2": 𝒜(φ  𝒜φ)
1769  by (metis "→I" "≡E"(2, 4) "logic-actual-nec:2"[axiom_inst]
1770            "logic-actual-nec:4"[axiom_inst] RAA(1))
1771
1772AOT_theorem "act-conj-act:3": (𝒜φ & 𝒜ψ)  𝒜(φ & ψ)
1773proof -
1774  AOT_have (φ  (ψ  (φ & ψ)))
1775    by (rule RN) (fact Adjunction)
1776  AOT_hence 𝒜(φ  (ψ  (φ & ψ)))
1777    using "nec-imp-act" "→E" by blast
1778  AOT_hence 𝒜φ  𝒜(ψ  (φ & ψ))
1779    using "act-cond" "→E" by blast
1780  moreover AOT_have 𝒜(ψ  (φ & ψ))  (𝒜ψ  𝒜(φ & ψ))
1781    by (fact "act-cond")
1782  ultimately AOT_have 𝒜φ  (𝒜ψ  𝒜(φ & ψ))
1783    using "→I" "→E" by metis
1784  AOT_thus (𝒜φ & 𝒜ψ)  𝒜(φ & ψ)
1785    by (metis Importation "→E")
1786qed
1787
1788AOT_theorem "act-conj-act:4": 𝒜(𝒜φ  φ)
1789proof -
1790  AOT_have (𝒜(𝒜φ  φ) & 𝒜(φ  𝒜φ))  𝒜((𝒜φ  φ) & (φ  𝒜φ))
1791    by (fact "act-conj-act:3")
1792  moreover AOT_have 𝒜(𝒜φ  φ) & 𝒜(φ  𝒜φ)
1793    using "&I" "act-conj-act:1" "act-conj-act:2" by simp
1794  ultimately AOT_have ζ: 𝒜((𝒜φ  φ) & (φ  𝒜φ))
1795    using "→E" by blast
1796  AOT_have 𝒜(((𝒜φ  φ) & (φ  𝒜φ))  (𝒜φ  φ))
1797    using "conventions:3"[THEN "df-rules-formulas[2]",
1798                          THEN act_closure, axiom_inst] by blast
1799  AOT_hence 𝒜((𝒜φ  φ) & (φ  𝒜φ))  𝒜(𝒜φ  φ)
1800    using "act-cond" "→E" by blast
1801  AOT_thus 𝒜(𝒜φ  φ) using ζ "→E" by blast
1802qed
1803
1804(* TODO: Consider introducing AOT_inductive. *)
1805inductive arbitrary_actualization for φ where
1806  arbitrary_actualization φ «𝒜φ»
1807| arbitrary_actualization φ «𝒜ψ» if arbitrary_actualization φ ψ
1808declare arbitrary_actualization.cases[AOT]
1809        arbitrary_actualization.induct[AOT]
1810        arbitrary_actualization.simps[AOT]
1811        arbitrary_actualization.intros[AOT]
1812syntax arbitrary_actualization :: φ'  φ'  AOT_prop
1813  ("ARBITRARY'_ACTUALIZATION'(_,_')")
1814
1815notepad
1816begin
1817  AOT_modally_strict {
1818    fix φ
1819    AOT_have ARBITRARY_ACTUALIZATION(𝒜φ  φ, 𝒜(𝒜φ  φ))
1820      using AOT_PLM.arbitrary_actualization.intros by metis
1821    AOT_have ARBITRARY_ACTUALIZATION(𝒜φ  φ, 𝒜𝒜(𝒜φ  φ))
1822      using AOT_PLM.arbitrary_actualization.intros by metis
1823    AOT_have ARBITRARY_ACTUALIZATION(𝒜φ  φ, 𝒜𝒜𝒜(𝒜φ  φ))
1824      using AOT_PLM.arbitrary_actualization.intros by metis
1825  }
1826end
1827
1828
1829AOT_theorem "closure-act:1":
1830  assumes ARBITRARY_ACTUALIZATION(𝒜φ  φ, ψ)
1831  shows ψ
1832using assms proof(induct)
1833  case 1
1834  AOT_show 𝒜(𝒜φ  φ)
1835    by (simp add: "act-conj-act:4")
1836next
1837  case (2 ψ)
1838  AOT_thus 𝒜ψ
1839    by (metis arbitrary_actualization.simps "≡E"(1)
1840              "logic-actual-nec:4"[axiom_inst])
1841qed
1842
1843AOT_theorem "closure-act:2": α 𝒜(𝒜φ{α}  φ{α})
1844  by (simp add: "act-conj-act:4" "∀I")
1845
1846AOT_theorem "closure-act:3": 𝒜α 𝒜(𝒜φ{α}  φ{α})
1847  by (metis (no_types, lifting) "act-conj-act:4" "≡E"(1,2) "∀I"
1848            "logic-actual-nec:3"[axiom_inst]
1849            "logic-actual-nec:4"[axiom_inst])
1850
1851AOT_theorem "closure-act:4": 𝒜α1...∀αn 𝒜(𝒜φ{α1...αn}  φ{α1...αn})
1852  using "closure-act:3" .
1853
1854AOT_act_theorem "RA[1]":
1855  assumes  φ
1856  shows  𝒜φ
1857  ― ‹While this proof is rejected in PLM,
1858      we merely state it as modally-fragile rule,
1859      which addresses the concern in PLM.›
1860  using "¬¬E" assms "≡E"(3) "logic-actual"[act_axiom_inst]
1861        "logic-actual-nec:1"[axiom_inst] "modus-tollens:2" by blast
1862AOT_theorem "RA[2]":
1863  assumes  φ
1864  shows  𝒜φ
1865  ― ‹This rule is in fact a consequence of RN and
1866      does not require an appeal to the semantics itself.›
1867  using RN assms "nec-imp-act" "vdash-properties:5" by blast
1868AOT_theorem "RA[3]":
1869  assumes Γ  φ
1870  shows 𝒜Γ  𝒜φ
1871  text‹This rule is only derivable from the semantics,
1872       but apparently no proof actually relies on it.
1873       If this turns out to be required, it is valid to derive it from the
1874       semantics just like RN, but we refrain from doing so, unless necessary.›
1875  (*  using assms by (meson AOT_sem_act imageI) *)
1876  oops ― ‹discard the rule›
1877
1878AOT_act_theorem "ANeg:1": ¬𝒜φ  ¬φ
1879  by (simp add: "RA[1]" "contraposition:1[1]" "deduction-theorem"
1880                "≡I" "logic-actual"[act_axiom_inst])
1881
1882AOT_act_theorem "ANeg:2": ¬𝒜¬φ  φ
1883  using "ANeg:1" "≡I" "≡E"(5) "useful-tautologies:1"
1884        "useful-tautologies:2" by blast
1885
1886AOT_theorem "Act-Basic:1": 𝒜φ  𝒜¬φ
1887  by (meson "∨I"(1,2) "≡E"(2) "logic-actual-nec:1"[axiom_inst] "raa-cor:1")
1888
1889AOT_theorem "Act-Basic:2": 𝒜(φ & ψ)  (𝒜φ & 𝒜ψ)
1890proof (rule "≡I"; rule "→I")
1891  AOT_assume 𝒜(φ & ψ)
1892  moreover AOT_have 𝒜((φ & ψ)  φ)
1893    by (simp add: "RA[2]" "Conjunction Simplification"(1))
1894  moreover AOT_have 𝒜((φ & ψ)  ψ)
1895    by (simp add: "RA[2]" "Conjunction Simplification"(2))
1896  ultimately AOT_show 𝒜φ & 𝒜ψ
1897    using "act-cond"[THEN "→E", THEN "→E"] "&I" by metis
1898next
1899  AOT_assume 𝒜φ & 𝒜ψ
1900  AOT_thus 𝒜(φ & ψ)
1901    using "act-conj-act:3" "vdash-properties:6" by blast
1902qed
1903
1904AOT_theorem "Act-Basic:3": 𝒜(φ  ψ)  (𝒜(φ  ψ) & 𝒜(ψ  φ))
1905proof (rule "≡I"; rule "→I")
1906  AOT_assume 𝒜(φ  ψ)
1907  moreover AOT_have 𝒜((φ  ψ)  (φ  ψ))
1908    by (simp add: "RA[2]" "deduction-theorem" "≡E"(1))
1909  moreover AOT_have 𝒜((φ  ψ)  (ψ  φ))
1910    by (simp add: "RA[2]" "deduction-theorem" "≡E"(2))
1911  ultimately AOT_show 𝒜(φ  ψ) & 𝒜(ψ  φ)
1912    using "act-cond"[THEN "→E", THEN "→E"] "&I" by metis
1913next
1914  AOT_assume 𝒜(φ  ψ) & 𝒜(ψ  φ)
1915  AOT_hence 𝒜((φ  ψ) & (ψ  φ))
1916    by (metis "act-conj-act:3" "vdash-properties:10")
1917  moreover AOT_have 𝒜(((φ  ψ) & (ψ  φ))  (φ  ψ))
1918    by (simp add: "conventions:3" "RA[2]" "df-rules-formulas[2]"
1919                  "vdash-properties:1[2]")
1920  ultimately AOT_show 𝒜(φ  ψ)
1921    using "act-cond"[THEN "→E", THEN "→E"] by metis
1922qed
1923
1924AOT_theorem "Act-Basic:4": (𝒜(φ  ψ) & 𝒜(ψ  φ))  (𝒜φ  𝒜ψ)
1925proof (rule "≡I"; rule "→I")
1926  AOT_assume 0: 𝒜(φ  ψ) & 𝒜(ψ  φ)
1927  AOT_show 𝒜φ  𝒜ψ
1928    using 0 "&E" "act-cond"[THEN "→E", THEN "→E"] "≡I" "→I" by metis
1929next
1930  AOT_assume 𝒜φ  𝒜ψ
1931  AOT_thus 𝒜(φ  ψ) & 𝒜(ψ  φ)
1932    by (metis "→I" "logic-actual-nec:2"[axiom_inst] "≡E"(1,2) "&I")
1933qed
1934
1935AOT_theorem "Act-Basic:5": 𝒜(φ  ψ)  (𝒜φ  𝒜ψ)
1936  using "Act-Basic:3" "Act-Basic:4" "≡E"(5) by blast
1937
1938AOT_theorem "Act-Basic:6": 𝒜φ  𝒜φ
1939  by (simp add: "≡I" "qml:2"[axiom_inst] "qml-act:1"[axiom_inst])
1940
1941AOT_theorem "Act-Basic:7": 𝒜φ  𝒜φ
1942  by (metis "Act-Basic:6" "→I" "→E" "≡E"(1,2) "nec-imp-act"
1943            "qml-act:2"[axiom_inst])
1944
1945AOT_theorem "Act-Basic:8": φ  𝒜φ
1946  using "Hypothetical Syllogism" "nec-imp-act" "qml-act:1"[axiom_inst] by blast
1947
1948AOT_theorem "Act-Basic:9": 𝒜(φ  ψ)  (𝒜φ  𝒜ψ)
1949proof (rule "≡I"; rule "→I")
1950  AOT_assume 𝒜(φ  ψ)
1951  AOT_thus 𝒜φ  𝒜ψ
1952  proof (rule "raa-cor:3")
1953    AOT_assume ¬(𝒜φ  𝒜ψ)
1954    AOT_hence ¬𝒜φ & ¬𝒜ψ
1955      by (metis "≡E"(1) "oth-class-taut:5:d")
1956    AOT_hence 𝒜¬φ & 𝒜¬ψ
1957      using "logic-actual-nec:1"[axiom_inst, THEN "≡E"(2)] "&E" "&I" by metis
1958    AOT_hence 𝒜(¬φ & ¬ψ)
1959      using "≡E" "Act-Basic:2" by metis
1960    moreover AOT_have 𝒜((¬φ & ¬ψ)  ¬(φ  ψ))
1961      using "RA[2]" "≡E"(6) "oth-class-taut:3:a" "oth-class-taut:5:d" by blast
1962    moreover AOT_have 𝒜(¬φ & ¬ψ)  𝒜(¬(φ  ψ))
1963      using calculation(2) by (metis "Act-Basic:5" "≡E"(1))
1964    ultimately AOT_have 𝒜(¬(φ  ψ)) using "≡E" by blast
1965    AOT_thus ¬𝒜(φ  ψ)
1966      using "logic-actual-nec:1"[axiom_inst, THEN "≡E"(1)] by auto
1967  qed
1968next
1969  AOT_assume 𝒜φ  𝒜ψ
1970  AOT_thus 𝒜(φ  ψ)
1971    by (meson "RA[2]" "act-cond" "∨I"(1) "∨E"(1) "Disjunction Addition"(1,2))
1972qed
1973
1974AOT_theorem "Act-Basic:10": 𝒜α φ{α}  α 𝒜φ{α}
1975proof -
1976  AOT_have θ: ¬𝒜α ¬φ{α}  ¬α 𝒜¬φ{α}
1977    by (rule "oth-class-taut:4:b"[THEN "≡E"(1)])
1978       (metis "logic-actual-nec:3"[axiom_inst])
1979  AOT_have ξ: ¬α 𝒜¬φ{α}  ¬α ¬𝒜φ{α}
1980    by (rule "oth-class-taut:4:b"[THEN "≡E"(1)])
1981       (rule "logic-actual-nec:1"[THEN universal_closure,
1982               axiom_inst, THEN "cqt-basic:3"[THEN "→E"]])
1983  AOT_have 𝒜(α φ{α})  𝒜(¬α ¬φ{α})
1984    using "conventions:4"[THEN "df-rules-formulas[1]",
1985                          THEN act_closure, axiom_inst]
1986          "conventions:4"[THEN "df-rules-formulas[2]",
1987                          THEN act_closure, axiom_inst]
1988    "Act-Basic:4"[THEN "≡E"(1)] "&I" "Act-Basic:5"[THEN "≡E"(2)] by metis
1989  also AOT_have   ¬𝒜α ¬φ{α}
1990    by (simp add: "logic-actual-nec:1" "vdash-properties:1[2]")
1991  also AOT_have   ¬α 𝒜 ¬φ{α} using θ by blast
1992  also AOT_have   ¬α ¬𝒜 φ{α} using ξ by blast
1993  also AOT_have   α 𝒜 φ{α}
1994    using "conventions:4"[THEN "≡Df"] by (metis "≡E"(6) "oth-class-taut:3:a")
1995  finally AOT_show 𝒜α φ{α}  α 𝒜φ{α} .
1996qed
1997
1998
1999AOT_theorem "Act-Basic:11":
2000  𝒜α(φ{α}  ψ{α})  α(𝒜φ{α}  𝒜ψ{α})
2001proof(rule "≡I"; rule "→I")
2002  AOT_assume 𝒜α(φ{α}  ψ{α})
2003  AOT_hence α𝒜(φ{α}  ψ{α})
2004    using "logic-actual-nec:3"[axiom_inst, THEN "≡E"(1)] by blast
2005  AOT_hence 𝒜(φ{α}  ψ{α}) for α using "∀E" by blast
2006  AOT_hence 𝒜φ{α}  𝒜ψ{α} for α by (metis "Act-Basic:5" "≡E"(1))
2007  AOT_thus α(𝒜φ{α}  𝒜ψ{α}) by (rule "∀I")
2008next
2009  AOT_assume α(𝒜φ{α}  𝒜ψ{α})
2010  AOT_hence 𝒜φ{α}  𝒜ψ{α} for α using "∀E" by blast
2011  AOT_hence 𝒜(φ{α}  ψ{α}) for α by (metis "Act-Basic:5" "≡E"(2))
2012  AOT_hence α 𝒜(φ{α}  ψ{α}) by (rule "∀I")
2013  AOT_thus 𝒜α(φ{α}  ψ{α})
2014    using "logic-actual-nec:3"[axiom_inst, THEN "≡E"(2)] by fast
2015qed
2016
2017AOT_act_theorem "act-quant-uniq":
2018  β(𝒜φ{β}  β = α)  β(φ{β}  β = α)
2019proof(rule "≡I"; rule "→I")
2020  AOT_assume β(𝒜φ{β}  β = α)
2021  AOT_hence 𝒜φ{β}  β = α for β using "∀E" by blast
2022  AOT_hence φ{β}  β = α for β
2023    using "≡I" "→I" "RA[1]" "≡E"(1,2) "logic-actual"[act_axiom_inst] "→E"
2024    by metis
2025  AOT_thus β(φ{β}  β = α) by (rule "∀I")
2026next
2027  AOT_assume β(φ{β}  β = α)
2028  AOT_hence φ{β}  β = α for β using "∀E" by blast
2029  AOT_hence 𝒜φ{β}  β = α for β
2030    using "≡I" "→I" "RA[1]" "≡E"(1,2) "logic-actual"[act_axiom_inst] "→E"
2031    by metis
2032  AOT_thus β(𝒜φ{β}  β = α) by (rule "∀I")
2033qed
2034
2035AOT_act_theorem "fund-cont-desc": x = ιx(φ{x})  z(φ{z}  z = x)
2036  using descriptions[axiom_inst] "act-quant-uniq" "≡E"(5) by fast
2037
2038AOT_act_theorem hintikka: x = ιx(φ{x})  (φ{x} & z (φ{z}  z = x))
2039  using "Commutativity of ≡"[THEN "≡E"(1)] "term-out:3"
2040        "fund-cont-desc" "≡E"(5) by blast
2041
2042
2043locale russell_axiom =
2044  fixes ψ
2045  assumes ψ_denotes_asm: "[v  ψ{κ}]  [v  κ]"
2046begin
2047AOT_act_theorem "russell-axiom":
2048  ψ{ιx φ{x}}  x(φ{x} & z(φ{z}  z = x) & ψ{x})
2049proof -
2050  AOT_have b: x (x = ιx φ{x}  (φ{x} & z(φ{z}  z = x)))
2051    using hintikka "∀I" by fast
2052  show ?thesis
2053  proof(rule "≡I"; rule "→I")
2054    AOT_assume c: ψ{ιx φ{x}}
2055    AOT_hence d: ιx φ{x}
2056      using ψ_denotes_asm by blast
2057    AOT_hence y (y = ιx φ{x})
2058      by (metis "rule=I:1" "existential:1")
2059    then AOT_obtain a where a_def: a = ιx φ{x}
2060      using "instantiation"[rotated] by blast
2061    moreover AOT_have a = ιx φ{x}  (φ{a} & z(φ{z}  z = a))
2062      using b "∀E" by blast
2063    ultimately AOT_have φ{a} & z(φ{z}  z = a)
2064      using "≡E" by blast
2065    moreover AOT_have ψ{a}
2066    proof - 
2067      AOT_have 1: xy(x = y  y = x)
2068        by (simp add: "id-eq:2" "universal-cor")
2069      AOT_have a = ιx φ{x}   ιx φ{x} = a
2070        by (rule "∀E"(1)[where τ="«ιx φ{x}»"]; rule "∀E"(2)[where β=a])
2071           (auto simp: 1 d "universal-cor")
2072      AOT_thus ψ{a}
2073        using a_def c "rule=E" "→E" by blast
2074    qed
2075    ultimately AOT_have φ{a} & z(φ{z}  z = a) & ψ{a} by (rule "&I")
2076    AOT_thus x(φ{x} & z(φ{z}  z = x) & ψ{x}) by (rule "∃I")
2077  next
2078    AOT_assume x(φ{x} & z(φ{z}  z = x) & ψ{x})
2079    then AOT_obtain b where g: φ{b} & z(φ{z}  z = b) & ψ{b}
2080      using "instantiation"[rotated] by blast
2081    AOT_hence h: b = ιx φ{x}  (φ{b} & z(φ{z}  z = b))
2082      using b "∀E" by blast
2083    AOT_have φ{b} & z(φ{z}  z = b) and j: ψ{b}
2084      using g "&E" by blast+
2085    AOT_hence b = ιx φ{x} using h "≡E" by blast
2086    AOT_thus ψ{ιx φ{x}} using j "rule=E" by blast
2087  qed
2088qed
2089end
2090
2091interpretation "russell-axiom[exe,1]": russell_axiom λ κ . «[Π]κ»
2092  by standard (metis "cqt:5:a[1]"[axiom_inst, THEN "→E"] "&E"(2))
2093interpretation "russell-axiom[exe,2,1,1]": russell_axiom λ κ . «[Π]κκ'»
2094  by standard (metis "cqt:5:a[2]"[axiom_inst, THEN "→E"] "&E")
2095interpretation "russell-axiom[exe,2,1,2]": russell_axiom λ κ . «[Π]κ'κ»
2096  by standard (metis "cqt:5:a[2]"[axiom_inst, THEN "→E"] "&E"(2))
2097interpretation "russell-axiom[exe,2,2]": russell_axiom λ κ . «[Π]κκ»
2098  by standard (metis "cqt:5:a[2]"[axiom_inst, THEN "→E"] "&E"(2))
2099interpretation "russell-axiom[exe,3,1,1]": russell_axiom λ κ . «[Π]κκ'κ''»
2100  by standard (metis "cqt:5:a[3]"[axiom_inst, THEN "→E"] "&E")
2101interpretation "russell-axiom[exe,3,1,2]": russell_axiom λ κ . «[Π]κ'κκ''»
2102  by standard (metis "cqt:5:a[3]"[axiom_inst, THEN "→E"] "&E")
2103interpretation "russell-axiom[exe,3,1,3]": russell_axiom λ κ . «[Π]κ'κ''κ»
2104  by standard (metis "cqt:5:a[3]"[axiom_inst, THEN "→E"] "&E"(2))
2105interpretation "russell-axiom[exe,3,2,1]": russell_axiom λ κ . «[Π]κκκ'»
2106  by standard (metis "cqt:5:a[3]"[axiom_inst, THEN "→E"] "&E")
2107interpretation "russell-axiom[exe,3,2,2]": russell_axiom λ κ . «[Π]κκ'κ»
2108  by standard (metis "cqt:5:a[3]"[axiom_inst, THEN "→E"] "&E"(2))
2109interpretation "russell-axiom[exe,3,2,3]": russell_axiom λ κ . «[Π]κ'κκ»
2110  by standard (metis "cqt:5:a[3]"[axiom_inst, THEN "→E"] "&E"(2))
2111interpretation "russell-axiom[exe,3,3]": russell_axiom λ κ . «[Π]κκκ»
2112  by standard (metis "cqt:5:a[3]"[axiom_inst, THEN "→E"] "&E"(2))
2113
2114interpretation "russell-axiom[enc,1]": russell_axiom λ κ . «κ[Π]»
2115  by standard (metis "cqt:5:b[1]"[axiom_inst, THEN "→E"] "&E"(2))
2116interpretation "russell-axiom[enc,2,1]": russell_axiom λ κ . «κκ'[Π]»
2117  by standard (metis "cqt:5:b[2]"[axiom_inst, THEN "→E"] "&E")
2118interpretation "russell-axiom[enc,2,2]": russell_axiom λ κ . «κ'κ[Π]»
2119  by standard (metis "cqt:5:b[2]"[axiom_inst, THEN "→E"] "&E"(2))
2120interpretation "russell-axiom[enc,2,3]": russell_axiom λ κ . «κκ[Π]»
2121  by standard (metis "cqt:5:b[2]"[axiom_inst, THEN "→E"] "&E"(2))
2122interpretation "russell-axiom[enc,3,1,1]": russell_axiom λ κ . «κκ'κ''[Π]»
2123  by standard (metis "cqt:5:b[3]"[axiom_inst, THEN "→E"] "&E")
2124interpretation "russell-axiom[enc,3,1,2]": russell_axiom λ κ . «κ'κκ''[Π]»
2125  by standard (metis "cqt:5:b[3]"[axiom_inst, THEN "→E"] "&E")
2126interpretation "russell-axiom[enc,3,1,3]": russell_axiom λ κ . «κ'κ''κ[Π]»
2127  by standard (metis "cqt:5:b[3]"[axiom_inst, THEN "→E"] "&E"(2))
2128interpretation "russell-axiom[enc,3,2,1]": russell_axiom λ κ . «κκκ'[Π]»
2129  by standard (metis "cqt:5:b[3]"[axiom_inst, THEN "→E"] "&E")
2130interpretation "russell-axiom[enc,3,2,2]": russell_axiom λ κ . «κκ'κ[Π]»
2131  by standard (metis "cqt:5:b[3]"[axiom_inst, THEN "→E"] "&E"(2))
2132interpretation "russell-axiom[enc,3,2,3]": russell_axiom λ κ . «κ'κκ[Π]»
2133  by standard (metis "cqt:5:b[3]"[axiom_inst, THEN "→E"] "&E"(2))
2134interpretation "russell-axiom[enc,3,3]": russell_axiom λ κ . «κκκ[Π]»
2135  by standard (metis "cqt:5:b[3]"[axiom_inst, THEN "→E"] "&E"(2))
2136
2137AOT_act_theorem "!-exists:1": ιx φ{x}  ∃!x φ{x}
2138proof(rule "≡I"; rule "→I")
2139  AOT_assume ιx φ{x}
2140  AOT_hence y (y = ιx φ{x}) by (metis "rule=I:1" "existential:1")
2141  then AOT_obtain a where a = ιx φ{x}
2142    using "instantiation"[rotated] by blast
2143  AOT_hence φ{a} & z (φ{z}  z = a)
2144    using hintikka "≡E" by blast
2145  AOT_hence x (φ{x} & z (φ{z}  z = x))
2146    by (rule "∃I")
2147  AOT_thus ∃!x φ{x}
2148    using "uniqueness:1"[THEN "dfI"] by blast
2149next
2150  AOT_assume ∃!x φ{x}
2151  AOT_hence x (φ{x} & z (φ{z}  z = x))
2152    using "uniqueness:1"[THEN "dfE"] by blast
2153  then AOT_obtain b where φ{b} & z (φ{z}  z = b)
2154    using "instantiation"[rotated] by blast
2155  AOT_hence b = ιx φ{x}
2156    using hintikka "≡E" by blast
2157  AOT_thus ιx φ{x}
2158    by (metis "t=t-proper:2" "vdash-properties:6")
2159qed
2160
2161AOT_act_theorem "!-exists:2": y(y=ιx φ{x})  ∃!x φ{x}
2162  using "!-exists:1" "free-thms:1" "≡E"(6) by blast
2163
2164AOT_act_theorem "y-in:1": x = ιx φ{x}  φ{x}
2165  using "&E"(1) "→I" hintikka "≡E"(1) by blast
2166
2167(* Note: generalized alphabetic variant of the last theorem *)
2168AOT_act_theorem "y-in:2": z = ιx φ{x}  φ{z} using "y-in:1".
2169
2170AOT_act_theorem "y-in:3": ιx φ{x}  φ{ιx φ{x}}
2171proof(rule "→I")
2172  AOT_assume ιx φ{x}
2173  AOT_hence y (y = ιx φ{x})
2174    by (metis "rule=I:1" "existential:1")
2175  then AOT_obtain a where a = ιx φ{x}
2176    using "instantiation"[rotated] by blast
2177  moreover AOT_have φ{a}
2178    using calculation hintikka "≡E"(1) "&E" by blast
2179  ultimately AOT_show φ{ιx φ{x}} using "rule=E" by blast
2180qed
2181
2182AOT_act_theorem "y-in:4": y (y = ιx φ{x})  φ{ιx φ{x}}
2183  using "y-in:3"[THEN "→E"] "free-thms:1"[THEN "≡E"(2)] "→I" by blast
2184
2185
2186AOT_theorem "act-quant-nec":
2187  β (𝒜φ{β}  β = α)  β(𝒜𝒜φ{β}  β = α)
2188proof(rule "≡I"; rule "→I")
2189  AOT_assume β (𝒜φ{β}  β = α)
2190  AOT_hence 𝒜φ{β}  β = α for β using "∀E" by blast
2191  AOT_hence 𝒜𝒜φ{β}  β = α for β 
2192    by (metis "Act-Basic:5" "act-conj-act:4" "≡E"(1) "≡E"(5))
2193  AOT_thus β(𝒜𝒜φ{β}  β = α)
2194    by (rule "∀I")
2195next
2196  AOT_assume β(𝒜𝒜φ{β}  β = α)
2197  AOT_hence 𝒜𝒜φ{β}  β = α for β using "∀E" by blast
2198  AOT_hence 𝒜φ{β}  β = α for β
2199    by (metis "Act-Basic:5" "act-conj-act:4" "≡E"(1) "≡E"(6))
2200  AOT_thus β (𝒜φ{β}  β = α)
2201    by (rule "∀I")
2202qed
2203
2204AOT_theorem "equi-desc-descA:1": x = ιx φ{x}  x = ιx(𝒜φ{x})
2205proof -
2206  AOT_have x = ιx φ{x}  z (𝒜φ{z}  z = x)
2207    using descriptions[axiom_inst] by blast
2208  also AOT_have ...  z (𝒜𝒜φ{z}  z = x)
2209  proof(rule "≡I"; rule "→I"; rule "∀I")
2210    AOT_assume z (𝒜φ{z}  z = x)
2211    AOT_hence 𝒜φ{a}  a = x for a
2212      using "∀E" by blast
2213    AOT_thus 𝒜𝒜φ{a}  a = x for a
2214      by (metis "Act-Basic:5" "act-conj-act:4" "≡E"(1) "≡E"(5))
2215  next
2216    AOT_assume z (𝒜𝒜φ{z}  z = x)
2217    AOT_hence 𝒜𝒜φ{a}  a = x for a
2218      using "∀E" by blast
2219    AOT_thus 𝒜φ{a}  a = x for a
2220      by (metis "Act-Basic:5" "act-conj-act:4" "≡E"(1) "≡E"(6))
2221  qed
2222  also AOT_have ...  x = ιx(𝒜φ{x})
2223    using "Commutativity of ≡"[THEN "≡E"(1)] descriptions[axiom_inst] by fast
2224  finally show ?thesis .
2225qed
2226
2227AOT_theorem "equi-desc-descA:2": ιx φ{x}  ιx φ{x} = ιx(𝒜φ{x})
2228proof(rule "→I")
2229  AOT_assume ιx φ{x}
2230  AOT_hence y (y = ιx φ{x})
2231    by (metis "rule=I:1" "existential:1")
2232  then AOT_obtain a where a = ιx φ{x}
2233    using "instantiation"[rotated] by blast
2234  moreover AOT_have a = ιx(𝒜φ{x})
2235    using calculation "equi-desc-descA:1"[THEN "≡E"(1)] by blast
2236  ultimately AOT_show ιx φ{x} = ιx(𝒜φ{x})
2237    using "rule=E" by fast
2238qed
2239
2240AOT_theorem "nec-hintikka-scheme":
2241  x = ιx φ{x}  𝒜φ{x} & z(𝒜φ{z}  z = x)
2242proof -
2243  AOT_have x = ιx φ{x}  z(𝒜φ{z}  z = x)
2244    using descriptions[axiom_inst] by blast
2245  also AOT_have   (𝒜φ{x} & z(𝒜φ{z}  z = x))
2246    using "Commutativity of ≡"[THEN "≡E"(1)] "term-out:3" by fast
2247  finally show ?thesis.
2248qed
2249
2250AOT_theorem "equiv-desc-eq:1":
2251  𝒜x(φ{x}  ψ{x})  x (x = ιx φ{x}  x = ιx ψ{x})
2252proof(rule "→I"; rule "∀I")
2253  fix β
2254  AOT_assume 𝒜x(φ{x}  ψ{x})
2255  AOT_hence 𝒜(φ{x}  ψ{x}) for x
2256    using "logic-actual-nec:3"[axiom_inst, THEN "≡E"(1)] "∀E"(2) by blast
2257  AOT_hence 0: 𝒜φ{x}  𝒜ψ{x} for x
2258    by (metis "Act-Basic:5" "≡E"(1))
2259  AOT_have β = ιx φ{x}  𝒜φ{β} & z(𝒜φ{z}  z = β)
2260    using "nec-hintikka-scheme" by blast
2261  also AOT_have ...  𝒜ψ{β} & z(𝒜ψ{z}  z = β)
2262  proof (rule "≡I"; rule "→I")
2263    AOT_assume 1: 𝒜φ{β} & z(𝒜φ{z}  z = β)
2264    AOT_hence 𝒜φ{z}  z = β for z
2265      using "&E" "∀E" by blast
2266    AOT_hence 𝒜ψ{z}  z = β for z
2267      using 0 "≡E" "→I" "→E" by metis
2268    AOT_hence z(𝒜ψ{z}  z = β)
2269      using "∀I" by fast
2270    moreover AOT_have 𝒜ψ{β}
2271      using "&E" 0[THEN "≡E"(1)] 1 by blast
2272    ultimately AOT_show 𝒜ψ{β} & z(𝒜ψ{z}  z = β)
2273      using "&I" by blast
2274  next
2275    AOT_assume 1: 𝒜ψ{β} & z(𝒜ψ{z}  z = β)
2276    AOT_hence 𝒜ψ{z}  z = β for z
2277      using "&E" "∀E" by blast
2278    AOT_hence 𝒜φ{z}  z = β for z
2279      using 0 "≡E" "→I" "→E" by metis
2280    AOT_hence z(𝒜φ{z}  z = β)
2281      using "∀I" by fast
2282    moreover AOT_have 𝒜φ{β}
2283      using "&E" 0[THEN "≡E"(2)] 1 by blast
2284    ultimately AOT_show 𝒜φ{β} & z(𝒜φ{z}  z = β)
2285      using "&I" by blast
2286  qed
2287  also AOT_have ...  β = ιx ψ{x}
2288    using "Commutativity of ≡"[THEN "≡E"(1)] "nec-hintikka-scheme" by blast
2289  finally AOT_show β = ιx φ{x}  β = ιx ψ{x} .
2290qed
2291
2292AOT_theorem "equiv-desc-eq:2":
2293  ιx φ{x} & 𝒜x(φ{x}  ψ{x})  ιx φ{x} = ιx ψ{x}
2294proof(rule "→I")
2295  AOT_assume ιx φ{x} & 𝒜x(φ{x}  ψ{x})
2296  AOT_hence 0: y (y = ιx φ{x}) and
2297            1: x (x = ιx φ{x}  x = ιx ψ{x})
2298    using "&E" "free-thms:1"[THEN "≡E"(1)] "equiv-desc-eq:1" "→E" by blast+
2299  then AOT_obtain a where a = ιx φ{x}
2300    using "instantiation"[rotated] by blast
2301  moreover AOT_have a = ιx ψ{x}
2302    using calculation 1 "∀E" "≡E"(1) by fast
2303  ultimately AOT_show ιx φ{x} = ιx ψ{x}
2304    using "rule=E" by fast
2305qed
2306
2307AOT_theorem "equiv-desc-eq:3":
2308  ιx φ{x} & x(φ{x}  ψ{x})  ιx φ{x} = ιx ψ{x}
2309  using "→I" "equiv-desc-eq:2"[THEN "→E", OF "&I"] "&E"
2310        "nec-imp-act"[THEN "→E"] by metis
2311
2312(* Note: this is a special case of "exist-nec" *)
2313AOT_theorem "equiv-desc-eq:4": ιx φ{x}  ιx φ{x}
2314proof(rule "→I")
2315  AOT_assume ιx φ{x}
2316  AOT_hence y (y = ιx φ{x})
2317    by (metis "rule=I:1" "existential:1")
2318  then AOT_obtain a where a = ιx φ{x}
2319    using "instantiation"[rotated] by blast
2320  AOT_thus ιx φ{x}
2321    using "ex:2:a" "rule=E" by fast
2322qed
2323
2324AOT_theorem "equiv-desc-eq:5": ιx φ{x}  y (y = ιx φ{x})
2325proof(rule "→I")
2326  AOT_assume ιx φ{x}
2327  AOT_hence y (y = ιx φ{x})
2328    by (metis "rule=I:1" "existential:1")
2329  then AOT_obtain a where a = ιx φ{x}
2330    using "instantiation"[rotated] by blast
2331  AOT_hence (a = ιx φ{x})
2332    by (metis "id-nec:2" "vdash-properties:10")
2333  AOT_thus y (y = ιx φ{x})
2334    by (rule "∃I")
2335qed
2336
2337AOT_act_theorem "equiv-desc-eq2:1":
2338  x (φ{x}  ψ{x})  x (x = ιx φ{x}  x = ιx ψ{x})
2339  using "→I" "logic-actual"[act_axiom_inst, THEN "→E"]
2340        "equiv-desc-eq:1"[THEN "→E"]
2341        "RA[1]" "deduction-theorem" by blast
2342
2343AOT_act_theorem "equiv-desc-eq2:2":
2344  ιx φ{x} & x (φ{x}  ψ{x})  ιx φ{x} = ιx ψ{x}
2345  using "→I" "logic-actual"[act_axiom_inst, THEN "→E"]
2346        "equiv-desc-eq:2"[THEN "→E", OF "&I"]
2347        "RA[1]" "deduction-theorem" "&E" by metis
2348
2349context russell_axiom
2350begin
2351AOT_theorem "nec-russell-axiom":
2352  ψ{ιx φ{x}}  x(𝒜φ{x} & z(𝒜φ{z}  z = x) & ψ{x})
2353proof -
2354  AOT_have b: x (x = ιx φ{x}  (𝒜φ{x} & z(𝒜φ{z}  z = x)))
2355    using "nec-hintikka-scheme" "∀I" by fast
2356  show ?thesis
2357  proof(rule "≡I"; rule "→I")
2358    AOT_assume c: ψ{ιx φ{x}}
2359    AOT_hence d: ιx φ{x}
2360      using ψ_denotes_asm by blast
2361    AOT_hence y (y = ιx φ{x})
2362      by (metis "rule=I:1" "existential:1")
2363    then AOT_obtain a where a_def: a = ιx φ{x}
2364      using "instantiation"[rotated] by blast
2365    moreover AOT_have a = ιx φ{x}  (𝒜φ{a} & z(𝒜φ{z}  z = a))
2366      using b "∀E" by blast
2367    ultimately AOT_have 𝒜φ{a} & z(𝒜φ{z}  z = a)
2368      using "≡E" by blast
2369    moreover AOT_have ψ{a}
2370    proof - 
2371      AOT_have 1: xy(x = y  y = x)
2372        by (simp add: "id-eq:2" "universal-cor")
2373      AOT_have a = ιx φ{x}   ιx φ{x} = a
2374        by (rule "∀E"(1)[where τ="«ιx φ{x}»"]; rule "∀E"(2)[where β=a])
2375           (auto simp: d "universal-cor" 1)
2376      AOT_thus ψ{a}
2377        using a_def c "rule=E" "→E" by metis
2378    qed
2379    ultimately AOT_have 𝒜φ{a} & z(𝒜φ{z}  z = a) & ψ{a}
2380      by (rule "&I")
2381    AOT_thus x(𝒜φ{x} & z(𝒜φ{z}  z = x) & ψ{x})
2382      by (rule "∃I")
2383  next
2384    AOT_assume x(𝒜φ{x} & z(𝒜φ{z}  z = x) & ψ{x})
2385    then AOT_obtain b where g: 𝒜φ{b} & z(𝒜φ{z}  z = b) & ψ{b}
2386      using "instantiation"[rotated] by blast
2387    AOT_hence h: b = ιx φ{x}  (𝒜φ{b} & z(𝒜φ{z}  z = b))
2388      using b "∀E" by blast
2389    AOT_have 𝒜φ{b} & z(𝒜φ{z}  z = b) and j: ψ{b}
2390      using g "&E" by blast+
2391    AOT_hence b = ιx φ{x}
2392      using h "≡E" by blast
2393    AOT_thus ψ{ιx φ{x}}
2394      using j "rule=E" by blast
2395  qed
2396qed
2397end
2398
2399AOT_theorem "actual-desc:1": ιx φ{x}  ∃!x 𝒜φ{x}
2400proof (rule "≡I"; rule "→I")
2401  AOT_assume ιx φ{x}
2402  AOT_hence y (y = ιx φ{x})
2403    by (metis "rule=I:1" "existential:1")
2404  then AOT_obtain a where a = ιx φ{x}
2405    using "instantiation"[rotated] by blast
2406  moreover AOT_have a = ιx φ{x}  z(𝒜φ{z}  z = a)
2407    using descriptions[axiom_inst] by blast
2408  ultimately AOT_have z(𝒜φ{z}  z = a)
2409    using "≡E" by blast
2410  AOT_hence xz(𝒜φ{z}  z = x) by (rule "∃I")
2411  AOT_thus ∃!x 𝒜φ{x}
2412    using "uniqueness:2"[THEN "≡E"(2)] by fast
2413next
2414  AOT_assume ∃!x 𝒜φ{x}
2415  AOT_hence xz(𝒜φ{z}  z = x)
2416    using "uniqueness:2"[THEN "≡E"(1)] by fast
2417  then AOT_obtain a where z(𝒜φ{z}  z = a)
2418    using "instantiation"[rotated] by blast
2419  moreover AOT_have a = ιx φ{x}  z(𝒜φ{z}  z = a)
2420    using descriptions[axiom_inst] by blast
2421  ultimately AOT_have a = ιx φ{x}
2422    using "≡E" by blast
2423  AOT_thus ιx φ{x}
2424    by (metis "t=t-proper:2" "vdash-properties:6")
2425qed
2426
2427AOT_theorem "actual-desc:2": x = ιx φ{x}  𝒜φ{x}
2428  using "&E"(1) "contraposition:1[2]" "≡E"(1) "nec-hintikka-scheme"
2429        "reductio-aa:2" "vdash-properties:9" by blast
2430
2431(* Note: generalized alphabetic variant of the last theorem *)
2432AOT_theorem "actual-desc:3": z = ιx φ{x}  𝒜φ{z}
2433  using "actual-desc:2".
2434
2435AOT_theorem "actual-desc:4": ιx φ{x}  𝒜φ{ιx φ{x}}
2436proof(rule "→I")
2437  AOT_assume ιx φ{x}
2438  AOT_hence y (y = ιx φ{x}) by (metis "rule=I:1" "existential:1")
2439  then AOT_obtain a where a = ιx φ{x} using "instantiation"[rotated] by blast
2440  AOT_thus 𝒜φ{ιx φ{x}}
2441    using "actual-desc:2" "rule=E" "→E" by fast
2442qed
2443
2444AOT_theorem "actual-desc:5": ιx φ{x} = ιx ψ{x}  𝒜x(φ{x}  ψ{x})
2445proof(rule "→I")
2446  AOT_assume 0: ιx φ{x} = ιx ψ{x}
2447  AOT_hence φ_down: ιx φ{x} and ψ_down: ιx ψ{x}
2448    using "t=t-proper:1" "t=t-proper:2" "vdash-properties:6" by blast+
2449  AOT_hence y (y = ιx φ{x}) and y (y = ιx ψ{x})
2450    by (metis "rule=I:1" "existential:1")+
2451  then AOT_obtain a and b where a_eq: a = ιx φ{x} and b_eq: b = ιx ψ{x}
2452    using "instantiation"[rotated] by metis
2453
2454  AOT_have αβ (α = β  β = α)
2455    by (rule "∀I"; rule "∀I"; rule "id-eq:2")
2456  AOT_hence β (ιx φ{x} = β  β = ιx φ{x})
2457    using "∀E" φ_down by blast
2458  AOT_hence ιx φ{x} = ιx ψ{x}  ιx ψ{x} = ιx φ{x}
2459    using "∀E" ψ_down by blast
2460  AOT_hence 1: ιx ψ{x} = ιx φ{x} using 0
2461    "→E" by blast
2462
2463  AOT_have 𝒜φ{x}  𝒜ψ{x} for x
2464  proof(rule "≡I"; rule "→I")
2465    AOT_assume 𝒜φ{x}
2466    moreover AOT_have 𝒜φ{x}  x = a for x
2467      using "nec-hintikka-scheme"[THEN "≡E"(1), OF a_eq, THEN "&E"(2)]
2468            "∀E" by blast
2469    ultimately AOT_have x = a
2470      using "→E" by blast
2471    AOT_hence x = ιx φ{x}
2472      using a_eq "rule=E" by blast
2473    AOT_hence x = ιx ψ{x}
2474      using 0 "rule=E" by blast
2475    AOT_thus 𝒜ψ{x}
2476      by (metis "actual-desc:3" "vdash-properties:6")
2477  next
2478    AOT_assume 𝒜ψ{x}
2479    moreover AOT_have 𝒜ψ{x}  x = b for x
2480      using "nec-hintikka-scheme"[THEN "≡E"(1), OF b_eq, THEN "&E"(2)]
2481            "∀E" by blast
2482    ultimately AOT_have x = b
2483      using "→E" by blast
2484    AOT_hence x = ιx ψ{x}
2485      using b_eq "rule=E" by blast
2486    AOT_hence x = ιx φ{x}
2487      using 1 "rule=E" by blast
2488    AOT_thus 𝒜φ{x}
2489      by (metis "actual-desc:3" "vdash-properties:6")
2490  qed
2491  AOT_hence 𝒜(φ{x}  ψ{x}) for x
2492    by (metis "Act-Basic:5" "≡E"(2))
2493  AOT_hence x 𝒜(φ{x}  ψ{x})
2494    by (rule "∀I")
2495  AOT_thus 𝒜x (φ{x}  ψ{x})
2496    using "logic-actual-nec:3"[axiom_inst, THEN "≡E"(2)] by fast
2497qed    
2498
2499AOT_theorem "!box-desc:1": ∃!x φ{x}  y (y = ιx φ{x}  φ{y})
2500proof(rule "→I")
2501  AOT_assume ∃!x φ{x}
2502  AOT_hence ζ: x (φ{x} & z (φ{z}  z = x))
2503    using "uniqueness:1"[THEN "dfE"] by blast
2504  then AOT_obtain b where θ: φ{b} & z (φ{z}  z = b)
2505    using "instantiation"[rotated] by blast
2506  AOT_show y (y = ιx φ{x}  φ{y})
2507  proof(rule GEN; rule "→I")
2508    fix y
2509    AOT_assume y = ιx φ{x}
2510    AOT_hence 𝒜φ{y} & z (𝒜φ{z}  z = y)
2511      using "nec-hintikka-scheme"[THEN "≡E"(1)] by blast
2512    AOT_hence 𝒜φ{b}  b = y
2513      using "&E" "∀E" by blast
2514    moreover AOT_have 𝒜φ{b}
2515      using θ[THEN "&E"(1)]  by (metis "nec-imp-act" "→E")
2516    ultimately AOT_have b = y
2517      using "→E" by blast
2518    moreover AOT_have φ{b}
2519      using θ[THEN "&E"(1)]  by (metis "qml:2"[axiom_inst] "→E") 
2520    ultimately AOT_show φ{y}
2521      using "rule=E" by blast
2522  qed
2523qed
2524
2525AOT_theorem "!box-desc:2":
2526  x (φ{x}  φ{x})  (∃!x φ{x}  y (y = ιx φ{x}  φ{y}))
2527proof(rule "→I"; rule "→I")
2528  AOT_assume x (φ{x}  φ{x})
2529  moreover AOT_assume ∃!x φ{x}
2530  ultimately AOT_have ∃!x φ{x}
2531    using "nec-exist-!"[THEN "→E", THEN "→E"] by blast
2532  AOT_thus y (y = ιx φ{x}  φ{y})
2533    using "!box-desc:1" "→E" by blast
2534qed
2535
2536(* Note: vacuous in the embedding. *)
2537AOT_theorem "dr-alphabetic-thm": ιν φ{ν}  ιν φ{ν} = ιμ φ{μ}
2538  by (simp add: "rule=I:1" "→I")
2539
2540subsection‹The Theory of Necessity›
2541text‹\label{PLM: 9.9}›
2542
2543AOT_theorem "RM:1[prem]":
2544  assumes Γ  φ  ψ
2545  shows Γ  φ  ψ
2546proof -
2547  AOT_have Γ  (φ  ψ)
2548    using "RN[prem]" assms by blast
2549  AOT_thus Γ  φ  ψ
2550    by (metis "qml:1"[axiom_inst] "→E")
2551qed
2552
2553AOT_theorem "RM:1":
2554  assumes  φ  ψ
2555  shows  φ  ψ
2556  using "RM:1[prem]" assms by blast
2557
2558lemmas RM = "RM:1"
2559
2560AOT_theorem "RM:2[prem]":
2561  assumes Γ  φ  ψ
2562  shows Γ  φ  ψ
2563proof -
2564  AOT_have Γ  ¬ψ  ¬φ
2565    using assms 
2566    by (simp add: "contraposition:1[1]")
2567  AOT_hence Γ  ¬ψ  ¬φ
2568    using "RM:1[prem]" by blast
2569  AOT_thus Γ  φ  ψ
2570    by (meson "dfE" "dfI" "conventions:5" "→I" "modus-tollens:1")
2571qed
2572
2573AOT_theorem "RM:2":
2574  assumes  φ  ψ
2575  shows  φ  ψ
2576  using "RM:2[prem]" assms by blast
2577
2578lemmas "RM◇" = "RM:2"
2579
2580AOT_theorem "RM:3[prem]":
2581  assumes Γ  φ  ψ
2582  shows Γ  φ  ψ
2583proof -
2584  AOT_have Γ  φ  ψ and Γ  ψ  φ
2585    using assms "≡E" "→I" by metis+
2586  AOT_hence Γ  φ  ψ and Γ  ψ  φ
2587    using "RM:1[prem]" by metis+
2588  AOT_thus Γ  φ  ψ
2589    by (simp add: "≡I")
2590qed
2591
2592AOT_theorem "RM:3":
2593  assumes  φ  ψ
2594  shows  φ  ψ
2595  using "RM:3[prem]" assms by blast
2596
2597lemmas RE = "RM:3"
2598
2599AOT_theorem "RM:4[prem]":
2600  assumes Γ  φ  ψ
2601  shows Γ  φ  ψ
2602proof -
2603  AOT_have Γ  φ  ψ and Γ  ψ  φ
2604    using assms "≡E" "→I" by metis+
2605  AOT_hence Γ  φ  ψ and Γ  ψ  φ
2606    using "RM:2[prem]" by metis+
2607  AOT_thus Γ  φ  ψ
2608    by (simp add: "≡I")
2609qed
2610
2611AOT_theorem "RM:4":
2612  assumes  φ  ψ
2613  shows  φ  ψ
2614  using "RM:4[prem]" assms by blast
2615
2616lemmas "RE◇" = "RM:4"
2617
2618AOT_theorem "KBasic:1": φ  (ψ  φ)
2619  by (simp add: RM "pl:1"[axiom_inst])
2620
2621AOT_theorem "KBasic:2": ¬φ  (φ  ψ)
2622  by (simp add: RM "useful-tautologies:3")
2623
2624AOT_theorem "KBasic:3": (φ & ψ)  (φ & ψ)
2625proof (rule "≡I"; rule "→I")
2626  AOT_assume (φ & ψ)
2627  AOT_thus φ & ψ
2628    by (meson RM "&I" "Conjunction Simplification"(1, 2) "→E")
2629next
2630  AOT_have φ  (ψ  (φ & ψ))
2631    by (simp add: "RM:1" Adjunction)
2632  AOT_hence φ  (ψ  (φ & ψ))
2633    by (metis "Hypothetical Syllogism" "qml:1"[axiom_inst])
2634  moreover AOT_assume φ & ψ
2635  ultimately AOT_show (φ & ψ)
2636    using "→E" "&E" by blast
2637qed
2638
2639AOT_theorem "KBasic:4": (φ  ψ)  ((φ  ψ) & (ψ  φ))
2640proof -
2641  AOT_have θ: ((φ  ψ) & (ψ  φ))  ((φ  ψ) & (ψ  φ))
2642    by (fact "KBasic:3")
2643  AOT_modally_strict {
2644    AOT_have (φ  ψ)  ((φ  ψ) & (ψ  φ))
2645      by (fact "conventions:3"[THEN "≡Df"])
2646  }
2647  AOT_hence ξ: (φ  ψ)  ((φ  ψ) & (ψ  φ))
2648    by (rule RE)
2649  with ξ and θ AOT_show (φ  ψ)  ((φ  ψ) & (ψ  φ))
2650    using "≡E"(5) by blast
2651qed
2652
2653AOT_theorem "KBasic:5": ((φ  ψ) & (ψ  φ))  (φ  ψ)
2654proof -
2655  AOT_have (φ  ψ)  (φ  ψ)
2656    by (fact "qml:1"[axiom_inst])
2657  moreover AOT_have (ψ  φ)  (ψ  φ)
2658    by (fact "qml:1"[axiom_inst])
2659  ultimately AOT_have ((φ  ψ) & (ψ  φ))  ((φ  ψ) & (ψ  φ))
2660    by (metis "&I" MP "Double Composition")
2661  moreover AOT_have ((φ  ψ) & (ψ  φ))  (φ  ψ)
2662    using "conventions:3"[THEN "dfI"] "→I" by blast
2663  ultimately AOT_show ((φ  ψ) & (ψ  φ))  (φ  ψ)
2664    by (metis "Hypothetical Syllogism")
2665qed
2666
2667AOT_theorem "KBasic:6": (φ  ψ)  (φ  ψ)
2668  using "KBasic:4" "KBasic:5" "deduction-theorem" "≡E"(1) "→E" by blast
2669AOT_theorem "KBasic:7": ((φ & ψ)  (¬φ & ¬ψ))  (φ  ψ)
2670proof (rule "→I"; drule "∨E"(1); (rule "→I")?)
2671  AOT_assume φ & ψ
2672  AOT_hence φ and ψ using "&E" by blast+
2673  AOT_hence (φ  ψ) and (ψ  φ) using "KBasic:1" "→E" by blast+
2674  AOT_hence (φ  ψ) & (ψ  φ) using "&I" by blast
2675  AOT_thus (φ  ψ)  by (metis "KBasic:4" "≡E"(2))
2676next
2677  AOT_assume ¬φ & ¬ψ
2678  AOT_hence 0: (¬φ & ¬ψ) using "KBasic:3"[THEN "≡E"(2)] by blast
2679  AOT_modally_strict {
2680    AOT_have (¬φ & ¬ψ)  (φ  ψ)
2681      by (metis "&E"(1) "&E"(2) "deduction-theorem" "≡I" "reductio-aa:1")
2682  }
2683  AOT_hence (¬φ & ¬ψ)  (φ  ψ)
2684    by (rule RM)
2685  AOT_thus (φ  ψ) using 0 "→E" by blast
2686qed(auto)
2687
2688AOT_theorem "KBasic:8": (φ & ψ)  (φ  ψ)
2689  by (meson "RM:1" "&E"(1) "&E"(2) "deduction-theorem" "≡I")
2690AOT_theorem "KBasic:9": (¬φ & ¬ψ)  (φ  ψ)
2691  by (metis "RM:1" "&E"(1) "&E"(2) "deduction-theorem" "≡I" "raa-cor:4")
2692AOT_theorem "KBasic:10": φ  ¬¬φ
2693  by (simp add: "RM:3" "oth-class-taut:3:b")
2694AOT_theorem "KBasic:11": ¬φ  ¬φ
2695proof (rule "≡I"; rule "→I")
2696  AOT_show ¬φ if ¬φ
2697    using that "dfI" "conventions:5" "KBasic:10" "≡E"(3) by blast
2698next
2699  AOT_show ¬φ if ¬φ
2700    using "dfE" "conventions:5" "KBasic:10" "≡E"(4) that by blast
2701qed
2702AOT_theorem "KBasic:12": φ  ¬¬φ
2703proof (rule "≡I"; rule "→I")
2704  AOT_show ¬¬φ if φ
2705    using "¬¬I" "KBasic:11" "≡E"(3) that by blast
2706next
2707  AOT_show φ if ¬¬φ
2708  using "KBasic:11" "≡E"(1) "reductio-aa:1" that by blast
2709qed
2710AOT_theorem "KBasic:13": (φ  ψ)  (φ  ψ)
2711proof -
2712  AOT_have φ  ψ  φ  ψ by blast
2713  AOT_hence (φ  ψ)  φ  ψ
2714    using "RM:2[prem]" by blast
2715  AOT_thus (φ  ψ)  (φ  ψ) using "→I" by blast
2716qed
2717lemmas "K◇" = "KBasic:13"
2718AOT_theorem "KBasic:14": φ  ¬¬φ
2719  by (meson "RE◇" "KBasic:11" "KBasic:12" "≡E"(6) "oth-class-taut:3:a")
2720AOT_theorem "KBasic:15": (φ  ψ)  (φ  ψ)
2721proof -
2722  AOT_modally_strict {
2723    AOT_have φ  (φ  ψ) and ψ  (φ  ψ)
2724      by (auto simp: "Disjunction Addition"(1) "Disjunction Addition"(2))
2725  }
2726  AOT_hence φ  (φ  ψ) and ψ  (φ  ψ)
2727    using RM by blast+
2728  AOT_thus (φ  ψ)  (φ  ψ)
2729    by (metis "∨E"(1) "deduction-theorem")
2730qed
2731
2732AOT_theorem "KBasic:16": (φ & ψ)  (φ & ψ)
2733  by (meson "KBasic:13" "RM:1" Adjunction "Hypothetical Syllogism"
2734            Importation "→E")
2735
2736AOT_theorem "rule-sub-lem:1:a":
2737  assumes  (ψ  χ)
2738  shows  ¬ψ  ¬χ
2739  using "qml:2"[axiom_inst, THEN "→E", OF assms]
2740        "≡E"(1) "oth-class-taut:4:b" by blast
2741
2742AOT_theorem "rule-sub-lem:1:b":
2743  assumes  (ψ  χ)
2744  shows  (ψ  Θ)  (χ  Θ)
2745  using "qml:2"[axiom_inst, THEN "→E", OF assms]
2746  using "oth-class-taut:4:c" "vdash-properties:6" by blast
2747
2748AOT_theorem "rule-sub-lem:1:c":
2749  assumes  (ψ  χ)
2750  shows  (Θ  ψ)  (Θ  χ)
2751  using "qml:2"[axiom_inst, THEN "→E", OF assms]
2752  using "oth-class-taut:4:d" "vdash-properties:6" by blast
2753
2754AOT_theorem "rule-sub-lem:1:d":
2755  assumes for arbitrary α:  (ψ{α}  χ{α})
2756  shows  α ψ{α}  α χ{α}
2757proof -
2758  AOT_modally_strict {
2759    AOT_have α (ψ{α}  χ{α})
2760      using "qml:2"[axiom_inst, THEN "→E", OF assms] "∀I" by fast
2761    AOT_hence 0: ψ{α}  χ{α} for α using "∀E" by blast
2762    AOT_show α ψ{α}  α χ{α}
2763    proof (rule "≡I"; rule "→I")
2764      AOT_assume α ψ{α}
2765      AOT_hence ψ{α} for α using "∀E" by blast
2766      AOT_hence χ{α} for α using 0 "≡E" by blast
2767      AOT_thus α χ{α} by (rule "∀I")
2768    next
2769      AOT_assume α χ{α}
2770      AOT_hence χ{α} for α using "∀E" by blast
2771      AOT_hence ψ{α} for α using 0 "≡E" by blast
2772      AOT_thus α ψ{α} by (rule "∀I")
2773    qed
2774  }
2775qed
2776
2777AOT_theorem "rule-sub-lem:1:e":
2778  assumes  (ψ  χ)
2779  shows   ψ]   χ]
2780  using "qml:2"[axiom_inst, THEN "→E", OF assms]
2781  using "≡E"(1) "propositions-lemma:6" by blast
2782
2783AOT_theorem "rule-sub-lem:1:f":
2784  assumes  (ψ  χ)
2785  shows  𝒜ψ  𝒜χ
2786  using "qml:2"[axiom_inst, THEN "→E", OF assms, THEN "RA[2]"]
2787  by (metis "Act-Basic:5" "≡E"(1))
2788
2789AOT_theorem "rule-sub-lem:1:g":
2790  assumes  (ψ  χ)
2791  shows  ψ  χ
2792  using "KBasic:6" assms "vdash-properties:6" by blast
2793
2794text‹Note that instead of deriving @{text "rule-sub-lem:2"},
2795     @{text "rule-sub-lem:3"}, @{text "rule-sub-lem:4"},
2796     and @{text "rule-sub-nec"}, we construct substitution methods instead.›
2797
2798class AOT_subst =
2799  fixes AOT_subst :: "('a  𝗈)  bool"
2800    and AOT_subst_cond :: "'a  'a  bool"
2801  assumes AOT_subst:
2802    "AOT_subst φ  AOT_subst_cond ψ χ  [v  «φ ψ»  «φ χ»]"
2803
2804named_theorems AOT_substI
2805
2806instantiation 𝗈 :: AOT_subst
2807begin
2808
2809inductive AOT_subst_𝗈 where
2810  AOT_subst_𝗈_id[AOT_substI]:
2811    AOT_subst_𝗈 (λφ. φ)
2812  | AOT_subst_𝗈_const[AOT_substI]:
2813    AOT_subst_𝗈 (λφ. ψ)
2814  | AOT_subst_𝗈_not[AOT_substI]:
2815    AOT_subst_𝗈 Θ  AOT_subst_𝗈 (λ φ. «¬Θ{φ}»)
2816  | AOT_subst_𝗈_imp[AOT_substI]:
2817    AOT_subst_𝗈 Θ  AOT_subst_𝗈 Ξ  AOT_subst_𝗈 (λ φ. «Θ{φ}  Ξ{φ}»)
2818  | AOT_subst_𝗈_lambda0[AOT_substI]:
2819    AOT_subst_𝗈 Θ  AOT_subst_𝗈 (λ φ. (AOT_lambda0 (Θ φ)))
2820  | AOT_subst_𝗈_act[AOT_substI]:
2821    AOT_subst_𝗈 Θ  AOT_subst_𝗈 (λ φ. «𝒜Θ{φ}»)
2822  | AOT_subst_𝗈_box[AOT_substI]:
2823    AOT_subst_𝗈 Θ  AOT_subst_𝗈 (λ φ. «Θ{φ}»)
2824  | AOT_subst_𝗈_by_def[AOT_substI]:
2825    ( ψ . AOT_model_equiv_def (Θ ψ) (Ξ ψ)) 
2826      AOT_subst_𝗈 Ξ  AOT_subst_𝗈 Θ
2827
2828
2829definition AOT_subst_cond_𝗈 where
2830  AOT_subst_cond_𝗈  λ ψ χ .  v . [v  ψ  χ]
2831
2832instance
2833proof
2834  fix ψ χ :: 𝗈 and φ :: 𝗈  𝗈
2835  assume cond: AOT_subst_cond ψ χ
2836  assume AOT_subst φ
2837  moreover AOT_have  ψ  χ
2838    using cond unfolding AOT_subst_cond_𝗈_def by blast
2839  ultimately AOT_show  φ{ψ}  φ{χ}
2840  proof (induct arbitrary: ψ χ)
2841    case AOT_subst_𝗈_id
2842    thus ?case
2843      using "≡E"(2) "oth-class-taut:4:b" "rule-sub-lem:1:a" by blast
2844  next
2845    case (AOT_subst_𝗈_const ψ)
2846    thus ?case
2847      by (simp add: "oth-class-taut:3:a")
2848  next
2849    case (AOT_subst_𝗈_not Θ)
2850    thus ?case
2851      by (simp add: RN "rule-sub-lem:1:a")
2852  next
2853    case (AOT_subst_𝗈_imp Θ Ξ)
2854    thus ?case
2855      by (meson RN "≡E"(5) "rule-sub-lem:1:b" "rule-sub-lem:1:c")
2856  next
2857    case (AOT_subst_𝗈_lambda0 Θ)
2858    thus ?case
2859      by (simp add: RN "rule-sub-lem:1:e")
2860  next
2861    case (AOT_subst_𝗈_act Θ)
2862    thus ?case
2863      by (simp add: RN "rule-sub-lem:1:f")
2864  next
2865    case (AOT_subst_𝗈_box Θ)
2866    thus ?case
2867      by (simp add: RN "rule-sub-lem:1:g")
2868  next
2869    case (AOT_subst_𝗈_by_def Θ Ξ)
2870    AOT_modally_strict {
2871      AOT_have Ξ{ψ}  Ξ{χ}
2872        using AOT_subst_𝗈_by_def by simp
2873      AOT_thus Θ{ψ}  Θ{χ}
2874        using "≡Df"[OF AOT_subst_𝗈_by_def(1), of _ ψ]
2875              "≡Df"[OF AOT_subst_𝗈_by_def(1), of _ χ]
2876        by (metis "≡E"(6) "oth-class-taut:3:a")
2877    }
2878  qed
2879qed
2880end
2881
2882instantiation "fun" :: (AOT_Term_id_2, AOT_subst) AOT_subst
2883begin
2884
2885definition AOT_subst_cond_fun :: ('a  'b)  ('a  'b)  bool where
2886  AOT_subst_cond_fun  λ φ ψ .  α . AOT_subst_cond (φ (AOT_term_of_var α))
2887                                                      (ψ (AOT_term_of_var α))
2888
2889inductive AOT_subst_fun :: (('a  'b)  𝗈)  bool where
2890  AOT_subst_fun_const[AOT_substI]:
2891    AOT_subst_fun (λφ. ψ)
2892  | AOT_subst_fun_id[AOT_substI]:
2893    AOT_subst Ψ  AOT_subst_fun (λφ. Ψ (φ (AOT_term_of_var α)))
2894  | AOT_subst_fun_all[AOT_substI]:
2895    AOT_subst Ψ  ( α . AOT_subst_fun (Θ (AOT_term_of_var α))) 
2896     AOT_subst_fun (λφ :: 'a  'b. Ψ «α «Θ (α::'a) φ»»)
2897  | AOT_subst_fun_not[AOT_substI]:
2898    AOT_subst Ψ  AOT_subst_fun (λφ. «¬«Ψ φ»»)
2899  | AOT_subst_fun_imp[AOT_substI]:
2900    AOT_subst Ψ  AOT_subst Θ  AOT_subst_fun (λφ. ««Ψ φ»  «Θ φ»»)
2901  | AOT_subst_fun_lambda0[AOT_substI]:
2902    AOT_subst Θ  AOT_subst_fun (λ φ. (AOT_lambda0 (Θ φ)))
2903  | AOT_subst_fun_act[AOT_substI]:
2904    AOT_subst Θ  AOT_subst_fun (λ φ. «𝒜«Θ φ»»)
2905  | AOT_subst_fun_box[AOT_substI]:
2906    AOT_subst Θ  AOT_subst_fun (λ φ. ««Θ φ»»)
2907  | AOT_subst_fun_def[AOT_substI]:
2908    ( φ . AOT_model_equiv_def (Θ φ) (Ψ φ)) 
2909     AOT_subst_fun Ψ  AOT_subst_fun Θ
2910
2911instance proof
2912  fix ψ χ :: 'a  'b and φ :: ('a  'b)  𝗈
2913  assume AOT_subst φ
2914  moreover assume cond: AOT_subst_cond ψ χ
2915  ultimately AOT_show  «φ ψ»  «φ χ»
2916  proof(induct)
2917    case (AOT_subst_fun_const ψ)
2918    then show ?case by (simp add: "oth-class-taut:3:a")
2919  next
2920  case (AOT_subst_fun_id Ψ x)
2921  then show ?case by (simp add: AOT_subst AOT_subst_cond_fun_def) 
2922  next
2923  next
2924  case (AOT_subst_fun_all Ψ Θ)
2925  AOT_have  (Θ{α, «ψ»}  Θ{α, «χ»}) for α
2926    using AOT_subst_fun_all.hyps(3) AOT_subst_fun_all.prems RN by presburger
2927  thus ?case using AOT_subst[OF AOT_subst_fun_all(1)]
2928    by (simp add: RN "rule-sub-lem:1:d"
2929                  AOT_subst_cond_fun_def AOT_subst_cond_𝗈_def)
2930  next
2931  case (AOT_subst_fun_not Ψ)
2932  then show ?case by (simp add: RN "rule-sub-lem:1:a")
2933  next
2934  case (AOT_subst_fun_imp Ψ Θ)
2935  then show ?case 
2936    unfolding AOT_subst_cond_fun_def AOT_subst_cond_𝗈_def
2937    by (meson "≡E"(5) "oth-class-taut:4:c" "oth-class-taut:4:d" "→E")
2938  next
2939  case (AOT_subst_fun_lambda0 Θ)
2940  then show ?case by (simp add: RN "rule-sub-lem:1:e")
2941  next
2942  case (AOT_subst_fun_act Θ)
2943  then show ?case by (simp add: RN "rule-sub-lem:1:f")
2944  next
2945  case (AOT_subst_fun_box Θ)
2946  then show ?case by (simp add: RN "rule-sub-lem:1:g")
2947  next
2948  case (AOT_subst_fun_def Θ Ψ)
2949  then show ?case
2950    by (meson "df-rules-formulas[3]" "df-rules-formulas[4]" "≡I" "≡E"(5))
2951  qed
2952qed
2953end
2954
2955ML2956fun prove_AOT_subst_tac ctxt = REPEAT (SUBGOAL (fn (trm,_) => let
2957  fun findHeadConst (Const x) = SOME x
2958    | findHeadConst (A $ _) = findHeadConst A
2959    | findHeadConst _ = NONE
2960  fun findDef (Const (const_nameAOT_model_equiv_def, _) $ lhs $ _)
2961      = findHeadConst lhs
2962    | findDef (A $ B) = (case findDef A of SOME x => SOME x | _ => findDef B)
2963    | findDef (Abs (_,_,c)) = findDef c
2964    | findDef _ = NONE
2965  val const_opt = (findDef trm)
2966  val defs = case const_opt of SOME const => List.filter (fn thm => let
2967      val concl = Thm.concl_of thm
2968      val thmconst = (findDef concl)
2969      in case thmconst of SOME (c,_) => fst const = c | _ => false end)
2970      (AOT_Definitions.get ctxt)
2971      | _ => []
2972  val tac = case defs of
2973            [] => safe_step_tac (ctxt addSIs @{thms AOT_substI}) 1
2974            | _ => resolve_tac ctxt defs 1
2975  in tac end) 1)
2976fun getSubstThm ctxt reversed phi p q = let
2977val p_ty = Term.type_of p
2978val abs = HOLogic.mk_Trueprop (@{const AOT_subst(_)} $ phi)
2979val abs = Syntax.check_term ctxt abs
2980val substThm = Goal.prove ctxt [] [] abs
2981  (fn {context=ctxt, prems=_} => prove_AOT_subst_tac ctxt)
2982val substThm = substThm RS @{thm AOT_subst}
2983in if reversed then let
2984  val substThm = Drule.instantiate_normalize
2985          (TVars.empty, Vars.make [((("χ", 0), p_ty), Thm.cterm_of ctxt p),
2986          ((("ψ", 0), p_ty), Thm.cterm_of ctxt q)]) substThm
2987  val substThm = substThm RS @{thm "≡E"(1)}
2988  in substThm end
2989else
2990  let
2991  val substThm = Drule.instantiate_normalize
2992          (TVars.empty, Vars.make [((("ψ", 0), p_ty), Thm.cterm_of ctxt p),
2993          ((("χ", 0), p_ty), Thm.cterm_of ctxt q)]) substThm
2994  val substThm = substThm RS @{thm "≡E"(2)}
2995  in substThm end end
2996
2997
2998method_setup AOT_subst = 2999Scan.option (Scan.lift (Args.parens (Args.$$$ "reverse"))) --
3000Scan.lift (Parse.embedded_inner_syntax -- Parse.embedded_inner_syntax) --
3001Scan.option (Scan.lift (Args.$$$ "for" -- Args.colon) |--
3002Scan.repeat1 (Scan.lift (Parse.embedded_inner_syntax) --
3003Scan.option (Scan.lift (Args.$$$ "::" |-- Parse.embedded_inner_syntax))))
3004>> (fn ((reversed,(raw_p,raw_q)),raw_bounds) => (fn ctxt =>
3005(Method.SIMPLE_METHOD (Subgoal.FOCUS (fn {context = ctxt, params = _,
3006  prems = prems, asms = asms, concl = concl, schematics = _} =>
3007let
3008val thms = prems
3009val ctxt' = ctxt
3010val ctxt = Context_Position.set_visible false ctxt
3011val raw_bounds = case raw_bounds of SOME bounds => bounds | _ => []
3012
3013val ctxt = (fold (fn (bound, ty) => fn ctxt =>
3014  let
3015    val bound = AOT_read_term @{nonterminal τ'} ctxt bound
3016    val ty = Option.map (Syntax.read_typ ctxt) ty
3017    val ctxt = case ty of SOME ty => let
3018        val bound = Const ("_type_constraint_", Type ("fun", [ty,ty])) $ bound
3019        val bound = Syntax.check_term ctxt bound
3020      in Variable.declare_term bound ctxt end | _ => ctxt
3021  in ctxt end)) raw_bounds ctxt
3022
3023val p = AOT_read_term @{nonterminal φ'} ctxt raw_p
3024val p = Syntax.check_term ctxt p
3025val ctxt = Variable.declare_term p ctxt
3026val q = AOT_read_term @{nonterminal φ'} ctxt raw_q
3027val q = Syntax.check_term ctxt q
3028val ctxt = Variable.declare_term q ctxt
3029
3030val bounds = (map (fn (bound, _) =>
3031  Syntax.check_term ctxt (AOT_read_term @{nonterminal τ'} ctxt bound)
3032)) raw_bounds
3033val p = fold (fn bound => fn p =>
3034  Term.abs ("α", Term.type_of bound) (Term.abstract_over (bound,p)))
3035  bounds p
3036val p = Syntax.check_term ctxt p
3037val p_ty = Term.type_of p
3038
3039val pat = @{const Trueprop} $
3040  (@{const AOT_model_valid_in} $ Var (("w",0), @{typ w}) $
3041   (Var (("φ",0), Type (type_namefun, [p_ty, @{typ 𝗈}])) $ p))
3042val univ = Unify.matchers (Context.Proof ctxt) [(pat, Thm.term_of concl)]
3043val univ = hd (Seq.list_of univ) (* TODO: consider all matches *)
3044val phi = the (Envir.lookup univ
3045  (("φ",0), Type (type_namefun, [p_ty, @{typ 𝗈}])))
3046
3047val q = fold (fn bound => fn q =>
3048  Term.abs ("α", Term.type_of bound) (Term.abstract_over (bound,q))) bounds q
3049val q = Syntax.check_term ctxt q
3050
3051(* Reparse to report bounds as fixes. *)
3052val ctxt = Context_Position.restore_visible ctxt' ctxt
3053val ctxt' = ctxt
3054fun unsource str = fst (Input.source_content (Syntax.read_input str))
3055val (_,ctxt') = Proof_Context.add_fixes (map (fn (str,_) =>
3056  (Binding.make (unsource str, Position.none), NONE, Mixfix.NoSyn)) raw_bounds)
3057  ctxt'
3058val _ = (map (fn (x,_) =>
3059  Syntax.check_term ctxt (AOT_read_term @{nonterminal τ'} ctxt' x)))
3060  raw_bounds
3061val _ = AOT_read_term @{nonterminal φ'} ctxt' raw_p
3062val _ = AOT_read_term @{nonterminal φ'} ctxt' raw_q
3063val reversed = case reversed of SOME _ => true | _ => false
3064val simpThms = [@{thm AOT_subst_cond_𝗈_def}, @{thm AOT_subst_cond_fun_def}]
3065in
3066resolve_tac ctxt [getSubstThm ctxt reversed phi p q] 1
3067THEN simp_tac (ctxt addsimps simpThms) 1
3068THEN (REPEAT (resolve_tac ctxt [@{thm allI}] 1))
3069THEN (TRY (resolve_tac ctxt thms 1))
3070end
3071) ctxt 1))))
3072
3073
3074method_setup AOT_subst_def = 3075Scan.option (Scan.lift (Args.parens (Args.$$$ "reverse"))) --
3076Attrib.thm
3077>> (fn (reversed,fact) => (fn ctxt =>
3078(Method.SIMPLE_METHOD (Subgoal.FOCUS (fn {context = ctxt, params = _,
3079  prems = prems, asms = asms, concl = concl, schematics = _} =>
3080let
3081val c = Thm.concl_of fact
3082val (lhs, rhs) = case c of (constTrueprop $
3083    (constAOT_model_equiv_def $ lhs $ rhs)) => (lhs, rhs)
3084  | _ => raise Fail "Definition expected."
3085val substCond = HOLogic.mk_Trueprop
3086  (Const (const_nameAOT_subst_cond, dummyT) $ lhs $ rhs)
3087val substCond = Syntax.check_term
3088  (Proof_Context.set_mode Proof_Context.mode_schematic ctxt)
3089  substCond
3090val simpThms = [@{thm AOT_subst_cond_𝗈_def},
3091  @{thm AOT_subst_cond_fun_def},
3092  fact RS @{thm "≡Df"}]
3093val substCondThm = Goal.prove ctxt [] [] substCond
3094  (fn {context=ctxt, prems=prems} =>
3095      (SUBGOAL (fn (trm,int) =>
3096        auto_tac (ctxt addsimps simpThms)) 1))
3097val substThm = substCondThm RSN (2,@{thm AOT_subst})
3098in
3099resolve_tac ctxt [substThm RS
3100  (case reversed of NONE => @{thm "≡E"(2)} | _ => @{thm "≡E"(1)})] 1
3101THEN prove_AOT_subst_tac ctxt
3102THEN (TRY (resolve_tac ctxt prems 1))
3103end
3104) ctxt 1))))
3105
3106
3107method_setup AOT_subst_thm = 3108Scan.option (Scan.lift (Args.parens (Args.$$$ "reverse"))) --
3109Attrib.thm
3110>> (fn (reversed,fact) => (fn ctxt =>
3111(Method.SIMPLE_METHOD (Subgoal.FOCUS (fn {context = ctxt, params = _,
3112  prems = prems, asms = asms, concl = concl, schematics = _} =>
3113let
3114val c = Thm.concl_of fact
3115val (lhs, rhs) = case c of
3116  (constTrueprop $
3117   (constAOT_model_valid_in $ _ $
3118    (constAOT_equiv $ lhs $ rhs))) => (lhs, rhs)
3119  | _ => raise Fail "Equivalence expected."
3120
3121val substCond = HOLogic.mk_Trueprop
3122  (Const (const_nameAOT_subst_cond, dummyT) $ lhs $ rhs)
3123val substCond = Syntax.check_term
3124  (Proof_Context.set_mode Proof_Context.mode_schematic ctxt)
3125  substCond
3126val simpThms = [@{thm AOT_subst_cond_𝗈_def},
3127  @{thm AOT_subst_cond_fun_def},
3128  fact]
3129val substCondThm = Goal.prove ctxt [] [] substCond
3130  (fn {context=ctxt, prems=prems} =>
3131      (SUBGOAL (fn (trm,int) => auto_tac (ctxt addsimps simpThms)) 1))
3132val substThm = substCondThm RSN (2,@{thm AOT_subst})
3133in
3134resolve_tac ctxt [substThm RS
3135  (case reversed of NONE => @{thm "≡E"(2)} | _ => @{thm "≡E"(1)})] 1
3136THEN prove_AOT_subst_tac ctxt
3137THEN (TRY (resolve_tac ctxt prems 1))
3138end
3139) ctxt 1))))
3140
3141
3142AOT_theorem "rule-sub-remark:1[1]":
3143  assumes  A!x  ¬E!x and ¬A!x
3144  shows ¬¬E!x
3145  by (AOT_subst (reverse) ¬E!x A!x)
3146     (auto simp: assms) 
3147
3148AOT_theorem "rule-sub-remark:1[2]":
3149  assumes  A!x  ¬E!x and  ¬¬E!x
3150  shows ¬A!x
3151  by (AOT_subst A!x ¬E!x)
3152     (auto simp: assms)
3153
3154AOT_theorem "rule-sub-remark:2[1]":
3155  assumes  [R]xy  ([R]xy & ([Q]a  ¬[Q]a))
3156      and p  [R]xy
3157  shows p  [R]xy & ([Q]a  ¬[Q]a)
3158  by (AOT_subst_thm (reverse) assms(1)) (simp add: assms(2))
3159
3160AOT_theorem "rule-sub-remark:2[2]":
3161  assumes  [R]xy  ([R]xy & ([Q]a  ¬[Q]a))
3162      and p  [R]xy & ([Q]a  ¬[Q]a)
3163  shows p  [R]xy
3164  by (AOT_subst_thm assms(1)) (simp add: assms(2))
3165
3166AOT_theorem "rule-sub-remark:3[1]":
3167  assumes for arbitrary x:  A!x  ¬E!x
3168      and x A!x
3169    shows x ¬E!x
3170  by (AOT_subst (reverse) ¬E!x A!x for: x)
3171     (auto simp: assms)
3172
3173AOT_theorem "rule-sub-remark:3[2]":
3174  assumes for arbitrary x:  A!x  ¬E!x
3175      and x ¬E!x
3176    shows x A!x
3177  by (AOT_subst A!x ¬E!x for: x)
3178     (auto simp: assms)
3179
3180AOT_theorem "rule-sub-remark:4[1]":
3181  assumes  ¬¬[P]x  [P]x and 𝒜¬¬[P]x
3182  shows 𝒜[P]x
3183  by (AOT_subst_thm (reverse) assms(1)) (simp add: assms(2))
3184
3185AOT_theorem "rule-sub-remark:4[2]":
3186  assumes  ¬¬[P]x  [P]x and 𝒜[P]x
3187  shows 𝒜¬¬[P]x
3188  by (AOT_subst_thm assms(1)) (simp add: assms(2))
3189
3190AOT_theorem "rule-sub-remark:5[1]":
3191  assumes  (φ  ψ)  (¬ψ  ¬φ) and (φ  ψ)
3192  shows (¬ψ  ¬φ)
3193  by (AOT_subst_thm (reverse) assms(1)) (simp add: assms(2))
3194
3195AOT_theorem "rule-sub-remark:5[2]":
3196  assumes  (φ  ψ)  (¬ψ  ¬φ) and (¬ψ  ¬φ)
3197  shows (φ  ψ) 
3198  by (AOT_subst_thm assms(1)) (simp add: assms(2))
3199
3200AOT_theorem "rule-sub-remark:6[1]":
3201  assumes  ψ  χ and (φ  ψ)
3202  shows (φ  χ) 
3203  by (AOT_subst_thm (reverse) assms(1)) (simp add: assms(2))
3204
3205AOT_theorem "rule-sub-remark:6[2]":
3206  assumes  ψ  χ and (φ  χ)
3207  shows (φ  ψ)
3208  by (AOT_subst_thm assms(1)) (simp add: assms(2))
3209
3210AOT_theorem "rule-sub-remark:7[1]":
3211  assumes  φ  ¬¬φ and (φ  φ)
3212  shows (¬¬φ  φ) 
3213  by (AOT_subst_thm (reverse) assms(1)) (simp add: assms(2))
3214
3215AOT_theorem "rule-sub-remark:7[2]":
3216  assumes  φ  ¬¬φ and (¬¬φ  φ)
3217  shows (φ  φ)
3218  by (AOT_subst_thm assms(1)) (simp add: assms(2))
3219
3220AOT_theorem "KBasic2:1": ¬φ  ¬φ
3221  by (meson "conventions:5" "contraposition:2"
3222            "Hypothetical Syllogism" "df-rules-formulas[3]"
3223            "df-rules-formulas[4]" "≡I" "useful-tautologies:1")
3224
3225AOT_theorem "KBasic2:2": (φ  ψ)  (φ  ψ)
3226proof -
3227  AOT_have (φ  ψ)  ¬(¬φ & ¬ψ)
3228    by (simp add: "RE◇" "oth-class-taut:5:b")
3229  also AOT_have   ¬(¬φ & ¬ψ)
3230    using "KBasic:11" "≡E"(6) "oth-class-taut:3:a" by blast
3231  also AOT_have   ¬(¬φ & ¬ψ)
3232    using "KBasic:3" "≡E"(1) "oth-class-taut:4:b" by blast
3233  also AOT_have   ¬(¬φ & ¬ψ)
3234    using "KBasic2:1"
3235    by (AOT_subst ¬φ ¬φ; AOT_subst ¬ψ ¬ψ;
3236        auto simp: "oth-class-taut:3:a")
3237  also AOT_have   ¬¬(φ  ψ)
3238    using "≡E"(6) "oth-class-taut:3:b" "oth-class-taut:5:b" by blast
3239  also AOT_have   φ  ψ
3240    by (simp add: "≡I" "useful-tautologies:1" "useful-tautologies:2")
3241  finally show ?thesis .
3242qed
3243
3244AOT_theorem "KBasic2:3": (φ & ψ)  (φ & ψ)
3245  by (metis "RM◇" "&I" "Conjunction Simplification"(1,2)
3246            "→I" "modus-tollens:1" "reductio-aa:1")
3247
3248AOT_theorem "KBasic2:4": (φ  ψ)  (φ  ψ)
3249proof -
3250  AOT_have (φ  ψ)  (¬φ  ψ)
3251    by (AOT_subst φ  ψ ¬φ  ψ)
3252       (auto simp: "oth-class-taut:1:c" "oth-class-taut:3:a")
3253  also AOT_have ...  ¬φ  ψ
3254    by (simp add: "KBasic2:2")
3255  also AOT_have ...  ¬φ  ψ
3256    by (AOT_subst ¬φ ¬φ)
3257       (auto simp: "KBasic:11" "oth-class-taut:3:a")
3258  also AOT_have ...  φ  ψ
3259    using "≡E"(6) "oth-class-taut:1:c" "oth-class-taut:3:a" by blast
3260  finally show ?thesis .
3261qed
3262
3263AOT_theorem "KBasic2:5": φ  ¬¬φ
3264  using "conventions:5"[THEN "≡Df"]
3265  by (AOT_subst φ ¬¬φ;
3266      AOT_subst ¬¬φ ¬¬¬¬φ;
3267      AOT_subst (reverse) ¬¬¬φ ¬φ)
3268     (auto simp: "oth-class-taut:3:b" "oth-class-taut:3:a")
3269
3270
3271AOT_theorem "KBasic2:6": (φ  ψ)  (φ  ψ)
3272proof(rule "→I"; rule "raa-cor:1")
3273  AOT_assume (φ  ψ)
3274  AOT_hence (¬φ  ψ)
3275    using "conventions:2"[THEN "≡Df"]
3276    by (AOT_subst (reverse) ¬φ  ψ φ  ψ) simp
3277  AOT_hence 1: ¬φ  ψ
3278    using "KBasic:13" "vdash-properties:10" by blast
3279  AOT_assume ¬(φ  ψ)
3280  AOT_hence ¬φ and ¬ψ
3281    using "&E" "≡E"(1) "oth-class-taut:5:d" by blast+
3282  AOT_thus ψ & ¬ψ
3283    using "&I"(1) 1[THEN "→E"] "KBasic:11" "≡E"(4) "raa-cor:3" by blast
3284qed
3285
3286AOT_theorem "KBasic2:7": ((φ  ψ) & ¬φ)  ψ
3287proof(rule "→I"; frule "&E"(1); drule "&E"(2))
3288  AOT_assume (φ  ψ)
3289  AOT_hence 1: φ  ψ
3290    using "KBasic2:6" "∨I"(2) "∨E"(1) by blast
3291  AOT_assume ¬φ
3292  AOT_hence ¬φ using "KBasic:11" "≡E"(2) by blast
3293  AOT_thus ψ using 1 "∨E"(2) by blast
3294qed
3295
3296AOT_theorem "T-S5-fund:1": φ  φ
3297  by (meson "dfI" "conventions:5" "contraposition:2"
3298            "Hypothetical Syllogism" "→I" "qml:2"[axiom_inst])
3299lemmas "T◇" = "T-S5-fund:1"
3300
3301AOT_theorem "T-S5-fund:2": φ  φ
3302proof(rule "→I")
3303  AOT_assume φ
3304  AOT_hence ¬¬φ
3305    using "KBasic:14" "≡E"(4) "raa-cor:3" by blast
3306  moreover AOT_have ¬φ  ¬φ
3307    by (fact "qml:3"[axiom_inst])
3308  ultimately AOT_have ¬¬φ
3309    using "modus-tollens:1" by blast
3310  AOT_thus φ using "KBasic:12" "≡E"(2) by blast
3311qed
3312lemmas "5◇" = "T-S5-fund:2"
3313
3314AOT_theorem "Act-Sub:1": 𝒜φ  ¬𝒜¬φ
3315  by (AOT_subst 𝒜¬φ ¬𝒜φ)
3316     (auto simp: "logic-actual-nec:1"[axiom_inst] "oth-class-taut:3:b")
3317
3318AOT_theorem "Act-Sub:2": φ  𝒜φ
3319  using "conventions:5"[THEN "≡Df"]
3320  by (AOT_subst φ ¬¬φ)
3321     (metis "deduction-theorem" "≡I" "≡E"(1) "≡E"(2) "≡E"(3)
3322            "logic-actual-nec:1"[axiom_inst] "qml-act:2"[axiom_inst])
3323
3324AOT_theorem "Act-Sub:3": 𝒜φ  φ
3325  using "conventions:5"[THEN "≡Df"]
3326  by (AOT_subst φ ¬¬φ)
3327     (metis "Act-Sub:1" "→I" "≡E"(4) "nec-imp-act" "reductio-aa:2" "→E")
3328
3329AOT_theorem "Act-Sub:4": 𝒜φ  𝒜φ
3330proof (rule "≡I"; rule "→I")
3331  AOT_assume 𝒜φ
3332  AOT_thus 𝒜φ using "T◇" "vdash-properties:10" by blast
3333next
3334  AOT_assume 𝒜φ
3335  AOT_hence ¬¬𝒜φ
3336    using "dfE" "conventions:5" by blast
3337  AOT_hence ¬𝒜¬φ
3338    by (AOT_subst 𝒜¬φ ¬𝒜φ)
3339       (simp add: "logic-actual-nec:1"[axiom_inst])
3340  AOT_thus 𝒜φ
3341    using "Act-Basic:1" "Act-Basic:6" "∨E"(3) "≡E"(4)
3342          "reductio-aa:1" by blast
3343qed
3344
3345AOT_theorem "Act-Sub:5": 𝒜φ  𝒜φ
3346  by (metis "Act-Sub:2" "Act-Sub:3" "Act-Sub:4" "→I" "≡E"(1) "≡E"(2) "→E")
3347
3348AOT_theorem "S5Basic:1": φ  φ
3349  by (simp add: "≡I" "qml:2"[axiom_inst] "qml:3"[axiom_inst])
3350
3351AOT_theorem "S5Basic:2": φ  φ
3352  by (simp add: "T◇" "5◇" "≡I")
3353
3354AOT_theorem "S5Basic:3": φ  φ
3355  using "T◇" "Hypothetical Syllogism" "qml:3"[axiom_inst] by blast
3356lemmas "B" = "S5Basic:3"
3357
3358AOT_theorem "S5Basic:4": φ  φ
3359  using "5◇" "Hypothetical Syllogism" "qml:2"[axiom_inst] by blast
3360lemmas "B◇" = "S5Basic:4"
3361
3362AOT_theorem "S5Basic:5": φ  φ
3363  using "RM:1" "B" "5◇" "Hypothetical Syllogism" by blast
3364lemmas "4" = "S5Basic:5"
3365
3366AOT_theorem "S5Basic:6": φ  φ
3367  by (simp add: "4" "≡I" "qml:2"[axiom_inst])
3368
3369AOT_theorem "S5Basic:7": φ  φ
3370  using "conventions:5"[THEN "≡Df"] "oth-class-taut:3:b"
3371  by (AOT_subst φ ¬¬φ;
3372      AOT_subst φ ¬¬φ;
3373      AOT_subst (reverse) ¬¬¬φ ¬φ;
3374      AOT_subst (reverse) ¬φ ¬φ)
3375     (auto simp: "S5Basic:6" "if-p-then-p")
3376
3377lemmas "4◇" = "S5Basic:7"
3378
3379AOT_theorem "S5Basic:8": φ  φ
3380  by (simp add: "4◇" "T◇" "≡I")
3381
3382AOT_theorem "S5Basic:9": (φ  ψ)  (φ  ψ)
3383  apply (rule "≡I"; rule "→I")
3384  using "KBasic2:6" "5◇" "∨I"(3) "if-p-then-p" "vdash-properties:10"
3385   apply blast
3386  by (meson "KBasic:15" "4" "∨I"(3) "∨E"(1) "Disjunction Addition"(1)
3387            "con-dis-taut:7" "intro-elim:1" "Commutativity of ∨")
3388
3389AOT_theorem "S5Basic:10": (φ  ψ)  (φ  ψ)
3390proof(rule "≡I"; rule "→I")
3391  AOT_assume (φ  ψ)
3392  AOT_hence φ  ψ
3393    by (meson "KBasic2:6" "∨I"(2) "∨E"(1))
3394  AOT_thus φ  ψ
3395    by (meson "B◇" "4" "4◇" "T◇" "∨I"(3))
3396next
3397  AOT_assume φ  ψ
3398  AOT_hence φ  ψ
3399    by (meson "S5Basic:1" "B◇" "S5Basic:6" "T◇" "5◇" "∨I"(3) "intro-elim:1")
3400  AOT_thus (φ  ψ)
3401    by (meson "KBasic:15" "∨I"(3) "∨E"(1) "Disjunction Addition"(1,2))
3402qed
3403
3404AOT_theorem "S5Basic:11": (φ & ψ)  (φ & ψ)
3405proof -
3406  AOT_have (φ & ψ)  ¬(¬φ  ¬ψ)
3407    by (AOT_subst φ & ψ ¬(¬φ  ¬ψ))
3408       (auto simp: "oth-class-taut:5:a" "oth-class-taut:3:a")
3409  also AOT_have   ¬(¬φ  ¬ψ)
3410    by (AOT_subst ¬ψ ¬ψ)
3411       (auto simp: "KBasic2:1" "oth-class-taut:3:a")
3412  also AOT_have   ¬(¬φ  ¬ψ)
3413    using "KBasic:11" "≡E"(6) "oth-class-taut:3:a" by blast
3414  also AOT_have   ¬(¬φ  ¬ψ)
3415    using "S5Basic:9" "≡E"(1) "oth-class-taut:4:b" by blast
3416  also AOT_have   ¬(¬φ  ¬ψ)
3417    using "KBasic2:1"
3418    by (AOT_subst ¬φ ¬φ; AOT_subst ¬ψ ¬ψ)
3419       (auto simp:  "oth-class-taut:3:a")
3420  also AOT_have   φ & ψ
3421    using "≡E"(6) "oth-class-taut:3:a" "oth-class-taut:5:a" by blast
3422  finally show ?thesis .
3423qed
3424
3425AOT_theorem "S5Basic:12": (φ & ψ)  (φ & ψ)
3426proof (rule "≡I"; rule "→I")
3427  AOT_assume (φ & ψ)
3428  AOT_hence φ & ψ
3429    using "KBasic2:3" "vdash-properties:6" by blast
3430  AOT_thus φ & ψ
3431    using "5◇" "&I" "&E"(1) "&E"(2) "vdash-properties:6" by blast
3432next
3433  AOT_assume φ & ψ
3434  moreover AOT_have (ψ & φ)  (φ & ψ)
3435    by (AOT_subst φ & ψ ψ & φ)
3436       (auto simp: "Commutativity of &" "KBasic:16")
3437  ultimately AOT_show (φ & ψ)
3438    by (metis "4" "&I" "Conjunction Simplification"(1,2) "→E")
3439qed
3440
3441AOT_theorem "S5Basic:13": (φ  ψ)  (φ  ψ)
3442proof (rule "≡I")
3443  AOT_modally_strict {
3444    AOT_have (φ  ψ)  (φ  ψ)
3445      by (meson "KBasic:13" "B◇" "Hypothetical Syllogism" "→I")
3446  }
3447  AOT_hence (φ  ψ)  (φ  ψ)
3448    by (rule RM)
3449  AOT_thus  (φ  ψ)  (φ  ψ)
3450    using "4" "Hypothetical Syllogism" by blast
3451next
3452  AOT_modally_strict {
3453    AOT_have (φ  ψ)  (φ  ψ)
3454      by (meson "B" "Hypothetical Syllogism" "→I" "qml:1"[axiom_inst])
3455  }
3456  AOT_hence  (φ  ψ)  (φ  ψ)
3457    by (rule RM)
3458  AOT_thus (φ  ψ)  (φ  ψ)
3459    using "4" "Hypothetical Syllogism" by blast
3460qed
3461
3462AOT_theorem "derived-S5-rules:1":
3463  assumes Γ  φ  ψ
3464  shows Γ  φ  ψ
3465proof -
3466  AOT_have Γ  φ  ψ
3467    using assms by (rule "RM:1[prem]")
3468  AOT_thus Γ  φ  ψ
3469    using "B" "Hypothetical Syllogism" by blast
3470qed
3471
3472AOT_theorem "derived-S5-rules:2":
3473  assumes Γ  φ  ψ
3474  shows Γ  φ  ψ
3475proof -
3476  AOT_have Γ  φ  ψ
3477    using assms by (rule "RM:2[prem]")
3478  AOT_thus Γ  φ  ψ
3479    using "B◇" "Hypothetical Syllogism" by blast
3480qed
3481
3482AOT_theorem "BFs:1": α φ{α}  α φ{α}
3483proof -
3484  AOT_modally_strict {
3485    AOT_have α φ{α}  φ{α} for α
3486      using "cqt-orig:3" by (rule "RM◇")
3487    AOT_hence α φ{α}  α φ{α}
3488      using "B◇" "∀I" "→E" "→I" by metis
3489  }
3490  thus ?thesis
3491    using "derived-S5-rules:1" by blast
3492qed
3493lemmas "BF" = "BFs:1"
3494
3495AOT_theorem "BFs:2": α φ{α}  α φ{α}
3496proof -
3497  AOT_have α φ{α}  φ{α} for α
3498    using RM "cqt-orig:3" by metis
3499  thus ?thesis
3500    using "cqt-orig:2"[THEN "→E"] "∀I" by metis
3501qed
3502lemmas "CBF" = "BFs:2"
3503
3504AOT_theorem "BFs:3": α φ{α}  α φ{α}
3505proof(rule "→I")
3506  AOT_modally_strict {
3507    AOT_have α ¬φ{α}  α ¬φ{α}
3508      using BF CBF "≡I" by blast
3509  } note θ = this
3510
3511  AOT_assume α φ{α}
3512  AOT_hence ¬¬(α φ{α})
3513    using "dfE" "conventions:5" by blast
3514  AOT_hence ¬α ¬φ{α}
3515    apply (AOT_subst α ¬φ{α} ¬(α φ{α}))
3516    using "dfI" "conventions:3" "conventions:4" "&I"
3517          "contraposition:2" "cqt-further:4"
3518          "df-rules-formulas[3]" by blast
3519  AOT_hence ¬α ¬φ{α}
3520    apply (AOT_subst (reverse) α ¬φ{α} α ¬φ{α})
3521    using θ by blast
3522  AOT_hence ¬α ¬¬¬φ{α}
3523    by (AOT_subst (reverse) ¬¬¬φ{α} ¬φ{α} for: α)
3524       (simp add: "oth-class-taut:3:b")
3525  AOT_hence α ¬¬φ{α}
3526    by (rule "conventions:4"[THEN "dfI"])
3527  AOT_thus α φ{α}
3528    using "conventions:5"[THEN "≡Df"]
3529    by (AOT_subst φ{α} ¬¬φ{α} for: α)
3530qed
3531lemmas "BF◇" = "BFs:3"
3532
3533AOT_theorem "BFs:4": α φ{α}  α φ{α}
3534proof(rule "→I")
3535  AOT_assume α φ{α}
3536  AOT_hence ¬α ¬φ{α}
3537    using "conventions:4"[THEN "dfE"] by blast
3538  AOT_hence ¬α ¬φ{α}
3539    using "KBasic2:1"
3540    by (AOT_subst ¬φ{α} ¬φ{α} for: α)
3541  moreover AOT_have α ¬φ{α}  α ¬φ{α}
3542    using "≡I" "BF" "CBF" by metis
3543  ultimately AOT_have 1: ¬α ¬φ{α}
3544    using "≡E"(3) by blast
3545  AOT_show α φ{α}
3546    apply (rule "conventions:5"[THEN "dfI"])
3547    apply (AOT_subst α φ{α} ¬α ¬φ{α})
3548     apply (simp add: "conventions:4" "≡Df")
3549    apply (AOT_subst ¬¬α ¬φ{α} α ¬φ{α})
3550    by (auto simp: 1 "≡I" "useful-tautologies:1" "useful-tautologies:2")
3551qed
3552lemmas "CBF◇" = "BFs:4"
3553
3554AOT_theorem "sign-S5-thm:1": α φ{α}  α φ{α}
3555proof(rule "→I")
3556  AOT_assume α φ{α}
3557  then AOT_obtain α where φ{α} using "∃E" by metis
3558  moreover AOT_have α
3559    by (simp add: "ex:1:a" "rule-ui:2[const_var]" RN)
3560  moreover AOT_have φ{τ}, τ  α φ{α} for τ
3561  proof -
3562    AOT_have φ{τ}, τ  α φ{α} using "existential:1" by blast
3563    AOT_thus φ{τ}, τ  α φ{α}
3564      using "RN[prem]"[where Γ="{φ τ, «τ»}", simplified] by blast
3565  qed
3566  ultimately AOT_show α φ{α} by blast
3567qed
3568lemmas Buridan = "sign-S5-thm:1"
3569
3570AOT_theorem "sign-S5-thm:2": α φ{α}  α φ{α}
3571proof -
3572  AOT_have α (α φ{α}  φ{α})
3573    by (simp add: "RM◇" "cqt-orig:3" "∀I")
3574  AOT_thus α φ{α}  α φ{α}
3575    using "∀E"(4) "∀I" "→E" "→I" by metis
3576qed
3577lemmas "Buridan◇" = "sign-S5-thm:2"
3578
3579AOT_theorem "sign-S5-thm:3":
3580  α (φ{α} & ψ{α})  (α φ{α} & α ψ{α})
3581  apply (rule "RM:2")
3582  by (metis (no_types, lifting) "∃E" "&I" "&E"(1) "&E"(2) "→I" "∃I"(2))
3583
3584AOT_theorem "sign-S5-thm:4": α (φ{α} & ψ{α})  α φ{α}
3585  apply (rule "RM:2")
3586  by (meson "instantiation" "&E"(1) "→I" "∃I"(2))
3587
3588AOT_theorem "sign-S5-thm:5":
3589  (α (φ{α}  ψ{α}) & α (ψ{α}  χ{α}))  α (φ{α}  χ{α})
3590proof -
3591  {
3592    fix φ' ψ' χ'
3593    AOT_assume  φ' & ψ'  χ'
3594    AOT_hence φ' & ψ'  χ'
3595      using "RN[prem]"[where Γ="{φ', ψ'}"] apply simp
3596      using "&E" "&I" "→E" "→I" by metis
3597  } note R = this
3598  show ?thesis by (rule R; fact AOT)
3599qed
3600
3601AOT_theorem "sign-S5-thm:6":
3602  (α (φ{α}  ψ{α}) & α(ψ{α}  χ{α}))  α(φ{α}  χ{α})
3603proof -
3604  {
3605    fix φ' ψ' χ'
3606    AOT_assume  φ' & ψ'  χ'
3607    AOT_hence φ' & ψ'  χ'
3608      using "RN[prem]"[where Γ="{φ', ψ'}"] apply simp
3609      using "&E" "&I" "→E" "→I" by metis
3610  } note R = this
3611  show ?thesis by (rule R; fact AOT)
3612qed
3613
3614AOT_theorem "exist-nec2:1": τ  τ
3615  using "B◇" "RM◇" "Hypothetical Syllogism" "exist-nec" by blast
3616
3617AOT_theorem "exists-nec2:2": τ  τ
3618  by (meson "Act-Sub:3" "Hypothetical Syllogism" "exist-nec"
3619            "exist-nec2:1" "≡I" "nec-imp-act")
3620
3621AOT_theorem "exists-nec2:3": ¬τ  ¬τ
3622  using "KBasic2:1" "→I" "exist-nec2:1" "≡E"(2) "modus-tollens:1" by blast
3623
3624AOT_theorem "exists-nec2:4": ¬τ  ¬τ
3625  by (metis "Act-Sub:3" "KBasic:12" "→I" "exist-nec" "exists-nec2:3"
3626            "≡I" "≡E"(4) "nec-imp-act" "reductio-aa:1")
3627
3628AOT_theorem "id-nec2:1": α = β  α = β
3629  using "B◇" "RM◇" "Hypothetical Syllogism" "id-nec:1" by blast
3630
3631AOT_theorem "id-nec2:2": α  β  α  β
3632  apply (AOT_subst α  β ¬(α = β))
3633  using "=-infix"[THEN "≡Df"] apply blast
3634  using "KBasic2:1" "→I" "id-nec2:1" "≡E"(2) "modus-tollens:1" by blast
3635
3636AOT_theorem "id-nec2:3": α  β  α  β
3637  apply (AOT_subst α  β ¬(α = β))
3638  using "=-infix"[THEN "≡Df"] apply blast
3639  by (metis "KBasic:11" "→I" "id-nec:2" "≡E"(3) "reductio-aa:2" "→E")
3640
3641AOT_theorem "id-nec2:4": α = β  α = β
3642  using "Hypothetical Syllogism" "id-nec2:1" "id-nec:1" by blast
3643
3644AOT_theorem "id-nec2:5": α  β  α  β
3645  using "id-nec2:3" "id-nec2:2" "→I" "→E" by metis
3646
3647AOT_theorem "sc-eq-box-box:1": (φ  φ)  (φ  φ)
3648  apply (rule "≡I"; rule "→I")
3649  using "KBasic:13" "5◇" "Hypothetical Syllogism" "→E" apply blast
3650  by (metis "KBasic2:1" "KBasic:1" "KBasic:2" "S5Basic:13" "≡E"(2)
3651            "raa-cor:5" "→E")
3652
3653AOT_theorem "sc-eq-box-box:2": ((φ  φ)  (φ  φ))  (φ  φ)
3654  by (metis "Act-Sub:3" "KBasic:13" "5◇" "∨E"(2) "→I" "≡I"
3655            "nec-imp-act" "raa-cor:2" "→E")
3656
3657AOT_theorem "sc-eq-box-box:3": (φ  φ)  (¬φ  ¬φ)
3658proof (rule "→I"; rule "≡I"; rule "→I")
3659  AOT_assume (φ  φ)
3660  AOT_hence φ  φ using "sc-eq-box-box:1" "≡E" by blast
3661  moreover AOT_assume ¬φ
3662  ultimately AOT_have ¬φ
3663    using "modus-tollens:1" by blast
3664  AOT_thus ¬φ
3665    using "KBasic2:1" "≡E"(2) by blast
3666next
3667  AOT_assume (φ  φ)
3668  moreover AOT_assume ¬φ
3669  ultimately AOT_show ¬φ
3670    using "modus-tollens:1" "qml:2"[axiom_inst] "→E" by blast
3671qed
3672
3673AOT_theorem "sc-eq-box-box:4":
3674  ((φ  φ) & (ψ  ψ))  ((φ  ψ)  (φ  ψ))
3675proof(rule "→I"; rule "→I")
3676  AOT_assume θ: (φ  φ) & (ψ  ψ)
3677  AOT_assume ξ: φ  ψ
3678  AOT_hence (φ & ψ)  (¬φ & ¬ψ)
3679    using "≡E"(4) "oth-class-taut:4:g" "raa-cor:3" by blast
3680  moreover {
3681    AOT_assume φ & ψ
3682    AOT_hence (φ  ψ)
3683      using "KBasic:3" "KBasic:8" "≡E"(2) "vdash-properties:10" by blast
3684  }
3685  moreover {
3686    AOT_assume ¬φ & ¬ψ
3687    moreover AOT_have ¬φ  ¬φ and ¬ψ  ¬ψ
3688      using θ "Conjunction Simplification"(1,2)
3689            "sc-eq-box-box:3" "→E" by metis+
3690    ultimately AOT_have ¬φ & ¬ψ
3691      by (metis "&I" "Conjunction Simplification"(1,2)
3692                "≡E"(4) "modus-tollens:1" "raa-cor:3")
3693    AOT_hence (φ  ψ)
3694      using "KBasic:3" "KBasic:9" "≡E"(2) "→E" by blast
3695  }
3696  ultimately AOT_show (φ  ψ)
3697    using "∨E"(2) "reductio-aa:1" by blast
3698qed
3699
3700AOT_theorem "sc-eq-box-box:5":
3701  ((φ  φ) & (ψ  ψ))  ((φ  ψ)  (φ  ψ))
3702proof (rule "→I")
3703  AOT_assume ((φ  φ) & (ψ  ψ))
3704  AOT_hence ((φ  φ) & (ψ  ψ))
3705    using 4[THEN "→E"] "&E" "&I" "KBasic:3" "≡E"(2) by metis
3706  moreover AOT_have ((φ  φ) & (ψ  ψ))  ((φ  ψ)  (φ  ψ))
3707  proof (rule RM; rule "→I"; rule "→I")
3708    AOT_modally_strict {
3709      AOT_assume A: ((φ  φ) & (ψ  ψ))
3710      AOT_hence φ  φ and ψ  ψ
3711        using "&E" "qml:2"[axiom_inst] "→E" by blast+
3712      moreover AOT_assume φ  ψ
3713      ultimately AOT_have φ  ψ
3714        using "→E" "qml:2"[axiom_inst] "≡E" "≡I" by meson
3715      moreover AOT_have (φ  ψ)  (φ  ψ)
3716        using A "sc-eq-box-box:4" "→E" by blast
3717      ultimately AOT_show (φ  ψ) using "→E" by blast
3718    }
3719  qed
3720  ultimately AOT_show ((φ  ψ)  (φ  ψ)) using "→E" by blast
3721qed
3722
3723AOT_theorem "sc-eq-box-box:6": (φ  φ)  ((φ  ψ)  (φ  ψ))
3724proof (rule "→I"; rule "→I"; rule "raa-cor:1")
3725  AOT_assume ¬(φ  ψ)
3726  AOT_hence ¬(φ  ψ)
3727    by (metis "KBasic:11" "≡E"(1))
3728  AOT_hence (φ & ¬ψ)
3729    by (AOT_subst φ & ¬ψ ¬(φ  ψ))
3730       (meson "Commutativity of ≡" "≡E"(1) "oth-class-taut:1:b")
3731  AOT_hence φ and 2: ¬ψ
3732    using "KBasic2:3"[THEN "→E"] "&E" by blast+
3733  moreover AOT_assume (φ  φ)
3734  ultimately AOT_have φ
3735    by (metis "≡E"(1) "sc-eq-box-box:1" "→E")
3736  AOT_hence φ
3737    using "qml:2"[axiom_inst, THEN "→E"] by blast
3738  moreover AOT_assume φ  ψ
3739  ultimately AOT_have ψ
3740    using "→E" by blast
3741  moreover AOT_have ¬ψ
3742    using 2 "KBasic:12" "¬¬I" "intro-elim:3:d" by blast
3743  ultimately AOT_show ψ & ¬ψ
3744    using "&I" by blast
3745qed
3746
3747AOT_theorem "sc-eq-box-box:7": (φ  φ)  ((φ  𝒜ψ)  𝒜(φ  ψ))
3748proof (rule "→I"; rule "→I"; rule "raa-cor:1")
3749  AOT_assume ¬𝒜(φ  ψ)
3750  AOT_hence 𝒜¬(φ  ψ)
3751    by (metis "Act-Basic:1" "∨E"(2))
3752  AOT_hence 𝒜(φ & ¬ψ)
3753    by (AOT_subst φ & ¬ψ ¬(φ  ψ))
3754       (meson "Commutativity of ≡" "≡E"(1) "oth-class-taut:1:b")
3755  AOT_hence 𝒜φ and 2: 𝒜¬ψ
3756    using "Act-Basic:2"[THEN "≡E"(1)] "&E" by blast+
3757  AOT_hence φ
3758    by (metis "Act-Sub:3" "→E")
3759  moreover AOT_assume (φ  φ)
3760  ultimately AOT_have φ
3761    by (metis "≡E"(1) "sc-eq-box-box:1" "→E")
3762  AOT_hence φ
3763    using "qml:2"[axiom_inst, THEN "→E"] by blast
3764  moreover AOT_assume φ  𝒜ψ
3765  ultimately AOT_have 𝒜ψ
3766    using "→E" by blast
3767  moreover AOT_have ¬𝒜ψ
3768    using 2 by (meson "Act-Sub:1" "≡E"(4) "raa-cor:3")
3769  ultimately AOT_show 𝒜ψ & ¬𝒜ψ
3770    using "&I" by blast
3771qed
3772
3773AOT_theorem "sc-eq-fur:1": 𝒜φ  𝒜φ
3774  using "Act-Basic:6" "Act-Sub:4" "≡E"(6) by blast
3775
3776AOT_theorem "sc-eq-fur:2": (φ  φ)  (𝒜φ  φ)
3777  by (metis "B◇" "Act-Sub:3" "KBasic:13" "T◇" "Hypothetical Syllogism"
3778            "→I" "≡I" "nec-imp-act")
3779
3780AOT_theorem "sc-eq-fur:3":
3781  x (φ{x}  φ{x})  (∃!x φ{x}  ιx φ{x})
3782proof (rule "→I"; rule "→I")
3783  AOT_assume x (φ{x}  φ{x})
3784  AOT_hence A: x (φ{x}  φ{x})
3785    using CBF "→E" by blast
3786  AOT_assume ∃!x φ{x}
3787  then AOT_obtain a where a_def: φ{a} & y (φ{y}  y = a)
3788    using "∃E"[rotated 1, OF "uniqueness:1"[THEN "dfE"]] by blast
3789  moreover AOT_have φ{a}
3790    using calculation A "∀E"(2) "qml:2"[axiom_inst] "→E" "&E"(1) by blast
3791  AOT_hence 𝒜φ{a}
3792    using "nec-imp-act" "→E" by blast
3793  moreover AOT_have y (𝒜φ{y}  y = a)
3794  proof (rule "∀I"; rule "→I")
3795    fix b
3796    AOT_assume 𝒜φ{b}
3797    AOT_hence φ{b}
3798      using "Act-Sub:3" "→E" by blast
3799    moreover {
3800      AOT_have (φ{b}  φ{b})
3801        using A "∀E"(2) by blast
3802      AOT_hence φ{b}  φ{b}
3803        using "KBasic:13" "5◇" "Hypothetical Syllogism" "→E" by blast
3804    }
3805    ultimately AOT_have φ{b}
3806      using "→E" by blast
3807    AOT_hence φ{b}
3808      using "qml:2"[axiom_inst] "→E" by blast
3809    AOT_thus b = a
3810      using a_def[THEN "&E"(2)] "∀E"(2) "→E" by blast
3811  qed
3812  ultimately AOT_have 𝒜φ{a} & y (𝒜φ{y}  y = a)
3813    using "&I" by blast
3814  AOT_hence x (𝒜φ{x} & y (𝒜φ{y}  y = x))
3815    using "∃I" by fast
3816  AOT_hence ∃!x 𝒜φ{x}
3817    using "uniqueness:1"[THEN "dfI"] by fast
3818  AOT_thus ιx φ{x}
3819    using "actual-desc:1"[THEN "≡E"(2)] by blast
3820qed
3821
3822AOT_theorem "sc-eq-fur:4":
3823x (φ{x}  φ{x})  (x = ιx φ{x}  (φ{x} & z (φ{z}  z = x)))
3824proof (rule "→I")
3825  AOT_assume x (φ{x}  φ{x})
3826  AOT_hence x (φ{x}  φ{x})
3827    using CBF "→E" by blast
3828  AOT_hence A: 𝒜φ{α}  φ{α} for α
3829    using "sc-eq-fur:2" "∀E" "→E" by fast
3830  AOT_show x = ιx φ{x}  (φ{x} & z (φ{z}  z = x))
3831  proof (rule "≡I"; rule "→I")
3832    AOT_assume x = ιx φ{x}
3833    AOT_hence B: 𝒜φ{x} & z (𝒜φ{z}  z = x)
3834      using "nec-hintikka-scheme"[THEN "≡E"(1)] by blast
3835    AOT_show φ{x} & z (φ{z}  z = x)
3836    proof (rule "&I"; (rule "∀I"; rule "→I")?)
3837      AOT_show φ{x}
3838        using A B[THEN "&E"(1)] "≡E"(1) by blast
3839    next
3840      AOT_show z = x if φ{z} for z
3841        using that B[THEN "&E"(2)] "∀E"(2) "→E" A[THEN "≡E"(2)] by blast
3842    qed
3843  next
3844    AOT_assume B: φ{x} & z (φ{z}  z = x)
3845    AOT_have 𝒜φ{x} & z (𝒜φ{z}  z = x)
3846    proof(rule "&I"; (rule "∀I"; rule "→I")?)
3847      AOT_show 𝒜φ{x}
3848        using B[THEN "&E"(1)] A[THEN "≡E"(2)] by blast
3849    next
3850      AOT_show b = x if 𝒜φ{b} for b
3851        using A[THEN "≡E"(1)] that
3852              B[THEN "&E"(2), THEN "∀E"(2), THEN "→E"] by blast
3853    qed
3854    AOT_thus x = ιx φ{x}
3855      using "nec-hintikka-scheme"[THEN "≡E"(2)] by blast
3856  qed
3857qed
3858
3859AOT_theorem "id-act:1": α = β  𝒜α = β
3860  by (meson "Act-Sub:3" "Hypothetical Syllogism"
3861            "id-nec2:1" "id-nec:2" "≡I" "nec-imp-act")
3862
3863AOT_theorem "id-act:2": α  β  𝒜α  β
3864proof (AOT_subst α  β ¬(α = β))
3865  AOT_modally_strict {
3866    AOT_show α  β  ¬(α = β)
3867      by (simp add: "=-infix" "≡Df")
3868  }
3869next
3870  AOT_show ¬(α = β)  𝒜¬(α = β)
3871  proof (safe intro!: "≡I" "→I")
3872    AOT_assume ¬α = β
3873    AOT_hence ¬𝒜α = β using "id-act:1" "≡E"(3) by blast
3874    AOT_thus 𝒜¬α = β
3875      using "¬¬E" "Act-Sub:1" "≡E"(3) by blast
3876  next
3877    AOT_assume 𝒜¬α = β
3878    AOT_hence ¬𝒜α = β
3879      using "¬¬I" "Act-Sub:1" "≡E"(4) by blast
3880    AOT_thus ¬α = β
3881      using "id-act:1" "≡E"(4) by blast
3882  qed
3883qed
3884
3885AOT_theorem "A-Exists:1": 𝒜∃!α φ{α}  ∃!α 𝒜φ{α}
3886proof -
3887  AOT_have 𝒜∃!α φ{α}  𝒜αβ (φ{β}  β = α)
3888    by (AOT_subst ∃!α φ{α} αβ (φ{β}  β = α))
3889       (auto simp add: "oth-class-taut:3:a" "uniqueness:2")
3890  also AOT_have   α 𝒜β (φ{β}  β = α)
3891    by (simp add: "Act-Basic:10")
3892  also AOT_have   αβ 𝒜(φ{β}  β = α)
3893    by (AOT_subst 𝒜β (φ{β}  β = α) β 𝒜(φ{β}  β = α) for: α)
3894       (auto simp: "logic-actual-nec:3"[axiom_inst] "oth-class-taut:3:a")
3895  also AOT_have   αβ (𝒜φ{β}  𝒜β = α)
3896    by (AOT_subst (reverse) 𝒜φ{β}  𝒜β = α
3897                            𝒜(φ{β}  β = α) for: α β :: 'a)
3898       (auto simp: "Act-Basic:5" "cqt-further:7")
3899  also AOT_have   αβ (𝒜φ{β}  β = α)
3900    by (AOT_subst (reverse) 𝒜β = α β = α for: α β :: 'a)
3901       (auto simp: "id-act:1" "cqt-further:7")
3902  also AOT_have ...  ∃!α 𝒜φ{α}
3903    using "uniqueness:2" "Commutativity of ≡"[THEN "≡E"(1)] by fast
3904  finally show ?thesis.
3905qed
3906
3907AOT_theorem "A-Exists:2": ιx φ{x}  𝒜∃!x φ{x}
3908  by (AOT_subst 𝒜∃!x φ{x} ∃!x 𝒜φ{x})
3909     (auto simp: "actual-desc:1" "A-Exists:1")
3910
3911AOT_theorem "id-act-desc:1": ιx (x = y)
3912proof(rule "existence:1"[THEN "dfI"]; rule "∃I")
3913  AOT_show x E!x  E!x]ιx (x = y)
3914  proof (rule "russell-axiom[exe,1].nec-russell-axiom"[THEN "≡E"(2)];
3915         rule "∃I"; (rule "&I")+)
3916    AOT_show 𝒜y = y by (simp add: "RA[2]" "id-eq:1")
3917  next
3918    AOT_show z (𝒜z = y  z = y)
3919      apply (rule "∀I")
3920      using "id-act:1"[THEN "≡E"(2)] "→I" by blast
3921  next
3922    AOT_show x E!x  E!x]y
3923    proof (rule "lambda-predicates:2"[axiom_inst, THEN "→E", THEN "≡E"(2)])
3924      AOT_show x E!x  E!x]
3925        by "cqt:2[lambda]"
3926    next
3927      AOT_show E!y  E!y 
3928        by (simp add: "if-p-then-p")
3929    qed
3930  qed
3931next
3932  AOT_show x E!x  E!x]
3933    by "cqt:2[lambda]"
3934qed
3935
3936AOT_theorem "id-act-desc:2": y = ιx (x = y)
3937  by (rule descriptions[axiom_inst, THEN "≡E"(2)];
3938      rule "∀I"; rule "id-act:1"[symmetric])
3939
3940AOT_theorem "pre-en-eq:1[1]": x1[F]  x1[F]
3941  by (simp add: encoding "vdash-properties:1[2]")
3942
3943AOT_theorem "pre-en-eq:1[2]": x1x2[F]  x1x2[F]
3944proof (rule "→I")
3945  AOT_assume x1x2[F]
3946  AOT_hence x1y [F]yx2] and x2y [F]x1y]
3947    using "nary-encoding[2]"[axiom_inst, THEN "≡E"(1)] "&E" by blast+
3948  moreover AOT_have y [F]yx2] by "cqt:2"
3949  moreover AOT_have y [F]x1y] by "cqt:2"
3950  ultimately AOT_have x1y [F]yx2] and x2y [F]x1y]
3951    using encoding[axiom_inst, unvarify F] "→E" "&I" by blast+
3952  note A = this
3953  AOT_hence (x1y [F]yx2] & x2y [F]x1y])
3954    using "KBasic:3"[THEN "≡E"(2)] "&I" by blast
3955  AOT_thus x1x2[F]
3956    by (rule "nary-encoding[2]"[axiom_inst, THEN RN,
3957                                THEN "KBasic:6"[THEN "→E"],
3958                                THEN "≡E"(2)])
3959qed
3960
3961AOT_theorem "pre-en-eq:1[3]": x1x2x3[F]  x1x2x3[F]
3962proof (rule "→I")
3963  AOT_assume x1x2x3[F]
3964  AOT_hence x1y [F]yx2x3]
3965        and x2y [F]x1yx3]
3966        and x3y [F]x1x2y]
3967    using "nary-encoding[3]"[axiom_inst, THEN "≡E"(1)] "&E" by blast+
3968  moreover AOT_have y [F]yx2x3] by "cqt:2"
3969  moreover AOT_have y [F]x1yx3] by "cqt:2"
3970  moreover AOT_have y [F]x1x2y] by "cqt:2"
3971  ultimately AOT_have x1y [F]yx2x3]
3972                  and x2y [F]x1yx3]
3973                  and x3y [F]x1x2y]
3974    using encoding[axiom_inst, unvarify F] "→E" by blast+
3975  note A = this
3976  AOT_have B: (x1y [F]yx2x3] & x2y [F]x1yx3] & x3y [F]x1x2y])
3977    by (rule "KBasic:3"[THEN "≡E"(2)] "&I" A)+
3978  AOT_thus x1x2x3[F]
3979    by (rule "nary-encoding[3]"[axiom_inst, THEN RN,
3980                THEN "KBasic:6"[THEN "→E"], THEN "≡E"(2)])
3981qed
3982
3983AOT_theorem "pre-en-eq:1[4]": x1x2x3x4[F]  x1x2x3x4[F]
3984proof (rule "→I")
3985  AOT_assume x1x2x3x4[F]
3986  AOT_hence x1y [F]yx2x3x4]
3987        and x2y [F]x1yx3x4]
3988        and x3y [F]x1x2yx4]
3989        and x4y [F]x1x2x3y]
3990    using "nary-encoding[4]"[axiom_inst, THEN "≡E"(1)] "&E" by metis+
3991  moreover AOT_have y [F]yx2x3x4] by "cqt:2"
3992  moreover AOT_have y [F]x1yx3x4] by "cqt:2"
3993  moreover AOT_have y [F]x1x2yx4] by "cqt:2"
3994  moreover AOT_have y [F]x1x2x3y] by "cqt:2"
3995  ultimately AOT_have x1y [F]yx2x3x4]
3996                  and x2y [F]x1yx3x4]
3997                  and x3y [F]x1x2yx4]
3998                  and x4y [F]x1x2x3y]
3999    using "→E" encoding[axiom_inst, unvarify F] by blast+
4000  note A = this
4001  AOT_have B: (x1y [F]yx2x3x4] &
4002                  x2y [F]x1yx3x4] &
4003                  x3y [F]x1x2yx4] &
4004                  x4y [F]x1x2x3y])
4005    by (rule "KBasic:3"[THEN "≡E"(2)] "&I" A)+
4006  AOT_thus x1x2x3x4[F]
4007    by (rule "nary-encoding[4]"[axiom_inst, THEN RN,
4008              THEN "KBasic:6"[THEN "→E"], THEN "≡E"(2)])
4009qed
4010
4011AOT_theorem "pre-en-eq:2[1]": ¬x1[F]  ¬x1[F]
4012proof (rule "→I"; rule "raa-cor:1")
4013  AOT_assume ¬¬x1[F]
4014  AOT_hence x1[F]
4015    by (rule "conventions:5"[THEN "dfI"])
4016  AOT_hence x1[F]
4017    by(rule "S5Basic:13"[THEN "≡E"(1), OF  "pre-en-eq:1[1]"[THEN RN],
4018              THEN "qml:2"[axiom_inst, THEN "→E"], THEN "→E"])
4019  moreover AOT_assume ¬x1[F]
4020  ultimately AOT_show x1[F] & ¬x1[F] by (rule "&I")
4021qed
4022AOT_theorem "pre-en-eq:2[2]": ¬x1x2[F]  ¬x1x2[F]
4023proof (rule "→I"; rule "raa-cor:1")
4024  AOT_assume ¬¬x1x2[F]
4025  AOT_hence x1x2[F]
4026    by (rule "conventions:5"[THEN "dfI"])
4027  AOT_hence x1x2[F]
4028    by(rule "S5Basic:13"[THEN "≡E"(1), OF  "pre-en-eq:1[2]"[THEN RN],
4029              THEN "qml:2"[axiom_inst, THEN "→E"], THEN "→E"])
4030  moreover AOT_assume ¬x1x2[F]
4031  ultimately AOT_show x1x2[F] & ¬x1x2[F] by (rule "&I")
4032qed
4033
4034AOT_theorem "pre-en-eq:2[3]": ¬x1x2x3[F]  ¬x1x2x3[F]
4035proof (rule "→I"; rule "raa-cor:1")
4036  AOT_assume ¬¬x1x2x3[F]
4037  AOT_hence x1x2x3[F]
4038    by (rule "conventions:5"[THEN "dfI"])
4039  AOT_hence x1x2x3[F]
4040    by(rule "S5Basic:13"[THEN "≡E"(1), OF  "pre-en-eq:1[3]"[THEN RN],
4041              THEN "qml:2"[axiom_inst, THEN "→E"], THEN "→E"])
4042  moreover AOT_assume ¬x1x2x3[F]
4043  ultimately AOT_show x1x2x3[F] & ¬x1x2x3[F] by (rule "&I")
4044qed
4045
4046AOT_theorem "pre-en-eq:2[4]": ¬x1x2x3x4[F]  ¬x1x2x3x4[F]
4047proof (rule "→I"; rule "raa-cor:1")
4048  AOT_assume ¬¬x1x2x3x4[F]
4049  AOT_hence x1x2x3x4[F]
4050    by (rule "conventions:5"[THEN "dfI"])
4051  AOT_hence x1x2x3x4[F]
4052    by(rule "S5Basic:13"[THEN "≡E"(1), OF  "pre-en-eq:1[4]"[THEN RN],
4053                         THEN "qml:2"[axiom_inst, THEN "→E"], THEN "→E"])
4054  moreover AOT_assume ¬x1x2x3x4[F]
4055  ultimately AOT_show x1x2x3x4[F] & ¬x1x2x3x4[F] by (rule "&I")
4056qed
4057
4058AOT_theorem "en-eq:1[1]": x1[F]  x1[F]
4059  using "pre-en-eq:1[1]"[THEN RN] "sc-eq-box-box:2" "∨I" "→E" by metis
4060AOT_theorem "en-eq:1[2]": x1x2[F]  x1x2[F]
4061  using "pre-en-eq:1[2]"[THEN RN] "sc-eq-box-box:2" "∨I" "→E" by metis
4062AOT_theorem "en-eq:1[3]": x1x2x3[F]  x1x2x3[F]
4063  using "pre-en-eq:1[3]"[THEN RN] "sc-eq-box-box:2" "∨I" "→E" by fast
4064AOT_theorem "en-eq:1[4]": x1x2x3x4[F]  x1x2x3x4[F]
4065  using "pre-en-eq:1[4]"[THEN RN] "sc-eq-box-box:2" "∨I" "→E" by fast
4066
4067AOT_theorem "en-eq:2[1]": x1[F]  x1[F]
4068  by (simp add: "≡I" "pre-en-eq:1[1]" "qml:2"[axiom_inst])
4069AOT_theorem "en-eq:2[2]": x1x2[F]  x1x2[F]
4070  by (simp add: "≡I" "pre-en-eq:1[2]" "qml:2"[axiom_inst])
4071AOT_theorem "en-eq:2[3]": x1x2x3[F]  x1x2x3[F]
4072  by (simp add: "≡I" "pre-en-eq:1[3]" "qml:2"[axiom_inst])
4073AOT_theorem "en-eq:2[4]": x1x2x3x4[F]  x1x2x3x4[F]
4074  by (simp add: "≡I" "pre-en-eq:1[4]" "qml:2"[axiom_inst])
4075
4076AOT_theorem "en-eq:3[1]": x1[F]  x1[F]
4077  using "T◇" "derived-S5-rules:2"[OF "pre-en-eq:1[1]"] "≡I" by blast
4078AOT_theorem "en-eq:3[2]": x1x2[F]  x1x2[F]
4079  using "T◇" "derived-S5-rules:2"[OF "pre-en-eq:1[2]"] "≡I" by blast
4080AOT_theorem "en-eq:3[3]": x1x2x3[F]  x1x2x3[F]
4081  using "T◇" "derived-S5-rules:2"[OF "pre-en-eq:1[3]"] "≡I" by blast
4082AOT_theorem "en-eq:3[4]": x1x2x3x4[F]  x1x2x3x4[F]
4083  using "T◇" "derived-S5-rules:2"[OF "pre-en-eq:1[4]"] "≡I" by blast
4084
4085AOT_theorem "en-eq:4[1]":
4086  (x1[F]  y1[G])  (x1[F]  y1[G])
4087  apply (rule "≡I"; rule "→I"; rule "≡I"; rule "→I")
4088  using "qml:2"[axiom_inst, THEN "→E"] "≡E"(1,2) "en-eq:2[1]" by blast+
4089AOT_theorem "en-eq:4[2]":
4090  (x1x2[F]  y1y2[G])  (x1x2[F]  y1y2[G])
4091  apply (rule "≡I"; rule "→I"; rule "≡I"; rule "→I")
4092  using "qml:2"[axiom_inst, THEN "→E"] "≡E"(1,2) "en-eq:2[2]" by blast+
4093AOT_theorem "en-eq:4[3]":
4094  (x1x2x3[F]  y1y2y3[G])  (x1x2x3[F]  y1y2y3[G])
4095  apply (rule "≡I"; rule "→I"; rule "≡I"; rule "→I")
4096  using "qml:2"[axiom_inst, THEN "→E"] "≡E"(1,2) "en-eq:2[3]" by blast+
4097AOT_theorem "en-eq:4[4]":
4098  (x1x2x3x4[F]  y1y2y3y4[G])  (x1x2x3x4[F]  y1y2y3y4[G])
4099  apply (rule "≡I"; rule "→I"; rule "≡I"; rule "→I")
4100  using "qml:2"[axiom_inst, THEN "→E"] "≡E"(1,2) "en-eq:2[4]" by blast+
4101
4102AOT_theorem "en-eq:5[1]":
4103  (x1[F]  y1[G])  (x1[F]  y1[G])
4104  apply (rule "≡I"; rule "→I")
4105  using "en-eq:4[1]"[THEN "≡E"(1)] "qml:2"[axiom_inst, THEN "→E"]
4106   apply blast
4107  using "sc-eq-box-box:4"[THEN "→E", THEN "→E"]
4108        "&I"[OF "pre-en-eq:1[1]"[THEN RN], OF "pre-en-eq:1[1]"[THEN RN]]
4109  by blast
4110AOT_theorem "en-eq:5[2]":
4111  (x1x2[F]  y1y2[G])  (x1x2[F]  y1y2[G])
4112  apply (rule "≡I"; rule "→I")
4113  using "en-eq:4[2]"[THEN "≡E"(1)] "qml:2"[axiom_inst, THEN "→E"]
4114   apply blast
4115  using "sc-eq-box-box:4"[THEN "→E", THEN "→E"]
4116        "&I"[OF "pre-en-eq:1[2]"[THEN RN], OF "pre-en-eq:1[2]"[THEN RN]]
4117  by blast
4118AOT_theorem "en-eq:5[3]":
4119  (x1x2x3[F]  y1y2y3[G])  (x1x2x3[F]  y1y2y3[G])
4120  apply (rule "≡I"; rule "→I")
4121  using "en-eq:4[3]"[THEN "≡E"(1)] "qml:2"[axiom_inst, THEN "→E"]
4122   apply blast
4123  using "sc-eq-box-box:4"[THEN "→E", THEN "→E"]
4124        "&I"[OF "pre-en-eq:1[3]"[THEN RN], OF "pre-en-eq:1[3]"[THEN RN]]
4125  by blast
4126AOT_theorem "en-eq:5[4]":
4127  (x1x2x3x4[F]  y1y2y3y4[G])  (x1x2x3x4[F]  y1y2y3y4[G])
4128  apply (rule "≡I"; rule "→I")
4129  using "en-eq:4[4]"[THEN "≡E"(1)] "qml:2"[axiom_inst, THEN "→E"]
4130   apply blast
4131  using "sc-eq-box-box:4"[THEN "→E", THEN "→E"]
4132        "&I"[OF "pre-en-eq:1[4]"[THEN RN], OF "pre-en-eq:1[4]"[THEN RN]]
4133  by blast
4134
4135AOT_theorem "en-eq:6[1]":
4136  (x1[F]  y1[G])  (x1[F]  y1[G])
4137  using "en-eq:5[1]"[symmetric] "en-eq:4[1]" "≡E"(5) by fast
4138AOT_theorem "en-eq:6[2]":
4139  (x1x2[F]  y1y2[G])  (x1x2[F]  y1y2[G])
4140  using "en-eq:5[2]"[symmetric] "en-eq:4[2]" "≡E"(5) by fast
4141AOT_theorem "en-eq:6[3]":
4142  (x1x2x3[F]  y1y2y3[G])  (x1x2x3[F]  y1y2y3[G])
4143  using "en-eq:5[3]"[symmetric] "en-eq:4[3]" "≡E"(5) by fast
4144AOT_theorem "en-eq:6[4]":
4145  (x1x2x3x4[F]  y1y2y3y4[G])  (x1x2x3x4[F]  y1y2y3y4[G])
4146  using "en-eq:5[4]"[symmetric] "en-eq:4[4]" "≡E"(5) by fast
4147
4148AOT_theorem "en-eq:7[1]": ¬x1[F]  ¬x1[F]
4149  using "pre-en-eq:2[1]" "qml:2"[axiom_inst] "≡I" by blast
4150AOT_theorem "en-eq:7[2]": ¬x1x2[F]  ¬x1x2[F]
4151  using "pre-en-eq:2[2]" "qml:2"[axiom_inst] "≡I" by blast
4152AOT_theorem "en-eq:7[3]": ¬x1x2x3[F]  ¬x1x2x3[F]
4153  using "pre-en-eq:2[3]" "qml:2"[axiom_inst] "≡I" by blast
4154AOT_theorem "en-eq:7[4]": ¬x1x2x3x4[F]  ¬x1x2x3x4[F]
4155  using "pre-en-eq:2[4]" "qml:2"[axiom_inst] "≡I" by blast
4156
4157AOT_theorem "en-eq:8[1]": ¬x1[F]  ¬x1[F]
4158  using "en-eq:2[1]"[THEN "oth-class-taut:4:b"[THEN "≡E"(1)]]
4159        "KBasic:11" "≡E"(5)[symmetric] by blast
4160AOT_theorem "en-eq:8[2]": ¬x1x2[F]  ¬x1x2[F]
4161  using "en-eq:2[2]"[THEN "oth-class-taut:4:b"[THEN "≡E"(1)]]
4162        "KBasic:11" "≡E"(5)[symmetric] by blast
4163AOT_theorem "en-eq:8[3]": ¬x1x2x3[F]  ¬x1x2x3[F]
4164  using "en-eq:2[3]"[THEN "oth-class-taut:4:b"[THEN "≡E"(1)]]
4165        "KBasic:11" "≡E"(5)[symmetric] by blast
4166AOT_theorem "en-eq:8[4]": ¬x1x2x3x4[F]  ¬x1x2x3x4[F]
4167  using "en-eq:2[4]"[THEN "oth-class-taut:4:b"[THEN "≡E"(1)]]
4168        "KBasic:11" "≡E"(5)[symmetric] by blast
4169
4170AOT_theorem "en-eq:9[1]": ¬x1[F]  ¬x1[F]
4171  using "en-eq:7[1]" "en-eq:8[1]" "≡E"(5) by blast
4172AOT_theorem "en-eq:9[2]": ¬x1x2[F]  ¬x1x2[F]
4173  using "en-eq:7[2]" "en-eq:8[2]" "≡E"(5) by blast
4174AOT_theorem "en-eq:9[3]": ¬x1x2x3[F]  ¬x1x2x3[F]
4175  using "en-eq:7[3]" "en-eq:8[3]" "≡E"(5) by blast
4176AOT_theorem "en-eq:9[4]": ¬x1x2x3x4[F]  ¬x1x2x3x4[F]
4177  using "en-eq:7[4]" "en-eq:8[4]" "≡E"(5) by blast
4178
4179AOT_theorem "en-eq:10[1]": 𝒜x1[F]  x1[F]
4180  by (metis "Act-Sub:3" "deduction-theorem" "≡I" "≡E"(1)
4181            "nec-imp-act" "en-eq:3[1]" "pre-en-eq:1[1]")
4182AOT_theorem "en-eq:10[2]": 𝒜x1x2[F]  x1x2[F]
4183  by (metis "Act-Sub:3" "deduction-theorem" "≡I" "≡E"(1)
4184            "nec-imp-act" "en-eq:3[2]" "pre-en-eq:1[2]")
4185AOT_theorem "en-eq:10[3]": 𝒜x1x2x3[F]  x1x2x3[F]
4186  by (metis "Act-Sub:3" "deduction-theorem" "≡I" "≡E"(1)
4187            "nec-imp-act" "en-eq:3[3]" "pre-en-eq:1[3]")
4188AOT_theorem "en-eq:10[4]": 𝒜x1x2x3x4[F]  x1x2x3x4[F]
4189  by (metis "Act-Sub:3" "deduction-theorem" "≡I" "≡E"(1)
4190            "nec-imp-act" "en-eq:3[4]" "pre-en-eq:1[4]")
4191
4192AOT_theorem "oa-facts:1": O!x  O!x
4193proof(rule "→I")
4194  AOT_modally_strict {
4195    AOT_have x E!x]x  E!x
4196      by (rule "lambda-predicates:2"[axiom_inst, THEN "→E"]) "cqt:2"
4197  } note θ = this
4198  AOT_assume O!x
4199  AOT_hence x E!x]x
4200    by (rule "=dfE"(2)[OF AOT_ordinary, rotated 1]) "cqt:2"
4201  AOT_hence E!x using θ[THEN "≡E"(1)] by blast
4202  AOT_hence E!x using "qml:3"[axiom_inst, THEN "→E"] by blast
4203  AOT_hence x E!x]x
4204    by (AOT_subst x E!x]x E!x)
4205       (auto simp: θ)
4206  AOT_thus O!x
4207    by (rule "=dfI"(2)[OF AOT_ordinary, rotated 1]) "cqt:2"
4208qed
4209
4210AOT_theorem "oa-facts:2": A!x  A!x
4211proof(rule "→I")
4212  AOT_modally_strict {
4213    AOT_have x ¬E!x]x  ¬E!x
4214      by (rule "lambda-predicates:2"[axiom_inst, THEN "→E"]) "cqt:2"
4215  } note θ = this
4216  AOT_assume A!x
4217  AOT_hence x ¬E!x]x
4218    by (rule "=dfE"(2)[OF AOT_abstract, rotated 1]) "cqt:2"
4219  AOT_hence ¬E!x using θ[THEN "≡E"(1)] by blast
4220  AOT_hence ¬E!x using "KBasic2:1"[THEN "≡E"(2)] by blast
4221  AOT_hence ¬E!x using "4"[THEN "→E"] by blast
4222  AOT_hence ¬E!x
4223    using "KBasic2:1"
4224    by (AOT_subst (reverse) ¬E!x ¬E!x) blast
4225  AOT_hence x ¬E!x]x
4226    by (AOT_subst x ¬E!x]x ¬E!x)
4227       (auto simp: θ)
4228  AOT_thus A!x
4229    by (rule "=dfI"(2)[OF AOT_abstract, rotated 1]) "cqt:2[lambda]"
4230qed
4231
4232AOT_theorem "oa-facts:3": O!x  O!x
4233  using "oa-facts:1" "B◇" "RM◇" "Hypothetical Syllogism" by blast
4234AOT_theorem "oa-facts:4": A!x  A!x
4235  using "oa-facts:2" "B◇" "RM◇" "Hypothetical Syllogism" by blast
4236
4237AOT_theorem "oa-facts:5": O!x  O!x
4238  by (meson "Act-Sub:3" "Hypothetical Syllogism" "≡I" "nec-imp-act"
4239            "oa-facts:1" "oa-facts:3")
4240
4241AOT_theorem "oa-facts:6": A!x  A!x
4242  by (meson "Act-Sub:3" "Hypothetical Syllogism" "≡I" "nec-imp-act"
4243            "oa-facts:2" "oa-facts:4")
4244
4245AOT_theorem "oa-facts:7": O!x  𝒜O!x
4246  by (meson "Act-Sub:3" "Hypothetical Syllogism" "≡I" "nec-imp-act"
4247            "oa-facts:1" "oa-facts:3")
4248
4249AOT_theorem "oa-facts:8": A!x  𝒜A!x
4250  by (meson "Act-Sub:3" "Hypothetical Syllogism" "≡I" "nec-imp-act"
4251            "oa-facts:2" "oa-facts:4")
4252
4253subsection‹The Theory of Relations›
4254text‹\label{PLM: 9.10}›
4255
4256AOT_theorem "beta-C-meta":
4257  μ1...μn φ{μ1...μn, ν1...νn}] 
4258   (μ1...μn φ{μ1...μn, ν1...νn}]ν1...νn  φ{ν1...νn, ν1...νn})
4259  using "lambda-predicates:2"[axiom_inst] by blast
4260
4261AOT_theorem "beta-C-cor:1":
4262  (ν1...∀νn(μ1...μn φ{μ1...μn, ν1...νn}])) 
4263   ν1...∀νn (μ1...μn φ{μ1...μn, ν1...νn}]ν1...νn  φ{ν1...νn, ν1...νn})
4264  apply (rule "cqt-basic:14"[where 'a='a, THEN "→E"])
4265  using "beta-C-meta" "∀I" by fast
4266
4267AOT_theorem "beta-C-cor:2":
4268  μ1...μn φ{μ1...μn}] 
4269   ν1...∀νn (μ1...μn φ{μ1...μn}]ν1...νn  φ{ν1...νn})
4270  apply (rule "→I"; rule "∀I")
4271  using "beta-C-meta"[THEN "→E"] by fast
4272
4273(* TODO: add better syntax parsing for INSTANCE_OF_CQT_2 *)
4274theorem "beta-C-cor:3":
4275  assumes ν1νn. AOT_instance_of_cqt_2 (φ (AOT_term_of_var ν1νn))
4276  shows [v  ν1...∀νn (μ1...μn φ{ν1...νn, μ1...μn}]ν1...νn 
4277                         φ{ν1...νn, ν1...νn})]
4278  using "cqt:2[lambda]"[axiom_inst, OF assms]
4279        "beta-C-cor:1"[THEN "→E"] "∀I" by fast
4280
4281AOT_theorem "betaC:1:a": μ1...μn φ{μ1...μn}]κ1...κn  φ{κ1...κn}
4282proof -
4283  AOT_modally_strict {
4284    AOT_assume μ1...μn φ{μ1...μn}]κ1...κn
4285    moreover AOT_have μ1...μn φ{μ1...μn}] and κ1...κn
4286      using calculation "cqt:5:a"[axiom_inst, THEN "→E"] "&E" by blast+
4287    ultimately AOT_show φ{κ1...κn}
4288      using "beta-C-cor:2"[THEN "→E", THEN "∀E"(1), THEN "≡E"(1)] by blast
4289  }
4290qed
4291
4292AOT_theorem "betaC:1:b": ¬φ{κ1...κn}  ¬μ1...μn φ{μ1...μn}]κ1...κn
4293  using "betaC:1:a" "raa-cor:3" by blast
4294
4295lemmas "β→C" = "betaC:1:a" "betaC:1:b"
4296
4297AOT_theorem "betaC:2:a":
4298  μ1...μn φ{μ1...μn}], κ1...κn, φ{κ1...κn} 
4299   μ1...μn φ{μ1...μn}]κ1...κn
4300proof -
4301  AOT_modally_strict {
4302    AOT_assume 1: μ1...μn φ{μ1...μn}]
4303           and 2: κ1...κn
4304           and 3: φ{κ1...κn}
4305    AOT_hence μ1...μn φ{μ1...μn}]κ1...κn
4306      using "beta-C-cor:2"[THEN "→E", OF 1, THEN "∀E"(1), THEN "≡E"(2)]
4307      by blast
4308  }
4309  AOT_thus μ1...μn φ{μ1...μn}], κ1...κn, φ{κ1...κn} 
4310            μ1...μn φ{μ1...μn}]κ1...κn
4311    by blast
4312qed
4313
4314AOT_theorem "betaC:2:b":
4315  μ1...μn φ{μ1...μn}], κ1...κn, ¬μ1...μn φ{μ1...μn}]κ1...κn 
4316   ¬φ{κ1...κn}
4317  using "betaC:2:a" "raa-cor:3" by blast
4318
4319lemmas "β←C" = "betaC:2:a" "betaC:2:b"
4320
4321AOT_theorem "eta-conversion-lemma1:1": Π  x1...xn [Π]x1...xn] = Π
4322  using "lambda-predicates:3"[axiom_inst] "∀I" "∀E"(1) "→I" by fast
4323
4324(* Note: generalized alphabetic variant of the last theorem *)
4325AOT_theorem "eta-conversion-lemma1:2": Π  ν1...νn [Π]ν1...νn] = Π
4326  using "eta-conversion-lemma1:1".
4327
4328text‹Note: not explicitly part of PLM.›
4329AOT_theorem id_sym:
4330  assumes τ = τ'
4331  shows τ' = τ
4332  using "rule=E"[where φ="λ τ' . «τ' = τ»", rotated 1, OF assms]
4333        "=I"(1)[OF "t=t-proper:1"[THEN "→E", OF assms]] by auto
4334declare id_sym[sym]
4335
4336text‹Note: not explicitly part of PLM.›
4337AOT_theorem id_trans:
4338  assumes τ = τ' and τ' = τ''
4339  shows τ = τ''
4340  using "rule=E" assms by blast
4341declare id_trans[trans]
4342
4343method "ηC" for Π :: <'a::{AOT_Term_id_2,AOT_κs}> =
4344  (match conclusion in "[v  τ{Π} = τ'{Π}]" for v τ τ'  4345   rule "rule=E"[rotated 1, OF "eta-conversion-lemma1:2"
4346    [THEN "→E", of v "«[Π]»", symmetric]])
4347
4348AOT_theorem "sub-des-lam:1":
4349  z1...zn  χ{z1...zn, ιx φ{x}}] & ιx φ{x} = ιx ψ{x} 
4350   z1...zn χ{z1...zn, ιx φ{x}}] = z1...zn χ{z1...zn, ιx ψ{x}}]
4351proof(rule "→I")
4352  AOT_assume A: z1...zn  χ{z1...zn, ιx φ{x}}] & ιx φ{x} = ιx ψ{x}
4353  AOT_show z1...zn χ{z1...zn, ιx φ{x}}] = z1...zn χ{z1...zn, ιx ψ{x}}]
4354    using "rule=E"[where φ="λ τ . «z1...zn χ{z1...zn, ιx φ{x}}] =
4355                                   z1...zn χ{z1...zn, τ}]»",
4356               OF "=I"(1)[OF A[THEN "&E"(1)]], OF A[THEN "&E"(2)]]
4357    by blast
4358qed
4359
4360AOT_theorem "sub-des-lam:2":
4361  ιx φ{x} = ιx ψ{x}  χ{ιx φ{x}} = χ{ιx ψ{x}} for χ :: κ  𝗈
4362  using "rule=E"[where φ="λ τ . «χ{ιx φ{x}} = χ{τ}»",
4363                 OF "=I"(1)[OF "log-prop-prop:2"]] "→I" by blast
4364
4365AOT_theorem "prop-equiv": F = G  x (x[F]  x[G])
4366proof(rule "≡I"; rule "→I")
4367  AOT_assume F = G
4368  AOT_thus x (x[F]  x[G])
4369    by (rule "rule=E"[rotated]) (fact "oth-class-taut:3:a"[THEN GEN])
4370next
4371  AOT_assume x (x[F]  x[G])
4372  AOT_hence x[F]  x[G] for x
4373    using "∀E" by blast
4374  AOT_hence (x[F]  x[G]) for x
4375    using "en-eq:6[1]"[THEN "≡E"(1)] by blast
4376  AOT_hence x (x[F]  x[G])
4377    by (rule GEN)
4378  AOT_hence x (x[F]  x[G])
4379    using BF[THEN "→E"] by fast
4380  AOT_thus "F = G"
4381    using "p-identity-thm2:1"[THEN "≡E"(2)] by blast
4382qed
4383
4384AOT_theorem "relations:1":
4385  assumes INSTANCE_OF_CQT_2(φ)
4386  shows F x1...∀xn ([F]x1...xn  φ{x1...xn})
4387  apply (rule "∃I"(1)[where τ="«x1...xn φ{x1...xn}]»"])
4388  using "cqt:2[lambda]"[OF assms, axiom_inst]
4389        "beta-C-cor:2"[THEN "→E", THEN RN] by blast+
4390
4391AOT_theorem "relations:2":
4392  assumes INSTANCE_OF_CQT_2(φ)
4393  shows F x ([F]x  φ{x})
4394  using "relations:1" assms by blast
4395
4396AOT_theorem "block-paradox:1": ¬x G (x[G] & ¬[G]x)]
4397proof(rule "raa-cor:2")
4398  let ?K="«x G (x[G] & ¬[G]x)]»"
4399  AOT_assume A: «?K»
4400  AOT_have x (A!x & F (x[F]  F = «?K»))
4401    using "A-objects"[axiom_inst] by fast
4402  then AOT_obtain a where ξ: A!a & F (a[F]  F = «?K»)
4403    using "∃E"[rotated] by blast
4404  AOT_show p & ¬p for p
4405  proof (rule "∨E"(1)[OF "exc-mid"]; rule "→I")
4406    AOT_assume B: [«?K»]a
4407    AOT_hence G (a[G] & ¬[G]a)
4408      using "β→C" A by blast
4409    then AOT_obtain P where a[P] & ¬[P]a
4410      using "∃E"[rotated] by blast
4411    moreover AOT_have P = [«?K»]
4412      using ξ[THEN "&E"(2), THEN "∀E"(2), THEN "≡E"(1)]
4413            calculation[THEN "&E"(1)] by blast
4414    ultimately AOT_have ¬[«?K»]a
4415      using "rule=E" "&E"(2) by fast
4416    AOT_thus p & ¬p
4417      using B RAA by blast
4418  next
4419    AOT_assume B: ¬[«?K»]a
4420    AOT_hence ¬G (a[G] & ¬[G]a)
4421      using "β←C" "cqt:2[const_var]"[of a, axiom_inst] A by blast
4422    AOT_hence C: G ¬(a[G] & ¬[G]a)
4423      using "cqt-further:4"[THEN "→E"] by blast
4424    AOT_have G (a[G]  [G]a)
4425      by (AOT_subst a[G]  [G]a ¬(a[G] & ¬[G]a) for: G)
4426         (auto simp: "oth-class-taut:1:a" C)
4427    AOT_hence a[«?K»]  [«?K»]a
4428      using "∀E" A by blast
4429    moreover AOT_have a[«?K»]
4430      using ξ[THEN "&E"(2), THEN "∀E"(1), OF A, THEN "≡E"(2)]
4431      using "=I"(1)[OF A] by blast
4432    ultimately AOT_show p & ¬p
4433      using B "→E" RAA by blast
4434  qed
4435qed
4436
4437AOT_theorem "block-paradox:2": ¬F x([F]x  G(x[G] & ¬[G]x))
4438proof(rule RAA(2))
4439  AOT_assume F x ([F]x  G (x[G] & ¬[G]x))
4440  then AOT_obtain F where F_prop: x ([F]x  G (x[G] & ¬[G]x))
4441    using "∃E"[rotated] by blast
4442  AOT_have x (A!x & G (x[G]  G = F))
4443    using "A-objects"[axiom_inst] by fast
4444  then AOT_obtain a where ξ: A!a & G (a[G]  G = F)
4445    using "∃E"[rotated] by blast
4446  AOT_show ¬F x([F]x  G(x[G] & ¬[G]x))
4447  proof (rule "∨E"(1)[OF "exc-mid"]; rule "→I")
4448    AOT_assume B: [F]a
4449    AOT_hence G (a[G] & ¬[G]a)
4450      using F_prop[THEN "∀E"(2), THEN "≡E"(1)] by blast
4451    then AOT_obtain P where a[P] & ¬[P]a
4452      using "∃E"[rotated] by blast
4453    moreover AOT_have P = F
4454      using ξ[THEN "&E"(2), THEN "∀E"(2), THEN "≡E"(1)]
4455            calculation[THEN "&E"(1)] by blast
4456    ultimately AOT_have ¬[F]a
4457      using "rule=E" "&E"(2) by fast
4458    AOT_thus ¬F x([F]x  G(x[G] & ¬[G]x))
4459      using B RAA by blast
4460  next
4461    AOT_assume B: ¬[F]a
4462    AOT_hence ¬G (a[G] & ¬[G]a)
4463      using "oth-class-taut:4:b"[THEN "≡E"(1),
4464              OF F_prop[THEN "∀E"(2)[of _ _ a]], THEN "≡E"(1)]
4465      by simp
4466    AOT_hence C: G ¬(a[G] & ¬[G]a)
4467      using "cqt-further:4"[THEN "→E"] by blast
4468    AOT_have G (a[G]  [G]a)
4469      by (AOT_subst a[G]  [G]a ¬(a[G] & ¬[G]a) for: G)
4470         (auto simp: "oth-class-taut:1:a" C)
4471    AOT_hence a[F]  [F]a
4472      using "∀E" by blast
4473    moreover AOT_have a[F]
4474      using ξ[THEN "&E"(2), THEN "∀E"(2), of F, THEN "≡E"(2)]
4475      using "=I"(2) by blast
4476    ultimately AOT_show ¬F x([F]x  G(x[G] & ¬[G]x))
4477      using B "→E" RAA by blast
4478  qed
4479qed(simp)
4480
4481AOT_theorem "block-paradox:3": ¬y z z = y]
4482proof(rule RAA(2))
4483  AOT_assume θ: y z z = y]
4484  AOT_have x (A!x & F (x[F]  y(F = z z = y] & ¬y[F])))
4485    using "A-objects"[axiom_inst] by force
4486  then AOT_obtain a where
4487    a_prop: A!a & F (a[F]  y (F = z z = y] & ¬y[F]))
4488    using "∃E"[rotated] by blast
4489  AOT_have ζ: az z = a]  y (z z = a] = z z = y] & ¬yz z = a])
4490    using θ[THEN "∀E"(2)] a_prop[THEN "&E"(2), THEN "∀E"(1)] by blast
4491  AOT_show ¬y z z = y]
4492  proof (rule "∨E"(1)[OF "exc-mid"]; rule "→I")
4493    AOT_assume A: az z = a]
4494    AOT_hence y (z z = a] = z z = y] & ¬yz z = a])
4495      using ζ[THEN "≡E"(1)] by blast
4496    then AOT_obtain b where b_prop: z z = a] = z z = b] & ¬bz z = a]
4497      using "∃E"[rotated] by blast
4498    moreover AOT_have a = a by (rule "=I")
4499    moreover AOT_have z z = a] using θ "∀E" by blast
4500    moreover AOT_have a using "cqt:2[const_var]"[axiom_inst] .
4501    ultimately AOT_have z z = a]a using "β←C" by blast
4502    AOT_hence z z = b]a using "rule=E" b_prop[THEN "&E"(1)] by fast
4503    AOT_hence a = b using "β→C" by blast
4504    AOT_hence bz z = a] using A "rule=E" by fast
4505    AOT_thus ¬y z z = y] using b_prop[THEN "&E"(2)] RAA by blast
4506  next
4507    AOT_assume A: ¬az z = a]
4508    AOT_hence ¬y (z z = a] = z z = y] & ¬yz z = a])
4509      using ζ "oth-class-taut:4:b"[THEN "≡E"(1), THEN "≡E"(1)] by blast
4510    AOT_hence y ¬(z z = a] = z z = y] & ¬yz z = a])
4511      using "cqt-further:4"[THEN "→E"] by blast
4512    AOT_hence ¬(z z = a] = z z = a] & ¬az z = a])
4513      using "∀E" by blast
4514    AOT_hence z z = a] = z z = a]  az z = a]
4515      by (metis "&I" "deduction-theorem" "raa-cor:4")
4516    AOT_hence az z = a] using "=I"(1) θ[THEN "∀E"(2)] "→E" by blast
4517    AOT_thus ¬y z z = y] using A RAA by blast
4518  qed
4519qed(simp)
4520
4521AOT_theorem "block-paradox:4": ¬y F x([F]x  x = y)
4522proof(rule RAA(2))
4523  AOT_assume θ: y F x([F]x  x = y)
4524  AOT_have x (A!x & F (x[F]  z (y([F]y  y = z) & ¬z[F])))
4525    using "A-objects"[axiom_inst] by force
4526  then AOT_obtain a where
4527    a_prop: A!a & F (a[F]  z (y([F]y  y = z) & ¬z[F]))
4528    using "∃E"[rotated] by blast
4529  AOT_obtain F where F_prop: x ([F]x  x = a)
4530    using θ[THEN "∀E"(2)] "∃E"[rotated] by blast
4531  AOT_have ζ: a[F]  z (y ([F]y  y = z) & ¬z[F])
4532    using a_prop[THEN "&E"(2), THEN "∀E"(2)] by blast
4533  AOT_show ¬y F x([F]x  x = y)
4534  proof (rule "∨E"(1)[OF "exc-mid"]; rule "→I")
4535    AOT_assume A: a[F]
4536    AOT_hence z (y ([F]y  y = z) & ¬z[F])
4537      using ζ[THEN "≡E"(1)] by blast
4538    then AOT_obtain b where b_prop: y ([F]y  y = b) & ¬b[F]
4539      using "∃E"[rotated] by blast
4540    moreover AOT_have [F]a
4541      using F_prop[THEN "∀E"(2), THEN "≡E"(2)] "=I"(2) by blast
4542    ultimately AOT_have a = b
4543      using "∀E"(2) "≡E"(1) "&E" by fast
4544    AOT_hence a = b
4545      using "β→C" by blast
4546    AOT_hence b[F]
4547      using A "rule=E" by fast
4548    AOT_thus ¬y F x([F]x  x = y)
4549      using b_prop[THEN "&E"(2)] RAA by blast
4550  next
4551    AOT_assume A: ¬a[F]
4552    AOT_hence ¬z (y ([F]y  y = z) & ¬z[F])
4553      using ζ "oth-class-taut:4:b"[THEN "≡E"(1), THEN "≡E"(1)] by blast
4554    AOT_hence z ¬(y ([F]y  y = z) & ¬z[F])
4555      using "cqt-further:4"[THEN "→E"] by blast
4556    AOT_hence ¬(y ([F]y  y = a) & ¬a[F])
4557      using "∀E" by blast
4558    AOT_hence y ([F]y  y = a)  a[F]
4559      by (metis "&I" "deduction-theorem" "raa-cor:4")
4560    AOT_hence a[F] using F_prop "→E" by blast
4561    AOT_thus ¬y F x([F]x  x = y)
4562      using A RAA by blast
4563  qed
4564qed(simp)
4565
4566AOT_theorem "block-paradox:5": ¬Fxy([F]xy  y = x)
4567proof(rule "raa-cor:2")
4568  AOT_assume Fxy([F]xy  y = x)
4569  then AOT_obtain F where F_prop: xy([F]xy  y = x)
4570    using "∃E"[rotated] by blast
4571  {
4572    fix x
4573    AOT_have 1: y([F]xy  y = x)
4574      using F_prop "∀E" by blast
4575    AOT_have 2: z [F]xz] by "cqt:2"
4576    moreover AOT_have y(z [F]xz]y  y = x)
4577    proof(rule "∀I")
4578      fix y
4579      AOT_have z [F]xz]y  [F]xy
4580        using "beta-C-meta"[THEN "→E"] 2 by fast
4581      also AOT_have ...  y = x
4582        using 1 "∀E" by fast
4583      finally AOT_show z [F]xz]y  y = x.
4584    qed
4585    ultimately AOT_have Fy([F]y  y = x)
4586      using "∃I" by fast
4587  }
4588  AOT_hence xFy([F]y  y = x)
4589    by (rule GEN)
4590  AOT_thus xFy([F]y  y = x) & ¬xFy([F]y  y = x)
4591    using "&I" "block-paradox:4" by blast
4592qed
4593
4594AOT_act_theorem "block-paradox2:1":
4595  x [G]x  ¬x [G]ιy (y = x & H (x[H] & ¬[H]x))]
4596proof(rule "→I"; rule "raa-cor:2")
4597  AOT_assume antecedant: x [G]x
4598  AOT_have Lemma: x ([G]ιy(y = x & H (x[H] & ¬[H]x))  H (x[H] & ¬[H]x))
4599  proof(rule GEN)
4600    fix x
4601    AOT_have A: [G]ιy (y = x & H (x[H] & ¬[H]x)) 
4602                 ∃!y (y = x & H (x[H] & ¬[H]x))
4603    proof(rule "≡I"; rule "→I")
4604      AOT_assume [G]ιy (y = x & H (x[H] & ¬[H]x))
4605      AOT_hence ιy (y = x & H (x[H] & ¬[H]x))
4606        using "cqt:5:a"[axiom_inst, THEN "→E", THEN "&E"(2)] by blast
4607      AOT_thus ∃!y (y = x & H (x[H] & ¬[H]x))
4608        using "!-exists:1"[THEN "≡E"(1)] by blast
4609    next
4610      AOT_assume A: ∃!y (y = x & H (x[H] & ¬[H]x))
4611      AOT_obtain a where a_1: a = x & H (x[H] & ¬[H]x)
4612                     and a_2: z (z = x & H (x[H] & ¬[H]x)  z = a)
4613        using "uniqueness:1"[THEN "dfE", OF A] "&E" "∃E"[rotated] by blast
4614      AOT_have a_3: [G]a
4615        using antecedant "∀E" by blast
4616      AOT_show [G]ιy (y = x & H (x[H] & ¬[H]x))
4617        apply (rule "russell-axiom[exe,1].russell-axiom"[THEN "≡E"(2)])
4618        apply (rule "∃I"(2))
4619        using a_1 a_2 a_3 "&I" by blast
4620    qed
4621    also AOT_have B: ...  H (x[H] & ¬[H]x)
4622    proof (rule "≡I"; rule "→I")
4623      AOT_assume A: ∃!y (y = x & H (x[H] & ¬[H]x))
4624      AOT_obtain a where a = x & H (x[H] & ¬[H]x)
4625        using "uniqueness:1"[THEN "dfE", OF A] "&E" "∃E"[rotated] by blast
4626      AOT_thus H (x[H] & ¬[H]x) using "&E" by blast
4627    next
4628      AOT_assume H (x[H] & ¬[H]x)
4629      AOT_hence x = x & H (x[H] & ¬[H]x)
4630        using "id-eq:1" "&I" by blast
4631      moreover AOT_have z (z = x & H (x[H] & ¬[H]x)  z = x)
4632        by (simp add: "Conjunction Simplification"(1) "universal-cor")
4633      ultimately AOT_show ∃!y (y = x & H (x[H] & ¬[H]x))
4634        using "uniqueness:1"[THEN "dfI"] "&I" "∃I"(2) by fast
4635    qed
4636    finally AOT_show ([G]ιy(y = x & H (x[H] & ¬[H]x))  H (x[H] & ¬[H]x)) .
4637  qed
4638
4639  AOT_assume A: x [G]ιy (y = x & H (x[H] & ¬[H]x))]
4640  AOT_have θ: x (x [G]ιy (y = x & H (x[H] & ¬[H]x))]x 
4641                   [G]ιy(y = x & H (x[H] & ¬[H]x)))
4642    using "beta-C-meta"[THEN "→E", OF A] "∀I" by fast
4643  AOT_have x (x [G]ιy (y = x & H (x[H] & ¬[H]x))]x  H (x[H] & ¬[H]x))
4644    using θ Lemma "cqt-basic:10"[THEN "→E"] "&I" by fast
4645  AOT_hence F x ([F]x  H (x[H] & ¬[H]x))
4646    using "∃I"(1) A by fast
4647  AOT_thus (F x ([F]x  H (x[H] & ¬[H]x))) &
4648            (¬F x ([F]x  H (x[H] & ¬[H]x)))
4649    using "block-paradox:2" "&I" by blast
4650qed
4651
4652text‹Note: Strengthens the above to a modally-strict theorem.
4653           Not explicitly part of PLM.›
4654AOT_theorem "block-paradox2:1[strict]":
4655  x 𝒜[G]x  ¬x [G]ιy (y = x & H (x[H] & ¬[H]x))]
4656proof(rule "→I"; rule "raa-cor:2")
4657  AOT_assume antecedant: x 𝒜[G]x
4658  AOT_have Lemma: 𝒜x ([G]ιy(y = x & H (x[H] & ¬[H]x))  H (x[H] & ¬[H]x))
4659  proof(safe intro!: GEN "Act-Basic:5"[THEN "≡E"(2)]
4660                     "logic-actual-nec:3"[axiom_inst, THEN "≡E"(2)])
4661    fix x
4662    AOT_have A: 𝒜[G]ιy (y = x & H (x[H] & ¬[H]x)) 
4663                 ∃!y 𝒜(y = x & H (x[H] & ¬[H]x))
4664    proof(rule "≡I"; rule "→I")
4665      AOT_assume 𝒜[G]ιy (y = x & H (x[H] & ¬[H]x))
4666      moreover AOT_have ([G]ιy (y = x & H (x[H] & ¬[H]x)) 
4667                                  ιy (y = x & H (x[H] & ¬[H]x)))
4668      proof(rule RN; rule "→I")
4669        AOT_modally_strict {
4670          AOT_assume [G]ιy (y = x & H (x[H] & ¬[H]x))
4671          AOT_hence ιy (y = x & H (x[H] & ¬[H]x))
4672            using "cqt:5:a"[axiom_inst, THEN "→E", THEN "&E"(2)] by blast
4673          AOT_thus ιy (y = x & H (x[H] & ¬[H]x))
4674            using "exist-nec"[THEN "→E"] by blast
4675        }
4676      qed
4677      ultimately AOT_have 𝒜ιy (y = x & H (x[H] & ¬[H]x))
4678        using "act-cond"[THEN "→E", THEN "→E"] "nec-imp-act"[THEN "→E"] by blast
4679      AOT_hence ιy (y = x & H (x[H] & ¬[H]x))
4680        using "Act-Sub:3" "B◇" "vdash-properties:10" by blast
4681      AOT_thus ∃!y 𝒜(y = x & H (x[H] & ¬[H]x))
4682        using "actual-desc:1"[THEN "≡E"(1)] by blast
4683    next
4684      AOT_assume A: ∃!y 𝒜(y = x & H (x[H] & ¬[H]x))
4685      AOT_obtain a where a_1: 𝒜(a = x & H (x[H] & ¬[H]x))
4686                     and a_2: z (𝒜(z = x & H (x[H] & ¬[H]x))  z = a)
4687        using "uniqueness:1"[THEN "dfE", OF A] "&E" "∃E"[rotated] by blast
4688      AOT_have a_3: 𝒜[G]a
4689        using antecedant "∀E" by blast
4690      moreover AOT_have a = ιy(y = x & H (x[H] & ¬[H]x))
4691        using "nec-hintikka-scheme"[THEN "≡E"(2), OF "&I"] a_1 a_2 by auto
4692      ultimately AOT_show 𝒜[G]ιy (y = x & H (x[H] & ¬[H]x))
4693        using "rule=E" by fast
4694    qed
4695    also AOT_have B: ...  𝒜H (x[H] & ¬[H]x)
4696    proof (rule "≡I"; rule "→I")
4697      AOT_assume A: ∃!y 𝒜(y = x & H (x[H] & ¬[H]x))
4698      AOT_obtain a where 𝒜(a = x & H (x[H] & ¬[H]x))
4699        using "uniqueness:1"[THEN "dfE", OF A] "&E" "∃E"[rotated] by blast
4700      AOT_thus 𝒜H (x[H] & ¬[H]x)
4701        using "Act-Basic:2"[THEN "≡E"(1), THEN "&E"(2)] by blast
4702    next
4703      AOT_assume 𝒜H (x[H] & ¬[H]x)
4704      AOT_hence 𝒜x = x & 𝒜H (x[H] & ¬[H]x)
4705        using "id-eq:1" "&I" "RA[2]" by blast
4706      AOT_hence 𝒜(x = x & H (x[H] & ¬[H]x))
4707        using "act-conj-act:3" "Act-Basic:2" "≡E" by blast
4708      moreover AOT_have z (𝒜(z = x & H (x[H] & ¬[H]x))  z = x)
4709      proof(safe intro!: GEN "→I")
4710        fix z
4711        AOT_assume 𝒜(z = x & H (x[H] & ¬[H]x))
4712        AOT_hence 𝒜(z = x)
4713          using "Act-Basic:2"[THEN "≡E"(1), THEN "&E"(1)] by blast
4714        AOT_thus z = x
4715           by (metis "id-act:1" "intro-elim:3:b")
4716      qed
4717      ultimately AOT_show ∃!y 𝒜(y = x & H (x[H] & ¬[H]x))
4718        using "uniqueness:1"[THEN "dfI"] "&I" "∃I"(2) by fast
4719    qed
4720    finally AOT_show (𝒜[G]ιy(y = x & H (x[H] & ¬[H]x))  𝒜H (x[H] & ¬[H]x)).
4721  qed
4722
4723  AOT_assume A: x [G]ιy (y = x & H (x[H] & ¬[H]x))]
4724  AOT_hence 𝒜x [G]ιy (y = x & H (x[H] & ¬[H]x))]
4725    using "exist-nec" "→E" "nec-imp-act"[THEN "→E"] by blast
4726  AOT_hence 𝒜(x [G]ιy (y = x & H (x[H] & ¬[H]x))] &
4727                x ([G]ιy(y = x & H (x[H] & ¬[H]x))  H (x[H] & ¬[H]x)))
4728    using Lemma "Act-Basic:2"[THEN "≡E"(2)] "&I" by blast
4729  moreover AOT_have 𝒜(x [G]ιy (y = x & H (x[H] & ¬[H]x))] &
4730                x ([G]ιy(y = x & H (x[H] & ¬[H]x))  H (x[H] & ¬[H]x)))
4731       𝒜p (p & ¬p)
4732  proof (rule "logic-actual-nec:2"[axiom_inst, THEN "≡E"(1)];
4733         rule "RA[2]"; rule "→I")
4734    AOT_modally_strict {
4735      AOT_assume 0: x [G]ιy (y = x & H (x[H] & ¬[H]x))] &
4736                x ([G]ιy(y = x & H (x[H] & ¬[H]x))  H (x[H] & ¬[H]x))
4737      AOT_have F x ([F]x  G (x[G] & ¬[G]x))
4738      proof(rule "∃I"(1))
4739        AOT_show x (x [G]ιy (y = x & H (x[H] & ¬[H]x))]x  H (x[H] & ¬[H]x))
4740        proof(safe intro!: GEN "≡I" "→I" "β←C" dest!: "β→C")
4741          fix x
4742          AOT_assume [G]ιy(y = x & H (x[H] & ¬[H]x))
4743          AOT_thus H (x[H] & ¬[H]x)
4744            using 0 "&E" "∀E"(2) "≡E"(1) by blast
4745        next
4746          fix x
4747          AOT_assume H (x[H] & ¬[H]x)
4748          AOT_thus [G]ιy(y = x & H (x[H] & ¬[H]x))
4749            using 0 "&E" "∀E"(2) "≡E"(2) by blast
4750        qed(auto intro!: 0[THEN "&E"(1)] "cqt:2")
4751      next
4752        AOT_show x [G]ιy (y = x & H (x[H] & ¬[H]x))]
4753          using 0 "&E"(1) by blast
4754      qed
4755      AOT_thus p (p & ¬p)
4756        using "block-paradox:2" "reductio-aa:1" by blast
4757    }
4758  qed
4759  ultimately AOT_have 𝒜p (p & ¬p)
4760    using "→E" by blast
4761  AOT_hence p 𝒜(p & ¬p)
4762    by (metis "Act-Basic:10" "intro-elim:3:a")
4763  then AOT_obtain p where 𝒜(p & ¬p)
4764    using "∃E"[rotated] by blast
4765  moreover AOT_have ¬𝒜(p & ¬p)
4766    using "non-contradiction"[THEN "RA[2]"]
4767    by (meson "Act-Sub:1" "¬¬I" "intro-elim:3:d")
4768  ultimately AOT_show p & ¬p for p
4769    by (metis "raa-cor:3")
4770qed
4771
4772AOT_act_theorem "block-paradox2:2":
4773  G ¬x [G]ιy (y = x & H (x[H] & ¬[H]x))]
4774proof(rule "∃I"(1))
4775  AOT_have 0: x p (p p)]
4776    by "cqt:2[lambda]"
4777  moreover AOT_have x x p (p p)]x
4778    apply (rule GEN)
4779    apply (rule "beta-C-cor:2"[THEN "→E", OF 0, THEN "∀E"(2), THEN "≡E"(2)])
4780    using "if-p-then-p" GEN by fast
4781  moreover AOT_have G (x [G]x  ¬x [G]ιy (y = x & H (x[H] & ¬[H]x))])
4782      using "block-paradox2:1" "∀I" by fast
4783  ultimately AOT_show ¬x x p (p p)]ιy (y = x & H (x[H] & ¬[H]x))]
4784    using "∀E"(1) "→E" by blast
4785qed("cqt:2[lambda]")
4786
4787AOT_theorem propositions: p (p  φ)
4788proof(rule "∃I"(1))
4789  AOT_show (φ  φ)
4790    by (simp add: RN "oth-class-taut:3:a")
4791next
4792  AOT_show φ
4793    by (simp add: "log-prop-prop:2")
4794qed
4795
4796AOT_theorem "pos-not-equiv-ne:1":
4797  (¬x1...∀xn ([F]x1...xn  [G]x1...xn))  F  G
4798proof (rule "→I")
4799  AOT_assume ¬x1...∀xn ([F]x1...xn  [G]x1...xn)
4800  AOT_hence ¬x1...∀xn ([F]x1...xn  [G]x1...xn)
4801    using "KBasic:11"[THEN "≡E"(2)] by blast
4802  AOT_hence ¬(F = G)
4803    using "id-rel-nec-equiv:1" "modus-tollens:1" by blast
4804  AOT_thus F  G
4805    using "=-infix"[THEN "dfI"] by blast
4806qed
4807
4808AOT_theorem "pos-not-equiv-ne:2": (¬(φ{F}  φ{G}))  F  G
4809proof (rule "→I")
4810  AOT_modally_strict {
4811    AOT_have ¬(φ{F}  φ{G})  ¬(F = G)
4812    proof (rule "→I"; rule "raa-cor:2")
4813      AOT_assume 1: F = G
4814      AOT_hence φ{F}  φ{G}
4815        using "l-identity"[axiom_inst, THEN "→E"] by blast
4816      moreover {
4817        AOT_have G = F
4818          using 1 id_sym by blast
4819        AOT_hence φ{G}  φ{F}
4820          using "l-identity"[axiom_inst, THEN "→E"] by blast
4821      }
4822      ultimately AOT_have φ{F}  φ{G}
4823        using "≡I" by blast
4824      moreover AOT_assume ¬(φ{F}  φ{G})
4825      ultimately AOT_show (φ{F}  φ{G}) & ¬(φ{F}  φ{G})
4826        using "&I" by blast
4827    qed
4828  }
4829  AOT_hence ¬(φ{F}  φ{G})  ¬(F = G)
4830    using "RM:2[prem]" by blast
4831  moreover AOT_assume ¬(φ{F}  φ{G})
4832  ultimately AOT_have 0: ¬(F = G) using "→E" by blast
4833  AOT_have (F  G)
4834    by (AOT_subst F  G ¬(F = G))
4835       (auto simp: "=-infix" "≡Df" 0)
4836  AOT_thus F  G
4837    using "id-nec2:3"[THEN "→E"] by blast
4838qed
4839
4840AOT_theorem "pos-not-equiv-ne:2[zero]": (¬(φ{p}  φ{q}))  p  q
4841proof (rule "→I")
4842  AOT_modally_strict {
4843    AOT_have ¬(φ{p}  φ{q})  ¬(p = q)
4844    proof (rule "→I"; rule "raa-cor:2")
4845      AOT_assume 1: p = q
4846      AOT_hence φ{p}  φ{q}
4847        using "l-identity"[axiom_inst, THEN "→E"] by blast
4848      moreover {
4849        AOT_have q = p
4850          using 1 id_sym by blast
4851        AOT_hence φ{q}  φ{p}
4852          using "l-identity"[axiom_inst, THEN "→E"] by blast
4853      }
4854      ultimately AOT_have φ{p}  φ{q}
4855        using "≡I" by blast
4856      moreover AOT_assume ¬(φ{p}  φ{q})
4857      ultimately AOT_show (φ{p}  φ{q}) & ¬(φ{p}  φ{q})
4858        using "&I" by blast
4859    qed
4860  }
4861  AOT_hence ¬(φ{p}  φ{q})  ¬(p = q)
4862    using "RM:2[prem]" by blast
4863  moreover AOT_assume ¬(φ{p}  φ{q})
4864  ultimately AOT_have 0: ¬(p = q) using "→E" by blast
4865  AOT_have (p  q)
4866    by (AOT_subst p  q ¬(p = q))
4867       (auto simp: 0 "=-infix" "≡Df")
4868  AOT_thus p  q
4869    using "id-nec2:3"[THEN "→E"] by blast
4870qed
4871
4872AOT_theorem "pos-not-equiv-ne:3":
4873  (¬x1...∀xn ([F]x1...xn  [G]x1...xn))  F  G
4874  using "→I" "pos-not-equiv-ne:1"[THEN "→E"] "T◇"[THEN "→E"] by blast
4875
4876AOT_theorem "pos-not-equiv-ne:4": (¬(φ{F}  φ{G}))  F  G
4877  using "→I" "pos-not-equiv-ne:2"[THEN "→E"] "T◇"[THEN "→E"] by blast
4878
4879AOT_theorem "pos-not-equiv-ne:4[zero]": (¬(φ{p}  φ{q}))  p  q
4880  using "→I" "pos-not-equiv-ne:2[zero]"[THEN "→E"]
4881        "T◇"[THEN "→E"] by blast
4882
4883AOT_define relation_negation :: "Π  Π" ("_-")
4884  "df-relation-negation": "[F]- =df x1...xn ¬[F]x1...xn]"
4885
4886nonterminal φneg
4887syntax "" :: "φneg  τ" ("_")
4888syntax "" :: "φneg  φ" ("'(_')")
4889
4890AOT_define relation_negation_0 :: φ  φneg ("'(_')-")
4891  "df-relation-negation[zero]": "(p)- =df  ¬p]"
4892
4893AOT_theorem "rel-neg-T:1": x1...xn ¬[Π]x1...xn]
4894  by "cqt:2[lambda]"
4895
4896AOT_theorem "rel-neg-T:1[zero]":  ¬φ]
4897  using "cqt:2[lambda0]"[axiom_inst] by blast
4898
4899AOT_theorem "rel-neg-T:2": [Π]- = x1...xn ¬[Π]x1...xn]
4900  using "=I"(1)[OF "rel-neg-T:1"]
4901  by (rule "=dfI"(1)[OF "df-relation-negation", OF "rel-neg-T:1"])
4902
4903AOT_theorem "rel-neg-T:2[zero]": (φ)- =  ¬φ]
4904  using "=I"(1)[OF "rel-neg-T:1[zero]"]
4905  by (rule "=dfI"(1)[OF "df-relation-negation[zero]", OF "rel-neg-T:1[zero]"])
4906
4907AOT_theorem "rel-neg-T:3": [Π]-
4908  using "=dfI"(1)[OF "df-relation-negation", OF "rel-neg-T:1"]
4909        "rel-neg-T:1" by blast
4910
4911AOT_theorem "rel-neg-T:3[zero]": (φ)-
4912  using "log-prop-prop:2" by blast
4913
4914AOT_theorem "thm-relation-negation:1": [F]-x1...xn  ¬[F]x1...xn
4915proof -
4916  AOT_have [F]-x1...xn  x1...xn ¬[F]x1...xn]x1...xn
4917    using "rule=E"[rotated, OF "rel-neg-T:2"]
4918          "rule=E"[rotated, OF "rel-neg-T:2"[THEN id_sym]]
4919          "→I" "≡I" by fast
4920  also AOT_have ...  ¬[F]x1...xn
4921    using "beta-C-meta"[THEN "→E", OF "rel-neg-T:1"] by fast
4922  finally show ?thesis.
4923qed
4924
4925AOT_theorem "thm-relation-negation:2": ¬[F]-x1...xn  [F]x1...xn
4926  apply (AOT_subst [F]x1...xn ¬¬[F]x1...xn)
4927   apply (simp add: "oth-class-taut:3:b")
4928  apply (rule "oth-class-taut:4:b"[THEN "≡E"(1)])
4929  using "thm-relation-negation:1".
4930
4931AOT_theorem "thm-relation-negation:3": ((p)-)  ¬p
4932proof -
4933  AOT_have (p)- =  ¬p] using "rel-neg-T:2[zero]" by blast
4934  AOT_hence ((p)-)   ¬p]
4935    using "df-relation-negation[zero]" "log-prop-prop:2"
4936          "oth-class-taut:3:a" "rule-id-df:2:a" by blast
4937  also AOT_have  ¬p]  ¬p
4938    by (simp add: "propositions-lemma:2")
4939  finally show ?thesis.
4940qed
4941
4942AOT_theorem "thm-relation-negation:4": (¬((p)-))  p
4943  using "thm-relation-negation:3"[THEN "≡E"(1)]
4944        "thm-relation-negation:3"[THEN "≡E"(2)]
4945        "≡I" "→I" RAA by metis
4946
4947AOT_theorem "thm-relation-negation:5": [F]  [F]-
4948proof -
4949  AOT_have ¬([F] = [F]-)
4950  proof (rule RAA(2))
4951    AOT_show [F]x1...xn  [F]x1...xn for x1xn
4952      using "if-p-then-p".
4953  next
4954    AOT_assume [F] = [F]-
4955    AOT_hence [F]- = [F] using id_sym by blast
4956    AOT_hence [F]x1...xn  ¬[F]x1...xn for x1xn
4957      using "rule=E" "thm-relation-negation:1" by fast
4958    AOT_thus ¬([F]x1...xn  [F]x1...xn) for x1xn
4959      using "≡E" RAA by metis
4960  qed
4961  thus ?thesis
4962    using "dfI" "=-infix" by blast
4963qed
4964
4965AOT_theorem "thm-relation-negation:6": p  (p)-
4966proof -
4967  AOT_have ¬(p = (p)-)
4968  proof (rule RAA(2))
4969    AOT_show p  p
4970      using "if-p-then-p".
4971  next
4972    AOT_assume p = (p)-
4973    AOT_hence (p)- = p using id_sym by blast
4974    AOT_hence p  ¬p
4975      using "rule=E" "thm-relation-negation:3" by fast
4976    AOT_thus ¬(p  p)
4977      using "≡E" RAA by metis
4978  qed
4979  thus ?thesis
4980    using "dfI" "=-infix" by blast
4981qed
4982
4983AOT_theorem "thm-relation-negation:7": (p)- = (¬p)
4984  apply (rule "df-relation-negation[zero]"[THEN "=dfE"(1)])
4985  using "cqt:2[lambda0]"[axiom_inst] "rel-neg-T:2[zero]"
4986        "propositions-lemma:1" id_trans by blast+
4987
4988AOT_theorem "thm-relation-negation:8": p = q  (¬p) = (¬q)
4989proof(rule "→I")
4990  AOT_assume p = q
4991  moreover AOT_have (¬p) using "log-prop-prop:2".
4992  moreover AOT_have (¬p) = (¬p) using calculation(2) "=I" by blast
4993  ultimately AOT_show (¬p) = (¬q)
4994    using "rule=E" by fast
4995qed
4996
4997AOT_theorem "thm-relation-negation:9": p = q  (p)- = (q)-
4998proof(rule "→I")
4999  AOT_assume p = q
5000  AOT_hence (¬p) = (¬q) using "thm-relation-negation:8" "→E" by blast
5001  AOT_thus (p)- = (q)-
5002    using "thm-relation-negation:7" id_sym id_trans by metis
5003qed
5004
5005AOT_define Necessary :: Π  φ ("Necessary'(_')")
5006  "contingent-properties:1":
5007  Necessary([F]) df x1...∀xn [F]x1...xn
5008
5009AOT_define Necessary0 :: φ  φ ("Necessary0'(_')")
5010  "contingent-properties:1[zero]":
5011  Necessary0(p) df p
5012
5013AOT_define Impossible :: Π  φ ("Impossible'(_')")
5014  "contingent-properties:2":
5015  Impossible([F]) df F & x1...∀xn ¬[F]x1...xn
5016
5017AOT_define Impossible0 :: φ  φ ("Impossible0'(_')")
5018  "contingent-properties:2[zero]":
5019  Impossible0(p) df ¬p
5020
5021AOT_define NonContingent :: Π  φ ("NonContingent'(_')")
5022  "contingent-properties:3":
5023  NonContingent([F]) df Necessary([F])  Impossible([F])
5024
5025AOT_define NonContingent0 :: φ  φ ("NonContingent0'(_')")
5026  "contingent-properties:3[zero]":
5027  NonContingent0(p) df Necessary0(p)  Impossible0(p)
5028
5029AOT_define Contingent :: Π  φ ("Contingent'(_')")
5030  "contingent-properties:4":
5031  Contingent([F]) df F & ¬(Necessary([F])  Impossible([F]))
5032
5033AOT_define Contingent0 :: φ  φ ("Contingent0'(_')")
5034  "contingent-properties:4[zero]":
5035  Contingent0(p) df ¬(Necessary0(p)  Impossible0(p))
5036
5037
5038AOT_theorem "thm-cont-prop:1": NonContingent([F])  NonContingent([F]-)
5039proof (rule "≡I"; rule "→I")
5040  AOT_assume NonContingent([F])
5041  AOT_hence Necessary([F])  Impossible([F])
5042    using "dfE"[OF "contingent-properties:3"] by blast
5043  moreover {
5044    AOT_assume Necessary([F])
5045    AOT_hence (x1...∀xn [F]x1...xn)
5046      using "dfE"[OF "contingent-properties:1"] by blast
5047    moreover AOT_modally_strict {
5048      AOT_assume x1...∀xn [F]x1...xn
5049      AOT_hence [F]x1...xn for x1xn using "∀E" by blast
5050      AOT_hence ¬[F]-x1...xn for x1xn
5051        by (meson "≡E"(6) "oth-class-taut:3:a"
5052                  "thm-relation-negation:2" "≡E"(1))
5053      AOT_hence x1...∀xn ¬[F]-x1...xn using "∀I" by fast
5054    }
5055    ultimately AOT_have (x1...∀xn ¬[F]-x1...xn)
5056      using "RN[prem]"[where Γ="{«x1...∀xn [F]x1...xn»}", simplified] by blast
5057    AOT_hence Impossible([F]-)
5058      using "≡Df"[OF "contingent-properties:2", THEN "≡S"(1),
5059                  OF "rel-neg-T:3", THEN "≡E"(2)]
5060      by blast
5061  }
5062  moreover {
5063    AOT_assume Impossible([F])
5064    AOT_hence (x1...∀xn ¬[F]x1...xn)
5065      using "≡Df"[OF "contingent-properties:2", THEN "≡S"(1),
5066                  OF "cqt:2[const_var]"[axiom_inst], THEN "≡E"(1)]
5067      by blast
5068    moreover AOT_modally_strict {
5069      AOT_assume x1...∀xn ¬[F]x1...xn
5070      AOT_hence ¬[F]x1...xn for x1xn using "∀E" by blast
5071      AOT_hence [F]-x1...xn for x1xn
5072        by (meson "≡E"(6) "oth-class-taut:3:a"
5073                  "thm-relation-negation:1" "≡E"(1))
5074      AOT_hence x1...∀xn [F]-x1...xn using "∀I" by fast
5075    }
5076    ultimately AOT_have (x1...∀xn [F]-x1...xn)
5077      using "RN[prem]"[where Γ="{«x1...∀xn ¬[F]x1...xn»}"] by blast
5078    AOT_hence Necessary([F]-)
5079      using "dfI"[OF "contingent-properties:1"] by blast
5080  }
5081  ultimately AOT_have Necessary([F]-)  Impossible([F]-)
5082    using "∨E"(1) "∨I" "→I" by metis
5083  AOT_thus NonContingent([F]-)
5084    using "dfI"[OF "contingent-properties:3"] by blast
5085next
5086  AOT_assume NonContingent([F]-)
5087  AOT_hence Necessary([F]-)  Impossible([F]-)
5088    using "dfE"[OF "contingent-properties:3"] by blast
5089  moreover {
5090    AOT_assume Necessary([F]-)
5091    AOT_hence (x1...∀xn [F]-x1...xn)
5092      using "dfE"[OF "contingent-properties:1"] by blast
5093    moreover AOT_modally_strict {
5094      AOT_assume x1...∀xn [F]-x1...xn
5095      AOT_hence [F]-x1...xn for x1xn using "∀E" by blast
5096      AOT_hence ¬[F]x1...xn for x1xn
5097        by (meson "≡E"(6) "oth-class-taut:3:a"
5098                  "thm-relation-negation:1" "≡E"(2))
5099      AOT_hence x1...∀xn ¬[F]x1...xn using "∀I" by fast
5100    }
5101    ultimately AOT_have x1...∀xn ¬[F]x1...xn
5102      using "RN[prem]"[where Γ="{«x1...∀xn [F]-x1...xn»}"] by blast
5103    AOT_hence Impossible([F])
5104      using "≡Df"[OF "contingent-properties:2", THEN "≡S"(1),
5105                  OF "cqt:2[const_var]"[axiom_inst], THEN "≡E"(2)]
5106      by blast
5107  }
5108  moreover {
5109    AOT_assume Impossible([F]-)
5110    AOT_hence (x1...∀xn ¬[F]-x1...xn)
5111      using "≡Df"[OF "contingent-properties:2", THEN "≡S"(1),
5112                  OF "rel-neg-T:3", THEN "≡E"(1)]
5113      by blast
5114    moreover AOT_modally_strict {
5115      AOT_assume x1...∀xn ¬[F]-x1...xn
5116      AOT_hence ¬[F]-x1...xn for x1xn using "∀E" by blast
5117      AOT_hence [F]x1...xn for x1xn 
5118        using "thm-relation-negation:1"[THEN
5119                "oth-class-taut:4:b"[THEN "≡E"(1)], THEN "≡E"(1)]
5120              "useful-tautologies:1"[THEN "→E"] by blast
5121      AOT_hence x1...∀xn [F]x1...xn using "∀I" by fast
5122    }
5123    ultimately AOT_have (x1...∀xn [F]x1...xn)
5124      using "RN[prem]"[where Γ="{«x1...∀xn ¬[F]-x1...xn»}"] by blast
5125    AOT_hence Necessary([F])
5126      using "dfI"[OF "contingent-properties:1"] by blast
5127  }
5128  ultimately AOT_have Necessary([F])  Impossible([F])
5129    using "∨E"(1) "∨I" "→I" by metis
5130  AOT_thus NonContingent([F])
5131    using "dfI"[OF "contingent-properties:3"] by blast
5132qed
5133
5134AOT_theorem "thm-cont-prop:2": Contingent([F])  x [F]x & x ¬[F]x
5135proof -
5136  AOT_have Contingent([F])  ¬(Necessary([F])  Impossible([F]))
5137    using "contingent-properties:4"[THEN "≡Df", THEN "≡S"(1),
5138                                    OF "cqt:2[const_var]"[axiom_inst]]
5139    by blast
5140  also AOT_have ...  ¬Necessary([F]) & ¬Impossible([F])
5141    using "oth-class-taut:5:d" by fastforce
5142  also AOT_have ...  ¬Impossible([F]) & ¬Necessary([F])
5143    by (simp add: "Commutativity of &")
5144  also AOT_have ...  x [F]x & ¬Necessary([F])
5145  proof (rule "oth-class-taut:4:e"[THEN "→E"])
5146    AOT_have ¬Impossible([F])  ¬¬ x [F]x
5147      apply (rule "oth-class-taut:4:b"[THEN "≡E"(1)])
5148      apply (AOT_subst x [F]x ¬ x ¬[F]x)
5149       apply (simp add: "conventions:4" "≡Df")
5150      apply (AOT_subst (reverse) ¬¬x ¬[F]x x ¬[F]x)
5151       apply (simp add: "oth-class-taut:3:b")
5152      using "contingent-properties:2"[THEN "≡Df", THEN "≡S"(1),
5153                                      OF "cqt:2[const_var]"[axiom_inst]]
5154      by blast
5155    also AOT_have ...  x [F]x
5156      using "conventions:5"[THEN "≡Df", symmetric] by blast
5157    finally AOT_show ¬Impossible([F])  x [F]x .
5158  qed
5159  also AOT_have ...  x [F]x & x ¬[F]x
5160  proof (rule "oth-class-taut:4:f"[THEN "→E"])
5161    AOT_have ¬Necessary([F])  ¬¬x ¬[F]x
5162      apply (rule "oth-class-taut:4:b"[THEN "≡E"(1)])
5163      apply (AOT_subst x ¬[F]x ¬ x ¬¬[F]x)
5164       apply (simp add: "conventions:4" "≡Df")
5165      apply (AOT_subst (reverse) ¬¬[F]x [F]x for: x)
5166       apply (simp add: "oth-class-taut:3:b")
5167      apply (AOT_subst (reverse) ¬¬x [F]x x [F]x)
5168      by (auto simp: "oth-class-taut:3:b" "contingent-properties:1" "≡Df")
5169    also AOT_have ...  x ¬[F]x
5170      using "conventions:5"[THEN "≡Df", symmetric] by blast
5171    finally AOT_show ¬Necessary([F])  x ¬[F]x.
5172  qed
5173  finally show ?thesis.
5174qed
5175
5176AOT_theorem "thm-cont-prop:3":
5177  Contingent([F])  Contingent([F]-) for F::<κ> AOT_var
5178proof -
5179  {
5180    fix Π :: <κ>
5181    AOT_assume Π
5182    moreover AOT_have F (Contingent([F])  x [F]x & x ¬[F]x)
5183      using "thm-cont-prop:2" GEN by fast
5184    ultimately  AOT_have Contingent([Π])  x [Π]x & x ¬[Π]x
5185      using "thm-cont-prop:2" "∀E" by fast
5186  } note 1 = this
5187  AOT_have Contingent([F])  x [F]x & x ¬[F]x
5188    using "thm-cont-prop:2" by blast
5189  also AOT_have ...  x ¬[F]x & x [F]x
5190    by (simp add: "Commutativity of &")
5191  also AOT_have ...  x [F]-x & x [F]x
5192    by (AOT_subst [F]-x ¬[F]x for: x)
5193       (auto simp: "thm-relation-negation:1" "oth-class-taut:3:a")
5194  also AOT_have ...  x [F]-x & x ¬[F]-x
5195    by (AOT_subst (reverse) [F]x ¬[F]-x for: x)
5196       (auto simp: "thm-relation-negation:2" "oth-class-taut:3:a")
5197  also AOT_have ...  Contingent([F]-)
5198    using 1[OF "rel-neg-T:3", symmetric] by blast
5199  finally show ?thesis.
5200qed
5201
5202AOT_define concrete_if_concrete :: Π ("L")
5203  L_def: L =df x E!x  E!x]
5204
5205AOT_theorem "thm-noncont-e-e:1": Necessary(L)
5206proof -
5207  AOT_modally_strict {
5208    fix x
5209    AOT_have x E!x  E!x] by "cqt:2[lambda]"
5210    moreover AOT_have x using "cqt:2[const_var]"[axiom_inst] by blast
5211    moreover AOT_have E!x  E!x using "if-p-then-p" by blast
5212    ultimately AOT_have x E!x  E!x]x
5213      using "β←C" by blast
5214  }
5215  AOT_hence 0: x x E!x  E!x]x
5216    using RN GEN by blast
5217  show ?thesis
5218    apply (rule "=dfI"(2)[OF L_def])
5219     apply "cqt:2[lambda]"
5220    by (rule "contingent-properties:1"[THEN "dfI", OF 0])
5221qed
5222
5223AOT_theorem "thm-noncont-e-e:2": Impossible([L]-)
5224proof -
5225  AOT_modally_strict {
5226    fix x
5227
5228    AOT_have 0: F (¬[F]-x  [F]x)
5229      using "thm-relation-negation:2" GEN by fast
5230    AOT_have ¬x E!x  E!x]-x  x E!x  E!x]x
5231      by (rule 0[THEN "∀E"(1)]) "cqt:2[lambda]"
5232    moreover {
5233      AOT_have x E!x  E!x] by "cqt:2[lambda]"
5234      moreover AOT_have x using "cqt:2[const_var]"[axiom_inst] by blast
5235      moreover AOT_have E!x  E!x using "if-p-then-p" by blast
5236      ultimately AOT_have x E!x  E!x]x
5237        using "β←C" by blast
5238    }
5239    ultimately AOT_have ¬x E!x  E!x]-x
5240      using "≡E" by blast
5241  }
5242  AOT_hence 0: x ¬x E!x  E!x]-x
5243    using RN GEN by fast
5244  show ?thesis
5245    apply (rule "=dfI"(2)[OF L_def])
5246     apply "cqt:2[lambda]"
5247    apply (rule "contingent-properties:2"[THEN "dfI"]; rule "&I")
5248     using "rel-neg-T:3"
5249     apply blast
5250    using 0
5251    by blast
5252qed
5253
5254AOT_theorem "thm-noncont-e-e:3": NonContingent(L)
5255  using "thm-noncont-e-e:1"
5256  by (rule "contingent-properties:3"[THEN "dfI", OF "∨I"(1)])
5257
5258AOT_theorem "thm-noncont-e-e:4": NonContingent([L]-)
5259proof -
5260  AOT_have 0: F (NonContingent([F])  NonContingent([F]-))
5261    using "thm-cont-prop:1" "∀I" by fast
5262  moreover AOT_have 1: L
5263    by (rule "=dfI"(2)[OF L_def]) "cqt:2[lambda]"+
5264  AOT_show NonContingent([L]-)
5265    using "∀E"(1)[OF 0, OF 1, THEN "≡E"(1), OF "thm-noncont-e-e:3"] by blast
5266qed
5267
5268AOT_theorem "thm-noncont-e-e:5":
5269  F G (F  «G::<κ>» & NonContingent([F]) & NonContingent([G]))
5270proof (rule "∃I")+
5271  {
5272    AOT_have F [F]  [F]-
5273      using "thm-relation-negation:5" GEN by fast
5274    moreover AOT_have L
5275      by (rule "=dfI"(2)[OF L_def]) "cqt:2[lambda]"+
5276    ultimately AOT_have L  [L]-
5277      using "∀E" by blast
5278  }
5279  AOT_thus L  [L]- & NonContingent(L) & NonContingent([L]-)
5280    using "thm-noncont-e-e:3" "thm-noncont-e-e:4" "&I" by metis
5281next
5282  AOT_show [L]-
5283    using "rel-neg-T:3" by blast
5284next
5285  AOT_show L
5286      by (rule "=dfI"(2)[OF L_def]) "cqt:2[lambda]"+
5287qed
5288
5289AOT_theorem "lem-cont-e:1": x ([F]x & ¬[F]x)  x (¬[F]x & [F]x)
5290proof -
5291  AOT_have x ([F]x & ¬[F]x)  x ([F]x & ¬[F]x)
5292    using "BF◇" "CBF◇" "≡I" by blast
5293  also AOT_have   x ([F]x &  ¬[F]x)
5294    by (AOT_subst ([F]x & ¬[F]x) [F]x &  ¬[F]x for: x)
5295       (auto simp: "S5Basic:11" "cqt-further:7")
5296  also AOT_have   x (¬[F]x & [F]x)
5297    by (AOT_subst ¬[F]x & [F]x  [F]x & ¬[F]x for: x)
5298       (auto simp: "Commutativity of &" "cqt-further:7")
5299  also AOT_have   x (¬[F]x & [F]x)
5300    by (AOT_subst (¬[F]x & [F]x) ¬[F]x & [F]x for: x)
5301       (auto simp: "S5Basic:11" "oth-class-taut:3:a")
5302  also AOT_have   x (¬[F]x & [F]x)
5303    using "BF◇" "CBF◇" "≡I" by fast
5304  finally show ?thesis.
5305qed
5306
5307AOT_theorem "lem-cont-e:2":
5308  x ([F]x & ¬[F]x)  x ([F]-x & ¬[F]-x)
5309proof -
5310  AOT_have x ([F]x & ¬[F]x)  x (¬[F]x & [F]x)
5311    using "lem-cont-e:1".
5312  also AOT_have   x ([F]-x & ¬[F]-x)
5313    apply (AOT_subst ¬[F]-x [F]x for: x)
5314     apply (simp add: "thm-relation-negation:2")
5315    apply (AOT_subst [F]-x ¬[F]x for: x)
5316     apply (simp add: "thm-relation-negation:1")
5317    by (simp add: "oth-class-taut:3:a")
5318  finally show ?thesis.
5319qed
5320
5321AOT_theorem "thm-cont-e:1": x (E!x & ¬E!x)
5322proof (rule "CBF◇"[THEN "→E"])
5323  AOT_have x (E!x & ¬𝒜E!x)
5324    using "qml:4"[axiom_inst] "BF◇"[THEN "→E"] by blast
5325  then AOT_obtain a where (E!a & ¬𝒜E!a)
5326    using "∃E"[rotated] by blast
5327  AOT_hence θ: E!a & ¬𝒜E!a
5328    using "KBasic2:3"[THEN "→E"] by blast
5329  AOT_have ξ: E!a & 𝒜¬E!a
5330    by (AOT_subst  𝒜¬E!a ¬𝒜E!a)
5331       (auto simp: "logic-actual-nec:1"[axiom_inst] θ)
5332  AOT_have ζ: E!a & 𝒜¬E!a
5333    by (AOT_subst 𝒜¬E!a 𝒜¬E!a)
5334       (auto simp add: "Act-Sub:4" ξ)
5335  AOT_hence E!a & ¬E!a
5336    using "&E" "&I" "Act-Sub:3"[THEN "→E"] by blast
5337  AOT_hence (E!a & ¬E!a)
5338    using "S5Basic:11"[THEN "≡E"(2)] by simp
5339  AOT_thus x (E!x & ¬E!x)
5340    using "∃I"(2) by fast
5341qed
5342
5343AOT_theorem "thm-cont-e:2": x (¬E!x & E!x)
5344proof -
5345  AOT_have F (x ([F]x & ¬[F]x)  x (¬[F]x & [F]x))
5346    using "lem-cont-e:1" GEN by fast
5347  AOT_hence (x (E!x & ¬E!x)  x (¬E!x & E!x))
5348    using "∀E"(2) by blast
5349  thus ?thesis using "thm-cont-e:1" "≡E" by blast
5350qed
5351
5352AOT_theorem "thm-cont-e:3": x E!x
5353proof (rule "CBF◇"[THEN "→E"])
5354  AOT_obtain a where (E!a & ¬E!a)
5355    using "∃E"[rotated, OF "thm-cont-e:1"[THEN "BF◇"[THEN "→E"]]] by blast
5356  AOT_hence E!a
5357    using "KBasic2:3"[THEN "→E", THEN "&E"(1)] by blast
5358  AOT_thus x E!x using "∃I" by fast
5359qed
5360
5361AOT_theorem "thm-cont-e:4": x ¬E!x
5362proof (rule "CBF◇"[THEN "→E"])
5363  AOT_obtain a where (E!a & ¬E!a)
5364    using "∃E"[rotated, OF "thm-cont-e:1"[THEN "BF◇"[THEN "→E"]]] by blast
5365  AOT_hence ¬E!a
5366    using "KBasic2:3"[THEN "→E", THEN "&E"(2)] by blast
5367  AOT_hence ¬E!a
5368    using "4◇"[THEN "→E"] by blast
5369  AOT_thus x ¬E!x using "∃I" by fast
5370qed
5371
5372AOT_theorem "thm-cont-e:5": Contingent([E!])
5373proof -
5374  AOT_have F (Contingent([F])  x [F]x & x ¬[F]x)
5375    using "thm-cont-prop:2" GEN by fast
5376  AOT_hence Contingent([E!])  x E!x & x ¬E!x
5377    using "∀E"(2) by blast
5378  thus ?thesis
5379    using "thm-cont-e:3" "thm-cont-e:4" "≡E"(2) "&I" by blast
5380qed
5381
5382AOT_theorem "thm-cont-e:6": Contingent([E!]-)
5383proof -
5384  AOT_have F (Contingent([«F::<κ>»])  Contingent([F]-))
5385    using "thm-cont-prop:3" GEN by fast
5386  AOT_hence Contingent([E!])  Contingent([E!]-)
5387    using "∀E"(2) by fast
5388  thus ?thesis using "thm-cont-e:5" "≡E" by blast
5389qed
5390
5391AOT_theorem "thm-cont-e:7":
5392  FG (Contingent([«F::<κ>»]) & Contingent([G]) & F  G)
5393proof (rule "∃I")+
5394  AOT_have F [«F::<κ>»]  [F]-
5395    using "thm-relation-negation:5" GEN by fast
5396  AOT_hence [E!]  [E!]-
5397    using "∀E" by fast
5398  AOT_thus Contingent([E!]) & Contingent([E!]-) & [E!]  [E!]-
5399    using "thm-cont-e:5" "thm-cont-e:6" "&I" by metis
5400next
5401  AOT_show E!-
5402    by (fact AOT)
5403qed("cqt:2")
5404
5405AOT_theorem "property-facts:1":
5406  NonContingent([F])  ¬G (Contingent([G]) & G = F)
5407proof (rule "→I"; rule "raa-cor:2")
5408  AOT_assume NonContingent([F])
5409  AOT_hence 1: Necessary([F])  Impossible([F])
5410    using "contingent-properties:3"[THEN "dfE"] by blast
5411  AOT_assume G (Contingent([G]) & G = F)
5412  then AOT_obtain G where Contingent([G]) & G = F
5413    using "∃E"[rotated] by blast
5414  AOT_hence Contingent([F]) using "rule=E" "&E" by blast
5415  AOT_hence ¬(Necessary([F])  Impossible([F]))
5416    using "contingent-properties:4"[THEN "≡Df", THEN "≡S"(1),
5417            OF "cqt:2[const_var]"[axiom_inst], THEN "≡E"(1)] by blast
5418  AOT_thus (Necessary([F])  Impossible([F])) &
5419            ¬(Necessary([F])  Impossible([F]))
5420    using 1 "&I" by blast
5421qed
5422
5423AOT_theorem "property-facts:2":
5424  Contingent([F])  ¬G (NonContingent([G]) & G = F)
5425proof (rule "→I"; rule "raa-cor:2")
5426  AOT_assume Contingent([F])
5427  AOT_hence 1: ¬(Necessary([F])  Impossible([F]))
5428    using "contingent-properties:4"[THEN "≡Df", THEN "≡S"(1),
5429            OF "cqt:2[const_var]"[axiom_inst], THEN "≡E"(1)] by blast
5430  AOT_assume G (NonContingent([G]) & G = F)
5431  then AOT_obtain G where NonContingent([G]) & G = F
5432    using "∃E"[rotated] by blast
5433  AOT_hence NonContingent([F])
5434    using "rule=E" "&E" by blast
5435  AOT_hence Necessary([F])  Impossible([F])
5436    using "contingent-properties:3"[THEN "dfE"] by blast
5437  AOT_thus (Necessary([F])  Impossible([F])) &
5438            ¬(Necessary([F])  Impossible([F]))
5439    using 1 "&I" by blast
5440qed
5441
5442AOT_theorem "property-facts:3":
5443  L  [L]- & L  E! & L  E!- & [L]-  [E!]- & E!  [E!]-
5444proof -
5445  AOT_have noneqI: Π  Π' if φ{Π} and ¬φ{Π'} for φ and Π Π' :: <κ>
5446    apply (rule "=-infix"[THEN "dfI"]; rule "raa-cor:2")
5447    using "rule=E"[where φ=φ and τ=Π and σ = Π'] that "&I" by blast
5448  AOT_have contingent_denotes: Π if Contingent([Π]) for Π :: <κ>
5449    using that "contingent-properties:4"[THEN "dfE", THEN "&E"(1)] by blast
5450  AOT_have not_noncontingent_if_contingent:
5451    ¬NonContingent([Π]) if Contingent([Π]) for Π :: <κ>
5452  proof(rule RAA(2))
5453    AOT_show ¬(Necessary([Π])  Impossible([Π]))
5454      using that "contingent-properties:4"[THEN "≡Df", THEN "≡S"(1),
5455                    OF contingent_denotes[OF that], THEN "≡E"(1)]
5456      by blast
5457  next
5458    AOT_assume NonContingent([Π])
5459    AOT_thus Necessary([Π])  Impossible([Π])
5460      using "contingent-properties:3"[THEN "dfE"] by blast
5461  qed
5462
5463  show ?thesis
5464  proof (safe intro!: "&I")
5465    AOT_show L  [L]-
5466      apply (rule "=dfI"(2)[OF L_def])
5467       apply "cqt:2[lambda]"
5468      apply (rule "∀E"(1)[where φ="λ Π . «Π  [Π]-»"])
5469       apply (rule GEN) apply (fact AOT)
5470      by "cqt:2[lambda]"
5471  next
5472    AOT_show L  E!
5473      apply (rule noneqI)
5474      using "thm-noncont-e-e:3"
5475            not_noncontingent_if_contingent[OF "thm-cont-e:5"]
5476      by auto
5477  next
5478    AOT_show L  E!-
5479      apply (rule noneqI)
5480      using "thm-noncont-e-e:3" apply fast
5481      apply (rule not_noncontingent_if_contingent)
5482      apply (rule "∀E"(1)[
5483            where φ="λ Π . «Contingent([Π])  Contingent([Π]-)»",
5484            rotated, OF contingent_denotes, THEN "≡E"(1), rotated])
5485      using "thm-cont-prop:3" GEN apply fast
5486      using "thm-cont-e:5" by fast+
5487  next
5488    AOT_show [L]-  E!-
5489      apply (rule noneqI)
5490      using "thm-noncont-e-e:4" apply fast
5491      apply (rule not_noncontingent_if_contingent)
5492      apply (rule "∀E"(1)[
5493            where φ="λ Π . «Contingent([Π])  Contingent([Π]-)»",
5494            rotated, OF contingent_denotes, THEN "≡E"(1), rotated])
5495      using "thm-cont-prop:3" GEN apply fast
5496      using "thm-cont-e:5" by fast+
5497  next
5498    AOT_show E!  E!-
5499      apply (rule "=dfI"(2)[OF L_def])
5500       apply "cqt:2[lambda]"
5501      apply (rule "∀E"(1)[where φ="λ Π . «Π  [Π]-»"])
5502       apply (rule GEN) apply (fact AOT)
5503      by "cqt:2"
5504  qed
5505qed
5506
5507AOT_theorem "thm-cont-propos:1":
5508  NonContingent0(p)  NonContingent0(((p)-))
5509proof(rule "≡I"; rule "→I")
5510  AOT_assume NonContingent0(p)
5511  AOT_hence Necessary0(p)  Impossible0(p)
5512    using "contingent-properties:3[zero]"[THEN "dfE"] by blast
5513  moreover {
5514    AOT_assume Necessary0(p)
5515    AOT_hence 1: p
5516      using "contingent-properties:1[zero]"[THEN "dfE"] by blast
5517    AOT_have ¬((p)-)
5518      by (AOT_subst ¬((p)-) p)
5519         (auto simp add: 1 "thm-relation-negation:4")
5520    AOT_hence Impossible0(((p)-))
5521      by (rule "contingent-properties:2[zero]"[THEN "dfI"])
5522  }
5523  moreover {
5524    AOT_assume Impossible0(p)
5525    AOT_hence 1: ¬p
5526      by (rule "contingent-properties:2[zero]"[THEN "dfE"])
5527    AOT_have ((p)-)
5528      by (AOT_subst ((p)-) ¬p) 
5529         (auto simp: 1 "thm-relation-negation:3")
5530    AOT_hence Necessary0(((p)-))
5531      by (rule "contingent-properties:1[zero]"[THEN "dfI"])
5532  }
5533  ultimately AOT_have Necessary0(((p)-))  Impossible0(((p)-))
5534    using "∨E"(1) "∨I" "→I" by metis
5535  AOT_thus NonContingent0(((p)-))
5536    using "contingent-properties:3[zero]"[THEN "dfI"] by blast
5537next
5538  AOT_assume NonContingent0(((p)-))
5539  AOT_hence Necessary0(((p)-))  Impossible0(((p)-))
5540    using "contingent-properties:3[zero]"[THEN "dfE"] by blast
5541  moreover {
5542    AOT_assume Impossible0(((p)-))
5543    AOT_hence 1: ¬((p)-)
5544      by (rule "contingent-properties:2[zero]"[THEN "dfE"])
5545    AOT_have p
5546      by (AOT_subst (reverse) p ¬((p)-))
5547         (auto simp: 1 "thm-relation-negation:4")
5548    AOT_hence Necessary0(p)
5549      using "contingent-properties:1[zero]"[THEN "dfI"] by blast
5550  }
5551  moreover {
5552    AOT_assume Necessary0(((p)-))
5553    AOT_hence 1: ((p)-)
5554      by (rule "contingent-properties:1[zero]"[THEN "dfE"])
5555    AOT_have ¬p
5556      by (AOT_subst (reverse) ¬p ((p)-))
5557         (auto simp: 1 "thm-relation-negation:3")
5558    AOT_hence Impossible0(p)
5559      by (rule "contingent-properties:2[zero]"[THEN "dfI"])
5560  }
5561  ultimately AOT_have Necessary0(p)  Impossible0(p)
5562    using "∨E"(1) "∨I" "→I" by metis
5563  AOT_thus NonContingent0(p)
5564    using "contingent-properties:3[zero]"[THEN "dfI"] by blast
5565qed
5566
5567AOT_theorem "thm-cont-propos:2": Contingent0(φ)  φ & ¬φ
5568proof -
5569  AOT_have Contingent0(φ)  ¬(Necessary0(φ)  Impossible0(φ))
5570    using "contingent-properties:4[zero]"[THEN "≡Df"] by simp
5571  also AOT_have   ¬Necessary0(φ) & ¬Impossible0(φ)
5572    by (fact AOT)
5573  also AOT_have   ¬Impossible0(φ) & ¬Necessary0(φ)
5574    by (fact AOT)
5575  also AOT_have   φ & ¬φ
5576    apply (AOT_subst φ ¬¬φ)
5577     apply (simp add: "conventions:5" "≡Df")
5578    apply (AOT_subst Impossible0(φ) ¬φ)
5579     apply (simp add: "contingent-properties:2[zero]" "≡Df")
5580    apply (AOT_subst (reverse) ¬φ ¬φ)
5581     apply (simp add: "KBasic:11")
5582    apply (AOT_subst Necessary0(φ) φ)
5583     apply (simp add: "contingent-properties:1[zero]" "≡Df")
5584    by (simp add: "oth-class-taut:3:a")
5585  finally show ?thesis.
5586qed
5587
5588AOT_theorem "thm-cont-propos:3": Contingent0(p)  Contingent0(((p)-))
5589proof -
5590  AOT_have Contingent0(p)  p & ¬p using "thm-cont-propos:2".
5591  also AOT_have   ¬p & p by (fact AOT)
5592  also AOT_have   ((p)-) & p
5593    by (AOT_subst ((p)-) ¬p)
5594       (auto simp: "thm-relation-negation:3" "oth-class-taut:3:a")
5595  also AOT_have   ((p)-) & ¬((p)-)
5596    by (AOT_subst ¬((p)-) p)
5597       (auto simp: "thm-relation-negation:4" "oth-class-taut:3:a")
5598  also AOT_have   Contingent0(((p)-))
5599    using "thm-cont-propos:2"[symmetric] by blast
5600  finally show ?thesis.
5601qed
5602
5603AOT_define noncontingent_prop :: φ ("p0")
5604  p0_def: "(p0) =df (x (E!x  E!x))"
5605
5606AOT_theorem "thm-noncont-propos:1":  Necessary0((p0))
5607proof(rule "contingent-properties:1[zero]"[THEN "dfI"])
5608  AOT_show (p0)
5609    apply (rule "=dfI"(2)[OF p0_def])
5610    using "log-prop-prop:2" apply simp
5611    using "if-p-then-p" RN GEN by fast
5612qed
5613
5614AOT_theorem "thm-noncont-propos:2": Impossible0(((p0)-))
5615proof(rule "contingent-properties:2[zero]"[THEN "dfI"])
5616  AOT_show ¬((p0)-)
5617    apply (AOT_subst ((p0)-) ¬p0)
5618    using "thm-relation-negation:3" GEN "∀E"(1)[rotated, OF "log-prop-prop:2"]
5619     apply fast
5620    apply (AOT_subst (reverse) ¬¬p0 p0)
5621     apply (simp add: "oth-class-taut:3:b")
5622    apply (rule "=dfI"(2)[OF p0_def])
5623    using "log-prop-prop:2" apply simp
5624    using "if-p-then-p" RN GEN by fast
5625qed
5626
5627AOT_theorem "thm-noncont-propos:3": NonContingent0((p0))
5628  apply(rule "contingent-properties:3[zero]"[THEN "dfI"])
5629  using "thm-noncont-propos:1" "∨I" by blast
5630
5631AOT_theorem "thm-noncont-propos:4": NonContingent0(((p0)-))
5632  apply(rule "contingent-properties:3[zero]"[THEN "dfI"])
5633  using "thm-noncont-propos:2" "∨I" by blast
5634
5635AOT_theorem "thm-noncont-propos:5":
5636  pq (NonContingent0((p)) & NonContingent0((q)) & p  q)
5637proof(rule "∃I")+
5638  AOT_have 0: φ  (φ)- for φ
5639    using "thm-relation-negation:6" "∀I"
5640          "∀E"(1)[rotated, OF "log-prop-prop:2"] by fast
5641  AOT_thus NonContingent0((p0)) & NonContingent0(((p0)-)) & (p0)  (p0)-
5642    using "thm-noncont-propos:3" "thm-noncont-propos:4" "&I" by auto
5643qed(auto simp: "log-prop-prop:2")
5644
5645AOT_act_theorem "no-cnac": ¬x(E!x & ¬𝒜E!x)
5646proof(rule "raa-cor:2")
5647  AOT_assume x(E!x & ¬𝒜E!x)
5648  then AOT_obtain a where a: E!a & ¬𝒜E!a
5649    using "∃E"[rotated] by blast
5650  AOT_hence 𝒜¬E!a
5651    using "&E" "logic-actual-nec:1"[axiom_inst, THEN "≡E"(2)] by blast
5652  AOT_hence ¬E!a
5653    using "logic-actual"[act_axiom_inst, THEN "→E"] by blast
5654  AOT_hence E!a & ¬E!a
5655    using a "&E" "&I" by blast
5656  AOT_thus p & ¬p for p using "raa-cor:1" by blast
5657qed
5658
5659AOT_theorem "pos-not-pna:1": ¬𝒜x (E!x & ¬𝒜E!x)
5660proof(rule "raa-cor:2")
5661  AOT_assume 𝒜x (E!x & ¬𝒜E!x)
5662  AOT_hence x 𝒜(E!x & ¬𝒜E!x)
5663    using "Act-Basic:10"[THEN "≡E"(1)] by blast
5664  then AOT_obtain a where 𝒜(E!a & ¬𝒜E!a)
5665    using "∃E"[rotated] by blast
5666  AOT_hence 1: 𝒜E!a & 𝒜¬𝒜E!a
5667    using "Act-Basic:2"[THEN "≡E"(1)] by blast
5668  AOT_hence ¬𝒜𝒜E!a
5669    using "&E"(2) "logic-actual-nec:1"[axiom_inst, THEN "≡E"(1)] by blast
5670  AOT_hence ¬𝒜E!a
5671    using "logic-actual-nec:4"[axiom_inst, THEN "≡E"(1)] RAA by blast
5672  AOT_thus p & ¬p for p using 1[THEN "&E"(1)] "&I" "raa-cor:1" by blast
5673qed
5674
5675AOT_theorem "pos-not-pna:2": ¬x(E!x & ¬𝒜E!x)
5676proof (rule RAA(1))
5677  AOT_show ¬𝒜x (E!x & ¬𝒜E!x)
5678    using "pos-not-pna:1" by blast
5679next
5680  AOT_assume ¬¬x (E!x & ¬𝒜E!x)
5681  AOT_hence x (E!x & ¬𝒜E!x)
5682    using "KBasic:12"[THEN "≡E"(2)] by blast
5683  AOT_thus 𝒜x (E!x & ¬𝒜E!x)
5684    using "nec-imp-act"[THEN "→E"] by blast
5685qed
5686
5687AOT_theorem "pos-not-pna:3": x (E!x & ¬𝒜E!x)
5688proof -
5689  AOT_obtain a where (E!a & ¬𝒜E!a)
5690    using "qml:4"[axiom_inst] "BF◇"[THEN "→E"] "∃E"[rotated] by blast
5691  AOT_hence θ: E!a and ξ: ¬𝒜E!a
5692    using "KBasic2:3"[THEN "→E"] "&E" by blast+
5693  AOT_have ¬𝒜E!a
5694    using ξ "KBasic:11"[THEN "≡E"(2)] by blast
5695  AOT_hence ¬𝒜E!a
5696    using "Act-Basic:6"[THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
5697                        THEN "≡E"(2)] by blast
5698  AOT_hence E!a & ¬𝒜E!a using θ "&I" by blast
5699  thus ?thesis using "∃I" by fast
5700qed
5701
5702AOT_define contingent_prop :: φ ("q0")
5703  q0_def: (q0) =df (x (E!x & ¬𝒜E!x))
5704
5705AOT_theorem q0_prop: q0 & ¬q0
5706  apply (rule "=dfI"(2)[OF q0_def])
5707  apply (fact "log-prop-prop:2")
5708  apply (rule "&I")
5709   apply (fact "qml:4"[axiom_inst])
5710  by (fact "pos-not-pna:2")
5711
5712AOT_theorem "basic-prop:1": Contingent0((q0))
5713proof(rule "contingent-properties:4[zero]"[THEN "dfI"])
5714  AOT_have ¬Necessary0((q0)) & ¬Impossible0((q0))
5715  proof (rule "&I";
5716         rule "=dfI"(2)[OF q0_def];
5717         (rule "log-prop-prop:2" | rule "raa-cor:2"))
5718    AOT_assume Necessary0(x (E!x & ¬𝒜E!x))
5719    AOT_hence x (E!x & ¬𝒜E!x)
5720      using "contingent-properties:1[zero]"[THEN "dfE"] by blast
5721    AOT_hence 𝒜x (E!x & ¬𝒜E!x)
5722      using "Act-Basic:8"[THEN "→E"] "qml:2"[axiom_inst, THEN "→E"] by blast
5723    AOT_thus 𝒜x (E!x & ¬𝒜E!x) & ¬𝒜x (E!x & ¬𝒜E!x)
5724      using "pos-not-pna:1" "&I" by blast
5725  next
5726    AOT_assume Impossible0(x (E!x & ¬𝒜E!x))
5727    AOT_hence ¬(x (E!x & ¬𝒜E!x))
5728      using "contingent-properties:2[zero]"[THEN "dfE"] by blast
5729    AOT_hence ¬(x (E!x & ¬𝒜E!x))
5730      using "KBasic2:1"[THEN "≡E"(1)] by blast
5731    AOT_thus (x (E!x & ¬𝒜E!x)) & ¬(x (E!x & ¬𝒜E!x))
5732      using "qml:4"[axiom_inst] "&I" by blast
5733  qed
5734  AOT_thus ¬(Necessary0((q0))  Impossible0((q0)))
5735    using "oth-class-taut:5:d" "≡E"(2) by blast
5736qed
5737
5738AOT_theorem "basic-prop:2": p Contingent0((p))
5739  using "∃I"(1)[rotated, OF "log-prop-prop:2"] "basic-prop:1" by blast
5740
5741AOT_theorem "basic-prop:3": Contingent0(((q0)-))
5742  apply (AOT_subst ((q0)-) ¬q0)
5743   apply (insert "thm-relation-negation:3" "∀I"
5744                "∀E"(1)[rotated, OF "log-prop-prop:2"]; fast)
5745  apply (rule "contingent-properties:4[zero]"[THEN "dfI"])
5746  apply (rule "oth-class-taut:5:d"[THEN "≡E"(2)])
5747  apply (rule "&I")
5748   apply (rule "contingent-properties:1[zero]"[THEN "df-rules-formulas[3]",
5749                  THEN "useful-tautologies:5"[THEN "→E"], THEN "→E"])
5750   apply (rule "conventions:5"[THEN "dfE"])
5751   apply (rule "=dfE"(2)[OF q0_def])
5752    apply (rule "log-prop-prop:2")
5753   apply (rule q0_prop[THEN "&E"(1)])
5754  apply (rule "contingent-properties:2[zero]"[THEN "df-rules-formulas[3]",
5755                THEN "useful-tautologies:5"[THEN "→E"], THEN "→E"])
5756  apply (rule "conventions:5"[THEN "dfE"])
5757  by (rule q0_prop[THEN "&E"(2)])
5758
5759AOT_theorem "basic-prop:4":
5760  pq (p  q & Contingent0(p) & Contingent0(q))
5761proof(rule "∃I")+
5762  AOT_have 0: φ  (φ)- for φ
5763    using "thm-relation-negation:6" "∀I"
5764          "∀E"(1)[rotated, OF "log-prop-prop:2"] by fast
5765  AOT_show (q0)  (q0)- & Contingent0(q0) & Contingent0(((q0)-))
5766    using "basic-prop:1" "basic-prop:3" "&I" 0 by presburger
5767qed(auto simp: "log-prop-prop:2")
5768
5769AOT_theorem "proposition-facts:1":
5770  NonContingent0(p)  ¬q (Contingent0(q) & q = p)
5771proof(rule "→I"; rule "raa-cor:2")
5772  AOT_assume NonContingent0(p)
5773  AOT_hence 1: Necessary0(p)  Impossible0(p)
5774    using "contingent-properties:3[zero]"[THEN "dfE"] by blast
5775  AOT_assume q (Contingent0(q) & q = p)
5776  then AOT_obtain q where Contingent0(q) & q = p
5777    using "∃E"[rotated] by blast
5778  AOT_hence Contingent0(p)
5779    using "rule=E" "&E" by fast
5780  AOT_thus (Necessary0(p)  Impossible0(p)) &
5781            ¬(Necessary0(p)  Impossible0(p))
5782    using "contingent-properties:4[zero]"[THEN "dfE"] 1 "&I" by blast
5783qed
5784
5785AOT_theorem "proposition-facts:2":
5786  Contingent0(p)  ¬q (NonContingent0(q) & q = p)
5787proof(rule "→I"; rule "raa-cor:2")
5788  AOT_assume Contingent0(p)
5789  AOT_hence 1: ¬(Necessary0(p)  Impossible0(p))
5790    using "contingent-properties:4[zero]"[THEN "dfE"] by blast
5791  AOT_assume q (NonContingent0(q) & q = p)
5792  then AOT_obtain q where NonContingent0(q) & q = p
5793    using "∃E"[rotated] by blast
5794  AOT_hence NonContingent0(p)
5795    using "rule=E" "&E" by fast
5796  AOT_thus (Necessary0(p)  Impossible0(p)) &
5797            ¬(Necessary0(p)  Impossible0(p))
5798    using "contingent-properties:3[zero]"[THEN "dfE"] 1 "&I" by blast
5799qed
5800
5801AOT_theorem "proposition-facts:3":
5802  (p0)  (p0)- & (p0)  (q0) & (p0)  (q0)- & (p0)-  (q0)- & (q0)  (q0)-
5803proof -
5804  {
5805    fix χ φ ψ
5806    AOT_assume χ{φ}
5807    moreover AOT_assume ¬χ{ψ}
5808    ultimately AOT_have ¬(χ{φ}  χ{ψ})
5809      using RAA "≡E" by metis
5810    moreover {
5811      AOT_have pq ((¬(χ{p}  χ{q}))  p  q)
5812        by (rule "∀I"; rule "∀I"; rule "pos-not-equiv-ne:4[zero]")
5813      AOT_hence ((¬(χ{φ}  χ{ψ}))  φ  ψ)
5814        using "∀E" "log-prop-prop:2" by blast
5815    }
5816    ultimately AOT_have φ  ψ
5817      using "→E" by blast
5818  } note 0 = this
5819  AOT_have contingent_neg: Contingent0(φ)  Contingent0(((φ)-)) for φ
5820    using "thm-cont-propos:3" "∀I"
5821          "∀E"(1)[rotated, OF "log-prop-prop:2"] by fast
5822  AOT_have not_noncontingent_if_contingent:
5823    ¬NonContingent0(φ) if Contingent0(φ) for φ
5824    apply (rule "contingent-properties:3[zero]"[THEN "≡Df",
5825                  THEN "oth-class-taut:4:b"[THEN "≡E"(1)], THEN "≡E"(2)])
5826    using that "contingent-properties:4[zero]"[THEN "dfE"] by blast
5827  show ?thesis
5828    apply (rule "&I")+
5829    using "thm-relation-negation:6" "∀I"
5830          "∀E"(1)[rotated, OF "log-prop-prop:2"]
5831        apply fast
5832       apply (rule 0)
5833    using "thm-noncont-propos:3" apply fast
5834       apply (rule not_noncontingent_if_contingent)
5835       apply (fact AOT)
5836      apply (rule 0)
5837    apply (rule "thm-noncont-propos:3")
5838      apply (rule not_noncontingent_if_contingent)
5839      apply (rule contingent_neg[THEN "≡E"(1)])
5840      apply (fact AOT)
5841     apply (rule 0)
5842    apply (rule "thm-noncont-propos:4")
5843      apply (rule not_noncontingent_if_contingent)
5844      apply (rule contingent_neg[THEN "≡E"(1)])
5845     apply (fact AOT)
5846    using "thm-relation-negation:6" "∀I"
5847          "∀E"(1)[rotated, OF "log-prop-prop:2"] by fast
5848qed
5849
5850AOT_define ContingentlyTrue :: φ  φ ("ContingentlyTrue'(_')")
5851  "cont-tf:1": ContingentlyTrue(p) df p & ¬p
5852
5853AOT_define ContingentlyFalse :: φ  φ ("ContingentlyFalse'(_')")
5854  "cont-tf:2": ContingentlyFalse(p) df ¬p & p
5855
5856AOT_theorem "cont-true-cont:1":
5857  ContingentlyTrue((p))  Contingent0((p))
5858proof(rule "→I")
5859  AOT_assume ContingentlyTrue((p))
5860  AOT_hence 1: p and 2: ¬p using "cont-tf:1"[THEN "dfE"] "&E" by blast+
5861  AOT_have ¬Necessary0((p))
5862    apply (rule "contingent-properties:1[zero]"[THEN "≡Df",
5863                  THEN "oth-class-taut:4:b"[THEN "≡E"(1)], THEN "≡E"(2)])
5864    using 2 "KBasic:11"[THEN "≡E"(2)] by blast
5865  moreover AOT_have ¬Impossible0((p))
5866    apply (rule "contingent-properties:2[zero]"[THEN "≡Df",
5867                  THEN "oth-class-taut:4:b"[THEN "≡E"(1)], THEN "≡E"(2)])
5868    apply (rule "conventions:5"[THEN "dfE"])
5869    using "T◇"[THEN "→E", OF 1].
5870  ultimately AOT_have ¬(Necessary0((p))  Impossible0((p)))
5871    using DeMorgan(2)[THEN "≡E"(2)] "&I" by blast
5872  AOT_thus Contingent0((p))
5873    using "contingent-properties:4[zero]"[THEN "dfI"] by blast
5874qed
5875
5876AOT_theorem "cont-true-cont:2":
5877  ContingentlyFalse((p))  Contingent0((p))
5878proof(rule "→I")
5879  AOT_assume ContingentlyFalse((p))
5880  AOT_hence 1: ¬p and 2: p using "cont-tf:2"[THEN "dfE"] "&E" by blast+
5881  AOT_have ¬Necessary0((p))
5882    apply (rule "contingent-properties:1[zero]"[THEN "≡Df",
5883                  THEN "oth-class-taut:4:b"[THEN "≡E"(1)], THEN "≡E"(2)])
5884    using "KBasic:11"[THEN "≡E"(2)] "T◇"[THEN "→E", OF 1] by blast
5885  moreover AOT_have ¬Impossible0((p))
5886    apply (rule "contingent-properties:2[zero]"[THEN "≡Df",
5887                  THEN "oth-class-taut:4:b"[THEN "≡E"(1)], THEN "≡E"(2)])
5888    apply (rule "conventions:5"[THEN "dfE"])
5889    using 2.
5890  ultimately AOT_have ¬(Necessary0((p))  Impossible0((p)))
5891    using DeMorgan(2)[THEN "≡E"(2)] "&I" by blast
5892  AOT_thus Contingent0((p))
5893    using "contingent-properties:4[zero]"[THEN "dfI"] by blast
5894qed
5895
5896AOT_theorem "cont-true-cont:3":
5897  ContingentlyTrue((p))  ContingentlyFalse(((p)-))
5898proof(rule "≡I"; rule "→I")
5899  AOT_assume ContingentlyTrue((p))
5900  AOT_hence 0: p & ¬p using "cont-tf:1"[THEN "dfE"] by blast
5901  AOT_have 1: ContingentlyFalse(¬p)
5902    apply (rule "cont-tf:2"[THEN "dfI"])
5903    apply (AOT_subst (reverse) ¬¬p p)
5904    by (auto simp: "oth-class-taut:3:b" 0)
5905  AOT_show ContingentlyFalse(((p)-))
5906    apply (AOT_subst ((p)-) ¬p)
5907    by (auto simp: "thm-relation-negation:3" 1)
5908next
5909  AOT_assume 1: ContingentlyFalse(((p)-))
5910  AOT_have ContingentlyFalse(¬p)
5911    by (AOT_subst (reverse) ¬p ((p)-))
5912       (auto simp: "thm-relation-negation:3" 1)
5913  AOT_hence ¬¬p & ¬p using "cont-tf:2"[THEN "dfE"] by blast
5914  AOT_hence p & ¬p
5915    using "&I" "&E" "useful-tautologies:1"[THEN "→E"] by metis
5916  AOT_thus ContingentlyTrue((p))
5917    using "cont-tf:1"[THEN "dfI"] by blast
5918qed
5919
5920AOT_theorem "cont-true-cont:4":
5921  ContingentlyFalse((p))  ContingentlyTrue(((p)-))
5922proof(rule "≡I"; rule "→I")
5923  AOT_assume ContingentlyFalse(p)
5924  AOT_hence 0: ¬p & p
5925    using "cont-tf:2"[THEN "dfE"] by blast
5926  AOT_have ¬p & ¬¬p
5927    by (AOT_subst (reverse) ¬¬p p)
5928       (auto simp: "oth-class-taut:3:b" 0)
5929  AOT_hence 1: ContingentlyTrue(¬p)
5930    by (rule "cont-tf:1"[THEN "dfI"])
5931  AOT_show ContingentlyTrue(((p)-))
5932    by (AOT_subst ((p)-) ¬p)
5933       (auto simp: "thm-relation-negation:3" 1)
5934next
5935  AOT_assume 1: ContingentlyTrue(((p)-))
5936  AOT_have ContingentlyTrue(¬p)
5937    by (AOT_subst (reverse) ¬p ((p)-))
5938       (auto simp add: "thm-relation-negation:3" 1)
5939  AOT_hence 2: ¬p & ¬¬p using "cont-tf:1"[THEN "dfE"] by blast
5940  AOT_have p
5941    by (AOT_subst p ¬¬p)
5942       (auto simp add: "oth-class-taut:3:b" 2[THEN "&E"(2)])
5943  AOT_hence ¬p & p using 2[THEN "&E"(1)] "&I" by blast
5944  AOT_thus ContingentlyFalse(p)
5945    by (rule "cont-tf:2"[THEN "dfI"])
5946qed
5947
5948AOT_theorem "cont-true-cont:5":
5949  (ContingentlyTrue((p)) & Necessary0((q)))  p  q
5950proof (rule "→I"; frule "&E"(1); drule "&E"(2); rule "raa-cor:1")
5951  AOT_assume ContingentlyTrue((p))
5952  AOT_hence ¬p
5953    using "cont-tf:1"[THEN "dfE"] "&E" by blast
5954  AOT_hence 0: ¬p using "KBasic:11"[THEN "≡E"(2)] by blast
5955  AOT_assume Necessary0((q))
5956  moreover AOT_assume ¬(p  q)
5957  AOT_hence p = q
5958    using "=-infix"[THEN "≡Df",
5959                    THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
5960                    THEN "≡E"(1)]
5961          "useful-tautologies:1"[THEN "→E"] by blast
5962  ultimately AOT_have Necessary0((p)) using "rule=E" id_sym by blast
5963  AOT_hence p
5964    using "contingent-properties:1[zero]"[THEN "dfE"] by blast
5965  AOT_thus p & ¬p using 0 "&I" by blast
5966qed
5967
5968AOT_theorem "cont-true-cont:6":
5969  (ContingentlyFalse((p)) & Impossible0((q)))  p  q
5970proof (rule "→I"; frule "&E"(1); drule "&E"(2); rule "raa-cor:1")
5971  AOT_assume ContingentlyFalse((p))
5972  AOT_hence p
5973    using "cont-tf:2"[THEN "dfE"] "&E" by blast
5974  AOT_hence 1: ¬¬p
5975    using "conventions:5"[THEN "dfE"] by blast
5976  AOT_assume Impossible0((q))
5977  moreover AOT_assume ¬(p  q)
5978  AOT_hence p = q
5979    using "=-infix"[THEN "≡Df",
5980                    THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
5981                    THEN "≡E"(1)]
5982          "useful-tautologies:1"[THEN "→E"] by blast
5983  ultimately AOT_have Impossible0((p)) using "rule=E" id_sym by blast
5984  AOT_hence ¬p
5985    using "contingent-properties:2[zero]"[THEN "dfE"] by blast
5986  AOT_thus ¬p & ¬¬p using 1 "&I" by blast
5987qed
5988
5989AOT_act_theorem "q0cf:1": ContingentlyFalse(q0)
5990  apply (rule "cont-tf:2"[THEN "dfI"])
5991  apply (rule "=dfI"(2)[OF q0_def])
5992   apply (fact "log-prop-prop:2")
5993  apply (rule "&I")
5994   apply (fact "no-cnac")
5995  by (fact "qml:4"[axiom_inst])
5996
5997AOT_act_theorem "q0cf:2": ContingentlyTrue(((q0)-))
5998  apply (rule "cont-tf:1"[THEN "dfI"])
5999  apply (rule "=dfI"(2)[OF q0_def])
6000   apply (fact "log-prop-prop:2")
6001  apply (rule "&I")
6002   apply (rule "thm-relation-negation:3"
6003                [unvarify p, OF "log-prop-prop:2", THEN "≡E"(2)])
6004     apply (fact "no-cnac")
6005  apply (rule "rule=E"[rotated,
6006                OF "thm-relation-negation:7"
6007                   [unvarify p, OF "log-prop-prop:2", THEN id_sym]])
6008  apply (AOT_subst (reverse) ¬¬(x  (E!x & ¬𝒜E!x)) x (E!x & ¬𝒜E!x))
6009  by (auto simp: "oth-class-taut:3:b" "qml:4"[axiom_inst])
6010
6011AOT_theorem "cont-tf-thm:1": p ContingentlyTrue((p))
6012proof(rule "∨E"(1)[OF "exc-mid"]; rule "→I"; rule "∃I")
6013  AOT_assume q0
6014  AOT_hence q0 & ¬q0 using q0_prop[THEN "&E"(2)] "&I" by blast
6015  AOT_thus ContingentlyTrue(q0)
6016    by (rule "cont-tf:1"[THEN "dfI"])
6017next
6018  AOT_assume ¬q0
6019  AOT_hence ¬q0 & q0 using q0_prop[THEN "&E"(1)] "&I" by blast
6020  AOT_hence ContingentlyFalse(q0)
6021    by (rule "cont-tf:2"[THEN "dfI"])
6022  AOT_thus ContingentlyTrue(((q0)-))
6023    by (rule "cont-true-cont:4"[unvarify p,
6024                OF "log-prop-prop:2", THEN "≡E"(1)])
6025qed(auto simp: "log-prop-prop:2")
6026
6027
6028AOT_theorem "cont-tf-thm:2": p ContingentlyFalse((p))
6029proof(rule "∨E"(1)[OF "exc-mid"]; rule "→I"; rule "∃I")
6030  AOT_assume q0
6031  AOT_hence q0 & ¬q0 using q0_prop[THEN "&E"(2)] "&I" by blast
6032  AOT_hence ContingentlyTrue(q0)
6033    by (rule "cont-tf:1"[THEN "dfI"])
6034  AOT_thus ContingentlyFalse(((q0)-))
6035    by (rule "cont-true-cont:3"[unvarify p,
6036                OF "log-prop-prop:2", THEN "≡E"(1)])
6037next
6038  AOT_assume ¬q0
6039  AOT_hence ¬q0 & q0 using q0_prop[THEN "&E"(1)] "&I" by blast
6040  AOT_thus ContingentlyFalse(q0)
6041    by (rule "cont-tf:2"[THEN "dfI"])
6042qed(auto simp: "log-prop-prop:2")
6043
6044AOT_theorem "property-facts1:1": Fx ([F]x & ¬[F]x)
6045proof -
6046  fix x
6047  AOT_obtain p1 where ContingentlyTrue((p1))
6048    using "cont-tf-thm:1" "∃E"[rotated] by blast
6049  AOT_hence 1: p1 & ¬p1 using "cont-tf:1"[THEN "dfE"] by blast
6050  AOT_modally_strict {
6051    AOT_have for arbitrary p:  (z p]x  p)
6052      by (rule "beta-C-cor:3"[THEN "∀E"(2)]) cqt_2_lambda_inst_prover
6053    AOT_hence for arbitrary p:   (z p]x  p)
6054      by (rule RN)
6055    AOT_hence p (z p]x  p) using GEN by fast
6056    AOT_hence (z p1]x  p1) using "∀E" by fast
6057  } note 2 = this
6058  AOT_hence (z p1]x  p1) using "∀E" by blast
6059  AOT_hence z p1]x
6060    using 1[THEN "&E"(1)] "qml:2"[axiom_inst, THEN "→E"] "≡E"(2) by blast
6061  moreover AOT_have ¬z p1]x
6062    using 2[THEN "qml:2"[axiom_inst, THEN "→E"]]
6063    apply (AOT_subst z p1]x p1)
6064    using 1[THEN "&E"(2)] by blast
6065  ultimately AOT_have z p1]x & ¬z p1]x using "&I" by blast
6066  AOT_hence x (z p1]x & ¬z p1]x) using "∃I"(2) by fast
6067  moreover AOT_have z p1] by "cqt:2[lambda]"
6068  ultimately AOT_show Fx ([F]x & ¬[F]x) by (rule "∃I"(1))
6069qed
6070
6071AOT_theorem "property-facts1:2": Fx (¬[F]x & [F]x)
6072proof -
6073  fix x
6074  AOT_obtain p1 where ContingentlyFalse((p1))
6075    using "cont-tf-thm:2" "∃E"[rotated] by blast
6076  AOT_hence 1: ¬p1 & p1 using "cont-tf:2"[THEN "dfE"] by blast
6077  AOT_modally_strict {
6078    AOT_have for arbitrary p:  (z p]x  p)
6079      by (rule "beta-C-cor:3"[THEN "∀E"(2)]) cqt_2_lambda_inst_prover
6080    AOT_hence for arbitrary p:  (¬z p]x  ¬p)
6081      using "oth-class-taut:4:b" "≡E" by blast
6082    AOT_hence for arbitrary p:  (¬z p]x  ¬p)
6083      by (rule RN)
6084    AOT_hence p (¬z p]x  ¬p) using GEN by fast
6085    AOT_hence (¬z p1]x  ¬p1) using "∀E" by fast
6086  } note 2 = this
6087  AOT_hence (¬z p1]x  ¬p1) using "∀E" by blast
6088  AOT_hence 3: ¬z p1]x
6089    using 1[THEN "&E"(1)] "qml:2"[axiom_inst, THEN "→E"] "≡E"(2) by blast
6090  AOT_modally_strict {
6091    AOT_have for arbitrary p:  (z p]x  p)
6092      by (rule "beta-C-cor:3"[THEN "∀E"(2)]) cqt_2_lambda_inst_prover
6093    AOT_hence for arbitrary p:  (z p]x  p)
6094      by (rule RN)
6095    AOT_hence p (z p]x  p) using GEN by fast
6096    AOT_hence (z p1]x  p1) using "∀E" by fast
6097  } note 4 = this
6098  AOT_have z p1]x
6099    using 4[THEN "qml:2"[axiom_inst, THEN "→E"]]
6100    apply (AOT_subst z p1]x p1)
6101    using 1[THEN "&E"(2)] by blast
6102  AOT_hence ¬z p1]x & z p1]x using 3 "&I" by blast
6103  AOT_hence x (¬z p1]x & z p1]x) using "∃I"(2) by fast
6104  moreover AOT_have z p1] by "cqt:2[lambda]"
6105  ultimately AOT_show Fx (¬[F]x & [F]x) by (rule "∃I"(1))
6106qed
6107
6108context
6109begin
6110
6111private AOT_lemma eqnotnec_123_Aux_ζ: [L]x  (E!x  E!x)
6112    apply (rule "=dfI"(2)[OF L_def])
6113     apply "cqt:2[lambda]"
6114    apply (rule "beta-C-meta"[THEN "→E"])
6115  by "cqt:2[lambda]"
6116
6117private AOT_lemma eqnotnec_123_Aux_ω: z φ]x  φ
6118    by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6119
6120private AOT_lemma eqnotnec_123_Aux_θ: φ  x([L]x  z φ]x)
6121proof(rule "≡I"; rule "→I"; (rule "∀I")?)
6122  fix x
6123  AOT_assume 1: φ
6124  AOT_have [L]x  (E!x  E!x) using eqnotnec_123_Aux_ζ.
6125  also AOT_have   φ
6126    using "if-p-then-p" 1 "≡I" "→I" by simp
6127  also AOT_have   z φ]x
6128    using "Commutativity of ≡"[THEN "≡E"(1)] eqnotnec_123_Aux_ω by blast
6129  finally AOT_show [L]x  z φ]x.
6130next
6131  fix x
6132  AOT_assume x([L]x  z φ]x)
6133  AOT_hence [L]x  z φ]x using "∀E" by blast
6134  also AOT_have   φ using eqnotnec_123_Aux_ω.
6135  finally AOT_have φ  [L]x
6136    using "Commutativity of ≡"[THEN "≡E"(1)] by blast
6137  also AOT_have   E!x  E!x using eqnotnec_123_Aux_ζ.
6138  finally AOT_show φ using "≡E" "if-p-then-p" by fast
6139qed
6140private lemmas eqnotnec_123_Aux_ξ =
6141  eqnotnec_123_Aux_θ[THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
6142    THEN "conventions:3"[THEN "≡Df", THEN "≡E"(1), THEN "&E"(1)],
6143    THEN "RM◇"]
6144private lemmas eqnotnec_123_Aux_ξ' =
6145  eqnotnec_123_Aux_θ[
6146    THEN "conventions:3"[THEN "≡Df", THEN "≡E"(1), THEN "&E"(1)],
6147    THEN "RM◇"]
6148
6149AOT_theorem "eqnotnec:1": FG(x([F]x  [G]x) & ¬x([F]x  [G]x))
6150proof-
6151  AOT_obtain p1 where ContingentlyTrue(p1)
6152    using "cont-tf-thm:1" "∃E"[rotated] by blast
6153  AOT_hence p1 & ¬p1 using "cont-tf:1"[THEN "dfE"] by blast
6154  AOT_hence x ([L]x  z p1]x) & ¬x([L]x  z p1]x)
6155    apply - apply (rule "&I")
6156    using "&E" eqnotnec_123_Aux_θ[THEN "≡E"(1)]
6157          eqnotnec_123_Aux_ξ "→E" by fast+
6158  AOT_hence G (x([L]x  [G]x) & ¬x([L]x  [G]x))
6159    by (rule "∃I") "cqt:2[lambda]"
6160  AOT_thus FG (x([F]x  [G]x) & ¬x([F]x  [G]x))
6161    apply (rule "∃I")
6162    by (rule "=dfI"(2)[OF L_def]) "cqt:2[lambda]"+
6163qed
6164
6165AOT_theorem "eqnotnec:2": FG(¬x([F]x  [G]x) & x([F]x  [G]x))
6166proof-
6167  AOT_obtain p1 where ContingentlyFalse(p1)
6168    using "cont-tf-thm:2" "∃E"[rotated] by blast
6169  AOT_hence ¬p1 & p1 using "cont-tf:2"[THEN "dfE"] by blast
6170  AOT_hence ¬x ([L]x  z p1]x) & x([L]x  z p1]x)
6171    apply - apply (rule "&I")
6172    using eqnotnec_123_Aux_θ[THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
6173                             THEN "≡E"(1)]
6174          "&E" eqnotnec_123_Aux_ξ' "→E" by fast+
6175  AOT_hence G (¬x([L]x  [G]x) & x([L]x  [G]x))
6176    by (rule "∃I") "cqt:2[lambda]"
6177  AOT_thus FG (¬x([F]x  [G]x) & x([F]x  [G]x))
6178    apply (rule "∃I")
6179    by (rule "=dfI"(2)[OF L_def]) "cqt:2[lambda]"+
6180qed
6181
6182AOT_theorem "eqnotnec:3": FG(𝒜¬x([F]x  [G]x) & x([F]x  [G]x))
6183proof-
6184  AOT_have ¬𝒜q0
6185    apply (rule "=dfI"(2)[OF q0_def])
6186     apply (fact "log-prop-prop:2")
6187    by (fact AOT)
6188  AOT_hence 𝒜¬q0
6189    using "logic-actual-nec:1"[axiom_inst, THEN "≡E"(2)] by blast
6190  AOT_hence 𝒜¬x ([L]x  z q0]x)
6191    using eqnotnec_123_Aux_θ[THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
6192            THEN "conventions:3"[THEN "≡Df", THEN "≡E"(1), THEN "&E"(1)],
6193            THEN "RA[2]", THEN "act-cond"[THEN "→E"], THEN "→E"] by blast
6194  moreover AOT_have x ([L]x  z q0]x)
6195    using eqnotnec_123_Aux_ξ'[THEN "→E"] q0_prop[THEN "&E"(1)] by blast
6196  ultimately AOT_have 𝒜¬x ([L]x  z q0]x) & x ([L]x  z q0]x)
6197    using "&I" by blast
6198  AOT_hence G (𝒜¬x([L]x  [G]x) & x([L]x  [G]x))
6199    by (rule "∃I") "cqt:2[lambda]"
6200  AOT_thus FG (𝒜¬x([F]x  [G]x) & x([F]x  [G]x))
6201    apply (rule "∃I")
6202    by (rule "=dfI"(2)[OF L_def]) "cqt:2[lambda]"+
6203qed
6204
6205end
6206
6207AOT_theorem "eqnotnec:4": FG(x([F]x  [G]x) & ¬x([F]x  [G]x))
6208proof(rule GEN)
6209  fix F
6210  AOT_have Aux_A:  ψ  x([F]x  z [F]z & ψ]x) for ψ
6211  proof(rule "→I"; rule GEN)
6212    AOT_modally_strict {
6213    fix x
6214    AOT_assume 0: ψ
6215    AOT_have z [F]z & ψ]x  [F]x & ψ
6216      by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6217    also AOT_have ...  [F]x
6218      apply (rule "≡I"; rule "→I")
6219      using "∨E"(3)[rotated, OF "useful-tautologies:2"[THEN "→E"], OF 0] "&E"
6220      apply blast
6221      using 0 "&I" by blast
6222    finally AOT_show [F]x  z [F]z & ψ]x
6223      using "Commutativity of ≡"[THEN "≡E"(1)] by blast
6224    }
6225  qed
6226
6227  AOT_have Aux_B:  ψ  x([F]x  z [F]z & ψ  ¬ψ]x) for ψ
6228  proof (rule "→I"; rule GEN)
6229    AOT_modally_strict {
6230      fix x
6231      AOT_assume 0: ψ
6232      AOT_have z ([F]z & ψ)  ¬ψ]x  (([F]x & ψ)  ¬ψ)
6233        by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6234      also AOT_have ...  [F]x
6235        apply (rule "≡I"; rule "→I")
6236        using "∨E"(3)[rotated, OF "useful-tautologies:2"[THEN "→E"], OF 0]
6237              "&E"
6238         apply blast
6239        apply (rule "∨I"(1)) using 0 "&I" by blast
6240      finally AOT_show [F]x  z ([F]z & ψ)  ¬ψ]x
6241        using "Commutativity of ≡"[THEN "≡E"(1)] by blast
6242    }
6243  qed
6244
6245  AOT_have Aux_C:
6246     ¬ψ  ¬z(z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z) for ψ
6247  proof(rule "RM◇"; rule "→I"; rule "raa-cor:2")
6248  AOT_modally_strict {
6249      AOT_assume 0: ¬ψ
6250      AOT_assume z (z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z)
6251      AOT_hence z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z for z
6252        using "∀E" by blast
6253      moreover AOT_have z [F]z & ψ]z  [F]z & ψ for z
6254          by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6255      moreover AOT_have z ([F]z & ψ)  ¬ψ]z  (([F]z & ψ)  ¬ψ) for z
6256        by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6257      ultimately AOT_have [F]z & ψ  (([F]z & ψ)  ¬ψ) for z
6258        using "Commutativity of ≡"[THEN "≡E"(1)] "≡E"(5) by meson
6259      moreover AOT_have (([F]z & ψ)  ¬ψ) for z using 0 "∨I" by blast
6260      ultimately AOT_have ψ using "≡E" "&E" by metis
6261      AOT_thus ψ & ¬ψ using 0 "&I" by blast
6262    }
6263  qed
6264
6265  AOT_have Aux_D: z ([F]z  z [F]z & ψ]z) 
6266      (¬x (z [F]z & ψ]x  z [F]z & ψ  ¬ψ]x) 
6267       ¬x ([F]x  z [F]z & ψ  ¬ψ]x)) for ψ
6268  proof (rule "→I")
6269    AOT_assume A: z([F]z  z [F]z & ψ]z)
6270    AOT_show ¬x (z [F]z & ψ]x  z [F]z & ψ  ¬ψ]x) 
6271              ¬x ([F]x  z [F]z & ψ  ¬ψ]x)
6272    proof(rule "≡I"; rule "KBasic:13"[THEN "→E"];
6273          rule "RN[prem]"[where Γ="{«z([F]z  z [F]z & ψ]z)»}", simplified];
6274          (rule "useful-tautologies:5"[THEN "→E"]; rule "→I")?)
6275      AOT_modally_strict {
6276        AOT_assume z ([F]z  z [F]z & ψ]z)
6277        AOT_hence 1: [F]z  z [F]z & ψ]z for z
6278          using "∀E" by blast
6279        AOT_assume x ([F]x  z [F]z & ψ  ¬ψ]x)
6280        AOT_hence 2: [F]z  z [F]z & ψ  ¬ψ]z for z
6281          using "∀E" by blast
6282        AOT_have z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z for z
6283          using "≡E" 1 2 by meson
6284        AOT_thus x (z [F]z & ψ]x  z [F]z & ψ  ¬ψ]x)
6285          by (rule GEN)
6286      }
6287    next
6288      AOT_modally_strict {
6289        AOT_assume z ([F]z  z [F]z & ψ]z)
6290        AOT_hence 1: [F]z  z [F]z & ψ]z for z
6291          using "∀E" by blast
6292        AOT_assume x (z [F]z & ψ]x  z [F]z & ψ  ¬ψ]x)
6293        AOT_hence 2: z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z for z
6294          using "∀E" by blast
6295        AOT_have [F]z  z [F]z & ψ  ¬ψ]z for z
6296          using 1 2 "≡E" by meson
6297        AOT_thus x ([F]x  z [F]z & ψ  ¬ψ]x)
6298          by (rule GEN)
6299      }
6300    qed(auto simp: A)
6301  qed
6302
6303  AOT_obtain p1 where p1_prop: p1 & ¬p1
6304    using "cont-tf-thm:1" "∃E"[rotated]
6305          "cont-tf:1"[THEN "dfE"] by blast
6306  {
6307    AOT_assume 1: x([F]x  z [F]z & p1]x)
6308    AOT_have 2: x([F]x  z [F]z & p1  ¬p1]x)
6309      using Aux_B[THEN "→E", OF p1_prop[THEN "&E"(1)]].
6310    AOT_have ¬x(z [F]z & p1]x  z [F]z & p1  ¬p1]x)
6311      using Aux_C[THEN "→E", OF p1_prop[THEN "&E"(2)]].
6312    AOT_hence 3: ¬x([F]x  z [F]z & p1  ¬p1]x)
6313      using Aux_D[THEN "→E", OF 1, THEN "≡E"(1)] by blast
6314    AOT_hence x([F]x  z [F]z & p1  ¬p1]x) &
6315               ¬x([F]x  z [F]z & p1  ¬p1]x)
6316      using 2 "&I" by blast
6317    AOT_hence G (x ([F]x  [G]x) & ¬x([F]x  [G]x))
6318      by (rule "∃I"(1)) "cqt:2[lambda]"
6319  }
6320  moreover {
6321    AOT_assume 2: ¬x([F]x  z [F]z & p1]x)
6322    AOT_hence ¬x([F]x  z [F]z & p1]x)
6323      using "KBasic:11"[THEN "≡E"(1)] by blast
6324    AOT_hence x ([F]x  z [F]z & p1]x) & ¬x([F]x  z [F]z & p1]x)
6325      using Aux_A[THEN "→E", OF p1_prop[THEN "&E"(1)]] "&I" by blast
6326    AOT_hence G (x ([F]x  [G]x) & ¬x([F]x  [G]x))
6327      by (rule "∃I"(1)) "cqt:2[lambda]"
6328  }
6329  ultimately AOT_show G (x ([F]x  [G]x) & ¬x([F]x  [G]x))
6330    using "∨E"(1)[OF "exc-mid"] "→I" by blast
6331qed
6332
6333AOT_theorem "eqnotnec:5": FG(¬x([F]x  [G]x) & x([F]x  [G]x))
6334proof(rule GEN)
6335  fix F
6336  AOT_have Aux_A:  ψ  x([F]x  z [F]z & ψ]x) for ψ
6337  proof(rule "RM◇"; rule "→I"; rule GEN)
6338    AOT_modally_strict {
6339    fix x
6340    AOT_assume 0: ψ
6341    AOT_have z [F]z & ψ]x  [F]x & ψ
6342      by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6343    also AOT_have ...  [F]x
6344      apply (rule "≡I"; rule "→I")
6345      using "∨E"(3)[rotated, OF "useful-tautologies:2"[THEN "→E"], OF 0] "&E"
6346       apply blast
6347      using 0 "&I" by blast
6348    finally AOT_show [F]x  z [F]z & ψ]x
6349      using "Commutativity of ≡"[THEN "≡E"(1)] by blast
6350    }
6351  qed
6352
6353  AOT_have Aux_B:  ψ  x([F]x  z [F]z & ψ  ¬ψ]x) for ψ
6354  proof (rule "RM◇"; rule "→I"; rule GEN)
6355    AOT_modally_strict {
6356      fix x
6357      AOT_assume 0: ψ
6358      AOT_have z ([F]z & ψ)  ¬ψ]x  (([F]x & ψ)  ¬ψ)
6359        by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6360      also AOT_have ...  [F]x
6361        apply (rule "≡I"; rule "→I")
6362        using "∨E"(3)[rotated, OF "useful-tautologies:2"[THEN "→E"], OF 0] "&E"
6363         apply blast
6364        apply (rule "∨I"(1)) using 0 "&I" by blast
6365      finally AOT_show [F]x  z ([F]z & ψ)  ¬ψ]x
6366        using "Commutativity of ≡"[THEN "≡E"(1)] by blast
6367    }
6368  qed
6369
6370  AOT_have Aux_C:  ¬ψ  ¬z(z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z) for ψ
6371  proof(rule "→I"; rule "raa-cor:2")
6372  AOT_modally_strict {
6373      AOT_assume 0: ¬ψ
6374      AOT_assume z (z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z)
6375      AOT_hence z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z for z
6376        using "∀E" by blast
6377      moreover AOT_have z [F]z & ψ]z  [F]z & ψ for z
6378          by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6379      moreover AOT_have z ([F]z & ψ)  ¬ψ]z  (([F]z & ψ)  ¬ψ) for z
6380        by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6381      ultimately AOT_have [F]z & ψ  (([F]z & ψ)  ¬ψ) for z
6382        using "Commutativity of ≡"[THEN "≡E"(1)] "≡E"(5) by meson
6383      moreover AOT_have (([F]z & ψ)  ¬ψ) for z
6384        using 0 "∨I" by blast
6385      ultimately AOT_have ψ using "≡E" "&E" by metis
6386      AOT_thus ψ & ¬ψ using 0 "&I" by blast
6387    }
6388  qed
6389
6390  AOT_have Aux_D: z ([F]z  z [F]z & ψ]z) 
6391    (¬x (z [F]z & ψ]x  z [F]z & ψ  ¬ψ]x) 
6392     ¬x ([F]x  z [F]z & ψ  ¬ψ]x)) for ψ
6393  proof (rule "→I"; rule "≡I";
6394         (rule "useful-tautologies:5"[THEN "→E"]; rule "→I")?)
6395    AOT_modally_strict {
6396      AOT_assume z ([F]z  z [F]z & ψ]z)
6397      AOT_hence 1: [F]z  z [F]z & ψ]z for z
6398        using "∀E" by blast
6399      AOT_assume x ([F]x  z [F]z & ψ  ¬ψ]x)
6400      AOT_hence 2: [F]z  z [F]z & ψ  ¬ψ]z for z
6401        using "∀E" by blast
6402      AOT_have z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z for z
6403        using "≡E" 1 2 by meson
6404      AOT_thus x (z [F]z & ψ]x  z [F]z & ψ  ¬ψ]x)
6405        by (rule GEN)
6406    }
6407  next
6408    AOT_modally_strict {
6409      AOT_assume z ([F]z  z [F]z & ψ]z)
6410      AOT_hence 1: [F]z  z [F]z & ψ]z for z
6411        using "∀E" by blast
6412      AOT_assume x (z [F]z & ψ]x  z [F]z & ψ  ¬ψ]x)
6413      AOT_hence 2: z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z for z
6414        using "∀E" by blast
6415      AOT_have [F]z  z [F]z & ψ  ¬ψ]z for z
6416        using 1 2 "≡E" by meson
6417      AOT_thus x ([F]x  z [F]z & ψ  ¬ψ]x)
6418        by (rule GEN)
6419    }
6420  qed
6421
6422  AOT_obtain p1 where p1_prop: ¬p1 & p1
6423    using "cont-tf-thm:2" "∃E"[rotated] "cont-tf:2"[THEN "dfE"] by blast
6424  {
6425    AOT_assume 1: x([F]x  z [F]z & p1]x)
6426    AOT_have 2: x([F]x  z [F]z & p1  ¬p1]x)
6427      using Aux_B[THEN "→E", OF p1_prop[THEN "&E"(2)]].
6428    AOT_have ¬x(z [F]z & p1]x  z [F]z & p1  ¬p1]x)
6429      using Aux_C[THEN "→E", OF p1_prop[THEN "&E"(1)]].
6430    AOT_hence 3: ¬x([F]x  z [F]z & p1  ¬p1]x)
6431      using Aux_D[THEN "→E", OF 1, THEN "≡E"(1)] by blast
6432    AOT_hence ¬x([F]x  z [F]z & p1  ¬p1]x) &
6433               x([F]x  z [F]z & p1  ¬p1]x)
6434      using 2 "&I" by blast
6435    AOT_hence G (¬x ([F]x  [G]x) & x([F]x  [G]x))
6436      by (rule "∃I"(1)) "cqt:2[lambda]"
6437  }
6438  moreover {
6439    AOT_assume 2: ¬x([F]x  z [F]z & p1]x)
6440    AOT_hence ¬x([F]x  z [F]z & p1]x)
6441      using "KBasic:11"[THEN "≡E"(1)] by blast
6442    AOT_hence ¬x ([F]x  z [F]z & p1]x) &
6443               x([F]x  z [F]z & p1]x)
6444      using Aux_A[THEN "→E", OF p1_prop[THEN "&E"(2)]] "&I" by blast
6445    AOT_hence G (¬x ([F]x  [G]x) & x([F]x  [G]x))
6446      by (rule "∃I"(1)) "cqt:2[lambda]"
6447  }
6448  ultimately AOT_show G (¬x ([F]x  [G]x) & x([F]x  [G]x))
6449    using "∨E"(1)[OF "exc-mid"] "→I" by blast
6450qed
6451
6452AOT_theorem "eqnotnec:6": FG(𝒜¬x([F]x  [G]x) & x([F]x  [G]x))
6453proof(rule GEN)
6454  fix F
6455  AOT_have Aux_A:  ψ  x([F]x  z [F]z & ψ]x) for ψ
6456  proof(rule "RM◇"; rule "→I"; rule GEN)
6457    AOT_modally_strict {
6458    fix x
6459    AOT_assume 0: ψ
6460    AOT_have z [F]z & ψ]x  [F]x & ψ
6461      by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6462    also AOT_have ...  [F]x
6463      apply (rule "≡I"; rule "→I")
6464      using "∨E"(3)[rotated, OF "useful-tautologies:2"[THEN "→E"], OF 0]
6465            "&E"
6466       apply blast
6467      using 0 "&I" by blast
6468    finally AOT_show [F]x  z [F]z & ψ]x
6469      using "Commutativity of ≡"[THEN "≡E"(1)] by blast
6470    }
6471  qed
6472
6473  AOT_have Aux_B:  ψ  x([F]x  z [F]z & ψ  ¬ψ]x) for ψ
6474  proof (rule "RM◇"; rule "→I"; rule GEN)
6475    AOT_modally_strict {
6476      fix x
6477      AOT_assume 0: ψ
6478      AOT_have z ([F]z & ψ)  ¬ψ]x  (([F]x & ψ)  ¬ψ)
6479        by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6480      also AOT_have ...  [F]x
6481        apply (rule "≡I"; rule "→I")
6482        using "∨E"(3)[rotated, OF "useful-tautologies:2"[THEN "→E"], OF 0] "&E"
6483         apply blast
6484        apply (rule "∨I"(1)) using 0 "&I" by blast
6485      finally AOT_show [F]x  z ([F]z & ψ)  ¬ψ]x
6486        using "Commutativity of ≡"[THEN "≡E"(1)] by blast
6487    }
6488  qed
6489
6490  AOT_have Aux_C:
6491     𝒜¬ψ  𝒜¬z(z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z) for ψ
6492  proof(rule "act-cond"[THEN "→E"]; rule "RA[2]"; rule "→I"; rule "raa-cor:2")
6493  AOT_modally_strict {
6494      AOT_assume 0: ¬ψ
6495      AOT_assume z (z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z)
6496      AOT_hence z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z for z
6497        using "∀E" by blast
6498      moreover AOT_have z [F]z & ψ]z  [F]z & ψ for z
6499          by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6500      moreover AOT_have z ([F]z & ψ)  ¬ψ]z  (([F]z & ψ)  ¬ψ) for z
6501        by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6502      ultimately AOT_have [F]z & ψ  (([F]z & ψ)  ¬ψ) for z
6503        using "Commutativity of ≡"[THEN "≡E"(1)] "≡E"(5) by meson
6504      moreover AOT_have (([F]z & ψ)  ¬ψ) for z
6505        using 0 "∨I" by blast
6506      ultimately AOT_have ψ using "≡E" "&E" by metis
6507      AOT_thus ψ & ¬ψ using 0 "&I" by blast
6508    }
6509  qed
6510
6511  AOT_have (z ([F]z  z [F]z & ψ]z) 
6512    (¬x (z [F]z & ψ]x  z [F]z & ψ  ¬ψ]x) 
6513     ¬x ([F]x  z [F]z & ψ  ¬ψ]x))) for ψ
6514  proof (rule RN; rule "→I")
6515    AOT_modally_strict {
6516        AOT_assume z ([F]z  z [F]z & ψ]z)
6517        AOT_thus ¬x (z [F]z & ψ]x  z [F]z & ψ  ¬ψ]x) 
6518                  ¬x ([F]x  z [F]z & ψ  ¬ψ]x)
6519          apply -
6520        proof(rule "≡I"; (rule "useful-tautologies:5"[THEN "→E"]; rule "→I")?)
6521          AOT_assume z ([F]z  z [F]z & ψ]z)
6522          AOT_hence 1: [F]z  z [F]z & ψ]z for z
6523            using "∀E" by blast
6524          AOT_assume x ([F]x  z [F]z & ψ  ¬ψ]x)
6525          AOT_hence 2: [F]z  z [F]z & ψ  ¬ψ]z for z
6526            using "∀E" by blast
6527          AOT_have z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z for z
6528            using "≡E" 1 2 by meson
6529          AOT_thus x (z [F]z & ψ]x  z [F]z & ψ  ¬ψ]x)
6530            by (rule GEN)
6531        next
6532            AOT_assume z ([F]z  z [F]z & ψ]z)
6533            AOT_hence 1: [F]z  z [F]z & ψ]z for z
6534              using "∀E" by blast
6535            AOT_assume x (z [F]z & ψ]x  z [F]z & ψ  ¬ψ]x)
6536            AOT_hence 2: z [F]z & ψ]z  z [F]z & ψ  ¬ψ]z for z
6537              using "∀E" by blast
6538            AOT_have [F]z  z [F]z & ψ  ¬ψ]z for z
6539              using 1 2 "≡E" by meson
6540            AOT_thus x ([F]x  z [F]z & ψ  ¬ψ]x)
6541              by (rule GEN)
6542        qed
6543    }
6544  qed
6545  AOT_hence 𝒜(z ([F]z  z [F]z & ψ]z) 
6546    (¬x (z [F]z & ψ]x  z [F]z & ψ  ¬ψ]x) 
6547     ¬x ([F]x  z [F]z & ψ  ¬ψ]x))) for ψ
6548    using "nec-imp-act"[THEN "→E"] by blast
6549  AOT_hence 𝒜z ([F]z  z [F]z & ψ]z) 
6550    𝒜(¬x (z [F]z & ψ]x  z [F]z & ψ  ¬ψ]x) 
6551    ¬x ([F]x  z [F]z & ψ  ¬ψ]x)) for ψ
6552    using "act-cond"[THEN "→E"] by blast
6553  AOT_hence Aux_D: 𝒜z ([F]z  z [F]z & ψ]z) 
6554    (𝒜¬x (z [F]z & ψ]x  z [F]z & ψ  ¬ψ]x) 
6555     𝒜¬x ([F]x  z [F]z & ψ  ¬ψ]x)) for ψ
6556    by (auto intro!: "→I" "Act-Basic:5"[THEN "≡E"(1)] dest!: "→E")
6557
6558  AOT_have ¬𝒜q0
6559    apply (rule "=dfI"(2)[OF q0_def])
6560     apply (fact "log-prop-prop:2")
6561    by (fact AOT)
6562  AOT_hence q0_prop_1: 𝒜¬q0
6563    using "logic-actual-nec:1"[axiom_inst, THEN "≡E"(2)] by blast
6564  {
6565    AOT_assume 1: 𝒜x([F]x  z [F]z & q0]x)
6566    AOT_have 2: x([F]x  z [F]z & q0  ¬q0]x)
6567      using Aux_B[THEN "→E", OF q0_prop[THEN "&E"(1)]].
6568    AOT_have 𝒜¬x(z [F]z & q0]x  z [F]z & q0  ¬q0]x)
6569      using Aux_C[THEN "→E", OF q0_prop_1].
6570    AOT_hence 3: 𝒜¬x([F]x  z [F]z & q0  ¬q0]x)
6571      using Aux_D[THEN "→E", OF 1, THEN "≡E"(1)] by blast
6572    AOT_hence 𝒜¬x([F]x  z [F]z & q0  ¬q0]x) &
6573               x([F]x  z [F]z & q0  ¬q0]x)
6574      using 2 "&I" by blast
6575    AOT_hence G (𝒜¬x ([F]x  [G]x) & x([F]x  [G]x))
6576      by (rule "∃I"(1)) "cqt:2[lambda]"
6577  }
6578  moreover {
6579    AOT_assume 2: ¬𝒜x([F]x  z [F]z & q0]x)
6580    AOT_hence 𝒜¬x([F]x  z [F]z & q0]x)
6581      using "logic-actual-nec:1"[axiom_inst, THEN "≡E"(2)] by blast
6582    AOT_hence 𝒜¬x ([F]x  z [F]z & q0]x) & x([F]x  z [F]z & q0]x)
6583      using Aux_A[THEN "→E", OF q0_prop[THEN "&E"(1)]] "&I" by blast
6584    AOT_hence G (𝒜¬x ([F]x  [G]x) & x([F]x  [G]x))
6585      by (rule "∃I"(1)) "cqt:2[lambda]"
6586  }
6587  ultimately AOT_show G (𝒜¬x ([F]x  [G]x) & x([F]x  [G]x))
6588    using "∨E"(1)[OF "exc-mid"] "→I" by blast
6589qed
6590
6591AOT_theorem "oa-contingent:1": O!  A!
6592proof(rule "dfI"[OF "=-infix"]; rule "raa-cor:2")
6593  fix x
6594  AOT_assume 1: O! = A!
6595  AOT_hence x E!x] = A!
6596    by (rule "=dfE"(2)[OF AOT_ordinary, rotated]) "cqt:2[lambda]"
6597  AOT_hence x E!x] = x ¬E!x]
6598    by (rule "=dfE"(2)[OF AOT_abstract, rotated]) "cqt:2[lambda]"
6599  moreover AOT_have x E!x]x  E!x
6600    by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6601  ultimately AOT_have x ¬E!x]x  E!x
6602    using "rule=E" by fast
6603  moreover AOT_have x ¬E!x]x  ¬E!x
6604    by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6605  ultimately AOT_have E!x  ¬E!x
6606    using "≡E"(6) "Commutativity of ≡"[THEN "≡E"(1)] by blast
6607  AOT_thus "(E!x  ¬E!x) & ¬(E!x  ¬E!x)"
6608    using "oth-class-taut:3:c" "&I" by blast
6609qed
6610
6611AOT_theorem "oa-contingent:2": O!x  ¬A!x
6612proof -
6613  AOT_have O!x  x E!x]x
6614    apply (rule "≡I"; rule "→I")
6615     apply (rule "=dfE"(2)[OF AOT_ordinary])
6616      apply "cqt:2[lambda]"
6617     apply argo
6618    apply (rule  "=dfI"(2)[OF AOT_ordinary])
6619     apply "cqt:2[lambda]"
6620    by argo
6621  also AOT_have   E!x
6622    by (rule "beta-C-meta"[THEN "→E"]) "cqt:2[lambda]"
6623  also AOT_have   ¬¬E!x
6624    using "oth-class-taut:3:b".
6625  also AOT_have   ¬x ¬E!x]x
6626    by (rule "beta-C-meta"[THEN "→E",
6627              THEN "oth-class-taut:4:b"[THEN "≡E"(1)], symmetric])
6628       "cqt:2"
6629  also AOT_have   ¬A!x
6630    apply (rule "≡I"; rule "→I")
6631     apply (rule "=dfI"(2)[OF AOT_abstract])
6632      apply "cqt:2[lambda]"
6633     apply argo
6634    apply (rule "=dfE"(2)[OF AOT_abstract])
6635     apply "cqt:2[lambda]"
6636    by argo
6637  finally show ?thesis.
6638qed
6639
6640AOT_theorem "oa-contingent:3": A!x  ¬O!x
6641  by (AOT_subst A!x ¬¬A!x)
6642     (auto simp add: "oth-class-taut:3:b" "oa-contingent:2"[THEN
6643         "oth-class-taut:4:b"[THEN "≡E"(1)], symmetric])
6644
6645AOT_theorem "oa-contingent:4": Contingent(O!)
6646proof (rule "thm-cont-prop:2"[unvarify F, OF "oa-exist:1", THEN "≡E"(2)];
6647       rule "&I")
6648  AOT_have x E!x using "thm-cont-e:3" .
6649  AOT_hence x E!x using "BF◇"[THEN "→E"] by blast
6650  then AOT_obtain a where E!a using "∃E"[rotated] by blast
6651  AOT_hence x E!x]a
6652    by (rule "beta-C-meta"[THEN "→E", THEN "≡E"(2), rotated]) "cqt:2"
6653  AOT_hence O!a
6654    by (rule "=dfI"(2)[OF AOT_ordinary, rotated]) "cqt:2"
6655  AOT_hence x O!x using "∃I" by blast
6656  AOT_thus x O!x using "T◇"[THEN "→E"] by blast
6657next
6658  AOT_obtain a where A!a
6659    using "A-objects"[axiom_inst] "∃E"[rotated] "&E" by blast
6660  AOT_hence ¬O!a using "oa-contingent:3"[THEN "≡E"(1)] by blast
6661  AOT_hence x ¬O!x using "∃I" by fast
6662  AOT_thus x ¬O!x using "T◇"[THEN "→E"] by blast
6663qed
6664
6665AOT_theorem "oa-contingent:5": Contingent(A!)
6666proof (rule "thm-cont-prop:2"[unvarify F, OF "oa-exist:2", THEN "≡E"(2)];
6667       rule "&I")
6668  AOT_obtain a where A!a
6669    using "A-objects"[axiom_inst] "∃E"[rotated] "&E" by blast
6670  AOT_hence x A!x using "∃I" by fast
6671  AOT_thus x A!x using "T◇"[THEN "→E"] by blast
6672next
6673  AOT_have x E!x using "thm-cont-e:3" .
6674  AOT_hence x E!x using "BF◇"[THEN "→E"] by blast
6675  then AOT_obtain a where E!a using "∃E"[rotated] by blast
6676  AOT_hence x E!x]a
6677    by (rule "beta-C-meta"[THEN "→E", THEN "≡E"(2), rotated]) "cqt:2[lambda]"
6678  AOT_hence O!a
6679    by (rule "=dfI"(2)[OF AOT_ordinary, rotated]) "cqt:2[lambda]"
6680  AOT_hence ¬A!a using "oa-contingent:2"[THEN "≡E"(1)] by blast
6681  AOT_hence x ¬A!x using "∃I" by fast
6682  AOT_thus x ¬A!x using "T◇"[THEN "→E"] by blast
6683qed
6684
6685AOT_theorem "oa-contingent:7": O!-x  ¬A!-x
6686proof -
6687  AOT_have O!x  ¬A!x
6688    using "oa-contingent:2" by blast
6689  also AOT_have   A!-x
6690    using "thm-relation-negation:1"[symmetric, unvarify F, OF "oa-exist:2"].
6691  finally AOT_have 1: O!x  A!-x.
6692
6693  AOT_have A!x  ¬O!x
6694    using "oa-contingent:3" by blast
6695  also AOT_have   O!-x
6696    using "thm-relation-negation:1"[symmetric, unvarify F, OF "oa-exist:1"].
6697  finally AOT_have 2: A!x  O!-x.
6698
6699  AOT_show O!-x  ¬A!-x
6700    using 1[THEN "oth-class-taut:4:b"[THEN "≡E"(1)]]
6701          "oa-contingent:3"[of _ x] 2[symmetric]
6702          "≡E"(5) by blast
6703qed
6704
6705AOT_theorem "oa-contingent:6": O!-  A!-
6706proof (rule "=-infix"[THEN "dfI"]; rule "raa-cor:2")
6707  AOT_assume 1: O!- = A!-
6708  fix x
6709  AOT_have A!-x  O!-x
6710    apply (rule "rule=E"[rotated, OF 1])
6711    by (fact "oth-class-taut:3:a")
6712  AOT_hence A!-x  ¬A!-x
6713    using "oa-contingent:7" "≡E" by fast
6714  AOT_thus (A!-x  ¬A!-x) & ¬(A!-x  ¬A!-x)
6715    using "oth-class-taut:3:c" "&I" by blast
6716qed
6717
6718AOT_theorem "oa-contingent:8": Contingent(O!-)
6719  using "thm-cont-prop:3"[unvarify F, OF "oa-exist:1", THEN "≡E"(1),
6720          OF "oa-contingent:4"].
6721
6722AOT_theorem "oa-contingent:9": Contingent(A!-)
6723  using "thm-cont-prop:3"[unvarify F, OF "oa-exist:2", THEN "≡E"(1),
6724          OF "oa-contingent:5"].
6725
6726AOT_define WeaklyContingent :: Π  φ (WeaklyContingent'(_'))
6727  "df-cont-nec":
6728  WeaklyContingent([F]) df Contingent([F]) & x ([F]x  [F]x)
6729
6730AOT_theorem "cont-nec-fact1:1":
6731  WeaklyContingent([F])  WeaklyContingent([F]-)
6732proof -
6733  AOT_have WeaklyContingent([F])  Contingent([F]) & x ([F]x  [F]x)
6734    using "df-cont-nec"[THEN "≡Df"] by blast
6735  also AOT_have ...  Contingent([F]-) & x ([F]x  [F]x)
6736    apply (rule "oth-class-taut:8:f"[THEN "≡E"(2)]; rule "→I")
6737    using "thm-cont-prop:3".
6738  also AOT_have   Contingent([F]-) & x ([F]-x  [F]-x)
6739  proof (rule "oth-class-taut:8:e"[THEN "≡E"(2)];
6740         rule "→I"; rule "≡I"; rule "→I"; rule GEN; rule "→I")
6741    fix x
6742    AOT_assume 0: x ([F]x  [F]x)
6743    AOT_assume 1: [F]-x
6744    AOT_have ¬[F]x
6745      by (AOT_subst (reverse) ¬[F]x [F]-x)
6746         (auto simp add: "thm-relation-negation:1" 1)
6747    AOT_hence 2: ¬[F]x
6748      using "KBasic:11"[THEN "≡E"(2)] by blast
6749    AOT_show [F]-x
6750    proof (rule "raa-cor:1")
6751      AOT_assume 3: ¬[F]-x
6752      AOT_have ¬¬[F]x
6753        by (AOT_subst (reverse) ¬[F]x [F]-x)
6754           (auto simp add: "thm-relation-negation:1" 3)
6755      AOT_hence [F]x
6756        using "conventions:5"[THEN "dfI"] by simp
6757      AOT_hence [F]x using 0 "∀E" "→E" by fast
6758      AOT_thus [F]x & ¬[F]x using "&I" 2 by blast
6759    qed
6760  next
6761    fix x
6762    AOT_assume 0: x ([F]-x  [F]-x)
6763    AOT_assume 1: [F]x
6764    AOT_have ¬[F]-x
6765      by (AOT_subst ¬[F]-x [F]x)
6766         (auto simp: "thm-relation-negation:2" 1)
6767    AOT_hence 2: ¬[F]-x
6768      using "KBasic:11"[THEN "≡E"(2)] by blast
6769    AOT_show [F]x
6770    proof (rule "raa-cor:1")
6771      AOT_assume 3: ¬[F]x
6772      AOT_have ¬¬[F]-x
6773        by (AOT_subst ¬[F]-x [F]x)
6774           (auto simp add: "thm-relation-negation:2" 3)
6775      AOT_hence [F]-x
6776        using "conventions:5"[THEN "dfI"] by simp
6777      AOT_hence [F]-x using 0 "∀E" "→E" by fast
6778      AOT_thus [F]-x & ¬[F]-x using "&I" 2 by blast
6779    qed
6780  qed
6781  also AOT_have   WeaklyContingent([F]-)
6782    using "df-cont-nec"[THEN "≡Df", symmetric] by blast
6783  finally show ?thesis.
6784qed
6785
6786AOT_theorem "cont-nec-fact1:2":
6787  (WeaklyContingent([F]) & ¬WeaklyContingent([G]))  F  G
6788proof (rule "→I"; rule "=-infix"[THEN "dfI"]; rule "raa-cor:2")
6789  AOT_assume 1: WeaklyContingent([F]) & ¬WeaklyContingent([G])
6790  AOT_hence WeaklyContingent([F]) using "&E" by blast
6791  moreover AOT_assume F = G
6792  ultimately AOT_have WeaklyContingent([G])
6793    using "rule=E" by blast
6794  AOT_thus WeaklyContingent([G]) & ¬WeaklyContingent([G])
6795    using 1 "&I" "&E" by blast
6796qed
6797
6798AOT_theorem "cont-nec-fact2:1": WeaklyContingent(O!)
6799proof (rule "df-cont-nec"[THEN "dfI"]; rule "&I")
6800  AOT_show Contingent(O!)
6801    using "oa-contingent:4".
6802next
6803  AOT_show x ([O!]x  [O!]x)
6804    apply (rule GEN; rule "→I")
6805    using "oa-facts:5"[THEN "≡E"(1)] by blast
6806qed
6807
6808
6809AOT_theorem "cont-nec-fact2:2": WeaklyContingent(A!)
6810proof (rule "df-cont-nec"[THEN "dfI"]; rule "&I")
6811  AOT_show Contingent(A!)
6812    using "oa-contingent:5".
6813next
6814  AOT_show x ([A!]x  [A!]x)
6815    apply (rule GEN; rule "→I")
6816    using "oa-facts:6"[THEN "≡E"(1)] by blast
6817qed
6818
6819AOT_theorem "cont-nec-fact2:3": ¬WeaklyContingent(E!)
6820proof (rule "df-cont-nec"[THEN "≡Df",
6821                          THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
6822                          THEN "≡E"(2)];
6823       rule DeMorgan(1)[THEN "≡E"(2)]; rule "∨I"(2); rule "raa-cor:2")
6824  AOT_have x (E!x & ¬𝒜E!x) using "qml:4"[axiom_inst].
6825  AOT_hence x (E!x & ¬𝒜E!x) using "BF◇"[THEN "→E"] by blast
6826  then AOT_obtain a where (E!a & ¬𝒜E!a) using "∃E"[rotated] by blast
6827  AOT_hence 1: E!a & ¬𝒜E!a using "KBasic2:3"[THEN "→E"] by simp
6828  moreover AOT_assume x ([E!]x  [E!]x)
6829  ultimately AOT_have E!a using "&E" "∀E" "→E" by fast
6830  AOT_hence 𝒜E!a using "nec-imp-act"[THEN "→E"] by blast
6831  AOT_hence 𝒜E!a using "qml-act:1"[axiom_inst, THEN "→E"] by blast
6832  moreover AOT_have ¬𝒜E!a
6833    using "KBasic:11"[THEN "≡E"(2)] 1[THEN "&E"(2)] by meson
6834  ultimately AOT_have 𝒜E!a & ¬𝒜E!a using "&I" by blast
6835  AOT_thus p & ¬p for p using "raa-cor:1" by blast
6836qed
6837
6838AOT_theorem "cont-nec-fact2:4": ¬WeaklyContingent(L)
6839  apply (rule "df-cont-nec"[THEN "≡Df",
6840                            THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
6841                            THEN "≡E"(2)];
6842       rule DeMorgan(1)[THEN "≡E"(2)]; rule "∨I"(1))
6843  apply (rule "contingent-properties:4"
6844                [THEN "≡Df",
6845                 THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
6846                 THEN "≡E"(2)])
6847  apply (rule DeMorgan(1)[THEN "≡E"(2)];
6848         rule "∨I"(2);
6849         rule "useful-tautologies:2"[THEN "→E"])
6850  using "thm-noncont-e-e:3"[THEN "contingent-properties:3"[THEN "dfE"]].
6851
6852AOT_theorem "cont-nec-fact2:5": O!  E! & O!  E!- & O!  L & O!  L-
6853proof -
6854  AOT_have 1: L
6855    by (rule "=dfI"(2)[OF L_def]) "cqt:2[lambda]"+
6856  {
6857    fix φ and Π Π' :: <κ>
6858    AOT_have A: ¬(φ{Π'}  φ{Π}) if  φ{Π} and ¬φ{Π'}
6859    proof (rule "raa-cor:2")
6860      AOT_assume φ{Π'}  φ{Π}
6861      AOT_hence φ{Π'} using that(1) "≡E" by blast
6862      AOT_thus φ{Π'} & ¬φ{Π'} using that(2) "&I" by blast
6863    qed
6864    AOT_have Π'  Π if Π and Π' and φ{Π} and ¬φ{Π'}
6865      using "pos-not-equiv-ne:4"[unvarify F G, THEN "→E",
6866                                 OF that(1,2), OF A[OF that(3, 4)]].
6867  } note 0 = this
6868  show ?thesis
6869    apply(safe intro!: "&I"; rule 0)
6870    apply "cqt:2"
6871    using "oa-exist:1" apply blast
6872    using "cont-nec-fact2:3" apply fast
6873    apply (rule "useful-tautologies:2"[THEN "→E"])
6874    using "cont-nec-fact2:1" apply fast
6875    using "rel-neg-T:3" apply fast
6876    using "oa-exist:1" apply blast
6877    using "cont-nec-fact1:1"[THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
6878            THEN "≡E"(1), rotated, OF "cont-nec-fact2:3"] apply fast
6879    apply (rule "useful-tautologies:2"[THEN "→E"])
6880    using "cont-nec-fact2:1" apply blast
6881    apply (rule "=dfI"(2)[OF L_def]; "cqt:2[lambda]")
6882    using "oa-exist:1" apply fast
6883    using "cont-nec-fact2:4" apply fast
6884    apply (rule "useful-tautologies:2"[THEN "→E"])
6885    using "cont-nec-fact2:1" apply fast
6886    using "rel-neg-T:3" apply fast
6887    using "oa-exist:1" apply fast
6888     apply (rule "cont-nec-fact1:1"[unvarify F,
6889                    THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
6890                    THEN "≡E"(1), rotated, OF "cont-nec-fact2:4"])
6891    apply (rule "=dfI"(2)[OF L_def]; "cqt:2[lambda]")
6892    apply (rule "useful-tautologies:2"[THEN "→E"])
6893    using "cont-nec-fact2:1" by blast
6894qed
6895
6896AOT_theorem "cont-nec-fact2:6": A!  E! & A!  E!- & A!  L & A!  L-
6897proof -
6898  AOT_have 1: L
6899    by (rule "=dfI"(2)[OF L_def]) "cqt:2[lambda]"+
6900  {
6901    fix φ and Π Π' :: <κ>
6902    AOT_have A: ¬(φ{Π'}  φ{Π}) if  φ{Π} and ¬φ{Π'}
6903    proof (rule "raa-cor:2")
6904      AOT_assume φ{Π'}  φ{Π}
6905      AOT_hence φ{Π'} using that(1) "≡E" by blast
6906      AOT_thus φ{Π'} & ¬φ{Π'} using that(2) "&I" by blast
6907    qed
6908    AOT_have Π'  Π if Π and Π' and φ{Π} and ¬φ{Π'}
6909      using "pos-not-equiv-ne:4"[unvarify F G, THEN "→E",
6910              OF that(1,2), OF A[OF that(3, 4)]].
6911  } note 0 = this
6912  show ?thesis
6913    apply(safe intro!: "&I"; rule 0)
6914    apply "cqt:2"
6915    using "oa-exist:2" apply blast
6916    using "cont-nec-fact2:3" apply fast
6917    apply (rule "useful-tautologies:2"[THEN "→E"])
6918    using "cont-nec-fact2:2" apply fast
6919    using "rel-neg-T:3" apply fast
6920    using "oa-exist:2" apply blast
6921    using "cont-nec-fact1:1"[THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
6922            THEN "≡E"(1), rotated, OF "cont-nec-fact2:3"] apply fast
6923    apply (rule "useful-tautologies:2"[THEN "→E"])
6924    using "cont-nec-fact2:2" apply blast
6925    apply (rule "=dfI"(2)[OF L_def]; "cqt:2[lambda]")
6926    using "oa-exist:2" apply fast
6927    using "cont-nec-fact2:4" apply fast
6928    apply (rule "useful-tautologies:2"[THEN "→E"])
6929    using "cont-nec-fact2:2" apply fast
6930    using "rel-neg-T:3" apply fast
6931    using "oa-exist:2" apply fast
6932     apply (rule "cont-nec-fact1:1"[unvarify F,
6933              THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
6934              THEN "≡E"(1), rotated, OF "cont-nec-fact2:4"])
6935     apply (rule "=dfI"(2)[OF L_def]; "cqt:2[lambda]")
6936    apply (rule "useful-tautologies:2"[THEN "→E"])
6937    using "cont-nec-fact2:2" by blast
6938qed
6939
6940AOT_define necessary_or_contingently_false :: φ  φ ("Δ_" [49] 54)
6941  Δp df p  (¬𝒜p & p)
6942
6943AOT_theorem sixteen:
6944 shows F1F2F3F4F5F6F7F8F9F10F11F12F13F14F15F16 (
6945  «F1::<κ>»  F2 & F1  F3 & F1  F4 & F1  F5 & F1  F6 & F1  F7 &
6946    F1  F8 & F1  F9 & F1  F10 & F1  F11 & F1  F12 & F1  F13 &
6947    F1  F14 & F1  F15 & F1  F16 &
6948  F2  F3 & F2  F4 & F2  F5 & F2  F6 & F2  F7 & F2  F8 &
6949    F2  F9 & F2  F10 & F2  F11 & F2  F12 & F2  F13 & F2  F14 &
6950    F2  F15 & F2  F16 &
6951  F3  F4 & F3  F5 & F3  F6 & F3  F7 & F3  F8 & F3  F9 & F3  F10 &
6952    F3  F11 & F3  F12 & F3  F13 & F3  F14 & F3  F15 & F3  F16 &
6953  F4  F5 & F4  F6 & F4  F7 & F4  F8 & F4  F9 & F4  F10 & F4  F11 &
6954    F4  F12 & F4  F13 & F4  F14 & F4  F15 & F4  F16 &
6955  F5  F6 & F5  F7 & F5  F8 & F5  F9 & F5  F10 & F5  F11 & F5  F12 &
6956    F5  F13 & F5  F14 & F5  F15 & F5  F16 &
6957  F6  F7 & F6  F8 & F6  F9 & F6  F10 & F6  F11 & F6  F12 & F6  F13 &
6958    F6  F14 & F6  F15 & F6  F16 &
6959  F7  F8 & F7  F9 & F7  F10 & F7  F11 & F7  F12 & F7  F13 & F7  F14 &
6960    F7  F15 & F7  F16 &
6961  F8  F9 & F8  F10 & F8  F11 & F8  F12 & F8  F13 & F8  F14 & F8  F15 &
6962    F8  F16 &
6963  F9  F10 & F9  F11 & F9  F12 & F9  F13 & F9  F14 & F9  F15 & F9  F16 &
6964  F10  F11 & F10  F12 & F10  F13 & F10  F14 & F10  F15 & F10  F16 &
6965  F11  F12 & F11  F13 & F11  F14 & F11  F15 & F11  F16 &
6966  F12  F13 & F12  F14 & F12  F15 & F12  F16 &
6967  F13  F14 & F13  F15 & F13  F16 &
6968  F14  F15 & F14  F16 &
6969  F15  F16) 
6970proof -
6971  AOT_have Delta_pos: Δφ  φ for φ
6972  proof(rule "→I")
6973    AOT_assume Δφ
6974    AOT_hence φ  (¬𝒜φ & φ)
6975      using "dfE"[OF necessary_or_contingently_false] by blast
6976    moreover {
6977      AOT_assume φ
6978      AOT_hence φ
6979        by (metis "B◇" "T◇" "vdash-properties:10")
6980    }
6981    moreover {
6982      AOT_assume ¬𝒜φ & φ
6983      AOT_hence φ
6984        using "&E" by blast
6985    }
6986    ultimately AOT_show φ
6987      by (metis "∨E"(2) "raa-cor:1") 
6988  qed
6989
6990  AOT_have act_and_not_nec_not_delta: ¬Δφ if 𝒜φ and ¬φ for φ
6991    using "dfE" "&E"(1) "∨E"(2) necessary_or_contingently_false
6992          "raa-cor:3" that(1,2) by blast
6993  AOT_have act_and_pos_not_not_delta: ¬Δφ if 𝒜φ and ¬φ for φ
6994    using "KBasic:11" act_and_not_nec_not_delta "≡E"(2) that(1,2) by blast
6995  AOT_have impossible_delta: ¬Δφ if ¬φ for φ
6996    using Delta_pos "modus-tollens:1" that by blast
6997  AOT_have not_act_and_pos_delta: Δφ if ¬𝒜φ and φ for φ
6998    by (meson "dfI" "&I" "∨I"(2) necessary_or_contingently_false that(1,2))
6999  AOT_have nec_delta: Δφ if φ for φ
7000    using "dfI" "∨I"(1) necessary_or_contingently_false that by blast
7001
7002  AOT_obtain a where a_prop: A!a
7003    using "A-objects"[axiom_inst] "∃E"[rotated] "&E" by blast
7004  AOT_obtain b where b_prop: [E!]b & ¬𝒜[E!]b
7005    using "pos-not-pna:3" using "∃E"[rotated] by blast
7006
7007  AOT_have b_ord: [O!]b
7008  proof(rule "=dfI"(2)[OF AOT_ordinary])
7009    AOT_show x [E!]x] by "cqt:2[lambda]"
7010  next
7011    AOT_show x [E!]x]b
7012    proof (rule "β←C"(1); ("cqt:2[lambda]")?)
7013      AOT_show b by (rule "cqt:2[const_var]"[axiom_inst])
7014      AOT_show [E!]b by (fact b_prop[THEN "&E"(1)])
7015    qed
7016  qed
7017
7018  AOT_have nec_not_L_neg: ¬[L-]x for x
7019    using "thm-noncont-e-e:2" "contingent-properties:2"[THEN "dfE"] "&E"
7020          CBF[THEN "→E"] "∀E" by blast
7021  AOT_have nec_L: [L]x for x
7022    using "thm-noncont-e-e:1" "contingent-properties:1"[THEN "dfE"]
7023      CBF[THEN "→E"] "∀E" by blast
7024
7025  AOT_have act_ord_b: 𝒜[O!]b
7026    using b_ord "≡E"(1) "oa-facts:7" by blast
7027  AOT_have delta_ord_b: Δ[O!]b
7028    by (meson "dfI" b_ord "∨I"(1) necessary_or_contingently_false
7029              "oa-facts:1" "→E")
7030  AOT_have not_act_ord_a: ¬𝒜[O!]a
7031    by (meson a_prop "≡E"(1) "≡E"(3) "oa-contingent:3" "oa-facts:7")
7032  AOT_have not_delta_ord_a: ¬Δ[O!]a
7033    by (metis Delta_pos "≡E"(4) not_act_ord_a "oa-facts:3" "oa-facts:7"
7034              "reductio-aa:1" "→E")
7035
7036  AOT_have not_act_abs_b: ¬𝒜[A!]b
7037    by (meson b_ord "≡E"(1) "≡E"(3) "oa-contingent:2" "oa-facts:8")
7038  AOT_have not_delta_abs_b: ¬Δ[A!]b
7039  proof(rule "raa-cor:2")
7040    AOT_assume Δ[A!]b
7041    AOT_hence [A!]b
7042      by (metis Delta_pos "vdash-properties:10")
7043    AOT_thus [A!]b & ¬[A!]b
7044      by (metis b_ord "&I" "≡E"(1) "oa-contingent:2"
7045                "oa-facts:4" "→E")
7046  qed
7047  AOT_have act_abs_a: 𝒜[A!]a
7048    using a_prop "≡E"(1) "oa-facts:8" by blast
7049  AOT_have delta_abs_a: Δ[A!]a
7050    by (metis "dfI" a_prop "oa-facts:2" "→E" "∨I"(1)
7051              necessary_or_contingently_false)
7052
7053  AOT_have not_act_concrete_b: ¬𝒜[E!]b
7054    using b_prop "&E"(2) by blast
7055  AOT_have delta_concrete_b: Δ[E!]b
7056  proof (rule "dfI"[OF necessary_or_contingently_false];
7057         rule "∨I"(2); rule "&I")
7058    AOT_show ¬𝒜[E!]b using b_prop "&E"(2) by blast
7059  next
7060    AOT_show [E!]b using b_prop "&E"(1) by blast
7061  qed
7062  AOT_have not_act_concrete_a: ¬𝒜[E!]a
7063  proof (rule "raa-cor:2")
7064    AOT_assume 𝒜[E!]a
7065    AOT_hence 1: [E!]a by (metis "Act-Sub:3" "→E")
7066    AOT_have [A!]a by (simp add: a_prop)
7067    AOT_hence x ¬[E!]x]a
7068      by (rule "=dfE"(2)[OF AOT_abstract, rotated]) "cqt:2"
7069    AOT_hence ¬[E!]a using "β→C"(1) by blast
7070    AOT_thus [E!]a & ¬[E!]a using 1 "&I" by blast
7071  qed
7072  AOT_have not_delta_concrete_a: ¬Δ[E!]a
7073  proof (rule "raa-cor:2")
7074    AOT_assume Δ[E!]a
7075    AOT_hence 1: [E!]a by (metis Delta_pos "vdash-properties:10")
7076    AOT_have [A!]a by (simp add: a_prop)
7077    AOT_hence x ¬[E!]x]a
7078      by (rule "=dfE"(2)[OF AOT_abstract, rotated]) "cqt:2[lambda]"
7079    AOT_hence ¬[E!]a using "β→C"(1) by blast
7080    AOT_thus [E!]a & ¬[E!]a using 1 "&I" by blast
7081  qed
7082
7083  AOT_have not_act_q_zero: ¬𝒜q0
7084    by (meson "log-prop-prop:2" "pos-not-pna:1"
7085              q0_def "reductio-aa:1" "rule-id-df:2:a[zero]")
7086  AOT_have delta_q_zero: Δq0
7087  proof(rule "dfI"[OF necessary_or_contingently_false];
7088        rule "∨I"(2); rule "&I")
7089    AOT_show ¬𝒜q0 using not_act_q_zero.
7090    AOT_show q0 by (meson "&E"(1) q0_prop)
7091  qed
7092  AOT_have act_not_q_zero: 𝒜¬q0
7093    using "Act-Basic:1" "∨E"(2) not_act_q_zero by blast
7094  AOT_have not_delta_not_q_zero: ¬Δ¬q0
7095    using "dfE" "conventions:5" "Act-Basic:1" act_and_not_nec_not_delta
7096          "&E"(1) "∨E"(2) not_act_q_zero q0_prop by blast
7097
7098  AOT_have [L-] by (simp add: "rel-neg-T:3")
7099  moreover AOT_have ¬𝒜[L-]b & ¬Δ[L-]b & ¬𝒜[L-]a & ¬Δ[L-]a
7100  proof (safe intro!: "&I")
7101    AOT_show ¬𝒜[L-]b
7102      by (meson "≡E"(1) "logic-actual-nec:1"[axiom_inst] "nec-imp-act"
7103                nec_not_L_neg "→E")
7104    AOT_show ¬Δ[L-]b
7105      by (meson Delta_pos "KBasic2:1" "≡E"(1)
7106                "modus-tollens:1" nec_not_L_neg)
7107    AOT_show ¬𝒜[L-]a
7108      by (meson "≡E"(1) "logic-actual-nec:1"[axiom_inst]
7109                "nec-imp-act" nec_not_L_neg "→E")
7110    AOT_show ¬Δ[L-]a
7111      using Delta_pos "KBasic2:1" "≡E"(1) "modus-tollens:1"
7112            nec_not_L_neg by blast
7113  qed
7114  ultimately AOT_obtain F0 where ¬𝒜[F0]b & ¬Δ[F0]b & ¬𝒜[F0]a & ¬Δ[F0]a
7115    using "∃I"(1)[rotated, THEN "∃E"[rotated]] by fastforce
7116  AOT_hence ¬𝒜[F0]b and ¬Δ[F0]b and ¬𝒜[F0]a and ¬Δ[F0]a
7117    using "&E" by blast+
7118  note props = this
7119
7120  let  = "«y [A!]y & q0]»"
7121  AOT_modally_strict {
7122    AOT_have [«»] by "cqt:2[lambda]"
7123  } note 1 = this
7124  moreover AOT_have ¬𝒜[«»]b & ¬Δ[«»]b & ¬𝒜[«»]a & Δ[«»]a
7125  proof (safe intro!: "&I"; AOT_subst y A!y & q0]x A!x & q0 for: x)
7126    AOT_show ¬𝒜([A!]b & q0)
7127      using "Act-Basic:2" "&E"(1) "≡E"(1) not_act_abs_b "raa-cor:3" by blast
7128  next AOT_show ¬Δ([A!]b & q0)
7129      by (metis Delta_pos "KBasic2:3" "&E"(1) "≡E"(4) not_act_abs_b
7130                "oa-facts:4" "oa-facts:8" "raa-cor:3" "→E")
7131  next AOT_show ¬𝒜([A!]a & q0)
7132      using "Act-Basic:2" "&E"(2) "≡E"(1) not_act_q_zero
7133            "raa-cor:3" by blast
7134  next AOT_show Δ([A!]a & q0)
7135    proof (rule not_act_and_pos_delta)
7136      AOT_show ¬𝒜([A!]a & q0)
7137        using "Act-Basic:2" "&E"(2) "≡E"(4) not_act_q_zero
7138              "raa-cor:3" by blast
7139    next AOT_show ([A!]a & q0)
7140        by (metis "&I" "→E" Delta_pos "KBasic:16" "&E"(1) delta_abs_a
7141                  "≡E"(1) "oa-facts:6" q0_prop)
7142    qed
7143  qed(auto simp: "beta-C-meta"[THEN "→E", OF 1])
7144  ultimately AOT_obtain F1 where ¬𝒜[F1]b & ¬Δ[F1]b & ¬𝒜[F1]a & Δ[F1]a
7145    using "∃I"(1)[rotated, THEN "∃E"[rotated]] by fastforce
7146  AOT_hence ¬𝒜[F1]b and ¬Δ[F1]b and ¬𝒜[F1]a and Δ[F1]a
7147    using "&E" by blast+
7148  note props = props this
7149
7150  let  = "«y [A!]y & ¬q0]»"
7151  AOT_modally_strict {
7152    AOT_have [«»] by "cqt:2[lambda]"
7153  } note 1 = this
7154  moreover AOT_have ¬𝒜[«»]b & ¬Δ[«»]b & 𝒜[«»]a & ¬Δ[«»]a
7155  proof (safe intro!: "&I"; AOT_subst y A!y & ¬q0]x A!x & ¬q0 for: x)
7156    AOT_show ¬𝒜([A!]b & ¬q0)
7157      using "Act-Basic:2" "&E"(1) "≡E"(1) not_act_abs_b "raa-cor:3" by blast
7158  next AOT_show ¬Δ([A!]b & ¬q0)
7159      by (meson "RM◇" Delta_pos "Conjunction Simplification"(1) "≡E"(4)
7160                "modus-tollens:1" not_act_abs_b "oa-facts:4" "oa-facts:8")
7161  next AOT_show 𝒜([A!]a & ¬q0)
7162      by (metis "Act-Basic:1" "Act-Basic:2" act_abs_a "&I" "∨E"(2)
7163                "≡E"(3) not_act_q_zero "raa-cor:3")
7164  next AOT_show ¬Δ([A!]a & ¬q0)
7165    proof (rule act_and_not_nec_not_delta)
7166      AOT_show 𝒜([A!]a & ¬q0)
7167        by (metis "Act-Basic:1" "Act-Basic:2" act_abs_a "&I" "∨E"(2)
7168                  "≡E"(3) not_act_q_zero "raa-cor:3")
7169    next
7170      AOT_show ¬([A!]a & ¬q0)
7171        by (metis "KBasic2:1" "KBasic:3" "&E"(1) "&E"(2) "≡E"(4)
7172                  q0_prop "raa-cor:3")
7173    qed
7174  qed(auto simp: "beta-C-meta"[THEN "→E", OF 1])
7175  ultimately AOT_obtain F2 where ¬𝒜[F2]b & ¬Δ[F2]b & 𝒜[F2]a & ¬Δ[F2]a
7176    using "∃I"(1)[rotated, THEN "∃E"[rotated]] by fastforce
7177  AOT_hence ¬𝒜[F2]b and ¬Δ[F2]b and 𝒜[F2]a and ¬Δ[F2]a
7178    using "&E" by blast+
7179  note props = props this
7180
7181  AOT_have abstract_prop: ¬𝒜[A!]b & ¬Δ[A!]b & 𝒜[A!]a & Δ[A!]a
7182    using act_abs_a "&I" delta_abs_a not_act_abs_b not_delta_abs_b
7183    by presburger
7184  then AOT_obtain F3 where ¬𝒜[F3]b & ¬Δ[F3]b & 𝒜[F3]a & Δ[F3]a
7185    using "∃I"(1)[rotated, THEN "∃E"[rotated]] "oa-exist:2" by fastforce
7186  AOT_hence ¬𝒜[F3]b and ¬Δ[F3]b and 𝒜[F3]a and Δ[F3]a
7187    using "&E" by blast+
7188  note props = props this
7189
7190  AOT_have ¬𝒜[E!]b & Δ[E!]b & ¬𝒜[E!]a & ¬Δ[E!]a
7191    by (meson "&I" delta_concrete_b not_act_concrete_a
7192              not_act_concrete_b not_delta_concrete_a)
7193  then AOT_obtain F4 where ¬𝒜[F4]b & Δ[F4]b & ¬𝒜[F4]a & ¬Δ[F4]a
7194    using "∃I"(1)[rotated, THEN "∃E"[rotated]]
7195    by fastforce
7196  AOT_hence ¬𝒜[F4]b and Δ[F4]b and ¬𝒜[F4]a and ¬Δ[F4]a
7197    using "&E" by blast+
7198  note props = props this
7199
7200  AOT_modally_strict {
7201    AOT_have y q0] by "cqt:2[lambda]"
7202  } note 1 = this
7203  moreover AOT_have ¬𝒜y q0]b & Δy q0]b & ¬𝒜y q0]a & Δy q0]a
7204    by (safe intro!: "&I"; AOT_subst y q0]b q0 for: b)
7205       (auto simp: not_act_q_zero delta_q_zero  "beta-C-meta"[THEN "→E", OF 1])
7206  ultimately AOT_obtain F5 where ¬𝒜[F5]b & Δ[F5]b & ¬𝒜[F5]a & Δ[F5]a
7207    using "∃I"(1)[rotated, THEN "∃E"[rotated]]
7208    by fastforce
7209  AOT_hence ¬𝒜[F5]b and Δ[F5]b and ¬𝒜[F5]a and Δ[F5]a
7210    using "&E" by blast+
7211  note props = props this
7212
7213  let  = "«y [E!]y  ([A!]y & ¬q0)]»"
7214  AOT_modally_strict {
7215    AOT_have [«»] by "cqt:2[lambda]"
7216  } note 1 = this
7217  moreover AOT_have ¬𝒜[«»]b & Δ[«»]b & 𝒜[«»]a & ¬Δ[«»]a
7218  proof(safe intro!: "&I";
7219        AOT_subst y E!y  (A!y & ¬q0)]x E!x  (A!x & ¬q0) for: x)
7220    AOT_have 𝒜¬([A!]b & ¬q0)
7221      by (metis "Act-Basic:1" "Act-Basic:2" abstract_prop "&E"(1) "∨E"(2)
7222                "≡E"(1) "raa-cor:3")
7223    moreover AOT_have ¬𝒜[E!]b
7224      using b_prop "&E"(2) by blast
7225    ultimately AOT_have 2: 𝒜(¬[E!]b & ¬([A!]b & ¬q0))
7226      by (metis "Act-Basic:2" "Act-Sub:1" "&I" "≡E"(3) "raa-cor:1")
7227    AOT_have 𝒜¬([E!]b  ([A!]b & ¬q0))
7228      by (AOT_subst ¬([E!]b  ([A!]b & ¬q0)) ¬[E!]b & ¬([A!]b & ¬q0))
7229         (auto simp: "oth-class-taut:5:d" 2)
7230    AOT_thus ¬𝒜([E!]b  ([A!]b & ¬q0))
7231      by (metis "¬¬I" "Act-Sub:1" "≡E"(4))
7232  next
7233    AOT_show Δ([E!]b  ([A!]b & ¬q0))
7234    proof (rule not_act_and_pos_delta)
7235      AOT_show ¬𝒜([E!]b  ([A!]b & ¬q0))
7236        by (metis "Act-Basic:2" "Act-Basic:9" "∨E"(2) "raa-cor:3"
7237                  "Conjunction Simplification"(1) "≡E"(4)
7238                  "modus-tollens:1" not_act_abs_b not_act_concrete_b)
7239    next
7240      AOT_show ([E!]b  ([A!]b & ¬q0))
7241        using "KBasic2:2" b_prop "&E"(1) "∨I"(1) "≡E"(3) "raa-cor:3" by blast
7242    qed
7243  next AOT_show 𝒜([E!]a  ([A!]a & ¬q0))
7244      by (metis "Act-Basic:1" "Act-Basic:2" "Act-Basic:9" act_abs_a "&I"
7245                "∨I"(2) "∨E"(2) "≡E"(3) not_act_q_zero "raa-cor:1")
7246  next AOT_show ¬Δ([E!]a  ([A!]a & ¬q0))
7247    proof (rule act_and_not_nec_not_delta)
7248      AOT_show 𝒜([E!]a  ([A!]a & ¬q0))
7249        by (metis "Act-Basic:1" "Act-Basic:2" "Act-Basic:9" act_abs_a "&I"
7250                  "∨I"(2) "∨E"(2) "≡E"(3) not_act_q_zero "raa-cor:1")
7251    next
7252      AOT_have ¬[E!]a
7253        by (metis "dfI" "conventions:5" "&I" "∨I"(2)
7254                  necessary_or_contingently_false
7255                  not_act_concrete_a not_delta_concrete_a "raa-cor:3")
7256      moreover AOT_have ¬([A!]a & ¬q0)
7257        by (metis "KBasic2:1" "KBasic:11" "KBasic:3"
7258                  "&E"(1,2) "≡E"(1) q0_prop "raa-cor:3")
7259      ultimately AOT_have (¬[E!]a & ¬([A!]a & ¬q0))
7260        by (metis "KBasic:16" "&I" "vdash-properties:10")
7261      AOT_hence ¬([E!]a  ([A!]a & ¬q0))
7262        by (metis "RE◇" "≡E"(2) "oth-class-taut:5:d")
7263      AOT_thus ¬([E!]a  ([A!]a & ¬q0))
7264        by (metis "KBasic:12" "≡E"(1) "raa-cor:3")
7265    qed
7266  qed(auto simp: "beta-C-meta"[THEN "→E", OF 1])
7267  ultimately AOT_obtain F6 where ¬𝒜[F6]b & Δ[F6]b & 𝒜[F6]a & ¬Δ[F6]a
7268    using "∃I"(1)[rotated, THEN "∃E"[rotated]] by fastforce
7269  AOT_hence ¬𝒜[F6]b and Δ[F6]b and 𝒜[F6]a and ¬Δ[F6]a
7270    using "&E" by blast+
7271  note props = props this
7272
7273  let  = "«y [A!]y  [E!]y]»"
7274  AOT_modally_strict {
7275    AOT_have [«»] by "cqt:2[lambda]"
7276  } note 1 = this
7277  moreover AOT_have ¬𝒜[«»]b & Δ[«»]b & 𝒜[«»]a & Δ[«»]a
7278  proof(safe intro!: "&I"; AOT_subst y A!y  E!y]x A!x  E!x for: x)
7279    AOT_show ¬𝒜([A!]b  [E!]b)
7280      using "Act-Basic:9" "∨E"(2) "≡E"(4) not_act_abs_b
7281            not_act_concrete_b "raa-cor:3" by blast
7282  next AOT_show Δ([A!]b  [E!]b)
7283    proof (rule not_act_and_pos_delta)
7284      AOT_show ¬𝒜([A!]b  [E!]b)
7285        using "Act-Basic:9" "∨E"(2) "≡E"(4) not_act_abs_b
7286              not_act_concrete_b "raa-cor:3" by blast
7287    next AOT_show ([A!]b  [E!]b)
7288        using "KBasic2:2" b_prop "&E"(1) "∨I"(2) "≡E"(2) by blast
7289    qed
7290  next AOT_show 𝒜([A!]a  [E!]a)
7291      by (meson "Act-Basic:9" act_abs_a "∨I"(1) "≡E"(2))
7292  next AOT_show Δ([A!]a  [E!]a)
7293    proof (rule nec_delta)
7294      AOT_show ([A!]a  [E!]a)
7295        by (metis "KBasic:15" act_abs_a act_and_not_nec_not_delta
7296                  "Disjunction Addition"(1) delta_abs_a "raa-cor:3" "→E")
7297    qed
7298  qed(auto simp: "beta-C-meta"[THEN "→E", OF 1])
7299  ultimately AOT_obtain F7 where ¬𝒜[F7]b & Δ[F7]b & 𝒜[F7]a & Δ[F7]a
7300    using "∃I"(1)[rotated, THEN "∃E"[rotated]] by fastforce
7301  AOT_hence ¬𝒜[F7]b and Δ[F7]b and 𝒜[F7]a and Δ[F7]a
7302    using "&E" by blast+
7303  note props = props this
7304
7305  let  = "«y [O!]y & ¬[E!]y]»"
7306  AOT_modally_strict {
7307    AOT_have [«»] by "cqt:2[lambda]"
7308  } note 1 = this
7309  moreover AOT_have 𝒜[«»]b & ¬Δ[«»]b & ¬𝒜[«»]a & ¬Δ[«»]a
7310  proof(safe intro!: "&I"; AOT_subst y O!y & ¬E!y]x O!x & ¬E!x for: x)
7311    AOT_show 𝒜([O!]b & ¬[E!]b)
7312      by (metis "Act-Basic:1" "Act-Basic:2" act_ord_b "&I" "∨E"(2)
7313                "≡E"(3) not_act_concrete_b "raa-cor:3")
7314  next AOT_show ¬Δ([O!]b & ¬[E!]b)
7315      by (metis (no_types, opaque_lifting) "conventions:5" "Act-Sub:1" "RM:1"
7316                act_and_not_nec_not_delta "act-conj-act:3"
7317                act_ord_b b_prop "&I" "&E"(1) "Conjunction Simplification"(2)
7318                "df-rules-formulas[3]"
7319                "≡E"(3) "raa-cor:1" "→E")
7320  next AOT_show ¬𝒜([O!]a & ¬[E!]a)
7321      using "Act-Basic:2" "&E"(1) "≡E"(1) not_act_ord_a "raa-cor:3" by blast
7322  next AOT_have ¬([O!]a & ¬[E!]a)
7323      by (metis "KBasic2:3" "&E"(1) "≡E"(4) not_act_ord_a "oa-facts:3"
7324                "oa-facts:7" "raa-cor:3" "vdash-properties:10")
7325    AOT_thus ¬Δ([O!]a & ¬[E!]a)
7326      by (rule impossible_delta)
7327  qed(auto simp: "beta-C-meta"[THEN "→E", OF 1])
7328  ultimately AOT_obtain F8 where 𝒜[F8]b & ¬Δ[F8]b & ¬𝒜[F8]a & ¬Δ[F8]a
7329    using "∃I"(1)[rotated, THEN "∃E"[rotated]] by fastforce
7330  AOT_hence 𝒜[F8]b and ¬Δ[F8]b and ¬𝒜[F8]a and ¬Δ[F8]a
7331    using "&E" by blast+
7332  note props = props this
7333
7334  let  = "«y ¬[E!]y & ([O!]y  q0)]»"
7335  AOT_modally_strict {
7336    AOT_have [«»] by "cqt:2[lambda]"
7337  } note 1 = this
7338  moreover AOT_have 𝒜[«»]b & ¬Δ[«»]b & ¬𝒜[«»]a & Δ[«»]a
7339  proof(safe intro!: "&I";
7340        AOT_subst y ¬E!y & (O!y  q0)]x ¬E!x & (O!x  q0) for: x)
7341    AOT_show 𝒜(¬[E!]b & ([O!]b  q0))
7342      by (metis "Act-Basic:1" "Act-Basic:2" "Act-Basic:9" act_ord_b "&I"
7343                "∨I"(1) "∨E"(2) "≡E"(3) not_act_concrete_b "raa-cor:1")
7344  next AOT_show ¬Δ(¬[E!]b & ([O!]b  q0))
7345    proof (rule act_and_pos_not_not_delta)
7346      AOT_show 𝒜(¬[E!]b & ([O!]b  q0))
7347        by (metis "Act-Basic:1" "Act-Basic:2" "Act-Basic:9" act_ord_b "&I"
7348                  "∨I"(1) "∨E"(2) "≡E"(3) not_act_concrete_b "raa-cor:1")
7349    next
7350      AOT_show ¬(¬[E!]b & ([O!]b  q0))
7351      proof (AOT_subst ¬(¬[E!]b & ([O!]b  q0)) [E!]b  ¬([O!]b  q0))
7352        AOT_modally_strict {
7353          AOT_show ¬(¬[E!]b & ([O!]b  q0))  [E!]b  ¬([O!]b  q0)
7354            by (metis "&I" "&E"(1,2) "∨I"(1,2) "∨E"(2)
7355                      "→I" "≡I" "reductio-aa:1")
7356        }
7357      next
7358        AOT_show ([E!]b  ¬([O!]b  q0))
7359          using "KBasic2:2" b_prop "&E"(1) "∨I"(1) "≡E"(3)
7360                "raa-cor:3" by blast
7361       qed
7362     qed
7363   next
7364     AOT_show ¬𝒜(¬[E!]a & ([O!]a  q0))
7365       using "Act-Basic:2" "Act-Basic:9" "&E"(2) "∨E"(3) "≡E"(1)
7366             not_act_ord_a not_act_q_zero "reductio-aa:2" by blast
7367   next
7368     AOT_show Δ(¬[E!]a & ([O!]a  q0))
7369     proof (rule not_act_and_pos_delta)
7370       AOT_show ¬𝒜(¬[E!]a & ([O!]a  q0))
7371         by (metis "Act-Basic:2" "Act-Basic:9" "&E"(2) "∨E"(3) "≡E"(1)
7372                   not_act_ord_a not_act_q_zero "reductio-aa:2")
7373     next
7374       AOT_have ¬[E!]a
7375         using "KBasic2:1" "≡E"(2) not_act_and_pos_delta not_act_concrete_a
7376               not_delta_concrete_a "raa-cor:5" by blast
7377       moreover AOT_have ([O!]a  q0)
7378         by (metis "KBasic2:2" "&E"(1) "∨I"(2) "≡E"(3) q0_prop "raa-cor:3")
7379       ultimately AOT_show (¬[E!]a & ([O!]a  q0))
7380         by (metis "KBasic:16" "&I" "vdash-properties:10")
7381     qed
7382   qed(auto simp:  "beta-C-meta"[THEN "→E", OF 1])
7383  ultimately AOT_obtain F9 where 𝒜[F9]b & ¬Δ[F9]b & ¬𝒜[F9]a & Δ[F9]a
7384    using "∃I"(1)[rotated, THEN "∃E"[rotated]] by fastforce
7385  AOT_hence 𝒜[F9]b and ¬Δ[F9]b and ¬𝒜[F9]a and Δ[F9]a
7386    using "&E" by blast+
7387  note props = props this
7388
7389  AOT_modally_strict {
7390    AOT_have y ¬q0] by "cqt:2[lambda]"
7391  } note 1 = this
7392  moreover AOT_have 𝒜y ¬q0]b & ¬Δy ¬q0]b & 𝒜y ¬q0]a & ¬Δy ¬q0]a
7393    by (safe intro!: "&I"; AOT_subst y ¬q0]x ¬q0 for: x)
7394       (auto simp: act_not_q_zero not_delta_not_q_zero
7395                   "beta-C-meta"[THEN "→E", OF 1])
7396  ultimately AOT_obtain F10 where 𝒜[F10]b & ¬Δ[F10]b & 𝒜[F10]a & ¬Δ[F10]a
7397    using "∃I"(1)[rotated, THEN "∃E"[rotated]] by fastforce
7398  AOT_hence 𝒜[F10]b and ¬Δ[F10]b and 𝒜[F10]a and ¬Δ[F10]a
7399    using "&E" by blast+
7400  note props = props this
7401
7402  AOT_modally_strict {
7403    AOT_have y ¬[E!]y] by "cqt:2[lambda]"
7404  } note 1 = this
7405  moreover AOT_have 𝒜y ¬[E!]y]b & ¬Δy ¬[E!]y]b &
7406                     𝒜y ¬[E!]y]a & Δy ¬[E!]y]a
7407  proof (safe intro!: "&I"; AOT_subst y ¬[E!]y]x ¬[E!]x for: x)
7408    AOT_show 𝒜¬[E!]b
7409      using "Act-Basic:1" "∨E"(2) not_act_concrete_b by blast
7410  next AOT_show ¬Δ¬[E!]b
7411      using "dfE" "conventions:5" "Act-Basic:1" act_and_not_nec_not_delta
7412            b_prop "&E"(1) "∨E"(2) not_act_concrete_b by blast
7413  next AOT_show 𝒜¬[E!]a
7414      using "Act-Basic:1" "∨E"(2) not_act_concrete_a by blast
7415  next AOT_show Δ¬[E!]a
7416      using "KBasic2:1" "≡E"(2) nec_delta not_act_and_pos_delta
7417            not_act_concrete_a not_delta_concrete_a "reductio-aa:1"
7418      by blast
7419  qed(auto simp: "beta-C-meta"[THEN "→E", OF 1])
7420  ultimately AOT_obtain F11 where 𝒜[F11]b & ¬Δ[F11]b & 𝒜[F11]a & Δ[F11]a
7421    using "∃I"(1)[rotated, THEN "∃E"[rotated]] by fastforce
7422  AOT_hence 𝒜[F11]b and ¬Δ[F11]b and 𝒜[F11]a and Δ[F11]a
7423    using "&E" by blast+
7424  note props = props this
7425
7426  AOT_have 𝒜[O!]b & Δ[O!]b & ¬𝒜[O!]a & ¬Δ[O!]a
7427    by (simp add: act_ord_b "&I" delta_ord_b not_act_ord_a not_delta_ord_a)
7428  then AOT_obtain F12 where 𝒜[F12]b & Δ[F12]b & ¬𝒜[F12]a & ¬Δ[F12]a
7429    using "oa-exist:1" "∃I"(1)[rotated, THEN "∃E"[rotated]] by fastforce
7430  AOT_hence 𝒜[F12]b and Δ[F12]b and ¬𝒜[F12]a and ¬Δ[F12]a
7431    using "&E" by blast+
7432  note props = props this
7433
7434  let  = "«y [O!]y  q0]»"
7435  AOT_modally_strict {
7436    AOT_have [«»] by "cqt:2[lambda]"
7437  } note 1 = this
7438  moreover AOT_have 𝒜[«»]b & Δ[«»]b & ¬𝒜[«»]a & Δ[«»]a
7439  proof (safe intro!: "&I"; AOT_subst y O!y  q0]x O!x  q0 for: x)
7440    AOT_show 𝒜([O!]b  q0)
7441      by (meson "Act-Basic:9" act_ord_b "∨I"(1) "≡E"(2))
7442  next AOT_show Δ([O!]b  q0)
7443      by (meson "KBasic:15" b_ord "∨I"(1) nec_delta "oa-facts:1" "→E")
7444  next AOT_show ¬𝒜([O!]a  q0)
7445      using "Act-Basic:9" "∨E"(2) "≡E"(4) not_act_ord_a
7446            not_act_q_zero "raa-cor:3" by blast
7447  next AOT_show Δ([O!]a  q0)
7448    proof (rule not_act_and_pos_delta)
7449      AOT_show ¬𝒜([O!]a  q0)
7450        using "Act-Basic:9" "∨E"(2) "≡E"(4) not_act_ord_a
7451              not_act_q_zero "raa-cor:3" by blast
7452    next AOT_show ([O!]a  q0)
7453        using "KBasic2:2" "&E"(1) "∨I"(2) "≡E"(2) q0_prop by blast
7454    qed
7455  qed(auto simp: "beta-C-meta"[THEN "→E", OF 1])
7456  ultimately AOT_obtain F13 where 𝒜[F13]b & Δ[F13]b & ¬𝒜[F13]a & Δ[F13]a
7457    using "∃I"(1)[rotated, THEN "∃E"[rotated]] by fastforce
7458  AOT_hence 𝒜[F13]b and Δ[F13]b and ¬𝒜[F13]a and Δ[F13]a
7459    using "&E" by blast+
7460  note props = props this
7461
7462  let  = "«y [O!]y  ¬q0]»"
7463  AOT_modally_strict {
7464     AOT_have [«»] by "cqt:2[lambda]"
7465  } note 1 = this
7466  moreover AOT_have 𝒜[«»]b & Δ[«»]b & 𝒜[«»]a & ¬Δ[«»]a
7467  proof (safe intro!: "&I"; AOT_subst y O!y  ¬q0]x O!x  ¬q0 for: x)
7468    AOT_show 𝒜([O!]b  ¬q0)
7469      by (meson "Act-Basic:9" act_not_q_zero "∨I"(2) "≡E"(2))
7470  next AOT_show Δ([O!]b  ¬q0)
7471      by (meson "KBasic:15" b_ord "∨I"(1) nec_delta "oa-facts:1" "→E")
7472  next AOT_show 𝒜([O!]a  ¬q0)
7473      by (meson "Act-Basic:9" act_not_q_zero "∨I"(2) "≡E"(2))
7474  next AOT_show ¬Δ([O!]a  ¬q0)
7475    proof(rule act_and_pos_not_not_delta)
7476      AOT_show 𝒜([O!]a  ¬q0)
7477        by (meson "Act-Basic:9" act_not_q_zero "∨I"(2) "≡E"(2))
7478    next
7479      AOT_have ¬[O!]a
7480        using "KBasic2:1" "≡E"(2) not_act_and_pos_delta
7481              not_act_ord_a not_delta_ord_a "raa-cor:6" by blast
7482      moreover AOT_have q0
7483        by (meson "&E"(1) q0_prop)
7484      ultimately AOT_have 2: (¬[O!]a & q0)
7485         by (metis "KBasic:16" "&I" "vdash-properties:10")
7486      AOT_show ¬([O!]a  ¬q0)
7487      proof (AOT_subst (reverse) ¬([O!]a  ¬q0) ¬[O!]a & q0)
7488        AOT_modally_strict {
7489          AOT_show ¬[O!]a & q0  ¬([O!]a  ¬q0)
7490            by (metis "&I" "&E"(1) "&E"(2) "∨I"(1) "∨I"(2)
7491                      "∨E"(3) "deduction-theorem" "≡I" "raa-cor:3")
7492        }
7493      next
7494        AOT_show (¬[O!]a & q0)
7495          using "2" by blast
7496      qed
7497    qed
7498  qed(auto simp: "beta-C-meta"[THEN "→E", OF 1])
7499  ultimately AOT_obtain F14 where 𝒜[F14]b & Δ[F14]b & 𝒜[F14]a & ¬Δ[F14]a
7500    using "∃I"(1)[rotated, THEN "∃E"[rotated]] by fastforce
7501  AOT_hence 𝒜[F14]b and Δ[F14]b and 𝒜[F14]a and ¬Δ[F14]a
7502    using "&E" by blast+
7503  note props = props this
7504
7505  AOT_have [L]
7506    by (rule "=dfI"(2)[OF L_def]) "cqt:2[lambda]"+
7507  moreover AOT_have 𝒜[L]b & Δ[L]b & 𝒜[L]a & Δ[L]a
7508  proof (safe intro!: "&I")
7509    AOT_show 𝒜[L]b
7510      by (meson nec_L "nec-imp-act" "vdash-properties:10")
7511    next AOT_show Δ[L]b using nec_L nec_delta by blast
7512    next AOT_show 𝒜[L]a by (meson nec_L "nec-imp-act" "→E")
7513    next AOT_show Δ[L]a using nec_L nec_delta by blast
7514  qed
7515  ultimately AOT_obtain F15 where 𝒜[F15]b & Δ[F15]b & 𝒜[F15]a & Δ[F15]a
7516    using "∃I"(1)[rotated, THEN "∃E"[rotated]] by fastforce
7517  AOT_hence 𝒜[F15]b and Δ[F15]b and 𝒜[F15]a and Δ[F15]a
7518    using "&E" by blast+
7519  note props = props this
7520
7521  show ?thesis
7522    by (rule "∃I"(2)[where β=F0]; rule "∃I"(2)[where β=F1];
7523        rule "∃I"(2)[where β=F2]; rule "∃I"(2)[where β=F3];
7524        rule "∃I"(2)[where β=F4]; rule "∃I"(2)[where β=F5];
7525        rule "∃I"(2)[where β=F6]; rule "∃I"(2)[where β=F7];
7526        rule "∃I"(2)[where β=F8]; rule "∃I"(2)[where β=F9];
7527        rule "∃I"(2)[where β=F10]; rule "∃I"(2)[where β=F11];
7528        rule "∃I"(2)[where β=F12]; rule "∃I"(2)[where β=F13];
7529        rule "∃I"(2)[where β=F14]; rule "∃I"(2)[where β=F15];
7530        safe intro!: "&I")
7531       (match conclusion in "[?v  [F]  [G]]" for F G  7532        match props in A: "[?v  ¬φ{F}]" for φ  7533        match (φ) in "λa . ?p"  fail ¦ "λa . a"  fail ¦ _  7534        match props in B: "[?v  φ{G}]"  7535        fact "pos-not-equiv-ne:4"[where F=F and G=G and φ=φ, THEN "→E",
7536                                OF "oth-class-taut:4:h"[THEN "≡E"(2)],
7537                                OF "Disjunction Addition"(2)[THEN "→E"],
7538                                OF "&I", OF A, OF B])+
7539qed
7540
7541subsection‹The Theory of Objects›
7542text‹\label{PLM: 9.11}›
7543
7544AOT_theorem "o-objects-exist:1": x O!x
7545proof(rule RN)
7546  AOT_modally_strict {
7547    AOT_obtain a where (E!a & ¬𝒜[E!]a)
7548      using "∃E"[rotated, OF "qml:4"[axiom_inst, THEN "BF◇"[THEN "→E"]]]
7549      by blast
7550    AOT_hence 1: E!a by (metis "KBasic2:3" "&E"(1) "→E")
7551    AOT_have x [E!]x]a
7552    proof (rule "β←C"(1); "cqt:2[lambda]"?)
7553      AOT_show a using "cqt:2[const_var]"[axiom_inst] by blast
7554    next
7555      AOT_show E!a by (fact 1)
7556    qed
7557    AOT_hence O!a by (rule "=dfI"(2)[OF AOT_ordinary, rotated]) "cqt:2"
7558    AOT_thus x [O!]x by (rule "∃I")
7559  }
7560qed
7561
7562AOT_theorem "o-objects-exist:2": x A!x
7563proof (rule RN)
7564  AOT_modally_strict {
7565    AOT_obtain a where [A!]a
7566      using "A-objects"[axiom_inst] "∃E"[rotated] "&E" by blast
7567    AOT_thus x A!x using "∃I" by blast
7568  }
7569qed
7570
7571AOT_theorem "o-objects-exist:3": ¬x O!x
7572  by (rule RN)
7573     (metis (no_types, opaque_lifting) "∃E" "cqt-orig:1[const_var]"
7574        "≡E"(4) "modus-tollens:1" "o-objects-exist:2" "oa-contingent:2"
7575        "qml:2"[axiom_inst] "reductio-aa:2")
7576
7577AOT_theorem "o-objects-exist:4": ¬x A!x
7578  by (rule RN)
7579     (metis (mono_tags, opaque_lifting) "∃E" "cqt-orig:1[const_var]"
7580        "≡E"(1) "modus-tollens:1" "o-objects-exist:1" "oa-contingent:2"
7581        "qml:2"[axiom_inst] "→E")
7582
7583AOT_theorem "o-objects-exist:5": ¬x E!x
7584proof (rule RN; rule "raa-cor:2")
7585  AOT_modally_strict {
7586    AOT_assume x E!x
7587    moreover AOT_obtain a where abs: A!a
7588      using "o-objects-exist:2"[THEN "qml:2"[axiom_inst, THEN "→E"]]
7589            "∃E"[rotated] by blast
7590    ultimately AOT_have E!a using "∀E" by blast
7591    AOT_hence 1: E!a by (metis "T◇" "→E")
7592    AOT_have y E!y]a
7593    proof (rule "β←C"(1); "cqt:2[lambda]"?)
7594      AOT_show a using "cqt:2[const_var]"[axiom_inst].
7595    next
7596      AOT_show E!a by (fact 1)
7597    qed
7598    AOT_hence O!a
7599      by (rule "=dfI"(2)[OF AOT_ordinary, rotated]) "cqt:2[lambda]"
7600    AOT_hence ¬A!a by (metis "≡E"(1) "oa-contingent:2") 
7601    AOT_thus p & ¬p for p using abs by (metis "raa-cor:3")
7602  }
7603qed
7604
7605AOT_theorem partition: ¬x (O!x & A!x)
7606proof(rule "raa-cor:2")
7607  AOT_assume x (O!x & A!x)
7608  then AOT_obtain a where O!a & A!a
7609    using "∃E"[rotated] by blast
7610  AOT_thus p & ¬p for p
7611    by (metis "&E"(1) "Conjunction Simplification"(2) "≡E"(1)
7612              "modus-tollens:1" "oa-contingent:2" "raa-cor:3")
7613qed
7614
7615AOT_define eq_E :: Π ("'(=E')")
7616  "=E": (=E) =df xy O!x & O!y & F ([F]x  [F]y)]
7617
7618syntax "_AOT_eq_E_infix" :: τ  τ  φ (infixl "=E" 50)
7619translations
7620  "_AOT_eq_E_infix κ κ'" == "CONST AOT_exe (CONST eq_E) (CONST Pair κ κ')"
7621print_translation7622AOT_syntax_print_translations
7623[(const_syntaxAOT_exe, fn ctxt => fn [
7624  Const (const_nameeq_E, _),
7625  Const (const_syntaxPair, _) $ lhs $ rhs
7626] => Const (syntax_const‹_AOT_eq_E_infix›, dummyT) $ lhs $ rhs)]
7627
7628text‹Note: Not explicitly mentioned as theorem in PLM.›
7629AOT_theorem "=E[denotes]": [(=E)]
7630  by (rule "=dfI"(2)[OF "=E"]) "cqt:2[lambda]"+
7631
7632AOT_theorem "=E-simple:1": x =E y  (O!x & O!y & F ([F]x  [F]y))
7633proof -
7634  AOT_have 1: xy [O!]x & [O!]y & F ([F]x  [F]y)] by "cqt:2"
7635  show ?thesis
7636    apply (rule "=dfI"(2)[OF "=E"]; "cqt:2[lambda]"?)
7637    using "beta-C-meta"[THEN "→E", OF 1, unvarify ν1νn, of "(_,_)",
7638                        OF tuple_denotes[THEN "dfI"], OF "&I",
7639                        OF "cqt:2[const_var]"[axiom_inst],
7640                        OF "cqt:2[const_var]"[axiom_inst]]
7641    by fast
7642qed
7643
7644AOT_theorem "=E-simple:2": x =E y  x = y
7645proof (rule "→I")
7646  AOT_assume x =E y
7647  AOT_hence O!x & O!y & F ([F]x  [F]y)
7648    using "=E-simple:1"[THEN "≡E"(1)] by blast
7649  AOT_thus x = y
7650    using "dfI"[OF "identity:1"] "∨I" by blast
7651qed
7652
7653AOT_theorem "id-nec3:1": x =E y  (x =E y)
7654proof (rule "≡I"; rule "→I")
7655  AOT_assume x =E y
7656  AOT_hence O!x & O!y & F ([F]x  [F]y)
7657    using "=E-simple:1" "≡E" by blast
7658  AOT_hence O!x & O!y & F ([F]x  [F]y)
7659    by (metis "S5Basic:6" "&I" "&E"(1) "&E"(2) "≡E"(4)
7660              "oa-facts:1" "raa-cor:3" "vdash-properties:10")
7661  AOT_hence (O!x & O!y & F ([F]x  [F]y))
7662    by (metis "&E"(1) "&E"(2) "≡E"(2) "KBasic:3" "&I")
7663  AOT_thus (x =E y)
7664    using "=E-simple:1"
7665    by (AOT_subst x =E y O!x & O!y & F ([F]x  [F]y)) auto
7666next
7667  AOT_assume (x =E y)
7668  AOT_thus x =E y using "qml:2"[axiom_inst, THEN "→E"] by blast
7669qed
7670
7671AOT_theorem "id-nec3:2": (x =E y)  x =E y
7672  by (meson "RE◇" "S5Basic:2" "id-nec3:1" "≡E"(1,5) "Commutativity of ≡")
7673
7674AOT_theorem "id-nec3:3": (x =E y)  (x =E y)
7675  by (meson "id-nec3:1" "id-nec3:2" "≡E"(5))
7676
7677syntax "_AOT_non_eq_E" :: Π ("'(≠E')")
7678translations
7679  (Π) "(≠E)" == (Π) "(=E)-"
7680syntax "_AOT_non_eq_E_infix" :: τ  τ  φ (infixl "E" 50)
7681translations
7682 "_AOT_non_eq_E_infix κ κ'" ==
7683 "CONST AOT_exe (CONST relation_negation (CONST eq_E)) (CONST Pair κ κ')"
7684print_translation7685AOT_syntax_print_translations
7686[(const_syntaxAOT_exe, fn ctxt => fn [
7687  Const (const_syntaxrelation_negation, _) $ Const (const_nameeq_E, _),
7688  Const (const_syntaxPair, _) $ lhs $ rhs
7689] => Const (syntax_const‹_AOT_non_eq_E_infix›, dummyT) $ lhs $ rhs)]
7690AOT_theorem "thm-neg=E": x E y  ¬(x =E y)
7691proof -
7692  AOT_have θ: x1...x2 ¬(=E)x1...x2] by "cqt:2"
7693  AOT_have x E y  x1...x2 ¬(=E)x1...x2]xy
7694    by (rule "=dfI"(1)[OF "df-relation-negation", OF θ])
7695       (meson "oth-class-taut:3:a")
7696  also AOT_have   ¬(=E)xy
7697    by (safe intro!: "beta-C-meta"[THEN "→E", unvarify ν1νn] "cqt:2"
7698                     tuple_denotes[THEN "dfI"] "&I")
7699  finally show ?thesis.
7700qed
7701
7702AOT_theorem "id-nec4:1": x E y  (x E y)
7703proof -
7704  AOT_have x E y  ¬(x =E y) using "thm-neg=E".
7705  also AOT_have   ¬(x =E y)
7706    by (meson "id-nec3:2" "≡E"(1) "Commutativity of ≡" "oth-class-taut:4:b")
7707  also AOT_have   ¬(x =E y)
7708    by (meson "KBasic2:1" "≡E"(2) "Commutativity of ≡")
7709  also AOT_have   (x E y)
7710    by (AOT_subst (reverse) ¬(x =E y) x E y)
7711       (auto simp: "thm-neg=E" "oth-class-taut:3:a")
7712  finally show ?thesis.
7713qed
7714
7715AOT_theorem "id-nec4:2": (x E y)  (x E y)
7716  by (meson "RE◇" "S5Basic:2" "id-nec4:1" "≡E"(2,5) "Commutativity of ≡")
7717
7718AOT_theorem "id-nec4:3": (x E y)  (x E y)
7719  by (meson "id-nec4:1" "id-nec4:2" "≡E"(5))
7720
7721AOT_theorem "id-act2:1": x =E y  𝒜x =E y
7722  by (meson "Act-Basic:5" "Act-Sub:2" "RA[2]" "id-nec3:2" "≡E"(1,6))
7723AOT_theorem "id-act2:2": x E y  𝒜x E y
7724  by (meson "Act-Basic:5" "Act-Sub:2" "RA[2]" "id-nec4:2" "≡E"(1,6))
7725
7726AOT_theorem "ord=Eequiv:1": O!x  x =E x
7727proof (rule "→I")
7728  AOT_assume 1: O!x
7729  AOT_show x =E x
7730    apply (rule "=dfI"(2)[OF "=E"]) apply "cqt:2[lambda]"
7731    apply (rule "β←C"(1))
7732      apply "cqt:2[lambda]"
7733     apply (simp add: "&I" "cqt:2[const_var]"[axiom_inst] prod_denotesI)
7734    by (simp add: "1" RN "&I" "oth-class-taut:3:a" "universal-cor")
7735qed
7736
7737AOT_theorem "ord=Eequiv:2": x =E y  y =E x
7738proof(rule CP)
7739  AOT_assume 1: x =E y
7740  AOT_hence 2: x = y by (metis "=E-simple:2" "vdash-properties:10") 
7741  AOT_have O!x using 1 by (meson "&E"(1) "=E-simple:1" "≡E"(1))
7742  AOT_hence x =E x using "ord=Eequiv:1" "→E" by blast
7743  AOT_thus y =E x using "rule=E"[rotated, OF 2] by fast
7744qed
7745
7746AOT_theorem "ord=Eequiv:3": (x =E y & y =E z)  x =E z
7747proof (rule CP)
7748  AOT_assume 1: x =E y & y =E z
7749  AOT_hence x = y & y = z
7750    by (metis "&I" "&E"(1) "&E"(2) "=E-simple:2" "vdash-properties:6")
7751  AOT_hence x = z by (metis "id-eq:3" "vdash-properties:6")
7752  moreover AOT_have x =E x
7753    using 1[THEN "&E"(1)] "&E"(1) "=E-simple:1" "≡E"(1)
7754          "ord=Eequiv:1" "→E" by blast
7755  ultimately AOT_show x =E z
7756    using "rule=E" by fast
7757qed
7758
7759AOT_theorem "ord-=E=:1": (O!x  O!y)  (x = y  x =E y)
7760proof(rule CP)
7761  AOT_assume O!x  O!y
7762  moreover {
7763    AOT_assume O!x
7764    AOT_hence O!x by (metis "oa-facts:1" "vdash-properties:10")
7765    moreover {
7766      AOT_modally_strict {
7767        AOT_have O!x  (x = y  x =E y)
7768        proof (rule "→I"; rule "≡I"; rule "→I")
7769          AOT_assume O!x
7770          AOT_hence x =E x by (metis "ord=Eequiv:1" "→E")
7771          moreover AOT_assume x = y
7772          ultimately AOT_show x =E y using "rule=E" by fast
7773        next
7774          AOT_assume x =E y
7775          AOT_thus x = y by (metis "=E-simple:2" "→E")
7776        qed
7777      }
7778      AOT_hence O!x  (x = y  x =E y) by (metis "RM:1")
7779    }
7780    ultimately AOT_have (x = y  x =E y) using "→E" by blast
7781  }
7782  moreover {
7783    AOT_assume O!y
7784    AOT_hence O!y by (metis "oa-facts:1" "vdash-properties:10")
7785    moreover {
7786      AOT_modally_strict {
7787        AOT_have O!y  (x = y  x =E y)
7788        proof (rule "→I"; rule "≡I"; rule "→I")
7789          AOT_assume O!y
7790          AOT_hence y =E y by (metis "ord=Eequiv:1" "→E")
7791          moreover AOT_assume x = y
7792          ultimately AOT_show x =E y using "rule=E" id_sym by fast
7793        next
7794          AOT_assume x =E y
7795          AOT_thus x = y by (metis "=E-simple:2" "→E")
7796        qed
7797      }
7798      AOT_hence O!y  (x = y  x =E y) by (metis "RM:1")
7799    }
7800    ultimately AOT_have (x = y  x =E y) using "→E" by blast
7801  }
7802  ultimately AOT_show (x = y  x =E y) by (metis "∨E"(3) "raa-cor:1")
7803qed
7804
7805AOT_theorem "ord-=E=:2": O!y  x x = y]
7806proof (rule "→I"; rule "safe-ext"[axiom_inst, THEN "→E"]; rule "&I")
7807  AOT_show x x =E y] by "cqt:2[lambda]"
7808next
7809  AOT_assume O!y
7810  AOT_hence 1: (x = y  x =E y) for x
7811    using "ord-=E=:1" "→E" "∨I" by blast
7812  AOT_have (x =E y  x = y) for x
7813    by (AOT_subst x =E y  x = y x = y  x =E y)
7814       (auto simp add: "Commutativity of ≡" 1)
7815  AOT_hence x (x =E y  x = y) by (rule GEN)
7816  AOT_thus x (x =E y  x = y) by (rule BF[THEN "→E"])
7817qed
7818
7819
7820AOT_theorem "ord-=E=:3": xy O!x & O!y & x = y]
7821proof (rule "safe-ext[2]"[axiom_inst, THEN "→E"]; rule "&I")
7822  AOT_show xy O!x & O!y & x =E y] by "cqt:2[lambda]"
7823next
7824  AOT_show xy ([O!]x & [O!]y & x =E y  [O!]x & [O!]y & x = y)
7825  proof (rule RN; rule GEN; rule GEN; rule "≡I"; rule "→I")
7826    AOT_modally_strict {
7827      AOT_show [O!]x & [O!]y & x = y if [O!]x & [O!]y & x =E y for x y
7828        by (metis "&I" "&E"(1) "Conjunction Simplification"(2) "=E-simple:2"
7829                  "modus-tollens:1" "raa-cor:1" that)
7830    }
7831  next
7832    AOT_modally_strict {
7833      AOT_show [O!]x & [O!]y & x =E y if [O!]x & [O!]y & x = y for x y
7834        apply(safe intro!: "&I")
7835          apply (metis that[THEN "&E"(1), THEN "&E"(1)])
7836         apply (metis that[THEN "&E"(1), THEN "&E"(2)])
7837        using "rule=E"[rotated, OF that[THEN "&E"(2)]]
7838              "ord=Eequiv:1"[THEN "→E", OF that[THEN "&E"(1), THEN "&E"(1)]]
7839        by fast
7840    }
7841  qed
7842qed
7843
7844AOT_theorem "ind-nec": F ([F]x  [F]y)  F ([F]x  [F]y)
7845proof(rule "→I")
7846  AOT_assume F ([F]x  [F]y)
7847  moreover AOT_have x F ([F]x  [F]y)] by "cqt:2[lambda]"
7848  ultimately AOT_have x F ([F]x  [F]y)]x  x F ([F]x  [F]y)]y
7849    using "∀E" by blast
7850  moreover AOT_have x F ([F]x  [F]y)]y
7851    apply (rule "β←C"(1))
7852      apply "cqt:2[lambda]"
7853     apply (fact "cqt:2[const_var]"[axiom_inst])
7854    by (simp add: RN GEN "oth-class-taut:3:a")
7855  ultimately AOT_have x F ([F]x  [F]y)]x using "≡E" by blast
7856  AOT_thus F ([F]x  [F]y)
7857    using "β→C"(1) by blast
7858qed
7859
7860AOT_theorem "ord=E:1": (O!x & O!y)  (F ([F]x  [F]y)  x =E y)
7861proof (rule "→I"; rule "→I")
7862  AOT_assume F ([F]x  [F]y)
7863  AOT_hence F ([F]x  [F]y)
7864    using "ind-nec"[THEN "→E"] by blast
7865  moreover AOT_assume O!x & O!y
7866  ultimately AOT_have O!x & O!y & F ([F]x  [F]y)
7867    using "&I" by blast
7868  AOT_thus x =E y using "=E-simple:1"[THEN "≡E"(2)] by blast
7869qed
7870
7871AOT_theorem "ord=E:2": (O!x & O!y)  (F ([F]x  [F]y)  x = y)
7872proof (rule "→I"; rule "→I")
7873  AOT_assume O!x & O!y
7874  moreover AOT_assume F ([F]x  [F]y)
7875  ultimately AOT_have x =E y
7876    using "ord=E:1" "→E" by blast
7877  AOT_thus x = y using "=E-simple:2"[THEN "→E"] by blast
7878qed
7879
7880AOT_theorem "ord=E2:1":
7881  (O!x & O!y)  (x  y  z z =E x]  z z =E y])
7882proof (rule "→I"; rule "≡I"; rule "→I";
7883       rule "dfI"[OF "=-infix"]; rule "raa-cor:2")
7884  AOT_assume 0: O!x & O!y
7885  AOT_assume x  y
7886  AOT_hence 1: ¬(x = y) using "dfE"[OF "=-infix"] by blast
7887  AOT_assume z z =E x] = z z =E y]
7888  moreover AOT_have z z =E x]x
7889    apply (rule "β←C"(1))
7890      apply "cqt:2[lambda]"
7891     apply (fact "cqt:2[const_var]"[axiom_inst])
7892    using "ord=Eequiv:1"[THEN "→E", OF 0[THEN "&E"(1)]].
7893  ultimately AOT_have z z =E y]x using "rule=E" by fast
7894  AOT_hence x =E y using "β→C"(1) by blast
7895  AOT_hence x = y by (metis "=E-simple:2" "vdash-properties:6")
7896  AOT_thus x = y & ¬(x = y) using 1 "&I" by blast
7897next
7898  AOT_assume z z =E x]  z z =E y]
7899  AOT_hence 0: ¬(z z =E x] = z z =E y])
7900    using "dfE"[OF "=-infix"] by blast
7901  AOT_have z z =E x] by "cqt:2[lambda]"
7902  AOT_hence z z =E x] = z z =E x]
7903    by (metis "rule=I:1")
7904  moreover AOT_assume x = y
7905  ultimately AOT_have z z =E x] = z z =E y]
7906    using "rule=E" by fast
7907  AOT_thus z z =E x] = z z =E y] & ¬(z z =E x] = z z =E y])
7908    using 0 "&I" by blast
7909qed
7910
7911AOT_theorem "ord=E2:2":
7912  (O!x & O!y)  (x  y  z z = x]  z z = y])
7913proof (rule "→I"; rule "≡I"; rule "→I";
7914       rule "dfI"[OF "=-infix"]; rule "raa-cor:2")
7915  AOT_assume 0: O!x & O!y
7916  AOT_assume x  y
7917  AOT_hence 1: ¬(x = y) using "dfE"[OF "=-infix"] by blast
7918  AOT_assume z z = x] = z z = y]
7919  moreover AOT_have z z = x]x
7920    apply (rule "β←C"(1))
7921    apply (fact "ord-=E=:2"[THEN "→E", OF 0[THEN "&E"(1)]])
7922     apply (fact "cqt:2[const_var]"[axiom_inst])
7923    by (simp add: "id-eq:1")
7924  ultimately AOT_have z z = y]x using "rule=E" by fast
7925  AOT_hence x = y using "β→C"(1) by blast
7926  AOT_thus x = y & ¬(x = y) using 1 "&I" by blast
7927next
7928  AOT_assume 0: O!x & O!y
7929  AOT_assume z z = x]  z z = y]
7930  AOT_hence 1: ¬(z z = x] = z z = y])
7931    using "dfE"[OF "=-infix"] by blast
7932  AOT_have z z = x]
7933    by (fact "ord-=E=:2"[THEN "→E", OF 0[THEN "&E"(1)]])
7934  AOT_hence z z = x] = z z = x]
7935    by (metis "rule=I:1")
7936  moreover AOT_assume x = y
7937  ultimately AOT_have z z = x] = z z = y]
7938    using "rule=E" by fast
7939  AOT_thus z z = x] = z z = y] & ¬(z z = x] = z z = y])
7940    using 1 "&I" by blast
7941qed
7942
7943AOT_theorem ordnecfail: O!x  ¬F x[F]
7944  by (meson "RM:1" "→I" nocoder[axiom_inst] "oa-facts:1" "→E")
7945
7946AOT_theorem "ab-obey:1": (A!x & A!y)  (F (x[F]  y[F])  x = y)
7947proof (rule "→I"; rule "→I")
7948  AOT_assume 1: A!x & A!y
7949  AOT_assume F (x[F]  y[F])
7950  AOT_hence x[F]  y[F] for F using "∀E" by blast
7951  AOT_hence (x[F]  y[F]) for F by (metis "en-eq:6[1]" "≡E"(1))
7952  AOT_hence F (x[F]  y[F]) by (rule GEN)
7953  AOT_hence F (x[F]  y[F]) by (rule BF[THEN "→E"])
7954  AOT_thus x = y
7955    using "dfI"[OF "identity:1", OF "∨I"(2)] 1 "&I" by blast
7956qed
7957
7958AOT_theorem "ab-obey:2":
7959  (F (x[F] & ¬y[F])  F (y[F] & ¬x[F]))  x  y
7960proof (rule "→I"; rule "dfI"[OF "=-infix"]; rule "raa-cor:2")
7961  AOT_assume 1: x = y
7962  AOT_assume F (x[F] & ¬y[F])  F (y[F] & ¬x[F])
7963  moreover {
7964    AOT_assume F (x[F] & ¬y[F])
7965    then AOT_obtain F where x[F] & ¬y[F]
7966      using "∃E"[rotated] by blast
7967    moreover AOT_have y[F]
7968      using calculation[THEN "&E"(1)] 1 "rule=E" by fast
7969    ultimately AOT_have p & ¬p for p
7970      by (metis "Conjunction Simplification"(2) "modus-tollens:2" "raa-cor:3")
7971  }
7972  moreover {
7973    AOT_assume F (y[F] & ¬x[F])
7974    then AOT_obtain F where y[F] & ¬x[F]
7975      using "∃E"[rotated] by blast
7976    moreover AOT_have ¬y[F]
7977      using calculation[THEN "&E"(2)] 1 "rule=E" by fast
7978    ultimately AOT_have p & ¬p for p
7979      by (metis "Conjunction Simplification"(1) "modus-tollens:1" "raa-cor:3")
7980  }
7981  ultimately AOT_show p & ¬p for p
7982    by (metis "∨E"(3) "raa-cor:1")
7983qed
7984
7985AOT_theorem "encoders-are-abstract": F x[F]  A!x
7986  by (meson "deduction-theorem" "≡E"(2) "modus-tollens:2" nocoder
7987            "oa-contingent:3" "vdash-properties:1[2]")
7988
7989AOT_theorem "denote=:1": Hx x[H]
7990  by (rule GEN; rule "existence:2[1]"[THEN "dfE"]; "cqt:2")
7991
7992AOT_theorem "denote=:2": Gx1...∃xn x1...xn[H]
7993  by (rule GEN; rule "existence:2"[THEN "dfE"]; "cqt:2")
7994
7995AOT_theorem "denote=:2[2]": Gx1x2 x1x2[H]
7996  by (rule GEN; rule "existence:2[2]"[THEN "dfE"]; "cqt:2")
7997
7998AOT_theorem "denote=:2[3]": Gx1x2x3 x1x2x3[H]
7999  by (rule GEN; rule "existence:2[3]"[THEN "dfE"]; "cqt:2")
8000
8001AOT_theorem "denote=:2[4]": Gx1x2x3x4 x1x2x3x4[H]
8002  by (rule GEN; rule "existence:2[4]"[THEN "dfE"]; "cqt:2")
8003
8004AOT_theorem "denote=:3": x x[Π]  H (H = Π)
8005  using "existence:2[1]" "free-thms:1" "≡E"(2,5)
8006        "Commutativity of ≡" "≡Df" by blast
8007
8008AOT_theorem "denote=:4": (x1...∃xn x1...xn[Π])  H (H = Π)
8009  using "existence:2" "free-thms:1" "≡E"(6) "≡Df" by blast
8010
8011AOT_theorem "denote=:4[2]": (x1x2 x1x2[Π])  H (H = Π)
8012  using "existence:2[2]" "free-thms:1" "≡E"(6) "≡Df" by blast
8013
8014AOT_theorem "denote=:4[3]": (x1x2x3 x1x2x3[Π])  H (H = Π)
8015  using "existence:2[3]" "free-thms:1" "≡E"(6) "≡Df" by blast
8016
8017AOT_theorem "denote=:4[4]": (x1x2x3x4 x1x2x3x4[Π])  H (H = Π)
8018  using "existence:2[4]" "free-thms:1" "≡E"(6) "≡Df" by blast
8019
8020AOT_theorem "A-objects!": ∃!x (A!x & F (x[F]  φ{F}))
8021proof (rule "uniqueness:1"[THEN "dfI"])
8022  AOT_obtain a where a_prop: A!a & F (a[F]  φ{F})
8023    using "A-objects"[axiom_inst] "∃E"[rotated] by blast
8024  AOT_have (A!β & F (β[F]  φ{F}))  β = a for β
8025  proof (rule "→I")
8026    AOT_assume β_prop: [A!]β & F (β[F]  φ{F})
8027    AOT_hence β[F]  φ{F} for F
8028      using "∀E" "&E" by blast
8029    AOT_hence β[F]  a[F] for F
8030      using a_prop[THEN "&E"(2)] "∀E" "≡E"(2,5)
8031            "Commutativity of ≡" by fast
8032    AOT_hence F (β[F]  a[F]) by (rule GEN)
8033    AOT_thus β = a
8034      using "ab-obey:1"[THEN "→E",
8035                OF "&I"[OF β_prop[THEN "&E"(1)], OF a_prop[THEN "&E"(1)]],
8036                THEN "→E"] by blast
8037  qed
8038  AOT_hence β ((A!β & F (β[F]  φ{F}))  β = a) by (rule GEN)
8039  AOT_thus α ([A!]α & F (α[F]  φ{F}) &
8040                β ([A!]β & F (β[F]  φ{F})  β = α))
8041    using "∃I" using a_prop "&I" by fast
8042qed
8043
8044AOT_theorem "obj-oth:1": ∃!x (A!x & F (x[F]  [F]y))
8045  using "A-objects!" by fast
8046
8047AOT_theorem "obj-oth:2": ∃!x (A!x & F (x[F]  [F]y & [F]z))
8048  using "A-objects!" by fast
8049
8050AOT_theorem "obj-oth:3": ∃!x (A!x & F (x[F]  [F]y  [F]z))
8051  using "A-objects!" by fast
8052
8053AOT_theorem "obj-oth:4": ∃!x (A!x & F (x[F]  [F]y))
8054  using "A-objects!" by fast
8055
8056AOT_theorem "obj-oth:5": ∃!x (A!x & F (x[F]  F = G))
8057  using "A-objects!" by fast
8058
8059AOT_theorem "obj-oth:6": ∃!x (A!x & F (x[F]  y([G]y  [F]y)))
8060  using "A-objects!" by fast
8061
8062AOT_theorem "A-descriptions": ιx (A!x & F (x[F]  φ{F}))
8063  by (rule "A-Exists:2"[THEN "≡E"(2)]; rule "RA[2]"; rule "A-objects!")
8064
8065AOT_act_theorem "thm-can-terms2":
8066  y = ιx(A!x & F (x[F]  φ{F}))  (A!y & F (y[F]  φ{F}))
8067  using "y-in:2" by blast
8068
8069AOT_theorem "can-ab2": y = ιx(A!x & F (x[F]  φ{F}))   A!y
8070proof(rule "→I")
8071  AOT_assume y = ιx(A!x & F (x[F]  φ{F}))
8072  AOT_hence 𝒜(A!y & F (y[F]  φ{F}))
8073    using "actual-desc:2"[THEN "→E"] by blast
8074  AOT_hence 𝒜A!y by (metis "Act-Basic:2" "&E"(1) "≡E"(1))
8075  AOT_thus A!y by (metis "≡E"(2) "oa-facts:8")
8076qed
8077
8078AOT_act_theorem "desc-encode:1": ιx(A!x & F (x[F]  φ{F}))[F]  φ{F}
8079proof -
8080  AOT_have ιx(A!x & F (x[F]  φ{F}))
8081    by (simp add: "A-descriptions")
8082  AOT_hence A!ιx(A!x & F (x[F]  φ{F})) &
8083             F(ιx(A!x & F (x[F]  φ{F}))[F]  φ{F})
8084    using "y-in:3"[THEN "→E"] by blast
8085  AOT_thus ιx(A!x & F (x[F]  φ{F}))[F]  φ{F}
8086    using "&E" "∀E" by blast
8087qed
8088
8089AOT_act_theorem "desc-encode:2": ιx(A!x & F (x[F]  φ{F}))[G]  φ{G}
8090  using "desc-encode:1".
8091
8092AOT_theorem "desc-nec-encode:1":
8093  ιx (A!x & F (x[F]  φ{F}))[F]  𝒜φ{F}
8094proof -
8095  AOT_have 0: ιx(A!x & F (x[F]  φ{F}))
8096    by (simp add: "A-descriptions")
8097  AOT_hence 𝒜(A!ιx(A!x & F (x[F]  φ{F})) &
8098             F(ιx(A!x & F (x[F]  φ{F}))[F]  φ{F}))
8099    using "actual-desc:4"[THEN "→E"] by blast
8100  AOT_hence 𝒜F (ιx(A!x & F (x[F]  φ{F}))[F]  φ{F})
8101    using "Act-Basic:2" "&E"(2) "≡E"(1) by blast
8102  AOT_hence F 𝒜(ιx(A!x & F (x[F]  φ{F}))[F]  φ{F})
8103    using "≡E"(1) "logic-actual-nec:3" "vdash-properties:1[2]" by blast
8104  AOT_hence 𝒜(ιx(A!x & F (x[F]  φ{F}))[F]  φ{F})
8105    using "∀E" by blast
8106  AOT_hence 𝒜ιx(A!x & F (x[F]  φ{F}))[F]  𝒜φ{F}
8107    using "Act-Basic:5" "≡E"(1) by blast
8108  AOT_thus ιx(A!x & F (x[F]  φ{F}))[F]  𝒜φ{F}
8109    using "en-eq:10[1]"[unvarify x1, OF 0] "≡E"(6) by blast
8110qed
8111
8112AOT_theorem "desc-nec-encode:2":
8113  ιx (A!x & F (x[F]  φ{F}))[G]  𝒜φ{G}
8114  using "desc-nec-encode:1".
8115
8116AOT_theorem "Box-desc-encode:1": φ{G}  ιx(A!x & F (x[F]  φ{G}))[G]
8117  by (rule "→I"; rule "desc-nec-encode:2"[THEN "≡E"(2)])
8118     (meson "nec-imp-act" "vdash-properties:10")
8119
8120AOT_theorem "Box-desc-encode:2":
8121φ{G}  (ιx(A!x & F (x[F]  φ{G}))[G]  φ{G})
8122proof(rule CP)
8123  AOT_assume φ{G}
8124  AOT_hence φ{G} by (metis "S5Basic:6" "≡E"(1))
8125  moreover AOT_have φ{G}  (ιx(A!x & F (x[F]  φ{G}))[G]  φ{G})
8126  proof (rule RM; rule "→I")
8127    AOT_modally_strict {
8128      AOT_assume 1: φ{G}
8129      AOT_hence ιx(A!x & F (x[F]  φ{G}))[G]
8130        using "Box-desc-encode:1" "→E" by blast
8131      moreover AOT_have φ{G}
8132        using 1 by (meson "qml:2"[axiom_inst] "→E")
8133      ultimately AOT_show ιx(A!x & F (x[F]  φ{G}))[G]  φ{G}
8134        using "→I" "≡I" by simp
8135    }
8136  qed
8137  ultimately AOT_show (ιx(A!x & F (x[F]  φ{G}))[G]  φ{G})
8138    using "→E" by blast
8139qed
8140
8141definition rigid_condition where
8142  rigid_condition φ  v . [v  α (φ{α}  φ{α})]
8143syntax rigid_condition :: id_position  AOT_prop ("RIGID'_CONDITION'(_')")
8144
8145AOT_theorem "strict-can:1[E]":
8146  assumes RIGID_CONDITION(φ)
8147  shows α (φ{α}  φ{α})
8148  using assms[unfolded rigid_condition_def] by auto
8149
8150AOT_theorem "strict-can:1[I]":
8151  assumes  α (φ{α}  φ{α})
8152  shows RIGID_CONDITION(φ)
8153  using assms rigid_condition_def by auto
8154
8155AOT_theorem "box-phi-a:1":
8156  assumes RIGID_CONDITION(φ)
8157  shows (A!x  & F (x[F]  φ{F}))  (A!x & F (x[F]  φ{F}))
8158proof (rule "→I")
8159  AOT_assume a: A!x & F (x[F]  φ{F})
8160  AOT_hence b: A!x
8161    by (metis "Conjunction Simplification"(1) "oa-facts:2" "→E")
8162  AOT_have x[F]  φ{F} for F
8163    using a[THEN "&E"(2)] "∀E" by blast
8164  moreover AOT_have (x[F]  x[F]) for F
8165    by (meson "pre-en-eq:1[1]" RN)
8166  moreover AOT_have (φ{F}  φ{F}) for F
8167    using RN "strict-can:1[E]"[OF assms] "∀E" by blast
8168  ultimately AOT_have (x[F]  φ{F}) for F
8169    using "sc-eq-box-box:5" "qml:2"[axiom_inst, THEN "→E"] "→E" "&I" by metis
8170  AOT_hence F (x[F]  φ{F}) by (rule GEN)
8171  AOT_hence F (x[F]  φ{F}) by (rule BF[THEN "→E"])
8172  AOT_thus ([A!]x & F (x[F]  φ{F}))
8173    using b "KBasic:3" "≡S"(1) "≡E"(2) by blast
8174qed
8175
8176AOT_theorem "box-phi-a:2":
8177  assumes RIGID_CONDITION(φ)
8178  shows y = ιx(A!x & F (x[F]  φ{F}))  (A!y & F (y[F]  φ{F}))
8179proof(rule "→I")
8180  AOT_assume y = ιx(A!x & F (x[F]  φ{F}))
8181  AOT_hence 𝒜(A!y & F (y[F]  φ{F}))
8182    using "actual-desc:2"[THEN "→E"] by fast
8183  AOT_hence abs: 𝒜A!y and 𝒜F (y[F]  φ{F})
8184    using "Act-Basic:2" "&E" "≡E"(1) by blast+
8185  AOT_hence F 𝒜(y[F]  φ{F})
8186    by (metis "≡E"(1) "logic-actual-nec:3" "vdash-properties:1[2]")
8187  AOT_hence 𝒜(y[F]  φ{F}) for F
8188    using "∀E" by blast
8189  AOT_hence 𝒜y[F]  𝒜φ{F} for F
8190    by (metis "Act-Basic:5" "≡E"(1)) 
8191  AOT_hence y[F]  φ{F} for F
8192    using "sc-eq-fur:2"[THEN "→E",
8193            OF "strict-can:1[E]"[OF assms,
8194                THEN "∀E"(2)[where β=F], THEN RN]]
8195    by (metis "en-eq:10[1]" "≡E"(6))
8196  AOT_hence F (y[F]  φ{F}) by (rule GEN)
8197  AOT_thus [A!]y & F (y[F]  φ{F})
8198    using abs "&I" "≡E"(2) "oa-facts:8" by blast
8199qed
8200
8201AOT_theorem "box-phi-a:3":
8202  assumes RIGID_CONDITION(φ)
8203  shows ιx(A!x & F (x[F]  φ{F}))[F]  φ{F}
8204  using "desc-nec-encode:2"
8205    "sc-eq-fur:2"[THEN "→E",
8206        OF "strict-can:1[E]"[OF assms,
8207          THEN "∀E"(2)[where β=F], THEN RN]]
8208    "≡E"(5) by blast
8209
8210AOT_define Null :: τ  φ ("Null'(_')") 
8211  "df-null-uni:1": Null(x) df A!x & ¬F x[F]
8212
8213AOT_define Universal :: τ  φ ("Universal'(_')")
8214  "df-null-uni:2": Universal(x) df A!x & F x[F]
8215
8216AOT_theorem "null-uni-uniq:1": ∃!x Null(x)
8217proof (rule "uniqueness:1"[THEN "dfI"])
8218  AOT_obtain a where a_prop: A!a & F (a[F]  ¬(F = F))
8219    using "A-objects"[axiom_inst] "∃E"[rotated] by fast
8220  AOT_have a_null: ¬a[F] for F
8221  proof (rule "raa-cor:2")
8222    AOT_assume a[F]
8223    AOT_hence ¬(F = F) using a_prop[THEN "&E"(2)] "∀E" "≡E" by blast
8224    AOT_hence F = F & ¬(F = F) by (metis "id-eq:1" "raa-cor:3")
8225    AOT_thus p & ¬p for p  by (metis "raa-cor:1")
8226  qed
8227  AOT_have Null(a) & β (Null(β)  β = a)
8228  proof (rule "&I")
8229    AOT_have ¬F a[F]
8230      using a_null by (metis "instantiation" "reductio-aa:1")
8231    AOT_thus Null(a)
8232      using "df-null-uni:1"[THEN "dfI"] a_prop[THEN "&E"(1)] "&I" by metis
8233  next
8234    AOT_show β (Null(β)  β = a)
8235    proof (rule GEN; rule "→I")
8236      fix β
8237      AOT_assume a: Null(β)
8238      AOT_hence ¬F β[F]
8239        using "df-null-uni:1"[THEN "dfE"] "&E" by blast
8240      AOT_hence β_null: ¬β[F] for F
8241        by (metis "existential:2[const_var]" "reductio-aa:1")
8242      AOT_have F (β[F]  a[F])
8243        apply (rule GEN; rule "≡I"; rule CP)
8244        using "raa-cor:3" β_null a_null by blast+
8245      moreover AOT_have A!β
8246        using a "df-null-uni:1"[THEN "dfE"] "&E" by blast
8247      ultimately AOT_show β = a
8248        using a_prop[THEN "&E"(1)] "ab-obey:1"[THEN "→E", THEN "→E"]
8249              "&I" by blast
8250    qed
8251  qed
8252  AOT_thus α (Null(α) & β (Null(β)  β = α))
8253    using "∃I"(2) by fast
8254qed
8255
8256AOT_theorem "null-uni-uniq:2": ∃!x Universal(x)
8257proof (rule "uniqueness:1"[THEN "dfI"])
8258  AOT_obtain a where a_prop: A!a & F (a[F]  F = F)
8259    using "A-objects"[axiom_inst] "∃E"[rotated] by fast
8260  AOT_hence aF: a[F] for F using "&E" "∀E" "≡E" "id-eq:1" by fast
8261  AOT_hence Universal(a)
8262    using "df-null-uni:2"[THEN "dfI"] "&I" a_prop[THEN "&E"(1)] GEN by blast
8263  moreover AOT_have β (Universal(β)  β = a)
8264  proof (rule GEN; rule "→I")
8265    fix β
8266    AOT_assume Universal(β)
8267    AOT_hence abs_β: A!β and β[F] for F
8268      using "df-null-uni:2"[THEN "dfE"] "&E" "∀E" by blast+
8269    AOT_hence β[F]  a[F] for F
8270      using aF by (metis "deduction-theorem" "≡I")
8271    AOT_hence F (β[F]  a[F]) by (rule GEN)
8272    AOT_thus β = a
8273      using a_prop[THEN "&E"(1)] "ab-obey:1"[THEN "→E", THEN "→E"]
8274            "&I" abs_β by blast
8275  qed
8276  ultimately AOT_show α (Universal(α) & β (Universal(β)  β = α))
8277    using "&I" "∃I" by fast
8278qed
8279
8280AOT_theorem "null-uni-uniq:3": ιx Null(x)
8281  using "A-Exists:2" "RA[2]" "≡E"(2) "null-uni-uniq:1" by blast
8282
8283AOT_theorem "null-uni-uniq:4": ιx Universal(x)
8284  using "A-Exists:2" "RA[2]" "≡E"(2) "null-uni-uniq:2" by blast
8285
8286AOT_define Null_object :: κs (a)
8287  "df-null-uni-terms:1": a =df ιx Null(x)
8288
8289AOT_define Universal_object :: κs (aV)
8290  "df-null-uni-terms:2": aV =df ιx Universal(x)
8291
8292AOT_theorem "null-uni-facts:1": Null(x)  Null(x)
8293proof (rule "→I")
8294  AOT_assume Null(x)
8295  AOT_hence x_abs: A!x and x_null: ¬F x[F]
8296    using "df-null-uni:1"[THEN "dfE"] "&E" by blast+
8297  AOT_have ¬x[F] for F using x_null
8298    using "existential:2[const_var]" "reductio-aa:1"
8299    by metis
8300  AOT_hence ¬x[F] for F by (metis "en-eq:7[1]" "≡E"(1))
8301  AOT_hence F ¬x[F] by (rule GEN)
8302  AOT_hence F ¬x[F] by (rule BF[THEN "→E"])
8303  moreover AOT_have F ¬x[F]  ¬F x[F]
8304    apply (rule RM)
8305    by (metis (full_types) "instantiation" "cqt:2[const_var]"[axiom_inst]
8306                           "→I" "reductio-aa:1" "rule-ui:1")
8307  ultimately AOT_have ¬F x[F]
8308    by (metis "→E")
8309  moreover AOT_have A!x using x_abs
8310    using "oa-facts:2" "vdash-properties:10" by blast
8311  ultimately AOT_have r: (A!x & ¬F x[F])
8312    by (metis "KBasic:3" "&I" "≡E"(3) "raa-cor:3")
8313  AOT_show Null(x)
8314    by (AOT_subst Null(x) A!x & ¬F x[F])
8315       (auto simp: "df-null-uni:1" "≡Df" r)
8316qed  
8317
8318AOT_theorem "null-uni-facts:2": Universal(x)  Universal(x)
8319proof (rule "→I")
8320  AOT_assume Universal(x)
8321  AOT_hence x_abs: A!x and x_univ: F x[F]
8322    using "df-null-uni:2"[THEN "dfE"] "&E" by blast+
8323  AOT_have x[F] for F using x_univ "∀E" by blast
8324  AOT_hence x[F] for F by (metis "en-eq:2[1]" "≡E"(1))
8325  AOT_hence F x[F] by (rule GEN)
8326  AOT_hence F x[F] by (rule BF[THEN "→E"])
8327  moreover AOT_have A!x using x_abs
8328    using "oa-facts:2" "vdash-properties:10" by blast
8329  ultimately AOT_have r: (A!x & F x[F])
8330    by (metis "KBasic:3" "&I" "≡E"(3) "raa-cor:3")
8331  AOT_show Universal(x)
8332    by (AOT_subst Universal(x) A!x & F x[F])
8333       (auto simp add: "df-null-uni:2" "≡Df" r)
8334qed
8335
8336AOT_theorem "null-uni-facts:3": Null(a)
8337  apply (rule "=dfI"(2)[OF "df-null-uni-terms:1"])
8338   apply (simp add: "null-uni-uniq:3")
8339  using "actual-desc:4"[THEN "→E", OF "null-uni-uniq:3"]
8340    "sc-eq-fur:2"[THEN "→E",
8341        OF "null-uni-facts:1"[unvarify x, THEN RN, OF "null-uni-uniq:3"],
8342        THEN "≡E"(1)]
8343  by blast
8344
8345AOT_theorem "null-uni-facts:4": Universal(aV)
8346  apply (rule "=dfI"(2)[OF "df-null-uni-terms:2"])
8347   apply (simp add: "null-uni-uniq:4")
8348  using "actual-desc:4"[THEN "→E", OF "null-uni-uniq:4"]
8349    "sc-eq-fur:2"[THEN "→E",
8350        OF "null-uni-facts:2"[unvarify x, THEN RN, OF "null-uni-uniq:4"],
8351        THEN "≡E"(1)]
8352  by blast
8353
8354AOT_theorem "null-uni-facts:5": a  aV
8355proof (rule "=dfI"(2)[OF "df-null-uni-terms:1", OF "null-uni-uniq:3"];
8356    rule "=dfI"(2)[OF "df-null-uni-terms:2", OF "null-uni-uniq:4"];
8357    rule "dfI"[OF "=-infix"];
8358    rule "raa-cor:2")
8359  AOT_obtain x where nullx: Null(x)
8360    by (metis "instantiation" "df-null-uni-terms:1" "existential:1"
8361              "null-uni-facts:3" "null-uni-uniq:3" "rule-id-df:2:b[zero]")
8362  AOT_hence act_null: 𝒜Null(x)
8363    by (metis "nec-imp-act" "null-uni-facts:1" "→E")
8364  AOT_assume ιx Null(x) = ιx Universal(x)
8365  AOT_hence 𝒜x(Null(x)  Universal(x))
8366    using "actual-desc:5"[THEN "→E"] by blast
8367  AOT_hence x 𝒜(Null(x)  Universal(x))
8368    by (metis "≡E"(1) "logic-actual-nec:3" "vdash-properties:1[2]")
8369  AOT_hence 𝒜Null(x)  𝒜Universal(x)
8370    using "Act-Basic:5" "≡E"(1) "rule-ui:3" by blast
8371  AOT_hence 𝒜Universal(x) using act_null "≡E" by blast
8372  AOT_hence Universal(x)
8373    by (metis RN "≡E"(1) "null-uni-facts:2" "sc-eq-fur:2" "→E")
8374  AOT_hence F x[F] using "dfE"[OF "df-null-uni:2"] "&E" by metis
8375  moreover AOT_have ¬F x[F]
8376    using nullx "dfE"[OF "df-null-uni:1"] "&E" by metis
8377  ultimately AOT_show p & ¬p for p
8378    by (metis "cqt-further:1" "raa-cor:3" "→E")
8379qed
8380
8381AOT_theorem "null-uni-facts:6": a = ιx(A!x & F (x[F]  F  F))
8382proof (rule "ab-obey:1"[unvarify x y, THEN "→E", THEN "→E"])
8383  AOT_show ιx([A!]x & F (x[F]  F  F))
8384    by (simp add: "A-descriptions")
8385next
8386  AOT_show a
8387    by (rule "=dfI"(2)[OF "df-null-uni-terms:1", OF "null-uni-uniq:3"])
8388       (simp add: "null-uni-uniq:3")
8389next
8390  AOT_have ιx([A!]x & F (x[F]  F  F))
8391    by (simp add: "A-descriptions")
8392  AOT_hence 1: ιx([A!]x & F (x[F]  F  F)) = ιx([A!]x & F (x[F]  F  F))
8393    using "rule=I:1" by blast
8394  AOT_show [A!]a & [A!]ιx([A!]x & F (x[F]  F  F))
8395    apply (rule "=dfI"(2)[OF "df-null-uni-terms:1", OF "null-uni-uniq:3"];
8396           rule "&I")
8397     apply (meson "dfE" "Conjunction Simplification"(1)
8398                  "df-null-uni:1" "df-null-uni-terms:1" "null-uni-facts:3"
8399                  "null-uni-uniq:3" "rule-id-df:2:a[zero]" "→E")
8400    using "can-ab2"[unvarify y, OF "A-descriptions", THEN "→E", OF 1].
8401next
8402  AOT_show F (a[F]  ιx([A!]x & F (x[F]  F  F))[F])
8403  proof (rule GEN)
8404    fix F
8405    AOT_have ¬a[F]
8406      by (rule "=dfI"(2)[OF "df-null-uni-terms:1", OF "null-uni-uniq:3"])
8407         (metis (no_types, lifting) "dfE" "&E"(2) "∨I"(2) "∨E"(3) "∃I"(2)
8408                "df-null-uni:1" "df-null-uni-terms:1" "null-uni-facts:3"
8409                "raa-cor:2" "rule-id-df:2:a[zero]"
8410                "russell-axiom[enc,1].ψ_denotes_asm")
8411    moreover AOT_have ¬ιx([A!]x & F (x[F]  F  F))[F]
8412    proof(rule "raa-cor:2")
8413      AOT_assume 0: ιx([A!]x & F (x[F]  F  F))[F]
8414      AOT_hence 𝒜(F  F)
8415        using "desc-nec-encode:2"[THEN "≡E"(1), OF 0] by blast
8416      moreover AOT_have ¬𝒜(F  F)
8417        using "dfE" "id-act:2" "id-eq:1" "≡E"(2)
8418              "=-infix" "raa-cor:3" by blast
8419      ultimately AOT_show 𝒜(F  F) & ¬𝒜(F  F) by (rule "&I")
8420    qed
8421    ultimately AOT_show a[F]  ιx([A!]x & F (x[F]  F  F))[F]
8422      using "deduction-theorem" "≡I" "raa-cor:4" by blast
8423  qed
8424qed
8425
8426AOT_theorem "null-uni-facts:7": aV = ιx(A!x & F (x[F]  F = F))
8427proof (rule "ab-obey:1"[unvarify x y, THEN "→E", THEN "→E"])
8428  AOT_show ιx([A!]x & F (x[F]  F = F))
8429    by (simp add: "A-descriptions")
8430next
8431  AOT_show aV
8432    by (rule "=dfI"(2)[OF "df-null-uni-terms:2", OF "null-uni-uniq:4"])
8433       (simp add: "null-uni-uniq:4")
8434next
8435  AOT_have ιx([A!]x & F (x[F]  F = F))
8436    by (simp add: "A-descriptions")
8437  AOT_hence 1: ιx([A!]x & F (x[F]  F = F)) = ιx([A!]x & F (x[F]  F = F))
8438    using "rule=I:1" by blast
8439  AOT_show [A!]aV & [A!]ιx([A!]x & F (x[F]  F = F))
8440    apply (rule "=dfI"(2)[OF "df-null-uni-terms:2", OF "null-uni-uniq:4"];
8441           rule "&I")
8442     apply (meson "dfE" "Conjunction Simplification"(1) "df-null-uni:2"
8443                  "df-null-uni-terms:2" "null-uni-facts:4" "null-uni-uniq:4"
8444                  "rule-id-df:2:a[zero]" "→E")
8445    using "can-ab2"[unvarify y, OF "A-descriptions", THEN "→E", OF 1].
8446next
8447  AOT_show F (aV[F]  ιx([A!]x & F (x[F]  F = F))[F])
8448  proof (rule GEN)
8449    fix F
8450    AOT_have aV[F]
8451      apply (rule "=dfI"(2)[OF "df-null-uni-terms:2", OF "null-uni-uniq:4"])
8452      using "dfE" "&E"(2) "df-null-uni:2" "df-null-uni-terms:2"
8453            "null-uni-facts:4" "null-uni-uniq:4" "rule-id-df:2:a[zero]"
8454            "rule-ui:3" by blast
8455    moreover AOT_have ιx([A!]x & F (x[F]  F = F))[F]
8456      using "RA[2]" "desc-nec-encode:2" "id-eq:1" "≡E"(2) by fastforce
8457    ultimately AOT_show aV[F]  ιx([A!]x & F (x[F]  F = F))[F]
8458      using "deduction-theorem" "≡I" by simp
8459  qed
8460qed
8461
8462AOT_theorem "aclassical:1":
8463Rxy(A!x & A!y & x  y & z [R]zx] = z [R]zy])
8464proof(rule GEN)
8465  fix R
8466  AOT_obtain a where a_prop:
8467    A!a & F (a[F]  y(A!y & F = z [R]zy] & ¬y[F]))
8468    using "A-objects"[axiom_inst] "∃E"[rotated] by fast
8469  AOT_have a_enc: az [R]za]
8470  proof (rule "raa-cor:1")
8471    AOT_assume 0: ¬az [R]za]
8472    AOT_hence ¬y(A!y & z [R]za] = z [R]zy] & ¬yz [R]za])
8473      by (rule a_prop[THEN "&E"(2), THEN "∀E"(1)[where τ="«z [R]za]»"],
8474                THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
8475                THEN "≡E"(1), rotated])
8476         "cqt:2[lambda]"
8477    AOT_hence y ¬(A!y & z [R]za] = z [R]zy] & ¬yz [R]za])
8478      using "cqt-further:4" "vdash-properties:10" by blast
8479    AOT_hence ¬(A!a & z [R]za] = z [R]za] & ¬az [R]za])
8480      using "∀E" by blast
8481    AOT_hence (A!a & z [R]za] = z [R]za])  az [R]za]
8482      by (metis "&I" "deduction-theorem" "raa-cor:3")
8483    moreover AOT_have z [R]za] = z [R]za]
8484      by (rule "=I") "cqt:2[lambda]"
8485    ultimately AOT_have az [R]za]
8486      using a_prop[THEN "&E"(1)] "→E" "&I" by blast
8487    AOT_thus az [R]za] & ¬az [R]za]
8488      using 0 "&I" by blast
8489  qed
8490  AOT_hence y(A!y & z [R]za] = z [R]zy] & ¬yz [R]za])
8491    by (rule a_prop[THEN "&E"(2), THEN "∀E"(1), THEN "≡E"(1), rotated])
8492       "cqt:2"
8493  then AOT_obtain b where b_prop:
8494    A!b & z [R]za] = z [R]zb] & ¬bz [R]za]
8495    using "∃E"[rotated] by blast
8496  AOT_have a  b
8497    apply (rule "dfI"[OF "=-infix"])
8498    using a_enc b_prop[THEN "&E"(2)]
8499    using "¬¬I" "rule=E" id_sym "≡E"(4) "oth-class-taut:3:a"
8500          "raa-cor:3" "reductio-aa:1" by fast
8501  AOT_hence A!a & A!b & a  b & z [R]za] = z [R]zb]
8502    using b_prop "&E" a_prop "&I" by meson
8503  AOT_hence y (A!a & A!y & a  y & z [R]za] = z [R]zy]) by (rule "∃I")
8504  AOT_thus xy (A!x & A!y & x  y & z [R]zx] = z [R]zy]) by (rule "∃I")
8505qed
8506
8507AOT_theorem "aclassical:2":
8508  Rxy(A!x & A!y & x  y & z [R]xz] = z [R]yz])
8509proof(rule GEN)
8510  fix R
8511  AOT_obtain a where a_prop:
8512    A!a & F (a[F]  y(A!y & F = z [R]yz] & ¬y[F]))
8513    using "A-objects"[axiom_inst] "∃E"[rotated] by fast
8514  AOT_have a_enc: az [R]az]
8515  proof (rule "raa-cor:1")
8516    AOT_assume 0: ¬az [R]az]
8517    AOT_hence ¬y(A!y & z [R]az] = z [R]yz] & ¬yz [R]az])
8518      by (rule a_prop[THEN "&E"(2), THEN "∀E"(1)[where τ="«z [R]az]»"],
8519                THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
8520                THEN "≡E"(1), rotated])
8521         "cqt:2[lambda]"
8522    AOT_hence y ¬(A!y & z [R]az] = z [R]yz] & ¬yz [R]az])
8523      using "cqt-further:4" "vdash-properties:10" by blast
8524    AOT_hence ¬(A!a & z [R]az] = z [R]az] & ¬az [R]az])
8525      using "∀E" by blast
8526    AOT_hence (A!a & z [R]az] = z [R]az])  az [R]az]
8527      by (metis "&I" "deduction-theorem" "raa-cor:3")
8528    moreover AOT_have z [R]az] = z [R]az]
8529      by (rule "=I") "cqt:2[lambda]"
8530    ultimately AOT_have az [R]az]
8531      using a_prop[THEN "&E"(1)] "→E" "&I" by blast
8532    AOT_thus az [R]az] & ¬az [R]az]
8533      using 0 "&I" by blast
8534  qed
8535  AOT_hence y(A!y & z [R]az] = z [R]yz] & ¬yz [R]az])
8536    by (rule a_prop[THEN "&E"(2), THEN "∀E"(1), THEN "≡E"(1), rotated])
8537       "cqt:2"
8538  then AOT_obtain b where b_prop:
8539    A!b & z [R]az] = z [R]bz] & ¬bz [R]az]
8540    using "∃E"[rotated] by blast
8541  AOT_have a  b
8542    apply (rule "dfI"[OF "=-infix"])
8543    using a_enc b_prop[THEN "&E"(2)]
8544    using "¬¬I" "rule=E" id_sym "≡E"(4) "oth-class-taut:3:a"
8545          "raa-cor:3" "reductio-aa:1" by fast
8546  AOT_hence A!a & A!b & a  b & z [R]az] = z [R]bz]
8547    using b_prop "&E" a_prop "&I" by meson
8548  AOT_hence y (A!a & A!y & a  y & z [R]az] = z [R]yz]) by (rule "∃I")
8549  AOT_thus xy (A!x & A!y & x  y & z [R]xz] = z [R]yz]) by (rule "∃I")
8550qed
8551
8552AOT_theorem "aclassical:3":
8553  Fxy(A!x & A!y & x  y &  [F]x] =  [F]y])
8554proof(rule GEN)
8555  fix R
8556  AOT_obtain a where a_prop:
8557    A!a & F (a[F]  y(A!y & F = z [R]y] & ¬y[F]))
8558    using "A-objects"[axiom_inst] "∃E"[rotated] by fast
8559  AOT_have den: z [R]a] by "cqt:2[lambda]"
8560  AOT_have a_enc: az [R]a]
8561  proof (rule "raa-cor:1")
8562    AOT_assume 0: ¬az [R]a]
8563    AOT_hence ¬y(A!y & z [R]a] = z [R]y] & ¬yz [R]a])
8564      by (safe intro!: a_prop[THEN "&E"(2), THEN "∀E"(1)[where τ=«z [R]a]»],
8565                THEN "oth-class-taut:4:b"[THEN "≡E"(1)],
8566                THEN "≡E"(1), rotated] "cqt:2") 
8567    AOT_hence y ¬(A!y & z [R]a] = z [R]y] & ¬yz [R]a])
8568      using "cqt-further:4" "→E" by blast
8569    AOT_hence ¬(A!a & z [R]a] = z [R]a] & ¬az [R]a]) using "∀E" by blast
8570    AOT_hence (A!a & z [R]a] = z [R]a])  az [R]a]
8571      by (metis "&I" "deduction-theorem" "raa-cor:3")
8572    AOT_hence az [R]a]
8573      using a_prop[THEN "&E"(1)] "→E" "&I"
8574      by (metis "rule=I:1" den)
8575    AOT_thus az [R]a] & ¬az [R]a]  by (metis "0" "raa-cor:3") 
8576  qed
8577  AOT_hence y(A!y & z [R]a] = z [R]y] & ¬yz [R]a])
8578    by (rule a_prop[THEN "&E"(2), THEN "∀E"(1), OF den, THEN "≡E"(1), rotated])
8579  then AOT_obtain b where b_prop: A!b & z [R]a] = z [R]b] & ¬bz [R]a]
8580    using "∃E"[rotated] by blast
8581  AOT_have 1: a  b
8582    apply (rule "dfI"[OF "=-infix"])
8583    using a_enc b_prop[THEN "&E"(2)]
8584    using "¬¬I" "rule=E" id_sym "≡E"(4) "oth-class-taut:3:a"
8585          "raa-cor:3" "reductio-aa:1" by fast
8586  AOT_have a:  [R]a] = ([R]a)
8587    apply (rule "lambda-predicates:3[zero]"[axiom_inst, unvarify p])
8588    by (meson "log-prop-prop:2")
8589  AOT_have b:  [R]b] = ([R]b)
8590    apply (rule "lambda-predicates:3[zero]"[axiom_inst, unvarify p])
8591    by (meson "log-prop-prop:2")
8592  AOT_have  [R]a] =  [R]b]
8593    apply (rule "rule=E"[rotated, OF a[THEN id_sym]])
8594    apply (rule "rule=E"[rotated, OF b[THEN id_sym]])
8595    apply (rule "identity:4"[THEN "dfI", OF "&I", rotated])
8596    using b_prop "&E" apply blast
8597    apply (safe intro!: "&I")
8598    by (simp add: "log-prop-prop:2")+
8599  AOT_hence A!a & A!b & a  b &  [R]a] =  [R]b]
8600    using 1 a_prop[THEN "&E"(1)] b_prop[THEN "&E"(1), THEN "&E"(1)]
8601          "&I" by auto
8602  AOT_hence y (A!a & A!y & a  y &  [R]a] =  [R]y]) by (rule "∃I")
8603  AOT_thus xy (A!x & A!y & x  y &  [R]x] =  [R]y]) by (rule "∃I")
8604qed
8605
8606AOT_theorem aclassical2: xy (A!x & A!y & x  y & F ([F]x  [F]y))
8607proof -
8608  AOT_have x y ([A!]x & [A!]y & x  y &
8609               z xy F ([F]x  [F]y)]zx] =
8610               z xy F ([F]x  [F]y)]zy])
8611    by (rule "aclassical:1"[THEN "∀E"(1)[where τ="«xy F ([F]x  [F]y)]»"]])
8612       "cqt:2"
8613  then AOT_obtain x where y ([A!]x & [A!]y & x  y &
8614               z xy F ([F]x  [F]y)]zx] =
8615               z xy F ([F]x  [F]y)]zy])
8616    using "∃E"[rotated] by blast
8617  then AOT_obtain y where 0: ([A!]x & [A!]y & x  y &
8618               z xy F ([F]x  [F]y)]zx] =
8619               z xy F ([F]x  [F]y)]zy])
8620    using "∃E"[rotated] by blast
8621  AOT_have z xy F ([F]x  [F]y)]zx]x
8622    by (auto intro!: "β←C"(1) "cqt:2"
8623             simp: "&I" "ex:1:a" prod_denotesI "rule-ui:3"
8624                   "oth-class-taut:3:a" "universal-cor")
8625  AOT_hence z xy F ([F]x  [F]y)]zy]x
8626    by (rule "rule=E"[rotated, OF 0[THEN "&E"(2)]])
8627  AOT_hence xy F ([F]x  [F]y)]xy
8628    by (rule "β→C"(1))
8629  AOT_hence F ([F]x  [F]y)
8630    using "β→C"(1) old.prod.case by fast
8631  AOT_hence [A!]x & [A!]y & x  y & F ([F]x  [F]y)
8632    using 0 "&E" "&I" by blast
8633  AOT_hence y ([A!]x & [A!]y & x  y & F ([F]x  [F]y)) by (rule "∃I")
8634  AOT_thus xy ([A!]x & [A!]y & x  y & F ([F]x  [F]y)) by (rule "∃I"(2))
8635qed
8636
8637AOT_theorem "kirchner-thm:1":
8638  x φ{x}]  xy(F([F]x  [F]y)  (φ{x}  φ{y}))
8639proof(rule "≡I"; rule "→I")
8640  AOT_assume x φ{x}]
8641  AOT_hence x φ{x}] by (metis "exist-nec" "vdash-properties:10")
8642  moreover AOT_have x φ{x}]  xy(F([F]x  [F]y)  (φ{x}  φ{y}))
8643  proof (rule "RM:1"; rule "→I"; rule GEN; rule GEN; rule "→I")
8644    AOT_modally_strict {
8645      fix x y
8646      AOT_assume 0: x φ{x}]
8647      moreover AOT_assume F([F]x  [F]y)
8648      ultimately AOT_have x φ{x}]x  x φ{x}]y
8649        using "∀E" by blast
8650      AOT_thus (φ{x}  φ{y})
8651        using "beta-C-meta"[THEN "→E", OF 0] "≡E"(6) by meson
8652    }
8653  qed
8654  ultimately AOT_show xy(F([F]x  [F]y)  (φ{x}  φ{y}))
8655    using "→E" by blast
8656next
8657  AOT_have xy(F([F]x  [F]y)  (φ{x}  φ{y})) 
8658            y(x(F([F]x  [F]y) & φ{x})  φ{y})
8659  proof(rule "RM:1"; rule "→I"; rule GEN)
8660    AOT_modally_strict {
8661      AOT_assume xy(F([F]x  [F]y)  (φ{x}  φ{y}))
8662      AOT_hence indisc: φ{x}  φ{y} if F([F]x  [F]y) for x y
8663        using "∀E"(2) "→E" that by blast
8664      AOT_show (x(F([F]x  [F]y) & φ{x})  φ{y}) for y
8665      proof (rule "raa-cor:1")
8666        AOT_assume ¬(x(F([F]x  [F]y) & φ{x})  φ{y})
8667        AOT_hence (x(F([F]x  [F]y) & φ{x}) & ¬φ{y}) 
8668                   (¬(x(F([F]x  [F]y) & φ{x})) & φ{y})
8669          using "≡E"(1) "oth-class-taut:4:h" by blast
8670        moreover {
8671          AOT_assume 0: x(F([F]x  [F]y) & φ{x}) & ¬φ{y}
8672          AOT_obtain a where F([F]a  [F]y) & φ{a}
8673            using "∃E"[rotated, OF 0[THEN "&E"(1)]]  by blast
8674          AOT_hence φ{y}
8675            using indisc[THEN "≡E"(1)] "&E" by blast
8676          AOT_hence p & ¬p for p
8677            using 0[THEN "&E"(2)] "&I" "raa-cor:3" by blast
8678        }
8679        moreover {
8680          AOT_assume 0: (¬(x(F([F]x  [F]y) & φ{x})) & φ{y})
8681          AOT_hence x ¬(F([F]x  [F]y) & φ{x})
8682            using "&E"(1) "cqt-further:4" "→E" by blast
8683          AOT_hence ¬(F([F]y  [F]y) & φ{y})
8684            using "∀E" by blast
8685          AOT_hence ¬F([F]y  [F]y)  ¬φ{y}
8686            using "≡E"(1) "oth-class-taut:5:c" by blast
8687          moreover AOT_have F([F]y  [F]y)
8688            by (simp add: "oth-class-taut:3:a" "universal-cor")
8689          ultimately AOT_have ¬φ{y} by (metis "¬¬I" "∨E"(2))
8690          AOT_hence p & ¬p for p
8691            using 0[THEN "&E"(2)] "&I" "raa-cor:3" by blast
8692        }
8693        ultimately AOT_show p & ¬p for p
8694          using "∨E"(3) "raa-cor:1" by blast
8695      qed
8696    }
8697  qed
8698  moreover AOT_assume xy(F([F]x  [F]y)  (φ{x}  φ{y}))
8699  ultimately AOT_have y(x(F([F]x  [F]y) & φ{x})  φ{y})
8700    using "→E" by blast
8701  AOT_thus x φ{x}]
8702    by (rule "safe-ext"[axiom_inst, THEN "→E", OF "&I", rotated]) "cqt:2"
8703qed
8704
8705AOT_theorem "kirchner-thm:2":
8706  x1...xn φ{x1...xn}]  x1...∀xny1...∀yn
8707    (F([F]x1...xn  [F]y1...yn)  (φ{x1...xn}  φ{y1...yn}))
8708proof(rule "≡I"; rule "→I")
8709  AOT_assume x1...xn φ{x1...xn}]
8710  AOT_hence x1...xn φ{x1...xn}] by (metis "exist-nec" "→E")
8711  moreover AOT_have x1...xn φ{x1...xn}]  x1...∀xny1...∀yn
8712    (F([F]x1...xn  [F]y1...yn)  (φ{x1...xn}  φ{y1...yn}))
8713  proof (rule "RM:1"; rule "→I"; rule GEN; rule GEN; rule "→I")
8714    AOT_modally_strict {
8715      fix x1xn y1yn :: 'a AOT_var
8716      AOT_assume 0: x1...xn φ{x1...xn}]
8717      moreover AOT_assume F([F]x1...xn  [F]y1...yn)
8718      ultimately AOT_have x1...xn φ{x1...xn}]x1...xn 
8719                           x1...xn φ{x1...xn}]y1...yn
8720        using "∀E" by blast
8721      AOT_thus (φ{x1...xn}  φ{y1...yn})
8722        using "beta-C-meta"[THEN "→E", OF 0] "≡E"(6) by meson
8723    }
8724  qed
8725  ultimately AOT_show x1...∀xny1...∀yn(
8726    F([F]x1...xn  [F]y1...yn)  (φ{x1...xn}  φ{y1...yn})
8727  )
8728    using "→E" by blast
8729next
8730  AOT_have 8731    (x1...∀xny1...∀yn
8732      (F([F]x1...xn  [F]y1...yn)  (φ{x1...xn}  φ{y1...yn})))
8733     y1...∀yn
8734        ((x1...∃xn(F([F]x1...xn  [F]y1...yn) & φ{x1...xn})) 
8735         φ{y1...yn})
8736  proof(rule "RM:1"; rule "→I"; rule GEN)
8737    AOT_modally_strict {
8738      AOT_assume x1...∀xny1...∀yn
8739        (F([F]x1...xn  [F]y1...yn)  (φ{x1...xn}  φ{y1...yn}))
8740      AOT_hence indisc: φ{x1...xn}  φ{y1...yn}
8741        if F([F]x1...xn  [F]y1...yn) for x1xn y1yn
8742        using "∀E"(2) "→E" that by blast
8743      AOT_show (x1...∃xn(F([F]x1...xn  [F]y1...yn) & φ{x1...xn})) 
8744                φ{y1...yn} for y1yn
8745      proof (rule "raa-cor:1")
8746        AOT_assume ¬((x1...∃xn(F([F]x1...xn  [F]y1...yn) & φ{x1...xn})) 
8747                    φ{y1...yn})
8748        AOT_hence ((x1...∃xn(F([F]x1...xn  [F]y1...yn)
8749                    & φ{x1...xn}))
8750                    & ¬φ{y1...yn}) 
8751                  (¬(x1...∃xn(F([F]x1...xn  [F]y1...yn) & φ{x1...xn}))
8752                   & φ{y1...yn})
8753          using "≡E"(1) "oth-class-taut:4:h" by blast
8754        moreover {
8755          AOT_assume 0: (x1...∃xn(F([F]x1...xn  [F]y1...yn) & φ{x1...xn}))
8756                         & ¬φ{y1...yn}
8757          AOT_obtain a1an where F([F]a1...an  [F]y1...yn) & φ{a1...an}
8758            using "∃E"[rotated, OF 0[THEN "&E"(1)]]  by blast
8759          AOT_hence φ{y1...yn}
8760            using indisc[THEN "≡E"(1)] "&E" by blast
8761          AOT_hence p & ¬p for p
8762            using 0[THEN "&E"(2)] "&I" "raa-cor:3" by blast
8763        }
8764        moreover {
8765          AOT_assume 0: ¬(x1...∃xn(F([F]x1...xn  [F]y1...yn) & φ{x1...xn}))
8766                         & φ{y1...yn}
8767          AOT_hence x1...∀xn ¬(F([F]x1...xn  [F]y1...yn) & φ{x1...xn})
8768            using "&E"(1) "cqt-further:4" "→E" by blast
8769          AOT_hence ¬(F([F]y1...yn  [F]y1...yn) & φ{y1...yn})
8770            using "∀E" by blast
8771          AOT_hence ¬F([F]y1...yn  [F]y1...yn)  ¬φ{y1...yn}
8772            using "≡E"(1) "oth-class-taut:5:c" by blast
8773          moreover AOT_have F([F]y1...yn  [F]y1...yn)
8774            by (simp add: "oth-class-taut:3:a" "universal-cor")
8775          ultimately AOT_have ¬φ{y1...yn}
8776            by (metis "¬¬I" "∨E"(2))
8777          AOT_hence p & ¬p for p
8778            using 0[THEN "&E"(2)] "&I" "raa-cor:3" by blast
8779        }
8780        ultimately AOT_show p & ¬p for p
8781          using "∨E"(3) "raa-cor:1" by blast
8782      qed
8783    }
8784  qed
8785  moreover AOT_assume x1...∀xny1...∀yn
8786    (F([F]x1...xn  [F]y1...yn)  (φ{x1...xn}  φ{y1...yn}))
8787  ultimately AOT_have y1...∀yn
8788    ((x1...∃xn(F([F]x1...xn  [F]y1...yn) & φ{x1...xn})) 
8789     φ{y1...yn})
8790    using "→E" by blast
8791  AOT_thus x1...xn φ{x1...xn}]
8792    by (rule "safe-ext"[axiom_inst, THEN "→E", OF "&I", rotated]) "cqt:2"
8793qed
8794
8795AOT_theorem "kirchner-thm-cor:1":
8796  x φ{x}]  xy(F([F]x  [F]y)  (φ{x}  φ{y}))
8797proof(rule "→I"; rule GEN; rule GEN; rule "→I")
8798  fix x y
8799  AOT_assume x φ{x}]
8800  AOT_hence xy (F ([F]x  [F]y)  (φ{x}  φ{y}))
8801    by (rule "kirchner-thm:1"[THEN "≡E"(1)])
8802  AOT_hence xy (F ([F]x  [F]y)  (φ{x}  φ{y}))
8803    using CBF[THEN "→E"] by blast
8804  AOT_hence y (F ([F]x  [F]y)  (φ{x}  φ{y}))
8805    using "∀E" by blast
8806  AOT_hence y (F ([F]x  [F]y)  (φ{x}  φ{y}))
8807    using CBF[THEN "→E"] by blast
8808  AOT_hence (F ([F]x  [F]y)  (φ{x}  φ{y}))
8809    using "∀E" by blast
8810  AOT_hence F ([F]x  [F]y)  (φ{x}  φ{y})
8811    using "qml:1"[axiom_inst] "vdash-properties:6" by blast
8812  moreover AOT_assume F([F]x  [F]y)
8813  ultimately AOT_show (φ{x}  φ{y}) using "→E" "ind-nec" by blast
8814qed
8815
8816AOT_theorem "kirchner-thm-cor:2":
8817  x1...xn φ{x1...xn}]  x1...∀xny1...∀yn
8818    (F([F]x1...xn  [F]y1...yn)  (φ{x1...xn}  φ{y1...yn}))
8819proof(rule "→I"; rule GEN; rule GEN; rule "→I")
8820  fix x1xn y1yn
8821  AOT_assume x1...xn φ{x1...xn}]
8822  AOT_hence 0: x1...∀xny1...∀yn
8823    (F ([F]x1...xn  [F]y1...yn)  (φ{x1...xn}  φ{y1...yn}))
8824    by (rule "kirchner-thm:2"[THEN "≡E"(1)])
8825  AOT_have x1...∀xny1...∀yn
8826    (F ([F]x1...xn  [F]y1...yn)  (φ{x1...xn}  φ{y1...yn}))
8827  proof(rule GEN; rule GEN)
8828    fix x1xn y1yn
8829    AOT_show (F ([F]x1...xn  [F]y1...yn)  (φ{x1...xn}  φ{y1...yn}))
8830      apply (rule "RM:1"[THEN "→E", rotated, OF 0]; rule "→I")
8831      using "∀E" by blast
8832  qed
8833  AOT_hence y1...∀yn (F ([F]x1...xn  [F]y1...yn) 
8834                         (φ{x1...xn}  φ{y1...yn}))
8835    using "∀E" by blast
8836  AOT_hence (F ([F]x1...xn  [F]y1...yn)  (φ{x1...xn}  φ{y1...yn}))
8837    using "∀E" by blast
8838  AOT_hence (F ([F]x1...xn  [F]y1...yn)  (φ{x1...xn}  φ{y1...yn}))
8839    using "∀E" by blast
8840  AOT_hence 0: F ([F]x1...xn  [F]y1...yn)  (φ{x1...xn}  φ{y1...yn})
8841    using "qml:1"[axiom_inst] "vdash-properties:6" by blast
8842  moreover AOT_assume F([F]x1...xn  [F]y1...yn)
8843  moreover AOT_have x1...xn F ([F]x1...xn  [F]y1...yn)] by "cqt:2"
8844  ultimately AOT_have x1...xn F ([F]x1...xn  [F]y1...yn)]x1...xn 
8845                       x1...xn F ([F]x1...xn  [F]y1...yn)]y1...yn
8846    using "∀E" by blast
8847  moreover AOT_have x1...xn F ([F]x1...xn  [F]y1...yn)]y1...yn
8848    apply (rule "β←C"(1))
8849      apply "cqt:2[lambda]"
8850     apply (fact "cqt:2[const_var]"[axiom_inst])
8851    by (simp add: RN GEN "oth-class-taut:3:a")
8852  ultimately AOT_have x1...xn F ([F]x1...xn  [F]y1...yn)]x1...xn
8853    using "≡E"(2) by blast
8854  AOT_hence F ([F]x1...xn  [F]y1...yn)
8855    using "β→C"(1) by blast
8856  AOT_thus (φ{x1...xn}  φ{y1...yn}) using "→E" 0 by blast
8857qed
8858
8859subsection‹Propositional Properties›
8860text‹\label{PLM: 9.12}›
8861
8862AOT_define propositional :: Π  φ (Propositional'(_'))
8863  "prop-prop1": Propositional([F]) df p(F = y p])
8864
8865AOT_theorem "prop-prop2:1": p y p]
8866  by (rule GEN) "cqt:2[lambda]"
8867
8868AOT_theorem "prop-prop2:2": ν φ]
8869  by "cqt:2[lambda]"
8870
8871AOT_theorem "prop-prop2:3": F = y p]  x([F]x  p)
8872proof (rule "→I")
8873  AOT_assume 0: F = y p]
8874  AOT_show x([F]x  p)
8875    by (rule "rule=E"[rotated, OF 0[symmetric]];
8876        rule RN; rule GEN; rule "beta-C-meta"[THEN "→E"])
8877      "cqt:2[lambda]"
8878qed
8879
8880AOT_theorem "prop-prop2:4": Propositional([F])  Propositional([F])
8881proof(rule "→I")
8882  AOT_assume Propositional([F])
8883  AOT_hence p(F = y p])
8884    using "dfE"[OF "prop-prop1"] by blast
8885  then AOT_obtain p where F = y p]
8886    using "∃E"[rotated] by blast
8887  AOT_hence (F = y p])
8888    using "id-nec:2" "modus-tollens:1" "raa-cor:3" by blast
8889  AOT_hence p (F = y p])
8890    using "∃I" by fast
8891  AOT_hence 0: p (F = y p])
8892    by (metis Buridan "vdash-properties:10")
8893  AOT_thus Propositional([F])
8894    using "prop-prop1"[THEN "≡Df"]
8895    by (AOT_subst Propositional([F]) p (F = y p])) auto
8896qed
8897
8898AOT_define indicriminate :: Π  φ ("Indiscriminate'(_')")
8899  "prop-indis": Indiscriminate([F]) df F & (x [F]x  x [F]x)
8900
8901AOT_theorem "prop-in-thm": Propositional([Π])  Indiscriminate([Π])
8902proof(rule "→I")
8903  AOT_assume Propositional([Π])
8904  AOT_hence p Π = y p] using "dfE"[OF "prop-prop1"] by blast
8905  then AOT_obtain p where Π_def: Π = y p] using "∃E"[rotated] by blast
8906  AOT_show Indiscriminate([Π])
8907  proof (rule "dfI"[OF "prop-indis"]; rule "&I")
8908    AOT_show Π
8909      using Π_def by (meson "t=t-proper:1" "vdash-properties:6")
8910  next
8911    AOT_show (x [Π]x  x [Π]x)
8912    proof (rule "rule=E"[rotated, OF Π_def[symmetric]];
8913           rule RN; rule "→I"; rule GEN)
8914      AOT_modally_strict {
8915        AOT_assume x y p]x
8916        then AOT_obtain a where y p]a using "∃E"[rotated] by blast
8917        AOT_hence 0: p by (metis "β→C"(1))
8918        AOT_show y p]x for x
8919          apply (rule "β←C"(1))
8920            apply "cqt:2[lambda]"
8921           apply (fact "cqt:2[const_var]"[axiom_inst])
8922          by (fact 0)
8923      }
8924    qed
8925  qed
8926qed
8927
8928AOT_theorem "prop-in-f:1": Necessary([F])  Indiscriminate([F])
8929proof (rule "→I")
8930  AOT_assume Necessary([F])
8931  AOT_hence 0: x1...∀xn [F]x1...xn
8932    using "dfE"[OF "contingent-properties:1"] by blast
8933  AOT_show Indiscriminate([F])
8934    by (rule "dfI"[OF "prop-indis"])
8935       (metis "0" "KBasic:1" "&I" "ex:1:a" "rule-ui:2[const_var]" "→E") 
8936qed
8937
8938AOT_theorem "prop-in-f:2": Impossible([F])  Indiscriminate([F])
8939proof (rule "→I")
8940  AOT_modally_strict {
8941    AOT_have x ¬[F]x  (x [F]x  x [F]x)
8942      by (metis "∃E" "cqt-orig:3" "Hypothetical Syllogism" "→I" "raa-cor:3")
8943  }
8944  AOT_hence 0: x ¬[F]x  (x [F]x  x [F]x)
8945    by (rule "RM:1")
8946  AOT_assume Impossible([F])
8947  AOT_hence x ¬[F]x
8948    using "dfE"[OF "contingent-properties:2"] "&E" by blast
8949  AOT_hence 1: (x [F]x  x [F]x)
8950    using 0 "→E" by blast
8951  AOT_show Indiscriminate([F])
8952    by (rule "dfI"[OF "prop-indis"]; rule "&I")
8953       (simp add: "ex:1:a" "rule-ui:2[const_var]" 1)+
8954qed
8955
8956AOT_theorem "prop-in-f:3:a": ¬Indiscriminate([E!])
8957proof(rule "raa-cor:2")
8958  AOT_assume Indiscriminate([E!])
8959  AOT_hence 0: (x [E!]x  x [E!]x)
8960    using "dfE"[OF "prop-indis"] "&E" by blast
8961  AOT_hence x [E!]x  x [E!]x
8962    using "KBasic:13" "vdash-properties:10" by blast
8963  moreover AOT_have x [E!]x
8964    by (simp add: "thm-cont-e:3")
8965  ultimately AOT_have x [E!]x
8966    by (metis "vdash-properties:6")
8967  AOT_thus p & ¬p for p
8968    by (metis "dfE" "conventions:5" "o-objects-exist:5" "reductio-aa:1")
8969qed
8970
8971AOT_theorem "prop-in-f:3:b": ¬Indiscriminate([E!]-)
8972proof (rule "rule=E"[rotated, OF "rel-neg-T:2"[symmetric]];
8973       rule "raa-cor:2")
8974  AOT_assume Indiscriminate(x ¬[E!]x])
8975  AOT_hence 0: (x x ¬[E!]x]x  x x ¬[E!]x]x)
8976    using "dfE"[OF "prop-indis"] "&E" by blast
8977  AOT_hence x x ¬[E!]x]x  x x ¬[E!]x]x
8978    using "→E" "qml:1" "vdash-properties:1[2]" by blast
8979  moreover AOT_have x x ¬[E!]x]x
8980    apply (AOT_subst x ¬E!x]x ¬E!x for: x)
8981    apply (rule "beta-C-meta"[THEN "→E"])
8982     apply "cqt:2"
8983    by (metis (full_types) "B◇" RN "T◇" "cqt-further:2"
8984                           "o-objects-exist:5" "→E")
8985  ultimately AOT_have 1: x x ¬[E!]x]x
8986    by (metis "vdash-properties:6")
8987  AOT_hence x ¬[E!]x
8988    by (AOT_subst (reverse) ¬[E!]x  x ¬[E!]x]x for: x)
8989       (auto intro!: "cqt:2" "beta-C-meta"[THEN "→E"])
8990  AOT_hence x ¬[E!]x by (metis "CBF" "vdash-properties:10")
8991  moreover AOT_obtain a where abs_a: O!a
8992    using "∃E" "o-objects-exist:1" "qml:2"[axiom_inst] "→E" by blast
8993  ultimately AOT_have ¬[E!]a using "∀E" by blast
8994  AOT_hence 2: ¬[E!]a by (metis "dfE" "conventions:5" "reductio-aa:1")
8995  AOT_have A!a
8996    apply (rule "=dfI"(2)[OF AOT_abstract])
8997     apply "cqt:2[lambda]"
8998    apply (rule "β←C"(1))
8999      apply "cqt:2[lambda]"
9000    using "cqt:2[const_var]"[axiom_inst] apply blast
9001    by (fact 2)
9002  AOT_thus p & ¬p for p using abs_a
9003    by (metis "≡E"(1) "oa-contingent:2" "reductio-aa:1")
9004qed
9005
9006AOT_theorem "prop-in-f:3:c": ¬Indiscriminate(O!)
9007proof(rule "raa-cor:2")
9008  AOT_assume Indiscriminate(O!)
9009  AOT_hence 0: (x O!x  x O!x)
9010    using "dfE"[OF "prop-indis"] "&E" by blast
9011  AOT_hence x O!x  x O!x
9012    using "qml:1"[axiom_inst] "vdash-properties:6" by blast
9013  moreover AOT_have x O!x
9014    using "o-objects-exist:1" by blast
9015  ultimately AOT_have x O!x
9016    by (metis "vdash-properties:6")
9017  AOT_thus p & ¬p for p
9018    by (metis "o-objects-exist:3" "qml:2"[axiom_inst] "raa-cor:3" "→E")
9019qed
9020
9021AOT_theorem "prop-in-f:3:d": ¬Indiscriminate(A!)
9022proof(rule "raa-cor:2")
9023  AOT_assume Indiscriminate(A!)
9024  AOT_hence 0: (x A!x  x A!x)
9025    using "dfE"[OF "prop-indis"] "&E" by blast
9026  AOT_hence x A!x  x A!x
9027    using "qml:1"[axiom_inst] "vdash-properties:6" by blast
9028  moreover AOT_have x A!x
9029    using "o-objects-exist:2" by blast
9030  ultimately AOT_have x A!x
9031    by (metis "vdash-properties:6")
9032  AOT_thus p & ¬p for p
9033    by (metis "o-objects-exist:4" "qml:2"[axiom_inst] "raa-cor:3" "→E")
9034qed
9035
9036AOT_theorem "prop-in-f:4:a": ¬Propositional(E!)
9037  using "modus-tollens:1" "prop-in-f:3:a" "prop-in-thm" by blast
9038
9039AOT_theorem "prop-in-f:4:b": ¬Propositional(E!-)
9040  using "modus-tollens:1" "prop-in-f:3:b" "prop-in-thm" by blast
9041
9042AOT_theorem "prop-in-f:4:c": ¬Propositional(O!)
9043  using "modus-tollens:1" "prop-in-f:3:c" "prop-in-thm" by blast
9044
9045AOT_theorem "prop-in-f:4:d": ¬Propositional(A!)
9046  using "modus-tollens:1" "prop-in-f:3:d" "prop-in-thm" by blast
9047
9048AOT_theorem "prop-prop-nec:1": p (F = y p])  p(F = y p])
9049proof(rule "→I")
9050  AOT_assume p (F = y p])
9051  AOT_hence p (F = y p])
9052    by (metis "BF◇" "→E")
9053  then AOT_obtain p where (F = y p])
9054    using "∃E"[rotated] by blast
9055  AOT_hence F = y p]
9056    by (metis "derived-S5-rules:2" emptyE "id-nec:2" "→E")
9057  AOT_thus p(F = y p]) by (rule "∃I")
9058qed
9059
9060AOT_theorem "prop-prop-nec:2": p (F  y p])  p(F  y p])
9061proof(rule "→I")
9062  AOT_assume p (F  y p])
9063  AOT_hence (F  y p]) for p
9064    using "∀E" by blast
9065  AOT_hence (F  y p]) for p
9066    by (rule "id-nec2:2"[unvarify β, THEN "→E", rotated]) "cqt:2"
9067  AOT_hence p (F  y p]) by (rule GEN)
9068  AOT_thus p (F  y p]) using BF[THEN "→E"] by fast
9069qed
9070
9071AOT_theorem "prop-prop-nec:3": p (F = y p])  p(F = y p])
9072proof(rule "→I")
9073  AOT_assume p (F = y p])
9074  then AOT_obtain p where (F = y p]) using "∃E"[rotated] by blast
9075  AOT_hence (F = y p]) by (metis "id-nec:2" "→E")
9076  AOT_hence p(F = y p]) by (rule "∃I")
9077  AOT_thus p(F = y p]) by (metis Buridan "→E")
9078qed
9079
9080AOT_theorem "prop-prop-nec:4": p (F  y p])  p(F  y p])
9081proof(rule "→I")
9082  AOT_assume p (F  y p])
9083  AOT_hence p (F  y p]) by (metis "Buridan◇" "→E")
9084  AOT_hence (F  y p]) for p
9085    using "∀E" by blast
9086  AOT_hence F  y p] for p
9087    by (rule "id-nec2:3"[unvarify β, THEN "→E", rotated]) "cqt:2"
9088  AOT_thus p (F  y p]) by (rule GEN)
9089qed
9090
9091AOT_theorem "enc-prop-nec:1":
9092  F (x[F]  p(F = y p]))  F(x[F]  p (F = y p]))
9093proof(rule "→I"; rule GEN; rule "→I")
9094  fix F
9095  AOT_assume F (x[F]  p(F = y p]))
9096  AOT_hence F (x[F]  p(F = y p]))
9097    using "Buridan◇" "vdash-properties:10" by blast
9098  AOT_hence 0: (x[F]  p(F = y p])) using "∀E" by blast
9099  AOT_assume x[F]
9100  AOT_hence x[F] by (metis "en-eq:2[1]" "≡E"(1))
9101  AOT_hence p(F = y p])
9102    using 0 by (metis "KBasic2:4" "≡E"(1) "vdash-properties:10")
9103  AOT_thus p(F = y p])
9104    using "prop-prop-nec:1"[THEN "→E"] by blast
9105qed
9106
9107AOT_theorem "enc-prop-nec:2":
9108  F (x[F]  p(F = y p]))  F(x[F]  p (F = y p]))
9109  using "derived-S5-rules:1"[where Γ="{}", simplified, OF "enc-prop-nec:1"]
9110  by blast
9111
9112(*<*)
9113end
9114(*>*)