src/Pure/axclass.ML
changeset 22385 cc2be3315e72
parent 21953 ab834c5c3858
child 22570 f166a5416b3f
equal deleted inserted replaced
22384:33a46e6c7f04 22385:cc2be3315e72
    23   val prove_arity: string * sort list * sort -> tactic -> theory -> theory
    23   val prove_arity: string * sort list * sort -> tactic -> theory -> theory
    24   val define_class: bstring * xstring list -> string list ->
    24   val define_class: bstring * xstring list -> string list ->
    25     ((bstring * Attrib.src list) * string list) list -> theory -> class * theory
    25     ((bstring * Attrib.src list) * string list) list -> theory -> class * theory
    26   val define_class_i: bstring * class list -> string list ->
    26   val define_class_i: bstring * class list -> string list ->
    27     ((bstring * attribute list) * term list) list -> theory -> class * theory
    27     ((bstring * attribute list) * term list) list -> theory -> class * theory
       
    28   val read_param: theory -> string -> string
    28   val axiomatize_class: bstring * xstring list -> theory -> theory
    29   val axiomatize_class: bstring * xstring list -> theory -> theory
    29   val axiomatize_class_i: bstring * class list -> theory -> theory
    30   val axiomatize_class_i: bstring * class list -> theory -> theory
    30   val axiomatize_classrel: (xstring * xstring) list -> theory -> theory
    31   val axiomatize_classrel: (xstring * xstring) list -> theory -> theory
    31   val axiomatize_classrel_i: (class * class) list -> theory -> theory
    32   val axiomatize_classrel_i: (class * class) list -> theory -> theory
    32   val axiomatize_arity: xstring * string list * string -> theory -> theory
    33   val axiomatize_arity: xstring * string list * string -> theory -> theory
   267 
   268 
   268 
   269 
   269 
   270 
   270 (** class definitions **)
   271 (** class definitions **)
   271 
   272 
   272 local
       
   273 
       
   274 fun read_param thy raw_t =
   273 fun read_param thy raw_t =
   275   let
   274   let
   276     val t = Sign.read_term thy raw_t
   275     val t = Sign.read_term thy raw_t
   277   in case try dest_Const t
   276   in case try dest_Const t
   278    of SOME (c, _) => c
   277    of SOME (c, _) => c
   279     | NONE => error ("Not a constant: " ^ Sign.string_of_term thy t)
   278     | NONE => error ("Not a constant: " ^ Sign.string_of_term thy t)
   280   end;
   279   end;
       
   280 
       
   281 local
   281 
   282 
   282 fun def_class prep_class prep_att prep_param prep_propp
   283 fun def_class prep_class prep_att prep_param prep_propp
   283     (bclass, raw_super) raw_params raw_specs thy =
   284     (bclass, raw_super) raw_params raw_specs thy =
   284   let
   285   let
   285     val ctxt = ProofContext.init thy;
   286     val ctxt = ProofContext.init thy;