Added attribute rulify_prems (useful for modifying premises of introduction
authorberghofe
Tue, 05 Oct 1999 15:29:46 +0200
changeset 7717 e7ecfa617443
parent 7716 b0cb304517d4
child 7718 86755cc5b83c
Added attribute rulify_prems (useful for modifying premises of introduction rules of inductive sets).
src/HOL/Set.ML
src/HOL/subset.thy
--- a/src/HOL/Set.ML	Tue Oct 05 15:29:36 1999 +0200
+++ b/src/HOL/Set.ML	Tue Oct 05 15:29:46 1999 +0200
@@ -745,3 +745,20 @@
 Goal"[| (A::'a set) <= B; B < C|] ==> A < C";
 by (auto_tac (claset(), simpset() addsimps [psubset_eq]));
 qed "subset_psubset_trans";
+
+
+(* attributes *)
+
+local
+
+fun gen_rulify_prems x =
+  Attrib.no_args (Drule.rule_attribute (fn _ => (standard o
+    rule_by_tactic (REPEAT (ALLGOALS (resolve_tac [allI, ballI, impI])))))) x;
+
+in
+
+val rulify_prems_attrib_setup =
+ [Attrib.add_attributes
+  [("rulify_prems", (gen_rulify_prems, gen_rulify_prems), "put theorem into standard rule form")]];
+
+end;
--- a/src/HOL/subset.thy	Tue Oct 05 15:29:36 1999 +0200
+++ b/src/HOL/subset.thy	Tue Oct 05 15:29:46 1999 +0200
@@ -7,4 +7,6 @@
 theory subset = Set
 files "Tools/typedef_package.ML":
 
+setup rulify_prems_attrib_setup
+
 end