Nominal/nominal_thmdecls.ML
changeset 2925 b4404b13f775
parent 2650 e5fa8de0e4bd
child 3045 d0ad264f8c4f
--- a/Nominal/nominal_thmdecls.ML	Wed Jun 29 16:44:54 2011 +0100
+++ b/Nominal/nominal_thmdecls.ML	Wed Jun 29 17:01:09 2011 +0100
@@ -58,7 +58,13 @@
 val get_eqvts_thms = eqvts o  Context.Proof;
 val get_eqvts_raw_thms = eqvts_raw o Context.Proof;
 
-val add_thm = EqvtData.map o Item_Net.update;
+fun checked_update key net =
+  (if Item_Net.member net key then 
+     warning "Theorem already declared as equivariant."
+   else (); 
+   Item_Net.update key net)
+
+val add_thm = EqvtData.map o checked_update;
 val del_thm = EqvtData.map o Item_Net.remove;
 
 fun add_raw_thm thm =