author | wenzelm |
Thu, 27 Mar 2008 15:32:15 +0100 | |
changeset 26435 | bdce320cd426 |
parent 26426 | ddac7ef1e991 |
child 26570 | dbc458262f4c |
permissions | -rw-r--r-- |
15803 | 1 |
(* Title: Pure/Pure.thy |
2 |
ID: $Id$ |
|
18466
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
3 |
*) |
15803 | 4 |
|
26435 | 5 |
section {* Further content for the Pure theory *} |
20627 | 6 |
|
18466
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
7 |
subsection {* Meta-level connectives in assumptions *} |
15803 | 8 |
|
9 |
lemma meta_mp: |
|
18019 | 10 |
assumes "PROP P ==> PROP Q" and "PROP P" |
15803 | 11 |
shows "PROP Q" |
18019 | 12 |
by (rule `PROP P ==> PROP Q` [OF `PROP P`]) |
15803 | 13 |
|
23432 | 14 |
lemmas meta_impE = meta_mp [elim_format] |
15 |
||
15803 | 16 |
lemma meta_spec: |
18019 | 17 |
assumes "!!x. PROP P(x)" |
15803 | 18 |
shows "PROP P(x)" |
18019 | 19 |
by (rule `!!x. PROP P(x)`) |
15803 | 20 |
|
21 |
lemmas meta_allE = meta_spec [elim_format] |
|
22 |
||
18466
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
23 |
|
21625 | 24 |
subsection {* Embedded terms *} |
25 |
||
26 |
locale (open) meta_term_syntax = |
|
27 |
fixes meta_term :: "'a => prop" ("TERM _") |
|
28 |
||
29 |
lemmas [intro?] = termI |
|
30 |
||
31 |
||
18466
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
32 |
subsection {* Meta-level conjunction *} |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
33 |
|
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
34 |
locale (open) meta_conjunction_syntax = |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
35 |
fixes meta_conjunction :: "prop => prop => prop" (infixr "&&" 2) |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
36 |
|
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
37 |
lemma all_conjunction: |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
38 |
includes meta_conjunction_syntax |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
39 |
shows "(!!x. PROP A(x) && PROP B(x)) == ((!!x. PROP A(x)) && (!!x. PROP B(x)))" |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
40 |
proof |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
41 |
assume conj: "!!x. PROP A(x) && PROP B(x)" |
19121 | 42 |
show "(\<And>x. PROP A(x)) && (\<And>x. PROP B(x))" |
43 |
proof - |
|
18466
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
44 |
fix x |
19121 | 45 |
from conj show "PROP A(x)" by (rule conjunctionD1) |
46 |
from conj show "PROP B(x)" by (rule conjunctionD2) |
|
18466
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
47 |
qed |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
48 |
next |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
49 |
assume conj: "(!!x. PROP A(x)) && (!!x. PROP B(x))" |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
50 |
fix x |
19121 | 51 |
show "PROP A(x) && PROP B(x)" |
52 |
proof - |
|
53 |
show "PROP A(x)" by (rule conj [THEN conjunctionD1, rule_format]) |
|
54 |
show "PROP B(x)" by (rule conj [THEN conjunctionD2, rule_format]) |
|
18466
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
55 |
qed |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
56 |
qed |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
57 |
|
19121 | 58 |
lemma imp_conjunction: |
18466
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
59 |
includes meta_conjunction_syntax |
19121 | 60 |
shows "(PROP A ==> PROP B && PROP C) == (PROP A ==> PROP B) && (PROP A ==> PROP C)" |
18836 | 61 |
proof |
18466
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
62 |
assume conj: "PROP A ==> PROP B && PROP C" |
19121 | 63 |
show "(PROP A ==> PROP B) && (PROP A ==> PROP C)" |
64 |
proof - |
|
18466
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
65 |
assume "PROP A" |
19121 | 66 |
from conj [OF `PROP A`] show "PROP B" by (rule conjunctionD1) |
67 |
from conj [OF `PROP A`] show "PROP C" by (rule conjunctionD2) |
|
18466
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
68 |
qed |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
69 |
next |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
70 |
assume conj: "(PROP A ==> PROP B) && (PROP A ==> PROP C)" |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
71 |
assume "PROP A" |
19121 | 72 |
show "PROP B && PROP C" |
73 |
proof - |
|
74 |
from `PROP A` show "PROP B" by (rule conj [THEN conjunctionD1]) |
|
75 |
from `PROP A` show "PROP C" by (rule conj [THEN conjunctionD2]) |
|
18466
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
76 |
qed |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
77 |
qed |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
78 |
|
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
79 |
lemma conjunction_imp: |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
80 |
includes meta_conjunction_syntax |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
81 |
shows "(PROP A && PROP B ==> PROP C) == (PROP A ==> PROP B ==> PROP C)" |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
82 |
proof |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
83 |
assume r: "PROP A && PROP B ==> PROP C" |
22933 | 84 |
assume ab: "PROP A" "PROP B" |
85 |
show "PROP C" |
|
86 |
proof (rule r) |
|
87 |
from ab show "PROP A && PROP B" . |
|
88 |
qed |
|
18466
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
89 |
next |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
90 |
assume r: "PROP A ==> PROP B ==> PROP C" |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
91 |
assume conj: "PROP A && PROP B" |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
92 |
show "PROP C" |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
93 |
proof (rule r) |
19121 | 94 |
from conj show "PROP A" by (rule conjunctionD1) |
95 |
from conj show "PROP B" by (rule conjunctionD2) |
|
18466
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
96 |
qed |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
97 |
qed |
389a6f9c31f4
added locale meta_conjunction_syntax and various conjunction rules;
wenzelm
parents:
18019
diff
changeset
|
98 |