src/HOL/Orderings.thy
changeset 24704 9a95634ab135
parent 24641 448edc627ee4
child 24741 a53f5db5acbb
     1.1 --- a/src/HOL/Orderings.thy	Tue Sep 25 12:16:15 2007 +0200
     1.2 +++ b/src/HOL/Orderings.thy	Tue Sep 25 12:56:27 2007 +0200
     1.3 @@ -243,7 +243,7 @@
     1.4  sig
     1.5    val print_structures: Proof.context -> unit
     1.6    val setup: theory -> theory
     1.7 -  val order_tac: Proof.context -> int -> tactic
     1.8 +  val order_tac: thm list -> Proof.context -> int -> tactic
     1.9  end;
    1.10  
    1.11  structure Orders: ORDERS =
    1.12 @@ -283,7 +283,7 @@
    1.13  
    1.14  (** Method **)
    1.15  
    1.16 -fun struct_tac ((s, [eq, le, less]), thms) =
    1.17 +fun struct_tac ((s, [eq, le, less]), thms) prems =
    1.18    let
    1.19      fun decomp thy (Trueprop $ t) =
    1.20        let
    1.21 @@ -306,13 +306,13 @@
    1.22        in dec t end;
    1.23    in
    1.24      case s of
    1.25 -      "order" => Order_Tac.partial_tac decomp thms
    1.26 -    | "linorder" => Order_Tac.linear_tac decomp thms
    1.27 +      "order" => Order_Tac.partial_tac decomp thms prems
    1.28 +    | "linorder" => Order_Tac.linear_tac decomp thms prems
    1.29      | _ => error ("Unknown kind of order `" ^ s ^ "' encountered in transitivity reasoner.")
    1.30    end
    1.31  
    1.32 -fun order_tac ctxt =
    1.33 -  FIRST' (map (fn s => CHANGED o struct_tac s) (Data.get (Context.Proof ctxt)));
    1.34 +fun order_tac prems ctxt =
    1.35 +  FIRST' (map (fn s => CHANGED o struct_tac s prems) (Data.get (Context.Proof ctxt)));
    1.36  
    1.37  
    1.38  (** Attribute **)
    1.39 @@ -349,7 +349,7 @@
    1.40  (** Setup **)
    1.41  
    1.42  val setup = let val _ = OuterSyntax.add_parsers [printP] in
    1.43 -    Method.add_methods [("order", Method.ctxt_args (Method.SIMPLE_METHOD' o order_tac),
    1.44 +    Method.add_methods [("order", Method.ctxt_args (Method.SIMPLE_METHOD' o order_tac []),
    1.45        "normalisation of algebraic structure")] #>
    1.46      Attrib.add_attributes [("order", attribute, "theorems controlling transitivity reasoner")]
    1.47    end;
    1.48 @@ -513,7 +513,7 @@
    1.49        Simplifier.simproc thy name raw_ts proc)) procs); thy);
    1.50  fun add_solver name tac thy =
    1.51    (Simplifier.change_simpset_of thy (fn ss => ss addSolver
    1.52 -    (mk_solver' name (fn ss => tac (MetaSimplifier.the_context ss)))); thy);
    1.53 +    (mk_solver' name (fn ss => tac (MetaSimplifier.prems_of_ss ss) (MetaSimplifier.the_context ss)))); thy);
    1.54  
    1.55  in
    1.56    add_simprocs [