mixfix can be given for automatically lifted constants
authorChristian Urban <urbanc@in.tum.de>
Sun, 27 Jun 2010 08:33:01 +0100
changeset 37561 19fca77829ea
parent 37560 1b5bbc4a14bc
child 37562 21ab339715cd
child 37586 a209fff74792
mixfix can be given for automatically lifted constants
src/HOL/Tools/Quotient/quotient_def.ML
--- a/src/HOL/Tools/Quotient/quotient_def.ML	Sat Jun 26 08:23:40 2010 +0100
+++ b/src/HOL/Tools/Quotient/quotient_def.ML	Sun Jun 27 08:33:01 2010 +0100
@@ -12,7 +12,7 @@
   val quotdef_cmd: (binding option * mixfix) * (Attrib.binding * (string * string)) ->
     local_theory -> Quotient_Info.qconsts_info * local_theory
 
-  val lift_raw_const: typ list -> string * term -> local_theory ->
+  val lift_raw_const: typ list -> (string * term * mixfix) -> local_theory ->
     Quotient_Info.qconsts_info * local_theory
 end;
 
@@ -88,13 +88,13 @@
 end
 
 (* a wrapper for automatically lifting a raw constant *)
-fun lift_raw_const qtys (qconst_name, rconst) ctxt =
+fun lift_raw_const qtys (qconst_name, rconst, mx) ctxt =
 let
   val rty = fastype_of rconst
   val qty = derive_qtyp qtys rty ctxt
+  val lhs = Free (qconst_name, qty)
 in
-  quotient_def ((NONE, NoSyn), (Attrib.empty_binding,
-    (Free (qconst_name, qty), rconst))) ctxt
+  quotient_def ((NONE, mx), (Attrib.empty_binding, (lhs, rconst))) ctxt
 end
 
 (* parser and command *)