author | traytel |
Tue, 07 May 2013 14:47:22 +0200 | |
changeset 51894 | 7c43b8df0f5d |
parent 51893 | 596baae88a88 |
child 51915 | 87767611de37 |
permissions | -rw-r--r-- |
49509
163914705f8d
renamed top-level theory from "Codatatype" to "BNF"
blanchet
parents:
49506
diff
changeset
|
1 |
(* Title: HOL/BNF/Tools/bnf_def_tactics.ML |
49284 | 2 |
Author: Dmitriy Traytel, TU Muenchen |
3 |
Author: Jasmin Blanchette, TU Muenchen |
|
4 |
Copyright 2012 |
|
5 |
||
6 |
Tactics for definition of bounded natural functors. |
|
7 |
*) |
|
8 |
||
9 |
signature BNF_DEF_TACTICS = |
|
10 |
sig |
|
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
11 |
val mk_collect_set_map_tac: thm list -> tactic |
51762 | 12 |
val mk_map_id': thm -> thm |
13 |
val mk_map_comp': thm -> thm |
|
51798 | 14 |
val mk_map_cong_tac: Proof.context -> thm -> tactic |
49284 | 15 |
val mk_in_mono_tac: int -> tactic |
16 |
val mk_map_wppull_tac: thm -> thm -> thm -> thm -> thm list -> tactic |
|
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
17 |
val mk_set_map': thm -> thm |
49284 | 18 |
|
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
19 |
val mk_rel_Grp_tac: thm list -> thm -> thm -> thm -> thm -> thm list -> |
49284 | 20 |
{prems: thm list, context: Proof.context} -> tactic |
51894 | 21 |
val mk_rel_eq_tac: int -> thm -> thm -> thm -> tactic |
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
22 |
val mk_rel_OO_tac: thm list -> thm -> thm -> thm -> thm -> thm list -> |
49284 | 23 |
{prems: thm list, context: Proof.context} -> tactic |
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
24 |
val mk_in_rel_tac: thm list -> {prems: 'b, context: Proof.context} -> tactic |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
25 |
val mk_rel_conversep_tac: thm -> thm -> tactic |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
26 |
val mk_rel_conversep_le_tac: thm list -> thm -> thm -> thm -> thm list -> |
49284 | 27 |
{prems: thm list, context: Proof.context} -> tactic |
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
28 |
val mk_rel_mono_tac: thm list -> thm -> {prems: 'a, context: Proof.context} -> tactic |
49284 | 29 |
end; |
30 |
||
31 |
structure BNF_Def_Tactics : BNF_DEF_TACTICS = |
|
32 |
struct |
|
33 |
||
34 |
open BNF_Util |
|
35 |
open BNF_Tactics |
|
36 |
||
51762 | 37 |
fun mk_map_id' id = mk_trans (fun_cong OF [id]) @{thm id_apply}; |
38 |
fun mk_map_comp' comp = @{thm o_eq_dest_lhs} OF [mk_sym comp]; |
|
51798 | 39 |
fun mk_map_cong_tac ctxt cong0 = |
40 |
(hyp_subst_tac ctxt THEN' rtac cong0 THEN' |
|
51762 | 41 |
REPEAT_DETERM o (dtac meta_spec THEN' etac meta_mp THEN' atac)) 1; |
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
42 |
fun mk_set_map' set_map = set_map RS @{thm pointfreeE}; |
49490 | 43 |
fun mk_in_mono_tac n = if n = 0 then rtac subset_UNIV 1 |
49284 | 44 |
else (rtac subsetI THEN' |
45 |
rtac CollectI) 1 THEN |
|
46 |
REPEAT_DETERM (eresolve_tac [CollectE, conjE] 1) THEN |
|
47 |
REPEAT_DETERM_N (n - 1) |
|
48 |
((rtac conjI THEN' etac subset_trans THEN' atac) 1) THEN |
|
49 |
(etac subset_trans THEN' atac) 1; |
|
50 |
||
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
51 |
fun mk_collect_set_map_tac set_maps = |
49623 | 52 |
(rtac (@{thm collect_o} RS trans) THEN' rtac @{thm arg_cong[of _ _ collect]} THEN' |
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
53 |
EVERY' (map (fn set_map => |
49623 | 54 |
rtac (mk_trans @{thm image_insert} @{thm arg_cong2[of _ _ _ _ insert]}) THEN' |
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
55 |
rtac set_map) set_maps) THEN' |
49623 | 56 |
rtac @{thm image_empty}) 1; |
49284 | 57 |
|
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
58 |
fun mk_map_wppull_tac map_id map_cong0 map_wpull map_comp set_maps = |
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
59 |
if null set_maps then |
49284 | 60 |
EVERY' [rtac @{thm wppull_id}, rtac map_wpull, rtac map_id, rtac map_id] 1 |
61 |
else EVERY' [REPEAT_DETERM o etac conjE, REPEAT_DETERM o dtac @{thm wppull_thePull}, |
|
62 |
REPEAT_DETERM o etac exE, rtac @{thm wpull_wppull}, rtac map_wpull, |
|
63 |
REPEAT_DETERM o rtac @{thm wpull_thePull}, rtac ballI, |
|
64 |
REPEAT_DETERM o eresolve_tac [CollectE, conjE], rtac conjI, rtac CollectI, |
|
65 |
CONJ_WRAP' (fn thm => EVERY' [rtac (thm RS @{thm ord_eq_le_trans}), |
|
66 |
rtac @{thm image_subsetI}, rtac conjunct1, etac bspec, etac set_mp, atac]) |
|
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
67 |
set_maps, |
49284 | 68 |
CONJ_WRAP' (fn thm => EVERY' [rtac (map_comp RS trans), rtac (map_comp RS trans), |
51761
4c9f08836d87
renamed "map_cong" axiom to "map_cong0" in preparation for real "map_cong"
blanchet
parents:
49623
diff
changeset
|
69 |
rtac (map_comp RS trans RS sym), rtac map_cong0, |
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
70 |
REPEAT_DETERM_N (length set_maps) o EVERY' [rtac (o_apply RS trans), |
49284 | 71 |
rtac (o_apply RS trans RS sym), rtac (o_apply RS trans), rtac thm, |
72 |
rtac conjunct2, etac bspec, etac set_mp, atac]]) [conjunct1, conjunct2]] 1; |
|
73 |
||
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
74 |
fun mk_rel_Grp_tac rel_OO_Grps map_id map_cong0 map_id' map_comp set_maps |
49284 | 75 |
{context = ctxt, prems = _} = |
76 |
let |
|
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
77 |
val n = length set_maps; |
49284 | 78 |
in |
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
79 |
if null set_maps then |
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
80 |
unfold_thms_tac ctxt ((map_id RS @{thm Grp_UNIV_id}) :: rel_OO_Grps) THEN |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
81 |
rtac @{thm Grp_UNIV_idI[OF refl]} 1 |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
82 |
else unfold_thms_tac ctxt rel_OO_Grps THEN |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
83 |
EVERY' [rtac @{thm antisym}, rtac @{thm predicate2I}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
84 |
REPEAT_DETERM o |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
85 |
eresolve_tac [CollectE, exE, conjE, @{thm GrpE}, @{thm relcomppE}, @{thm conversepE}], |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
86 |
hyp_subst_tac ctxt, rtac @{thm GrpI}, rtac trans, rtac map_comp, rtac map_cong0, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
87 |
REPEAT_DETERM_N n o EVERY' [rtac @{thm Collect_split_Grp_eqD}, etac @{thm set_mp}, atac], |
49284 | 88 |
rtac CollectI, |
89 |
CONJ_WRAP' (fn thm => EVERY' [rtac (thm RS @{thm ord_eq_le_trans}), |
|
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
90 |
rtac @{thm image_subsetI}, rtac @{thm Collect_split_Grp_inD}, etac @{thm set_mp}, atac]) |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
91 |
set_maps, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
92 |
rtac @{thm predicate2I}, REPEAT_DETERM o eresolve_tac [@{thm GrpE}, exE, conjE], |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
93 |
hyp_subst_tac ctxt, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
94 |
rtac @{thm relcomppI}, rtac @{thm conversepI}, |
49495 | 95 |
EVERY' (map2 (fn convol => fn map_id => |
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
96 |
EVERY' [rtac @{thm GrpI}, rtac (box_equals OF [map_cong0, map_comp RS sym, map_id]), |
49495 | 97 |
REPEAT_DETERM_N n o rtac (convol RS fun_cong), |
98 |
REPEAT_DETERM o eresolve_tac [CollectE, conjE], |
|
99 |
rtac CollectI, |
|
100 |
CONJ_WRAP' (fn thm => |
|
101 |
EVERY' [rtac @{thm ord_eq_le_trans}, rtac thm, rtac @{thm image_subsetI}, |
|
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
102 |
rtac @{thm convol_mem_GrpI[OF refl]}, etac set_mp, atac]) |
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
103 |
set_maps]) |
49495 | 104 |
@{thms fst_convol snd_convol} [map_id', refl])] 1 |
49284 | 105 |
end; |
106 |
||
51894 | 107 |
fun mk_rel_eq_tac n rel_Grp rel_cong map_id = |
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
108 |
(EVERY' (rtac (rel_cong RS trans) :: replicate n (rtac @{thm eq_alt})) THEN' |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
109 |
rtac (rel_Grp RSN (2, @{thm box_equals[OF _ sym sym[OF eq_alt]]})) THEN' |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
110 |
(if n = 0 then rtac refl |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
111 |
else EVERY' [rtac @{thm arg_cong2[of _ _ _ _ "Grp"]}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
112 |
rtac @{thm equalityI}, rtac subset_UNIV, rtac subsetI, rtac CollectI, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
113 |
CONJ_WRAP' (K (rtac subset_UNIV)) (1 upto n), rtac map_id])) 1; |
49284 | 114 |
|
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
115 |
fun mk_rel_mono_tac rel_OO_Grps in_mono {context = ctxt, prems = _} = |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
116 |
unfold_thms_tac ctxt rel_OO_Grps THEN |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
117 |
EVERY' [rtac @{thm relcompp_mono}, rtac @{thm iffD2[OF conversep_mono]}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
118 |
rtac @{thm Grp_mono}, rtac in_mono, REPEAT_DETERM o etac @{thm Collect_split_mono}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
119 |
rtac @{thm Grp_mono}, rtac in_mono, REPEAT_DETERM o etac @{thm Collect_split_mono}] 1; |
49284 | 120 |
|
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
121 |
fun mk_rel_conversep_le_tac rel_OO_Grps rel_eq map_cong0 map_comp set_maps |
49284 | 122 |
{context = ctxt, prems = _} = |
123 |
let |
|
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
124 |
val n = length set_maps; |
49284 | 125 |
in |
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
126 |
if null set_maps then rtac (rel_eq RS @{thm leq_conversepI}) 1 |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
127 |
else unfold_thms_tac ctxt (rel_OO_Grps) THEN |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
128 |
EVERY' [rtac @{thm predicate2I}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
129 |
REPEAT_DETERM o |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
130 |
eresolve_tac [CollectE, exE, conjE, @{thm GrpE}, @{thm relcomppE}, @{thm conversepE}], |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
131 |
hyp_subst_tac ctxt, rtac @{thm conversepI}, rtac @{thm relcomppI}, rtac @{thm conversepI}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
132 |
EVERY' (map (fn thm => EVERY' [rtac @{thm GrpI}, rtac sym, rtac trans, |
51761
4c9f08836d87
renamed "map_cong" axiom to "map_cong0" in preparation for real "map_cong"
blanchet
parents:
49623
diff
changeset
|
133 |
rtac map_cong0, REPEAT_DETERM_N n o rtac thm, |
49284 | 134 |
rtac (map_comp RS sym), rtac CollectI, |
135 |
CONJ_WRAP' (fn thm => EVERY' [rtac (thm RS @{thm ord_eq_le_trans}), |
|
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
136 |
etac @{thm flip_pred}]) set_maps]) [@{thm snd_fst_flip}, @{thm fst_snd_flip}])] 1 |
49284 | 137 |
end; |
138 |
||
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
139 |
fun mk_rel_conversep_tac le_conversep rel_mono = |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
140 |
EVERY' [rtac @{thm antisym}, rtac le_conversep, rtac @{thm xt1(6)}, rtac @{thm conversep_shift}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
141 |
rtac le_conversep, rtac @{thm iffD2[OF conversep_mono]}, rtac rel_mono, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
142 |
REPEAT_DETERM o rtac @{thm eq_refl[OF sym[OF conversep_conversep]]}] 1; |
49284 | 143 |
|
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
144 |
fun mk_rel_OO_tac rel_OO_Grs rel_eq map_cong0 map_wppull map_comp set_maps |
49284 | 145 |
{context = ctxt, prems = _} = |
146 |
let |
|
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
147 |
val n = length set_maps; |
49284 | 148 |
fun in_tac nthO_in = rtac CollectI THEN' |
149 |
CONJ_WRAP' (fn thm => EVERY' [rtac (thm RS @{thm ord_eq_le_trans}), |
|
51766
f19a4d0ab1bf
renamed "set_natural" to "set_map", reflecting {Bl,Po,Tr} concensus
blanchet
parents:
51762
diff
changeset
|
150 |
rtac @{thm image_subsetI}, rtac nthO_in, etac set_mp, atac]) set_maps; |
49284 | 151 |
in |
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
152 |
if null set_maps then rtac (rel_eq RS @{thm eq_OOI}) 1 |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
153 |
else unfold_thms_tac ctxt rel_OO_Grs THEN |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
154 |
EVERY' [rtac @{thm antisym}, rtac @{thm predicate2I}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
155 |
REPEAT_DETERM o |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
156 |
eresolve_tac [CollectE, exE, conjE, @{thm GrpE}, @{thm relcomppE}, @{thm conversepE}], |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
157 |
hyp_subst_tac ctxt, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
158 |
rtac @{thm relcomppI}, rtac @{thm relcomppI}, rtac @{thm conversepI}, rtac @{thm GrpI}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
159 |
rtac trans, rtac map_comp, rtac sym, rtac map_cong0, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
160 |
REPEAT_DETERM_N n o rtac @{thm fst_fstOp}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
161 |
in_tac @{thm fstOp_in}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
162 |
rtac @{thm GrpI}, rtac trans, rtac map_comp, rtac map_cong0, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
163 |
REPEAT_DETERM_N n o EVERY' [rtac trans, rtac o_apply, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
164 |
rtac ballE, rtac subst, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
165 |
rtac @{thm csquare_def}, rtac @{thm csquare_fstOp_sndOp}, atac, etac notE, |
49284 | 166 |
etac set_mp, atac], |
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
167 |
in_tac @{thm fstOp_in}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
168 |
rtac @{thm relcomppI}, rtac @{thm conversepI}, rtac @{thm GrpI}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
169 |
rtac trans, rtac map_comp, rtac map_cong0, |
49284 | 170 |
REPEAT_DETERM_N n o rtac o_apply, |
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
171 |
in_tac @{thm sndOp_in}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
172 |
rtac @{thm GrpI}, rtac trans, rtac map_comp, rtac sym, rtac map_cong0, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
173 |
REPEAT_DETERM_N n o rtac @{thm snd_sndOp}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
174 |
in_tac @{thm sndOp_in}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
175 |
rtac @{thm predicate2I}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
176 |
REPEAT_DETERM o eresolve_tac [@{thm relcomppE}, @{thm conversepE}, @{thm GrpE}], |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
177 |
hyp_subst_tac ctxt, |
49284 | 178 |
rtac allE, rtac subst, rtac @{thm wppull_def}, rtac map_wppull, |
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
179 |
CONJ_WRAP' (K (rtac @{thm wppull_fstOp_sndOp})) set_maps, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
180 |
etac allE, etac impE, etac conjI, etac conjI, etac sym, |
49284 | 181 |
REPEAT_DETERM o eresolve_tac [bexE, conjE], |
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
182 |
rtac @{thm relcomppI}, rtac @{thm conversepI}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
183 |
EVERY' (map (fn thm => EVERY' [rtac @{thm GrpI}, rtac trans, |
51761
4c9f08836d87
renamed "map_cong" axiom to "map_cong0" in preparation for real "map_cong"
blanchet
parents:
49623
diff
changeset
|
184 |
rtac trans, rtac map_cong0, REPEAT_DETERM_N n o rtac thm, |
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
185 |
rtac (map_comp RS sym), atac, atac]) [@{thm fst_fstOp}, @{thm snd_sndOp}])] 1 |
49284 | 186 |
end; |
187 |
||
51893
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
188 |
fun mk_in_rel_tac rel_OO_Grs {context = ctxt, prems = _} = |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
189 |
unfold_thms_tac ctxt rel_OO_Grs THEN |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
190 |
EVERY' [rtac iffI, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
191 |
REPEAT_DETERM o eresolve_tac [@{thm GrpE}, @{thm relcomppE}, @{thm conversepE}], |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
192 |
hyp_subst_tac ctxt, rtac exI, rtac conjI, atac, rtac conjI, rtac refl, rtac refl, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
193 |
REPEAT_DETERM o eresolve_tac [exE, conjE], rtac @{thm relcomppI}, rtac @{thm conversepI}, |
596baae88a88
got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents:
51798
diff
changeset
|
194 |
etac @{thm GrpI}, atac, etac @{thm GrpI}, atac] 1; |
49284 | 195 |
|
196 |
end; |