equal
deleted
inserted
replaced
54 assumes major: "p:P-->Q" |
54 assumes major: "p:P-->Q" |
55 and r1: "!!x. x:~P ==> f(x):R" |
55 and r1: "!!x. x:~P ==> f(x):R" |
56 and r2: "!!y. y:Q ==> g(y):R" |
56 and r2: "!!y. y:Q ==> g(y):R" |
57 shows "?p : R" |
57 shows "?p : R" |
58 apply (rule excluded_middle [THEN disjE]) |
58 apply (rule excluded_middle [THEN disjE]) |
59 apply (tactic {* DEPTH_SOLVE (atac 1 ORELSE |
59 apply (tactic {* DEPTH_SOLVE (assume_tac @{context} 1 ORELSE |
60 resolve_tac @{context} [@{thm r1}, @{thm r2}, @{thm major} RS @{thm mp}] 1) *}) |
60 resolve_tac @{context} [@{thm r1}, @{thm r2}, @{thm major} RS @{thm mp}] 1) *}) |
61 done |
61 done |
62 |
62 |
63 (*Double negation law*) |
63 (*Double negation law*) |
64 schematic_lemma notnotD: "p:~~P ==> ?p : P" |
64 schematic_lemma notnotD: "p:~~P ==> ?p : P" |
78 and r2: "!!x y.[| x:~P; y:~Q |] ==> g(x,y):R" |
78 and r2: "!!x y.[| x:~P; y:~Q |] ==> g(x,y):R" |
79 shows "?p : R" |
79 shows "?p : R" |
80 apply (insert major) |
80 apply (insert major) |
81 apply (unfold iff_def) |
81 apply (unfold iff_def) |
82 apply (rule conjE) |
82 apply (rule conjE) |
83 apply (tactic {* DEPTH_SOLVE_1 (etac @{thm impCE} 1 ORELSE |
83 apply (tactic {* DEPTH_SOLVE_1 (eresolve_tac @{context} @{thms impCE} 1 ORELSE |
84 eresolve_tac @{context} [@{thm notE}, @{thm impE}] 1 THEN atac 1 ORELSE atac 1 ORELSE |
84 eresolve_tac @{context} [@{thm notE}, @{thm impE}] 1 THEN assume_tac @{context} 1 ORELSE |
|
85 assume_tac @{context} 1 ORELSE |
85 resolve_tac @{context} [@{thm r1}, @{thm r2}] 1) *})+ |
86 resolve_tac @{context} [@{thm r1}, @{thm r2}] 1) *})+ |
86 done |
87 done |
87 |
88 |
88 |
89 |
89 (*Should be used as swap since ~P becomes redundant*) |
90 (*Should be used as swap since ~P becomes redundant*) |
105 ( |
106 ( |
106 val sizef = size_of_thm |
107 val sizef = size_of_thm |
107 val mp = @{thm mp} |
108 val mp = @{thm mp} |
108 val not_elim = @{thm notE} |
109 val not_elim = @{thm notE} |
109 val swap = @{thm swap} |
110 val swap = @{thm swap} |
110 val hyp_subst_tacs = [hyp_subst_tac] |
111 fun hyp_subst_tacs ctxt = [hyp_subst_tac ctxt] |
111 ); |
112 ); |
112 open Cla; |
113 open Cla; |
113 |
114 |
114 (*Propositional rules |
115 (*Propositional rules |
115 -- iffCE might seem better, but in the examples in ex/cla |
116 -- iffCE might seem better, but in the examples in ex/cla |