src/HOL/Tools/BNF/bnf_comp.ML
changeset 55900 21aa30ea6806
parent 55856 bddaada24074
child 55904 0ef30d52c5e4
equal deleted inserted replaced
55899:8c0a13e84963 55900:21aa30ea6806
   625    abs_inject = Morphism.thm phi abs_inject,
   625    abs_inject = Morphism.thm phi abs_inject,
   626    abs_inverse = Morphism.thm phi abs_inverse,
   626    abs_inverse = Morphism.thm phi abs_inverse,
   627    type_definition = Morphism.thm phi type_definition};
   627    type_definition = Morphism.thm phi type_definition};
   628 
   628 
   629 fun mk_absT thy repT absT repU =
   629 fun mk_absT thy repT absT repU =
   630   let val rho = Vartab.fold (cons o apsnd snd) (Sign.typ_match thy (repT, repU) Vartab.empty) [];
   630   let
   631   in Term.typ_subst_TVars rho absT end;
   631  val rho = Vartab.fold (cons o apsnd snd) (Sign.typ_match thy (repT, repU) Vartab.empty) [];
       
   632   in Term.typ_subst_TVars rho absT end
       
   633   handle Type.TYPE_MATCH => raise Term.TYPE ("mk_absT", [repT, absT, repU], []);
   632 
   634 
   633 fun mk_repT absT repT absU =
   635 fun mk_repT absT repT absU =
   634   if absT = repT then absU
   636   if absT = repT then absU
   635   else
   637   else
   636     (case (absT, absU) of
   638     (case (absT, absU) of