src/HOL/cladata.ML
changeset 12355 c8d3c3d09080
parent 11753 02b257ef0ee2
child 15570 8d8c70b41bab
--- a/src/HOL/cladata.ML	Tue Dec 04 02:01:13 2001 +0100
+++ b/src/HOL/cladata.ML	Tue Dec 04 02:01:31 2001 +0100
@@ -30,6 +30,12 @@
 structure Hypsubst = HypsubstFun(Hypsubst_Data);
 open Hypsubst;
 
+(*prevent substitution on bool*)
+fun hyp_subst_tac' i thm = if i <= Thm.nprems_of thm andalso
+  Term.exists_Const (fn ("op =", Type (_, [T, _])) => T <> Type ("bool", []) | _ => false)
+    (Library.nth_elem (i - 1, Thm.prems_of thm)) then hyp_subst_tac i thm else no_tac thm;
+
+
 
 (*** Applying Make_Elim_Fun to create a classical "make_elim" rule ***)
 structure Make_Elim = Make_Elim_Fun (val classical = classical);