src/Pure/Isar/class.ML
changeset 60619 7512716f03db
parent 60618 4c79543cc376
child 60816 92913f915e3d
equal deleted inserted replaced
60618:4c79543cc376 60619:7512716f03db
   760 fun standard_intro_classes_tac ctxt facts st =
   760 fun standard_intro_classes_tac ctxt facts st =
   761   if null facts andalso not (Thm.no_prems st) then
   761   if null facts andalso not (Thm.no_prems st) then
   762     (intro_classes_tac ctxt [] ORELSE Locale.intro_locales_tac true ctxt []) st
   762     (intro_classes_tac ctxt [] ORELSE Locale.intro_locales_tac true ctxt []) st
   763   else no_tac st;
   763   else no_tac st;
   764 
   764 
   765 fun standard_tac rules ctxt facts =
   765 fun standard_tac ctxt facts =
   766   HEADGOAL (Method.some_rule_tac ctxt rules facts) ORELSE
   766   HEADGOAL (Method.some_rule_tac ctxt [] facts) ORELSE
   767   standard_intro_classes_tac ctxt facts;
   767   standard_intro_classes_tac ctxt facts;
   768 
   768 
   769 fun default_tac rules ctxt facts st =
   769 fun default_tac ctxt facts st =
   770   (if Method.detect_closure_state st then
   770   (if Method.detect_closure_state st then
   771     legacy_feature
   771     legacy_feature
   772       ("Old method \"default\"; use \"standard\" instead" ^ Position.here (Position.thread_data ()))
   772       ("Old method \"default\"; use \"standard\" instead" ^ Position.here (Position.thread_data ()))
   773    else ();
   773    else ();
   774    standard_tac rules ctxt facts st);
   774    standard_tac ctxt facts st);
   775 
   775 
   776 val _ = Theory.setup
   776 val _ = Theory.setup
   777  (Method.setup @{binding intro_classes} (Scan.succeed (METHOD o intro_classes_tac))
   777  (Method.setup @{binding intro_classes} (Scan.succeed (METHOD o intro_classes_tac))
   778     "back-chain introduction rules of classes" #>
   778     "back-chain introduction rules of classes" #>
   779   Method.setup @{binding standard} (Attrib.thms >> (METHOD oo standard_tac))
   779   Method.setup @{binding standard} (Scan.succeed (METHOD o standard_tac))
   780     "standard proof step: Pure intro/elim rule or class introduction" #>
   780     "standard proof step: Pure intro/elim rule or class introduction" #>
   781   Method.setup @{binding default} (Attrib.thms >> (METHOD oo default_tac))
   781   Method.setup @{binding default} (Scan.succeed (METHOD o default_tac))
   782     "standard proof step: Pure intro/elim rule or class introduction (legacy)");
   782     "standard proof step: Pure intro/elim rule or class introduction (legacy)");
   783 
   783 
   784 
   784 
   785 
   785 
   786 (** diagnostics **)
   786 (** diagnostics **)