TFL/tfl.sml
changeset 9329 d2655dc8a4b4
parent 8818 253dad743f00
child 9640 8c6cf4f01644
equal deleted inserted replaced
9328:1a46c94d1425 9329:d2655dc8a4b4
   380                     else Name ^ "_def"
   380                     else Name ^ "_def"
   381      val wfrec_R_M =  map_term_types poly_tvars
   381      val wfrec_R_M =  map_term_types poly_tvars
   382                           (wfrec $ map_term_types poly_tvars R)
   382                           (wfrec $ map_term_types poly_tvars R)
   383                       $ functional
   383                       $ functional
   384      val def_term = mk_const_def (Theory.sign_of thy) (Name, Ty, wfrec_R_M)
   384      val def_term = mk_const_def (Theory.sign_of thy) (Name, Ty, wfrec_R_M)
   385   in  #1 (PureThy.add_defs_i [Thm.no_attributes (def_name, def_term)] thy)  end
   385   in  #1 (PureThy.add_defs_i false [Thm.no_attributes (def_name, def_term)] thy)  end
   386 end;
   386 end;
   387 
   387 
   388 
   388 
   389 
   389 
   390 (*---------------------------------------------------------------------------
   390 (*---------------------------------------------------------------------------
   535      val (Name,Ty) = dest_atom c
   535      val (Name,Ty) = dest_atom c
   536      val defn = mk_const_def (Theory.sign_of thy)
   536      val defn = mk_const_def (Theory.sign_of thy)
   537                  (Name, Ty, S.list_mk_abs (args,rhs))
   537                  (Name, Ty, S.list_mk_abs (args,rhs))
   538      val (theory, [def0]) =
   538      val (theory, [def0]) =
   539        thy
   539        thy
   540        |> PureThy.add_defs_i
   540        |> PureThy.add_defs_i false
   541             [Thm.no_attributes (fid ^ "_def", defn)]
   541             [Thm.no_attributes (fid ^ "_def", defn)]
   542      val def = freezeT def0;
   542      val def = freezeT def0;
   543      val dummy = if !trace then writeln ("DEF = " ^ string_of_thm def)
   543      val dummy = if !trace then writeln ("DEF = " ^ string_of_thm def)
   544                            else ()
   544                            else ()
   545      (* val fconst = #lhs(S.dest_eq(concl def))  *)
   545      (* val fconst = #lhs(S.dest_eq(concl def))  *)