src/HOL/Groebner_Basis.thy
changeset 47432 e1576d13e933
parent 47165 9344891b504b
child 48891 c0eafbd55de3
--- a/src/HOL/Groebner_Basis.thy	Thu Apr 12 11:34:50 2012 +0200
+++ b/src/HOL/Groebner_Basis.thy	Thu Apr 12 18:39:19 2012 +0200
@@ -43,8 +43,20 @@
 
 use "Tools/groebner.ML"
 
-method_setup algebra = Groebner.algebra_method
-  "solve polynomial equations over (semi)rings and ideal membership problems using Groebner bases"
+method_setup algebra = {*
+  let
+    fun keyword k = Scan.lift (Args.$$$ k -- Args.colon) >> K ()
+    val addN = "add"
+    val delN = "del"
+    val any_keyword = keyword addN || keyword delN
+    val thms = Scan.repeat (Scan.unless any_keyword Attrib.multi_thm) >> flat;
+  in
+    Scan.optional (keyword addN |-- thms) [] --
+     Scan.optional (keyword delN |-- thms) [] >>
+    (fn (add_ths, del_ths) => fn ctxt =>
+      SIMPLE_METHOD' (Groebner.algebra_tac add_ths del_ths ctxt))
+  end
+*} "solve polynomial equations over (semi)rings and ideal membership problems using Groebner bases"
 
 declare dvd_def[algebra]
 declare dvd_eq_mod_eq_0[symmetric, algebra]