-
Notifications
You must be signed in to change notification settings - Fork 5
/
PL.v
4411 lines (4186 loc) · 125 KB
/
PL.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
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
Require Import Unicode.Utf8.
Require Import Classical_Prop.
Require Import ClassicalFacts.
Require Import PropExtensionality.
Module No1.
Import Unicode.Utf8.
Import ClassicalFacts.
Import Classical_Prop.
Import PropExtensionality.
(*We first give the axioms of Principia in *1.*)
Theorem Impl1_01 : ∀ P Q : Prop,
(P → Q) = (¬P ∨ Q).
Proof. intros P Q.
apply propositional_extensionality.
split.
apply imply_to_or.
apply or_to_imply.
Qed.
(*This is a notational definition in Principia:
It is used to switch between "∨" and "→".*)
Theorem MP1_1 : ∀ P Q : Prop,
(P → Q) → P → Q. (*Modus ponens*)
Proof. intros P Q.
intros iff_refl.
apply iff_refl.
Qed.
(*1.11 ommitted: it is MP for propositions
containing variables. Likewise, ommitted
the well-formedness rules 1.7, 1.71, 1.72*)
Theorem Taut1_2 : ∀ P : Prop,
P ∨ P → P. (*Tautology*)
Proof. intros P.
apply imply_and_or.
apply iff_refl.
Qed.
Theorem Add1_3 : ∀ P Q : Prop,
Q → P ∨ Q. (*Addition*)
Proof. intros P Q.
apply or_intror.
Qed.
Theorem Perm1_4 : ∀ P Q : Prop,
P ∨ Q → Q ∨ P. (*Permutation*)
Proof. intros P Q.
apply or_comm.
Qed.
(* Reference: https://softwarefoundations.cis.upenn.edu/lf-current/Logic.html#or_assoc *)
Theorem Assoc1_5: ∀ P Q R : Prop,
P ∨ (Q ∨ R) → Q ∨ (P ∨ R).
Proof.
intros P Q R.
intros [H | [H | H]].
- right. left. apply H.
- left. apply H.
- right. right. apply H.
Qed.
(* Theorem Assoc1_5 : ∀ P Q R : Prop,
P ∨ (Q ∨ R) → Q ∨ (P ∨ R). (*Association*)
Proof. intros P Q R.
specialize or_assoc with P Q R.
intros or_assoc1.
replace (P∨Q∨R) with ((P∨Q)∨R).
specialize or_comm with P Q.
intros or_comm1.
replace (P∨Q) with (Q∨P).
specialize or_assoc with Q P R.
intros or_assoc2.
replace ((Q∨P)∨R) with (Q∨P∨R).
apply iff_refl.
apply propositional_extensionality.
apply iff_sym.
apply or_assoc2.
apply propositional_extensionality.
apply or_comm.
apply propositional_extensionality.
apply or_assoc.
Qed. *)
Theorem Sum1_6 : ∀ P Q R : Prop,
(Q → R) → (P ∨ Q → P ∨ R). (*Summation*)
Proof. intros P Q R.
specialize imply_and_or2 with Q R P.
intros imply_and_or2a.
replace (P∨Q) with (Q∨P).
replace (P∨R) with (R∨P).
apply imply_and_or2a.
apply propositional_extensionality.
apply or_comm.
apply propositional_extensionality.
apply or_comm.
Qed.
Ltac MP H1 H2 :=
match goal with
| [ H1 : ?P → ?Q, H2 : ?P |- _ ] =>
specialize (H1 H2)
end.
(*We give this Ltac "MP" to make proofs
more human-readable and to more
closely mirror Principia's style.*)
End No1.
Module No2.
Import No1.
(*We proceed to the deductions of of Principia.*)
Theorem Abs2_01 : ∀ P : Prop,
(P → ¬P) → ¬P.
Proof. intros P.
specialize Taut1_2 with (¬P).
intros Taut1_2.
replace (¬P ∨ ¬P) with (P → ¬P) in Taut1_2
by now rewrite Impl1_01.
exact Taut1_2.
Qed.
Theorem Simp2_02 : ∀ P Q : Prop,
Q → (P → Q).
Proof. intros P Q.
specialize Add1_3 with (¬P) Q.
intros Add1_3.
replace (¬P ∨ Q) with (P → Q) in Add1_3
by now rewrite Impl1_01.
exact Add1_3.
Qed.
Theorem Transp2_03 : ∀ P Q : Prop,
(P → ¬Q) → (Q → ¬P).
Proof. intros P Q.
specialize Perm1_4 with (¬P) (¬Q).
intros Perm1_4.
replace (¬P ∨ ¬Q) with (P → ¬Q) in Perm1_4
by now rewrite Impl1_01.
replace (¬Q ∨ ¬P) with (Q → ¬P) in Perm1_4
by now rewrite Impl1_01.
exact Perm1_4.
Qed.
Theorem Comm2_04 : ∀ P Q R : Prop,
(P → (Q → R)) → (Q → (P → R)).
Proof. intros P Q R.
specialize Assoc1_5 with (¬P) (¬Q) R.
intros Assoc1_5.
replace (¬Q ∨ R) with (Q → R) in Assoc1_5
by now rewrite Impl1_01.
replace (¬P ∨ (Q → R)) with (P → (Q → R)) in Assoc1_5
by now rewrite Impl1_01.
replace (¬P ∨ R) with (P → R) in Assoc1_5
by now rewrite Impl1_01.
replace (¬Q ∨ (P → R)) with (Q → (P → R)) in Assoc1_5
by now rewrite Impl1_01.
exact Assoc1_5.
Qed.
Theorem Syll2_05 : ∀ P Q R : Prop,
(Q → R) → ((P → Q) → (P → R)).
Proof. intros P Q R.
specialize Sum1_6 with (¬P) Q R.
intros Sum1_6.
replace (¬P ∨ Q) with (P → Q) in Sum1_6
by now rewrite Impl1_01.
replace (¬P ∨ R) with (P → R) in Sum1_6
by now rewrite Impl1_01.
exact Sum1_6.
Qed.
Theorem Syll2_06 : ∀ P Q R : Prop,
(P → Q) → ((Q → R) → (P → R)).
Proof. intros P Q R.
specialize Comm2_04 with (Q → R) (P → Q) (P → R).
intros Comm2_04.
specialize Syll2_05 with P Q R.
intros Syll2_05.
MP Comm2_04 Syll2_05.
exact Comm2_04.
Qed.
Theorem n2_07 : ∀ P : Prop,
P → (P ∨ P).
Proof. intros P.
specialize Add1_3 with P P.
intros Add1_3.
exact Add1_3.
Qed.
Theorem Id2_08 : ∀ P : Prop,
P → P.
Proof. intros P.
specialize Syll2_05 with P (P ∨ P) P.
intros Syll2_05.
specialize Taut1_2 with P.
intros Taut1_2.
MP Syll2_05 Taut1_2.
specialize n2_07 with P.
intros n2_07.
MP Syll2_05 n2_07.
exact Syll2_05.
Qed.
Theorem n2_1 : ∀ P : Prop,
(¬P) ∨ P.
Proof. intros P.
specialize Id2_08 with P.
intros Id2_08.
replace (P → P) with (¬P ∨ P) in Id2_08
by now rewrite Impl1_01.
exact Id2_08.
Qed.
Theorem n2_11 : ∀ P : Prop,
P ∨ ¬P.
Proof. intros P.
specialize Perm1_4 with (¬P) P.
intros Perm1_4.
specialize n2_1 with P.
intros n2_1.
MP Perm1_4 n2_1.
exact Perm1_4.
Qed.
Theorem n2_12 : ∀ P : Prop,
P → ¬¬P.
Proof. intros P.
specialize n2_11 with (¬P).
intros n2_11.
replace (¬P ∨ ¬¬P) with (P → ¬¬P) in n2_11
by now rewrite Impl1_01.
exact n2_11.
Qed.
Theorem n2_13 : ∀ P : Prop,
P ∨ ¬¬¬P.
Proof. intros P.
specialize Sum1_6 with P (¬P) (¬¬¬P).
intros Sum1_6.
specialize n2_12 with (¬P).
intros n2_12.
MP Sum1_6 n2_12.
specialize n2_11 with P.
intros n2_11.
MP Sum1_6 n2_11.
exact Sum1_6.
Qed.
Theorem n2_14 : ∀ P : Prop,
¬¬P → P.
Proof. intros P.
specialize Perm1_4 with P (¬¬¬P).
intros Perm1_4.
specialize n2_13 with P.
intros n2_13.
MP Perm1_4 n2_13.
replace (¬¬¬P ∨ P) with (¬¬P → P) in Perm1_4
by now rewrite Impl1_01.
exact Perm1_4.
Qed.
Theorem Transp2_15 : ∀ P Q : Prop,
(¬P → Q) → (¬Q → P).
Proof. intros P Q.
specialize Syll2_05 with (¬P) Q (¬¬Q).
intros Syll2_05a.
specialize n2_12 with Q.
intros n2_12.
MP Syll2_05a n2_12.
specialize Transp2_03 with (¬P) (¬Q).
intros Transp2_03.
specialize Syll2_05 with (¬Q) (¬¬P) P.
intros Syll2_05b.
specialize n2_14 with P.
intros n2_14.
MP Syll2_05b n2_14.
specialize Syll2_05 with (¬P → Q) (¬P → ¬¬Q) (¬Q → ¬¬P).
intros Syll2_05c.
MP Syll2_05c Transp2_03.
MP Syll2_05c Syll2_05a.
specialize Syll2_05 with (¬P → Q) (¬Q → ¬¬P) (¬Q → P).
intros Syll2_05d.
MP Syll2_05d Syll2_05b.
MP Syll2_05d Syll2_05c.
exact Syll2_05d.
Qed.
Ltac Syll H1 H2 S :=
let S := fresh S in match goal with
| [ H1 : ?P → ?Q, H2 : ?Q → ?R |- _ ] =>
assert (S : P → R) by (intros p; exact (H2 (H1 p)))
end.
Theorem Transp2_16 : ∀ P Q : Prop,
(P → Q) → (¬Q → ¬P).
Proof. intros P Q.
specialize n2_12 with Q.
intros n2_12a.
specialize Syll2_05 with P Q (¬¬Q).
intros Syll2_05a.
specialize Transp2_03 with P (¬Q).
intros Transp2_03a.
MP n2_12a Syll2_05a.
Syll Syll2_05a Transp2_03a S.
exact S.
Qed.
Theorem Transp2_17 : ∀ P Q : Prop,
(¬Q → ¬P) → (P → Q).
Proof. intros P Q.
specialize Transp2_03 with (¬Q) P.
intros Transp2_03a.
specialize n2_14 with Q.
intros n2_14a.
specialize Syll2_05 with P (¬¬Q) Q.
intros Syll2_05a.
MP n2_14a Syll2_05a.
Syll Transp2_03a Syll2_05a S.
exact S.
Qed.
Theorem n2_18 : ∀ P : Prop,
(¬P → P) → P.
Proof. intros P.
specialize n2_12 with P.
intro n2_12a.
specialize Syll2_05 with (¬P) P (¬¬P).
intro Syll2_05a.
MP Syll2_05a n2_12.
specialize Abs2_01 with (¬P).
intros Abs2_01a.
Syll Syll2_05a Abs2_01a Sa.
specialize n2_14 with P.
intros n2_14a.
Syll H n2_14a Sb.
exact Sb.
Qed.
Theorem n2_2 : ∀ P Q : Prop,
P → (P ∨ Q).
Proof. intros P Q.
specialize Add1_3 with Q P.
intros Add1_3a.
specialize Perm1_4 with Q P.
intros Perm1_4a.
Syll Add1_3a Perm1_4a S.
exact S.
Qed.
Theorem n2_21 : ∀ P Q : Prop,
¬P → (P → Q).
Proof. intros P Q.
specialize n2_2 with (¬P) Q.
intros n2_2a.
replace (¬P∨Q) with (P→Q) in n2_2a
by now rewrite Impl1_01.
exact n2_2a.
Qed.
Theorem n2_24 : ∀ P Q : Prop,
P → (¬P → Q).
Proof. intros P Q.
specialize n2_21 with P Q.
intros n2_21a.
specialize Comm2_04 with (¬P) P Q.
intros Comm2_04a.
MP Comm2_04a n2_21a.
exact Comm2_04a.
Qed.
Theorem n2_25 : ∀ P Q : Prop,
P ∨ ((P ∨ Q) → Q).
Proof. intros P Q.
specialize n2_1 with (P ∨ Q).
intros n2_1a.
specialize Assoc1_5 with (¬(P∨Q)) P Q.
intros Assoc1_5a.
MP Assoc1_5a n2_1a.
replace (¬(P∨Q)∨Q) with (P∨Q→Q) in Assoc1_5a
by now rewrite Impl1_01.
exact Assoc1_5a.
Qed.
Theorem n2_26 : ∀ P Q : Prop,
¬P ∨ ((P → Q) → Q).
Proof. intros P Q.
specialize n2_25 with (¬P) Q.
intros n2_25a.
replace (¬P∨Q) with (P→Q) in n2_25a
by now rewrite Impl1_01.
exact n2_25a.
Qed.
Theorem n2_27 : ∀ P Q : Prop,
P → ((P → Q) → Q).
Proof. intros P Q.
specialize n2_26 with P Q.
intros n2_26a.
replace (¬P∨((P→Q)→Q)) with (P→(P→Q)→Q)
in n2_26a by now rewrite Impl1_01.
exact n2_26a.
Qed.
Theorem n2_3 : ∀ P Q R : Prop,
(P ∨ (Q ∨ R)) → (P ∨ (R ∨ Q)).
Proof. intros P Q R.
specialize Perm1_4 with Q R.
intros Perm1_4a.
specialize Sum1_6 with P (Q∨R) (R∨Q).
intros Sum1_6a.
MP Sum1_6a Perm1_4a.
exact Sum1_6a.
Qed.
Theorem n2_31 : ∀ P Q R : Prop,
(P ∨ (Q ∨ R)) → ((P ∨ Q) ∨ R).
Proof. intros P Q R.
specialize n2_3 with P Q R.
intros n2_3a.
specialize Assoc1_5 with P R Q.
intros Assoc1_5a.
specialize Perm1_4 with R (P∨Q).
intros Perm1_4a.
Syll Assoc1_5a Perm1_4a Sa.
Syll n2_3a Sa Sb.
exact Sb.
Qed.
Theorem n2_32 : ∀ P Q R : Prop,
((P ∨ Q) ∨ R) → (P ∨ (Q ∨ R)).
Proof. intros P Q R.
specialize Perm1_4 with (P∨Q) R.
intros Perm1_4a.
specialize Assoc1_5 with R P Q.
intros Assoc1_5a.
specialize n2_3 with P R Q.
intros n2_3a.
specialize Syll2_06 with ((P∨Q)∨R) (R∨P∨Q) (P∨R∨Q).
intros Syll2_06a.
MP Syll2_06a Perm1_4a.
MP Syll2_06a Assoc1_5a.
specialize Syll2_06 with ((P∨Q)∨R) (P∨R∨Q) (P∨Q∨R).
intros Syll2_06b.
MP Syll2_06b Syll2_06a.
MP Syll2_06b n2_3a.
exact Syll2_06b.
Qed.
Theorem Abb2_33 : ∀ P Q R : Prop,
(P ∨ Q ∨ R) = ((P ∨ Q) ∨ R).
Proof. intros P Q R.
apply propositional_extensionality.
split.
specialize n2_31 with P Q R.
intros n2_31.
exact n2_31.
specialize n2_32 with P Q R.
intros n2_32.
exact n2_32.
Qed.
(*The default in Coq is right association.*)
Theorem n2_36 : ∀ P Q R : Prop,
(Q → R) → ((P ∨ Q) → (R ∨ P)).
Proof. intros P Q R.
specialize Perm1_4 with P R.
intros Perm1_4a.
specialize Syll2_05 with (P∨Q) (P∨R) (R∨P).
intros Syll2_05a.
MP Syll2_05a Perm1_4a.
specialize Sum1_6 with P Q R.
intros Sum1_6a.
Syll Sum1_6a Syll2_05a S.
exact S.
Qed.
Theorem n2_37 : ∀ P Q R : Prop,
(Q → R) → ((Q ∨ P) → (P ∨ R)).
Proof. intros P Q R.
specialize Perm1_4 with Q P.
intros Perm1_4a.
specialize Syll2_06 with (Q∨P) (P∨Q) (P∨R).
intros Syll2_06a.
MP Syll2_06a Perm1_4a.
specialize Sum1_6 with P Q R.
intros Sum1_6a.
Syll Sum1_6a Syll2_06a S.
exact S.
Qed.
Theorem n2_38 : ∀ P Q R : Prop,
(Q → R) → ((Q ∨ P) → (R ∨ P)).
Proof. intros P Q R.
specialize Perm1_4 with P R.
intros Perm1_4a.
specialize Syll2_05 with (Q∨P) (P∨R) (R∨P).
intros Syll2_05a.
MP Syll2_05a Perm1_4a.
specialize Perm1_4 with Q P.
intros Perm1_4b.
specialize Syll2_06 with (Q∨P) (P∨Q) (P∨R).
intros Syll2_06a.
MP Syll2_06a Perm1_4b.
Syll Syll2_06a Syll2_05a H.
specialize Sum1_6 with P Q R.
intros Sum1_6a.
Syll Sum1_6a H S.
exact S.
Qed.
Theorem n2_4 : ∀ P Q : Prop,
(P ∨ (P ∨ Q)) → (P ∨ Q).
Proof. intros P Q.
specialize n2_31 with P P Q.
intros n2_31a.
specialize Taut1_2 with P.
intros Taut1_2a.
specialize n2_38 with Q (P∨P) P.
intros n2_38a.
MP n2_38a Taut1_2a.
Syll n2_31a n2_38a S.
exact S.
Qed.
Theorem n2_41 : ∀ P Q : Prop,
(Q ∨ (P ∨ Q)) → (P ∨ Q).
Proof. intros P Q.
specialize Assoc1_5 with Q P Q.
intros Assoc1_5a.
specialize Taut1_2 with Q.
intros Taut1_2a.
specialize Sum1_6 with P (Q∨Q) Q.
intros Sum1_6a.
MP Sum1_6a Taut1_2a.
Syll Assoc1_5a Sum1_6a S.
exact S.
Qed.
Theorem n2_42 : ∀ P Q : Prop,
(¬P ∨ (P → Q)) → (P → Q).
Proof. intros P Q.
specialize n2_4 with (¬P) Q.
intros n2_4a.
replace (¬P∨Q) with (P→Q) in n2_4a
by now rewrite Impl1_01.
exact n2_4a.
Qed.
Theorem n2_43 : ∀ P Q : Prop,
(P → (P → Q)) → (P → Q).
Proof. intros P Q.
specialize n2_42 with P Q.
intros n2_42a.
replace (¬P ∨ (P→Q)) with (P→(P→Q))
in n2_42a by now rewrite Impl1_01.
exact n2_42a.
Qed.
Theorem n2_45 : ∀ P Q : Prop,
¬(P ∨ Q) → ¬P.
Proof. intros P Q.
specialize n2_2 with P Q.
intros n2_2a.
specialize Transp2_16 with P (P∨Q).
intros Transp2_16a.
MP n2_2 Transp2_16a.
exact Transp2_16a.
Qed.
Theorem n2_46 : ∀ P Q : Prop,
¬(P ∨ Q) → ¬Q.
Proof. intros P Q.
specialize Add1_3 with P Q.
intros Add1_3a.
specialize Transp2_16 with Q (P∨Q).
intros Transp2_16a.
MP Add1_3a Transp2_16a.
exact Transp2_16a.
Qed.
Theorem n2_47 : ∀ P Q : Prop,
¬(P ∨ Q) → (¬P ∨ Q).
Proof. intros P Q.
specialize n2_45 with P Q.
intros n2_45a.
specialize n2_2 with (¬P) Q.
intros n2_2a.
Syll n2_45a n2_2a S.
exact S.
Qed.
Theorem n2_48 : ∀ P Q : Prop,
¬(P ∨ Q) → (P ∨ ¬Q).
Proof. intros P Q.
specialize n2_46 with P Q.
intros n2_46a.
specialize Add1_3 with P (¬Q).
intros Add1_3a.
Syll n2_46a Add1_3a S.
exact S.
Qed.
Theorem n2_49 : ∀ P Q : Prop,
¬(P ∨ Q) → (¬P ∨ ¬Q).
Proof. intros P Q.
specialize n2_45 with P Q.
intros n2_45a.
specialize n2_2 with (¬P) (¬Q).
intros n2_2a.
Syll n2_45a n2_2a S.
exact S.
Qed.
Theorem n2_5 : ∀ P Q : Prop,
¬(P → Q) → (¬P → Q).
Proof. intros P Q.
specialize n2_47 with (¬P) Q.
intros n2_47a.
replace (¬P∨Q) with (P→Q) in n2_47a
by now rewrite Impl1_01.
replace (¬¬P∨Q) with (¬P→Q) in n2_47a
by now rewrite Impl1_01.
exact n2_47a.
Qed.
Theorem n2_51 : ∀ P Q : Prop,
¬(P → Q) → (P → ¬Q).
Proof. intros P Q.
specialize n2_48 with (¬P) Q.
intros n2_48a.
replace (¬P∨Q) with (P→Q) in n2_48a
by now rewrite Impl1_01.
replace (¬P∨¬Q) with (P→¬Q) in n2_48a
by now rewrite Impl1_01.
exact n2_48a.
Qed.
Theorem n2_52 : ∀ P Q : Prop,
¬(P → Q) → (¬P → ¬Q).
Proof. intros P Q.
specialize n2_49 with (¬P) Q.
intros n2_49a.
replace (¬P∨Q) with (P→Q) in n2_49a
by now rewrite Impl1_01.
replace (¬¬P∨¬Q) with (¬P→¬Q) in n2_49a
by now rewrite Impl1_01.
exact n2_49a.
Qed.
Theorem n2_521 : ∀ P Q : Prop,
¬(P→Q)→(Q→P).
Proof. intros P Q.
specialize n2_52 with P Q.
intros n2_52a.
specialize Transp2_17 with Q P.
intros Transp2_17a.
Syll n2_52a Transp2_17a S.
exact S.
Qed.
Theorem n2_53 : ∀ P Q : Prop,
(P ∨ Q) → (¬P → Q).
Proof. intros P Q.
specialize n2_12 with P.
intros n2_12a.
specialize n2_38 with Q P (¬¬P).
intros n2_38a.
MP n2_38a n2_12a.
replace (¬¬P∨Q) with (¬P→Q) in n2_38a
by now rewrite Impl1_01.
exact n2_38a.
Qed.
Theorem n2_54 : ∀ P Q : Prop,
(¬P → Q) → (P ∨ Q).
Proof. intros P Q.
specialize n2_14 with P.
intros n2_14a.
specialize n2_38 with Q (¬¬P) P.
intros n2_38a.
MP n2_38a n2_12a.
replace (¬¬P∨Q) with (¬P→Q) in n2_38a
by now rewrite Impl1_01.
exact n2_38a.
Qed.
Theorem n2_55 : ∀ P Q : Prop,
¬P → ((P ∨ Q) → Q).
Proof. intros P Q.
specialize n2_53 with P Q.
intros n2_53a.
specialize Comm2_04 with (P∨Q) (¬P) Q.
intros Comm2_04a.
MP n2_53a Comm2_04a.
exact Comm2_04a.
Qed.
Theorem n2_56 : ∀ P Q : Prop,
¬Q → ((P ∨ Q) → P).
Proof. intros P Q.
specialize n2_55 with Q P.
intros n2_55a.
specialize Perm1_4 with P Q.
intros Perm1_4a.
specialize Syll2_06 with (P∨Q) (Q∨P) P.
intros Syll2_06a.
MP Syll2_06a Perm1_4a.
Syll n2_55a Syll2_06a Sa.
exact Sa.
Qed.
Theorem n2_6 : ∀ P Q : Prop,
(¬P→Q) → ((P → Q) → Q).
Proof. intros P Q.
specialize n2_38 with Q (¬P) Q.
intros n2_38a.
specialize Taut1_2 with Q.
intros Taut1_2a.
specialize Syll2_05 with (¬P∨Q) (Q∨Q) Q.
intros Syll2_05a.
MP Syll2_05a Taut1_2a.
Syll n2_38a Syll2_05a S.
replace (¬P∨Q) with (P→Q) in S
by now rewrite Impl1_01.
exact S.
Qed.
Theorem n2_61 : ∀ P Q : Prop,
(P → Q) → ((¬P → Q) → Q).
Proof. intros P Q.
specialize n2_6 with P Q.
intros n2_6a.
specialize Comm2_04 with (¬P→Q) (P→Q) Q.
intros Comm2_04a.
MP Comm2_04a n2_6a.
exact Comm2_04a.
Qed.
Theorem n2_62 : ∀ P Q : Prop,
(P ∨ Q) → ((P → Q) → Q).
Proof. intros P Q.
specialize n2_53 with P Q.
intros n2_53a.
specialize n2_6 with P Q.
intros n2_6a.
Syll n2_53a n2_6a S.
exact S.
Qed.
Theorem n2_621 : ∀ P Q : Prop,
(P → Q) → ((P ∨ Q) → Q).
Proof. intros P Q.
specialize n2_62 with P Q.
intros n2_62a.
specialize Comm2_04 with (P ∨ Q) (P→Q) Q.
intros Comm2_04a.
MP Comm2_04a n2_62a.
exact Comm2_04a.
Qed.
Theorem n2_63 : ∀ P Q : Prop,
(P ∨ Q) → ((¬P ∨ Q) → Q).
Proof. intros P Q.
specialize n2_62 with P Q.
intros n2_62a.
replace (P→Q) with (¬P∨Q) in n2_62a
by now rewrite Impl1_01.
exact n2_62a.
Qed.
Theorem n2_64 : ∀ P Q : Prop,
(P ∨ Q) → ((P ∨ ¬Q) → P).
Proof. intros P Q.
specialize n2_63 with Q P.
intros n2_63a.
specialize Perm1_4 with P Q.
intros Perm1_4a.
Syll n2_63a Perm1_4a Ha.
specialize Syll2_06 with (P∨¬Q) (¬Q∨P) P.
intros Syll2_06a.
specialize Perm1_4 with P (¬Q).
intros Perm1_4b.
MP Syll2_06a Perm1_4b.
Syll Syll2_06a Ha S.
exact S.
Qed.
Theorem n2_65 : ∀ P Q : Prop,
(P → Q) → ((P → ¬Q) → ¬P).
Proof. intros P Q.
specialize n2_64 with (¬P) Q.
intros n2_64a.
replace (¬P∨Q) with (P→Q) in n2_64a
by now rewrite Impl1_01.
replace (¬P∨¬Q) with (P→¬Q) in n2_64a
by now rewrite Impl1_01.
exact n2_64a.
Qed.
Theorem n2_67 : ∀ P Q : Prop,
((P ∨ Q) → Q) → (P → Q).
Proof. intros P Q.
specialize n2_54 with P Q.
intros n2_54a.
specialize Syll2_06 with (¬P→Q) (P∨Q) Q.
intros Syll2_06a.
MP Syll2_06a n2_54a.
specialize n2_24 with P Q.
intros n2_24.
specialize Syll2_06 with P (¬P→Q) Q.
intros Syll2_06b.
MP Syll2_06b n2_24a.
Syll Syll2_06b Syll2_06a S.
exact S.
Qed.
Theorem n2_68 : ∀ P Q : Prop,
((P → Q) → Q) → (P ∨ Q).
Proof. intros P Q.
specialize n2_67 with (¬P) Q.
intros n2_67a.
replace (¬P∨Q) with (P→Q) in n2_67a
by now rewrite Impl1_01.
specialize n2_54 with P Q.
intros n2_54a.
Syll n2_67a n2_54a S.
exact S.
Qed.
Theorem n2_69 : ∀ P Q : Prop,
((P → Q) → Q) → ((Q → P) → P).
Proof. intros P Q.
specialize n2_68 with P Q.
intros n2_68a.
specialize Perm1_4 with P Q.
intros Perm1_4a.
Syll n2_68a Perm1_4a Sa.
specialize n2_62 with Q P.
intros n2_62a.
Syll Sa n2_62a Sb.
exact Sb.
Qed.
Theorem n2_73 : ∀ P Q R : Prop,
(P → Q) → (((P ∨ Q) ∨ R) → (Q ∨ R)).
Proof. intros P Q R.
specialize n2_621 with P Q.
intros n2_621a.
specialize n2_38 with R (P∨Q) Q.
intros n2_38a.
Syll n2_621a n2_38a S.
exact S.
Qed.
Theorem n2_74 : ∀ P Q R : Prop,
(Q → P) → ((P ∨ Q) ∨ R) → (P ∨ R).
Proof. intros P Q R.
specialize n2_73 with Q P R.
intros n2_73a.
specialize Assoc1_5 with P Q R.
intros Assoc1_5a.
specialize n2_31 with Q P R.
intros n2_31a. (*not cited*)
Syll Assoc1_5a n2_31a Sa.
specialize n2_32 with P Q R.
intros n2_32a. (*not cited*)
Syll n2_32a Sa Sb.
specialize Syll2_06 with ((P∨Q)∨R) ((Q∨P)∨R) (P∨R).
intros Syll2_06a.
MP Syll2_06a Sb.
Syll n2_73a Syll2_05a H.
exact H.
Qed.
Theorem n2_75 : ∀ P Q R : Prop,
(P ∨ Q) → ((P ∨ (Q → R)) → (P ∨ R)).
Proof. intros P Q R.
specialize n2_74 with P (¬Q) R.
intros n2_74a.
specialize n2_53 with Q P.
intros n2_53a.
Syll n2_53a n2_74a Sa.
specialize n2_31 with P (¬Q) R.
intros n2_31a.
specialize Syll2_06 with (P∨(¬Q)∨R)((P∨(¬Q))∨R) (P∨R).
intros Syll2_06a.
MP Syll2_06a n2_31a.
Syll Sa Syll2_06a Sb.
specialize Perm1_4 with P Q.
intros Perm1_4a. (*not cited*)
Syll Perm1_4a Sb Sc.
replace (¬Q∨R) with (Q→R) in Sc
by now rewrite Impl1_01.
exact Sc.
Qed.
Theorem n2_76 : ∀ P Q R : Prop,
(P ∨ (Q → R)) → ((P ∨ Q) → (P ∨ R)).
Proof. intros P Q R.
specialize n2_75 with P Q R.
intros n2_75a.
specialize Comm2_04 with (P∨Q) (P∨(Q→R)) (P∨R).
intros Comm2_04a.
MP Comm2_04a n2_75a.
exact Comm2_04a.
Qed.
Theorem n2_77 : ∀ P Q R : Prop,
(P → (Q → R)) → ((P → Q) → (P → R)).
Proof. intros P Q R.
specialize n2_76 with (¬P) Q R.
intros n2_76a.
replace (¬P∨(Q→R)) with (P→Q→R) in n2_76a
by now rewrite Impl1_01.
replace (¬P∨Q) with (P→Q) in n2_76a
by now rewrite Impl1_01.
replace (¬P∨R) with (P→R) in n2_76a
by now rewrite Impl1_01.
exact n2_76a.
Qed.
Theorem n2_8 : ∀ Q R S : Prop,
(Q ∨ R) → ((¬R ∨ S) → (Q ∨ S)).
Proof. intros Q R S.
specialize n2_53 with R Q.
intros n2_53a.
specialize Perm1_4 with Q R.
intros Perm1_4a.
Syll Perm1_4a n2_53a Ha.
specialize n2_38 with S (¬R) Q.
intros n2_38a.
Syll H n2_38a Hb.
exact Hb.
Qed.
Theorem n2_81 : ∀ P Q R S : Prop,
(Q → (R → S)) → ((P ∨ Q) → ((P ∨ R) → (P ∨ S))).
Proof. intros P Q R S.
specialize Sum1_6 with P Q (R→S).
intros Sum1_6a.
specialize n2_76 with P R S.
intros n2_76a.
specialize Syll2_05 with (P∨Q) (P∨(R→S)) ((P∨R)→(P∨S)).
intros Syll2_05a.
MP Syll2_05a n2_76a.
Syll Sum1_6a Syll2_05a H.
exact H.
Qed.
Theorem n2_82 : ∀ P Q R S : Prop,
(P ∨ Q ∨ R)→((P ∨ ¬R ∨ S)→(P ∨ Q ∨ S)).
Proof. intros P Q R S.
specialize n2_8 with Q R S.
intros n2_8a.
specialize n2_81 with P (Q∨R) (¬R∨S) (Q∨S).
intros n2_81a.
MP n2_81a n2_8a.
exact n2_81a.
Qed.
Theorem n2_83 : ∀ P Q R S : Prop,
(P→(Q→R))→((P→(R→S))→(P→(Q→S))).
Proof. intros P Q R S.
specialize n2_82 with (¬P) (¬Q) R S.
intros n2_82a.
replace (¬Q∨R) with (Q→R) in n2_82a
by now rewrite Impl1_01.
replace (¬P∨(Q→R)) with (P→Q→R) in n2_82a
by now rewrite Impl1_01.
replace (¬R∨S) with (R→S) in n2_82a
by now rewrite Impl1_01.
replace (¬P∨(R→S)) with (P→R→S) in n2_82a
by now rewrite Impl1_01.
replace (¬Q∨S) with (Q→S) in n2_82a
by now rewrite Impl1_01.
replace (¬Q∨S) with (Q→S) in n2_82a
by now rewrite Impl1_01.
replace (¬P∨(Q→S)) with (P→Q→S) in n2_82a
by now rewrite Impl1_01.
exact n2_82a.
Qed.
Theorem n2_85 : ∀ P Q R : Prop,
((P ∨ Q) → (P ∨ R)) → (P ∨ (Q → R)).
Proof. intros P Q R.
specialize Add1_3 with P Q.
intros Add1_3a.
specialize Syll2_06 with Q (P∨Q) R.
intros Syll2_06a.
MP Syll2_06a Add1_3a.
specialize n2_55 with P R.
intros n2_55a.