src/Pure/axclass.ML
changeset 61255 15865e0c5598
parent 61247 76148d288b2e
child 61256 9ce5de06cd3b
equal deleted inserted replaced
61254:4918c6e52a02 61255:15865e0c5598
   594   end;
   594   end;
   595 
   595 
   596 fun class_const c =
   596 fun class_const c =
   597   (Logic.const_of_class c, Term.itselfT (Term.aT []) --> propT);
   597   (Logic.const_of_class c, Term.itselfT (Term.aT []) --> propT);
   598 
   598 
       
   599 fun class_const_dep c =
       
   600   ((Defs.Constant, Logic.const_of_class c), [Term.aT []]);
       
   601 
   599 in
   602 in
   600 
   603 
   601 val classrel_axiomatization =
   604 val classrel_axiomatization =
   602   add_axioms (map o cert_classrel) (map Logic.mk_classrel)
   605   add_axioms (map o cert_classrel) (map Logic.mk_classrel)
   603     (map (prefix classrel_prefix o Logic.name_classrel)) add_classrel;
   606     (map (prefix classrel_prefix o Logic.name_classrel)) add_classrel;
   612     val super = map (Sign.certify_class thy) raw_super |> Sign.minimize_sort thy;
   615     val super = map (Sign.certify_class thy) raw_super |> Sign.minimize_sort thy;
   613   in
   616   in
   614     thy
   617     thy
   615     |> Sign.primitive_class (bclass, super)
   618     |> Sign.primitive_class (bclass, super)
   616     |> classrel_axiomatization (map (fn c => (class, c)) super)
   619     |> classrel_axiomatization (map (fn c => (class, c)) super)
   617     |> Theory.add_deps_global "" (Theory.DConst (class_const class))
   620     |> Theory.add_deps_global "" (class_const_dep class) (map class_const_dep super)
   618       (map (Theory.DConst o class_const) super)
       
   619   end;
   621   end;
   620 
   622 
   621 end;
   623 end;
   622 
   624 
   623 end;
   625 end;