23914
|
1 |
(* Title: FOL/ex/Propositional_Cla.thy
|
|
2 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory
|
|
3 |
Copyright 1991 University of Cambridge
|
|
4 |
*)
|
|
5 |
|
|
6 |
header {* First-Order Logic: propositional examples (classical version) *}
|
|
7 |
|
|
8 |
theory Propositional_Cla
|
|
9 |
imports FOL
|
|
10 |
begin
|
|
11 |
|
|
12 |
text {* commutative laws of @{text "&"} and @{text "|"} *}
|
|
13 |
|
|
14 |
lemma "P & Q --> Q & P"
|
|
15 |
by (tactic "IntPr.fast_tac 1")
|
|
16 |
|
|
17 |
lemma "P | Q --> Q | P"
|
|
18 |
by fast
|
|
19 |
|
|
20 |
|
|
21 |
text {* associative laws of @{text "&"} and @{text "|"} *}
|
|
22 |
lemma "(P & Q) & R --> P & (Q & R)"
|
|
23 |
by fast
|
|
24 |
|
|
25 |
lemma "(P | Q) | R --> P | (Q | R)"
|
|
26 |
by fast
|
|
27 |
|
|
28 |
|
|
29 |
text {* distributive laws of @{text "&"} and @{text "|"} *}
|
|
30 |
lemma "(P & Q) | R --> (P | R) & (Q | R)"
|
|
31 |
by fast
|
|
32 |
|
|
33 |
lemma "(P | R) & (Q | R) --> (P & Q) | R"
|
|
34 |
by fast
|
|
35 |
|
|
36 |
lemma "(P | Q) & R --> (P & R) | (Q & R)"
|
|
37 |
by fast
|
|
38 |
|
|
39 |
lemma "(P & R) | (Q & R) --> (P | Q) & R"
|
|
40 |
by fast
|
|
41 |
|
|
42 |
|
|
43 |
text {* Laws involving implication *}
|
|
44 |
|
|
45 |
lemma "(P-->R) & (Q-->R) <-> (P|Q --> R)"
|
|
46 |
by fast
|
|
47 |
|
|
48 |
lemma "(P & Q --> R) <-> (P--> (Q-->R))"
|
|
49 |
by fast
|
|
50 |
|
|
51 |
lemma "((P-->R)-->R) --> ((Q-->R)-->R) --> (P&Q-->R) --> R"
|
|
52 |
by fast
|
|
53 |
|
|
54 |
lemma "~(P-->R) --> ~(Q-->R) --> ~(P&Q-->R)"
|
|
55 |
by fast
|
|
56 |
|
|
57 |
lemma "(P --> Q & R) <-> (P-->Q) & (P-->R)"
|
|
58 |
by fast
|
|
59 |
|
|
60 |
|
|
61 |
text {* Propositions-as-types *}
|
|
62 |
|
|
63 |
-- {* The combinator K *}
|
|
64 |
lemma "P --> (Q --> P)"
|
|
65 |
by fast
|
|
66 |
|
|
67 |
-- {* The combinator S *}
|
|
68 |
lemma "(P-->Q-->R) --> (P-->Q) --> (P-->R)"
|
|
69 |
by fast
|
|
70 |
|
|
71 |
|
|
72 |
-- {* Converse is classical *}
|
|
73 |
lemma "(P-->Q) | (P-->R) --> (P --> Q | R)"
|
|
74 |
by fast
|
|
75 |
|
|
76 |
lemma "(P-->Q) --> (~Q --> ~P)"
|
|
77 |
by fast
|
|
78 |
|
|
79 |
|
|
80 |
text {* Schwichtenberg's examples (via T. Nipkow) *}
|
|
81 |
|
|
82 |
lemma stab_imp: "(((Q-->R)-->R)-->Q) --> (((P-->Q)-->R)-->R)-->P-->Q"
|
|
83 |
by fast
|
|
84 |
|
|
85 |
lemma stab_to_peirce:
|
|
86 |
"(((P --> R) --> R) --> P) --> (((Q --> R) --> R) --> Q)
|
|
87 |
--> ((P --> Q) --> P) --> P"
|
|
88 |
by fast
|
|
89 |
|
|
90 |
lemma peirce_imp1: "(((Q --> R) --> Q) --> Q)
|
|
91 |
--> (((P --> Q) --> R) --> P --> Q) --> P --> Q"
|
|
92 |
by fast
|
|
93 |
|
|
94 |
lemma peirce_imp2: "(((P --> R) --> P) --> P) --> ((P --> Q --> R) --> P) --> P"
|
|
95 |
by fast
|
|
96 |
|
|
97 |
lemma mints: "((((P --> Q) --> P) --> P) --> Q) --> Q"
|
|
98 |
by fast
|
|
99 |
|
|
100 |
lemma mints_solovev: "(P --> (Q --> R) --> Q) --> ((P --> Q) --> R) --> R"
|
|
101 |
by fast
|
|
102 |
|
|
103 |
lemma tatsuta: "(((P7 --> P1) --> P10) --> P4 --> P5)
|
|
104 |
--> (((P8 --> P2) --> P9) --> P3 --> P10)
|
|
105 |
--> (P1 --> P8) --> P6 --> P7
|
|
106 |
--> (((P3 --> P2) --> P9) --> P4)
|
|
107 |
--> (P1 --> P3) --> (((P6 --> P1) --> P2) --> P9) --> P5"
|
|
108 |
by fast
|
|
109 |
|
|
110 |
lemma tatsuta1: "(((P8 --> P2) --> P9) --> P3 --> P10)
|
|
111 |
--> (((P3 --> P2) --> P9) --> P4)
|
|
112 |
--> (((P6 --> P1) --> P2) --> P9)
|
|
113 |
--> (((P7 --> P1) --> P10) --> P4 --> P5)
|
|
114 |
--> (P1 --> P3) --> (P1 --> P8) --> P6 --> P7 --> P5"
|
|
115 |
by fast
|
|
116 |
|
|
117 |
end
|