Quot/quotient_def.ML
changeset 869 ce5f78f0eac5
parent 868 09d5b7f0e55d
child 884 e49c6b6f37f4
equal deleted inserted replaced
868:09d5b7f0e55d 869:ce5f78f0eac5
    49 
    49 
    50   val ((trm, thm), lthy') = define qconst_bname mx attr newrhs lthy
    50   val ((trm, thm), lthy') = define qconst_bname mx attr newrhs lthy
    51 
    51 
    52   (* data storage *)
    52   (* data storage *)
    53   fun qcinfo phi = transform_qconsts phi {qconst = trm, rconst = rhs, def = thm}
    53   fun qcinfo phi = transform_qconsts phi {qconst = trm, rconst = rhs, def = thm}
       
    54   fun trans_name phi = (fst o dest_Const o #qconst) (qcinfo phi)
    54   val lthy'' = Local_Theory.declaration true
    55   val lthy'' = Local_Theory.declaration true
    55                  (fn phi => qconsts_update_gen lhs_str (qcinfo phi)) lthy'
    56                  (fn phi => qconsts_update_gen (trans_name phi) (qcinfo phi)) lthy'
    56 in
    57 in
    57   ((trm, thm), lthy'')
    58   ((trm, thm), lthy'')
    58 end
    59 end
    59 
    60 
    60 fun quotdef_cmd ((attr, lhs_str), (mx, rhs_str)) lthy =
    61 fun quotdef_cmd ((attr, lhs_str), (mx, rhs_str)) lthy =