51726
|
1 |
(* Title: HOL/Tools/reflection.ML
|
|
2 |
Author: Amine Chaieb, TU Muenchen
|
|
3 |
|
|
4 |
A trial for automatical reification.
|
|
5 |
*)
|
|
6 |
|
|
7 |
signature REFLECTION =
|
|
8 |
sig
|
52275
|
9 |
val reify: Proof.context -> thm list -> conv
|
52272
|
10 |
val reify_tac: Proof.context -> thm list -> term option -> int -> tactic
|
52276
|
11 |
val reflect: Proof.context -> thm list -> thm list -> conv
|
|
12 |
val reflection_tac: Proof.context -> thm list -> thm list -> term option -> int -> tactic
|
|
13 |
val reflect_with_eval: Proof.context -> thm list -> thm list -> conv -> conv
|
|
14 |
val reflection_with_eval_tac: Proof.context -> thm list -> thm list -> conv -> term option -> int -> tactic
|
51726
|
15 |
val get_default: Proof.context -> { reification_eqs: thm list, correctness_thms: thm list }
|
|
16 |
val add_reification_eq: attribute
|
|
17 |
val del_reification_eq: attribute
|
|
18 |
val add_correctness_thm: attribute
|
|
19 |
val del_correctness_thm: attribute
|
|
20 |
val default_reify_tac: Proof.context -> thm list -> term option -> int -> tactic
|
|
21 |
val default_reflection_tac: Proof.context -> thm list -> thm list -> term option -> int -> tactic
|
|
22 |
end;
|
|
23 |
|
|
24 |
structure Reflection : REFLECTION =
|
|
25 |
struct
|
|
26 |
|
52275
|
27 |
fun dest_listT (Type (@{type_name "list"}, [T])) = T;
|
|
28 |
|
51726
|
29 |
val FWD = curry (op OF);
|
|
30 |
|
52275
|
31 |
fun rewrite_with ctxt eqs = Simplifier.rewrite (put_simpset HOL_basic_ss ctxt addsimps eqs);
|
|
32 |
|
|
33 |
val pure_subst = @{lemma "x == y ==> PROP P y ==> PROP P x" by simp}
|
51726
|
34 |
|
52276
|
35 |
fun lift_conv ctxt conv some_t = Subgoal.FOCUS (fn { concl, ... } =>
|
52275
|
36 |
let
|
|
37 |
val ct = case some_t
|
|
38 |
of NONE => Thm.dest_arg concl
|
|
39 |
| SOME t => Thm.cterm_of (Proof_Context.theory_of ctxt) t
|
|
40 |
val thm = conv ct;
|
|
41 |
in
|
|
42 |
if Thm.is_reflexive thm then no_tac
|
|
43 |
else ALLGOALS (rtac (pure_subst OF [thm]))
|
|
44 |
end) ctxt;
|
51726
|
45 |
|
|
46 |
(* Make a congruence rule out of a defining equation for the interpretation
|
|
47 |
|
|
48 |
th is one defining equation of f,
|
|
49 |
i.e. th is "f (Cp ?t1 ... ?tn) = P(f ?t1, .., f ?tn)"
|
|
50 |
Cp is a constructor pattern and P is a pattern
|
|
51 |
|
|
52 |
The result is:
|
|
53 |
[|?A1 = f ?t1 ; .. ; ?An= f ?tn |] ==> P (?A1, .., ?An) = f (Cp ?t1 .. ?tn)
|
|
54 |
+ the a list of names of the A1 .. An, Those are fresh in the ctxt *)
|
|
55 |
|
|
56 |
fun mk_congeq ctxt fs th =
|
|
57 |
let
|
|
58 |
val Const (fN, _) = th |> prop_of |> HOLogic.dest_Trueprop |> HOLogic.dest_eq
|
|
59 |
|> fst |> strip_comb |> fst;
|
52273
|
60 |
val cert = Thm.cterm_of (Proof_Context.theory_of ctxt);
|
51726
|
61 |
val ((_, [th']), ctxt') = Variable.import true [th] ctxt;
|
|
62 |
val (lhs, rhs) = HOLogic.dest_eq (HOLogic.dest_Trueprop (Thm.prop_of th'));
|
|
63 |
fun add_fterms (t as t1 $ t2) =
|
|
64 |
if exists (fn f => Term.could_unify (t |> strip_comb |> fst, f)) fs
|
|
65 |
then insert (op aconv) t
|
|
66 |
else add_fterms t1 #> add_fterms t2
|
|
67 |
| add_fterms (t as Abs _) =
|
|
68 |
if exists_Const (fn (c, _) => c = fN) t
|
|
69 |
then K [t]
|
|
70 |
else K []
|
|
71 |
| add_fterms _ = I;
|
|
72 |
val fterms = add_fterms rhs [];
|
|
73 |
val (xs, ctxt'') = Variable.variant_fixes (replicate (length fterms) "x") ctxt';
|
|
74 |
val tys = map fastype_of fterms;
|
|
75 |
val vs = map Free (xs ~~ tys);
|
|
76 |
val env = fterms ~~ vs; (*FIXME*)
|
|
77 |
fun replace_fterms (t as t1 $ t2) =
|
|
78 |
(case AList.lookup (op aconv) env t of
|
|
79 |
SOME v => v
|
|
80 |
| NONE => replace_fterms t1 $ replace_fterms t2)
|
|
81 |
| replace_fterms t =
|
|
82 |
(case AList.lookup (op aconv) env t of
|
|
83 |
SOME v => v
|
|
84 |
| NONE => t);
|
|
85 |
fun mk_def (Abs (x, xT, t), v) =
|
|
86 |
HOLogic.mk_Trueprop (HOLogic.all_const xT $ Abs (x, xT, HOLogic.mk_eq (v $ Bound 0, t)))
|
|
87 |
| mk_def (t, v) = HOLogic.mk_Trueprop (HOLogic.mk_eq (v, t));
|
|
88 |
fun tryext x =
|
|
89 |
(x RS @{lemma "(\<forall>x. f x = g x) \<Longrightarrow> f = g" by blast} handle THM _ => x);
|
|
90 |
val cong =
|
|
91 |
(Goal.prove ctxt'' [] (map mk_def env)
|
|
92 |
(HOLogic.mk_Trueprop (HOLogic.mk_eq (lhs, replace_fterms rhs)))
|
|
93 |
(fn {context, prems, ...} =>
|
|
94 |
Local_Defs.unfold_tac context (map tryext prems) THEN rtac th' 1)) RS sym;
|
|
95 |
val (cong' :: vars') =
|
|
96 |
Variable.export ctxt'' ctxt (cong :: map (Drule.mk_term o cert) vs);
|
|
97 |
val vs' = map (fst o fst o Term.dest_Var o Thm.term_of o Drule.dest_term) vars';
|
|
98 |
|
|
99 |
in (vs', cong') end;
|
|
100 |
|
|
101 |
(* congs is a list of pairs (P,th) where th is a theorem for
|
|
102 |
[| f p1 = A1; ...; f pn = An|] ==> f (C p1 .. pn) = P *)
|
|
103 |
|
|
104 |
fun rearrange congs =
|
|
105 |
let
|
|
106 |
fun P (_, th) =
|
|
107 |
let val @{term "Trueprop"} $ (Const (@{const_name HOL.eq}, _) $ l $ _) = concl_of th
|
|
108 |
in can dest_Var l end;
|
|
109 |
val (yes, no) = List.partition P congs;
|
|
110 |
in no @ yes end;
|
|
111 |
|
52275
|
112 |
fun dereify ctxt eqs =
|
|
113 |
rewrite_with ctxt (eqs @ @{thms nth_Cons_0 nth_Cons_Suc});
|
|
114 |
|
|
115 |
fun reify ctxt eqs ct =
|
51726
|
116 |
let
|
|
117 |
fun index_of t bds =
|
|
118 |
let
|
|
119 |
val tt = HOLogic.listT (fastype_of t);
|
|
120 |
in
|
|
121 |
(case AList.lookup Type.could_unify bds tt of
|
52273
|
122 |
NONE => error "index_of: type not found in environements!"
|
51726
|
123 |
| SOME (tbs, tats) =>
|
|
124 |
let
|
|
125 |
val i = find_index (fn t' => t' = t) tats;
|
|
126 |
val j = find_index (fn t' => t' = t) tbs;
|
|
127 |
in
|
|
128 |
if j = ~1 then
|
|
129 |
if i = ~1
|
|
130 |
then (length tbs + length tats, AList.update Type.could_unify (tt, (tbs, tats @ [t])) bds)
|
|
131 |
else (i, bds)
|
|
132 |
else (j, bds)
|
|
133 |
end)
|
|
134 |
end;
|
|
135 |
|
|
136 |
(* Generic decomp for reification : matches the actual term with the
|
|
137 |
rhs of one cong rule. The result of the matching guides the
|
|
138 |
proof synthesis: The matches of the introduced Variables A1 .. An are
|
|
139 |
processed recursively
|
|
140 |
The rest is instantiated in the cong rule,i.e. no reification is needed *)
|
|
141 |
|
|
142 |
(* da is the decomposition for atoms, ie. it returns ([],g) where g
|
|
143 |
returns the right instance f (AtC n) = t , where AtC is the Atoms
|
|
144 |
constructor and n is the number of the atom corresponding to t *)
|
52275
|
145 |
fun decomp_reify da cgns (ct, ctxt) bds =
|
51726
|
146 |
let
|
|
147 |
val thy = Proof_Context.theory_of ctxt;
|
|
148 |
val cert = cterm_of thy;
|
52273
|
149 |
val certT = ctyp_of thy;
|
52275
|
150 |
fun tryabsdecomp (ct, ctxt) bds =
|
|
151 |
(case Thm.term_of ct of
|
51726
|
152 |
Abs (_, xT, ta) =>
|
|
153 |
let
|
|
154 |
val ([raw_xn], ctxt') = Variable.variant_fixes ["x"] ctxt;
|
|
155 |
val (xn, ta) = Syntax_Trans.variant_abs (raw_xn, xT, ta); (* FIXME !? *)
|
52273
|
156 |
val x = Free (xn, xT);
|
52275
|
157 |
val cx = cert x;
|
|
158 |
val cta = cert ta;
|
51726
|
159 |
val bds = (case AList.lookup Type.could_unify bds (HOLogic.listT xT) of
|
|
160 |
NONE => error "tryabsdecomp: Type not found in the Environement"
|
52275
|
161 |
| SOME (bsT, atsT) => AList.update Type.could_unify (HOLogic.listT xT,
|
|
162 |
(x :: bsT, atsT)) bds);
|
|
163 |
in (([(cta, ctxt')],
|
51726
|
164 |
fn ([th], bds) =>
|
52275
|
165 |
(hd (Variable.export ctxt' ctxt [(Thm.forall_intr cx th) COMP allI]),
|
51726
|
166 |
let
|
|
167 |
val (bsT, asT) = the (AList.lookup Type.could_unify bds (HOLogic.listT xT));
|
|
168 |
in
|
52275
|
169 |
AList.update Type.could_unify (HOLogic.listT xT, (tl bsT, asT)) bds
|
51726
|
170 |
end)),
|
|
171 |
bds)
|
|
172 |
end
|
52275
|
173 |
| _ => da (ct, ctxt) bds)
|
51726
|
174 |
in
|
|
175 |
(case cgns of
|
52275
|
176 |
[] => tryabsdecomp (ct, ctxt) bds
|
51726
|
177 |
| ((vns, cong) :: congs) =>
|
|
178 |
(let
|
|
179 |
val (tyenv, tmenv) =
|
|
180 |
Pattern.match thy
|
52275
|
181 |
((fst o HOLogic.dest_eq o HOLogic.dest_Trueprop) (concl_of cong), Thm.term_of ct)
|
51726
|
182 |
(Vartab.empty, Vartab.empty);
|
|
183 |
val (fnvs, invs) = List.partition (fn ((vn, _),_) => member (op =) vns vn) (Vartab.dest tmenv);
|
|
184 |
val (fts, its) =
|
|
185 |
(map (snd o snd) fnvs,
|
|
186 |
map (fn ((vn, vi), (tT, t)) => (cert (Var ((vn, vi), tT)), cert t)) invs);
|
52273
|
187 |
val ctyenv = map (fn ((vn, vi), (s, ty)) => (certT (TVar((vn, vi), s)), certT ty)) (Vartab.dest tyenv);
|
51726
|
188 |
in
|
52275
|
189 |
((map cert fts ~~ replicate (length fts) ctxt,
|
51726
|
190 |
apfst (FWD (Drule.instantiate_normalize (ctyenv, its) cong))), bds)
|
52275
|
191 |
end handle Pattern.MATCH => decomp_reify da congs (ct, ctxt) bds))
|
51726
|
192 |
end;
|
|
193 |
|
|
194 |
(* looks for the atoms equation and instantiates it with the right number *)
|
52275
|
195 |
fun mk_decompatom eqs (ct, ctxt) bds = (([], fn (_, bds) =>
|
51726
|
196 |
let
|
52275
|
197 |
val tT = fastype_of (Thm.term_of ct);
|
51726
|
198 |
fun isat eq =
|
|
199 |
let
|
|
200 |
val rhs = eq |> prop_of |> HOLogic.dest_Trueprop |> HOLogic.dest_eq |> snd;
|
|
201 |
in exists_Const
|
|
202 |
(fn (n, ty) => n = @{const_name "List.nth"}
|
|
203 |
andalso AList.defined Type.could_unify bds (domain_type ty)) rhs
|
|
204 |
andalso Type.could_unify (fastype_of rhs, tT)
|
|
205 |
end;
|
|
206 |
|
52275
|
207 |
fun get_nths (t as (Const (@{const_name "List.nth"}, _) $ vs $ n)) =
|
|
208 |
AList.update (op aconv) (t, (vs, n))
|
|
209 |
| get_nths (t1 $ t2) = get_nths t1 #> get_nths t2
|
|
210 |
| get_nths (Abs (_, _, t')) = get_nths t'
|
|
211 |
| get_nths _ = I;
|
51726
|
212 |
|
52276
|
213 |
fun tryeqs [] bds = error "Cannot find the atoms equation"
|
51726
|
214 |
| tryeqs (eq :: eqs) bds = ((
|
|
215 |
let
|
|
216 |
val rhs = eq |> prop_of |> HOLogic.dest_Trueprop |> HOLogic.dest_eq |> snd;
|
|
217 |
val nths = get_nths rhs [];
|
|
218 |
val (vss, _) = fold_rev (fn (_, (vs, n)) => fn (vss, ns) =>
|
|
219 |
(insert (op aconv) vs vss, insert (op aconv) n ns)) nths ([], []);
|
|
220 |
val (vsns, ctxt') = Variable.variant_fixes (replicate (length vss) "vs") ctxt;
|
|
221 |
val (xns, ctxt'') = Variable.variant_fixes (replicate (length nths) "x") ctxt';
|
|
222 |
val thy = Proof_Context.theory_of ctxt'';
|
|
223 |
val cert = cterm_of thy;
|
|
224 |
val certT = ctyp_of thy;
|
|
225 |
val vsns_map = vss ~~ vsns;
|
|
226 |
val xns_map = fst (split_list nths) ~~ xns;
|
|
227 |
val subst = map (fn (nt, xn) => (nt, Var ((xn, 0), fastype_of nt))) xns_map;
|
|
228 |
val rhs_P = subst_free subst rhs;
|
52275
|
229 |
val (tyenv, tmenv) = Pattern.match thy (rhs_P, Thm.term_of ct) (Vartab.empty, Vartab.empty);
|
51726
|
230 |
val sbst = Envir.subst_term (tyenv, tmenv);
|
|
231 |
val sbsT = Envir.subst_type tyenv;
|
|
232 |
val subst_ty = map (fn (n, (s, t)) =>
|
|
233 |
(certT (TVar (n, s)), certT t)) (Vartab.dest tyenv)
|
|
234 |
val tml = Vartab.dest tmenv;
|
|
235 |
val (subst_ns, bds) = fold_map
|
|
236 |
(fn (Const _ $ _ $ n, Var (xn0, _)) => fn bds =>
|
|
237 |
let
|
|
238 |
val name = snd (the (AList.lookup (op =) tml xn0));
|
|
239 |
val (idx, bds) = index_of name bds;
|
|
240 |
in ((cert n, idx |> (HOLogic.mk_nat #> cert)), bds) end) subst bds;
|
|
241 |
val subst_vs =
|
|
242 |
let
|
|
243 |
fun h (Const _ $ (vs as Var (_, lT)) $ _, Var (_, T)) =
|
|
244 |
let
|
|
245 |
val cns = sbst (Const (@{const_name "List.Cons"}, T --> lT --> lT));
|
|
246 |
val lT' = sbsT lT;
|
|
247 |
val (bsT, _) = the (AList.lookup Type.could_unify bds lT);
|
|
248 |
val vsn = the (AList.lookup (op =) vsns_map vs);
|
|
249 |
val cvs = cert (fold_rev (fn x => fn xs => cns $ x $xs) bsT (Free (vsn, lT')));
|
|
250 |
in (cert vs, cvs) end;
|
|
251 |
in map h subst end;
|
|
252 |
val cts = map (fn ((vn, vi), (tT, t)) => (cert (Var ((vn, vi), tT)), cert t))
|
|
253 |
(fold (AList.delete (fn (((a : string), _), (b, _)) => a = b))
|
|
254 |
(map (fn n => (n, 0)) xns) tml);
|
|
255 |
val substt =
|
|
256 |
let
|
|
257 |
val ih = Drule.cterm_rule (Thm.instantiate (subst_ty, []));
|
52275
|
258 |
in map (pairself ih) (subst_ns @ subst_vs @ cts) end;
|
51726
|
259 |
val th = (Drule.instantiate_normalize (subst_ty, substt) eq) RS sym;
|
|
260 |
in (hd (Variable.export ctxt'' ctxt [th]), bds) end)
|
|
261 |
handle Pattern.MATCH => tryeqs eqs bds)
|
|
262 |
in tryeqs (filter isat eqs) bds end), bds);
|
|
263 |
|
|
264 |
(* Generic reification procedure: *)
|
|
265 |
(* creates all needed cong rules and then just uses the theorem synthesis *)
|
|
266 |
|
|
267 |
fun mk_congs ctxt eqs =
|
|
268 |
let
|
|
269 |
val fs = fold_rev (fn eq => insert (op =) (eq |> prop_of |> HOLogic.dest_Trueprop
|
|
270 |
|> HOLogic.dest_eq |> fst |> strip_comb
|
|
271 |
|> fst)) eqs [];
|
|
272 |
val tys = fold_rev (fn f => fold (insert (op =)) (f |> fastype_of |> binder_types |> tl)) fs [];
|
|
273 |
val (vs, ctxt') = Variable.variant_fixes (replicate (length tys) "vs") ctxt;
|
52273
|
274 |
val cert = cterm_of (Proof_Context.theory_of ctxt');
|
|
275 |
val subst =
|
|
276 |
the o AList.lookup (op =) (map2 (fn T => fn v => (T, cert (Free (v, T)))) tys vs);
|
51726
|
277 |
fun prep_eq eq =
|
|
278 |
let
|
|
279 |
val (_, _ :: vs) = eq |> prop_of |> HOLogic.dest_Trueprop
|
|
280 |
|> HOLogic.dest_eq |> fst |> strip_comb;
|
52273
|
281 |
val subst = map_filter (fn (v as Var (_, T)) => SOME (cert v, subst T)
|
|
282 |
| _ => NONE) vs;
|
51726
|
283 |
in Thm.instantiate ([], subst) eq end;
|
|
284 |
val (ps, congs) = map_split (mk_congeq ctxt' fs o prep_eq) eqs;
|
|
285 |
val bds = AList.make (K ([], [])) tys;
|
|
286 |
in (ps ~~ Variable.export ctxt' ctxt congs, bds) end
|
|
287 |
|
|
288 |
val (congs, bds) = mk_congs ctxt eqs;
|
|
289 |
val congs = rearrange congs;
|
52275
|
290 |
val (th, bds') = apfst mk_eq (divide_and_conquer' (decomp_reify (mk_decompatom eqs) congs) (ct, ctxt) bds);
|
52273
|
291 |
fun is_list_var (Var (_, t)) = can dest_listT t
|
|
292 |
| is_list_var _ = false;
|
52275
|
293 |
val vars = th |> prop_of |> Logic.dest_equals |> snd
|
52273
|
294 |
|> strip_comb |> snd |> filter is_list_var;
|
51726
|
295 |
val cert = cterm_of (Proof_Context.theory_of ctxt);
|
52275
|
296 |
val vs = map (fn v as Var (_, T) =>
|
|
297 |
(v, the (AList.lookup Type.could_unify bds' T) |> snd |> HOLogic.mk_list (dest_listT T))) vars;
|
|
298 |
val th' = Drule.instantiate_normalize ([], (map o pairself) cert vs) th;
|
|
299 |
val th'' = Thm.symmetric (dereify ctxt [] (Thm.lhs_of th'));
|
|
300 |
in Thm.transitive th'' th' end;
|
51726
|
301 |
|
52276
|
302 |
fun reify_tac ctxt eqs =
|
|
303 |
lift_conv ctxt (reify ctxt eqs);
|
|
304 |
|
52275
|
305 |
fun subst_correctness corr_thms ct =
|
|
306 |
Conv.rewrs_conv (map (Thm.symmetric o mk_eq) corr_thms) ct
|
|
307 |
handle CTERM _ => error "No suitable correctness theorem found";
|
|
308 |
|
52276
|
309 |
fun reflect ctxt corr_thms eqs =
|
|
310 |
(reify ctxt eqs) then_conv (subst_correctness corr_thms)
|
|
311 |
|
|
312 |
fun reflection_tac ctxt corr_thms eqs =
|
|
313 |
lift_conv ctxt (reflect ctxt corr_thms eqs);
|
|
314 |
|
52275
|
315 |
fun first_arg_conv conv =
|
51726
|
316 |
let
|
52275
|
317 |
fun conv' ct =
|
|
318 |
if can Thm.dest_comb (fst (Thm.dest_comb ct))
|
|
319 |
then Conv.combination_conv conv' Conv.all_conv ct
|
|
320 |
else Conv.combination_conv Conv.all_conv conv ct;
|
|
321 |
in conv' end;
|
51726
|
322 |
|
52276
|
323 |
fun reflect_with_eval ctxt corr_thms eqs conv =
|
|
324 |
(reflect ctxt corr_thms eqs) then_conv (first_arg_conv conv) then_conv (dereify ctxt eqs);
|
51726
|
325 |
|
52276
|
326 |
fun reflection_with_eval_tac ctxt corr_thms eqs conv =
|
|
327 |
lift_conv ctxt (reflect_with_eval ctxt corr_thms eqs conv);
|
51726
|
328 |
|
|
329 |
structure Data = Generic_Data
|
|
330 |
(
|
|
331 |
type T = thm list * thm list;
|
|
332 |
val empty = ([], []);
|
|
333 |
val extend = I;
|
|
334 |
fun merge ((ths1, rths1), (ths2, rths2)) =
|
|
335 |
(Thm.merge_thms (ths1, ths2), Thm.merge_thms (rths1, rths2));
|
|
336 |
);
|
|
337 |
|
|
338 |
fun get_default ctxt =
|
|
339 |
let
|
|
340 |
val (reification_eqs, correctness_thms) = Data.get (Context.Proof ctxt);
|
|
341 |
in { reification_eqs = reification_eqs, correctness_thms = correctness_thms } end;
|
|
342 |
|
|
343 |
val add_reification_eq = Thm.declaration_attribute (Data.map o apfst o Thm.add_thm);
|
|
344 |
val del_reification_eq = Thm.declaration_attribute (Data.map o apfst o Thm.del_thm);
|
|
345 |
val add_correctness_thm = Thm.declaration_attribute (Data.map o apsnd o Thm.add_thm);
|
|
346 |
val del_correctness_thm = Thm.declaration_attribute (Data.map o apsnd o Thm.del_thm);
|
|
347 |
|
|
348 |
val _ = Context.>> (Context.map_theory
|
|
349 |
(Attrib.setup @{binding reify}
|
|
350 |
(Attrib.add_del add_reification_eq del_reification_eq) "declare reification equations" #>
|
|
351 |
Attrib.setup @{binding reflection}
|
|
352 |
(Attrib.add_del add_correctness_thm del_correctness_thm) "declare reflection correctness theorems"));
|
|
353 |
|
|
354 |
fun default_reify_tac ctxt user_eqs =
|
|
355 |
let
|
|
356 |
val { reification_eqs = default_eqs, correctness_thms = _ } =
|
|
357 |
get_default ctxt;
|
|
358 |
val eqs = fold Thm.add_thm user_eqs default_eqs;
|
52272
|
359 |
in reify_tac ctxt eqs end;
|
51726
|
360 |
|
|
361 |
fun default_reflection_tac ctxt user_thms user_eqs =
|
|
362 |
let
|
|
363 |
val { reification_eqs = default_eqs, correctness_thms = default_thms } =
|
|
364 |
get_default ctxt;
|
|
365 |
val corr_thms = fold Thm.add_thm user_thms default_thms;
|
|
366 |
val eqs = fold Thm.add_thm user_eqs default_eqs;
|
52276
|
367 |
in reflection_tac ctxt corr_thms eqs end;
|
51726
|
368 |
|
52276
|
369 |
end;
|