src/HOL/Tools/record_package.ML
changeset 15913 530099d1a73c
parent 15574 b1d1b5bfc464
child 15957 f2a0a80d8233
equal deleted inserted replaced
15912:47aa1a8fcdc9 15913:530099d1a73c
  1478         val sg = sign_of defs_thy;
  1478         val sg = sign_of defs_thy;
  1479         fun mkrefl (c,T) = Thm.reflexive 
  1479         fun mkrefl (c,T) = Thm.reflexive 
  1480                             (cterm_of sg (Free (variant variants (base c ^ "'"),T))); 
  1480                             (cterm_of sg (Free (variant variants (base c ^ "'"),T))); 
  1481         val refls = map mkrefl fields_more;
  1481         val refls = map mkrefl fields_more;
  1482         val constr_refl = Thm.reflexive (cterm_of sg (head_of ext));
  1482         val constr_refl = Thm.reflexive (cterm_of sg (head_of ext));
  1483         val dest_convs' = map (Thm.freezeT o mk_meta_eq) dest_convs;
  1483         val dest_convs' = map mk_meta_eq dest_convs;
  1484          (* freezeT just for performance, to adjust the maxidx, so that nodup_vars will not 
  1484          
  1485                 be called during combination *)
       
  1486         fun mkthm (udef,(fld_refl,thms)) =
  1485         fun mkthm (udef,(fld_refl,thms)) =
  1487           let val bdyeq = Library.foldl (uncurry Thm.combination) (constr_refl,thms);
  1486           let val bdyeq = Library.foldl (uncurry Thm.combination) (constr_refl,thms);
  1488                (* (|N=N (|N=N,M=M,K=K,more=more|)
  1487                (* (|N=N (|N=N,M=M,K=K,more=more|)
  1489                     M=M (|N=N,M=M,K=K,more=more|)
  1488                     M=M (|N=N,M=M,K=K,more=more|)
  1490                     K=K'
  1489                     K=K'