src/Pure/thm.ML
changeset 31903 c5221dbc40f6
parent 30717 465093aa5844
child 31905 4263be178c8f
equal deleted inserted replaced
31902:862ae16a799d 31903:c5221dbc40f6
  1108       hyps = [],
  1108       hyps = [],
  1109       tpairs = [],
  1109       tpairs = [],
  1110       prop = Logic.mk_implies (A, A)});
  1110       prop = Logic.mk_implies (A, A)});
  1111 
  1111 
  1112 (*Axiom-scheme reflecting signature contents: "OFCLASS(?'a::c, c_class)" *)
  1112 (*Axiom-scheme reflecting signature contents: "OFCLASS(?'a::c, c_class)" *)
  1113 fun class_triv thy c =
  1113 fun class_triv thy raw_c =
  1114   let
  1114   let
  1115     val Cterm {t, maxidx, sorts, ...} =
  1115     val c = Sign.certify_class thy raw_c;
  1116       cterm_of thy (Logic.mk_inclass (TVar ((Name.aT, 0), [c]), Sign.certify_class thy c))
  1116     val T = TVar ((Name.aT, 0), [c]);
  1117         handle TERM (msg, _) => raise THM ("class_triv: " ^ msg, 0, []);
  1117     val Cterm {t = prop, maxidx, sorts, ...} = cterm_of thy (Logic.mk_inclass (T, c))
  1118     val der = deriv_rule0 (Pt.PAxm ("Pure.class_triv:" ^ c, t, SOME []));
  1118       handle TERM (msg, _) => raise THM ("class_triv: " ^ msg, 0, []);
  1119   in
  1119   in
  1120     Thm (der, {thy_ref = Theory.check_thy thy, tags = [], maxidx = maxidx,
  1120     Thm (deriv_rule0 (Pt.Inclass (T, c)),
  1121       shyps = sorts, hyps = [], tpairs = [], prop = t})
  1121      {thy_ref = Theory.check_thy thy,
       
  1122       tags = [],
       
  1123       maxidx = maxidx,
       
  1124       shyps = sorts,
       
  1125       hyps = [],
       
  1126       tpairs = [],
       
  1127       prop = prop})
  1122   end;
  1128   end;
  1123 
  1129 
  1124 (*Internalize sort constraints of type variable*)
  1130 (*Internalize sort constraints of type variable*)
  1125 fun unconstrainT
  1131 fun unconstrainT
  1126     (Ctyp {thy_ref = thy_ref1, T, ...})
  1132     (Ctyp {thy_ref = thy_ref1, T, ...})