-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAOT_PossibleWorlds.thy
3502 lines (3312 loc) · 210 KB
/
AOT_PossibleWorlds.thy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(*<*)
theory AOT_PossibleWorlds
imports AOT_PLM AOT_BasicLogicalObjects AOT_RestrictedVariables
begin
(*>*)
section\<open>Possible Worlds\<close>
AOT_define Situation :: \<open>\<tau> \<Rightarrow> \<phi>\<close> (\<open>Situation'(_')\<close>)
"situations:1": \<open>Situation(x) \<equiv>\<^sub>d\<^sub>f A!x & \<forall>F (x[F] \<rightarrow> Propositional([F]))\<close>
(* TODO: temporary alias to keep the old key used for the definition working *)
lemmas "situations" = "situations:1"
AOT_theorem "situations:2": \<open>\<exists>x Situation(x)\<close>
proof -
AOT_have \<open>\<exists>x (A!x & \<forall>F (x[F] \<equiv> F = [\<lambda>y [R]ab]))\<close>
using "A-objects" "vdash-properties:1[2]" by auto
then AOT_obtain c where c_prop: \<open>A!c & \<forall>F (c[F] \<equiv> F = [\<lambda>y [R]ab])\<close>
using "\<exists>E" by meson
AOT_have \<open>Situation(c)\<close>
proof(safe intro!: "\<equiv>\<^sub>d\<^sub>fI"[OF "situations:1"] "&I" GEN "\<rightarrow>I")
AOT_show \<open>A!c\<close>
using c_prop "&E" by blast
next
fix F
AOT_assume \<open>c[F]\<close>
AOT_hence F_eq: \<open>F = [\<lambda>y [R]ab]\<close>
using "con-dis-i-e:2:b" "intro-elim:3:a" "rule-ui:3" c_prop by blast
AOT_find_theorems \<open>Propositional([\<Pi>])\<close>
AOT_show \<open>Propositional([F])\<close>
proof(rule "prop-prop1"[THEN "\<equiv>\<^sub>d\<^sub>fI"])
AOT_show "\<exists>p F = [\<lambda>y p]"
using F_eq "\<exists>I"(1)
using "log-prop-prop:2" by fastforce
qed
qed
AOT_thus \<open>\<exists>x Situation(x)\<close>
using "\<exists>I" by blast
qed
AOT_theorem "situations:3": \<open>Situation(\<kappa>) \<rightarrow> \<kappa>\<down>\<close>
proof (rule "\<rightarrow>I")
AOT_assume \<open>Situation(\<kappa>)\<close>
AOT_hence \<open>A!\<kappa>\<close> by (metis "\<equiv>\<^sub>d\<^sub>fE" "&E"(1) "situations:1")
AOT_thus \<open>\<kappa>\<down>\<close> by (metis "russell-axiom[exe,1].\<psi>_denotes_asm")
qed
AOT_theorem "T-sit": \<open>TruthValue(x) \<rightarrow> Situation(x)\<close>
proof(rule "\<rightarrow>I")
AOT_assume \<open>TruthValue(x)\<close>
AOT_hence \<open>\<exists>p TruthValueOf(x,p)\<close>
using "T-value"[THEN "\<equiv>\<^sub>d\<^sub>fE"] by blast
then AOT_obtain p where \<open>TruthValueOf(x,p)\<close> using "\<exists>E"[rotated] by blast
AOT_hence \<theta>: \<open>A!x & \<forall>F (x[F] \<equiv> \<exists>q((q \<equiv> p) & F = [\<lambda>y q]))\<close>
using "tv-p"[THEN "\<equiv>\<^sub>d\<^sub>fE"] by blast
AOT_show \<open>Situation(x)\<close>
proof(rule "situations:1"[THEN "\<equiv>\<^sub>d\<^sub>fI"]; safe intro!: "&I" GEN "\<rightarrow>I" \<theta>[THEN "&E"(1)])
fix F
AOT_assume \<open>x[F]\<close>
AOT_hence \<open>\<exists>q((q \<equiv> p) & F = [\<lambda>y q])\<close>
using \<theta>[THEN "&E"(2), THEN "\<forall>E"(2)[where \<beta>=F], THEN "\<equiv>E"(1)] by argo
then AOT_obtain q where \<open>(q \<equiv> p) & F = [\<lambda>y q]\<close> using "\<exists>E"[rotated] by blast
AOT_hence \<open>\<exists>p F = [\<lambda>y p]\<close> using "&E"(2) "\<exists>I"(2) by metis
AOT_thus \<open>Propositional([F])\<close>
by (metis "\<equiv>\<^sub>d\<^sub>fI" "prop-prop1")
qed
qed
AOT_theorem "possit-sit:1": \<open>Situation(x) \<equiv> \<box>Situation(x)\<close>
proof(rule "\<equiv>I"; rule "\<rightarrow>I")
AOT_assume \<open>Situation(x)\<close>
AOT_hence 0: \<open>A!x & \<forall>F (x[F] \<rightarrow> Propositional([F]))\<close>
using "situations:1"[THEN "\<equiv>\<^sub>d\<^sub>fE"] by blast
AOT_have 1: \<open>\<box>(A!x & \<forall>F (x[F] \<rightarrow> Propositional([F])))\<close>
proof(rule "KBasic:3"[THEN "\<equiv>E"(2)]; rule "&I")
AOT_show \<open>\<box>A!x\<close> using 0[THEN "&E"(1)] by (metis "oa-facts:2"[THEN "\<rightarrow>E"])
next
AOT_have \<open>\<forall>F (x[F] \<rightarrow> Propositional([F])) \<rightarrow> \<box>\<forall>F (x[F] \<rightarrow> Propositional([F]))\<close>
by (AOT_subst \<open>Propositional([F])\<close> \<open>\<exists>p (F = [\<lambda>y p])\<close> for: F :: \<open><\<kappa>>\<close>)
(auto simp: "prop-prop1" "\<equiv>Df" "enc-prop-nec:2")
AOT_thus \<open>\<box>\<forall>F (x[F] \<rightarrow> Propositional([F]))\<close>
using 0[THEN "&E"(2)] "\<rightarrow>E" by blast
qed
AOT_show \<open>\<box>Situation(x)\<close>
by (AOT_subst \<open>Situation(x)\<close> \<open>A!x & \<forall>F (x[F] \<rightarrow> Propositional([F]))\<close>)
(auto simp: 1 "\<equiv>Df" "situations:1")
next
AOT_show \<open>Situation(x)\<close> if \<open>\<box>Situation(x)\<close>
using "qml:2"[axiom_inst, THEN "\<rightarrow>E", OF that].
qed
AOT_theorem "possit-sit:2": \<open>\<diamond>Situation(x) \<equiv> Situation(x)\<close>
using "possit-sit:1"
by (metis "RE\<diamond>" "S5Basic:2" "\<equiv>E"(1) "\<equiv>E"(5) "Commutativity of \<equiv>")
AOT_theorem "possit-sit:3": \<open>\<diamond>Situation(x) \<equiv> \<box>Situation(x)\<close>
using "possit-sit:1" "possit-sit:2" by (meson "\<equiv>E"(5))
AOT_theorem "possit-sit:4": \<open>\<^bold>\<A>Situation(x) \<equiv> Situation(x)\<close>
by (meson "Act-Basic:5" "Act-Sub:2" "RA[2]" "\<equiv>E"(1) "\<equiv>E"(6) "possit-sit:2")
AOT_theorem "possit-sit:5": \<open>Situation(\<circ>p)\<close>
proof (safe intro!: "situations:1"[THEN "\<equiv>\<^sub>d\<^sub>fI"] "&I" GEN "\<rightarrow>I" "prop-prop1"[THEN "\<equiv>\<^sub>d\<^sub>fI"])
AOT_have \<open>\<exists>F \<circ>p[F]\<close>
using "tv-id:2"[THEN "prop-enc"[THEN "\<equiv>\<^sub>d\<^sub>fE"], THEN "&E"(2)]
"existential:1" "prop-prop2:2" by blast
AOT_thus \<open>A!\<circ>p\<close>
by (safe intro!: "encoders-are-abstract"[unvarify x, THEN "\<rightarrow>E"]
"t=t-proper:2"[THEN "\<rightarrow>E", OF "ext-p-tv:3"])
next
fix F
AOT_assume \<open>\<circ>p[F]\<close>
AOT_hence \<open>\<^bold>\<iota>x(A!x & \<forall>F (x[F] \<equiv> \<exists>q ((q \<equiv> p) & F = [\<lambda>y q])))[F]\<close>
using "tv-id:1" "rule=E" by fast
AOT_hence \<open>\<^bold>\<A>\<exists>q ((q \<equiv> p) & F = [\<lambda>y q])\<close>
using "\<equiv>E"(1) "desc-nec-encode:1" by fast
AOT_hence \<open>\<exists>q \<^bold>\<A>((q \<equiv> p) & F = [\<lambda>y q])\<close>
by (metis "Act-Basic:10" "\<equiv>E"(1))
then AOT_obtain q where \<open>\<^bold>\<A>((q \<equiv> p) & F = [\<lambda>y q])\<close> using "\<exists>E"[rotated] by blast
AOT_hence \<open>\<^bold>\<A>F = [\<lambda>y q]\<close> by (metis "Act-Basic:2" "con-dis-i-e:2:b" "intro-elim:3:a")
AOT_hence \<open>F = [\<lambda>y q]\<close>
using "id-act:1"[unvarify \<beta>, THEN "\<equiv>E"(2)] by (metis "prop-prop2:2")
AOT_thus \<open>\<exists>p F = [\<lambda>y p]\<close>
using "\<exists>I" by fast
qed
AOT_theorem "possit-sit:6": \<open>Situation(\<top>)\<close>
proof -
AOT_have true_def: \<open>\<^bold>\<turnstile>\<^sub>\<box> \<top> = \<^bold>\<iota>x (A!x & \<forall>F (x[F] \<equiv> \<exists>p(p & F = [\<lambda>y p])))\<close>
by (simp add: "A-descriptions" "rule-id-df:1[zero]" "the-true:1")
AOT_hence true_den: \<open>\<^bold>\<turnstile>\<^sub>\<box> \<top>\<down>\<close>
using "t=t-proper:1" "vdash-properties:6" by blast
AOT_have \<open>\<^bold>\<A>TruthValue(\<top>)\<close>
using "actual-desc:2"[unvarify x, OF true_den, THEN "\<rightarrow>E", OF true_def]
using "TV-lem2:1"[unvarify x, OF true_den, THEN "RA[2]",
THEN "act-cond"[THEN "\<rightarrow>E"], THEN "\<rightarrow>E"]
by blast
AOT_hence \<open>\<^bold>\<A>Situation(\<top>)\<close>
using "T-sit"[unvarify x, OF true_den, THEN "RA[2]",
THEN "act-cond"[THEN "\<rightarrow>E"], THEN "\<rightarrow>E"] by blast
AOT_thus \<open>Situation(\<top>)\<close>
using "possit-sit:4"[unvarify x, OF true_den, THEN "\<equiv>E"(1)] by blast
qed
AOT_theorem "possit-sit:7": \<open>Situation(\<bottom>)\<close>
proof -
AOT_have true_def: \<open>\<^bold>\<turnstile>\<^sub>\<box> \<bottom> = \<^bold>\<iota>x (A!x & \<forall>F (x[F] \<equiv> \<exists>p(\<not>p & F = [\<lambda>y p])))\<close>
by (simp add: "A-descriptions" "rule-id-df:1[zero]" "the-true:2")
AOT_hence true_den: \<open>\<^bold>\<turnstile>\<^sub>\<box> \<bottom>\<down>\<close>
using "t=t-proper:1" "vdash-properties:6" by blast
AOT_have \<open>\<^bold>\<A>TruthValue(\<bottom>)\<close>
using "actual-desc:2"[unvarify x, OF true_den, THEN "\<rightarrow>E", OF true_def]
using "TV-lem2:2"[unvarify x, OF true_den, THEN "RA[2]",
THEN "act-cond"[THEN "\<rightarrow>E"], THEN "\<rightarrow>E"]
by blast
AOT_hence \<open>\<^bold>\<A>Situation(\<bottom>)\<close>
using "T-sit"[unvarify x, OF true_den, THEN "RA[2]",
THEN "act-cond"[THEN "\<rightarrow>E"], THEN "\<rightarrow>E"] by blast
AOT_thus \<open>Situation(\<bottom>)\<close>
using "possit-sit:4"[unvarify x, OF true_den, THEN "\<equiv>E"(1)] by blast
qed
AOT_register_rigid_restricted_type
Situation: \<open>Situation(\<kappa>)\<close>
proof
AOT_modally_strict {
AOT_show \<open>\<exists>x Situation(x)\<close>
using "situations:2".
}
next
AOT_modally_strict {
AOT_show \<open>Situation(\<kappa>) \<rightarrow> \<kappa>\<down>\<close> for \<kappa>
using "situations:3".
}
next
AOT_modally_strict {
AOT_show \<open>\<forall>\<alpha>(Situation(\<alpha>) \<rightarrow> \<box>Situation(\<alpha>))\<close>
using "possit-sit:1"[THEN "conventions:3"[THEN "\<equiv>\<^sub>d\<^sub>fE"],
THEN "&E"(1)] GEN by fast
}
qed
AOT_register_variable_names
Situation: s
AOT_define TruthInSituation :: \<open>\<tau> \<Rightarrow> \<phi> \<Rightarrow> \<phi>\<close> ("(_ \<Turnstile>/ _)" [100, 40] 100)
"true-in-s": \<open>s \<Turnstile> p \<equiv>\<^sub>d\<^sub>f s\<^bold>\<Sigma>p\<close>
notepad
begin
(* Verify precedence. *)
fix x p q
have \<open>\<guillemotleft>x \<Turnstile> p \<rightarrow> q\<guillemotright> = \<guillemotleft>(x \<Turnstile> p) \<rightarrow> q\<guillemotright>\<close>
by simp
have \<open>\<guillemotleft>x \<Turnstile> p & q\<guillemotright> = \<guillemotleft>(x \<Turnstile> p) & q\<guillemotright>\<close>
by simp
have \<open>\<guillemotleft>x \<Turnstile> \<not>p\<guillemotright> = \<guillemotleft>x \<Turnstile> (\<not>p)\<guillemotright>\<close>
by simp
have \<open>\<guillemotleft>x \<Turnstile> \<box>p\<guillemotright> = \<guillemotleft>x \<Turnstile> (\<box>p)\<guillemotright>\<close>
by simp
have \<open>\<guillemotleft>x \<Turnstile> \<^bold>\<A>p\<guillemotright> = \<guillemotleft>x \<Turnstile> (\<^bold>\<A>p)\<guillemotright>\<close>
by simp
have \<open>\<guillemotleft>\<box>x \<Turnstile> p\<guillemotright> = \<guillemotleft>\<box>(x \<Turnstile> p)\<guillemotright>\<close>
by simp
have \<open>\<guillemotleft>\<not>x \<Turnstile> p\<guillemotright> = \<guillemotleft>\<not>(x \<Turnstile> p)\<guillemotright>\<close>
by simp
end
AOT_theorem lem1: \<open>Situation(x) \<rightarrow> (x \<Turnstile> p \<equiv> x[\<lambda>y p])\<close>
proof (rule "\<rightarrow>I"; rule "\<equiv>I"; rule "\<rightarrow>I")
AOT_assume \<open>Situation(x)\<close>
AOT_assume \<open>x \<Turnstile> p\<close>
AOT_hence \<open>x\<^bold>\<Sigma>p\<close>
using "true-in-s"[THEN "\<equiv>\<^sub>d\<^sub>fE"] "&E" by blast
AOT_thus \<open>x[\<lambda>y p]\<close> using "prop-enc"[THEN "\<equiv>\<^sub>d\<^sub>fE"] "&E" by blast
next
AOT_assume 1: \<open>Situation(x)\<close>
AOT_assume \<open>x[\<lambda>y p]\<close>
AOT_hence \<open>x\<^bold>\<Sigma>p\<close>
using "prop-enc"[THEN "\<equiv>\<^sub>d\<^sub>fI", OF "&I", OF "cqt:2"(1)] by blast
AOT_thus \<open>x \<Turnstile> p\<close>
using "true-in-s"[THEN "\<equiv>\<^sub>d\<^sub>fI"] 1 "&I" by blast
qed
AOT_theorem "lem2:1": \<open>s \<Turnstile> p \<equiv> \<box>s \<Turnstile> p\<close>
proof -
AOT_have sit: \<open>Situation(s)\<close>
by (simp add: Situation.\<psi>)
AOT_have \<open>s \<Turnstile> p \<equiv> s[\<lambda>y p]\<close>
using lem1[THEN "\<rightarrow>E", OF sit] by blast
also AOT_have \<open>\<dots> \<equiv> \<box>s[\<lambda>y p]\<close>
by (rule "en-eq:2[1]"[unvarify F]) "cqt:2[lambda]"
also AOT_have \<open>\<dots> \<equiv> \<box>s \<Turnstile> p\<close>
using lem1[THEN RM, THEN "\<rightarrow>E", OF "possit-sit:1"[THEN "\<equiv>E"(1), OF sit]]
by (metis "KBasic:6" "\<equiv>E"(2) "Commutativity of \<equiv>" "\<rightarrow>E")
finally show ?thesis.
qed
AOT_theorem "lem2:2": \<open>\<diamond>s \<Turnstile> p \<equiv> s \<Turnstile> p\<close>
proof -
AOT_have \<open>\<box>(s \<Turnstile> p \<rightarrow> \<box>s \<Turnstile> p)\<close>
using "possit-sit:1"[THEN "\<equiv>E"(1), OF Situation.\<psi>]
"lem2:1"[THEN "conventions:3"[THEN "\<equiv>\<^sub>d\<^sub>fE", THEN "&E"(1)]]
RM[OF "\<rightarrow>I", THEN "\<rightarrow>E"] by blast
thus ?thesis by (metis "B\<diamond>" "S5Basic:13" "T\<diamond>" "\<equiv>I" "\<equiv>E"(1) "\<rightarrow>E")
qed
AOT_theorem "lem2:3": \<open>\<diamond>s \<Turnstile> p \<equiv> \<box>s \<Turnstile> p\<close>
using "lem2:1" "lem2:2" by (metis "\<equiv>E"(5))
AOT_theorem "lem2:4": \<open>\<^bold>\<A>(s \<Turnstile> p) \<equiv> s \<Turnstile> p\<close>
proof -
AOT_have \<open>\<box>(s \<Turnstile> p \<rightarrow> \<box>s \<Turnstile> p)\<close>
using "possit-sit:1"[THEN "\<equiv>E"(1), OF Situation.\<psi>]
"lem2:1"[THEN "conventions:3"[THEN "\<equiv>\<^sub>d\<^sub>fE", THEN "&E"(1)]]
RM[OF "\<rightarrow>I", THEN "\<rightarrow>E"] by blast
thus ?thesis
using "sc-eq-fur:2"[THEN "\<rightarrow>E"] by blast
qed
AOT_theorem "lem2:5": \<open>\<not>s \<Turnstile> p \<equiv> \<box>\<not>s \<Turnstile> p\<close>
by (metis "KBasic2:1" "contraposition:1[2]" "\<rightarrow>I" "\<equiv>I" "\<equiv>E"(3) "\<equiv>E"(4) "lem2:2")
AOT_theorem "sit-identity": \<open>s = s' \<equiv> \<forall>p(s \<Turnstile> p \<equiv> s' \<Turnstile> p)\<close>
proof(rule "\<equiv>I"; rule "\<rightarrow>I")
AOT_assume \<open>s = s'\<close>
moreover AOT_have \<open>\<forall>p(s \<Turnstile> p \<equiv> s \<Turnstile> p)\<close>
by (simp add: "oth-class-taut:3:a" "universal-cor")
ultimately AOT_show \<open>\<forall>p(s \<Turnstile> p \<equiv> s' \<Turnstile> p)\<close>
using "rule=E" by fast
next
AOT_assume a: \<open>\<forall>p (s \<Turnstile> p \<equiv> s' \<Turnstile> p)\<close>
AOT_show \<open>s = s'\<close>
proof(safe intro!: "ab-obey:1"[THEN "\<rightarrow>E", THEN "\<rightarrow>E"] "&I" GEN "\<equiv>I" "\<rightarrow>I")
AOT_show \<open>A!s\<close> using Situation.\<psi> "\<equiv>\<^sub>d\<^sub>fE" "&E"(1) situations by blast
next
AOT_show \<open>A!s'\<close> using Situation.\<psi> "\<equiv>\<^sub>d\<^sub>fE" "&E"(1) situations by blast
next
fix F
AOT_assume 0: \<open>s[F]\<close>
AOT_hence \<open>\<exists>p (F = [\<lambda>y p])\<close>
using Situation.\<psi>[THEN situations[THEN "\<equiv>\<^sub>d\<^sub>fE"], THEN "&E"(2),
THEN "\<forall>E"(2)[where \<beta>=F], THEN "\<rightarrow>E"]
"prop-prop1"[THEN "\<equiv>\<^sub>d\<^sub>fE"] by blast
then AOT_obtain p where F_def: \<open>F = [\<lambda>y p]\<close>
using "\<exists>E" by metis
AOT_hence \<open>s[\<lambda>y p]\<close>
using 0 "rule=E" by blast
AOT_hence \<open>s \<Turnstile> p\<close>
using lem1[THEN "\<rightarrow>E", OF Situation.\<psi>, THEN "\<equiv>E"(2)] by blast
AOT_hence \<open>s' \<Turnstile> p\<close>
using a[THEN "\<forall>E"(2)[where \<beta>=p], THEN "\<equiv>E"(1)] by blast
AOT_hence \<open>s'[\<lambda>y p]\<close>
using lem1[THEN "\<rightarrow>E", OF Situation.\<psi>, THEN "\<equiv>E"(1)] by blast
AOT_thus \<open>s'[F]\<close>
using F_def[symmetric] "rule=E" by blast
next
fix F
AOT_assume 0: \<open>s'[F]\<close>
AOT_hence \<open>\<exists>p (F = [\<lambda>y p])\<close>
using Situation.\<psi>[THEN situations[THEN "\<equiv>\<^sub>d\<^sub>fE"], THEN "&E"(2),
THEN "\<forall>E"(2)[where \<beta>=F], THEN "\<rightarrow>E"]
"prop-prop1"[THEN "\<equiv>\<^sub>d\<^sub>fE"] by blast
then AOT_obtain p where F_def: \<open>F = [\<lambda>y p]\<close>
using "\<exists>E" by metis
AOT_hence \<open>s'[\<lambda>y p]\<close>
using 0 "rule=E" by blast
AOT_hence \<open>s' \<Turnstile> p\<close>
using lem1[THEN "\<rightarrow>E", OF Situation.\<psi>, THEN "\<equiv>E"(2)] by blast
AOT_hence \<open>s \<Turnstile> p\<close>
using a[THEN "\<forall>E"(2)[where \<beta>=p], THEN "\<equiv>E"(2)] by blast
AOT_hence \<open>s[\<lambda>y p]\<close>
using lem1[THEN "\<rightarrow>E", OF Situation.\<psi>, THEN "\<equiv>E"(1)] by blast
AOT_thus \<open>s[F]\<close>
using F_def[symmetric] "rule=E" by blast
qed
qed
AOT_define PartOfSituation :: \<open>\<tau> \<Rightarrow> \<tau> \<Rightarrow> \<phi>\<close> (infixl \<open>\<unlhd>\<close> 80)
"sit-part-whole": \<open>s \<unlhd> s' \<equiv>\<^sub>d\<^sub>f \<forall>p (s \<Turnstile> p \<rightarrow> s' \<Turnstile> p)\<close>
AOT_theorem "part:1": \<open>s \<unlhd> s\<close>
by (rule "sit-part-whole"[THEN "\<equiv>\<^sub>d\<^sub>fI"])
(safe intro!: "&I" Situation.\<psi> GEN "\<rightarrow>I")
AOT_theorem "part:2": \<open>s \<unlhd> s' & s \<noteq> s' \<rightarrow> \<not>(s' \<unlhd> s)\<close>
proof(rule "\<rightarrow>I"; frule "&E"(1); drule "&E"(2); rule "raa-cor:2")
AOT_assume 0: \<open>s \<unlhd> s'\<close>
AOT_hence a: \<open>s \<Turnstile> p \<rightarrow> s' \<Turnstile> p\<close> for p
using "\<forall>E"(2) "sit-part-whole"[THEN "\<equiv>\<^sub>d\<^sub>fE"] "&E" by blast
AOT_assume \<open>s' \<unlhd> s\<close>
AOT_hence b: \<open>s' \<Turnstile> p \<rightarrow> s \<Turnstile> p\<close> for p
using "\<forall>E"(2) "sit-part-whole"[THEN "\<equiv>\<^sub>d\<^sub>fE"] "&E" by blast
AOT_have \<open>\<forall>p (s \<Turnstile> p \<equiv> s' \<Turnstile> p)\<close>
using a b by (simp add: "\<equiv>I" "universal-cor")
AOT_hence 1: \<open>s = s'\<close>
using "sit-identity"[THEN "\<equiv>E"(2)] by metis
AOT_assume \<open>s \<noteq> s'\<close>
AOT_hence \<open>\<not>(s = s')\<close>
by (metis "\<equiv>\<^sub>d\<^sub>fE" "=-infix")
AOT_thus \<open>s = s' & \<not>(s = s')\<close>
using 1 "&I" by blast
qed
AOT_theorem "part:3": \<open>s \<unlhd> s' & s' \<unlhd> s'' \<rightarrow> s \<unlhd> s''\<close>
proof(rule "\<rightarrow>I"; frule "&E"(1); drule "&E"(2);
safe intro!: "&I" GEN "\<rightarrow>I" "sit-part-whole"[THEN "\<equiv>\<^sub>d\<^sub>fI"] Situation.\<psi>)
fix p
AOT_assume \<open>s \<Turnstile> p\<close>
moreover AOT_assume \<open>s \<unlhd> s'\<close>
ultimately AOT_have \<open>s' \<Turnstile> p\<close>
using "sit-part-whole"[THEN "\<equiv>\<^sub>d\<^sub>fE", THEN "&E"(2),
THEN "\<forall>E"(2)[where \<beta>=p], THEN "\<rightarrow>E"] by blast
moreover AOT_assume \<open>s' \<unlhd> s''\<close>
ultimately AOT_show \<open>s'' \<Turnstile> p\<close>
using "sit-part-whole"[THEN "\<equiv>\<^sub>d\<^sub>fE", THEN "&E"(2),
THEN "\<forall>E"(2)[where \<beta>=p], THEN "\<rightarrow>E"] by blast
qed
AOT_theorem "sit-identity2:1": \<open>s = s' \<equiv> s \<unlhd> s' & s' \<unlhd> s\<close>
proof (safe intro!: "\<equiv>I" "&I" "\<rightarrow>I")
AOT_show \<open>s \<unlhd> s'\<close> if \<open>s = s'\<close>
using "rule=E" "part:1" that by blast
next
AOT_show \<open>s' \<unlhd> s\<close> if \<open>s = s'\<close>
using "rule=E" "part:1" that[symmetric] by blast
next
AOT_assume \<open>s \<unlhd> s' & s' \<unlhd> s\<close>
AOT_thus \<open>s = s'\<close> using "part:2"[THEN "\<rightarrow>E", OF "&I"]
by (metis "\<equiv>\<^sub>d\<^sub>fI" "&E"(1) "&E"(2) "=-infix" "raa-cor:3")
qed
AOT_theorem "sit-identity2:2": \<open>s = s' \<equiv> \<forall>s'' (s'' \<unlhd> s \<equiv> s'' \<unlhd> s')\<close>
proof(safe intro!: "\<equiv>I" "\<rightarrow>I" Situation.GEN "sit-identity"[THEN "\<equiv>E"(2)]
GEN[where 'a=\<o>])
AOT_show \<open>s'' \<unlhd> s'\<close> if \<open>s'' \<unlhd> s\<close> and \<open>s = s'\<close> for s''
using "rule=E" that by blast
next
AOT_show \<open>s'' \<unlhd> s\<close> if \<open>s'' \<unlhd> s'\<close> and \<open>s = s'\<close> for s''
using "rule=E" id_sym that by blast
next
AOT_show \<open>s' \<Turnstile> p\<close> if \<open>s \<Turnstile> p\<close> and \<open>\<forall>s'' (s'' \<unlhd> s \<equiv> s'' \<unlhd> s')\<close> for p
using "sit-part-whole"[THEN "\<equiv>\<^sub>d\<^sub>fE", THEN "&E"(2),
OF that(2)[THEN "Situation.\<forall>E", THEN "\<equiv>E"(1), OF "part:1"],
THEN "\<forall>E"(2), THEN "\<rightarrow>E", OF that(1)].
next
AOT_show \<open>s \<Turnstile> p\<close> if \<open>s' \<Turnstile> p\<close> and \<open>\<forall>s'' (s'' \<unlhd> s \<equiv> s'' \<unlhd> s')\<close> for p
using "sit-part-whole"[THEN "\<equiv>\<^sub>d\<^sub>fE", THEN "&E"(2),
OF that(2)[THEN "Situation.\<forall>E", THEN "\<equiv>E"(2), OF "part:1"],
THEN "\<forall>E"(2), THEN "\<rightarrow>E", OF that(1)].
qed
(* TODO: removed in PLM *)
AOT_define Persistent :: \<open>\<phi> \<Rightarrow> \<phi>\<close> (\<open>Persistent'(_')\<close>)
persistent: \<open>Persistent(p) \<equiv>\<^sub>d\<^sub>f \<forall>s (s \<Turnstile> p \<rightarrow> \<forall>s' (s \<unlhd> s' \<rightarrow> s' \<Turnstile> p))\<close>
AOT_theorem "pers-prop": \<open>\<forall>p Persistent(p)\<close>
by (safe intro!: GEN[where 'a=\<o>] Situation.GEN persistent[THEN "\<equiv>\<^sub>d\<^sub>fI"] "\<rightarrow>I")
(simp add: "sit-part-whole"[THEN "\<equiv>\<^sub>d\<^sub>fE", THEN "&E"(2), THEN "\<forall>E"(2), THEN "\<rightarrow>E"])
(* TODO: put this at the correct place *)
AOT_theorem "sit-comp-simp:1": \<open>\<exists>s\<forall>p(s \<Turnstile> p \<equiv> \<phi>{p})\<close>
proof -
AOT_have \<open>\<exists>x (A!x & \<forall>F(x[F] \<equiv> \<exists>p (\<phi>{p} & F = [\<lambda>y p])))\<close>
using "A-objects" "vdash-properties:1[2]" by force
then AOT_obtain c where c_prop: \<open>A!c & \<forall>F(c[F] \<equiv> \<exists>p (\<phi>{p} & F = [\<lambda>y p]))\<close>
using "\<exists>E" by meson
AOT_have sit_c: \<open>Situation(c)\<close>
proof(safe intro!: "\<equiv>\<^sub>d\<^sub>fI"[OF situations] "&I" GEN "\<rightarrow>I")
AOT_show \<open>A!c\<close>
using c_prop "&E" by blast
next
fix F
AOT_assume \<open>c[F]\<close>
AOT_hence F_eq: \<open>\<exists>p (\<phi>{p} & F = [\<lambda>y p])\<close>
using "con-dis-i-e:2:b" "intro-elim:3:a" "rule-ui:3" c_prop by blast
then AOT_obtain q where q_prop: \<open>\<phi>{q} & F = [\<lambda>y q]\<close>
using "\<exists>E" by meson
AOT_show \<open>Propositional([F])\<close>
proof(rule "prop-prop1"[THEN "\<equiv>\<^sub>d\<^sub>fI"])
AOT_show "\<exists>p F = [\<lambda>y p]"
using q_prop[THEN "&E"(2)] "\<exists>I"(1)
by (metis "log-prop-prop:2")
qed
qed
moreover AOT_have \<open>\<forall>p(c \<Turnstile> p \<equiv> \<phi>{p})\<close>
proof(safe intro!: GEN "\<equiv>I" "\<rightarrow>I")
fix p
AOT_assume \<open>c \<Turnstile> p\<close>
AOT_hence 1: \<open>c[\<lambda>y p]\<close>
using "intro-elim:3:a" "vdash-properties:10" calculation lem1 by blast
AOT_have \<open>\<exists>q (\<phi>{q} & [\<lambda>y p] = [\<lambda>y q])\<close>
by (safe intro!: c_prop[THEN "&E"(2), THEN "\<forall>E"(1)[where \<tau>="\<guillemotleft>[\<lambda>y p]\<guillemotright>"], THEN "\<equiv>E"(1)] 1 "cqt:2")
then AOT_obtain q where 2: \<open>\<phi>{q} & [\<lambda>y p] = [\<lambda>y q]\<close>
using "\<exists>E" by meson
AOT_hence \<open>p = q\<close>
using "con-dis-i-e:2:b" "intro-elim:3:b" "p-identity-thm2:3" by blast
AOT_thus \<open>\<phi>{p}\<close>
using 2
using "con-dis-i-e:2:a" "rule=E" id_sym by blast
next
fix p
AOT_assume \<open>\<phi>{p}\<close>
moreover AOT_have \<open>[\<lambda>y p] = [\<lambda>y p]\<close>
by (simp add: "prop-prop2:2" "rule=I:1")
ultimately AOT_have \<open>\<phi>{p} & [\<lambda>y p] = [\<lambda>y p]\<close> using "&I" by blast
AOT_hence \<open>\<exists>q (\<phi>{q} & [\<lambda>y p] = [\<lambda>y q])\<close>
using "\<exists>I" by fast
AOT_hence \<open>c[\<lambda>y p]\<close>
by (safe intro!: c_prop[THEN "&E"(2), THEN "\<forall>E"(1)[where \<tau>="\<guillemotleft>[\<lambda>y p]\<guillemotright>"], THEN "\<equiv>E"(2)] "cqt:2")
AOT_thus \<open>c \<Turnstile> p\<close>
by (metis "intro-elim:3:b" "vdash-properties:10" sit_c lem1)
qed
ultimately AOT_show \<open>\<exists>s\<forall>p(s \<Turnstile> p \<equiv> \<phi>{p})\<close>
by (meson "con-dis-i-e:1" "existential:2[const_var]")
qed
AOT_theorem "sit-comp-simp:3": \<open>\<^bold>\<iota>s \<forall>p(s \<Turnstile> p \<equiv> \<phi>{p})\<down>\<close>
proof (safe intro!: "actual-desc:1"[THEN "\<equiv>E"(2)] "uniqueness:2"[THEN "\<equiv>E"(2)])
AOT_obtain s where s_prop: \<open>\<forall>p(s \<Turnstile> p \<equiv> \<^bold>\<A>\<phi>{p})\<close>
using "sit-comp-simp:1" Situation.instantiation[rotated] by meson
AOT_have \<open>\<forall>y (\<^bold>\<A>(Situation(y) & \<forall>p (y \<Turnstile> p \<equiv> \<phi>{p})) \<equiv> y = s)\<close>
proof(safe intro!: GEN "\<equiv>I" "\<rightarrow>I")
fix y
AOT_assume \<open>\<^bold>\<A>(Situation(y) & \<forall>p (y \<Turnstile> p \<equiv> \<phi>{p}))\<close>
AOT_hence \<open>\<^bold>\<A>Situation(y)\<close> and 2: \<open>\<^bold>\<A>\<forall>p (y \<Turnstile> p \<equiv> \<phi>{p})\<close>
using "&E" "Act-Basic:2" "\<equiv>E"(1) by blast+
AOT_hence y_sit: \<open>Situation(y)\<close>
using "intro-elim:3:a" "possit-sit:4" by blast
AOT_have \<open>\<forall>p \<^bold>\<A>(y \<Turnstile> p \<equiv> \<phi>{p})\<close>
using 2 "\<equiv>E"(1) "logic-actual-nec:3"[axiom_inst] by blast
AOT_hence \<open>\<^bold>\<A>(y \<Turnstile> p \<equiv> \<phi>{p})\<close> for p using "\<forall>E" by blast
AOT_hence 3: \<open>\<^bold>\<A>y \<Turnstile> p \<equiv> \<^bold>\<A>\<phi>{p}\<close> for p
using "Act-Basic:5" "\<equiv>E"(1) by blast
AOT_show \<open>y = s\<close>
proof(safe intro!: "sit-identity"[unconstrain s, THEN "\<rightarrow>E", OF y_sit, THEN "\<equiv>E"(2)] GEN "\<equiv>I" "\<rightarrow>I")
fix p
AOT_assume \<open>y \<Turnstile> p\<close>
AOT_hence \<open>\<^bold>\<A>y \<Turnstile> p\<close>
using "lem2:4"[unconstrain s, THEN "\<rightarrow>E", OF y_sit]
using "intro-elim:3:b" by blast
AOT_hence \<open>\<^bold>\<A>\<phi>{p}\<close>
using 3 "intro-elim:3:a" by blast
AOT_thus \<open>s \<Turnstile> p\<close>
using s_prop "intro-elim:3:b" "rule-ui:2[const_var]" by blast
next
fix p
AOT_assume \<open>s \<Turnstile> p\<close>
AOT_hence \<open>\<^bold>\<A>\<phi>{p}\<close>
using "intro-elim:3:a" "rule-ui:3" s_prop by blast
AOT_hence \<open>\<^bold>\<A>y \<Turnstile> p\<close>
using "3" "intro-elim:3:b" by blast
AOT_thus \<open>y \<Turnstile> p\<close>
using "lem2:4"[unconstrain s, THEN "\<rightarrow>E", OF y_sit]
using "intro-elim:3:a" by blast
qed
next
fix y
AOT_assume \<open>y = s\<close>
moreover AOT_have \<open>\<^bold>\<A>(Situation(s) & \<forall>p (s \<Turnstile> p \<equiv> \<phi>{p}))\<close>
proof(safe intro!: "act-conj-act:3"[THEN "\<rightarrow>E"] "&I" "logic-actual-nec:3"[axiom_inst, THEN "\<equiv>E"(2)] GEN)
AOT_show \<open>\<^bold>\<A>Situation(s)\<close>
using "\<equiv>E"(2) "possit-sit:4" "Situation.\<psi>" by blast
next
AOT_show \<open>\<^bold>\<A>(s \<Turnstile> p \<equiv> \<phi>{p})\<close> for p
proof(safe intro!: "Act-Basic:5"[THEN "\<equiv>E"(2)] "\<equiv>I" "\<rightarrow>I")
AOT_assume \<open>\<^bold>\<A>s \<Turnstile> p\<close>
AOT_hence \<open>s \<Turnstile> p\<close>
using "intro-elim:3:a" "lem2:4" by blast
AOT_thus \<open>\<^bold>\<A>\<phi>{p}\<close>
using s_prop "intro-elim:3:a" "rule-ui:3" by blast
next
AOT_assume \<open>\<^bold>\<A>\<phi>{p}\<close>
AOT_hence \<open>s \<Turnstile> p\<close>
using "intro-elim:3:b" "rule-ui:3" s_prop by blast
AOT_thus \<open>\<^bold>\<A>s \<Turnstile> p\<close>
using "intro-elim:3:b" "lem2:4" by blast
qed
qed
ultimately AOT_show \<open>\<^bold>\<A>(Situation(y) & \<forall>p (y \<Turnstile> p \<equiv> \<phi>{p}))\<close>
using id_sym "l-identity"[axiom_inst, THEN "\<rightarrow>E", THEN "\<rightarrow>E"] by fast
qed
AOT_thus \<open>\<exists>x \<forall>y (\<^bold>\<A>(Situation(y) & \<forall>p (y \<Turnstile> p \<equiv> \<phi>{p})) \<equiv> y = x)\<close>
using "\<exists>I" by fast
qed
AOT_theorem "sit-comp-simp:4":
assumes \<open>RIGID_CONDITION(\<phi>)\<close>
shows \<open>y = \<^bold>\<iota>s \<forall>p(s \<Turnstile> p \<equiv> \<phi>{p}) \<rightarrow> \<forall>p (y \<Turnstile> p \<equiv> \<phi>{p})\<close>
proof(rule "\<rightarrow>I")
AOT_assume \<open>y = \<^bold>\<iota>s(\<forall>p (s \<Turnstile> p \<equiv> \<phi>{p}))\<close>
AOT_hence 0: \<open>\<^bold>\<A>(Situation(y) & \<forall>p (y \<Turnstile> p \<equiv> \<phi>{p}))\<close>
using "actual-desc:2" "\<rightarrow>E" by blast
AOT_hence \<open>\<^bold>\<A>\<forall>p (y \<Turnstile> p \<equiv> \<phi>{p})\<close>
using "Act-Basic:2" "con-dis-i-e:2:b" "intro-elim:3:a" by blast
AOT_hence 1: \<open>\<forall>p \<^bold>\<A>(y \<Turnstile> p \<equiv> \<phi>{p})\<close>
using "intro-elim:3:a" "logic-actual-nec:3" "vdash-properties:1[2]" by blast
AOT_have sit_y: \<open>Situation(y)\<close>
using 0 "&E"(1) "Act-Basic:2" "intro-elim:3:a" "possit-sit:4" by blast
AOT_show \<open>\<forall>p (y \<Turnstile> p \<equiv> \<phi>{p})\<close>
proof(rule GEN)
fix p
AOT_have \<open>\<^bold>\<A>(y \<Turnstile> p \<equiv> \<phi>{p})\<close>
using 1 "\<forall>E" by blast
AOT_hence \<open>\<^bold>\<A>y \<Turnstile> p \<equiv> \<^bold>\<A>\<phi>{p}\<close>
using "Act-Basic:5" "intro-elim:3:a" by blast
moreover {
AOT_have \<open>\<box>(\<phi>{p} \<rightarrow> \<box>\<phi>{p})\<close>
using "strict-can:1[E]"[OF assms] RN "BFs:2" "\<rightarrow>E" "\<forall>E" by blast
AOT_hence \<open>\<^bold>\<A>\<phi>{p} \<equiv> \<phi>{p}\<close>
using "sc-eq-fur:2" "vdash-properties:10" by blast
}
ultimately AOT_show \<open>y \<Turnstile> p \<equiv> \<phi>{p}\<close>
using "lem2:4"[unconstrain s, THEN "\<rightarrow>E", OF sit_y]
by (meson "intro-elim:3:f")
qed
qed
AOT_theorem "sit-comp-simp-unique": \<open>\<exists>!s\<forall>p(s \<Turnstile> p \<equiv> \<phi>{p})\<close>
proof(safe intro!: "uniqueness:1"[THEN "\<equiv>\<^sub>d\<^sub>fI"])
AOT_obtain s where s_prop: \<open>\<forall>p(s \<Turnstile> p \<equiv> \<phi>{p})\<close>
using "sit-comp-simp:1" Situation.instantiation[rotated] by meson
AOT_show \<open>\<exists>\<alpha> (Situation(\<alpha>) & \<forall>p (\<alpha> \<Turnstile> p \<equiv> \<phi>{p}) & \<forall>\<beta> (Situation(\<beta>) & \<forall>p (\<beta> \<Turnstile> p \<equiv> \<phi>{p}) \<rightarrow> \<beta> = \<alpha>))\<close>
proof(safe intro!: "\<exists>I"(2) "&I")
AOT_show \<open>Situation(s)\<close>
using "Situation.\<psi>" by auto
next
AOT_show \<open>\<forall>p(s \<Turnstile> p \<equiv> \<phi>{p})\<close> using s_prop.
next
AOT_show \<open>\<forall>\<beta> (Situation(\<beta>) & \<forall>p (\<beta> \<Turnstile> p \<equiv> \<phi>{p}) \<rightarrow> \<beta> = s)\<close>
proof(safe intro!: GEN "\<rightarrow>I")
fix x
AOT_assume 1: \<open>Situation(x) & \<forall>p (x \<Turnstile> p \<equiv> \<phi>{p})\<close>
AOT_show \<open>x = s\<close>
proof (safe intro!: "sit-identity"[unconstrain s, THEN "\<rightarrow>E", THEN "\<equiv>E"(2)] 1[THEN "&E"(1)] GEN "\<equiv>I" "\<rightarrow>I")
fix p
AOT_assume \<open>x \<Turnstile> p\<close>
AOT_hence \<open>\<phi>{p}\<close>
using "1" "con-dis-i-e:2:b" "intro-elim:3:a" "log-prop-prop:2" "rule-ui:1" by blast
AOT_thus \<open>s \<Turnstile> p\<close>
using s_prop "intro-elim:3:b" "log-prop-prop:2" "rule-ui:1" by blast
next
fix p
AOT_assume \<open>s \<Turnstile> p\<close>
AOT_hence \<open>\<phi>{p}\<close>
using "intro-elim:3:a" "log-prop-prop:2" "rule-ui:1" s_prop by blast
AOT_thus \<open>x \<Turnstile> p\<close>
using "1" "con-dis-i-e:2:b" "intro-elim:3:b" "log-prop-prop:2" "rule-ui:1" by blast
qed
qed
qed
qed
AOT_define NullSituation :: \<open>\<tau> \<Rightarrow> \<phi>\<close> (\<open>NullSituation'(_')\<close>)
"df-null-trivial:1": \<open>NullSituation(s) \<equiv>\<^sub>d\<^sub>f \<not>\<exists>p s \<Turnstile> p\<close>
AOT_define TrivialSituation :: \<open>\<tau> \<Rightarrow> \<phi>\<close> (\<open>TrivialSituation'(_')\<close>)
"df-null-trivial:2": \<open>TrivialSituation(s) \<equiv>\<^sub>d\<^sub>f \<forall>p s \<Turnstile> p\<close>
AOT_theorem "thm-null-trivial:1": \<open>\<exists>!x NullSituation(x)\<close>
proof (AOT_subst \<open>NullSituation(x)\<close> \<open>A!x & \<forall>F (x[F] \<equiv> F \<noteq> F)\<close> for: x)
AOT_modally_strict {
AOT_show \<open>NullSituation(x) \<equiv> A!x & \<forall>F (x[F] \<equiv> F \<noteq> F)\<close> for x
proof (safe intro!: "\<equiv>I" "\<rightarrow>I" "df-null-trivial:1"[THEN "\<equiv>\<^sub>d\<^sub>fI"]
dest!: "df-null-trivial:1"[THEN "\<equiv>\<^sub>d\<^sub>fE"])
AOT_assume 0: \<open>Situation(x) & \<not>\<exists>p x \<Turnstile> p\<close>
AOT_have 1: \<open>A!x\<close>
using 0[THEN "&E"(1), THEN situations[THEN "\<equiv>\<^sub>d\<^sub>fE"], THEN "&E"(1)].
AOT_have 2: \<open>x[F] \<rightarrow> \<exists>p F = [\<lambda>y p]\<close> for F
using 0[THEN "&E"(1), THEN situations[THEN "\<equiv>\<^sub>d\<^sub>fE"],
THEN "&E"(2), THEN "\<forall>E"(2)]
by (metis "\<equiv>\<^sub>d\<^sub>fE" "\<rightarrow>I" "prop-prop1" "\<rightarrow>E")
AOT_show \<open>A!x & \<forall>F (x[F] \<equiv> F \<noteq> F)\<close>
proof (safe intro!: "&I" 1 GEN "\<equiv>I" "\<rightarrow>I")
fix F
AOT_assume \<open>x[F]\<close>
moreover AOT_obtain p where \<open>F = [\<lambda>y p]\<close>
using calculation 2[THEN "\<rightarrow>E"] "\<exists>E"[rotated] by blast
ultimately AOT_have \<open>x[\<lambda>y p]\<close>
by (metis "rule=E")
AOT_hence \<open>x \<Turnstile> p\<close>
using lem1[THEN "\<rightarrow>E", OF 0[THEN "&E"(1)], THEN "\<equiv>E"(2)] by blast
AOT_hence \<open>\<exists>p (x \<Turnstile> p)\<close>
by (rule "\<exists>I")
AOT_thus \<open>F \<noteq> F\<close>
using 0[THEN "&E"(2)] "raa-cor:1" "&I" by blast
next
fix F :: \<open><\<kappa>> AOT_var\<close>
AOT_assume \<open>F \<noteq> F\<close>
AOT_hence \<open>\<not>(F = F)\<close> by (metis "\<equiv>\<^sub>d\<^sub>fE" "=-infix")
moreover AOT_have \<open>F = F\<close>
by (simp add: "id-eq:1")
ultimately AOT_show \<open>x[F]\<close> using "&I" "raa-cor:1" by blast
qed
next
AOT_assume 0: \<open>A!x & \<forall>F (x[F] \<equiv> F \<noteq> F)\<close>
AOT_hence \<open>x[F] \<equiv> F \<noteq> F\<close> for F
using "\<forall>E" "&E" by blast
AOT_hence 1: \<open>\<not>x[F]\<close> for F
using "\<equiv>\<^sub>d\<^sub>fE" "id-eq:1" "=-infix" "reductio-aa:1" "\<equiv>E"(1) by blast
AOT_show \<open>Situation(x) & \<not>\<exists>p x \<Turnstile> p\<close>
proof (safe intro!: "&I" situations[THEN "\<equiv>\<^sub>d\<^sub>fI"] 0[THEN "&E"(1)] GEN "\<rightarrow>I")
AOT_show \<open>Propositional([F])\<close> if \<open>x[F]\<close> for F
using that 1 "&I" "raa-cor:1" by fast
next
AOT_show \<open>\<not>\<exists>p x \<Turnstile> p\<close>
proof(rule "raa-cor:2")
AOT_assume \<open>\<exists>p x \<Turnstile> p\<close>
then AOT_obtain p where \<open>x \<Turnstile> p\<close> using "\<exists>E"[rotated] by blast
AOT_hence \<open>x[\<lambda>y p]\<close>
using "\<equiv>\<^sub>d\<^sub>fE" "&E"(1) "\<equiv>E"(1) lem1 "modus-tollens:1"
"raa-cor:3" "true-in-s" by fast
moreover AOT_have \<open>\<not>x[\<lambda>y p]\<close>
by (rule 1[unvarify F]) "cqt:2[lambda]"
ultimately AOT_show \<open>p & \<not>p\<close> for p using "&I" "raa-cor:1" by blast
qed
qed
qed
}
next
AOT_show \<open>\<exists>!x ([A!]x & \<forall>F (x[F] \<equiv> F \<noteq> F))\<close>
by (simp add: "A-objects!")
qed
AOT_theorem "thm-null-trivial:2": \<open>\<exists>!x TrivialSituation(x)\<close>
proof (AOT_subst \<open>TrivialSituation(x)\<close> \<open>A!x & \<forall>F (x[F] \<equiv> \<exists>p F = [\<lambda>y p])\<close> for: x)
AOT_modally_strict {
AOT_show \<open>TrivialSituation(x) \<equiv> A!x & \<forall>F (x[F] \<equiv> \<exists>p F = [\<lambda>y p])\<close> for x
proof (safe intro!: "\<equiv>I" "\<rightarrow>I" "df-null-trivial:2"[THEN "\<equiv>\<^sub>d\<^sub>fI"]
dest!: "df-null-trivial:2"[THEN "\<equiv>\<^sub>d\<^sub>fE"])
AOT_assume 0: \<open>Situation(x) & \<forall>p x \<Turnstile> p\<close>
AOT_have 1: \<open>A!x\<close>
using 0[THEN "&E"(1), THEN situations[THEN "\<equiv>\<^sub>d\<^sub>fE"], THEN "&E"(1)].
AOT_have 2: \<open>x[F] \<rightarrow> \<exists>p F = [\<lambda>y p]\<close> for F
using 0[THEN "&E"(1), THEN situations[THEN "\<equiv>\<^sub>d\<^sub>fE"],
THEN "&E"(2), THEN "\<forall>E"(2)]
by (metis "\<equiv>\<^sub>d\<^sub>fE" "deduction-theorem" "prop-prop1" "\<rightarrow>E")
AOT_show \<open>A!x & \<forall>F (x[F] \<equiv> \<exists>p F = [\<lambda>y p])\<close>
proof (safe intro!: "&I" 1 GEN "\<equiv>I" "\<rightarrow>I" 2)
fix F
AOT_assume \<open>\<exists>p F = [\<lambda>y p]\<close>
then AOT_obtain p where \<open>F = [\<lambda>y p]\<close>
using "\<exists>E"[rotated] by blast
moreover AOT_have \<open>x \<Turnstile> p\<close>
using 0[THEN "&E"(2)] "\<forall>E" by blast
ultimately AOT_show \<open>x[F]\<close>
by (metis 0 "rule=E" "&E"(1) id_sym "\<equiv>E"(2) lem1
"Commutativity of \<equiv>" "\<rightarrow>E")
qed
next
AOT_assume 0: \<open>A!x & \<forall>F (x[F] \<equiv> \<exists>p F = [\<lambda>y p])\<close>
AOT_hence 1: \<open>x[F] \<equiv> \<exists>p F = [\<lambda>y p]\<close> for F
using "\<forall>E" "&E" by blast
AOT_have 2: \<open>Situation(x)\<close>
proof (safe intro!: "&I" situations[THEN "\<equiv>\<^sub>d\<^sub>fI"] 0[THEN "&E"(1)] GEN "\<rightarrow>I")
AOT_show \<open>Propositional([F])\<close> if \<open>x[F]\<close> for F
using 1[THEN "\<equiv>E"(1), OF that]
by (metis "\<equiv>\<^sub>d\<^sub>fI" "prop-prop1")
qed
AOT_show \<open>Situation(x) & \<forall>p (x \<Turnstile> p)\<close>
proof (safe intro!: "&I" 2 0[THEN "&E"(1)] GEN "\<rightarrow>I")
AOT_have \<open>x[\<lambda>y p] \<equiv> \<exists>q [\<lambda>y p] = [\<lambda>y q]\<close> for p
by (rule 1[unvarify F, where \<tau>="\<guillemotleft>[\<lambda>y p]\<guillemotright>"]) "cqt:2[lambda]"
moreover AOT_have \<open>\<exists>q [\<lambda>y p] = [\<lambda>y q]\<close> for p
by (rule "\<exists>I"(2)[where \<beta>=p])
(simp add: "rule=I:1" "prop-prop2:2")
ultimately AOT_have \<open>x[\<lambda>y p]\<close> for p by (metis "\<equiv>E"(2))
AOT_thus \<open>x \<Turnstile> p\<close> for p
by (metis "2" "\<equiv>E"(2) lem1 "\<rightarrow>E")
qed
qed
}
next
AOT_show \<open>\<exists>!x ([A!]x & \<forall>F (x[F] \<equiv> \<exists>p F = [\<lambda>y p]))\<close>
by (simp add: "A-objects!")
qed
AOT_theorem "thm-null-trivial:3": \<open>\<^bold>\<iota>x NullSituation(x)\<down>\<close>
by (meson "A-Exists:2" "RA[2]" "\<equiv>E"(2) "thm-null-trivial:1")
AOT_theorem "thm-null-trivial:4": \<open>\<^bold>\<iota>x TrivialSituation(x)\<down>\<close>
using "A-Exists:2" "RA[2]" "\<equiv>E"(2) "thm-null-trivial:2" by blast
AOT_define TheNullSituation :: \<open>\<kappa>\<^sub>s\<close> (\<open>\<^bold>s\<^sub>\<emptyset>\<close>)
"df-the-null-sit:1": \<open>\<^bold>s\<^sub>\<emptyset> =\<^sub>d\<^sub>f \<^bold>\<iota>x NullSituation(x)\<close>
AOT_define TheTrivialSituation :: \<open>\<kappa>\<^sub>s\<close> (\<open>\<^bold>s\<^sub>V\<close>)
"df-the-null-sit:2": \<open>\<^bold>s\<^sub>V =\<^sub>d\<^sub>f \<^bold>\<iota>x TrivialSituation(x)\<close>
AOT_theorem "null-triv-sc:1": \<open>NullSituation(x) \<rightarrow> \<box>NullSituation(x)\<close>
proof(safe intro!: "\<rightarrow>I" dest!: "df-null-trivial:1"[THEN "\<equiv>\<^sub>d\<^sub>fE"];
frule "&E"(1); drule "&E"(2))
AOT_assume 1: \<open>\<not>\<exists>p (x \<Turnstile> p)\<close>
AOT_assume 0: \<open>Situation(x)\<close>
AOT_hence \<open>\<box>Situation(x)\<close> by (metis "\<equiv>E"(1) "possit-sit:1")
moreover AOT_have \<open>\<box>\<not>\<exists>p (x \<Turnstile> p)\<close>
proof(rule "raa-cor:1")
AOT_assume \<open>\<not>\<box>\<not>\<exists>p (x \<Turnstile> p)\<close>
AOT_hence \<open>\<diamond>\<exists>p (x \<Turnstile> p)\<close>
by (metis "\<equiv>\<^sub>d\<^sub>fI" "conventions:5")
AOT_hence \<open>\<exists>p \<diamond>(x \<Turnstile> p)\<close> by (metis "BF\<diamond>" "\<rightarrow>E")
then AOT_obtain p where \<open>\<diamond>(x \<Turnstile> p)\<close> using "\<exists>E"[rotated] by blast
AOT_hence \<open>x \<Turnstile> p\<close>
by (metis "\<equiv>E"(1) "lem2:2"[unconstrain s, THEN "\<rightarrow>E", OF 0])
AOT_hence \<open>\<exists>p x \<Turnstile> p\<close> using "\<exists>I" by fast
AOT_thus \<open>\<exists>p x \<Turnstile> p & \<not>\<exists>p x \<Turnstile> p\<close> using 1 "&I" by blast
qed
ultimately AOT_have 2: \<open>\<box>(Situation(x) & \<not>\<exists>p x \<Turnstile> p)\<close>
by (metis "KBasic:3" "&I" "\<equiv>E"(2))
AOT_show \<open>\<box>NullSituation(x)\<close>
by (AOT_subst \<open>NullSituation(x)\<close> \<open>Situation(x) & \<not>\<exists>p x \<Turnstile> p\<close>)
(auto simp: "df-null-trivial:1" "\<equiv>Df" 2)
qed
AOT_theorem "null-triv-sc:2": \<open>TrivialSituation(x) \<rightarrow> \<box>TrivialSituation(x)\<close>
proof(safe intro!: "\<rightarrow>I" dest!: "df-null-trivial:2"[THEN "\<equiv>\<^sub>d\<^sub>fE"];
frule "&E"(1); drule "&E"(2))
AOT_assume 0: \<open>Situation(x)\<close>
AOT_hence 1: \<open>\<box>Situation(x)\<close> by (metis "\<equiv>E"(1) "possit-sit:1")
AOT_assume \<open>\<forall>p x \<Turnstile> p\<close>
AOT_hence \<open>x \<Turnstile> p\<close> for p
using "\<forall>E" by blast
AOT_hence \<open>\<box>x \<Turnstile> p\<close> for p
using 0 "\<equiv>E"(1) "lem2:1"[unconstrain s, THEN "\<rightarrow>E"] by blast
AOT_hence \<open>\<forall>p \<box>x \<Turnstile> p\<close>
by (rule GEN)
AOT_hence \<open>\<box>\<forall>p x \<Turnstile> p\<close>
by (rule BF[THEN "\<rightarrow>E"])
AOT_hence 2: \<open>\<box>(Situation(x) & \<forall>p x \<Turnstile> p)\<close>
using 1 by (metis "KBasic:3" "&I" "\<equiv>E"(2))
AOT_show \<open>\<box>TrivialSituation(x)\<close>
by (AOT_subst \<open>TrivialSituation(x)\<close> \<open>Situation(x) & \<forall>p x \<Turnstile> p\<close>)
(auto simp: "df-null-trivial:2" "\<equiv>Df" 2)
qed
AOT_theorem "null-triv-sc:3": \<open>NullSituation(\<^bold>s\<^sub>\<emptyset>)\<close>
by (safe intro!: "df-the-null-sit:1"[THEN "=\<^sub>d\<^sub>fI"(2)] "thm-null-trivial:3"
"rule=I:1"[OF "thm-null-trivial:3"]
"!box-desc:2"[THEN "\<rightarrow>E", THEN "\<rightarrow>E", rotated, OF "thm-null-trivial:1",
OF "\<forall>I", OF "null-triv-sc:1", THEN "\<forall>E"(1), THEN "\<rightarrow>E"])
AOT_theorem "null-triv-sc:4": \<open>TrivialSituation(\<^bold>s\<^sub>V)\<close>
by (safe intro!: "df-the-null-sit:2"[THEN "=\<^sub>d\<^sub>fI"(2)] "thm-null-trivial:4"
"rule=I:1"[OF "thm-null-trivial:4"]
"!box-desc:2"[THEN "\<rightarrow>E", THEN "\<rightarrow>E", rotated, OF "thm-null-trivial:2",
OF "\<forall>I", OF "null-triv-sc:2", THEN "\<forall>E"(1), THEN "\<rightarrow>E"])
AOT_theorem "null-triv-facts:1": \<open>NullSituation(x) \<equiv> Null(x)\<close>
proof (safe intro!: "\<equiv>I" "\<rightarrow>I" "df-null-uni:1"[THEN "\<equiv>\<^sub>d\<^sub>fI"]
"df-null-trivial:1"[THEN "\<equiv>\<^sub>d\<^sub>fI"]
dest!: "df-null-uni:1"[THEN "\<equiv>\<^sub>d\<^sub>fE"] "df-null-trivial:1"[THEN "\<equiv>\<^sub>d\<^sub>fE"])
AOT_assume 0: \<open>Situation(x) & \<not>\<exists>p x \<Turnstile> p\<close>
AOT_have 1: \<open>x[F] \<rightarrow> \<exists>p F = [\<lambda>y p]\<close> for F
using 0[THEN "&E"(1), THEN situations[THEN "\<equiv>\<^sub>d\<^sub>fE"], THEN "&E"(2), THEN "\<forall>E"(2)]
by (metis "\<equiv>\<^sub>d\<^sub>fE" "deduction-theorem" "prop-prop1" "\<rightarrow>E")
AOT_show \<open>A!x & \<not>\<exists>F x[F]\<close>
proof (safe intro!: "&I" 0[THEN "&E"(1), THEN situations[THEN "\<equiv>\<^sub>d\<^sub>fE"],
THEN "&E"(1)];
rule "raa-cor:2")
AOT_assume \<open>\<exists>F x[F]\<close>
then AOT_obtain F where F_prop: \<open>x[F]\<close>
using "\<exists>E"[rotated] by blast
AOT_hence \<open>\<exists>p F = [\<lambda>y p]\<close>
using 1[THEN "\<rightarrow>E"] by blast
then AOT_obtain p where \<open>F = [\<lambda>y p]\<close>
using "\<exists>E"[rotated] by blast
AOT_hence \<open>x[\<lambda>y p]\<close>
by (metis "rule=E" F_prop)
AOT_hence \<open>x \<Turnstile> p\<close>
using lem1[THEN "\<rightarrow>E", OF 0[THEN "&E"(1)], THEN "\<equiv>E"(2)] by blast
AOT_hence \<open>\<exists>p x \<Turnstile> p\<close>
by (rule "\<exists>I")
AOT_thus \<open>\<exists>p x \<Turnstile> p & \<not>\<exists>p x \<Turnstile> p\<close>
using 0[THEN "&E"(2)] "&I" by blast
qed
next
AOT_assume 0: \<open>A!x & \<not>\<exists>F x[F]\<close>
AOT_have \<open>Situation(x)\<close>
apply (rule situations[THEN "\<equiv>\<^sub>d\<^sub>fI", OF "&I", OF 0[THEN "&E"(1)]]; rule GEN)
using 0[THEN "&E"(2)] by (metis "\<rightarrow>I" "existential:2[const_var]" "raa-cor:3")
moreover AOT_have \<open>\<not>\<exists>p x \<Turnstile> p\<close>
proof (rule "raa-cor:2")
AOT_assume \<open>\<exists>p x \<Turnstile> p\<close>
then AOT_obtain p where \<open>x \<Turnstile> p\<close> by (metis "instantiation")
AOT_hence \<open>x[\<lambda>y p]\<close> by (metis "\<equiv>\<^sub>d\<^sub>fE" "&E"(2) "prop-enc" "true-in-s")
AOT_hence \<open>\<exists>F x[F]\<close> by (rule "\<exists>I") "cqt:2[lambda]"
AOT_thus \<open>\<exists>F x[F] & \<not>\<exists>F x[F]\<close> using 0[THEN "&E"(2)] "&I" by blast
qed
ultimately AOT_show \<open>Situation(x) & \<not>\<exists>p x \<Turnstile> p\<close> using "&I" by blast
qed
AOT_theorem "null-triv-facts:2": \<open>\<^bold>s\<^sub>\<emptyset> = a\<^sub>\<emptyset>\<close>
apply (rule "=\<^sub>d\<^sub>fI"(2)[OF "df-the-null-sit:1"])
apply (fact "thm-null-trivial:3")
apply (rule "=\<^sub>d\<^sub>fI"(2)[OF "df-null-uni-terms:1"])
apply (fact "null-uni-uniq:3")
apply (rule "equiv-desc-eq:3"[THEN "\<rightarrow>E"])
apply (rule "&I")
apply (fact "thm-null-trivial:3")
by (rule RN; rule GEN; rule "null-triv-facts:1")
AOT_theorem "null-triv-facts:3": \<open>\<^bold>s\<^sub>V \<noteq> a\<^sub>V\<close>
proof(rule "=-infix"[THEN "\<equiv>\<^sub>d\<^sub>fI"])
AOT_have \<open>Universal(a\<^sub>V)\<close>
by (simp add: "null-uni-facts:4")
AOT_hence 0: \<open>a\<^sub>V[A!]\<close>
using "df-null-uni:2"[THEN "\<equiv>\<^sub>d\<^sub>fE"] "&E" "\<forall>E"(1)
by (metis "cqt:5:a" "vdash-properties:10" "vdash-properties:1[2]")
moreover AOT_have 1: \<open>\<not>\<^bold>s\<^sub>V[A!]\<close>
proof(rule "raa-cor:2")
AOT_have \<open>Situation(\<^bold>s\<^sub>V)\<close>
using "\<equiv>\<^sub>d\<^sub>fE" "&E"(1) "df-null-trivial:2" "null-triv-sc:4" by blast
AOT_hence \<open>\<forall>F (\<^bold>s\<^sub>V[F] \<rightarrow> Propositional([F]))\<close>
by (metis "\<equiv>\<^sub>d\<^sub>fE" "&E"(2) situations)
moreover AOT_assume \<open>\<^bold>s\<^sub>V[A!]\<close>
ultimately AOT_have \<open>Propositional(A!)\<close>
using "\<forall>E"(1)[rotated, OF "oa-exist:2"] "\<rightarrow>E" by blast
AOT_thus \<open>Propositional(A!) & \<not>Propositional(A!)\<close>
using "prop-in-f:4:d" "&I" by blast
qed
AOT_show \<open>\<not>(\<^bold>s\<^sub>V = a\<^sub>V)\<close>
proof (rule "raa-cor:2")
AOT_assume \<open>\<^bold>s\<^sub>V = a\<^sub>V\<close>
AOT_hence \<open>\<^bold>s\<^sub>V[A!]\<close> using 0 "rule=E" id_sym by fast
AOT_thus \<open>\<^bold>s\<^sub>V[A!] & \<not>\<^bold>s\<^sub>V[A!]\<close> using 1 "&I" by blast
qed
qed
definition ConditionOnPropositionalProperties :: \<open>(<\<kappa>> \<Rightarrow> \<o>) \<Rightarrow> bool\<close> where
"cond-prop": \<open>ConditionOnPropositionalProperties \<equiv> \<lambda> \<phi> . \<forall> v .
[v \<Turnstile> \<forall>F (\<phi>{F} \<rightarrow> Propositional([F]))]\<close>
syntax ConditionOnPropositionalProperties :: \<open>id_position \<Rightarrow> AOT_prop\<close>
("CONDITION'_ON'_PROPOSITIONAL'_PROPERTIES'(_')")
AOT_theorem "cond-prop[E]":
assumes \<open>CONDITION_ON_PROPOSITIONAL_PROPERTIES(\<phi>)\<close>
shows \<open>\<forall>F (\<phi>{F} \<rightarrow> Propositional([F]))\<close>
using assms[unfolded "cond-prop"] by auto
AOT_theorem "cond-prop[I]":
assumes \<open>\<^bold>\<turnstile>\<^sub>\<box> \<forall>F (\<phi>{F} \<rightarrow> Propositional([F]))\<close>
shows \<open>CONDITION_ON_PROPOSITIONAL_PROPERTIES(\<phi>)\<close>
using assms "cond-prop" by metis
AOT_theorem "pre-comp-sit":
assumes \<open>CONDITION_ON_PROPOSITIONAL_PROPERTIES(\<phi>)\<close>
shows \<open>(Situation(x) & \<forall>F (x[F] \<equiv> \<phi>{F})) \<equiv> (A!x & \<forall>F (x[F] \<equiv> \<phi>{F}))\<close>
proof(rule "\<equiv>I"; rule "\<rightarrow>I")
AOT_assume \<open>Situation(x) & \<forall>F (x[F] \<equiv> \<phi>{F})\<close>
AOT_thus \<open>A!x & \<forall>F (x[F] \<equiv> \<phi>{F})\<close>
using "&E" situations[THEN "\<equiv>\<^sub>d\<^sub>fE"] "&I" by blast
next
AOT_assume 0: \<open>A!x & \<forall>F (x[F] \<equiv> \<phi>{F})\<close>
AOT_show \<open>Situation(x) & \<forall>F (x[F] \<equiv> \<phi>{F})\<close>
proof (safe intro!: situations[THEN "\<equiv>\<^sub>d\<^sub>fI"] "&I")
AOT_show \<open>A!x\<close> using 0[THEN "&E"(1)].
next
AOT_show \<open>\<forall>F (x[F] \<rightarrow> Propositional([F]))\<close>
proof(rule GEN; rule "\<rightarrow>I")
fix F
AOT_assume \<open>x[F]\<close>
AOT_hence \<open>\<phi>{F}\<close>
using 0[THEN "&E"(2)] "\<forall>E" "\<equiv>E" by blast
AOT_thus \<open>Propositional([F])\<close>
using "cond-prop[E]"[OF assms] "\<forall>E" "\<rightarrow>E" by blast
qed
next
AOT_show \<open>\<forall>F (x[F] \<equiv> \<phi>{F})\<close> using 0 "&E" by blast
qed
qed
AOT_theorem "comp-sit:1":
assumes \<open>CONDITION_ON_PROPOSITIONAL_PROPERTIES(\<phi>)\<close>
shows \<open>\<exists>s \<forall>F(s[F] \<equiv> \<phi>{F})\<close>
by (AOT_subst \<open>Situation(x) & \<forall>F(x[F] \<equiv> \<phi>{F})\<close> \<open>A!x & \<forall>F (x[F] \<equiv> \<phi>{F})\<close> for: x)
(auto simp: "pre-comp-sit"[OF assms] "A-objects"[where \<phi>=\<phi>, axiom_inst])
AOT_theorem "comp-sit:2":
assumes \<open>CONDITION_ON_PROPOSITIONAL_PROPERTIES(\<phi>)\<close>
shows \<open>\<exists>!s \<forall>F(s[F] \<equiv> \<phi>{F})\<close>
by (AOT_subst \<open>Situation(x) & \<forall>F(x[F] \<equiv> \<phi>{F})\<close> \<open>A!x & \<forall>F (x[F] \<equiv> \<phi>{F})\<close> for: x)
(auto simp: assms "pre-comp-sit" "pre-comp-sit"[OF assms] "A-objects!")
AOT_theorem "can-sit-desc:1":
assumes \<open>CONDITION_ON_PROPOSITIONAL_PROPERTIES(\<phi>)\<close>
shows \<open>\<^bold>\<iota>s(\<forall>F (s[F] \<equiv> \<phi>{F}))\<down>\<close>
using "comp-sit:2"[OF assms] "A-Exists:2" "RA[2]" "\<equiv>E"(2) by blast
AOT_theorem "can-sit-desc:2":
assumes \<open>CONDITION_ON_PROPOSITIONAL_PROPERTIES(\<phi>)\<close>
shows \<open>\<^bold>\<iota>s(\<forall>F (s[F] \<equiv> \<phi>{F})) = \<^bold>\<iota>x(A!x & \<forall>F (x[F] \<equiv> \<phi>{F}))\<close>
by (auto intro!: "equiv-desc-eq:2"[THEN "\<rightarrow>E", OF "&I",
OF "can-sit-desc:1"[OF assms]]
"RA[2]" GEN "pre-comp-sit"[OF assms])
AOT_theorem "strict-sit":
assumes \<open>RIGID_CONDITION(\<phi>)\<close>
and \<open>CONDITION_ON_PROPOSITIONAL_PROPERTIES(\<phi>)\<close>
shows \<open>y = \<^bold>\<iota>s(\<forall>F (s[F] \<equiv> \<phi>{F})) \<rightarrow> \<forall>F (y[F] \<equiv> \<phi>{F})\<close>
using "rule=E"[rotated, OF "can-sit-desc:2"[OF assms(2), symmetric]]
"box-phi-a:2"[OF assms(1)] "\<rightarrow>E" "\<rightarrow>I" "&E" by fast
(* TODO: exercise (479) sit-lit *)
AOT_define actual :: \<open>\<tau> \<Rightarrow> \<phi>\<close> (\<open>Actual'(_')\<close>)
\<open>Actual(s) \<equiv>\<^sub>d\<^sub>f \<forall>p (s \<Turnstile> p \<rightarrow> p)\<close>
AOT_theorem "act-and-not-pos": \<open>\<exists>s (Actual(s) & \<diamond>\<not>Actual(s))\<close>
proof -
AOT_obtain q\<^sub>1 where q\<^sub>1_prop: \<open>q\<^sub>1 & \<diamond>\<not>q\<^sub>1\<close>
by (metis "\<equiv>\<^sub>d\<^sub>fE" "instantiation" "cont-tf:1" "cont-tf-thm:1")
AOT_have \<open>\<exists>s (\<forall>F (s[F] \<equiv> F = [\<lambda>y q\<^sub>1]))\<close>
proof (safe intro!: "comp-sit:1" "cond-prop[I]" GEN "\<rightarrow>I")
AOT_modally_strict {
AOT_show \<open>Propositional([F])\<close> if \<open>F = [\<lambda>y q\<^sub>1]\<close> for F
using "\<equiv>\<^sub>d\<^sub>fI" "existential:2[const_var]" "prop-prop1" that by fastforce
}
qed
then AOT_obtain s\<^sub>1 where s_prop: \<open>\<forall>F (s\<^sub>1[F] \<equiv> F = [\<lambda>y q\<^sub>1])\<close>
using "Situation.\<exists>E"[rotated] by meson
AOT_have \<open>Actual(s\<^sub>1)\<close>
proof(safe intro!: actual[THEN "\<equiv>\<^sub>d\<^sub>fI"] "&I" GEN "\<rightarrow>I" s_prop Situation.\<psi>)
fix p
AOT_assume \<open>s\<^sub>1 \<Turnstile> p\<close>
AOT_hence \<open>s\<^sub>1[\<lambda>y p]\<close>
by (metis "\<equiv>\<^sub>d\<^sub>fE" "&E"(2) "prop-enc" "true-in-s")
AOT_hence \<open>[\<lambda>y p] = [\<lambda>y q\<^sub>1]\<close>
by (rule s_prop[THEN "\<forall>E"(1), THEN "\<equiv>E"(1), rotated]) "cqt:2[lambda]"
AOT_hence \<open>p = q\<^sub>1\<close> by (metis "\<equiv>E"(2) "p-identity-thm2:3")
AOT_thus \<open>p\<close> using q\<^sub>1_prop[THEN "&E"(1)] "rule=E" id_sym by fast
qed
moreover AOT_have \<open>\<diamond>\<not>Actual(s\<^sub>1)\<close>
proof(rule "raa-cor:1"; drule "KBasic:12"[THEN "\<equiv>E"(2)])
AOT_assume \<open>\<box>Actual(s\<^sub>1)\<close>
AOT_hence \<open>\<box>(Situation(s\<^sub>1) & \<forall>p (s\<^sub>1 \<Turnstile> p \<rightarrow> p))\<close>
using actual[THEN "\<equiv>Df", THEN "conventions:3"[THEN "\<equiv>\<^sub>d\<^sub>fE"],
THEN "&E"(1), THEN RM, THEN "\<rightarrow>E"] by blast
AOT_hence \<open>\<box>\<forall>p (s\<^sub>1 \<Turnstile> p \<rightarrow> p)\<close>
by (metis "RM:1" "Conjunction Simplification"(2) "\<rightarrow>E")
AOT_hence \<open>\<forall>p \<box>(s\<^sub>1 \<Turnstile> p \<rightarrow> p)\<close>
by (metis "CBF" "vdash-properties:10")
AOT_hence \<open>\<box>(s\<^sub>1 \<Turnstile> q\<^sub>1 \<rightarrow> q\<^sub>1)\<close>
using "\<forall>E" by blast
AOT_hence \<open>\<box>s\<^sub>1 \<Turnstile> q\<^sub>1 \<rightarrow> \<box>q\<^sub>1\<close>
by (metis "\<rightarrow>E" "qml:1" "vdash-properties:1[2]")
moreover AOT_have \<open>s\<^sub>1 \<Turnstile> q\<^sub>1\<close>
using s_prop[THEN "\<forall>E"(1), THEN "\<equiv>E"(2),
THEN lem1[THEN "\<rightarrow>E", OF Situation.\<psi>, THEN "\<equiv>E"(2)]]
"rule=I:1" "prop-prop2:2" by blast
ultimately AOT_have \<open>\<box>q\<^sub>1\<close>
using "\<equiv>\<^sub>d\<^sub>fE" "&E"(1) "\<equiv>E"(1) "lem2:1" "true-in-s" "\<rightarrow>E" by fast
AOT_thus \<open>\<diamond>\<not>q\<^sub>1 & \<not>\<diamond>\<not>q\<^sub>1\<close>
using "KBasic:12"[THEN "\<equiv>E"(1)] q\<^sub>1_prop[THEN "&E"(2)] "&I" by blast