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