src/HOL/Set.ML
changeset 3919 c036caebfc75
parent 3912 4ed64ad7fb42
child 3960 7a38fae985f9
equal deleted inserted replaced
3918:94e0fdcb7b91 3919:c036caebfc75
   644 
   644 
   645 (*** Set reasoning tools ***)
   645 (*** Set reasoning tools ***)
   646 
   646 
   647 
   647 
   648 (** Rewrite rules for boolean case-splitting: faster than 
   648 (** Rewrite rules for boolean case-splitting: faster than 
   649 	setloop split_tac[expand_if]
   649 	addsplits[expand_if]
   650 **)
   650 **)
   651 
   651 
   652 bind_thm ("expand_if_eq1", read_instantiate [("P", "%x. x = ?b")] expand_if);
   652 bind_thm ("expand_if_eq1", read_instantiate [("P", "%x. x = ?b")] expand_if);
   653 bind_thm ("expand_if_eq2", read_instantiate [("P", "%x. ?a = x")] expand_if);
   653 bind_thm ("expand_if_eq2", read_instantiate [("P", "%x. ?a = x")] expand_if);
   654 
   654 
   667 		 UN_iff, UN1_iff, Union_iff, 
   667 		 UN_iff, UN1_iff, Union_iff, 
   668 		 INT_iff, INT1_iff, Inter_iff];
   668 		 INT_iff, INT1_iff, Inter_iff];
   669 
   669 
   670 (*Not for Addsimps -- it can cause goals to blow up!*)
   670 (*Not for Addsimps -- it can cause goals to blow up!*)
   671 goal Set.thy "(a : (if Q then x else y)) = ((Q --> a:x) & (~Q --> a : y))";
   671 goal Set.thy "(a : (if Q then x else y)) = ((Q --> a:x) & (~Q --> a : y))";
   672 by (simp_tac (!simpset setloop split_tac [expand_if]) 1);
   672 by (simp_tac (!simpset addsplits [expand_if]) 1);
   673 qed "mem_if";
   673 qed "mem_if";
   674 
   674 
   675 val mksimps_pairs = ("Ball",[bspec]) :: mksimps_pairs;
   675 val mksimps_pairs = ("Ball",[bspec]) :: mksimps_pairs;
   676 
   676 
   677 simpset := !simpset addcongs [ball_cong,bex_cong]
   677 simpset := !simpset addcongs [ball_cong,bex_cong]