equal
deleted
inserted
replaced
223 val rewrites = (map mk_meta_eq rec_rewrites) @ (map (get_axiom thy' o fst) defs'); |
223 val rewrites = (map mk_meta_eq rec_rewrites) @ (map (get_axiom thy' o fst) defs'); |
224 val _ = writeln ("Proving equations for primrec function(s)\n" ^ |
224 val _ = writeln ("Proving equations for primrec function(s)\n" ^ |
225 commas names1 ^ " ..."); |
225 commas names1 ^ " ..."); |
226 val char_thms = map (fn (_, t) => prove_goalw_cterm rewrites (cterm_of (sign_of thy') t) |
226 val char_thms = map (fn (_, t) => prove_goalw_cterm rewrites (cterm_of (sign_of thy') t) |
227 (fn _ => [rtac refl 1])) eqns; |
227 (fn _ => [rtac refl 1])) eqns; |
228 val tsimps = map Attribute.tthm_of char_thms; |
228 val tsimps = Attribute.tthms_of char_thms; |
229 val thy'' = thy' |> |
229 val thy'' = thy' |> |
230 PureThy.add_tthmss [(("simps", tsimps), [Simplifier.simp_add_global])] |> |
230 PureThy.add_tthmss [(("simps", tsimps), [Simplifier.simp_add_global])] |> |
231 PureThy.add_tthms (map (rpair []) |
231 PureThy.add_tthms (map (rpair []) |
232 (filter_out (equal "" o fst) (map fst eqns ~~ tsimps))) |> |
232 (filter_out (equal "" o fst) (map fst eqns ~~ tsimps))) |> |
233 Theory.parent_path; |
233 Theory.parent_path; |