src/HOL/Tools/Quotient/quotient_term.ML
changeset 45628 f21eb7073895
parent 45534 4ab21521b393
child 45795 2d8949268303
equal deleted inserted replaced
45627:a0336f8b6558 45628:f21eb7073895
   123 (* produces the rep or abs constant for a qty *)
   123 (* produces the rep or abs constant for a qty *)
   124 fun absrep_const flag ctxt qty_str =
   124 fun absrep_const flag ctxt qty_str =
   125   let
   125   let
   126     (* FIXME *)
   126     (* FIXME *)
   127     fun mk_dummyT (Const (c, _)) = Const (c, dummyT)
   127     fun mk_dummyT (Const (c, _)) = Const (c, dummyT)
   128       | mk_dummyT _ = error "Expecting abs/rep term to be a constant"     
   128       | mk_dummyT (Free (c, _)) = Free (c, dummyT)
       
   129       | mk_dummyT _ = error "Expecting abs/rep term to be a constant or a free variable"     
   129   in
   130   in
   130     case Quotient_Info.lookup_abs_rep ctxt qty_str of
   131     case Quotient_Info.lookup_abs_rep ctxt qty_str of
   131       SOME abs_rep => 
   132       SOME abs_rep => 
   132         mk_dummyT (case flag of
   133         mk_dummyT (case flag of
   133           AbsF => #abs abs_rep
   134           AbsF => #abs abs_rep