equal
deleted
inserted
replaced
170 |
170 |
171 val ([def_thm], thy1) = thy |
171 val ([def_thm], thy1) = thy |
172 |> Sign.add_path (Long_Name.base_name fname) |
172 |> Sign.add_path (Long_Name.base_name fname) |
173 |> Global_Theory.add_defs false [Thm.no_attributes (apfst Binding.name def)]; |
173 |> Global_Theory.add_defs false [Thm.no_attributes (apfst Binding.name def)]; |
174 |
174 |
175 val rewrites = def_thm :: map mk_meta_eq (#rec_rewrites con_info) |
175 val rewrites = def_thm :: map (mk_meta_eq o Thm.transfer thy1) (#rec_rewrites con_info) |
176 val eqn_thms = |
176 val eqn_thms = |
177 eqn_terms |> map (fn t => |
177 eqn_terms |> map (fn t => |
178 Goal.prove_global thy1 [] [] (Ind_Syntax.traceIt "next primrec equation = " thy1 t) |
178 Goal.prove_global thy1 [] [] (Ind_Syntax.traceIt "next primrec equation = " thy1 t) |
179 (fn {context = ctxt, ...} => |
179 (fn {context = ctxt, ...} => |
180 EVERY [rewrite_goals_tac ctxt rewrites, resolve_tac ctxt @{thms refl} 1])); |
180 EVERY [rewrite_goals_tac ctxt rewrites, resolve_tac ctxt @{thms refl} 1])); |