equal
deleted
inserted
replaced
219 Theory.add_path (if_none alt_name (space_implode "_" |
219 Theory.add_path (if_none alt_name (space_implode "_" |
220 (map (Sign.base_name o #1) defs))) |> |
220 (map (Sign.base_name o #1) defs))) |> |
221 (if eq_set (names1, names2) then Theory.add_defs_i defs' |
221 (if eq_set (names1, names2) then Theory.add_defs_i defs' |
222 else primrec_err ("functions " ^ commas names2 ^ |
222 else primrec_err ("functions " ^ commas names2 ^ |
223 "\nare not mutually recursive")); |
223 "\nare not mutually recursive")); |
224 val rewrites = (map mk_meta_eq rec_rewrites) @ (map (get_axiom thy' o fst) defs'); |
224 val rewrites = (map meta_eq rec_rewrites) @ (map (get_axiom thy' o fst) defs'); |
225 val _ = writeln ("Proving equations for primrec function(s)\n" ^ |
225 val _ = writeln ("Proving equations for primrec function(s)\n" ^ |
226 commas names1 ^ " ..."); |
226 commas names1 ^ " ..."); |
227 val char_thms = map (fn t => prove_goalw_cterm rewrites (cterm_of (sign_of thy') t) |
227 val char_thms = map (fn t => prove_goalw_cterm rewrites (cterm_of (sign_of thy') t) |
228 (fn _ => [rtac refl 1])) eqns; |
228 (fn _ => [rtac refl 1])) eqns; |
229 val tsimps = map Attribute.tthm_of char_thms; |
229 val tsimps = map Attribute.tthm_of char_thms; |