src/ZF/Tools/primrec_package.ML
changeset 7904 2b551893583e
parent 6141 a6922171b396
child 8438 b8389b4fca9c
equal deleted inserted replaced
7903:cc6177e1efca 7904:2b551893583e
   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 ();