166 let |
166 let |
167 val Some (fname, ftype, ls, rs, con_info, eqns) = |
167 val Some (fname, ftype, ls, rs, con_info, eqns) = |
168 foldr (process_eqn thy) (map snd recursion_eqns, None); |
168 foldr (process_eqn thy) (map snd recursion_eqns, None); |
169 val def = process_fun thy (fname, ftype, ls, rs, con_info, eqns) |
169 val def = process_fun thy (fname, ftype, ls, rs, con_info, eqns) |
170 val thy' = thy |> Theory.add_path (Sign.base_name (#1 def)) |
170 val thy' = thy |> Theory.add_path (Sign.base_name (#1 def)) |
171 |> Theory.add_defs_i [def] |
171 |> (PureThy.add_defs_i o map Thm.no_attributes) [def] |
172 val rewrites = get_axiom thy' (#1 def) :: |
172 val rewrites = get_thm thy' (#1 def) :: |
173 map mk_meta_eq (#rec_rewrites con_info) |
173 map mk_meta_eq (#rec_rewrites con_info) |
174 val char_thms = |
174 val char_thms = |
175 (if !Ind_Syntax.trace then (* FIXME message / quiet_mode (!?) *) |
175 (if !Ind_Syntax.trace then (* FIXME message / quiet_mode (!?) *) |
176 writeln ("Proving equations for primrec function " ^ fname) |
176 writeln ("Proving equations for primrec function " ^ fname) |
177 else (); |
177 else (); |