renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
authornipkow
Mon Sep 13 11:13:15 2010 +0200 (2010-09-13)
changeset 39302d7728f65b353
parent 39301 e1bd8a54c40f
child 39303 f9371c0751f5
renamed lemmas: ext_iff -> fun_eq_iff, set_ext_iff -> set_eq_iff, set_ext -> set_eqI
NEWS
src/HOL/Algebra/Divisibility.thy
src/HOL/Bali/Example.thy
src/HOL/Bali/Table.thy
src/HOL/Big_Operators.thy
src/HOL/Complete_Lattice.thy
src/HOL/Datatype.thy
src/HOL/Decision_Procs/Polynomial_List.thy
src/HOL/Finite_Set.thy
src/HOL/Fun.thy
src/HOL/Hilbert_Choice.thy
src/HOL/Hoare/SchorrWaite.thy
src/HOL/IMP/Live.thy
src/HOL/Imperative_HOL/Array.thy
src/HOL/Imperative_HOL/Heap_Monad.thy
src/HOL/Imperative_HOL/Ref.thy
src/HOL/Imperative_HOL/ex/Linked_Lists.thy
src/HOL/Import/HOL/bool.imp
src/HOL/Import/HOL/prob_extra.imp
src/HOL/Import/HOLLight/hollight.imp
src/HOL/Library/AssocList.thy
src/HOL/Library/Binomial.thy
src/HOL/Library/Code_Char_chr.thy
src/HOL/Library/Countable.thy
src/HOL/Library/Efficient_Nat.thy
src/HOL/Library/Enum.thy
src/HOL/Library/Formal_Power_Series.thy
src/HOL/Library/FrechetDeriv.thy
src/HOL/Library/Fset.thy
src/HOL/Library/FuncSet.thy
src/HOL/Library/Function_Algebras.thy
src/HOL/Library/Inner_Product.thy
src/HOL/Library/Mapping.thy
src/HOL/Library/More_List.thy
src/HOL/Library/More_Set.thy
src/HOL/Library/Multiset.thy
src/HOL/Library/Nat_Bijection.thy
src/HOL/Library/Order_Relation.thy
src/HOL/Library/Permutations.thy
src/HOL/Library/Polynomial.thy
src/HOL/Library/Predicate_Compile_Alternative_Defs.thy
src/HOL/Library/Quotient_List.thy
src/HOL/Library/Quotient_Option.thy
src/HOL/Library/Quotient_Product.thy
src/HOL/Library/Quotient_Sum.thy
src/HOL/Library/RBT.thy
src/HOL/Library/RBT_Impl.thy
src/HOL/Library/Set_Algebras.thy
src/HOL/Library/Univ_Poly.thy
src/HOL/Limits.thy
src/HOL/List.thy
src/HOL/Map.thy
src/HOL/Matrix/Matrix.thy
src/HOL/MicroJava/Comp/AuxLemmas.thy
src/HOL/MicroJava/Comp/LemmasComp.thy
src/HOL/Multivariate_Analysis/Brouwer_Fixpoint.thy
src/HOL/Multivariate_Analysis/Cartesian_Euclidean_Space.thy
src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy
src/HOL/Multivariate_Analysis/Derivative.thy
src/HOL/Multivariate_Analysis/Determinants.thy
src/HOL/Multivariate_Analysis/Euclidean_Space.thy
src/HOL/Multivariate_Analysis/Fashoda.thy
src/HOL/Multivariate_Analysis/Finite_Cartesian_Product.thy
src/HOL/Multivariate_Analysis/Integration.thy
src/HOL/Multivariate_Analysis/Path_Connected.thy
src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy
src/HOL/NSA/NatStar.thy
src/HOL/NSA/Star.thy
src/HOL/NSA/StarDef.thy
src/HOL/Nat.thy
src/HOL/Nat_Transfer.thy
src/HOL/Nitpick.thy
src/HOL/Nitpick_Examples/Manual_Nits.thy
src/HOL/Nominal/Examples/Class1.thy
src/HOL/Nominal/Nominal.thy
src/HOL/Number_Theory/UniqueFactorization.thy
src/HOL/Predicate.thy
src/HOL/Predicate_Compile_Examples/Hotel_Example.thy
src/HOL/Predicate_Compile_Examples/Specialisation_Examples.thy
src/HOL/Probability/Borel.thy
src/HOL/Probability/Euclidean_Lebesgue.thy
src/HOL/Probability/Information.thy
src/HOL/Probability/Lebesgue_Integration.thy
src/HOL/Probability/Positive_Infinite_Real.thy
src/HOL/Probability/Probability_Space.thy
src/HOL/Probability/Sigma_Algebra.thy
src/HOL/Product_Type.thy
src/HOL/Quotient.thy
src/HOL/Quotient_Examples/FSet.thy
src/HOL/Quotient_Examples/Quotient_Int.thy
src/HOL/Random.thy
src/HOL/Recdef.thy
src/HOL/Set.thy
src/HOL/SetInterval.thy
src/HOL/String.thy
src/HOL/Sum_Type.thy
src/HOL/Tools/Datatype/datatype.ML
src/HOL/Tools/Sledgehammer/clausifier.ML
src/HOL/Transitive_Closure.thy
src/HOL/UNITY/Comp/Alloc.thy
src/HOL/UNITY/Lift_prog.thy
src/HOL/Wellfounded.thy
src/HOL/Word/Misc_Typedef.thy
src/HOL/Word/Word.thy
src/HOL/ZF/Games.thy
src/HOL/ZF/HOLZF.thy
src/HOL/ZF/Zet.thy
src/HOL/ex/Execute_Choice.thy
src/HOL/ex/Landau.thy
src/HOL/ex/Summation.thy
src/HOLCF/Algebraic.thy
src/HOLCF/Cfun.thy
src/HOLCF/Ffun.thy
src/HOLCF/IOA/ABP/Correctness.thy
src/HOLCF/IOA/meta_theory/CompoExecs.thy
src/HOLCF/IOA/meta_theory/CompoScheds.thy
src/HOLCF/IOA/meta_theory/CompoTraces.thy
src/HOLCF/Library/List_Cpo.thy
src/HOLCF/Pcpo.thy
src/HOLCF/Up.thy
     1.1 --- a/NEWS	Mon Sep 13 08:43:48 2010 +0200
     1.2 +++ b/NEWS	Mon Sep 13 11:13:15 2010 +0200
     1.3 @@ -73,7 +73,10 @@
     1.4  
     1.5  * String.literal is a type, but not a datatype. INCOMPATIBILITY.
     1.6   
     1.7 -* Renamed lemmas: expand_fun_eq -> ext_iff, expand_set_eq -> set_ext_iff
     1.8 +* Renamed lemmas:
     1.9 +  expand_fun_eq -> fun_eq_iff
    1.10 +  expand_set_eq -> set_eq_iff
    1.11 +  set_ext -> set_eqI
    1.12  
    1.13  * Renamed class eq and constant eq (for code generation) to class equal
    1.14  and constant equal, plus renaming of related facts and various tuning.
     2.1 --- a/src/HOL/Algebra/Divisibility.thy	Mon Sep 13 08:43:48 2010 +0200
     2.2 +++ b/src/HOL/Algebra/Divisibility.thy	Mon Sep 13 11:13:15 2010 +0200
     2.3 @@ -2193,7 +2193,7 @@
     2.4  
     2.5    from csmset msubset
     2.6        have "fmset G bs = fmset G as + fmset G cs"
     2.7 -      by (simp add: multiset_ext_iff mset_le_def)
     2.8 +      by (simp add: multiset_eq_iff mset_le_def)
     2.9    hence basc: "b \<sim> a \<otimes> c"
    2.10        by (rule fmset_wfactors_mult) fact+
    2.11  
     3.1 --- a/src/HOL/Bali/Example.thy	Mon Sep 13 08:43:48 2010 +0200
     3.2 +++ b/src/HOL/Bali/Example.thy	Mon Sep 13 11:13:15 2010 +0200
     3.3 @@ -792,7 +792,7 @@
     3.4  lemma Base_fields_accessible[simp]:
     3.5   "accfield tprg S Base 
     3.6    = table_of((map (\<lambda>((n,d),f).(n,(d,f)))) (DeclConcepts.fields tprg Base))"
     3.7 -apply (auto simp add: accfield_def ext_iff Let_def 
     3.8 +apply (auto simp add: accfield_def fun_eq_iff Let_def 
     3.9                        accessible_in_RefT_simp
    3.10                        is_public_def
    3.11                        BaseCl_def
    3.12 @@ -837,7 +837,7 @@
    3.13  lemma Ext_fields_accessible[simp]:
    3.14  "accfield tprg S Ext 
    3.15    = table_of((map (\<lambda>((n,d),f).(n,(d,f)))) (DeclConcepts.fields tprg Ext))"
    3.16 -apply (auto simp add: accfield_def ext_iff Let_def 
    3.17 +apply (auto simp add: accfield_def fun_eq_iff Let_def 
    3.18                        accessible_in_RefT_simp
    3.19                        is_public_def
    3.20                        BaseCl_def
     4.1 --- a/src/HOL/Bali/Table.thy	Mon Sep 13 08:43:48 2010 +0200
     4.2 +++ b/src/HOL/Bali/Table.thy	Mon Sep 13 11:13:15 2010 +0200
     4.3 @@ -65,10 +65,10 @@
     4.4                                           else Some old_val))))"
     4.5  
     4.6  lemma cond_override_empty1[simp]: "cond_override c empty t = t"
     4.7 -by (simp add: cond_override_def ext_iff)
     4.8 +by (simp add: cond_override_def fun_eq_iff)
     4.9  
    4.10  lemma cond_override_empty2[simp]: "cond_override c t empty = t"
    4.11 -by (simp add: cond_override_def ext_iff)
    4.12 +by (simp add: cond_override_def fun_eq_iff)
    4.13  
    4.14  lemma cond_override_None[simp]:
    4.15   "old k = None \<Longrightarrow> (cond_override c old new) k = new k"
    4.16 @@ -105,10 +105,10 @@
    4.17  by (simp add: filter_tab_def empty_def)
    4.18  
    4.19  lemma filter_tab_True[simp]: "filter_tab (\<lambda>x y. True) t = t"
    4.20 -by (simp add: ext_iff filter_tab_def)
    4.21 +by (simp add: fun_eq_iff filter_tab_def)
    4.22  
    4.23  lemma filter_tab_False[simp]: "filter_tab (\<lambda>x y. False) t = empty"
    4.24 -by (simp add: ext_iff filter_tab_def empty_def)
    4.25 +by (simp add: fun_eq_iff filter_tab_def empty_def)
    4.26  
    4.27  lemma filter_tab_ran_subset: "ran (filter_tab c t) \<subseteq> ran t"
    4.28  by (auto simp add: filter_tab_def ran_def)
    4.29 @@ -134,26 +134,26 @@
    4.30  
    4.31  lemma filter_tab_all_True: 
    4.32   "\<forall> k y. t k = Some y \<longrightarrow> p k y \<Longrightarrow>filter_tab p t = t"
    4.33 -apply (auto simp add: filter_tab_def ext_iff)
    4.34 +apply (auto simp add: filter_tab_def fun_eq_iff)
    4.35  done
    4.36  
    4.37  lemma filter_tab_all_True_Some:
    4.38   "\<lbrakk>\<forall> k y. t k = Some y \<longrightarrow> p k y; t k = Some v\<rbrakk> \<Longrightarrow> filter_tab p t k = Some v"
    4.39 -by (auto simp add: filter_tab_def ext_iff)
    4.40 +by (auto simp add: filter_tab_def fun_eq_iff)
    4.41  
    4.42  lemma filter_tab_all_False: 
    4.43   "\<forall> k y. t k = Some y \<longrightarrow> \<not> p k y \<Longrightarrow>filter_tab p t = empty"
    4.44 -by (auto simp add: filter_tab_def ext_iff)
    4.45 +by (auto simp add: filter_tab_def fun_eq_iff)
    4.46  
    4.47  lemma filter_tab_None: "t k = None \<Longrightarrow> filter_tab p t k = None"
    4.48 -apply (simp add: filter_tab_def ext_iff)
    4.49 +apply (simp add: filter_tab_def fun_eq_iff)
    4.50  done
    4.51  
    4.52  lemma filter_tab_dom_subset: "dom (filter_tab C t) \<subseteq> dom t"
    4.53  by (auto simp add: filter_tab_def dom_def)
    4.54  
    4.55  lemma filter_tab_eq: "\<lbrakk>a=b\<rbrakk> \<Longrightarrow> filter_tab C a = filter_tab C b"
    4.56 -by (auto simp add: ext_iff filter_tab_def)
    4.57 +by (auto simp add: fun_eq_iff filter_tab_def)
    4.58  
    4.59  lemma finite_dom_filter_tab:
    4.60  "finite (dom t) \<Longrightarrow> finite (dom (filter_tab C t))"
    4.61 @@ -175,7 +175,7 @@
    4.62     \<rbrakk> \<Longrightarrow>
    4.63      cond_override overC (filter_tab filterC t) (filter_tab filterC s) 
    4.64      = filter_tab filterC (cond_override overC t s)"
    4.65 -by (auto simp add: ext_iff cond_override_def filter_tab_def )
    4.66 +by (auto simp add: fun_eq_iff cond_override_def filter_tab_def )
    4.67  
    4.68  
    4.69  section {* Misc. *}
     5.1 --- a/src/HOL/Big_Operators.thy	Mon Sep 13 08:43:48 2010 +0200
     5.2 +++ b/src/HOL/Big_Operators.thy	Mon Sep 13 11:13:15 2010 +0200
     5.3 @@ -1504,11 +1504,11 @@
     5.4  
     5.5  lemma dual_max:
     5.6    "ord.max (op \<ge>) = min"
     5.7 -  by (auto simp add: ord.max_def_raw min_def ext_iff)
     5.8 +  by (auto simp add: ord.max_def_raw min_def fun_eq_iff)
     5.9  
    5.10  lemma dual_min:
    5.11    "ord.min (op \<ge>) = max"
    5.12 -  by (auto simp add: ord.min_def_raw max_def ext_iff)
    5.13 +  by (auto simp add: ord.min_def_raw max_def fun_eq_iff)
    5.14  
    5.15  lemma strict_below_fold1_iff:
    5.16    assumes "finite A" and "A \<noteq> {}"
     6.1 --- a/src/HOL/Complete_Lattice.thy	Mon Sep 13 08:43:48 2010 +0200
     6.2 +++ b/src/HOL/Complete_Lattice.thy	Mon Sep 13 11:13:15 2010 +0200
     6.3 @@ -272,7 +272,7 @@
     6.4  
     6.5  lemma Union_eq:
     6.6    "\<Union>A = {x. \<exists>B \<in> A. x \<in> B}"
     6.7 -proof (rule set_ext)
     6.8 +proof (rule set_eqI)
     6.9    fix x
    6.10    have "(\<exists>Q\<in>{P. \<exists>B\<in>A. P \<longleftrightarrow> x \<in> B}. Q) \<longleftrightarrow> (\<exists>B\<in>A. x \<in> B)"
    6.11      by auto
    6.12 @@ -508,7 +508,7 @@
    6.13  
    6.14  lemma Inter_eq:
    6.15    "\<Inter>A = {x. \<forall>B \<in> A. x \<in> B}"
    6.16 -proof (rule set_ext)
    6.17 +proof (rule set_eqI)
    6.18    fix x
    6.19    have "(\<forall>Q\<in>{P. \<exists>B\<in>A. P \<longleftrightarrow> x \<in> B}. Q) \<longleftrightarrow> (\<forall>B\<in>A. x \<in> B)"
    6.20      by auto
     7.1 --- a/src/HOL/Datatype.thy	Mon Sep 13 08:43:48 2010 +0200
     7.2 +++ b/src/HOL/Datatype.thy	Mon Sep 13 11:13:15 2010 +0200
     7.3 @@ -109,12 +109,12 @@
     7.4  (** Push -- an injection, analogous to Cons on lists **)
     7.5  
     7.6  lemma Push_inject1: "Push i f = Push j g  ==> i=j"
     7.7 -apply (simp add: Push_def ext_iff) 
     7.8 +apply (simp add: Push_def fun_eq_iff) 
     7.9  apply (drule_tac x=0 in spec, simp) 
    7.10  done
    7.11  
    7.12  lemma Push_inject2: "Push i f = Push j g  ==> f=g"
    7.13 -apply (auto simp add: Push_def ext_iff) 
    7.14 +apply (auto simp add: Push_def fun_eq_iff) 
    7.15  apply (drule_tac x="Suc x" in spec, simp) 
    7.16  done
    7.17  
    7.18 @@ -123,7 +123,7 @@
    7.19  by (blast dest: Push_inject1 Push_inject2) 
    7.20  
    7.21  lemma Push_neq_K0: "Push (Inr (Suc k)) f = (%z. Inr 0) ==> P"
    7.22 -by (auto simp add: Push_def ext_iff split: nat.split_asm)
    7.23 +by (auto simp add: Push_def fun_eq_iff split: nat.split_asm)
    7.24  
    7.25  lemmas Abs_Node_inj = Abs_Node_inject [THEN [2] rev_iffD1, standard]
    7.26  
    7.27 @@ -399,7 +399,7 @@
    7.28  lemma ntrunc_o_equality: 
    7.29      "[| !!k. (ntrunc(k) o h1) = (ntrunc(k) o h2) |] ==> h1=h2"
    7.30  apply (rule ntrunc_equality [THEN ext])
    7.31 -apply (simp add: ext_iff) 
    7.32 +apply (simp add: fun_eq_iff) 
    7.33  done
    7.34  
    7.35  
     8.1 --- a/src/HOL/Decision_Procs/Polynomial_List.thy	Mon Sep 13 08:43:48 2010 +0200
     8.2 +++ b/src/HOL/Decision_Procs/Polynomial_List.thy	Mon Sep 13 11:13:15 2010 +0200
     8.3 @@ -334,7 +334,7 @@
     8.4  
     8.5  lemma UNIV_nat_infinite: "\<not> finite (UNIV :: nat set)"
     8.6    unfolding finite_conv_nat_seg_image
     8.7 -proof(auto simp add: set_ext_iff image_iff)
     8.8 +proof(auto simp add: set_eq_iff image_iff)
     8.9    fix n::nat and f:: "nat \<Rightarrow> nat"
    8.10    let ?N = "{i. i < n}"
    8.11    let ?fN = "f ` ?N"
     9.1 --- a/src/HOL/Finite_Set.thy	Mon Sep 13 08:43:48 2010 +0200
     9.2 +++ b/src/HOL/Finite_Set.thy	Mon Sep 13 11:13:15 2010 +0200
     9.3 @@ -541,7 +541,7 @@
     9.4  qed (simp add: UNIV_option_conv)
     9.5  
     9.6  lemma inj_graph: "inj (%f. {(x, y). y = f x})"
     9.7 -  by (rule inj_onI, auto simp add: set_ext_iff ext_iff)
     9.8 +  by (rule inj_onI, auto simp add: set_eq_iff fun_eq_iff)
     9.9  
    9.10  instance "fun" :: (finite, finite) finite
    9.11  proof
    9.12 @@ -576,7 +576,7 @@
    9.13  text{* On a functional level it looks much nicer: *}
    9.14  
    9.15  lemma fun_comp_comm:  "f x \<circ> f y = f y \<circ> f x"
    9.16 -by (simp add: fun_left_comm ext_iff)
    9.17 +by (simp add: fun_left_comm fun_eq_iff)
    9.18  
    9.19  end
    9.20  
    9.21 @@ -720,7 +720,7 @@
    9.22  
    9.23  text{* The nice version: *}
    9.24  lemma fun_comp_idem : "f x o f x = f x"
    9.25 -by (simp add: fun_left_idem ext_iff)
    9.26 +by (simp add: fun_left_idem fun_eq_iff)
    9.27  
    9.28  lemma fold_insert_idem:
    9.29    assumes fin: "finite A"
    9.30 @@ -1363,17 +1363,17 @@
    9.31  
    9.32  lemma empty [simp]:
    9.33    "F {} = id"
    9.34 -  by (simp add: eq_fold ext_iff)
    9.35 +  by (simp add: eq_fold fun_eq_iff)
    9.36  
    9.37  lemma insert [simp]:
    9.38    assumes "finite A" and "x \<notin> A"
    9.39    shows "F (insert x A) = F A \<circ> f x"
    9.40  proof -
    9.41    interpret fun_left_comm f proof
    9.42 -  qed (insert commute_comp, simp add: ext_iff)
    9.43 +  qed (insert commute_comp, simp add: fun_eq_iff)
    9.44    from fold_insert2 assms
    9.45    have "\<And>s. fold f s (insert x A) = fold f (f x s) A" .
    9.46 -  with `finite A` show ?thesis by (simp add: eq_fold ext_iff)
    9.47 +  with `finite A` show ?thesis by (simp add: eq_fold fun_eq_iff)
    9.48  qed
    9.49  
    9.50  lemma remove:
    9.51 @@ -1736,14 +1736,14 @@
    9.52    then obtain B where *: "A = insert b B" "b \<notin> B" by (blast dest: mk_disjoint_insert)
    9.53    with `finite A` have "finite B" by simp
    9.54    interpret fold: folding "op *" "\<lambda>a b. fold (op *) b a" proof
    9.55 -  qed (simp_all add: ext_iff ac_simps)
    9.56 -  thm fold.commute_comp' [of B b, simplified ext_iff, simplified]
    9.57 +  qed (simp_all add: fun_eq_iff ac_simps)
    9.58 +  thm fold.commute_comp' [of B b, simplified fun_eq_iff, simplified]
    9.59    from `finite B` fold.commute_comp' [of B x]
    9.60      have "op * x \<circ> (\<lambda>b. fold op * b B) = (\<lambda>b. fold op * b B) \<circ> op * x" by simp
    9.61 -  then have A: "x * fold op * b B = fold op * (b * x) B" by (simp add: ext_iff commute)
    9.62 +  then have A: "x * fold op * b B = fold op * (b * x) B" by (simp add: fun_eq_iff commute)
    9.63    from `finite B` * fold.insert [of B b]
    9.64      have "(\<lambda>x. fold op * x (insert b B)) = (\<lambda>x. fold op * x B) \<circ> op * b" by simp
    9.65 -  then have B: "fold op * x (insert b B) = fold op * (b * x) B" by (simp add: ext_iff)
    9.66 +  then have B: "fold op * x (insert b B) = fold op * (b * x) B" by (simp add: fun_eq_iff)
    9.67    from A B assms * show ?thesis by (simp add: eq_fold' del: fold.insert)
    9.68  qed
    9.69  
    10.1 --- a/src/HOL/Fun.thy	Mon Sep 13 08:43:48 2010 +0200
    10.2 +++ b/src/HOL/Fun.thy	Mon Sep 13 11:13:15 2010 +0200
    10.3 @@ -11,15 +11,13 @@
    10.4  
    10.5  text{*As a simplification rule, it replaces all function equalities by
    10.6    first-order equalities.*}
    10.7 -lemma ext_iff: "f = g \<longleftrightarrow> (\<forall>x. f x = g x)"
    10.8 +lemma fun_eq_iff: "f = g \<longleftrightarrow> (\<forall>x. f x = g x)"
    10.9  apply (rule iffI)
   10.10  apply (simp (no_asm_simp))
   10.11  apply (rule ext)
   10.12  apply (simp (no_asm_simp))
   10.13  done
   10.14  
   10.15 -lemmas expand_fun_eq = ext_iff
   10.16 -
   10.17  lemma apply_inverse:
   10.18    "f x = u \<Longrightarrow> (\<And>x. P x \<Longrightarrow> g (f x) = x) \<Longrightarrow> P x \<Longrightarrow> x = g u"
   10.19    by auto
   10.20 @@ -165,7 +163,7 @@
   10.21    by (simp add: inj_on_def)
   10.22  
   10.23  lemma inj_fun: "inj f \<Longrightarrow> inj (\<lambda>x y. f x)"
   10.24 -  by (simp add: inj_on_def ext_iff)
   10.25 +  by (simp add: inj_on_def fun_eq_iff)
   10.26  
   10.27  lemma inj_eq: "inj f ==> (f(x) = f(y)) = (x=y)"
   10.28  by (simp add: inj_on_eq_iff)
   10.29 @@ -465,7 +463,7 @@
   10.30  by simp
   10.31  
   10.32  lemma fun_upd_upd [simp]: "f(x:=y,x:=z) = f(x:=z)"
   10.33 -by (simp add: ext_iff)
   10.34 +by (simp add: fun_eq_iff)
   10.35  
   10.36  lemma fun_upd_twist: "a ~= c ==> (m(a:=b))(c:=d) = (m(c:=d))(a:=b)"
   10.37  by (rule ext, auto)
   10.38 @@ -517,7 +515,7 @@
   10.39  lemma swap_triple:
   10.40    assumes "a \<noteq> c" and "b \<noteq> c"
   10.41    shows "swap a b (swap b c (swap a b f)) = swap a c f"
   10.42 -  using assms by (simp add: ext_iff swap_def)
   10.43 +  using assms by (simp add: fun_eq_iff swap_def)
   10.44  
   10.45  lemma comp_swap: "f \<circ> swap a b g = swap a b (f \<circ> g)"
   10.46  by (rule ext, simp add: fun_upd_def swap_def)
    11.1 --- a/src/HOL/Hilbert_Choice.thy	Mon Sep 13 08:43:48 2010 +0200
    11.2 +++ b/src/HOL/Hilbert_Choice.thy	Mon Sep 13 11:13:15 2010 +0200
    11.3 @@ -138,7 +138,7 @@
    11.4  qed
    11.5  
    11.6  lemma inj_iff: "(inj f) = (inv f o f = id)"
    11.7 -apply (simp add: o_def ext_iff)
    11.8 +apply (simp add: o_def fun_eq_iff)
    11.9  apply (blast intro: inj_on_inverseI inv_into_f_f)
   11.10  done
   11.11  
   11.12 @@ -178,7 +178,7 @@
   11.13  by (simp add: inj_on_inv_into surj_range)
   11.14  
   11.15  lemma surj_iff: "(surj f) = (f o inv f = id)"
   11.16 -apply (simp add: o_def ext_iff)
   11.17 +apply (simp add: o_def fun_eq_iff)
   11.18  apply (blast intro: surjI surj_f_inv_f)
   11.19  done
   11.20  
    12.1 --- a/src/HOL/Hoare/SchorrWaite.thy	Mon Sep 13 08:43:48 2010 +0200
    12.2 +++ b/src/HOL/Hoare/SchorrWaite.thy	Mon Sep 13 11:13:15 2010 +0200
    12.3 @@ -239,7 +239,7 @@
    12.4      from inv have i1: "?I1" and i4: "?I4" and i5: "?I5" and i6: "?I6" by simp+
    12.5      from pNull i1 have stackEmpty: "stack = []" by simp
    12.6      from tDisj i4 have RisMarked[rule_format]: "\<forall>x.  x \<in> R \<longrightarrow> m x"  by(auto simp: reachable_def addrs_def stackEmpty)
    12.7 -    from i5 i6 show "(\<forall>x.(x \<in> R) = m x) \<and> r = iR \<and> l = iL"  by(auto simp: stackEmpty ext_iff intro:RisMarked)
    12.8 +    from i5 i6 show "(\<forall>x.(x \<in> R) = m x) \<and> r = iR \<and> l = iL"  by(auto simp: stackEmpty fun_eq_iff intro:RisMarked)
    12.9  
   12.10    next   
   12.11        fix c m l r t p q root
    13.1 --- a/src/HOL/IMP/Live.thy	Mon Sep 13 08:43:48 2010 +0200
    13.2 +++ b/src/HOL/IMP/Live.thy	Mon Sep 13 11:13:15 2010 +0200
    13.3 @@ -8,7 +8,7 @@
    13.4  consts Dep :: "((loc \<Rightarrow> 'a) \<Rightarrow> 'b) \<Rightarrow> loc set"
    13.5  specification (Dep)
    13.6  dep_on: "(\<forall>x\<in>Dep e. s x = t x) \<Longrightarrow> e s = e t"
    13.7 -by(rule_tac x="%x. UNIV" in exI)(simp add: ext_iff[symmetric])
    13.8 +by(rule_tac x="%x. UNIV" in exI)(simp add: fun_eq_iff[symmetric])
    13.9  
   13.10  text{* The following definition of @{const Dep} looks very tempting
   13.11  @{prop"Dep e = {a. EX s t. (ALL x. x\<noteq>a \<longrightarrow> s x = t x) \<and> e s \<noteq> e t}"}
    14.1 --- a/src/HOL/Imperative_HOL/Array.thy	Mon Sep 13 08:43:48 2010 +0200
    14.2 +++ b/src/HOL/Imperative_HOL/Array.thy	Mon Sep 13 11:13:15 2010 +0200
    14.3 @@ -99,7 +99,7 @@
    14.4  
    14.5  lemma set_set_swap:
    14.6    "r =!!= r' \<Longrightarrow> set r x (set r' x' h) = set r' x' (set r x h)"
    14.7 -  by (simp add: Let_def ext_iff noteq_def set_def)
    14.8 +  by (simp add: Let_def fun_eq_iff noteq_def set_def)
    14.9  
   14.10  lemma get_update_eq [simp]:
   14.11    "get (update a i v h) a = (get h a) [i := v]"
   14.12 @@ -115,7 +115,7 @@
   14.13  
   14.14  lemma length_update [simp]: 
   14.15    "length (update b i v h) = length h"
   14.16 -  by (simp add: update_def length_def set_def get_def ext_iff)
   14.17 +  by (simp add: update_def length_def set_def get_def fun_eq_iff)
   14.18  
   14.19  lemma update_swap_neq:
   14.20    "a =!!= a' \<Longrightarrow> 
   14.21 @@ -145,7 +145,7 @@
   14.22  
   14.23  lemma present_update [simp]: 
   14.24    "present (update b i v h) = present h"
   14.25 -  by (simp add: update_def present_def set_def get_def ext_iff)
   14.26 +  by (simp add: update_def present_def set_def get_def fun_eq_iff)
   14.27  
   14.28  lemma present_alloc [simp]:
   14.29    "present (snd (alloc xs h)) (fst (alloc xs h))"
    15.1 --- a/src/HOL/Imperative_HOL/Heap_Monad.thy	Mon Sep 13 08:43:48 2010 +0200
    15.2 +++ b/src/HOL/Imperative_HOL/Heap_Monad.thy	Mon Sep 13 11:13:15 2010 +0200
    15.3 @@ -31,7 +31,7 @@
    15.4  
    15.5  lemma Heap_eqI:
    15.6    "(\<And>h. execute f h = execute g h) \<Longrightarrow> f = g"
    15.7 -    by (cases f, cases g) (auto simp: ext_iff)
    15.8 +    by (cases f, cases g) (auto simp: fun_eq_iff)
    15.9  
   15.10  ML {* structure Execute_Simps = Named_Thms(
   15.11    val name = "execute_simps"
    16.1 --- a/src/HOL/Imperative_HOL/Ref.thy	Mon Sep 13 08:43:48 2010 +0200
    16.2 +++ b/src/HOL/Imperative_HOL/Ref.thy	Mon Sep 13 11:13:15 2010 +0200
    16.3 @@ -98,7 +98,7 @@
    16.4  
    16.5  lemma set_set_swap:
    16.6    "r =!= r' \<Longrightarrow> set r x (set r' x' h) = set r' x' (set r x h)"
    16.7 -  by (simp add: noteq_def set_def ext_iff)
    16.8 +  by (simp add: noteq_def set_def fun_eq_iff)
    16.9  
   16.10  lemma alloc_set:
   16.11    "fst (alloc x (set r x' h)) = fst (alloc x h)"
   16.12 @@ -126,7 +126,7 @@
   16.13  
   16.14  lemma present_set [simp]:
   16.15    "present (set r v h) = present h"
   16.16 -  by (simp add: present_def ext_iff)
   16.17 +  by (simp add: present_def fun_eq_iff)
   16.18  
   16.19  lemma noteq_I:
   16.20    "present h r \<Longrightarrow> \<not> present h r' \<Longrightarrow> r =!= r'"
   16.21 @@ -220,7 +220,7 @@
   16.22  
   16.23  lemma array_get_set [simp]:
   16.24    "Array.get (set r v h) = Array.get h"
   16.25 -  by (simp add: Array.get_def set_def ext_iff)
   16.26 +  by (simp add: Array.get_def set_def fun_eq_iff)
   16.27  
   16.28  lemma get_update [simp]:
   16.29    "get (Array.update a i v h) r = get h r"
   16.30 @@ -240,15 +240,15 @@
   16.31  
   16.32  lemma array_get_alloc [simp]: 
   16.33    "Array.get (snd (alloc v h)) = Array.get h"
   16.34 -  by (simp add: Array.get_def alloc_def set_def Let_def ext_iff)
   16.35 +  by (simp add: Array.get_def alloc_def set_def Let_def fun_eq_iff)
   16.36  
   16.37  lemma present_update [simp]: 
   16.38    "present (Array.update a i v h) = present h"
   16.39 -  by (simp add: Array.update_def Array.set_def ext_iff present_def)
   16.40 +  by (simp add: Array.update_def Array.set_def fun_eq_iff present_def)
   16.41  
   16.42  lemma array_present_set [simp]:
   16.43    "Array.present (set r v h) = Array.present h"
   16.44 -  by (simp add: Array.present_def set_def ext_iff)
   16.45 +  by (simp add: Array.present_def set_def fun_eq_iff)
   16.46  
   16.47  lemma array_present_alloc [simp]:
   16.48    "Array.present h a \<Longrightarrow> Array.present (snd (alloc v h)) a"
    17.1 --- a/src/HOL/Imperative_HOL/ex/Linked_Lists.thy	Mon Sep 13 08:43:48 2010 +0200
    17.2 +++ b/src/HOL/Imperative_HOL/ex/Linked_Lists.thy	Mon Sep 13 11:13:15 2010 +0200
    17.3 @@ -550,7 +550,7 @@
    17.4    }"
    17.5    unfolding rev'_def MREC_rule[of _ _ "(q, p)"] unfolding rev'_def[symmetric]
    17.6  thm arg_cong2
    17.7 -  by (auto simp add: ext_iff intro: arg_cong2[where f = bind] split: node.split)
    17.8 +  by (auto simp add: fun_eq_iff intro: arg_cong2[where f = bind] split: node.split)
    17.9  
   17.10  primrec rev :: "('a:: heap) node \<Rightarrow> 'a node Heap" 
   17.11  where
    18.1 --- a/src/HOL/Import/HOL/bool.imp	Mon Sep 13 08:43:48 2010 +0200
    18.2 +++ b/src/HOL/Import/HOL/bool.imp	Mon Sep 13 11:13:15 2010 +0200
    18.3 @@ -124,7 +124,7 @@
    18.4    "IMP_ANTISYM_AX" > "HOL4Setup.light_imp_as"
    18.5    "F_IMP" > "HOL4Base.bool.F_IMP"
    18.6    "F_DEF" > "HOL.False_def"
    18.7 -  "FUN_EQ_THM" > "Fun.ext_iff"
    18.8 +  "FUN_EQ_THM" > "Fun.fun_eq_iff"
    18.9    "FORALL_THM" > "HOL4Base.bool.FORALL_THM"
   18.10    "FORALL_SIMP" > "HOL.simp_thms_35"
   18.11    "FORALL_DEF" > "HOL.All_def"
    19.1 --- a/src/HOL/Import/HOL/prob_extra.imp	Mon Sep 13 08:43:48 2010 +0200
    19.2 +++ b/src/HOL/Import/HOL/prob_extra.imp	Mon Sep 13 11:13:15 2010 +0200
    19.3 @@ -73,7 +73,7 @@
    19.4    "EVEN_ODD_EXISTS_EQ" > "HOL4Prob.prob_extra.EVEN_ODD_EXISTS_EQ"
    19.5    "EVEN_ODD_BASIC" > "HOL4Prob.prob_extra.EVEN_ODD_BASIC"
    19.6    "EVEN_EXP_TWO" > "HOL4Prob.prob_extra.EVEN_EXP_TWO"
    19.7 -  "EQ_EXT_EQ" > "Fun.ext_iff"
    19.8 +  "EQ_EXT_EQ" > "Fun.fun_eq_iff"
    19.9    "DIV_TWO_UNIQUE" > "HOL4Prob.prob_extra.DIV_TWO_UNIQUE"
   19.10    "DIV_TWO_MONO_EVEN" > "HOL4Prob.prob_extra.DIV_TWO_MONO_EVEN"
   19.11    "DIV_TWO_MONO" > "HOL4Prob.prob_extra.DIV_TWO_MONO"
    20.1 --- a/src/HOL/Import/HOLLight/hollight.imp	Mon Sep 13 08:43:48 2010 +0200
    20.2 +++ b/src/HOL/Import/HOLLight/hollight.imp	Mon Sep 13 11:13:15 2010 +0200
    20.3 @@ -1394,7 +1394,7 @@
    20.4    "GSPEC_def" > "HOLLight.hollight.GSPEC_def"
    20.5    "GEQ_def" > "HOLLight.hollight.GEQ_def"
    20.6    "GABS_def" > "HOLLight.hollight.GABS_def"
    20.7 -  "FUN_EQ_THM" > "Fun.ext_iff"
    20.8 +  "FUN_EQ_THM" > "Fun.fun_eq_iff"
    20.9    "FUNCTION_FACTORS_RIGHT" > "HOLLight.hollight.FUNCTION_FACTORS_RIGHT"
   20.10    "FUNCTION_FACTORS_LEFT" > "HOLLight.hollight.FUNCTION_FACTORS_LEFT"
   20.11    "FSTCART_PASTECART" > "HOLLight.hollight.FSTCART_PASTECART"
    21.1 --- a/src/HOL/Library/AssocList.thy	Mon Sep 13 08:43:48 2010 +0200
    21.2 +++ b/src/HOL/Library/AssocList.thy	Mon Sep 13 11:13:15 2010 +0200
    21.3 @@ -22,7 +22,7 @@
    21.4    | "update k v (p#ps) = (if fst p = k then (k, v) # ps else p # update k v ps)"
    21.5  
    21.6  lemma update_conv': "map_of (update k v al)  = (map_of al)(k\<mapsto>v)"
    21.7 -  by (induct al) (auto simp add: ext_iff)
    21.8 +  by (induct al) (auto simp add: fun_eq_iff)
    21.9  
   21.10  corollary update_conv: "map_of (update k v al) k' = ((map_of al)(k\<mapsto>v)) k'"
   21.11    by (simp add: update_conv')
   21.12 @@ -67,7 +67,7 @@
   21.13          @{term "update k' v' (update k v []) = [(k, v), (k', v')]"}.*}
   21.14  lemma update_swap: "k\<noteq>k' 
   21.15    \<Longrightarrow> map_of (update k v (update k' v' al)) = map_of (update k' v' (update k v al))"
   21.16 -  by (simp add: update_conv' ext_iff)
   21.17 +  by (simp add: update_conv' fun_eq_iff)
   21.18  
   21.19  lemma update_Some_unfold: 
   21.20    "map_of (update k v al) x = Some y \<longleftrightarrow>
   21.21 @@ -96,8 +96,8 @@
   21.22  proof -
   21.23    have "map_of \<circ> More_List.fold (prod_case update) (zip ks vs) =
   21.24      More_List.fold (\<lambda>(k, v) f. f(k \<mapsto> v)) (zip ks vs) \<circ> map_of"
   21.25 -    by (rule fold_apply) (auto simp add: ext_iff update_conv')
   21.26 -  then show ?thesis by (auto simp add: updates_def ext_iff map_upds_fold_map_upd foldl_fold split_def)
   21.27 +    by (rule fold_apply) (auto simp add: fun_eq_iff update_conv')
   21.28 +  then show ?thesis by (auto simp add: updates_def fun_eq_iff map_upds_fold_map_upd foldl_fold split_def)
   21.29  qed
   21.30  
   21.31  lemma updates_conv: "map_of (updates ks vs al) k = ((map_of al)(ks[\<mapsto>]vs)) k"
   21.32 @@ -114,7 +114,7 @@
   21.33    moreover have "map fst \<circ> More_List.fold (prod_case update) (zip ks vs) =
   21.34      More_List.fold (\<lambda>(k, v) al. if k \<in> set al then al else al @ [k]) (zip ks vs) \<circ> map fst"
   21.35      by (rule fold_apply) (simp add: update_keys split_def prod_case_beta comp_def)
   21.36 -  ultimately show ?thesis by (simp add: updates_def ext_iff)
   21.37 +  ultimately show ?thesis by (simp add: updates_def fun_eq_iff)
   21.38  qed
   21.39  
   21.40  lemma updates_append1[simp]: "size ks < size vs \<Longrightarrow>
   21.41 @@ -161,7 +161,7 @@
   21.42    by (auto simp add: delete_eq)
   21.43  
   21.44  lemma delete_conv': "map_of (delete k al) = (map_of al)(k := None)"
   21.45 -  by (induct al) (auto simp add: ext_iff)
   21.46 +  by (induct al) (auto simp add: fun_eq_iff)
   21.47  
   21.48  corollary delete_conv: "map_of (delete k al) k' = ((map_of al)(k := None)) k'"
   21.49    by (simp add: delete_conv')
   21.50 @@ -301,7 +301,7 @@
   21.51  lemma map_of_clearjunk:
   21.52    "map_of (clearjunk al) = map_of al"
   21.53    by (induct al rule: clearjunk.induct)
   21.54 -    (simp_all add: ext_iff)
   21.55 +    (simp_all add: fun_eq_iff)
   21.56  
   21.57  lemma clearjunk_keys_set:
   21.58    "set (map fst (clearjunk al)) = set (map fst al)"
   21.59 @@ -342,7 +342,7 @@
   21.60    have "clearjunk \<circ> More_List.fold (prod_case update) (zip ks vs) =
   21.61      More_List.fold (prod_case update) (zip ks vs) \<circ> clearjunk"
   21.62      by (rule fold_apply) (simp add: clearjunk_update prod_case_beta o_def)
   21.63 -  then show ?thesis by (simp add: updates_def ext_iff)
   21.64 +  then show ?thesis by (simp add: updates_def fun_eq_iff)
   21.65  qed
   21.66  
   21.67  lemma clearjunk_delete:
   21.68 @@ -446,9 +446,9 @@
   21.69  proof -
   21.70    have "map_of \<circ> More_List.fold (prod_case update) (rev ys) =
   21.71      More_List.fold (\<lambda>(k, v) m. m(k \<mapsto> v)) (rev ys) \<circ> map_of"
   21.72 -    by (rule fold_apply) (simp add: update_conv' prod_case_beta split_def ext_iff)
   21.73 +    by (rule fold_apply) (simp add: update_conv' prod_case_beta split_def fun_eq_iff)
   21.74    then show ?thesis
   21.75 -    by (simp add: merge_def map_add_map_of_foldr foldr_fold_rev ext_iff)
   21.76 +    by (simp add: merge_def map_add_map_of_foldr foldr_fold_rev fun_eq_iff)
   21.77  qed
   21.78  
   21.79  corollary merge_conv:
   21.80 @@ -699,7 +699,7 @@
   21.81  
   21.82  lemma bulkload_Mapping [code]:
   21.83    "Mapping.bulkload vs = Mapping (map (\<lambda>n. (n, vs ! n)) [0..<length vs])"
   21.84 -  by (rule mapping_eqI) (simp add: map_of_map_restrict ext_iff)
   21.85 +  by (rule mapping_eqI) (simp add: map_of_map_restrict fun_eq_iff)
   21.86  
   21.87  lemma map_of_eqI: (*FIXME move to Map.thy*)
   21.88    assumes set_eq: "set (map fst xs) = set (map fst ys)"
    22.1 --- a/src/HOL/Library/Binomial.thy	Mon Sep 13 08:43:48 2010 +0200
    22.2 +++ b/src/HOL/Library/Binomial.thy	Mon Sep 13 11:13:15 2010 +0200
    22.3 @@ -236,7 +236,7 @@
    22.4      have th1: "(\<Prod>n\<in>{1\<Colon>nat..n}. a + of_nat n) =
    22.5        (\<Prod>n\<in>{0\<Colon>nat..n - 1}. a + 1 + of_nat n)"
    22.6        apply (rule setprod_reindex_cong [where f = Suc])
    22.7 -      using n0 by (auto simp add: ext_iff field_simps)
    22.8 +      using n0 by (auto simp add: fun_eq_iff field_simps)
    22.9      have ?thesis apply (simp add: pochhammer_def)
   22.10      unfolding setprod_insert[OF th0, unfolded eq]
   22.11      using th1 by (simp add: field_simps)}
   22.12 @@ -248,7 +248,7 @@
   22.13    
   22.14    apply (cases n, simp_all add: of_nat_setprod pochhammer_Suc_setprod)
   22.15    apply (rule setprod_reindex_cong[where f=Suc])
   22.16 -  by (auto simp add: ext_iff)
   22.17 +  by (auto simp add: fun_eq_iff)
   22.18  
   22.19  lemma pochhammer_of_nat_eq_0_lemma: assumes kn: "k > n"
   22.20    shows "pochhammer (- (of_nat n :: 'a:: idom)) k = 0"
   22.21 @@ -315,7 +315,7 @@
   22.22        apply (rule strong_setprod_reindex_cong[where f = "%i. h - i"])
   22.23        apply (auto simp add: inj_on_def image_def h )
   22.24        apply (rule_tac x="h - x" in bexI)
   22.25 -      by (auto simp add: ext_iff h of_nat_diff)}
   22.26 +      by (auto simp add: fun_eq_iff h of_nat_diff)}
   22.27    ultimately show ?thesis by (cases k, auto)
   22.28  qed
   22.29  
   22.30 @@ -410,11 +410,11 @@
   22.31      have eq': "(\<Prod>i\<in>{0..h}. of_nat n + - (of_nat i :: 'a)) = (\<Prod>i\<in>{n - h..n}. of_nat i)"
   22.32        apply (rule strong_setprod_reindex_cong[where f="op - n"])
   22.33        using h kn 
   22.34 -      apply (simp_all add: inj_on_def image_iff Bex_def set_ext_iff)
   22.35 +      apply (simp_all add: inj_on_def image_iff Bex_def set_eq_iff)
   22.36        apply clarsimp
   22.37        apply (presburger)
   22.38        apply presburger
   22.39 -      by (simp add: ext_iff field_simps of_nat_add[symmetric] del: of_nat_add)
   22.40 +      by (simp add: fun_eq_iff field_simps of_nat_add[symmetric] del: of_nat_add)
   22.41      have th0: "finite {1..n - Suc h}" "finite {n - h .. n}" 
   22.42  "{1..n - Suc h} \<inter> {n - h .. n} = {}" and eq3: "{1..n - Suc h} \<union> {n - h .. n} = {1..n}" using h kn by auto
   22.43      from eq[symmetric]
    23.1 --- a/src/HOL/Library/Code_Char_chr.thy	Mon Sep 13 08:43:48 2010 +0200
    23.2 +++ b/src/HOL/Library/Code_Char_chr.thy	Mon Sep 13 11:13:15 2010 +0200
    23.3 @@ -13,14 +13,14 @@
    23.4  
    23.5  lemma [code]:
    23.6    "nat_of_char = nat o int_of_char"
    23.7 -  unfolding int_of_char_def by (simp add: ext_iff)
    23.8 +  unfolding int_of_char_def by (simp add: fun_eq_iff)
    23.9  
   23.10  definition
   23.11    "char_of_int = char_of_nat o nat"
   23.12  
   23.13  lemma [code]:
   23.14    "char_of_nat = char_of_int o int"
   23.15 -  unfolding char_of_int_def by (simp add: ext_iff)
   23.16 +  unfolding char_of_int_def by (simp add: fun_eq_iff)
   23.17  
   23.18  code_const int_of_char and char_of_int
   23.19    (SML "!(IntInf.fromInt o Char.ord)" and "!(Char.chr o IntInf.toInt)")
    24.1 --- a/src/HOL/Library/Countable.thy	Mon Sep 13 08:43:48 2010 +0200
    24.2 +++ b/src/HOL/Library/Countable.thy	Mon Sep 13 11:13:15 2010 +0200
    24.3 @@ -139,7 +139,7 @@
    24.4    show "\<exists>to_nat::('a \<Rightarrow> 'b) \<Rightarrow> nat. inj to_nat"
    24.5    proof
    24.6      show "inj (\<lambda>f. to_nat (map f xs))"
    24.7 -      by (rule injI, simp add: xs ext_iff)
    24.8 +      by (rule injI, simp add: xs fun_eq_iff)
    24.9    qed
   24.10  qed
   24.11  
    25.1 --- a/src/HOL/Library/Efficient_Nat.thy	Mon Sep 13 08:43:48 2010 +0200
    25.2 +++ b/src/HOL/Library/Efficient_Nat.thy	Mon Sep 13 11:13:15 2010 +0200
    25.3 @@ -79,7 +79,7 @@
    25.4  
    25.5  lemma [code, code_unfold]:
    25.6    "nat_case = (\<lambda>f g n. if n = 0 then f else g (n - 1))"
    25.7 -  by (auto simp add: ext_iff dest!: gr0_implies_Suc)
    25.8 +  by (auto simp add: fun_eq_iff dest!: gr0_implies_Suc)
    25.9  
   25.10  
   25.11  subsection {* Preprocessors *}
    26.1 --- a/src/HOL/Library/Enum.thy	Mon Sep 13 08:43:48 2010 +0200
    26.2 +++ b/src/HOL/Library/Enum.thy	Mon Sep 13 11:13:15 2010 +0200
    26.3 @@ -42,7 +42,7 @@
    26.4    "HOL.equal f g \<longleftrightarrow> (\<forall>x \<in> set enum. f x = g x)"
    26.5  
    26.6  instance proof
    26.7 -qed (simp_all add: equal_fun_def enum_all ext_iff)
    26.8 +qed (simp_all add: equal_fun_def enum_all fun_eq_iff)
    26.9  
   26.10  end
   26.11  
   26.12 @@ -54,7 +54,7 @@
   26.13    fixes f g :: "'a\<Colon>enum \<Rightarrow> 'b\<Colon>order"
   26.14    shows "f \<le> g \<longleftrightarrow> list_all (\<lambda>x. f x \<le> g x) enum"
   26.15      and "f < g \<longleftrightarrow> f \<le> g \<and> list_ex (\<lambda>x. f x \<noteq> g x) enum"
   26.16 -  by (simp_all add: list_all_iff list_ex_iff enum_all ext_iff le_fun_def order_less_le)
   26.17 +  by (simp_all add: list_all_iff list_ex_iff enum_all fun_eq_iff le_fun_def order_less_le)
   26.18  
   26.19  
   26.20  subsection {* Quantifiers *}
   26.21 @@ -82,7 +82,7 @@
   26.22    by (induct n arbitrary: ys) auto
   26.23  
   26.24  lemma set_n_lists: "set (n_lists n xs) = {ys. length ys = n \<and> set ys \<subseteq> set xs}"
   26.25 -proof (rule set_ext)
   26.26 +proof (rule set_eqI)
   26.27    fix ys :: "'a list"
   26.28    show "ys \<in> set (n_lists n xs) \<longleftrightarrow> ys \<in> {ys. length ys = n \<and> set ys \<subseteq> set xs}"
   26.29    proof -
   26.30 @@ -160,7 +160,7 @@
   26.31    proof (rule UNIV_eq_I)
   26.32      fix f :: "'a \<Rightarrow> 'b"
   26.33      have "f = the \<circ> map_of (zip (enum \<Colon> 'a\<Colon>enum list) (map f enum))"
   26.34 -      by (auto simp add: map_of_zip_map ext_iff)
   26.35 +      by (auto simp add: map_of_zip_map fun_eq_iff)
   26.36      then show "f \<in> set enum"
   26.37        by (auto simp add: enum_fun_def set_n_lists)
   26.38    qed
    27.1 --- a/src/HOL/Library/Formal_Power_Series.thy	Mon Sep 13 08:43:48 2010 +0200
    27.2 +++ b/src/HOL/Library/Formal_Power_Series.thy	Mon Sep 13 11:13:15 2010 +0200
    27.3 @@ -18,7 +18,7 @@
    27.4  notation fps_nth (infixl "$" 75)
    27.5  
    27.6  lemma expand_fps_eq: "p = q \<longleftrightarrow> (\<forall>n. p $ n = q $ n)"
    27.7 -  by (simp add: fps_nth_inject [symmetric] ext_iff)
    27.8 +  by (simp add: fps_nth_inject [symmetric] fun_eq_iff)
    27.9  
   27.10  lemma fps_ext: "(\<And>n. p $ n = q $ n) \<Longrightarrow> p = q"
   27.11    by (simp add: expand_fps_eq)
   27.12 @@ -791,14 +791,14 @@
   27.13        apply (rule setsum_reindex_cong[where f="\<lambda>i. n + 1 - i"])
   27.14        apply (simp add: inj_on_def Ball_def)
   27.15        apply presburger
   27.16 -      apply (rule set_ext)
   27.17 +      apply (rule set_eqI)
   27.18        apply (presburger add: image_iff)
   27.19        by simp
   27.20      have s1: "setsum (\<lambda>i. f $ i * g $ (n + 1 - i)) ?Zn1 = setsum (\<lambda>i. f $ (n + 1 - i) * g $ i) ?Zn1"
   27.21        apply (rule setsum_reindex_cong[where f="\<lambda>i. n + 1 - i"])
   27.22        apply (simp add: inj_on_def Ball_def)
   27.23        apply presburger
   27.24 -      apply (rule set_ext)
   27.25 +      apply (rule set_eqI)
   27.26        apply (presburger add: image_iff)
   27.27        by simp
   27.28      have "(f * ?D g + ?D f * g)$n = (?D g * f + ?D f * g)$n" by (simp only: mult_commute)
   27.29 @@ -1244,7 +1244,7 @@
   27.30      {assume n0: "n \<noteq> 0"
   27.31        then have u: "{0} \<union> ({1} \<union> {2..n}) = {0..n}" "{1}\<union>{2..n} = {1..n}"
   27.32          "{0..n - 1}\<union>{n} = {0..n}"
   27.33 -        by (auto simp: set_ext_iff)
   27.34 +        by (auto simp: set_eq_iff)
   27.35        have d: "{0} \<inter> ({1} \<union> {2..n}) = {}" "{1} \<inter> {2..n} = {}"
   27.36          "{0..n - 1}\<inter>{n} ={}" using n0 by simp_all
   27.37        have f: "finite {0}" "finite {1}" "finite {2 .. n}"
   27.38 @@ -1455,7 +1455,7 @@
   27.39    moreover
   27.40    {fix k assume k: "m = Suc k"
   27.41      have km: "k < m" using k by arith
   27.42 -    have u0: "{0 .. k} \<union> {m} = {0..m}" using k apply (simp add: set_ext_iff) by presburger
   27.43 +    have u0: "{0 .. k} \<union> {m} = {0..m}" using k apply (simp add: set_eq_iff) by presburger
   27.44      have f0: "finite {0 .. k}" "finite {m}" by auto
   27.45      have d0: "{0 .. k} \<inter> {m} = {}" using k by auto
   27.46      have "(setprod a {0 .. m}) $ n = (setprod a {0 .. k} * a m) $ n"
   27.47 @@ -1472,7 +1472,7 @@
   27.48        apply clarsimp
   27.49        apply (rule finite_imageI)
   27.50        apply (rule natpermute_finite)
   27.51 -      apply (clarsimp simp add: set_ext_iff)
   27.52 +      apply (clarsimp simp add: set_eq_iff)
   27.53        apply auto
   27.54        apply (rule setsum_cong2)
   27.55        unfolding setsum_left_distrib
   27.56 @@ -2153,7 +2153,7 @@
   27.57  qed
   27.58  
   27.59  lemma fps_inv_ginv: "fps_inv = fps_ginv X"
   27.60 -  apply (auto simp add: ext_iff fps_eq_iff fps_inv_def fps_ginv_def)
   27.61 +  apply (auto simp add: fun_eq_iff fps_eq_iff fps_inv_def fps_ginv_def)
   27.62    apply (induct_tac n rule: nat_less_induct, auto)
   27.63    apply (case_tac na)
   27.64    apply simp
   27.65 @@ -2192,7 +2192,7 @@
   27.66    "setsum (%i. a (i :: nat) * b (n - i)) {0 .. n} = setsum (%(i,j). a i * b j) {(i,j). i <= n \<and> j \<le> n \<and> i + j = n}"
   27.67    apply (rule setsum_reindex_cong[where f=fst])
   27.68    apply (clarsimp simp add: inj_on_def)
   27.69 -  apply (auto simp add: set_ext_iff image_iff)
   27.70 +  apply (auto simp add: set_eq_iff image_iff)
   27.71    apply (rule_tac x= "x" in exI)
   27.72    apply clarsimp
   27.73    apply (rule_tac x="n - x" in exI)
   27.74 @@ -2264,7 +2264,7 @@
   27.75    let ?KM=  "{(k,m). k + m \<le> n}"
   27.76    let ?f = "%s. UNION {(0::nat)..s} (%i. {(i,s - i)})"
   27.77    have th0: "?KM = UNION {0..n} ?f"
   27.78 -    apply (simp add: set_ext_iff)
   27.79 +    apply (simp add: set_eq_iff)
   27.80      apply arith (* FIXME: VERY slow! *)
   27.81      done
   27.82    show "?l = ?r "
   27.83 @@ -3312,10 +3312,10 @@
   27.84  
   27.85  lemma XDp_commute:
   27.86    shows "XDp b o XDp (c::'a::comm_ring_1) = XDp c o XDp b"
   27.87 -  by (auto simp add: XDp_def ext_iff fps_eq_iff algebra_simps)
   27.88 +  by (auto simp add: XDp_def fun_eq_iff fps_eq_iff algebra_simps)
   27.89  
   27.90  lemma XDp0[simp]: "XDp 0 = XD"
   27.91 -  by (simp add: ext_iff fps_eq_iff)
   27.92 +  by (simp add: fun_eq_iff fps_eq_iff)
   27.93  
   27.94  lemma XDp_fps_integral[simp]:"XDp 0 (fps_integral a c) = X * a"
   27.95    by (simp add: fps_eq_iff fps_integral_def)
    28.1 --- a/src/HOL/Library/FrechetDeriv.thy	Mon Sep 13 08:43:48 2010 +0200
    28.2 +++ b/src/HOL/Library/FrechetDeriv.thy	Mon Sep 13 11:13:15 2010 +0200
    28.3 @@ -177,7 +177,7 @@
    28.4    hence "(\<lambda>h. F h - F' h) = (\<lambda>h. 0)"
    28.5      by (rule FDERIV_zero_unique)
    28.6    thus "F = F'"
    28.7 -    unfolding ext_iff right_minus_eq .
    28.8 +    unfolding fun_eq_iff right_minus_eq .
    28.9  qed
   28.10  
   28.11  subsection {* Continuity *}
    29.1 --- a/src/HOL/Library/Fset.thy	Mon Sep 13 08:43:48 2010 +0200
    29.2 +++ b/src/HOL/Library/Fset.thy	Mon Sep 13 11:13:15 2010 +0200
    29.3 @@ -51,7 +51,7 @@
    29.4  lemma member_code [code]:
    29.5    "member (Set xs) = List.member xs"
    29.6    "member (Coset xs) = Not \<circ> List.member xs"
    29.7 -  by (simp_all add: ext_iff member_def fun_Compl_def bool_Compl_def)
    29.8 +  by (simp_all add: fun_eq_iff member_def fun_Compl_def bool_Compl_def)
    29.9  
   29.10  lemma member_image_UNIV [simp]:
   29.11    "member ` UNIV = UNIV"
   29.12 @@ -252,13 +252,13 @@
   29.13    show "inf A (Set xs) = Set (List.filter (member A) xs)"
   29.14      by (simp add: inter project_def Set_def)
   29.15    have *: "\<And>x::'a. remove = (\<lambda>x. Fset \<circ> More_Set.remove x \<circ> member)"
   29.16 -    by (simp add: ext_iff)
   29.17 +    by (simp add: fun_eq_iff)
   29.18    have "member \<circ> fold (\<lambda>x. Fset \<circ> More_Set.remove x \<circ> member) xs =
   29.19      fold More_Set.remove xs \<circ> member"
   29.20 -    by (rule fold_apply) (simp add: ext_iff)
   29.21 +    by (rule fold_apply) (simp add: fun_eq_iff)
   29.22    then have "fold More_Set.remove xs (member A) = 
   29.23      member (fold (\<lambda>x. Fset \<circ> More_Set.remove x \<circ> member) xs A)"
   29.24 -    by (simp add: ext_iff)
   29.25 +    by (simp add: fun_eq_iff)
   29.26    then have "inf A (Coset xs) = fold remove xs A"
   29.27      by (simp add: Diff_eq [symmetric] minus_set *)
   29.28    moreover have "\<And>x y :: 'a. Fset.remove y \<circ> Fset.remove x = Fset.remove x \<circ> Fset.remove y"
   29.29 @@ -277,13 +277,13 @@
   29.30    "sup (Coset xs) A = Coset (List.filter (Not \<circ> member A) xs)"
   29.31  proof -
   29.32    have *: "\<And>x::'a. insert = (\<lambda>x. Fset \<circ> Set.insert x \<circ> member)"
   29.33 -    by (simp add: ext_iff)
   29.34 +    by (simp add: fun_eq_iff)
   29.35    have "member \<circ> fold (\<lambda>x. Fset \<circ> Set.insert x \<circ> member) xs =
   29.36      fold Set.insert xs \<circ> member"
   29.37 -    by (rule fold_apply) (simp add: ext_iff)
   29.38 +    by (rule fold_apply) (simp add: fun_eq_iff)
   29.39    then have "fold Set.insert xs (member A) =
   29.40      member (fold (\<lambda>x. Fset \<circ> Set.insert x \<circ> member) xs A)"
   29.41 -    by (simp add: ext_iff)
   29.42 +    by (simp add: fun_eq_iff)
   29.43    then have "sup (Set xs) A = fold insert xs A"
   29.44      by (simp add: union_set *)
   29.45    moreover have "\<And>x y :: 'a. Fset.insert y \<circ> Fset.insert x = Fset.insert x \<circ> Fset.insert y"
    30.1 --- a/src/HOL/Library/FuncSet.thy	Mon Sep 13 08:43:48 2010 +0200
    30.2 +++ b/src/HOL/Library/FuncSet.thy	Mon Sep 13 11:13:15 2010 +0200
    30.3 @@ -128,7 +128,7 @@
    30.4  lemma compose_assoc:
    30.5      "[| f \<in> A -> B; g \<in> B -> C; h \<in> C -> D |]
    30.6        ==> compose A h (compose A g f) = compose A (compose B h g) f"
    30.7 -by (simp add: ext_iff Pi_def compose_def restrict_def)
    30.8 +by (simp add: fun_eq_iff Pi_def compose_def restrict_def)
    30.9  
   30.10  lemma compose_eq: "x \<in> A ==> compose A g f x = g(f(x))"
   30.11  by (simp add: compose_def restrict_def)
   30.12 @@ -151,18 +151,18 @@
   30.13  
   30.14  lemma restrict_ext:
   30.15      "(!!x. x \<in> A ==> f x = g x) ==> (\<lambda>x\<in>A. f x) = (\<lambda>x\<in>A. g x)"
   30.16 -  by (simp add: ext_iff Pi_def restrict_def)
   30.17 +  by (simp add: fun_eq_iff Pi_def restrict_def)
   30.18  
   30.19  lemma inj_on_restrict_eq [simp]: "inj_on (restrict f A) A = inj_on f A"
   30.20    by (simp add: inj_on_def restrict_def)
   30.21  
   30.22  lemma Id_compose:
   30.23      "[|f \<in> A -> B;  f \<in> extensional A|] ==> compose A (\<lambda>y\<in>B. y) f = f"
   30.24 -  by (auto simp add: ext_iff compose_def extensional_def Pi_def)
   30.25 +  by (auto simp add: fun_eq_iff compose_def extensional_def Pi_def)
   30.26  
   30.27  lemma compose_Id:
   30.28      "[|g \<in> A -> B;  g \<in> extensional A|] ==> compose A g (\<lambda>x\<in>A. x) = g"
   30.29 -  by (auto simp add: ext_iff compose_def extensional_def Pi_def)
   30.30 +  by (auto simp add: fun_eq_iff compose_def extensional_def Pi_def)
   30.31  
   30.32  lemma image_restrict_eq [simp]: "(restrict f A) ` A = f ` A"
   30.33    by (auto simp add: restrict_def)
   30.34 @@ -205,7 +205,7 @@
   30.35  lemma extensionalityI:
   30.36    "[| f \<in> extensional A; g \<in> extensional A;
   30.37        !!x. x\<in>A ==> f x = g x |] ==> f = g"
   30.38 -by (force simp add: ext_iff extensional_def)
   30.39 +by (force simp add: fun_eq_iff extensional_def)
   30.40  
   30.41  lemma inv_into_funcset: "f ` A = B ==> (\<lambda>x\<in>B. inv_into A f x) : B -> A"
   30.42  by (unfold inv_into_def) (fast intro: someI2)
    31.1 --- a/src/HOL/Library/Function_Algebras.thy	Mon Sep 13 08:43:48 2010 +0200
    31.2 +++ b/src/HOL/Library/Function_Algebras.thy	Mon Sep 13 11:13:15 2010 +0200
    31.3 @@ -57,7 +57,7 @@
    31.4  qed (simp add: plus_fun_def add.assoc)
    31.5  
    31.6  instance "fun" :: (type, cancel_semigroup_add) cancel_semigroup_add proof
    31.7 -qed (simp_all add: plus_fun_def ext_iff)
    31.8 +qed (simp_all add: plus_fun_def fun_eq_iff)
    31.9  
   31.10  instance "fun" :: (type, ab_semigroup_add) ab_semigroup_add proof
   31.11  qed (simp add: plus_fun_def add.commute)
   31.12 @@ -106,7 +106,7 @@
   31.13  qed (simp_all add: zero_fun_def times_fun_def)
   31.14  
   31.15  instance "fun" :: (type, zero_neq_one) zero_neq_one proof
   31.16 -qed (simp add: zero_fun_def one_fun_def ext_iff)
   31.17 +qed (simp add: zero_fun_def one_fun_def fun_eq_iff)
   31.18  
   31.19  
   31.20  text {* Ring structures *}
    32.1 --- a/src/HOL/Library/Inner_Product.thy	Mon Sep 13 08:43:48 2010 +0200
    32.2 +++ b/src/HOL/Library/Inner_Product.thy	Mon Sep 13 11:13:15 2010 +0200
    32.3 @@ -307,7 +307,7 @@
    32.4    have 1: "FDERIV (\<lambda>x. inner x x) x :> (\<lambda>h. inner x h + inner h x)"
    32.5      by (intro inner.FDERIV FDERIV_ident)
    32.6    have 2: "(\<lambda>h. inner x h + inner h x) = (\<lambda>h. inner h (scaleR 2 x))"
    32.7 -    by (simp add: ext_iff inner_commute)
    32.8 +    by (simp add: fun_eq_iff inner_commute)
    32.9    have "0 < inner x x" using `x \<noteq> 0` by simp
   32.10    then have 3: "DERIV sqrt (inner x x) :> (inverse (sqrt (inner x x)) / 2)"
   32.11      by (rule DERIV_real_sqrt)
    33.1 --- a/src/HOL/Library/Mapping.thy	Mon Sep 13 08:43:48 2010 +0200
    33.2 +++ b/src/HOL/Library/Mapping.thy	Mon Sep 13 11:13:15 2010 +0200
    33.3 @@ -94,11 +94,11 @@
    33.4  
    33.5  lemma lookup_map_entry [simp]:
    33.6    "lookup (map_entry k f m) = (lookup m) (k := Option.map f (lookup m k))"
    33.7 -  by (cases "lookup m k") (simp_all add: map_entry_def ext_iff)
    33.8 +  by (cases "lookup m k") (simp_all add: map_entry_def fun_eq_iff)
    33.9  
   33.10  lemma lookup_tabulate [simp]:
   33.11    "lookup (tabulate ks f) = (Some o f) |` set ks"
   33.12 -  by (induct ks) (auto simp add: tabulate_def restrict_map_def ext_iff)
   33.13 +  by (induct ks) (auto simp add: tabulate_def restrict_map_def fun_eq_iff)
   33.14  
   33.15  lemma lookup_bulkload [simp]:
   33.16    "lookup (bulkload xs) = (\<lambda>k. if k < length xs then Some (xs ! k) else None)"
   33.17 @@ -146,7 +146,7 @@
   33.18  
   33.19  lemma bulkload_tabulate:
   33.20    "bulkload xs = tabulate [0..<length xs] (nth xs)"
   33.21 -  by (rule mapping_eqI) (simp add: ext_iff)
   33.22 +  by (rule mapping_eqI) (simp add: fun_eq_iff)
   33.23  
   33.24  lemma is_empty_empty: (*FIXME*)
   33.25    "is_empty m \<longleftrightarrow> m = Mapping Map.empty"
    34.1 --- a/src/HOL/Library/More_List.thy	Mon Sep 13 08:43:48 2010 +0200
    34.2 +++ b/src/HOL/Library/More_List.thy	Mon Sep 13 11:13:15 2010 +0200
    34.3 @@ -30,7 +30,7 @@
    34.4  
    34.5  lemma foldr_fold_rev:
    34.6    "foldr f xs = fold f (rev xs)"
    34.7 -  by (simp add: foldr_foldl foldl_fold ext_iff)
    34.8 +  by (simp add: foldr_foldl foldl_fold fun_eq_iff)
    34.9  
   34.10  lemma fold_rev_conv [code_unfold]:
   34.11    "fold f (rev xs) = foldr f xs"
   34.12 @@ -49,7 +49,7 @@
   34.13  lemma fold_apply:
   34.14    assumes "\<And>x. x \<in> set xs \<Longrightarrow> h \<circ> g x = f x \<circ> h"
   34.15    shows "h \<circ> fold g xs = fold f xs \<circ> h"
   34.16 -  using assms by (induct xs) (simp_all add: ext_iff)
   34.17 +  using assms by (induct xs) (simp_all add: fun_eq_iff)
   34.18  
   34.19  lemma fold_invariant: 
   34.20    assumes "\<And>x. x \<in> set xs \<Longrightarrow> Q x" and "P s"
   34.21 @@ -164,7 +164,7 @@
   34.22  
   34.23  lemma (in lattice) Inf_fin_set_foldr [code_unfold]:
   34.24    "Inf_fin (set (x # xs)) = foldr inf xs x"
   34.25 -  by (simp add: Inf_fin_set_fold ac_simps foldr_fold ext_iff del: set.simps)
   34.26 +  by (simp add: Inf_fin_set_fold ac_simps foldr_fold fun_eq_iff del: set.simps)
   34.27  
   34.28  lemma (in lattice) Sup_fin_set_fold:
   34.29    "Sup_fin (set (x # xs)) = fold sup xs x"
   34.30 @@ -177,7 +177,7 @@
   34.31  
   34.32  lemma (in lattice) Sup_fin_set_foldr [code_unfold]:
   34.33    "Sup_fin (set (x # xs)) = foldr sup xs x"
   34.34 -  by (simp add: Sup_fin_set_fold ac_simps foldr_fold ext_iff del: set.simps)
   34.35 +  by (simp add: Sup_fin_set_fold ac_simps foldr_fold fun_eq_iff del: set.simps)
   34.36  
   34.37  lemma (in linorder) Min_fin_set_fold:
   34.38    "Min (set (x # xs)) = fold min xs x"
   34.39 @@ -190,7 +190,7 @@
   34.40  
   34.41  lemma (in linorder) Min_fin_set_foldr [code_unfold]:
   34.42    "Min (set (x # xs)) = foldr min xs x"
   34.43 -  by (simp add: Min_fin_set_fold ac_simps foldr_fold ext_iff del: set.simps)
   34.44 +  by (simp add: Min_fin_set_fold ac_simps foldr_fold fun_eq_iff del: set.simps)
   34.45  
   34.46  lemma (in linorder) Max_fin_set_fold:
   34.47    "Max (set (x # xs)) = fold max xs x"
   34.48 @@ -203,7 +203,7 @@
   34.49  
   34.50  lemma (in linorder) Max_fin_set_foldr [code_unfold]:
   34.51    "Max (set (x # xs)) = foldr max xs x"
   34.52 -  by (simp add: Max_fin_set_fold ac_simps foldr_fold ext_iff del: set.simps)
   34.53 +  by (simp add: Max_fin_set_fold ac_simps foldr_fold fun_eq_iff del: set.simps)
   34.54  
   34.55  lemma (in complete_lattice) Inf_set_fold:
   34.56    "Inf (set xs) = fold inf xs top"
   34.57 @@ -215,7 +215,7 @@
   34.58  
   34.59  lemma (in complete_lattice) Inf_set_foldr [code_unfold]:
   34.60    "Inf (set xs) = foldr inf xs top"
   34.61 -  by (simp add: Inf_set_fold ac_simps foldr_fold ext_iff)
   34.62 +  by (simp add: Inf_set_fold ac_simps foldr_fold fun_eq_iff)
   34.63  
   34.64  lemma (in complete_lattice) Sup_set_fold:
   34.65    "Sup (set xs) = fold sup xs bot"
   34.66 @@ -227,7 +227,7 @@
   34.67  
   34.68  lemma (in complete_lattice) Sup_set_foldr [code_unfold]:
   34.69    "Sup (set xs) = foldr sup xs bot"
   34.70 -  by (simp add: Sup_set_fold ac_simps foldr_fold ext_iff)
   34.71 +  by (simp add: Sup_set_fold ac_simps foldr_fold fun_eq_iff)
   34.72  
   34.73  lemma (in complete_lattice) INFI_set_fold:
   34.74    "INFI (set xs) f = fold (inf \<circ> f) xs top"
    35.1 --- a/src/HOL/Library/More_Set.thy	Mon Sep 13 08:43:48 2010 +0200
    35.2 +++ b/src/HOL/Library/More_Set.thy	Mon Sep 13 11:13:15 2010 +0200
    35.3 @@ -18,7 +18,7 @@
    35.4  lemma fun_left_comm_idem_remove:
    35.5    "fun_left_comm_idem remove"
    35.6  proof -
    35.7 -  have rem: "remove = (\<lambda>x A. A - {x})" by (simp add: ext_iff remove_def)
    35.8 +  have rem: "remove = (\<lambda>x A. A - {x})" by (simp add: fun_eq_iff remove_def)
    35.9    show ?thesis by (simp only: fun_left_comm_idem_remove rem)
   35.10  qed
   35.11  
   35.12 @@ -26,7 +26,7 @@
   35.13    assumes "finite A"
   35.14    shows "B - A = Finite_Set.fold remove B A"
   35.15  proof -
   35.16 -  have rem: "remove = (\<lambda>x A. A - {x})" by (simp add: ext_iff remove_def)
   35.17 +  have rem: "remove = (\<lambda>x A. A - {x})" by (simp add: fun_eq_iff remove_def)
   35.18    show ?thesis by (simp only: rem assms minus_fold_remove)
   35.19  qed
   35.20  
   35.21 @@ -124,6 +124,6 @@
   35.22  
   35.23  lemma not_set_compl:
   35.24    "Not \<circ> set xs = - set xs"
   35.25 -  by (simp add: fun_Compl_def bool_Compl_def comp_def ext_iff)
   35.26 +  by (simp add: fun_Compl_def bool_Compl_def comp_def fun_eq_iff)
   35.27  
   35.28  end
    36.1 --- a/src/HOL/Library/Multiset.thy	Mon Sep 13 08:43:48 2010 +0200
    36.2 +++ b/src/HOL/Library/Multiset.thy	Mon Sep 13 11:13:15 2010 +0200
    36.3 @@ -24,13 +24,13 @@
    36.4  notation (xsymbols)
    36.5    Melem (infix "\<in>#" 50)
    36.6  
    36.7 -lemma multiset_ext_iff:
    36.8 +lemma multiset_eq_iff:
    36.9    "M = N \<longleftrightarrow> (\<forall>a. count M a = count N a)"
   36.10 -  by (simp only: count_inject [symmetric] ext_iff)
   36.11 +  by (simp only: count_inject [symmetric] fun_eq_iff)
   36.12  
   36.13 -lemma multiset_ext:
   36.14 +lemma multiset_eqI:
   36.15    "(\<And>x. count A x = count B x) \<Longrightarrow> A = B"
   36.16 -  using multiset_ext_iff by auto
   36.17 +  using multiset_eq_iff by auto
   36.18  
   36.19  text {*
   36.20   \medskip Preservation of the representing set @{term multiset}.
   36.21 @@ -127,7 +127,7 @@
   36.22    by (simp add: union_def in_multiset multiset_typedef)
   36.23  
   36.24  instance multiset :: (type) cancel_comm_monoid_add proof
   36.25 -qed (simp_all add: multiset_ext_iff)
   36.26 +qed (simp_all add: multiset_eq_iff)
   36.27  
   36.28  
   36.29  subsubsection {* Difference *}
   36.30 @@ -146,62 +146,62 @@
   36.31    by (simp add: diff_def in_multiset multiset_typedef)
   36.32  
   36.33  lemma diff_empty [simp]: "M - {#} = M \<and> {#} - M = {#}"
   36.34 -by(simp add: multiset_ext_iff)
   36.35 +by(simp add: multiset_eq_iff)
   36.36  
   36.37  lemma diff_cancel[simp]: "A - A = {#}"
   36.38 -by (rule multiset_ext) simp
   36.39 +by (rule multiset_eqI) simp
   36.40  
   36.41  lemma diff_union_cancelR [simp]: "M + N - N = (M::'a multiset)"
   36.42 -by(simp add: multiset_ext_iff)
   36.43 +by(simp add: multiset_eq_iff)
   36.44  
   36.45  lemma diff_union_cancelL [simp]: "N + M - N = (M::'a multiset)"
   36.46 -by(simp add: multiset_ext_iff)
   36.47 +by(simp add: multiset_eq_iff)
   36.48  
   36.49  lemma insert_DiffM:
   36.50    "x \<in># M \<Longrightarrow> {#x#} + (M - {#x#}) = M"
   36.51 -  by (clarsimp simp: multiset_ext_iff)
   36.52 +  by (clarsimp simp: multiset_eq_iff)
   36.53  
   36.54  lemma insert_DiffM2 [simp]:
   36.55    "x \<in># M \<Longrightarrow> M - {#x#} + {#x#} = M"
   36.56 -  by (clarsimp simp: multiset_ext_iff)
   36.57 +  by (clarsimp simp: multiset_eq_iff)
   36.58  
   36.59  lemma diff_right_commute:
   36.60    "(M::'a multiset) - N - Q = M - Q - N"
   36.61 -  by (auto simp add: multiset_ext_iff)
   36.62 +  by (auto simp add: multiset_eq_iff)
   36.63  
   36.64  lemma diff_add:
   36.65    "(M::'a multiset) - (N + Q) = M - N - Q"
   36.66 -by (simp add: multiset_ext_iff)
   36.67 +by (simp add: multiset_eq_iff)
   36.68  
   36.69  lemma diff_union_swap:
   36.70    "a \<noteq> b \<Longrightarrow> M - {#a#} + {#b#} = M + {#b#} - {#a#}"
   36.71 -  by (auto simp add: multiset_ext_iff)
   36.72 +  by (auto simp add: multiset_eq_iff)
   36.73  
   36.74  lemma diff_union_single_conv:
   36.75    "a \<in># J \<Longrightarrow> I + J - {#a#} = I + (J - {#a#})"
   36.76 -  by (simp add: multiset_ext_iff)
   36.77 +  by (simp add: multiset_eq_iff)
   36.78  
   36.79  
   36.80  subsubsection {* Equality of multisets *}
   36.81  
   36.82  lemma single_not_empty [simp]: "{#a#} \<noteq> {#} \<and> {#} \<noteq> {#a#}"
   36.83 -  by (simp add: multiset_ext_iff)
   36.84 +  by (simp add: multiset_eq_iff)
   36.85  
   36.86  lemma single_eq_single [simp]: "{#a#} = {#b#} \<longleftrightarrow> a = b"
   36.87 -  by (auto simp add: multiset_ext_iff)
   36.88 +  by (auto simp add: multiset_eq_iff)
   36.89  
   36.90  lemma union_eq_empty [iff]: "M + N = {#} \<longleftrightarrow> M = {#} \<and> N = {#}"
   36.91 -  by (auto simp add: multiset_ext_iff)
   36.92 +  by (auto simp add: multiset_eq_iff)
   36.93  
   36.94  lemma empty_eq_union [iff]: "{#} = M + N \<longleftrightarrow> M = {#} \<and> N = {#}"
   36.95 -  by (auto simp add: multiset_ext_iff)
   36.96 +  by (auto simp add: multiset_eq_iff)
   36.97  
   36.98  lemma multi_self_add_other_not_self [simp]: "M = M + {#x#} \<longleftrightarrow> False"
   36.99 -  by (auto simp add: multiset_ext_iff)
  36.100 +  by (auto simp add: multiset_eq_iff)
  36.101  
  36.102  lemma diff_single_trivial:
  36.103    "\<not> x \<in># M \<Longrightarrow> M - {#x#} = M"
  36.104 -  by (auto simp add: multiset_ext_iff)
  36.105 +  by (auto simp add: multiset_eq_iff)
  36.106  
  36.107  lemma diff_single_eq_union:
  36.108    "x \<in># M \<Longrightarrow> M - {#x#} = N \<longleftrightarrow> M = N + {#x#}"
  36.109 @@ -220,7 +220,7 @@
  36.110    assume ?rhs then show ?lhs by auto
  36.111  next
  36.112    assume ?lhs thus ?rhs
  36.113 -    by(simp add: multiset_ext_iff split:if_splits) (metis add_is_1)
  36.114 +    by(simp add: multiset_eq_iff split:if_splits) (metis add_is_1)
  36.115  qed
  36.116  
  36.117  lemma single_is_union:
  36.118 @@ -229,7 +229,7 @@
  36.119  
  36.120  lemma add_eq_conv_diff:
  36.121    "M + {#a#} = N + {#b#} \<longleftrightarrow> M = N \<and> a = b \<or> M = N - {#a#} + {#b#} \<and> N = M - {#b#} + {#a#}"  (is "?lhs = ?rhs")
  36.122 -(* shorter: by (simp add: multiset_ext_iff) fastsimp *)
  36.123 +(* shorter: by (simp add: multiset_eq_iff) fastsimp *)
  36.124  proof
  36.125    assume ?rhs then show ?lhs
  36.126    by (auto simp add: add_assoc add_commute [of "{#b#}"])
  36.127 @@ -278,7 +278,7 @@
  36.128    mset_less_def: "(A::'a multiset) < B \<longleftrightarrow> A \<le> B \<and> A \<noteq> B"
  36.129  
  36.130  instance proof
  36.131 -qed (auto simp add: mset_le_def mset_less_def multiset_ext_iff intro: order_trans antisym)
  36.132 +qed (auto simp add: mset_le_def mset_less_def multiset_eq_iff intro: order_trans antisym)
  36.133  
  36.134  end
  36.135  
  36.136 @@ -289,7 +289,7 @@
  36.137  lemma mset_le_exists_conv:
  36.138    "(A::'a multiset) \<le> B \<longleftrightarrow> (\<exists>C. B = A + C)"
  36.139  apply (unfold mset_le_def, rule iffI, rule_tac x = "B - A" in exI)
  36.140 -apply (auto intro: multiset_ext_iff [THEN iffD2])
  36.141 +apply (auto intro: multiset_eq_iff [THEN iffD2])
  36.142  done
  36.143  
  36.144  lemma mset_le_mono_add_right_cancel [simp]:
  36.145 @@ -318,11 +318,11 @@
  36.146  
  36.147  lemma multiset_diff_union_assoc:
  36.148    "C \<le> B \<Longrightarrow> (A::'a multiset) + B - C = A + (B - C)"
  36.149 -  by (simp add: multiset_ext_iff mset_le_def)
  36.150 +  by (simp add: multiset_eq_iff mset_le_def)
  36.151  
  36.152  lemma mset_le_multiset_union_diff_commute:
  36.153    "B \<le> A \<Longrightarrow> (A::'a multiset) - B + C = A + C - B"
  36.154 -by (simp add: multiset_ext_iff mset_le_def)
  36.155 +by (simp add: multiset_eq_iff mset_le_def)
  36.156  
  36.157  lemma diff_le_self[simp]: "(M::'a multiset) - N \<le> M"
  36.158  by(simp add: mset_le_def)
  36.159 @@ -355,7 +355,7 @@
  36.160  done
  36.161  
  36.162  lemma mset_less_of_empty[simp]: "A < {#} \<longleftrightarrow> False"
  36.163 -  by (auto simp add: mset_less_def mset_le_def multiset_ext_iff)
  36.164 +  by (auto simp add: mset_less_def mset_le_def multiset_eq_iff)
  36.165  
  36.166  lemma multi_psub_of_add_self[simp]: "A < A + {#x#}"
  36.167    by (auto simp: mset_le_def mset_less_def)
  36.168 @@ -373,7 +373,7 @@
  36.169  
  36.170  lemma mset_less_diff_self:
  36.171    "c \<in># B \<Longrightarrow> B - {#c#} < B"
  36.172 -  by (auto simp: mset_le_def mset_less_def multiset_ext_iff)
  36.173 +  by (auto simp: mset_le_def mset_less_def multiset_eq_iff)
  36.174  
  36.175  
  36.176  subsubsection {* Intersection *}
  36.177 @@ -400,15 +400,15 @@
  36.178    by (simp add: multiset_inter_def multiset_typedef)
  36.179  
  36.180  lemma multiset_inter_single: "a \<noteq> b \<Longrightarrow> {#a#} #\<inter> {#b#} = {#}"
  36.181 -  by (rule multiset_ext) (auto simp add: multiset_inter_count)
  36.182 +  by (rule multiset_eqI) (auto simp add: multiset_inter_count)
  36.183  
  36.184  lemma multiset_union_diff_commute:
  36.185    assumes "B #\<inter> C = {#}"
  36.186    shows "A + B - C = A - C + B"
  36.187 -proof (rule multiset_ext)
  36.188 +proof (rule multiset_eqI)
  36.189    fix x
  36.190    from assms have "min (count B x) (count C x) = 0"
  36.191 -    by (auto simp add: multiset_inter_count multiset_ext_iff)
  36.192 +    by (auto simp add: multiset_inter_count multiset_eq_iff)
  36.193    then have "count B x = 0 \<or> count C x = 0"
  36.194      by auto
  36.195    then show "count (A + B - C) x = count (A - C + B) x"
  36.196 @@ -423,15 +423,15 @@
  36.197    by (simp add: MCollect_def in_multiset multiset_typedef)
  36.198  
  36.199  lemma MCollect_empty [simp]: "MCollect {#} P = {#}"
  36.200 -  by (rule multiset_ext) simp
  36.201 +  by (rule multiset_eqI) simp
  36.202  
  36.203  lemma MCollect_single [simp]:
  36.204    "MCollect {#x#} P = (if P x then {#x#} else {#})"
  36.205 -  by (rule multiset_ext) simp
  36.206 +  by (rule multiset_eqI) simp
  36.207  
  36.208  lemma MCollect_union [simp]:
  36.209    "MCollect (M + N) f = MCollect M f + MCollect N f"
  36.210 -  by (rule multiset_ext) simp
  36.211 +  by (rule multiset_eqI) simp
  36.212  
  36.213  
  36.214  subsubsection {* Set of elements *}
  36.215 @@ -449,7 +449,7 @@
  36.216  by (auto simp add: set_of_def)
  36.217  
  36.218  lemma set_of_eq_empty_iff [simp]: "(set_of M = {}) = (M = {#})"
  36.219 -by (auto simp add: set_of_def multiset_ext_iff)
  36.220 +by (auto simp add: set_of_def multiset_eq_iff)
  36.221  
  36.222  lemma mem_set_of_iff [simp]: "(x \<in> set_of M) = (x :# M)"
  36.223  by (auto simp add: set_of_def)
  36.224 @@ -497,7 +497,7 @@
  36.225  done
  36.226  
  36.227  lemma size_eq_0_iff_empty [iff]: "(size M = 0) = (M = {#})"
  36.228 -by (auto simp add: size_def multiset_ext_iff)
  36.229 +by (auto simp add: size_def multiset_eq_iff)
  36.230  
  36.231  lemma nonempty_has_size: "(S \<noteq> {#}) = (0 < size S)"
  36.232  by (metis gr0I gr_implies_not0 size_empty size_eq_0_iff_empty)
  36.233 @@ -584,7 +584,7 @@
  36.234       apply (rule empty [unfolded defns])
  36.235      apply (subgoal_tac "f(b := f b + 1) = (\<lambda>a. f a + (if a=b then 1 else 0))")
  36.236       prefer 2
  36.237 -     apply (simp add: ext_iff)
  36.238 +     apply (simp add: fun_eq_iff)
  36.239      apply (erule ssubst)
  36.240      apply (erule Abs_multiset_inverse [THEN subst])
  36.241      apply (drule add')
  36.242 @@ -618,7 +618,7 @@
  36.243  by (cases "B = {#}") (auto dest: multi_member_split)
  36.244  
  36.245  lemma multiset_partition: "M = {# x:#M. P x #} + {# x:#M. \<not> P x #}"
  36.246 -apply (subst multiset_ext_iff)
  36.247 +apply (subst multiset_eq_iff)
  36.248  apply auto
  36.249  done
  36.250  
  36.251 @@ -758,12 +758,12 @@
  36.252  
  36.253  lemma multiset_of_eq_setD:
  36.254    "multiset_of xs = multiset_of ys \<Longrightarrow> set xs = set ys"
  36.255 -by (rule) (auto simp add:multiset_ext_iff set_count_greater_0)
  36.256 +by (rule) (auto simp add:multiset_eq_iff set_count_greater_0)
  36.257  
  36.258  lemma set_eq_iff_multiset_of_eq_distinct:
  36.259    "distinct x \<Longrightarrow> distinct y \<Longrightarrow>
  36.260      (set x = set y) = (multiset_of x = multiset_of y)"
  36.261 -by (auto simp: multiset_ext_iff distinct_count_atmost_1)
  36.262 +by (auto simp: multiset_eq_iff distinct_count_atmost_1)
  36.263  
  36.264  lemma set_eq_iff_multiset_of_remdups_eq:
  36.265     "(set x = set y) = (multiset_of (remdups x) = multiset_of (remdups y))"
  36.266 @@ -791,7 +791,7 @@
  36.267  
  36.268  lemma multiset_of_remove1[simp]:
  36.269    "multiset_of (remove1 a xs) = multiset_of xs - {#a#}"
  36.270 -by (induct xs) (auto simp add: multiset_ext_iff)
  36.271 +by (induct xs) (auto simp add: multiset_eq_iff)
  36.272  
  36.273  lemma multiset_of_eq_length:
  36.274    assumes "multiset_of xs = multiset_of ys"
  36.275 @@ -886,13 +886,13 @@
  36.276    with finite_dom_map_of [of xs] have "finite ?A"
  36.277      by (auto intro: finite_subset)
  36.278    then show ?thesis
  36.279 -    by (simp add: count_of_def ext_iff multiset_def)
  36.280 +    by (simp add: count_of_def fun_eq_iff multiset_def)
  36.281  qed
  36.282  
  36.283  lemma count_simps [simp]:
  36.284    "count_of [] = (\<lambda>_. 0)"
  36.285    "count_of ((x, n) # xs) = (\<lambda>y. if x = y then n else count_of xs y)"
  36.286 -  by (simp_all add: count_of_def ext_iff)
  36.287 +  by (simp_all add: count_of_def fun_eq_iff)
  36.288  
  36.289  lemma count_of_empty:
  36.290    "x \<notin> fst ` set xs \<Longrightarrow> count_of xs x = 0"
  36.291 @@ -913,15 +913,15 @@
  36.292  
  36.293  lemma Mempty_Bag [code]:
  36.294    "{#} = Bag []"
  36.295 -  by (simp add: multiset_ext_iff)
  36.296 +  by (simp add: multiset_eq_iff)
  36.297    
  36.298  lemma single_Bag [code]:
  36.299    "{#x#} = Bag [(x, 1)]"
  36.300 -  by (simp add: multiset_ext_iff)
  36.301 +  by (simp add: multiset_eq_iff)
  36.302  
  36.303  lemma MCollect_Bag [code]:
  36.304    "MCollect (Bag xs) P = Bag (filter (P \<circ> fst) xs)"
  36.305 -  by (simp add: multiset_ext_iff count_of_filter)
  36.306 +  by (simp add: multiset_eq_iff count_of_filter)
  36.307  
  36.308  lemma mset_less_eq_Bag [code]:
  36.309    "Bag xs \<le> A \<longleftrightarrow> (\<forall>(x, n) \<in> set xs. count_of xs x \<le> count A x)"
  36.310 @@ -1132,10 +1132,10 @@
  36.311   apply (rule_tac x = "J + {#a#}" in exI)
  36.312   apply (rule_tac x = "K + Ka" in exI)
  36.313   apply (rule conjI)
  36.314 -  apply (simp add: multiset_ext_iff split: nat_diff_split)
  36.315 +  apply (simp add: multiset_eq_iff split: nat_diff_split)
  36.316   apply (rule conjI)
  36.317    apply (drule_tac f = "\<lambda>M. M - {#a#}" in arg_cong, simp)
  36.318 -  apply (simp add: multiset_ext_iff split: nat_diff_split)
  36.319 +  apply (simp add: multiset_eq_iff split: nat_diff_split)
  36.320   apply (simp (no_asm_use) add: trans_def)
  36.321   apply blast
  36.322  apply (subgoal_tac "a :# (M0 + {#a#})")
  36.323 @@ -1650,7 +1650,7 @@
  36.324  
  36.325  subsection {* Legacy theorem bindings *}
  36.326  
  36.327 -lemmas multi_count_eq = multiset_ext_iff [symmetric]
  36.328 +lemmas multi_count_eq = multiset_eq_iff [symmetric]
  36.329  
  36.330  lemma union_commute: "M + N = N + (M::'a multiset)"
  36.331    by (fact add_commute)
    37.1 --- a/src/HOL/Library/Nat_Bijection.thy	Mon Sep 13 08:43:48 2010 +0200
    37.2 +++ b/src/HOL/Library/Nat_Bijection.thy	Mon Sep 13 11:13:15 2010 +0200
    37.3 @@ -333,8 +333,8 @@
    37.4  lemma set_decode_plus_power_2:
    37.5    "n \<notin> set_decode z \<Longrightarrow> set_decode (2 ^ n + z) = insert n (set_decode z)"
    37.6   apply (induct n arbitrary: z, simp_all)
    37.7 -  apply (rule set_ext, induct_tac x, simp, simp add: even_nat_Suc_div_2)
    37.8 - apply (rule set_ext, induct_tac x, simp, simp add: add_commute)
    37.9 +  apply (rule set_eqI, induct_tac x, simp, simp add: even_nat_Suc_div_2)
   37.10 + apply (rule set_eqI, induct_tac x, simp, simp add: add_commute)
   37.11  done
   37.12  
   37.13  lemma finite_set_decode [simp]: "finite (set_decode n)"
    38.1 --- a/src/HOL/Library/Order_Relation.thy	Mon Sep 13 08:43:48 2010 +0200
    38.2 +++ b/src/HOL/Library/Order_Relation.thy	Mon Sep 13 11:13:15 2010 +0200
    38.3 @@ -81,7 +81,7 @@
    38.4  
    38.5  lemma Refl_antisym_eq_Image1_Image1_iff:
    38.6    "\<lbrakk>Refl r; antisym r; a:Field r; b:Field r\<rbrakk> \<Longrightarrow> r `` {a} = r `` {b} \<longleftrightarrow> a=b"
    38.7 -by(simp add: set_ext_iff antisym_def refl_on_def) metis
    38.8 +by(simp add: set_eq_iff antisym_def refl_on_def) metis
    38.9  
   38.10  lemma Partial_order_eq_Image1_Image1_iff:
   38.11    "\<lbrakk>Partial_order r; a:Field r; b:Field r\<rbrakk> \<Longrightarrow> r `` {a} = r `` {b} \<longleftrightarrow> a=b"
    39.1 --- a/src/HOL/Library/Permutations.thy	Mon Sep 13 08:43:48 2010 +0200
    39.2 +++ b/src/HOL/Library/Permutations.thy	Mon Sep 13 11:13:15 2010 +0200
    39.3 @@ -16,7 +16,7 @@
    39.4  (* ------------------------------------------------------------------------- *)
    39.5  
    39.6  lemma swapid_sym: "Fun.swap a b id = Fun.swap b a id"
    39.7 -  by (auto simp add: ext_iff swap_def fun_upd_def)
    39.8 +  by (auto simp add: fun_eq_iff swap_def fun_upd_def)
    39.9  lemma swap_id_refl: "Fun.swap a a id = id" by simp
   39.10  lemma swap_id_sym: "Fun.swap a b id = Fun.swap b a id"
   39.11    by (rule ext, simp add: swap_def)
   39.12 @@ -25,7 +25,7 @@
   39.13  
   39.14  lemma inv_unique_comp: assumes fg: "f o g = id" and gf: "g o f = id"
   39.15    shows "inv f = g"
   39.16 -  using fg gf inv_equality[of g f] by (auto simp add: ext_iff)
   39.17 +  using fg gf inv_equality[of g f] by (auto simp add: fun_eq_iff)
   39.18  
   39.19  lemma inverse_swap_id: "inv (Fun.swap a b id) = Fun.swap a b id"
   39.20    by (rule inv_unique_comp, simp_all)
   39.21 @@ -44,7 +44,7 @@
   39.22    using pS
   39.23    unfolding permutes_def
   39.24    apply -
   39.25 -  apply (rule set_ext)
   39.26 +  apply (rule set_eqI)
   39.27    apply (simp add: image_iff)
   39.28    apply metis
   39.29    done
   39.30 @@ -67,16 +67,16 @@
   39.31    assumes pS: "p permutes S"
   39.32    shows "p (inv p x) = x"
   39.33    and "inv p (p x) = x"
   39.34 -  using permutes_inv_o[OF pS, unfolded ext_iff o_def] by auto
   39.35 +  using permutes_inv_o[OF pS, unfolded fun_eq_iff o_def] by auto
   39.36  
   39.37  lemma permutes_subset: "p permutes S \<Longrightarrow> S \<subseteq> T ==> p permutes T"
   39.38    unfolding permutes_def by blast
   39.39  
   39.40  lemma permutes_empty[simp]: "p permutes {} \<longleftrightarrow> p = id"
   39.41 -  unfolding ext_iff permutes_def apply simp by metis
   39.42 +  unfolding fun_eq_iff permutes_def apply simp by metis
   39.43  
   39.44  lemma permutes_sing[simp]: "p permutes {a} \<longleftrightarrow> p = id"
   39.45 -  unfolding ext_iff permutes_def apply simp by metis
   39.46 +  unfolding fun_eq_iff permutes_def apply simp by metis
   39.47  
   39.48  lemma permutes_univ: "p permutes UNIV \<longleftrightarrow> (\<forall>y. \<exists>!x. p x = y)"
   39.49    unfolding permutes_def by simp
   39.50 @@ -111,7 +111,7 @@
   39.51    using pS unfolding permutes_def permutes_inv_eq[OF pS] by metis
   39.52  
   39.53  lemma permutes_inv_inv: assumes pS: "p permutes S" shows "inv (inv p) = p"
   39.54 -  unfolding ext_iff permutes_inv_eq[OF pS] permutes_inv_eq[OF permutes_inv[OF pS]]
   39.55 +  unfolding fun_eq_iff permutes_inv_eq[OF pS] permutes_inv_eq[OF permutes_inv[OF pS]]
   39.56    by blast
   39.57  
   39.58  (* ------------------------------------------------------------------------- *)
   39.59 @@ -136,7 +136,7 @@
   39.60      {assume pS: "p permutes insert a S"
   39.61        let ?b = "p a"
   39.62        let ?q = "Fun.swap a (p a) id o p"
   39.63 -      have th0: "p = Fun.swap a ?b id o ?q" unfolding ext_iff o_assoc by simp
   39.64 +      have th0: "p = Fun.swap a ?b id o ?q" unfolding fun_eq_iff o_assoc by simp
   39.65        have th1: "?b \<in> insert a S " unfolding permutes_in_image[OF pS] by simp
   39.66        from permutes_insert_lemma[OF pS] th0 th1
   39.67        have "\<exists> b q. p = Fun.swap a b id o q \<and> b \<in> insert a S \<and> q permutes S" by blast}
   39.68 @@ -180,11 +180,11 @@
   39.69            and eq: "?g (b,p) = ?g (c,q)"
   39.70          from bp cq have ths: "b \<in> insert x F" "c \<in> insert x F" "x \<in> insert x F" "p permutes F" "q permutes F" by auto
   39.71          from ths(4) `x \<notin> F` eq have "b = ?g (b,p) x" unfolding permutes_def
   39.72 -          by (auto simp add: swap_def fun_upd_def ext_iff)
   39.73 +          by (auto simp add: swap_def fun_upd_def fun_eq_iff)
   39.74          also have "\<dots> = ?g (c,q) x" using ths(5) `x \<notin> F` eq
   39.75 -          by (auto simp add: swap_def fun_upd_def ext_iff)
   39.76 +          by (auto simp add: swap_def fun_upd_def fun_eq_iff)
   39.77          also have "\<dots> = c"using ths(5) `x \<notin> F` unfolding permutes_def
   39.78 -          by (auto simp add: swap_def fun_upd_def ext_iff)
   39.79 +          by (auto simp add: swap_def fun_upd_def fun_eq_iff)
   39.80          finally have bc: "b = c" .
   39.81          hence "Fun.swap x b id = Fun.swap x c id" by simp
   39.82          with eq have "Fun.swap x b id o p = Fun.swap x b id o q" by simp
   39.83 @@ -251,12 +251,12 @@
   39.84  (* Various combinations of transpositions with 2, 1 and 0 common elements.   *)
   39.85  (* ------------------------------------------------------------------------- *)
   39.86  
   39.87 -lemma swap_id_common:" a \<noteq> c \<Longrightarrow> b \<noteq> c \<Longrightarrow>  Fun.swap a b id o Fun.swap a c id = Fun.swap b c id o Fun.swap a b id" by (simp add: ext_iff swap_def)
   39.88 +lemma swap_id_common:" a \<noteq> c \<Longrightarrow> b \<noteq> c \<Longrightarrow>  Fun.swap a b id o Fun.swap a c id = Fun.swap b c id o Fun.swap a b id" by (simp add: fun_eq_iff swap_def)
   39.89  
   39.90 -lemma swap_id_common': "~(a = b) \<Longrightarrow> ~(a = c) \<Longrightarrow> Fun.swap a c id o Fun.swap b c id = Fun.swap b c id o Fun.swap a b id" by (simp add: ext_iff swap_def)
   39.91 +lemma swap_id_common': "~(a = b) \<Longrightarrow> ~(a = c) \<Longrightarrow> Fun.swap a c id o Fun.swap b c id = Fun.swap b c id o Fun.swap a b id" by (simp add: fun_eq_iff swap_def)
   39.92  
   39.93  lemma swap_id_independent: "~(a = c) \<Longrightarrow> ~(a = d) \<Longrightarrow> ~(b = c) \<Longrightarrow> ~(b = d) ==> Fun.swap a b id o Fun.swap c d id = Fun.swap c d id o Fun.swap a b id"
   39.94 -  by (simp add: swap_def ext_iff)
   39.95 +  by (simp add: swap_def fun_eq_iff)
   39.96  
   39.97  (* ------------------------------------------------------------------------- *)
   39.98  (* Permutations as transposition sequences.                                  *)
   39.99 @@ -352,18 +352,18 @@
  39.100    apply (rule_tac x="b" in exI)
  39.101    apply (rule_tac x="d" in exI)
  39.102    apply (rule_tac x="b" in exI)
  39.103 -  apply (clarsimp simp add: ext_iff swap_def)
  39.104 +  apply (clarsimp simp add: fun_eq_iff swap_def)
  39.105    apply (case_tac "a \<noteq> c \<and> b = d")
  39.106    apply (rule disjI2)
  39.107    apply (rule_tac x="c" in exI)
  39.108    apply (rule_tac x="d" in exI)
  39.109    apply (rule_tac x="c" in exI)
  39.110 -  apply (clarsimp simp add: ext_iff swap_def)
  39.111 +  apply (clarsimp simp add: fun_eq_iff swap_def)
  39.112    apply (rule disjI2)
  39.113    apply (rule_tac x="c" in exI)
  39.114    apply (rule_tac x="d" in exI)
  39.115    apply (rule_tac x="b" in exI)
  39.116 -  apply (clarsimp simp add: ext_iff swap_def)
  39.117 +  apply (clarsimp simp add: fun_eq_iff swap_def)
  39.118    done
  39.119  with H show ?thesis by metis
  39.120  qed
  39.121 @@ -518,7 +518,7 @@
  39.122    from p obtain n where n: "swapidseq n p" unfolding permutation_def by blast
  39.123    from swapidseq_inverse_exists[OF n] obtain q where
  39.124      q: "swapidseq n q" "p \<circ> q = id" "q \<circ> p = id" by blast
  39.125 -  thus ?thesis unfolding bij_iff  apply (auto simp add: ext_iff) apply metis done
  39.126 +  thus ?thesis unfolding bij_iff  apply (auto simp add: fun_eq_iff) apply metis done
  39.127  qed
  39.128  
  39.129  lemma permutation_finite_support: assumes p: "permutation p"
  39.130 @@ -544,7 +544,7 @@
  39.131  lemma bij_swap_comp:
  39.132    assumes bp: "bij p" shows "Fun.swap a b id o p = Fun.swap (inv p a) (inv p b) p"
  39.133    using surj_f_inv_f[OF bij_is_surj[OF bp]]
  39.134 -  by (simp add: ext_iff swap_def bij_inv_eq_iff[OF bp])
  39.135 +  by (simp add: fun_eq_iff swap_def bij_inv_eq_iff[OF bp])
  39.136  
  39.137  lemma bij_swap_ompose_bij: "bij p \<Longrightarrow> bij (Fun.swap a b id o p)"
  39.138  proof-
  39.139 @@ -688,7 +688,7 @@
  39.140          ultimately have "p n = n" by blast }
  39.141        ultimately show "p n = n"  by blast
  39.142      qed}
  39.143 -  thus ?thesis by (auto simp add: ext_iff)
  39.144 +  thus ?thesis by (auto simp add: fun_eq_iff)
  39.145  qed
  39.146  
  39.147  lemma permutes_natset_ge:
  39.148 @@ -709,7 +709,7 @@
  39.149  qed
  39.150  
  39.151  lemma image_inverse_permutations: "{inv p |p. p permutes S} = {p. p permutes S}"
  39.152 -apply (rule set_ext)
  39.153 +apply (rule set_eqI)
  39.154  apply auto
  39.155    using permutes_inv_inv permutes_inv apply auto
  39.156    apply (rule_tac x="inv x" in exI)
  39.157 @@ -718,7 +718,7 @@
  39.158  
  39.159  lemma image_compose_permutations_left:
  39.160    assumes q: "q permutes S" shows "{q o p | p. p permutes S} = {p . p permutes S}"
  39.161 -apply (rule set_ext)
  39.162 +apply (rule set_eqI)
  39.163  apply auto
  39.164  apply (rule permutes_compose)
  39.165  using q apply auto
  39.166 @@ -728,7 +728,7 @@
  39.167  lemma image_compose_permutations_right:
  39.168    assumes q: "q permutes S"
  39.169    shows "{p o q | p. p permutes S} = {p . p permutes S}"
  39.170 -apply (rule set_ext)
  39.171 +apply (rule set_eqI)
  39.172  apply auto
  39.173  apply (rule permutes_compose)
  39.174  using q apply auto
  39.175 @@ -811,7 +811,7 @@
  39.176    shows "setsum f {p. p permutes (insert a S)} = setsum (\<lambda>b. setsum (\<lambda>q. f (Fun.swap a b id o q)) {p. p permutes S}) (insert a S)"
  39.177  proof-
  39.178    have th0: "\<And>f a b. (\<lambda>(b,p). f (Fun.swap a b id o p)) = f o (\<lambda>(b,p). Fun.swap a b id o p)"
  39.179 -    by (simp add: ext_iff)
  39.180 +    by (simp add: fun_eq_iff)
  39.181    have th1: "\<And>P Q. P \<times> Q = {(a,b). a \<in> P \<and> b \<in> Q}" by blast
  39.182    have th2: "\<And>P Q. P \<Longrightarrow> (P \<Longrightarrow> Q) \<Longrightarrow> P \<and> Q" by blast
  39.183    show ?thesis
    40.1 --- a/src/HOL/Library/Polynomial.thy	Mon Sep 13 08:43:48 2010 +0200
    40.2 +++ b/src/HOL/Library/Polynomial.thy	Mon Sep 13 11:13:15 2010 +0200
    40.3 @@ -16,7 +16,7 @@
    40.4    by auto
    40.5  
    40.6  lemma expand_poly_eq: "p = q \<longleftrightarrow> (\<forall>n. coeff p n = coeff q n)"
    40.7 -by (simp add: coeff_inject [symmetric] ext_iff)
    40.8 +by (simp add: coeff_inject [symmetric] fun_eq_iff)
    40.9  
   40.10  lemma poly_ext: "(\<And>n. coeff p n = coeff q n) \<Longrightarrow> p = q"
   40.11  by (simp add: expand_poly_eq)
   40.12 @@ -1403,7 +1403,7 @@
   40.13    fixes p q :: "'a::{idom,ring_char_0} poly"
   40.14    shows "poly p = poly q \<longleftrightarrow> p = q"
   40.15    using poly_zero [of "p - q"]
   40.16 -  by (simp add: ext_iff)
   40.17 +  by (simp add: fun_eq_iff)
   40.18  
   40.19  
   40.20  subsection {* Composition of polynomials *}
    41.1 --- a/src/HOL/Library/Predicate_Compile_Alternative_Defs.thy	Mon Sep 13 08:43:48 2010 +0200
    41.2 +++ b/src/HOL/Library/Predicate_Compile_Alternative_Defs.thy	Mon Sep 13 11:13:15 2010 +0200
    41.3 @@ -12,7 +12,7 @@
    41.4  declare le_bool_def_raw[code_pred_inline]
    41.5  
    41.6  lemma min_bool_eq [code_pred_inline]: "(min :: bool => bool => bool) == (op &)"
    41.7 -by (rule eq_reflection) (auto simp add: ext_iff min_def le_bool_def)
    41.8 +by (rule eq_reflection) (auto simp add: fun_eq_iff min_def le_bool_def)
    41.9  
   41.10  setup {* Predicate_Compile_Data.ignore_consts [@{const_name Let}] *}
   41.11  
    42.1 --- a/src/HOL/Library/Quotient_List.thy	Mon Sep 13 08:43:48 2010 +0200
    42.2 +++ b/src/HOL/Library/Quotient_List.thy	Mon Sep 13 11:13:15 2010 +0200
    42.3 @@ -19,7 +19,7 @@
    42.4  
    42.5  lemma map_id[id_simps]:
    42.6    shows "map id = id"
    42.7 -  apply(simp add: ext_iff)
    42.8 +  apply(simp add: fun_eq_iff)
    42.9    apply(rule allI)
   42.10    apply(induct_tac x)
   42.11    apply(simp_all)
   42.12 @@ -92,7 +92,7 @@
   42.13  lemma cons_prs[quot_preserve]:
   42.14    assumes q: "Quotient R Abs Rep"
   42.15    shows "(Rep ---> (map Rep) ---> (map Abs)) (op #) = (op #)"
   42.16 -  by (simp only: ext_iff fun_map_def cons_prs_aux[OF q])
   42.17 +  by (simp only: fun_eq_iff fun_map_def cons_prs_aux[OF q])
   42.18       (simp)
   42.19  
   42.20  lemma cons_rsp[quot_respect]:
   42.21 @@ -122,7 +122,7 @@
   42.22    and     b: "Quotient R2 abs2 rep2"
   42.23    shows "((abs1 ---> rep2) ---> (map rep1) ---> (map abs2)) map = map"
   42.24    and   "((abs1 ---> id) ---> map rep1 ---> id) map = map"
   42.25 -  by (simp_all only: ext_iff fun_map_def map_prs_aux[OF a b])
   42.26 +  by (simp_all only: fun_eq_iff fun_map_def map_prs_aux[OF a b])
   42.27       (simp_all add: Quotient_abs_rep[OF a])
   42.28  
   42.29  lemma map_rsp[quot_respect]:
   42.30 @@ -148,7 +148,7 @@
   42.31    assumes a: "Quotient R1 abs1 rep1"
   42.32    and     b: "Quotient R2 abs2 rep2"
   42.33    shows "((abs1 ---> abs2 ---> rep2) ---> (map rep1) ---> rep2 ---> abs2) foldr = foldr"
   42.34 -  by (simp only: ext_iff fun_map_def foldr_prs_aux[OF a b])
   42.35 +  by (simp only: fun_eq_iff fun_map_def foldr_prs_aux[OF a b])
   42.36       (simp)
   42.37  
   42.38  lemma foldl_prs_aux:
   42.39 @@ -162,7 +162,7 @@
   42.40    assumes a: "Quotient R1 abs1 rep1"
   42.41    and     b: "Quotient R2 abs2 rep2"
   42.42    shows "((abs1 ---> abs2 ---> rep1) ---> rep1 ---> (map rep2) ---> abs1) foldl = foldl"
   42.43 -  by (simp only: ext_iff fun_map_def foldl_prs_aux[OF a b])
   42.44 +  by (simp only: fun_eq_iff fun_map_def foldl_prs_aux[OF a b])
   42.45       (simp)
   42.46  
   42.47  lemma list_all2_empty:
   42.48 @@ -231,7 +231,7 @@
   42.49  lemma[quot_preserve]:
   42.50    assumes a: "Quotient R abs1 rep1"
   42.51    shows "((abs1 ---> abs1 ---> id) ---> map rep1 ---> map rep1 ---> id) list_all2 = list_all2"
   42.52 -  apply (simp add: ext_iff)
   42.53 +  apply (simp add: fun_eq_iff)
   42.54    apply clarify
   42.55    apply (induct_tac xa xb rule: list_induct2')
   42.56    apply (simp_all add: Quotient_abs_rep[OF a])
   42.57 @@ -244,7 +244,7 @@
   42.58  
   42.59  lemma list_all2_eq[id_simps]:
   42.60    shows "(list_all2 (op =)) = (op =)"
   42.61 -  unfolding ext_iff
   42.62 +  unfolding fun_eq_iff
   42.63    apply(rule allI)+
   42.64    apply(induct_tac x xa rule: list_induct2')
   42.65    apply(simp_all)
    43.1 --- a/src/HOL/Library/Quotient_Option.thy	Mon Sep 13 08:43:48 2010 +0200
    43.2 +++ b/src/HOL/Library/Quotient_Option.thy	Mon Sep 13 11:13:15 2010 +0200
    43.3 @@ -66,16 +66,16 @@
    43.4  lemma option_Some_prs[quot_preserve]:
    43.5    assumes q: "Quotient R Abs Rep"
    43.6    shows "(Rep ---> Option.map Abs) Some = Some"
    43.7 -  apply(simp add: ext_iff)
    43.8 +  apply(simp add: fun_eq_iff)
    43.9    apply(simp add: Quotient_abs_rep[OF q])
   43.10    done
   43.11  
   43.12  lemma option_map_id[id_simps]:
   43.13    shows "Option.map id = id"
   43.14 -  by (simp add: ext_iff split_option_all)
   43.15 +  by (simp add: fun_eq_iff split_option_all)
   43.16  
   43.17  lemma option_rel_eq[id_simps]:
   43.18    shows "option_rel (op =) = (op =)"
   43.19 -  by (simp add: ext_iff split_option_all)
   43.20 +  by (simp add: fun_eq_iff split_option_all)
   43.21  
   43.22  end
    44.1 --- a/src/HOL/Library/Quotient_Product.thy	Mon Sep 13 08:43:48 2010 +0200
    44.2 +++ b/src/HOL/Library/Quotient_Product.thy	Mon Sep 13 11:13:15 2010 +0200
    44.3 @@ -51,7 +51,7 @@
    44.4    assumes q1: "Quotient R1 Abs1 Rep1"
    44.5    assumes q2: "Quotient R2 Abs2 Rep2"
    44.6    shows "(Rep1 ---> Rep2 ---> (prod_fun Abs1 Abs2)) Pair = Pair"
    44.7 -  apply(simp add: ext_iff)
    44.8 +  apply(simp add: fun_eq_iff)
    44.9    apply(simp add: Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2])
   44.10    done
   44.11  
   44.12 @@ -65,7 +65,7 @@
   44.13    assumes q1: "Quotient R1 Abs1 Rep1"
   44.14    assumes q2: "Quotient R2 Abs2 Rep2"
   44.15    shows "(prod_fun Rep1 Rep2 ---> Abs1) fst = fst"
   44.16 -  apply(simp add: ext_iff)
   44.17 +  apply(simp add: fun_eq_iff)
   44.18    apply(simp add: Quotient_abs_rep[OF q1])
   44.19    done
   44.20  
   44.21 @@ -79,7 +79,7 @@
   44.22    assumes q1: "Quotient R1 Abs1 Rep1"
   44.23    assumes q2: "Quotient R2 Abs2 Rep2"
   44.24    shows "(prod_fun Rep1 Rep2 ---> Abs2) snd = snd"
   44.25 -  apply(simp add: ext_iff)
   44.26 +  apply(simp add: fun_eq_iff)
   44.27    apply(simp add: Quotient_abs_rep[OF q2])
   44.28    done
   44.29  
   44.30 @@ -91,7 +91,7 @@
   44.31    assumes q1: "Quotient R1 Abs1 Rep1"
   44.32    and     q2: "Quotient R2 Abs2 Rep2"
   44.33    shows "(((Abs1 ---> Abs2 ---> id) ---> prod_fun Rep1 Rep2 ---> id) split) = split"
   44.34 -  by (simp add: ext_iff Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2])
   44.35 +  by (simp add: fun_eq_iff Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2])
   44.36  
   44.37  lemma [quot_respect]:
   44.38    shows "((R2 ===> R2 ===> op =) ===> (R1 ===> R1 ===> op =) ===>
   44.39 @@ -103,7 +103,7 @@
   44.40    and     q2: "Quotient R2 abs2 rep2"
   44.41    shows "((abs1 ---> abs1 ---> id) ---> (abs2 ---> abs2 ---> id) --->
   44.42    prod_fun rep1 rep2 ---> prod_fun rep1 rep2 ---> id) prod_rel = prod_rel"
   44.43 -  by (simp add: ext_iff Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2])
   44.44 +  by (simp add: fun_eq_iff Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2])
   44.45  
   44.46  lemma [quot_preserve]:
   44.47    shows"(prod_rel ((rep1 ---> rep1 ---> id) R1) ((rep2 ---> rep2 ---> id) R2)
   44.48 @@ -118,6 +118,6 @@
   44.49  
   44.50  lemma prod_rel_eq[id_simps]:
   44.51    shows "prod_rel (op =) (op =) = (op =)"
   44.52 -  by (simp add: ext_iff)
   44.53 +  by (simp add: fun_eq_iff)
   44.54  
   44.55  end
    45.1 --- a/src/HOL/Library/Quotient_Sum.thy	Mon Sep 13 08:43:48 2010 +0200
    45.2 +++ b/src/HOL/Library/Quotient_Sum.thy	Mon Sep 13 11:13:15 2010 +0200
    45.3 @@ -74,7 +74,7 @@
    45.4    assumes q1: "Quotient R1 Abs1 Rep1"
    45.5    assumes q2: "Quotient R2 Abs2 Rep2"
    45.6    shows "(Rep1 ---> sum_map Abs1 Abs2) Inl = Inl"
    45.7 -  apply(simp add: ext_iff)
    45.8 +  apply(simp add: fun_eq_iff)
    45.9    apply(simp add: Quotient_abs_rep[OF q1])
   45.10    done
   45.11  
   45.12 @@ -82,16 +82,16 @@
   45.13    assumes q1: "Quotient R1 Abs1 Rep1"
   45.14    assumes q2: "Quotient R2 Abs2 Rep2"
   45.15    shows "(Rep2 ---> sum_map Abs1 Abs2) Inr = Inr"
   45.16 -  apply(simp add: ext_iff)
   45.17 +  apply(simp add: fun_eq_iff)
   45.18    apply(simp add: Quotient_abs_rep[OF q2])
   45.19    done
   45.20  
   45.21  lemma sum_map_id[id_simps]:
   45.22    shows "sum_map id id = id"
   45.23 -  by (simp add: ext_iff split_sum_all)
   45.24 +  by (simp add: fun_eq_iff split_sum_all)
   45.25  
   45.26  lemma sum_rel_eq[id_simps]:
   45.27    shows "sum_rel (op =) (op =) = (op =)"
   45.28 -  by (simp add: ext_iff split_sum_all)
   45.29 +  by (simp add: fun_eq_iff split_sum_all)
   45.30  
   45.31  end
    46.1 --- a/src/HOL/Library/RBT.thy	Mon Sep 13 08:43:48 2010 +0200
    46.2 +++ b/src/HOL/Library/RBT.thy	Mon Sep 13 11:13:15 2010 +0200
    46.3 @@ -112,7 +112,7 @@
    46.4  
    46.5  lemma lookup_empty [simp]:
    46.6    "lookup empty = Map.empty"
    46.7 -  by (simp add: empty_def lookup_RBT ext_iff)
    46.8 +  by (simp add: empty_def lookup_RBT fun_eq_iff)
    46.9  
   46.10  lemma lookup_insert [simp]:
   46.11    "lookup (insert k v t) = (lookup t)(k \<mapsto> v)"
   46.12 @@ -144,7 +144,7 @@
   46.13  
   46.14  lemma fold_fold:
   46.15    "fold f t = More_List.fold (prod_case f) (entries t)"
   46.16 -  by (simp add: fold_def ext_iff RBT_Impl.fold_def entries_impl_of)
   46.17 +  by (simp add: fold_def fun_eq_iff RBT_Impl.fold_def entries_impl_of)
   46.18  
   46.19  lemma is_empty_empty [simp]:
   46.20    "is_empty t \<longleftrightarrow> t = empty"
   46.21 @@ -152,7 +152,7 @@
   46.22  
   46.23  lemma RBT_lookup_empty [simp]: (*FIXME*)
   46.24    "RBT_Impl.lookup t = Map.empty \<longleftrightarrow> t = RBT_Impl.Empty"
   46.25 -  by (cases t) (auto simp add: ext_iff)
   46.26 +  by (cases t) (auto simp add: fun_eq_iff)
   46.27  
   46.28  lemma lookup_empty_empty [simp]:
   46.29    "lookup t = Map.empty \<longleftrightarrow> t = empty"
   46.30 @@ -220,7 +220,7 @@
   46.31  
   46.32  lemma bulkload_Mapping [code]:
   46.33    "Mapping.bulkload vs = Mapping (bulkload (List.map (\<lambda>n. (n, vs ! n)) [0..<length vs]))"
   46.34 -  by (rule mapping_eqI) (simp add: map_of_map_restrict ext_iff)
   46.35 +  by (rule mapping_eqI) (simp add: map_of_map_restrict fun_eq_iff)
   46.36  
   46.37  lemma equal_Mapping [code]:
   46.38    "HOL.equal (Mapping t1) (Mapping t2) \<longleftrightarrow> entries t1 = entries t2"
    47.1 --- a/src/HOL/Library/RBT_Impl.thy	Mon Sep 13 08:43:48 2010 +0200
    47.2 +++ b/src/HOL/Library/RBT_Impl.thy	Mon Sep 13 11:13:15 2010 +0200
    47.3 @@ -1019,7 +1019,7 @@
    47.4  
    47.5  theorem lookup_map_entry:
    47.6    "lookup (map_entry k f t) = (lookup t)(k := Option.map f (lookup t k))"
    47.7 -  by (induct t) (auto split: option.splits simp add: ext_iff)
    47.8 +  by (induct t) (auto split: option.splits simp add: fun_eq_iff)
    47.9  
   47.10  
   47.11  subsection {* Mapping all entries *}
   47.12 @@ -1054,7 +1054,7 @@
   47.13  lemma fold_simps [simp, code]:
   47.14    "fold f Empty = id"
   47.15    "fold f (Branch c lt k v rt) = fold f rt \<circ> f k v \<circ> fold f lt"
   47.16 -  by (simp_all add: fold_def ext_iff)
   47.17 +  by (simp_all add: fold_def fun_eq_iff)
   47.18  
   47.19  
   47.20  subsection {* Bulkloading a tree *}
    48.1 --- a/src/HOL/Library/Set_Algebras.thy	Mon Sep 13 08:43:48 2010 +0200
    48.2 +++ b/src/HOL/Library/Set_Algebras.thy	Mon Sep 13 11:13:15 2010 +0200
    48.3 @@ -72,7 +72,7 @@
    48.4    show "monoid_add.listsum set_plus {0::'a} = listsum_set"
    48.5      by (simp only: listsum_set_def)
    48.6    show "comm_monoid_add.setsum set_plus {0::'a} = setsum_set"
    48.7 -    by (simp add: set_add.setsum_def setsum_set_def ext_iff)
    48.8 +    by (simp add: set_add.setsum_def setsum_set_def fun_eq_iff)
    48.9  qed
   48.10  
   48.11  interpretation set_mult!: semigroup "set_times :: 'a::semigroup_mult set \<Rightarrow> 'a set \<Rightarrow> 'a set" proof
   48.12 @@ -117,7 +117,7 @@
   48.13    show "power.power {1} set_times = (\<lambda>A n. power_set n A)"
   48.14      by (simp add: power_set_def)
   48.15    show "comm_monoid_mult.setprod set_times {1::'a} = setprod_set"
   48.16 -    by (simp add: set_mult.setprod_def setprod_set_def ext_iff)
   48.17 +    by (simp add: set_mult.setprod_def setprod_set_def fun_eq_iff)
   48.18  qed
   48.19  
   48.20  lemma set_plus_intro [intro]: "a : C ==> b : D ==> a + b : C \<oplus> D"
    49.1 --- a/src/HOL/Library/Univ_Poly.thy	Mon Sep 13 08:43:48 2010 +0200
    49.2 +++ b/src/HOL/Library/Univ_Poly.thy	Mon Sep 13 11:13:15 2010 +0200
    49.3 @@ -382,7 +382,7 @@
    49.4  lemma (in idom_char_0) poly_entire:
    49.5    "poly (p *** q) = poly [] \<longleftrightarrow> poly p = poly [] \<or> poly q = poly []"
    49.6  using poly_entire_lemma2[of p q]
    49.7 -by (auto simp add: ext_iff poly_mult)
    49.8 +by (auto simp add: fun_eq_iff poly_mult)
    49.9  
   49.10  lemma (in idom_char_0) poly_entire_neg: "(poly (p *** q) \<noteq> poly []) = ((poly p \<noteq> poly []) & (poly q \<noteq> poly []))"
   49.11  by (simp add: poly_entire)
   49.12 @@ -847,14 +847,14 @@
   49.13    assume eq: ?lhs
   49.14    hence "\<And>x. poly ((c#cs) +++ -- (d#ds)) x = 0"
   49.15      by (simp only: poly_minus poly_add algebra_simps) simp
   49.16 -  hence "poly ((c#cs) +++ -- (d#ds)) = poly []" by(simp add: ext_iff)
   49.17 +  hence "poly ((c#cs) +++ -- (d#ds)) = poly []" by(simp add: fun_eq_iff)
   49.18    hence "c = d \<and> list_all (\<lambda>x. x=0) ((cs +++ -- ds))"
   49.19      unfolding poly_zero by (simp add: poly_minus_def algebra_simps)
   49.20    hence "c = d \<and> (\<forall>x. poly (cs +++ -- ds) x = 0)"
   49.21      unfolding poly_zero[symmetric] by simp
   49.22 -  thus ?rhs  by (simp add: poly_minus poly_add algebra_simps ext_iff)
   49.23 +  thus ?rhs  by (simp add: poly_minus poly_add algebra_simps fun_eq_iff)
   49.24  next
   49.25 -  assume ?rhs then show ?lhs by(simp add:ext_iff)
   49.26 +  assume ?rhs then show ?lhs by(simp add:fun_eq_iff)
   49.27  qed
   49.28  
   49.29  lemma (in idom_char_0) pnormalize_unique: "poly p = poly q \<Longrightarrow> pnormalize p = pnormalize q"
    50.1 --- a/src/HOL/Limits.thy	Mon Sep 13 08:43:48 2010 +0200
    50.2 +++ b/src/HOL/Limits.thy	Mon Sep 13 11:13:15 2010 +0200
    50.3 @@ -46,7 +46,7 @@
    50.4  
    50.5  lemma expand_net_eq:
    50.6    shows "net = net' \<longleftrightarrow> (\<forall>P. eventually P net = eventually P net')"
    50.7 -unfolding Rep_net_inject [symmetric] ext_iff eventually_def ..
    50.8 +unfolding Rep_net_inject [symmetric] fun_eq_iff eventually_def ..
    50.9  
   50.10  lemma eventually_True [simp]: "eventually (\<lambda>x. True) net"
   50.11  unfolding eventually_def
    51.1 --- a/src/HOL/List.thy	Mon Sep 13 08:43:48 2010 +0200
    51.2 +++ b/src/HOL/List.thy	Mon Sep 13 11:13:15 2010 +0200
    51.3 @@ -2317,7 +2317,7 @@
    51.4  lemma foldl_apply:
    51.5    assumes "\<And>x. x \<in> set xs \<Longrightarrow> f x \<circ> h = h \<circ> g x"
    51.6    shows "foldl (\<lambda>s x. f x s) (h s) xs = h (foldl (\<lambda>s x. g x s) s xs)"
    51.7 -  by (rule sym, insert assms, induct xs arbitrary: s) (simp_all add: ext_iff)
    51.8 +  by (rule sym, insert assms, induct xs arbitrary: s) (simp_all add: fun_eq_iff)
    51.9  
   51.10  lemma foldl_cong [fundef_cong, recdef_cong]:
   51.11    "[| a = b; l = k; !!a x. x : set l ==> f a x = g a x |] 
   51.12 @@ -4564,7 +4564,7 @@
   51.13  
   51.14  lemma member_set:
   51.15    "member = set"
   51.16 -  by (simp add: ext_iff member_def mem_def)
   51.17 +  by (simp add: fun_eq_iff member_def mem_def)
   51.18  
   51.19  lemma member_rec [code]:
   51.20    "member (x # xs) y \<longleftrightarrow> x = y \<or> member xs y"
    52.1 --- a/src/HOL/Map.thy	Mon Sep 13 08:43:48 2010 +0200
    52.2 +++ b/src/HOL/Map.thy	Mon Sep 13 11:13:15 2010 +0200
    52.3 @@ -218,7 +218,7 @@
    52.4  
    52.5  lemma map_of_zip_map:
    52.6    "map_of (zip xs (map f xs)) = (\<lambda>x. if x \<in> set xs then Some (f x) else None)"
    52.7 -  by (induct xs) (simp_all add: ext_iff)
    52.8 +  by (induct xs) (simp_all add: fun_eq_iff)
    52.9  
   52.10  lemma finite_range_map_of: "finite (range (map_of xys))"
   52.11  apply (induct xys)
   52.12 @@ -245,7 +245,7 @@
   52.13  
   52.14  lemma map_of_map:
   52.15    "map_of (map (\<lambda>(k, v). (k, f v)) xs) = Option.map f \<circ> map_of xs"
   52.16 -  by (induct xs) (auto simp add: ext_iff)
   52.17 +  by (induct xs) (auto simp add: fun_eq_iff)
   52.18  
   52.19  lemma dom_option_map:
   52.20    "dom (\<lambda>k. Option.map (f k) (m k)) = dom m"
   52.21 @@ -347,7 +347,7 @@
   52.22  
   52.23  lemma map_add_map_of_foldr:
   52.24    "m ++ map_of ps = foldr (\<lambda>(k, v) m. m(k \<mapsto> v)) ps m"
   52.25 -  by (induct ps) (auto simp add: ext_iff map_add_def)
   52.26 +  by (induct ps) (auto simp add: fun_eq_iff map_add_def)
   52.27  
   52.28  
   52.29  subsection {* @{term [source] restrict_map} *}
   52.30 @@ -381,26 +381,26 @@
   52.31  
   52.32  lemma restrict_fun_upd [simp]:
   52.33    "m(x := y)|`D = (if x \<in> D then (m|`(D-{x}))(x := y) else m|`D)"
   52.34 -by (simp add: restrict_map_def ext_iff)
   52.35 +by (simp add: restrict_map_def fun_eq_iff)
   52.36  
   52.37  lemma fun_upd_None_restrict [simp]:
   52.38    "(m|`D)(x := None) = (if x:D then m|`(D - {x}) else m|`D)"
   52.39 -by (simp add: restrict_map_def ext_iff)
   52.40 +by (simp add: restrict_map_def fun_eq_iff)
   52.41  
   52.42  lemma fun_upd_restrict: "(m|`D)(x := y) = (m|`(D-{x}))(x := y)"
   52.43 -by (simp add: restrict_map_def ext_iff)
   52.44 +by (simp add: restrict_map_def fun_eq_iff)
   52.45  
   52.46  lemma fun_upd_restrict_conv [simp]:
   52.47    "x \<in> D \<Longrightarrow> (m|`D)(x := y) = (m|`(D-{x}))(x := y)"
   52.48 -by (simp add: restrict_map_def ext_iff)
   52.49 +by (simp add: restrict_map_def fun_eq_iff)
   52.50  
   52.51  lemma map_of_map_restrict:
   52.52    "map_of (map (\<lambda>k. (k, f k)) ks) = (Some \<circ> f) |` set ks"
   52.53 -  by (induct ks) (simp_all add: ext_iff restrict_map_insert)
   52.54 +  by (induct ks) (simp_all add: fun_eq_iff restrict_map_insert)
   52.55  
   52.56  lemma restrict_complement_singleton_eq:
   52.57    "f |` (- {x}) = f(x := None)"
   52.58 -  by (simp add: restrict_map_def ext_iff)
   52.59 +  by (simp add: restrict_map_def fun_eq_iff)
   52.60  
   52.61  
   52.62  subsection {* @{term [source] map_upds} *}
   52.63 @@ -641,7 +641,7 @@
   52.64  by (fastsimp simp add: map_le_def)
   52.65  
   52.66  lemma map_le_iff_map_add_commute: "(f \<subseteq>\<^sub>m f ++ g) = (f++g = g++f)"
   52.67 -by(fastsimp simp: map_add_def map_le_def ext_iff split: option.splits)
   52.68 +by(fastsimp simp: map_add_def map_le_def fun_eq_iff split: option.splits)
   52.69  
   52.70  lemma map_add_le_mapE: "f++g \<subseteq>\<^sub>m h \<Longrightarrow> g \<subseteq>\<^sub>m h"
   52.71  by (fastsimp simp add: map_le_def map_add_def dom_def)
    53.1 --- a/src/HOL/Matrix/Matrix.thy	Mon Sep 13 08:43:48 2010 +0200
    53.2 +++ b/src/HOL/Matrix/Matrix.thy	Mon Sep 13 11:13:15 2010 +0200
    53.3 @@ -74,7 +74,7 @@
    53.4    let ?B = "{pos. Rep_matrix x (fst pos) (snd pos) \<noteq> 0}"
    53.5    have swap_image: "?swap`?A = ?B"
    53.6      apply (simp add: image_def)
    53.7 -    apply (rule set_ext)
    53.8 +    apply (rule set_eqI)
    53.9      apply (simp)
   53.10      proof
   53.11        fix y
   53.12 @@ -208,7 +208,7 @@
   53.13  apply (simp)
   53.14  proof -
   53.15    fix n
   53.16 -  have "{x. x < Suc n} = insert n {x. x < n}"  by (rule set_ext, simp, arith)
   53.17 +  have "{x. x < Suc n} = insert n {x. x < n}"  by (rule set_eqI, simp, arith)
   53.18    moreover assume "finite {x. x < n}"
   53.19    ultimately show "finite {x. x < Suc n}" by (simp)
   53.20  qed
   53.21 @@ -225,11 +225,11 @@
   53.22      have f1: "finite ?sd"
   53.23      proof -
   53.24        let ?f = "% x. (m, x)"
   53.25 -      have "{pos. fst pos = m & snd pos < n} = ?f ` {x. x < n}" by (rule set_ext, simp add: image_def, auto)
   53.26 +      have "{pos. fst pos = m & snd pos < n} = ?f ` {x. x < n}" by (rule set_eqI, simp add: image_def, auto)
   53.27        moreover have "finite {x. x < n}" by (simp add: finite_natarray1)
   53.28        ultimately show "finite {pos. fst pos = m & snd pos < n}" by (simp)
   53.29      qed
   53.30 -    have su: "?s0 \<union> ?sd = ?s1" by (rule set_ext, simp, arith)
   53.31 +    have su: "?s0 \<union> ?sd = ?s1" by (rule set_eqI, simp, arith)
   53.32      from f0 f1 have "finite (?s0 \<union> ?sd)" by (rule finite_UnI)
   53.33      with su show "finite ?s1" by (simp)
   53.34  qed
   53.35 @@ -247,7 +247,7 @@
   53.36    have c: "!! (m::nat) a. ~(m <= a) \<Longrightarrow> a < m" by (arith)
   53.37    from a b have "(?u \<inter> (-?v)) = {}"
   53.38      apply (simp)
   53.39 -    apply (rule set_ext)
   53.40 +    apply (rule set_eqI)
   53.41      apply (simp)
   53.42      apply auto
   53.43      by (rule c, auto)+
    54.1 --- a/src/HOL/MicroJava/Comp/AuxLemmas.thy	Mon Sep 13 08:43:48 2010 +0200
    54.2 +++ b/src/HOL/MicroJava/Comp/AuxLemmas.thy	Mon Sep 13 11:13:15 2010 +0200
    54.3 @@ -68,7 +68,7 @@
    54.4  (**********************************************************************)
    54.5  
    54.6  lemma the_map_upd: "(the \<circ> f(x\<mapsto>v)) = (the \<circ> f)(x:=v)"
    54.7 -by (simp add: ext_iff)
    54.8 +by (simp add: fun_eq_iff)
    54.9  
   54.10  lemma map_of_in_set: 
   54.11    "(map_of xs x = None) = (x \<notin> set (map fst xs))"
    55.1 --- a/src/HOL/MicroJava/Comp/LemmasComp.thy	Mon Sep 13 08:43:48 2010 +0200
    55.2 +++ b/src/HOL/MicroJava/Comp/LemmasComp.thy	Mon Sep 13 11:13:15 2010 +0200
    55.3 @@ -113,7 +113,7 @@
    55.4  by (auto simp add: subcls1_def2 comp_classname comp_is_class)
    55.5  
    55.6  lemma comp_widen: "widen (comp G) = widen G"
    55.7 -  apply (simp add: ext_iff)
    55.8 +  apply (simp add: fun_eq_iff)
    55.9    apply (intro allI iffI)
   55.10    apply (erule widen.cases) 
   55.11    apply (simp_all add: comp_subcls1 widen.null)
   55.12 @@ -122,7 +122,7 @@
   55.13    done
   55.14  
   55.15  lemma comp_cast: "cast (comp G) = cast G"
   55.16 -  apply (simp add: ext_iff)
   55.17 +  apply (simp add: fun_eq_iff)
   55.18    apply (intro allI iffI)
   55.19    apply (erule cast.cases) 
   55.20    apply (simp_all add: comp_subcls1 cast.widen cast.subcls)
   55.21 @@ -133,7 +133,7 @@
   55.22    done
   55.23  
   55.24  lemma comp_cast_ok: "cast_ok (comp G) = cast_ok G"
   55.25 -  by (simp add: ext_iff cast_ok_def comp_widen)
   55.26 +  by (simp add: fun_eq_iff cast_ok_def comp_widen)
   55.27  
   55.28  
   55.29  lemma compClass_fst [simp]: "(fst (compClass G C)) = (fst C)"
   55.30 @@ -171,7 +171,7 @@
   55.31  apply (subgoal_tac "(Fun.comp fst (\<lambda>(C, cno::cname, fdls::fdecl list, jmdls).
   55.32    (C, cno, fdls, map (compMethod G C) jmdls))) = fst")
   55.33  apply (simp del: image_compose)
   55.34 -apply (simp add: ext_iff split_beta)
   55.35 +apply (simp add: fun_eq_iff split_beta)
   55.36  done
   55.37  
   55.38  
   55.39 @@ -322,7 +322,7 @@
   55.40    = (\<lambda>x. (fst x, Object, fst (snd x),
   55.41                          snd (snd (compMethod G Object (S, snd x)))))")
   55.42  apply (simp only:)
   55.43 -apply (simp add: ext_iff)
   55.44 +apply (simp add: fun_eq_iff)
   55.45  apply (intro strip)
   55.46  apply (subgoal_tac "(inv (\<lambda>(s, m). (s, Object, m)) (S, Object, snd x)) = (S, snd x)")
   55.47  apply (simp only:)
    56.1 --- a/src/HOL/Multivariate_Analysis/Brouwer_Fixpoint.thy	Mon Sep 13 08:43:48 2010 +0200
    56.2 +++ b/src/HOL/Multivariate_Analysis/Brouwer_Fixpoint.thy	Mon Sep 13 11:13:15 2010 +0200
    56.3 @@ -101,7 +101,7 @@
    56.4  lemma card_1_exists: "card s = 1 \<longleftrightarrow> (\<exists>!x. x \<in> s)" unfolding One_nat_def
    56.5    apply rule apply(drule card_eq_SucD) defer apply(erule ex1E) proof-
    56.6    fix x assume as:"x \<in> s" "\<forall>y. y \<in> s \<longrightarrow> y = x"
    56.7 -  have *:"s = insert x {}" apply- apply(rule set_ext,rule) unfolding singleton_iff
    56.8 +  have *:"s = insert x {}" apply- apply(rule set_eqI,rule) unfolding singleton_iff
    56.9      apply(rule as(2)[rule_format]) using as(1) by auto
   56.10    show "card s = Suc 0" unfolding * using card_insert by auto qed auto
   56.11  
   56.12 @@ -122,7 +122,7 @@
   56.13    shows "card {s'. \<exists>a\<in>s. s' = s - {a} \<and>  f ` s' = t - {b}} = 1" proof-
   56.14    obtain a where a:"b = f a" "a\<in>s" using assms(4-5) by auto
   56.15    have inj:"inj_on f s" apply(rule eq_card_imp_inj_on) using assms(1-4) by auto
   56.16 -  have *:"{a \<in> s. f ` (s - {a}) = t - {b}} = {a}" apply(rule set_ext) unfolding singleton_iff
   56.17 +  have *:"{a \<in> s. f ` (s - {a}) = t - {b}} = {a}" apply(rule set_eqI) unfolding singleton_iff
   56.18      apply(rule,rule inj[unfolded inj_on_def,rule_format]) unfolding a using a(2) and assms and inj[unfolded inj_on_def] by auto
   56.19    show ?thesis apply(rule image_lemma_0) unfolding *  by auto qed
   56.20  
   56.21 @@ -135,7 +135,7 @@
   56.22    have "f a \<in> t - {b}" using a and assms by auto
   56.23    hence "\<exists>c \<in> s - {a}. f a = f c" unfolding image_iff[symmetric] and a by auto
   56.24    then obtain c where c:"c \<in> s" "a \<noteq> c" "f a = f c" by auto
   56.25 -  hence *:"f ` (s - {c}) = f ` (s - {a})" apply-apply(rule set_ext,rule) proof-
   56.26 +  hence *:"f ` (s - {c}) = f ` (s - {a})" apply-apply(rule set_eqI,rule) proof-
   56.27      fix x assume "x \<in> f ` (s - {a})" then obtain y where y:"f y = x" "y\<in>s- {a}" by auto
   56.28      thus "x \<in> f ` (s - {c})" unfolding image_iff apply(rule_tac x="if y = c then a else y" in bexI) using c a by auto qed auto
   56.29    have "c\<in>?M" unfolding mem_Collect_eq and * using a and c(1) by auto
   56.30 @@ -165,7 +165,7 @@
   56.31      (\<exists>a\<in>s. (f = s - {a})) \<and> P f \<longleftrightarrow> (\<exists>a\<in>s. (f = s - {a}) \<and> P f)" by auto
   56.32    fix s assume s:"s\<in>simplices" let ?S = "{f \<in> {f. \<exists>s\<in>simplices. face f s}. face f s \<and> rl ` f = {0..n}}"
   56.33      have "{0..n + 1} - {n + 1} = {0..n}" by auto
   56.34 -    hence S:"?S = {s'. \<exists>a\<in>s. s' = s - {a} \<and> rl ` s' = {0..n + 1} - {n + 1}}" apply- apply(rule set_ext)
   56.35 +    hence S:"?S = {s'. \<exists>a\<in>s. s' = s - {a} \<and> rl ` s' = {0..n + 1} - {n + 1}}" apply- apply(rule set_eqI)
   56.36        unfolding assms(2)[rule_format] mem_Collect_eq and *[OF s, unfolded mem_Collect_eq, where P="\<lambda>x. rl ` x = {0..n}"] by auto
   56.37      show "rl ` s = {0..n+1} \<Longrightarrow> card ?S = 1" "rl ` s \<noteq> {0..n+1} \<Longrightarrow> card ?S = 0 \<or> card ?S = 2" unfolding S
   56.38        apply(rule_tac[!] image_lemma_1 image_lemma_2) using ** assms(4) and s by auto qed
   56.39 @@ -493,13 +493,13 @@
   56.40  lemma card_funspace': assumes "finite s" "finite t" "card s = m" "card t = n"
   56.41    shows "card {f. (\<forall>x\<in>s. f x \<in> t) \<and> (\<forall>x\<in>UNIV - s. f x = d)} = n ^ m" (is "card (?M s) = _")
   56.42    using assms apply - proof(induct m arbitrary: s)
   56.43 -  have *:"{f. \<forall>x. f x = d} = {\<lambda>x. d}" apply(rule set_ext,rule)unfolding mem_Collect_eq apply(rule,rule ext) by auto
   56.44 +  have *:"{f. \<forall>x. f x = d} = {\<lambda>x. d}" apply(rule set_eqI,rule)unfolding mem_Collect_eq apply(rule,rule ext) by auto
   56.45    case 0 thus ?case by(auto simp add: *) next
   56.46    case (Suc m) guess a using card_eq_SucD[OF Suc(4)] .. then guess s0
   56.47      apply(erule_tac exE) apply(erule conjE)+ . note as0 = this
   56.48    have **:"card s0 = m" using as0 using Suc(2) Suc(4) by auto
   56.49    let ?l = "(\<lambda>(b,g) x. if x = a then b else g x)" have *:"?M (insert a s0) = ?l ` {(b,g). b\<in>t \<and> g\<in>?M s0}"
   56.50 -    apply(rule set_ext,rule) unfolding mem_Collect_eq image_iff apply(erule conjE)
   56.51 +    apply(rule set_eqI,rule) unfolding mem_Collect_eq image_iff apply(erule conjE)
   56.52      apply(rule_tac x="(x a, \<lambda>y. if y\<in>s0 then x y else d)" in bexI) apply(rule ext) prefer 3 apply rule defer
   56.53      apply(erule bexE,rule) unfolding mem_Collect_eq apply(erule splitE)+ apply(erule conjE)+ proof-
   56.54      fix x xa xb xc y assume as:"x = (\<lambda>(b, g) x. if x = a then b else g x) xa" "xb \<in> UNIV - insert a s0" "xa = (xc, y)" "xc \<in> t"
   56.55 @@ -725,7 +725,7 @@
   56.56  	    hence "a_max = a'" using a' min_max by auto
   56.57  	    thus False unfolding True using min_max by auto qed qed
   56.58  	hence "\<forall>i. a_max i = a1 i" by auto
   56.59 -	hence "a' = a" unfolding True `a=a0` apply-apply(subst ext_iff,rule)
   56.60 +	hence "a' = a" unfolding True `a=a0` apply-apply(subst fun_eq_iff,rule)
   56.61  	  apply(erule_tac x=x in allE) unfolding a0a1(5)[rule_format] min_max(5)[rule_format]
   56.62  	proof- case goal1 thus ?case apply(cases "x\<in>{1..n}") by auto qed
   56.63  	hence "s' = s" apply-apply(rule lem1[OF a'(2)]) using `a\<in>s` `a'\<in>s'` by auto
   56.64 @@ -738,7 +738,7 @@
   56.65  	  have "a2 \<noteq> a" unfolding `a=a0` using k(2)[rule_format,of k] by auto
   56.66  	  hence "a2 \<in> s - {a}" using a2 by auto thus "a2 \<in> s'" unfolding a'(2)[THEN sym] by auto qed
   56.67  	hence "\<forall>i. a_min i = a2 i" by auto
   56.68 -	hence "a' = a3" unfolding as `a=a0` apply-apply(subst ext_iff,rule)
   56.69 +	hence "a' = a3" unfolding as `a=a0` apply-apply(subst fun_eq_iff,rule)
   56.70  	  apply(erule_tac x=x in allE) unfolding a0a1(5)[rule_format] min_max(5)[rule_format]
   56.71  	  unfolding a3_def k(2)[rule_format] unfolding a0a1(5)[rule_format] proof- case goal1
   56.72  	  show ?case unfolding goal1 apply(cases "x\<in>{1..n}") defer apply(cases "x=k")
   56.73 @@ -834,7 +834,7 @@
   56.74  	proof- case goal1 thus ?case apply(cases "j\<in>{1..n}",case_tac[!] "j=k") by auto qed
   56.75  	have "\<forall>i. a_min i = a3 i" using a_max apply-apply(rule,erule_tac x=i in allE)
   56.76  	  unfolding min_max(5)[rule_format] *[rule_format] proof- case goal1
   56.77 -	  thus ?case apply(cases "i\<in>{1..n}") by auto qed hence "a_min = a3" unfolding ext_iff .
   56.78 +	  thus ?case apply(cases "i\<in>{1..n}") by auto qed hence "a_min = a3" unfolding fun_eq_iff .
   56.79  	hence "s' = insert a3 (s - {a1})" using a' unfolding `a=a1` True by auto thus ?thesis by auto next
   56.80  	case False hence as:"a'=a_max" using ** by auto
   56.81  	have "a_min = a0" unfolding kle_antisym[THEN sym,of _ _ n] apply(rule)
   56.82 @@ -843,7 +843,7 @@
   56.83  	  thus "a_min \<in> s" by auto have "a0 \<in> s - {a1}" using a0a1(1-3) by auto thus "a0 \<in> s'"
   56.84  	    unfolding a'(2)[THEN sym,unfolded `a=a1`] by auto qed
   56.85  	hence "\<forall>i. a_max i = a1 i" unfolding a0a1(5)[rule_format] min_max(5)[rule_format] by auto
   56.86 -	hence "s' = s" apply-apply(rule lem1[OF a'(2)]) using `a\<in>s` `a'\<in>s'` unfolding as `a=a1` unfolding ext_iff by auto
   56.87 +	hence "s' = s" apply-apply(rule lem1[OF a'(2)]) using `a\<in>s` `a'\<in>s'` unfolding as `a=a1` unfolding fun_eq_iff by auto
   56.88  	thus ?thesis by auto qed qed 
   56.89      ultimately have *:"?A = {s, insert a3 (s - {a1})}" by blast
   56.90      have "s \<noteq> insert a3 (s - {a1})" using `a3\<notin>s` by auto
   56.91 @@ -863,7 +863,7 @@
   56.92        thus False using ksimplexD(6)[OF assms(1),rule_format,OF u v] unfolding kle_def
   56.93  	unfolding l(2) k(2) `k=l` apply-apply(erule disjE)apply(erule_tac[!] exE conjE)+
   56.94  	apply(erule_tac[!] x=l in allE)+ by(auto simp add: *) qed
   56.95 -    hence aa':"a'\<noteq>a" apply-apply rule unfolding ext_iff unfolding a'_def k(2)
   56.96 +    hence aa':"a'\<noteq>a" apply-apply rule unfolding fun_eq_iff unfolding a'_def k(2)
   56.97        apply(erule_tac x=l in allE) by auto
   56.98      have "a' \<notin> s" apply(rule) apply(drule ksimplexD(6)[OF assms(1),rule_format,OF `a\<in>s`]) proof(cases "kle n a a'")
   56.99        case goal2 hence "kle n a' a" by auto thus False apply(drule_tac kle_imp_pointwise)
  56.100 @@ -877,22 +877,22 @@
  56.101      have uxv:"\<And>x. kle n u x \<Longrightarrow> kle n x v \<Longrightarrow> (x = u) \<or> (x = a) \<or> (x = a') \<or> (x = v)"
  56.102      proof- case goal1 thus ?case proof(cases "x k = u k", case_tac[!] "x l = u l")
  56.103        assume as:"x l = u l" "x k = u k"
  56.104 -      have "x = u" unfolding ext_iff
  56.105 +      have "x = u" unfolding fun_eq_iff
  56.106  	using goal1(2)[THEN kle_imp_pointwise,unfolded l(2)] unfolding k(2) apply-
  56.107  	using goal1(1)[THEN kle_imp_pointwise] apply-apply rule apply(erule_tac x=xa in allE)+ proof- case goal1
  56.108  	thus ?case apply(cases "x=l") apply(case_tac[!] "x=k") using as by auto qed thus ?case by auto next
  56.109        assume as:"x l \<noteq> u l" "x k = u k"
  56.110 -      have "x = a'" unfolding ext_iff unfolding a'_def
  56.111 +      have "x = a'" unfolding fun_eq_iff unfolding a'_def
  56.112  	using goal1(2)[THEN kle_imp_pointwise] unfolding l(2) k(2) apply-
  56.113  	using goal1(1)[THEN kle_imp_pointwise] apply-apply rule apply(erule_tac x=xa in allE)+ proof- case goal1
  56.114  	thus ?case apply(cases "x=l") apply(case_tac[!] "x=k") using as by auto qed thus ?case by auto next
  56.115        assume as:"x l = u l" "x k \<noteq> u k"
  56.116 -      have "x = a" unfolding ext_iff
  56.117 +      have "x = a" unfolding fun_eq_iff
  56.118  	using goal1(2)[THEN kle_imp_pointwise] unfolding l(2) k(2) apply-
  56.119  	using goal1(1)[THEN kle_imp_pointwise] apply-apply rule apply(erule_tac x=xa in allE)+ proof- case goal1
  56.120  	thus ?case apply(cases "x=l") apply(case_tac[!] "x=k") using as by auto qed thus ?case by auto next
  56.121        assume as:"x l \<noteq> u l" "x k \<noteq> u k"
  56.122 -      have "x = v" unfolding ext_iff
  56.123 +      have "x = v" unfolding fun_eq_iff
  56.124  	using goal1(2)[THEN kle_imp_pointwise] unfolding l(2) k(2) apply-
  56.125  	using goal1(1)[THEN kle_imp_pointwise] apply-apply rule apply(erule_tac x=xa in allE)+ proof- case goal1
  56.126  	thus ?case apply(cases "x=l") apply(case_tac[!] "x=k") using as `k\<noteq>l` by auto qed thus ?case by auto qed qed
  56.127 @@ -935,9 +935,9 @@
  56.128      moreover have "?A \<subseteq> {s, insert a' (s - {a})}" apply(rule) unfolding mem_Collect_eq proof(erule conjE)
  56.129        fix s' assume as:"ksimplex p n s'" and "\<exists>b\<in>s'. s' - {b} = s - {a}"
  56.130        from this(2) guess a'' .. note a''=this
  56.131 -      have "u\<noteq>v" unfolding ext_iff unfolding l(2) k(2) by auto
  56.132 +      have "u\<noteq>v" unfolding fun_eq_iff unfolding l(2) k(2) by auto
  56.133        hence uv':"\<not> kle n v u" using uv using kle_antisym by auto
  56.134 -      have "u\<noteq>a" "v\<noteq>a" unfolding ext_iff k(2) l(2) by auto 
  56.135 +      have "u\<noteq>a" "v\<noteq>a" unfolding fun_eq_iff k(2) l(2) by auto 
  56.136        hence uvs':"u\<in>s'" "v\<in>s'" using `u\<in>s` `v\<in>s` using a'' by auto
  56.137        have lem6:"a \<in> s' \<or> a' \<in> s'" proof(cases "\<forall>x\<in>s'. kle n x u \<or> kle n v x")
  56.138  	case False then guess w unfolding ball_simps .. note w=this
  56.139 @@ -1052,7 +1052,7 @@
  56.140    shows "odd (card {s. ksimplex p (n+1) s \<and>((reduced lab (n+1)) `  s = {0..n+1})})" proof-
  56.141    have *:"\<And>s t. odd (card s) \<Longrightarrow> s = t \<Longrightarrow> odd (card t)" "\<And>s f. (\<And>x. f x \<le> n +1 ) \<Longrightarrow> f ` s \<subseteq> {0..n+1}" by auto
  56.142    show ?thesis apply(rule kuhn_simplex_lemma[unfolded mem_Collect_eq]) apply(rule,rule,rule *,rule reduced_labelling)
  56.143 -    apply(rule *(1)[OF assms(4)]) apply(rule set_ext) unfolding mem_Collect_eq apply(rule,erule conjE) defer apply(rule) proof-(*(rule,rule)*)
  56.144 +    apply(rule *(1)[OF assms(4)]) apply(rule set_eqI) unfolding mem_Collect_eq apply(rule,erule conjE) defer apply(rule) proof-(*(rule,rule)*)
  56.145      fix f assume as:"ksimplex p n f" "reduced lab n ` f = {0..n}"
  56.146      have *:"\<forall>x\<in>f. \<forall>j\<in>{1..n + 1}. x j = 0 \<longrightarrow> lab x j = 0" "\<forall>x\<in>f. \<forall>j\<in>{1..n + 1}. x j = p \<longrightarrow> lab x j = 1"
  56.147        using assms(2-3) using as(1)[unfolded ksimplex_def] by auto
  56.148 @@ -1060,7 +1060,7 @@
  56.149      { fix x assume "x\<in>f" hence "reduced lab (n + 1) x < n + 1" apply-apply(rule reduced_labelling_1)
  56.150  	defer using assms(3) using as(1)[unfolded ksimplex_def] by auto
  56.151        hence "reduced lab (n + 1) x = reduced lab n x" apply-apply(rule reduced_labelling_Suc) using reduced_labelling(1) by auto }
  56.152 -    hence "reduced lab (n + 1) ` f = {0..n}" unfolding as(2)[THEN sym] apply- apply(rule set_ext) unfolding image_iff by auto
  56.153 +    hence "reduced lab (n + 1) ` f = {0..n}" unfolding as(2)[THEN sym] apply- apply(rule set_eqI) unfolding image_iff by auto
  56.154      moreover guess s using as(1)[unfolded simplex_top_face[OF assms(1) allp,THEN sym]] .. then guess a ..
  56.155      ultimately show "\<exists>s a. ksimplex p (n + 1) s \<and>
  56.156        a \<in> s \<and> f = s - {a} \<and> reduced lab (n + 1) ` f = {0..n} \<and> ((\<exists>j\<in>{1..n + 1}. \<forall>x\<in>f. x j = 0) \<or> (\<exists>j\<in>{1..n + 1}. \<forall>x\<in>f. x j = p))" (is ?ex)
  56.157 @@ -1072,7 +1072,7 @@
  56.158        hence "reduced lab (n + 1) x < n + 1" using sa(4) by auto 
  56.159        hence "reduced lab (n + 1) x = reduced lab n x" apply-apply(rule reduced_labelling_Suc)
  56.160  	using reduced_labelling(1) by auto }
  56.161 -    thus part1:"reduced lab n ` f = {0..n}" unfolding sa(4)[THEN sym] apply-apply(rule set_ext) unfolding image_iff by auto
  56.162 +    thus part1:"reduced lab n ` f = {0..n}" unfolding sa(4)[THEN sym] apply-apply(rule set_eqI) unfolding image_iff by auto
  56.163      have *:"\<forall>x\<in>f. x (n + 1) = p" proof(cases "\<exists>j\<in>{1..n + 1}. \<forall>x\<in>f. x j = 0")
  56.164        case True then guess j .. hence "\<And>x. x\<in>f \<Longrightarrow> reduced lab (n + 1) x \<noteq> j - 1" apply-apply(rule reduced_labelling_0) apply assumption
  56.165  	apply(rule assms(2)[rule_format]) using sa(1)[unfolded ksimplex_def] unfolding sa by auto moreover
    57.1 --- a/src/HOL/Multivariate_Analysis/Cartesian_Euclidean_Space.thy	Mon Sep 13 08:43:48 2010 +0200
    57.2 +++ b/src/HOL/Multivariate_Analysis/Cartesian_Euclidean_Space.thy	Mon Sep 13 11:13:15 2010 +0200
    57.3 @@ -880,7 +880,7 @@
    57.4    by (simp add: row_def column_def transpose_def Cart_eq)
    57.5  
    57.6  lemma rows_transpose: "rows(transpose (A::'a::semiring_1^_^_)) = columns A"
    57.7 -by (auto simp add: rows_def columns_def row_transpose intro: set_ext)
    57.8 +by (auto simp add: rows_def columns_def row_transpose intro: set_eqI)
    57.9  
   57.10  lemma columns_transpose: "columns(transpose (A::'a::semiring_1^_^_)) = rows A" by (metis transpose_transpose rows_transpose)
   57.11  
   57.12 @@ -986,7 +986,7 @@
   57.13  subsection {* Standard bases are a spanning set, and obviously finite. *}
   57.14  
   57.15  lemma span_stdbasis:"span {cart_basis i :: real^'n | i. i \<in> (UNIV :: 'n set)} = UNIV"
   57.16 -apply (rule set_ext)
   57.17 +apply (rule set_eqI)
   57.18  apply auto
   57.19  apply (subst basis_expansion'[symmetric])
   57.20  apply (rule span_setsum)
   57.21 @@ -1440,12 +1440,12 @@
   57.22  lemma interval_cart: fixes a :: "'a::ord^'n" shows
   57.23    "{a <..< b} = {x::'a^'n. \<forall>i. a$i < x$i \<and> x$i < b$i}" and
   57.24    "{a .. b} = {x::'a^'n. \<forall>i. a$i \<le> x$i \<and> x$i \<le> b$i}"
   57.25 -  by (auto simp add: set_ext_iff vector_less_def vector_le_def)
   57.26 +  by (auto simp add: set_eq_iff vector_less_def vector_le_def)
   57.27  
   57.28  lemma mem_interval_cart: fixes a :: "'a::ord^'n" shows
   57.29    "x \<in> {a<..<b} \<longleftrightarrow> (\<forall>i. a$i < x$i \<and> x$i < b$i)"
   57.30    "x \<in> {a .. b} \<longleftrightarrow> (\<forall>i. a$i \<le> x$i \<and> x$i \<le> b$i)"
   57.31 -  using interval_cart[of a b] by(auto simp add: set_ext_iff vector_less_def vector_le_def)
   57.32 +  using interval_cart[of a b] by(auto simp add: set_eq_iff vector_less_def vector_le_def)
   57.33  
   57.34  lemma interval_eq_empty_cart: fixes a :: "real^'n" shows
   57.35   "({a <..< b} = {} \<longleftrightarrow> (\<exists>i. b$i \<le> a$i))" (is ?th1) and
   57.36 @@ -1498,7 +1498,7 @@
   57.37  
   57.38  lemma interval_sing: fixes a :: "'a::linorder^'n" shows
   57.39   "{a .. a} = {a} \<and> {a<..<a} = {}"
   57.40 -apply(auto simp add: set_ext_iff vector_less_def vector_le_def Cart_eq)
   57.41 +apply(auto simp add: set_eq_iff vector_less_def vector_le_def Cart_eq)
   57.42  apply (simp add: order_eq_iff)
   57.43  apply (auto simp add: not_less less_imp_le)
   57.44  done
   57.45 @@ -1511,17 +1511,17 @@
   57.46    { fix i
   57.47      have "a $ i \<le> x $ i"
   57.48        using x order_less_imp_le[of "a$i" "x$i"]
   57.49 -      by(simp add: set_ext_iff vector_less_def vector_le_def Cart_eq)
   57.50 +      by(simp add: set_eq_iff vector_less_def vector_le_def Cart_eq)
   57.51    }
   57.52    moreover
   57.53    { fix i
   57.54      have "x $ i \<le> b $ i"
   57.55        using x order_less_imp_le[of "x$i" "b$i"]
   57.56 -      by(simp add: set_ext_iff vector_less_def vector_le_def Cart_eq)
   57.57 +      by(simp add: set_eq_iff vector_less_def vector_le_def Cart_eq)
   57.58    }
   57.59    ultimately
   57.60    show "a \<le> x \<and> x \<le> b"
   57.61 -    by(simp add: set_ext_iff vector_less_def vector_le_def Cart_eq)
   57.62 +    by(simp add: set_eq_iff vector_less_def vector_le_def Cart_eq)
   57.63  qed
   57.64  
   57.65  lemma subset_interval_cart: fixes a :: "real^'n" shows
   57.66 @@ -1540,7 +1540,7 @@
   57.67  
   57.68  lemma inter_interval_cart: fixes a :: "'a::linorder^'n" shows
   57.69   "{a .. b} \<inter> {c .. d} =  {(\<chi> i. max (a$i) (c$i)) .. (\<chi> i. min (b$i) (d$i))}"
   57.70 -  unfolding set_ext_iff and Int_iff and mem_interval_cart
   57.71 +  unfolding set_eq_iff and Int_iff and mem_interval_cart
   57.72    by auto
   57.73  
   57.74  lemma closed_interval_left_cart: fixes b::"real^'n"
   57.75 @@ -1656,7 +1656,7 @@
   57.76    shows "(\<lambda>x. m *s x + c) o (\<lambda>x. inverse(m) *s x + (-(inverse(m) *s c))) = id"
   57.77    "(\<lambda>x. inverse(m) *s x + (-(inverse(m) *s c))) o (\<lambda>x. m *s x + c) = id"
   57.78    using m0
   57.79 -apply (auto simp add: ext_iff vector_add_ldistrib)
   57.80 +apply (auto simp add: fun_eq_iff vector_add_ldistrib)
   57.81  by (simp_all add: vector_smult_lneg[symmetric] vector_smult_assoc vector_sneg_minus1[symmetric])
   57.82  
   57.83  lemma vector_affinity_eq:
   57.84 @@ -1712,7 +1712,7 @@
   57.85  lemma unit_interval_convex_hull_cart:
   57.86    "{0::real^'n .. 1} = convex hull {x. \<forall>i. (x$i = 0) \<or> (x$i = 1)}" (is "?int = convex hull ?points")
   57.87    unfolding Cart_1 unit_interval_convex_hull[where 'a="real^'n"]
   57.88 -  apply(rule arg_cong[where f="\<lambda>x. convex hull x"]) apply(rule set_ext) unfolding mem_Collect_eq
   57.89 +  apply(rule arg_cong[where f="\<lambda>x. convex hull x"]) apply(rule set_eqI) unfolding mem_Collect_eq
   57.90    apply safe apply(erule_tac x="\<pi>' i" in allE) unfolding nth_conv_component defer
   57.91    apply(erule_tac x="\<pi> i" in allE) by auto
   57.92  
   57.93 @@ -1974,7 +1974,7 @@
   57.94    apply (simp add: forall_3)
   57.95    done
   57.96  
   57.97 -lemma range_vec1[simp]:"range vec1 = UNIV" apply(rule set_ext,rule) unfolding image_iff defer
   57.98 +lemma range_vec1[simp]:"range vec1 = UNIV" apply(rule set_eqI,rule) unfolding image_iff defer
   57.99    apply(rule_tac x="dest_vec1 x" in bexI) by auto
  57.100  
  57.101  lemma dest_vec1_lambda: "dest_vec1(\<chi> i. x i) = x 1"
  57.102 @@ -2069,7 +2069,7 @@
  57.103  lemma vec1_interval:fixes a::"real" shows
  57.104    "vec1 ` {a .. b} = {vec1 a .. vec1 b}"
  57.105    "vec1 ` {a<..<b} = {vec1 a<..<vec1 b}"
  57.106 -  apply(rule_tac[!] set_ext) unfolding image_iff vector_less_def unfolding mem_interval_cart
  57.107 +  apply(rule_tac[!] set_eqI) unfolding image_iff vector_less_def unfolding mem_interval_cart
  57.108    unfolding forall_1 unfolding vec1_dest_vec1_simps
  57.109    apply rule defer apply(rule_tac x="dest_vec1 x" in bexI) prefer 3 apply rule defer
  57.110    apply(rule_tac x="dest_vec1 x" in bexI) by auto
  57.111 @@ -2119,10 +2119,10 @@
  57.112  
  57.113  lemma open_closed_interval_1: fixes a :: "real^1" shows
  57.114   "{a<..<b} = {a .. b} - {a, b}"
  57.115 -  unfolding set_ext_iff apply simp unfolding vector_less_def and vector_le_def and forall_1 and dest_vec1_eq[THEN sym] by(auto simp del:dest_vec1_eq)
  57.116 +  unfolding set_eq_iff apply simp unfolding vector_less_def and vector_le_def and forall_1 and dest_vec1_eq[THEN sym] by(auto simp del:dest_vec1_eq)
  57.117  
  57.118  lemma closed_open_interval_1: "dest_vec1 (a::real^1) \<le> dest_vec1 b ==> {a .. b} = {a<..<b} \<union> {a,b}"
  57.119 -  unfolding set_ext_iff apply simp unfolding vector_less_def and vector_le_def and forall_1 and dest_vec1_eq[THEN sym] by(auto simp del:dest_vec1_eq)
  57.120 +  unfolding set_eq_iff apply simp unfolding vector_less_def and vector_le_def and forall_1 and dest_vec1_eq[THEN sym] by(auto simp del:dest_vec1_eq)
  57.121  
  57.122  lemma Lim_drop_le: fixes f :: "'a \<Rightarrow> real^1" shows
  57.123    "(f ---> l) net \<Longrightarrow> ~(trivial_limit net) \<Longrightarrow> eventually (\<lambda>x. dest_vec1 (f x) \<le> b) net ==> dest_vec1 l \<le> b"
  57.124 @@ -2284,7 +2284,7 @@
  57.125  lemma interval_split_cart:
  57.126    "{a..b::real^'n} \<inter> {x. x$k \<le> c} = {a .. (\<chi> i. if i = k then min (b$k) c else b$i)}"
  57.127    "{a..b} \<inter> {x. x$k \<ge> c} = {(\<chi> i. if i = k then max (a$k) c else a$i) .. b}"
  57.128 -  apply(rule_tac[!] set_ext) unfolding Int_iff mem_interval_cart mem_Collect_eq
  57.129 +  apply(rule_tac[!] set_eqI) unfolding Int_iff mem_interval_cart mem_Collect_eq
  57.130    unfolding Cart_lambda_beta by auto
  57.131  
  57.132  (*lemma content_split_cart:
    58.1 --- a/src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy	Mon Sep 13 08:43:48 2010 +0200
    58.2 +++ b/src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy	Mon Sep 13 11:13:15 2010 +0200
    58.3 @@ -191,7 +191,7 @@
    58.4  lemma affine_hull_finite:
    58.5    assumes "finite s"
    58.6    shows "affine hull s = {y. \<exists>u. setsum u s = 1 \<and> setsum (\<lambda>v. u v *\<^sub>R v) s = y}"
    58.7 -  unfolding affine_hull_explicit and set_ext_iff and mem_Collect_eq apply (rule,rule)
    58.8 +  unfolding affine_hull_explicit and set_eq_iff and mem_Collect_eq apply (rule,rule)
    58.9    apply(erule exE)+ apply(erule conjE)+ defer apply(erule exE) apply(erule conjE) proof-
   58.10    fix x u assume "setsum u s = 1" "(\<Sum>v\<in>s. u v *\<^sub>R v) = x"
   58.11    thus "\<exists>sa u. finite sa \<and> \<not> (\<forall>x. (x \<in> sa) = (x \<in> {})) \<and> sa \<subseteq> s \<and> setsum u sa = 1 \<and> (\<Sum>v\<in>sa. u v *\<^sub>R v) = x"
   58.12 @@ -709,7 +709,7 @@
   58.13      ultimately have "\<exists>k u x. (\<forall>i\<in>{1..k}. 0 \<le> u i \<and> x i \<in> p) \<and> setsum u {1..k} = 1 \<and> (\<Sum>i::nat = 1..k. u i *\<^sub>R x i) = y"
   58.14        apply(rule_tac x="card s" in exI) apply(rule_tac x="u \<circ> f" in exI) apply(rule_tac x=f in exI) by fastsimp
   58.15      hence "y \<in> ?lhs" unfolding convex_hull_indexed by auto  }
   58.16 -  ultimately show ?thesis unfolding set_ext_iff by blast
   58.17 +  ultimately show ?thesis unfolding set_eq_iff by blast
   58.18  qed
   58.19  
   58.20  subsection {* A stepping theorem for that expansion. *}
   58.21 @@ -882,7 +882,7 @@
   58.22  lemma convex_hull_caratheodory: fixes p::"('a::euclidean_space) set"
   58.23    shows "convex hull p = {y. \<exists>s u. finite s \<and> s \<subseteq> p \<and> card s \<le> DIM('a) + 1 \<and>
   58.24    (\<forall>x\<in>s. 0 \<le> u x) \<and> setsum u s = 1 \<and> setsum (\<lambda>v. u v *\<^sub>R v) s = y}"
   58.25 -  unfolding convex_hull_explicit set_ext_iff mem_Collect_eq
   58.26 +  unfolding convex_hull_explicit set_eq_iff mem_Collect_eq
   58.27  proof(rule,rule)
   58.28    fix y let ?P = "\<lambda>n. \<exists>s u. finite s \<and> card s = n \<and> s \<subseteq> p \<and> (\<forall>x\<in>s. 0 \<le> u x) \<and> setsum u s = 1 \<and> (\<Sum>v\<in>s. u v *\<^sub>R v) = y"
   58.29    assume "\<exists>s u. finite s \<and> s \<subseteq> p \<and> (\<forall>x\<in>s. 0 \<le> u x) \<and> setsum u s = 1 \<and> (\<Sum>v\<in>s. u v *\<^sub>R v) = y"
   58.30 @@ -939,7 +939,7 @@
   58.31  lemma caratheodory:
   58.32   "convex hull p = {x::'a::euclidean_space. \<exists>s. finite s \<and> s \<subseteq> p \<and>
   58.33        card s \<le> DIM('a) + 1 \<and> x \<in> convex hull s}"
   58.34 -  unfolding set_ext_iff apply(rule, rule) unfolding mem_Collect_eq proof-
   58.35 +  unfolding set_eq_iff apply(rule, rule) unfolding mem_Collect_eq proof-
   58.36    fix x assume "x \<in> convex hull p"
   58.37    then obtain s u where "finite s" "s \<subseteq> p" "card s \<le> DIM('a) + 1"
   58.38       "\<forall>x\<in>s. 0 \<le> u x" "setsum u s = 1" "(\<Sum>v\<in>s. u v *\<^sub>R v) = x"unfolding convex_hull_caratheodory by auto
   58.39 @@ -1000,7 +1000,7 @@
   58.40    let ?X = "{0..1} \<times> s \<times> t"
   58.41    let ?h = "(\<lambda>z. (1 - fst z) *\<^sub>R fst (snd z) + fst z *\<^sub>R snd (snd z))"
   58.42    have *:"{ (1 - u) *\<^sub>R x + u *\<^sub>R y | x y u. 0 \<le> u \<and> u \<le> 1 \<and> x \<in> s \<and> y \<in> t} = ?h ` ?X"
   58.43 -    apply(rule set_ext) unfolding image_iff mem_Collect_eq
   58.44 +    apply(rule set_eqI) unfolding image_iff mem_Collect_eq
   58.45      apply rule apply auto
   58.46      apply (rule_tac x=u in rev_bexI, simp)
   58.47      apply (erule rev_bexI, erule rev_bexI, simp)
   58.48 @@ -1029,7 +1029,7 @@
   58.49      case (Suc n)
   58.50      show ?case proof(cases "n=0")
   58.51        case True have "{x. \<exists>t. finite t \<and> t \<subseteq> s \<and> card t \<le> Suc n \<and> x \<in> convex hull t} = s"
   58.52 -        unfolding set_ext_iff and mem_Collect_eq proof(rule, rule)
   58.53 +        unfolding set_eq_iff and mem_Collect_eq proof(rule, rule)
   58.54          fix x assume "\<exists>t. finite t \<and> t \<subseteq> s \<and> card t \<le> Suc n \<and> x \<in> convex hull t"
   58.55          then obtain t where t:"finite t" "t \<subseteq> s" "card t \<le> Suc n" "x \<in> convex hull t" by auto
   58.56          show "x\<in>s" proof(cases "card t = 0")
   58.57 @@ -1048,7 +1048,7 @@
   58.58        case False have "{x. \<exists>t. finite t \<and> t \<subseteq> s \<and> card t \<le> Suc n \<and> x \<in> convex hull t} =
   58.59          { (1 - u) *\<^sub>R x + u *\<^sub>R y | x y u. 
   58.60          0 \<le> u \<and> u \<le> 1 \<and> x \<in> s \<and> y \<in> {x. \<exists>t. finite t \<and> t \<subseteq> s \<and> card t \<le> n \<and> x \<in> convex hull t}}"
   58.61 -        unfolding set_ext_iff and mem_Collect_eq proof(rule,rule)
   58.62 +        unfolding set_eq_iff and mem_Collect_eq proof(rule,rule)
   58.63          fix x assume "\<exists>u v c. x = (1 - c) *\<^sub>R u + c *\<^sub>R v \<and>
   58.64            0 \<le> c \<and> c \<le> 1 \<and> u \<in> s \<and> (\<exists>t. finite t \<and> t \<subseteq> s \<and> card t \<le> n \<and> v \<in> convex hull t)"
   58.65          then obtain u v c t where obt:"x = (1 - c) *\<^sub>R u + c *\<^sub>R v"
   58.66 @@ -1531,7 +1531,7 @@
   58.67    fixes s :: "('a::euclidean_space) set"
   58.68    assumes "closed s" "convex s"
   58.69    shows "s = \<Inter> {h. s \<subseteq> h \<and> (\<exists>a b. h = {x. inner a x \<le> b})}"
   58.70 -  apply(rule set_ext, rule) unfolding Inter_iff Ball_def mem_Collect_eq apply(rule,rule,erule conjE) proof- 
   58.71 +  apply(rule set_eqI, rule) unfolding Inter_iff Ball_def mem_Collect_eq apply(rule,rule,erule conjE) proof- 
   58.72    fix x  assume "\<forall>xa. s \<subseteq> xa \<and> (\<exists>a b. xa = {x. inner a x \<le> b}) \<longrightarrow> x \<in> xa"
   58.73    hence "\<forall>a b. s \<subseteq> {x. inner a x \<le> b} \<longrightarrow> x \<in> {x. inner a x \<le> b}" by blast
   58.74    thus "x\<in>s" apply(rule_tac ccontr) apply(drule separating_hyperplane_closed_point[OF assms(2,1)])
   58.75 @@ -1752,7 +1752,7 @@
   58.76  
   58.77    have "\<exists>surf. homeomorphism (frontier s) sphere pi surf"
   58.78      apply(rule homeomorphism_compact) apply(rule compact_frontier[OF assms(1)])
   58.79 -    apply(rule continuous_on_subset[OF contpi]) defer apply(rule set_ext,rule) 
   58.80 +    apply(rule continuous_on_subset[OF contpi]) defer apply(rule set_eqI,rule) 
   58.81      unfolding inj_on_def prefer 3 apply(rule,rule,rule)
   58.82    proof- fix x assume "x\<in>pi ` frontier s" then obtain y where "y\<in>frontier s" "x = pi y" by auto
   58.83      thus "x \<in> sphere" using pi(1)[of y] and `0 \<notin> frontier s` by auto
   58.84 @@ -1813,7 +1813,7 @@
   58.85      qed } note hom2 = this
   58.86  
   58.87    show ?thesis apply(subst homeomorphic_sym) apply(rule homeomorphic_compact[where f="\<lambda>x. norm x *\<^sub>R surf (pi x)"])
   58.88 -    apply(rule compact_cball) defer apply(rule set_ext, rule, erule imageE, drule hom)
   58.89 +    apply(rule compact_cball) defer apply(rule set_eqI, rule, erule imageE, drule hom)
   58.90      prefer 4 apply(rule continuous_at_imp_continuous_on, rule) apply(rule_tac [3] hom2) proof-
   58.91      fix x::"'a" assume as:"x \<in> cball 0 1"
   58.92      thus "continuous (at x) (\<lambda>x. norm x *\<^sub>R surf (pi x))" proof(cases "x=0")
   58.93 @@ -2119,7 +2119,7 @@
   58.94    assumes "0 < d" obtains s::"('a::ordered_euclidean_space) set" where
   58.95    "finite s" "{x - (\<chi>\<chi> i. d) .. x + (\<chi>\<chi> i. d)} = convex hull s" proof-
   58.96    let ?d = "(\<chi>\<chi> i. d)::'a"
   58.97 -  have *:"{x - ?d .. x + ?d} = (\<lambda>y. x - ?d + (2 * d) *\<^sub>R y) ` {0 .. \<chi>\<chi> i. 1}" apply(rule set_ext, rule)
   58.98 +  have *:"{x - ?d .. x + ?d} = (\<lambda>y. x - ?d + (2 * d) *\<^sub>R y) ` {0 .. \<chi>\<chi> i. 1}" apply(rule set_eqI, rule)
   58.99      unfolding image_iff defer apply(erule bexE) proof-
  58.100      fix y assume as:"y\<in>{x - ?d .. x + ?d}"
  58.101      { fix i assume i:"i<DIM('a)" have "x $$ i \<le> d + y $$ i" "y $$ i \<le> d + x $$ i"
  58.102 @@ -2329,7 +2329,7 @@
  58.103   "closed_segment a b = convex hull {a,b}" proof-
  58.104    have *:"\<And>x. {x} \<noteq> {}" by auto
  58.105    have **:"\<And>u v. u + v = 1 \<longleftrightarrow> u = 1 - (v::real)" by auto
  58.106 -  show ?thesis unfolding segment convex_hull_insert[OF *] convex_hull_singleton apply(rule set_ext)
  58.107 +  show ?thesis unfolding segment convex_hull_insert[OF *] convex_hull_singleton apply(rule set_eqI)
  58.108      unfolding mem_Collect_eq apply(rule,erule exE) 
  58.109      apply(rule_tac x="1 - u" in exI) apply rule defer apply(rule_tac x=u in exI) defer
  58.110      apply(erule exE, (erule conjE)?)+ apply(rule_tac x="1 - u" in exI) unfolding ** by auto qed
  58.111 @@ -2454,7 +2454,7 @@
  58.112  lemma simplex:
  58.113    assumes "finite s" "0 \<notin> s"
  58.114    shows "convex hull (insert 0 s) =  { y. (\<exists>u. (\<forall>x\<in>s. 0 \<le> u x) \<and> setsum u s \<le> 1 \<and> setsum (\<lambda>x. u x *\<^sub>R x) s = y)}"
  58.115 -  unfolding convex_hull_finite[OF finite.insertI[OF assms(1)]] apply(rule set_ext, rule) unfolding mem_Collect_eq
  58.116 +  unfolding convex_hull_finite[OF finite.insertI[OF assms(1)]] apply(rule set_eqI, rule) unfolding mem_Collect_eq
  58.117    apply(erule_tac[!] exE) apply(erule_tac[!] conjE)+ unfolding setsum_clauses(2)[OF assms(1)]
  58.118    apply(rule_tac x=u in exI) defer apply(rule_tac x="\<lambda>x. if x = 0 then 1 - setsum u s else u x" in exI) using assms(2)
  58.119    unfolding if_smult and setsum_delta_notmem[OF assms(2)] by auto
  58.120 @@ -2467,7 +2467,7 @@
  58.121    have *:"finite ?p" "0\<notin>?p" by auto
  58.122    have "{(basis i)::'a |i. i<DIM('a)} = basis ` ?D" by auto
  58.123    note sumbas = this  setsum_reindex[OF basis_inj, unfolded o_def]
  58.124 -  show ?thesis unfolding simplex[OF *] apply(rule set_ext) unfolding mem_Collect_eq apply rule
  58.125 +  show ?thesis unfolding simplex[OF *] apply(rule set_eqI) unfolding mem_Collect_eq apply rule
  58.126      apply(erule exE, (erule conjE)+) apply(erule_tac[2] conjE)+ proof-
  58.127      fix x::"'a" and u assume as: "\<forall>x\<in>{basis i |i. i<DIM('a)}. 0 \<le> u x"
  58.128        "setsum u {basis i |i. i<DIM('a)} \<le> 1" "(\<Sum>x\<in>{basis i |i. i<DIM('a)}. u x *\<^sub>R x) = x"
  58.129 @@ -2500,7 +2500,7 @@
  58.130  lemma interior_std_simplex:
  58.131    "interior (convex hull (insert 0 { basis i| i. i<DIM('a)})) =
  58.132    {x::'a::euclidean_space. (\<forall>i<DIM('a). 0 < x$$i) \<and> setsum (\<lambda>i. x$$i) {..<DIM('a)} < 1 }"
  58.133 -  apply(rule set_ext) unfolding mem_interior std_simplex unfolding subset_eq mem_Collect_eq Ball_def mem_ball
  58.134 +  apply(rule set_eqI) unfolding mem_interior std_simplex unfolding subset_eq mem_Collect_eq Ball_def mem_ball
  58.135    unfolding Ball_def[symmetric] apply rule apply(erule exE, (erule conjE)+) defer apply(erule conjE) proof-
  58.136    fix x::"'a" and e assume "0<e" and as:"\<forall>xa. dist x xa < e \<longrightarrow> (\<forall>x<DIM('a). 0 \<le> xa $$ x) \<and> setsum (op $$ xa) {..<DIM('a)} \<le> 1"
  58.137    show "(\<forall>xa<DIM('a). 0 < x $$ xa) \<and> setsum (op $$ x) {..<DIM('a)} < 1" apply(safe) proof-
    59.1 --- a/src/HOL/Multivariate_Analysis/Derivative.thy	Mon Sep 13 08:43:48 2010 +0200
    59.2 +++ b/src/HOL/Multivariate_Analysis/Derivative.thy	Mon Sep 13 11:13:15 2010 +0200
    59.3 @@ -665,7 +665,7 @@
    59.4    have "\<forall>i<DIM('a). f' (basis i) = 0"
    59.5      by (simp add: euclidean_eq[of _ "0::'a"])
    59.6    with derivative_is_linear[OF deriv, THEN linear_componentwise, of _ 0]
    59.7 -  show ?thesis by (simp add: ext_iff)
    59.8 +  show ?thesis by (simp add: fun_eq_iff)
    59.9  qed
   59.10  
   59.11  lemma rolle: fixes f::"real\<Rightarrow>real"
   59.12 @@ -948,13 +948,13 @@
   59.13     assumes lf: "linear f" and gf: "f o g = id"
   59.14     shows "linear g"
   59.15   proof-
   59.16 -   from gf have fi: "surj f" apply (auto simp add: surj_def o_def id_def ext_iff)
   59.17 +   from gf have fi: "surj f" apply (auto simp add: surj_def o_def id_def fun_eq_iff)
   59.18       by metis 
   59.19     from linear_surjective_isomorphism[OF lf fi]
   59.20     obtain h:: "'a => 'a" where
   59.21       h: "linear h" "\<forall>x. h (f x) = x" "\<forall>x. f (h x) = x" by blast
   59.22     have "h = g" apply (rule ext) using gf h(2,3)
   59.23 -     apply (simp add: o_def id_def ext_iff)
   59.24 +     apply (simp add: o_def id_def fun_eq_iff)
   59.25       by metis
   59.26     with h(1) show ?thesis by blast
   59.27   qed
   59.28 @@ -1268,7 +1268,7 @@
   59.29    have "(\<lambda>x. x *\<^sub>R f') = (\<lambda>x. x *\<^sub>R f'')"
   59.30      using assms [unfolded has_vector_derivative_def]
   59.31      by (rule frechet_derivative_unique_at)
   59.32 -  thus ?thesis unfolding ext_iff by auto
   59.33 +  thus ?thesis unfolding fun_eq_iff by auto
   59.34  qed
   59.35  
   59.36  lemma vector_derivative_unique_within_closed_interval: fixes f::"real \<Rightarrow> 'n::ordered_euclidean_space"
   59.37 @@ -1279,7 +1279,7 @@
   59.38      apply(rule frechet_derivative_unique_within_closed_interval[of "a" "b"])
   59.39      using assms(3-)[unfolded has_vector_derivative_def] using assms(1-2) by auto
   59.40    show ?thesis proof(rule ccontr) assume "f' \<noteq> f''" moreover
   59.41 -    hence "(\<lambda>x. x *\<^sub>R f') 1 = (\<lambda>x. x *\<^sub>R f'') 1" using * by (auto simp: ext_iff)
   59.42 +    hence "(\<lambda>x. x *\<^sub>R f') 1 = (\<lambda>x. x *\<^sub>R f'') 1" using * by (auto simp: fun_eq_iff)
   59.43      ultimately show False unfolding o_def by auto qed qed
   59.44  
   59.45  lemma vector_derivative_at:
    60.1 --- a/src/HOL/Multivariate_Analysis/Determinants.thy	Mon Sep 13 08:43:48 2010 +0200
    60.2 +++ b/src/HOL/Multivariate_Analysis/Determinants.thy	Mon Sep 13 11:13:15 2010 +0200
    60.3 @@ -141,7 +141,7 @@
    60.4        {fix i assume i: "i \<in> ?U"
    60.5          from i permutes_inv_o[OF pU] permutes_in_image[OF pU]
    60.6          have "((\<lambda>i. ?di (transpose A) i (inv p i)) o p) i = ?di A i (p i)"
    60.7 -          unfolding transpose_def by (simp add: ext_iff)}
    60.8 +          unfolding transpose_def by (simp add: fun_eq_iff)}
    60.9        then show "setprod ((\<lambda>i. ?di (transpose A) i (inv p i)) o p) ?U = setprod (\<lambda>i. ?di A i (p i)) ?U" by (auto intro: setprod_cong)
   60.10      qed
   60.11      finally have "of_int (sign (inv p)) * (setprod (\<lambda>i. ?di (transpose A) i (inv p i)) ?U) = of_int (sign p) * (setprod (\<lambda>i. ?di A i (p i)) ?U)" using sth
   60.12 @@ -207,7 +207,7 @@
   60.13    have id0: "{id} \<subseteq> ?PU" by (auto simp add: permutes_id)
   60.14    {fix p assume p: "p \<in> ?PU - {id}"
   60.15      then have "p \<noteq> id" by simp
   60.16 -    then obtain i where i: "p i \<noteq> i" unfolding ext_iff by auto
   60.17 +    then obtain i where i: "p i \<noteq> i" unfolding fun_eq_iff by auto
   60.18      from ld [OF i [symmetric]] have ex:"\<exists>i \<in> ?U. A$i$p i = 0" by blast
   60.19      from setprod_zero [OF fU ex] have "?pp p = 0" by simp}
   60.20    then have p0: "\<forall>p \<in> ?PU - {id}. ?pp p = 0"  by blast
    61.1 --- a/src/HOL/Multivariate_Analysis/Euclidean_Space.thy	Mon Sep 13 08:43:48 2010 +0200
    61.2 +++ b/src/HOL/Multivariate_Analysis/Euclidean_Space.thy	Mon Sep 13 11:13:15 2010 +0200
    61.3 @@ -1112,7 +1112,7 @@
    61.4        done}
    61.5    moreover
    61.6    {fix x assume x: "x \<in> span S"
    61.7 -    have th0:"(\<lambda>a. f a \<in> span (f ` S)) = {x. f x \<in> span (f ` S)}" apply (rule set_ext)
    61.8 +    have th0:"(\<lambda>a. f a \<in> span (f ` S)) = {x. f x \<in> span (f ` S)}" apply (rule set_eqI)
    61.9        unfolding mem_def Collect_def ..
   61.10      have "f x \<in> span (f ` S)"
   61.11        apply (rule span_induct[where S=S])
   61.12 @@ -2363,7 +2363,7 @@
   61.13        apply (rule span_mul)
   61.14        by (rule span_superset)}
   61.15    then have SC: "span ?C = span (insert a B)"
   61.16 -    unfolding set_ext_iff span_breakdown_eq C(3)[symmetric] by auto
   61.17 +    unfolding set_eq_iff span_breakdown_eq C(3)[symmetric] by auto
   61.18    thm pairwise_def
   61.19    {fix x y assume xC: "x \<in> ?C" and yC: "y \<in> ?C" and xy: "x \<noteq> y"
   61.20      {assume xa: "x = ?a" and ya: "y = ?a"
   61.21 @@ -2826,7 +2826,7 @@
   61.22      " \<forall>x \<in> f ` basis ` {..<DIM('a)}. h x = inv f x" by blast
   61.23    from h(2)
   61.24    have th: "\<forall>i<DIM('a). (h \<circ> f) (basis i) = id (basis i)"
   61.25 -    using inv_o_cancel[OF fi, unfolded ext_iff id_def o_def]
   61.26 +    using inv_o_cancel[OF fi, unfolded fun_eq_iff id_def o_def]
   61.27      by auto
   61.28  
   61.29    from linear_eq_stdbasis[OF linear_compose[OF lf h(1)] linear_id th]
   61.30 @@ -2843,7 +2843,7 @@
   61.31      h: "linear h" "\<forall> x\<in> basis ` {..<DIM('b)}. h x = inv f x" by blast
   61.32    from h(2)
   61.33    have th: "\<forall>i<DIM('b). (f o h) (basis i) = id (basis i)"
   61.34 -    using sf by(auto simp add: surj_iff o_def ext_iff)
   61.35 +    using sf by(auto simp add: surj_iff o_def fun_eq_iff)
   61.36    from linear_eq_stdbasis[OF linear_compose[OF h(1) lf] linear_id th]
   61.37    have "f o h = id" .
   61.38    then show ?thesis using h(1) by blast
   61.39 @@ -2970,7 +2970,7 @@
   61.40  
   61.41  lemma isomorphism_expand:
   61.42    "f o g = id \<and> g o f = id \<longleftrightarrow> (\<forall>x. f(g x) = x) \<and> (\<forall>x. g(f x) = x)"
   61.43 -  by (simp add: ext_iff o_def id_def)
   61.44 +  by (simp add: fun_eq_iff o_def id_def)
   61.45  
   61.46  lemma linear_injective_isomorphism: fixes f::"'a::euclidean_space => 'a::euclidean_space"
   61.47    assumes lf: "linear f" and fi: "inj f"
   61.48 @@ -2995,10 +2995,10 @@
   61.49    {fix f f':: "'a => 'a"
   61.50      assume lf: "linear f" "linear f'" and f: "f o f' = id"
   61.51      from f have sf: "surj f"
   61.52 -      apply (auto simp add: o_def ext_iff id_def surj_def)
   61.53 +      apply (auto simp add: o_def fun_eq_iff id_def surj_def)
   61.54        by metis
   61.55      from linear_surjective_isomorphism[OF lf(1) sf] lf f
   61.56 -    have "f' o f = id" unfolding ext_iff o_def id_def
   61.57 +    have "f' o f = id" unfolding fun_eq_iff o_def id_def
   61.58        by metis}
   61.59    then show ?thesis using lf lf' by metis
   61.60  qed
   61.61 @@ -3009,13 +3009,13 @@
   61.62    assumes lf: "linear f" and gf: "g o f = id"
   61.63    shows "linear g"
   61.64  proof-
   61.65 -  from gf have fi: "inj f" apply (auto simp add: inj_on_def o_def id_def ext_iff)
   61.66 +  from gf have fi: "inj f" apply (auto simp add: inj_on_def o_def id_def fun_eq_iff)
   61.67      by metis
   61.68    from linear_injective_isomorphism[OF lf fi]
   61.69    obtain h:: "'a \<Rightarrow> 'a" where
   61.70      h: "linear h" "\<forall>x. h (f x) = x" "\<forall>x. f (h x) = x" by blast
   61.71    have "h = g" apply (rule ext) using gf h(2,3)
   61.72 -    apply (simp add: o_def id_def ext_iff)
   61.73 +    apply (simp add: o_def id_def fun_eq_iff)
   61.74      by metis
   61.75    with h(1) show ?thesis by blast
   61.76  qed
    62.1 --- a/src/HOL/Multivariate_Analysis/Fashoda.thy	Mon Sep 13 08:43:48 2010 +0200
    62.2 +++ b/src/HOL/Multivariate_Analysis/Fashoda.thy	Mon Sep 13 11:13:15 2010 +0200
    62.3 @@ -34,7 +34,7 @@
    62.4      apply(subst infnorm_eq_0[THEN sym]) by auto
    62.5    let ?F = "(\<lambda>w::real^2. (f \<circ> (\<lambda>x. x$1)) w - (g \<circ> (\<lambda>x. x$2)) w)"
    62.6    have *:"\<And>i. (\<lambda>x::real^2. x $ i) ` {- 1..1} = {- 1..1::real}"
    62.7 -    apply(rule set_ext) unfolding image_iff Bex_def mem_interval_cart apply rule defer 
    62.8 +    apply(rule set_eqI) unfolding image_iff Bex_def mem_interval_cart apply rule defer 
    62.9      apply(rule_tac x="vec x" in exI) by auto
   62.10    { fix x assume "x \<in> (\<lambda>w. (f \<circ> (\<lambda>x. x $ 1)) w - (g \<circ> (\<lambda>x. x $ 2)) w) ` {- 1..1::real^2}"
   62.11      then guess w unfolding image_iff .. note w = this
    63.1 --- a/src/HOL/Multivariate_Analysis/Finite_Cartesian_Product.thy	Mon Sep 13 08:43:48 2010 +0200
    63.2 +++ b/src/HOL/Multivariate_Analysis/Finite_Cartesian_Product.thy	Mon Sep 13 11:13:15 2010 +0200
    63.3 @@ -42,7 +42,7 @@
    63.4    by (auto intro: ext)
    63.5  
    63.6  lemma Cart_eq: "(x = y) \<longleftrightarrow> (\<forall>i. x$i = y$i)"
    63.7 -  by (simp add: Cart_nth_inject [symmetric] ext_iff)
    63.8 +  by (simp add: Cart_nth_inject [symmetric] fun_eq_iff)
    63.9  
   63.10  lemma Cart_lambda_beta [simp]: "Cart_lambda g $ i = g i"
   63.11    by (simp add: Cart_lambda_inverse)
    64.1 --- a/src/HOL/Multivariate_Analysis/Integration.thy	Mon Sep 13 08:43:48 2010 +0200
    64.2 +++ b/src/HOL/Multivariate_Analysis/Integration.thy	Mon Sep 13 11:13:15 2010 +0200
    64.3 @@ -102,7 +102,7 @@
    64.4  abbreviation One  where "One \<equiv> ((\<chi>\<chi> i. 1)::_::ordered_euclidean_space)"
    64.5  
    64.6  lemma empty_as_interval: "{} = {One..0}"
    64.7 -  apply(rule set_ext,rule) defer unfolding mem_interval
    64.8 +  apply(rule set_eqI,rule) defer unfolding mem_interval
    64.9    using UNIV_witness[where 'a='n] apply(erule_tac exE,rule_tac x=x in allE) by auto
   64.10  
   64.11  lemma interior_subset_union_intervals: 
   64.12 @@ -367,7 +367,7 @@
   64.13  let ?A = "{s. s \<in>  (\<lambda>(k1,k2). k1 \<inter> k2) ` (p1 \<times> p2) \<and> s \<noteq> {}}" have *:"?A' = ?A" by auto
   64.14  show ?thesis unfolding * proof(rule division_ofI) have "?A \<subseteq> (\<lambda>(x, y). x \<inter> y) ` (p1 \<times> p2)" by auto
   64.15    moreover have "finite (p1 \<times> p2)" using assms unfolding division_of_def by auto ultimately show "finite ?A" by auto
   64.16 -  have *:"\<And>s. \<Union>{x\<in>s. x \<noteq> {}} = \<Union>s" by auto show "\<Union>?A = s1 \<inter> s2" apply(rule set_ext) unfolding * and Union_image_eq UN_iff
   64.17 +  have *:"\<And>s. \<Union>{x\<in>s. x \<noteq> {}} = \<Union>s" by auto show "\<Union>?A = s1 \<inter> s2" apply(rule set_eqI) unfolding * and Union_image_eq UN_iff
   64.18      using division_ofD(6)[OF assms(1)] and division_ofD(6)[OF assms(2)] by auto
   64.19    { fix k assume "k\<in>?A" then obtain k1 k2 where k:"k = k1 \<inter> k2" "k1\<in>p1" "k2\<in>p2" "k\<noteq>{}" by auto thus "k \<noteq> {}" by auto
   64.20    show "k \<subseteq> s1 \<inter> s2" using division_ofD(2)[OF assms(1) k(2)] and division_ofD(2)[OF assms(2) k(3)] unfolding k by auto
   64.21 @@ -1035,7 +1035,7 @@
   64.22        next assume as:"c $$ i = (a $$ i + b $$ i) / 2" "d $$ i = b $$ i"
   64.23          show False using e_f(2)[of i] and i x unfolding as by(fastsimp simp add:field_simps)
   64.24        qed qed qed
   64.25 -  also have "\<Union> ?A = {a..b}" proof(rule set_ext,rule)
   64.26 +  also have "\<Union> ?A = {a..b}" proof(rule set_eqI,rule)
   64.27      fix x assume "x\<in>\<Union>?A" then guess Y unfolding Union_iff ..
   64.28      from this(1) guess c unfolding mem_Collect_eq .. then guess d ..
   64.29      note c_d = this[THEN conjunct2,rule_format] `x\<in>Y`[unfolded this[THEN conjunct1]]
   64.30 @@ -1402,7 +1402,7 @@
   64.31    apply(rule integral_unique) using has_integral_empty .
   64.32  
   64.33  lemma has_integral_refl[intro]: shows "(f has_integral 0) {a..a}" "(f has_integral 0) {a::'a::ordered_euclidean_space}"
   64.34 -proof- have *:"{a} = {a..a}" apply(rule set_ext) unfolding mem_interval singleton_iff euclidean_eq[where 'a='a]
   64.35 +proof- have *:"{a} = {a..a}" apply(rule set_eqI) unfolding mem_interval singleton_iff euclidean_eq[where 'a='a]
   64.36      apply safe prefer 3 apply(erule_tac x=i in allE) by(auto simp add: field_simps)
   64.37    show "(f has_integral 0) {a..a}" "(f has_integral 0) {a}" unfolding *
   64.38      apply(rule_tac[!] has_integral_null) unfolding content_eq_0_interior
   64.39 @@ -1466,7 +1466,7 @@
   64.40  lemma interval_split: fixes a::"'a::ordered_euclidean_space" assumes "k<DIM('a)" shows
   64.41    "{a..b} \<inter> {x. x$$k \<le> c} = {a .. (\<chi>\<chi> i. if i = k then min (b$$k) c else b$$i)}"
   64.42    "{a..b} \<inter> {x. x$$k \<ge> c} = {(\<chi>\<chi> i. if i = k then max (a$$k) c else a$$i) .. b}"
   64.43 -  apply(rule_tac[!] set_ext) unfolding Int_iff mem_interval mem_Collect_eq using assms by auto
   64.44 +  apply(rule_tac[!] set_eqI) unfolding Int_iff mem_interval mem_Collect_eq using assms by auto
   64.45  
   64.46  lemma content_split: fixes a::"'a::ordered_euclidean_space" assumes "k<DIM('a)" shows
   64.47    "content {a..b} = content({a..b} \<inter> {x. x$$k \<le> c}) + content({a..b} \<inter> {x. x$$k >= c})"
   64.48 @@ -2494,7 +2494,7 @@
   64.49    note division_split(1)[OF assms, where c="c+e",unfolded interval_split[OF k]]
   64.50    note division_split(2)[OF this, where c="c-e" and k=k,OF k] 
   64.51    thus ?thesis apply(rule **) using k apply- unfolding interval_doublesplit unfolding * unfolding interval_split interval_doublesplit
   64.52 -    apply(rule set_ext) unfolding mem_Collect_eq apply rule apply(erule conjE exE)+ apply(rule_tac x=la in exI) defer
   64.53 +    apply(rule set_eqI) unfolding mem_Collect_eq apply rule apply(erule conjE exE)+ apply(rule_tac x=la in exI) defer
   64.54      apply(erule conjE exE)+ apply(rule_tac x="l \<inter> {x. c + e \<ge> x $$ k}" in exI) apply rule defer apply rule
   64.55      apply(rule_tac x=l in exI) by blast+ qed
   64.56  
   64.57 @@ -2538,7 +2538,7 @@
   64.58        apply(cases,rule disjI1,assumption,rule disjI2)
   64.59      proof- fix x l assume as:"(x,l)\<in>p" "?i x \<noteq> 0" hence xk:"x$$k = c" unfolding indicator_def apply-by(rule ccontr,auto)
   64.60        show "content l = content (l \<inter> {x. \<bar>x $$ k - c\<bar> \<le> d})" apply(rule arg_cong[where f=content])
   64.61 -        apply(rule set_ext,rule,rule) unfolding mem_Collect_eq
   64.62 +        apply(rule set_eqI,rule,rule) unfolding mem_Collect_eq
   64.63        proof- fix y assume y:"y\<in>l" note p[THEN conjunct2,unfolded fine_def,rule_format,OF as(1),unfolded split_conv]
   64.64          note this[unfolded subset_eq mem_ball dist_norm,rule_format,OF y] note le_less_trans[OF component_le_norm[of _ k] this]
   64.65          thus "\<bar>y $$ k - c\<bar> \<le> d" unfolding euclidean_simps xk by auto
   64.66 @@ -3280,7 +3280,7 @@
   64.67  proof(cases "{a..b}={}") case True thus ?thesis unfolding True by auto
   64.68  next have *:"\<And>P Q. (\<forall>i<DIM('a). P i) \<and> (\<forall>i<DIM('a). Q i) \<longleftrightarrow> (\<forall>i<DIM('a). P i \<and> Q i)" by auto
   64.69    case False note ab = this[unfolded interval_ne_empty]
   64.70 -  show ?thesis apply-apply(rule set_ext)
   64.71 +  show ?thesis apply-apply(rule set_eqI)
   64.72    proof- fix x::"'a" have **:"\<And>P Q. (\<forall>i<DIM('a). P i = Q i) \<Longrightarrow> (\<forall>i<DIM('a). P i) = (\<forall>i<DIM('a). Q i)" by auto
   64.73      show "x \<in> ?l \<longleftrightarrow> x \<in> ?r" unfolding if_not_P[OF False] 
   64.74        unfolding image_iff mem_interval Bex_def euclidean_simps euclidean_eq[where 'a='a] *
   64.75 @@ -3334,7 +3334,7 @@
   64.76  subsection {* even more special cases. *}
   64.77  
   64.78  lemma uminus_interval_vector[simp]:"uminus ` {a..b} = {-b .. -a::'a::ordered_euclidean_space}"
   64.79 -  apply(rule set_ext,rule) defer unfolding image_iff
   64.80 +  apply(rule set_eqI,rule) defer unfolding image_iff
   64.81    apply(rule_tac x="-x" in bexI) by(auto simp add:minus_le_iff le_minus_iff eucl_le[where 'a='a])
   64.82  
   64.83  lemma has_integral_reflect_lemma[intro]: assumes "(f has_integral i) {a..b}"
   64.84 @@ -3694,7 +3694,7 @@
   64.85    let ?thesis = "\<exists>d>0. \<forall>x'\<in>{a..b}. dist x' x < d \<longrightarrow> dist (integral {a..x'} f) (integral {a..x} f) < e"
   64.86    { presume *:"a<b \<Longrightarrow> ?thesis"
   64.87      show ?thesis apply(cases,rule *,assumption)
   64.88 -    proof- case goal1 hence "{a..b} = {x}" using as(1) apply-apply(rule set_ext)
   64.89 +    proof- case goal1 hence "{a..b} = {x}" using as(1) apply-apply(rule set_eqI)
   64.90          unfolding atLeastAtMost_iff by(auto simp only:field_simps not_less DIM_real)
   64.91        thus ?case using `e>0` by auto
   64.92      qed } assume "a<b"
    65.1 --- a/src/HOL/Multivariate_Analysis/Path_Connected.thy	Mon Sep 13 08:43:48 2010 +0200
    65.2 +++ b/src/HOL/Multivariate_Analysis/Path_Connected.thy	Mon Sep 13 11:13:15 2010 +0200
    65.3 @@ -123,7 +123,7 @@
    65.4      qed (auto simp add:le_less joinpaths_def) qed
    65.5  next assume as:"continuous_on {0..1} g1" "continuous_on {0..1} g2"
    65.6    have *:"{0 .. 1::real} = {0.. (1/2)*\<^sub>R 1} \<union> {(1/2) *\<^sub>R 1 .. 1}" by auto
    65.7 -  have **:"op *\<^sub>R 2 ` {0..(1 / 2) *\<^sub>R 1} = {0..1::real}" apply(rule set_ext, rule) unfolding image_iff 
    65.8 +  have **:"op *\<^sub>R 2 ` {0..(1 / 2) *\<^sub>R 1} = {0..1::real}" apply(rule set_eqI, rule) unfolding image_iff 
    65.9      defer apply(rule_tac x="(1/2)*\<^sub>R x" in bexI) by auto
   65.10    have ***:"(\<lambda>x. 2 *\<^sub>R x - 1) ` {(1 / 2) *\<^sub>R 1..1} = {0..1::real}"
   65.11      apply (auto simp add: image_def)
   65.12 @@ -322,7 +322,7 @@
   65.13    unfolding path_def by(rule continuous_on_linepath)
   65.14  
   65.15  lemma path_image_linepath[simp]: "path_image(linepath a b) = (closed_segment a b)"
   65.16 -  unfolding path_image_def segment linepath_def apply (rule set_ext, rule) defer
   65.17 +  unfolding path_image_def segment linepath_def apply (rule set_eqI, rule) defer
   65.18    unfolding mem_Collect_eq image_iff apply(erule exE) apply(rule_tac x="u *\<^sub>R 1" in bexI)
   65.19    by auto
   65.20  
   65.21 @@ -388,7 +388,7 @@
   65.22  subsection {* Can also consider it as a set, as the name suggests. *}
   65.23  
   65.24  lemma path_component_set: "path_component s x = { y. (\<exists>g. path g \<and> path_image g \<subseteq> s \<and> pathstart g = x \<and> pathfinish g = y )}"
   65.25 -  apply(rule set_ext) unfolding mem_Collect_eq unfolding mem_def path_component_def by auto
   65.26 +  apply(rule set_eqI) unfolding mem_Collect_eq unfolding mem_def path_component_def by auto
   65.27  
   65.28  lemma mem_path_component_set:"x \<in> path_component s y \<longleftrightarrow> path_component s y x" unfolding mem_def by auto
   65.29  
   65.30 @@ -564,9 +564,9 @@
   65.31    thus ?thesis using path_connected_singleton by simp
   65.32  next
   65.33    assume r: "0 < r"
   65.34 -  hence *:"{x::'a. norm(x - a) = r} = (\<lambda>x. a + r *\<^sub>R x) ` {x. norm x = 1}" apply -apply(rule set_ext,rule)
   65.35 +  hence *:"{x::'a. norm(x - a) = r} = (\<lambda>x. a + r *\<^sub>R x) ` {x. norm x = 1}" apply -apply(rule set_eqI,rule)
   65.36      unfolding image_iff apply(rule_tac x="(1/r) *\<^sub>R (x - a)" in bexI) unfolding mem_Collect_eq norm_scaleR by (auto simp add: scaleR_right_diff_distrib)
   65.37 -  have **:"{x::'a. norm x = 1} = (\<lambda>x. (1/norm x) *\<^sub>R x) ` (UNIV - {0})" apply(rule set_ext,rule)
   65.38 +  have **:"{x::'a. norm x = 1} = (\<lambda>x. (1/norm x) *\<^sub>R x) ` (UNIV - {0})" apply(rule set_eqI,rule)
   65.39      unfolding image_iff apply(rule_tac x=x in bexI) unfolding mem_Collect_eq by(auto split:split_if_asm)
   65.40    have "continuous_on (UNIV - {0}) (\<lambda>x::'a. 1 / norm x)" unfolding o_def continuous_on_eq_continuous_within
   65.41      apply(rule, rule continuous_at_within_inv[unfolded o_def inverse_eq_divide]) apply(rule continuous_at_within)
    66.1 --- a/src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy	Mon Sep 13 08:43:48 2010 +0200
    66.2 +++ b/src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy	Mon Sep 13 11:13:15 2010 +0200
    66.3 @@ -40,7 +40,7 @@
    66.4    {assume "T1=T2" hence "\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S" by simp}
    66.5    moreover
    66.6    {assume H: "\<forall>S. openin T1 S \<longleftrightarrow> openin T2 S"
    66.7 -    hence "openin T1 = openin T2" by (metis mem_def set_ext)
    66.8 +    hence "openin T1 = openin T2" by (metis mem_def set_eqI)
    66.9      hence "topology (openin T1) = topology (openin T2)" by simp
   66.10      hence "T1 = T2" unfolding openin_inverse .}
   66.11    ultimately show ?thesis by blast
   66.12 @@ -141,7 +141,7 @@
   66.13    moreover
   66.14    {fix K assume K: "K \<subseteq> ?L"
   66.15      have th0: "?L = (\<lambda>S. S \<inter> V) ` openin U "
   66.16 -      apply (rule set_ext)
   66.17 +      apply (rule set_eqI)
   66.18        apply (simp add: Ball_def image_iff)
   66.19        by (metis mem_def)
   66.20      from K[unfolded th0 subset_image_iff]
   66.21 @@ -213,7 +213,7 @@
   66.22  
   66.23  lemma topspace_euclidean: "topspace euclidean = UNIV"
   66.24    apply (simp add: topspace_def)
   66.25 -  apply (rule set_ext)
   66.26 +  apply (rule set_eqI)
   66.27    by (auto simp add: open_openin[symmetric])
   66.28  
   66.29  lemma topspace_euclidean_subtopology[simp]: "topspace (subtopology euclidean S) = S"
   66.30 @@ -253,10 +253,10 @@
   66.31  lemma subset_ball[intro]: "d <= e ==> ball x d \<subseteq> ball x e" by (simp add: subset_eq)
   66.32  lemma subset_cball[intro]: "d <= e ==> cball x d \<subseteq> cball x e" by (simp add: subset_eq)
   66.33  lemma ball_max_Un: "ball a (max r s) = ball a r \<union> ball a s"
   66.34 -  by (simp add: set_ext_iff) arith
   66.35 +  by (simp add: set_eq_iff) arith
   66.36  
   66.37  lemma ball_min_Int: "ball a (min r s) = ball a r \<inter> ball a s"
   66.38 -  by (simp add: set_ext_iff)
   66.39 +  by (simp add: set_eq_iff)
   66.40  
   66.41  lemma diff_less_iff: "(a::real) - b > 0 \<longleftrightarrow> a > b"
   66.42    "(a::real) - b < 0 \<longleftrightarrow> a < b"
   66.43 @@ -289,7 +289,7 @@
   66.44    by (metis open_contains_ball subset_eq centre_in_ball)
   66.45  
   66.46  lemma ball_eq_empty[simp]: "ball x e = {} \<longleftrightarrow> e \<le> 0"
   66.47 -  unfolding mem_ball set_ext_iff
   66.48 +  unfolding mem_ball set_eq_iff
   66.49    apply (simp add: not_less)
   66.50    by (metis zero_le_dist order_trans dist_self)
   66.51  
   66.52 @@ -447,7 +447,7 @@
   66.53    let ?T = "\<Union>{S. open S \<and> a \<notin> S}"
   66.54    have "open ?T" by (simp add: open_Union)
   66.55    also have "?T = - {a}"
   66.56 -    by (simp add: set_ext_iff separation_t1, auto)
   66.57 +    by (simp add: set_eq_iff separation_t1, auto)
   66.58    finally show "closed {a}" unfolding closed_def .
   66.59  qed
   66.60  
   66.61 @@ -483,7 +483,7 @@
   66.62                 ==> ~(d x y * 2 < d x z \<and> d z y * 2 < d x z)" by arith
   66.63    have "open ?U \<and> open ?V \<and> x \<in> ?U \<and> y \<in> ?V \<and> ?U \<inter> ?V = {}"
   66.64      using dist_pos_lt[OF xy] th0[of dist,OF dist_triangle dist_commute]
   66.65 -    by (auto simp add: set_ext_iff)
   66.66 +    by (auto simp add: set_eq_iff)
   66.67    then show "\<exists>U V. open U \<and> open V \<and> x \<in> U \<and> y \<in> V \<and> U \<inter> V = {}"
   66.68      by blast
   66.69  qed
   66.70 @@ -641,7 +641,7 @@
   66.71  definition "interior S = {x. \<exists>T. open T \<and> x \<in> T \<and> T \<subseteq> S}"
   66.72  
   66.73  lemma interior_eq: "interior S = S \<longleftrightarrow> open S"
   66.74 -  apply (simp add: set_ext_iff interior_def)
   66.75 +  apply (simp add: set_eq_iff interior_def)
   66.76    apply (subst (2) open_subopen) by (safe, blast+)
   66.77  
   66.78  lemma interior_open: "open S ==> (interior S = S)" by (metis interior_eq)
   66.79 @@ -706,7 +706,7 @@
   66.80      proof (rule ccontr)
   66.81        assume "x \<notin> interior S"
   66.82        with `x \<in> R` `open R` obtain y where "y \<in> R - S"
   66.83 -        unfolding interior_def set_ext_iff by fast
   66.84 +        unfolding interior_def set_eq_iff by fast
   66.85        from `open R` `closed S` have "open (R - S)" by (rule open_Diff)
   66.86        from `R \<subseteq> S \<union> T` have "R - S \<subseteq> T" by fast
   66.87        from `y \<in> R - S` `open (R - S)` `R - S \<subseteq> T` `interior T = {}`
   66.88 @@ -1006,7 +1006,7 @@
   66.89      unfolding trivial_limit_def
   66.90      unfolding eventually_within eventually_at_topological
   66.91      unfolding islimpt_def
   66.92 -    apply (clarsimp simp add: set_ext_iff)
   66.93 +    apply (clarsimp simp add: set_eq_iff)
   66.94      apply (rename_tac T, rule_tac x=T in exI)
   66.95      apply (clarsimp, drule_tac x=y in bspec, simp_all)
   66.96      done
   66.97 @@ -1904,18 +1904,18 @@
   66.98    fixes a :: "'a::real_normed_vector"
   66.99    shows "0 < e ==> frontier(ball a e) = {x. dist a x = e}"
  66.100    apply (simp add: frontier_def closure_ball interior_open order_less_imp_le)
  66.101 -  apply (simp add: set_ext_iff)
  66.102 +  apply (simp add: set_eq_iff)
  66.103    by arith
  66.104  
  66.105  lemma frontier_cball:
  66.106    fixes a :: "'a::{real_normed_vector, perfect_space}"
  66.107    shows "frontier(cball a e) = {x. dist a x = e}"
  66.108    apply (simp add: frontier_def interior_cball closed_cball order_less_imp_le)
  66.109 -  apply (simp add: set_ext_iff)
  66.110 +  apply (simp add: set_eq_iff)
  66.111    by arith
  66.112  
  66.113  lemma cball_eq_empty: "(cball x e = {}) \<longleftrightarrow> e < 0"
  66.114 -  apply (simp add: set_ext_iff not_le)
  66.115 +  apply (simp add: set_eq_iff not_le)
  66.116    by (metis zero_le_dist dist_self order_less_le_trans)
  66.117  lemma cball_empty: "e < 0 ==> cball x e = {}" by (simp add: cball_eq_empty)
  66.118  
  66.119 @@ -1927,13 +1927,13 @@
  66.120    obtain a where "a \<noteq> x" "dist a x < e"
  66.121      using perfect_choose_dist [OF e] by auto
  66.122    hence "a \<noteq> x" "dist x a \<le> e" by (auto simp add: dist_commute)
  66.123 -  with e show ?thesis by (auto simp add: set_ext_iff)
  66.124 +  with e show ?thesis by (auto simp add: set_eq_iff)
  66.125  qed auto
  66.126  
  66.127  lemma cball_sing:
  66.128    fixes x :: "'a::metric_space"
  66.129    shows "e = 0 ==> cball x e = {x}"
  66.130 -  by (auto simp add: set_ext_iff)
  66.131 +  by (auto simp add: set_eq_iff)
  66.132  
  66.133  text{* For points in the interior, localization of limits makes no difference.   *}
  66.134  
  66.135 @@ -3904,7 +3904,7 @@
  66.136  lemma interior_translation:
  66.137    fixes s :: "'a::real_normed_vector set"
  66.138    shows "interior ((\<lambda>x. a + x) ` s) = (\<lambda>x. a + x) ` (interior s)"
  66.139 -proof (rule set_ext, rule)
  66.140 +proof (rule set_eqI, rule)
  66.141    fix x assume "x \<in> interior (op + a ` s)"
  66.142    then obtain e where "e>0" and e:"ball x e \<subseteq> op + a ` s" unfolding mem_interior by auto
  66.143    hence "ball (x - a) e \<subseteq> s" unfolding subset_eq Ball_def mem_ball dist_norm apply auto apply(erule_tac x="a + xa" in allE) unfolding ab_group_add_class.diff_diff_eq[THEN sym] by auto
  66.144 @@ -4615,12 +4615,12 @@
  66.145  lemma interval: fixes a :: "'a::ordered_euclidean_space" shows
  66.146    "{a <..< b} = {x::'a. \<forall>i<DIM('a). a$$i < x$$i \<and> x$$i < b$$i}" and
  66.147    "{a .. b} = {x::'a. \<forall>i<DIM('a). a$$i \<le> x$$i \<and> x$$i \<le> b$$i}"
  66.148 -  by(auto simp add:set_ext_iff eucl_le[where 'a='a] eucl_less[where 'a='a])
  66.149 +  by(auto simp add:set_eq_iff eucl_le[where 'a='a] eucl_less[where 'a='a])
  66.150  
  66.151  lemma mem_interval: fixes a :: "'a::ordered_euclidean_space" shows
  66.152    "x \<in> {a<..<b} \<longleftrightarrow> (\<forall>i<DIM('a). a$$i < x$$i \<and> x$$i < b$$i)"
  66.153    "x \<in> {a .. b} \<longleftrightarrow> (\<forall>i<DIM('a). a$$i \<le> x$$i \<and> x$$i \<le> b$$i)"
  66.154 -  using interval[of a b] by(auto simp add: set_ext_iff eucl_le[where 'a='a] eucl_less[where 'a='a])
  66.155 +  using interval[of a b] by(auto simp add: set_eq_iff eucl_le[where 'a='a] eucl_less[where 'a='a])
  66.156  
  66.157  lemma interval_eq_empty: fixes a :: "'a::ordered_euclidean_space" shows
  66.158   "({a <..< b} = {} \<longleftrightarrow> (\<exists>i<DIM('a). b$$i \<le> a$$i))" (is ?th1) and
  66.159 @@ -4662,7 +4662,7 @@
  66.160  
  66.161  lemma interval_sing: fixes a :: "'a::ordered_euclidean_space" shows
  66.162   "{a .. a} = {a}" "{a<..<a} = {}"
  66.163 -  apply(auto simp add: set_ext_iff euclidean_eq[where 'a='a] eucl_less[where 'a='a] eucl_le[where 'a='a])
  66.164 +  apply(auto simp add: set_eq_iff euclidean_eq[where 'a='a] eucl_less[where 'a='a] eucl_le[where 'a='a])
  66.165    apply (simp add: order_eq_iff) apply(rule_tac x=0 in exI) by (auto simp add: not_less less_imp_le)
  66.166  
  66.167  lemma subset_interval_imp: fixes a :: "'a::ordered_euclidean_space" shows
  66.168 @@ -4681,17 +4681,17 @@
  66.169    { fix i assume "i<DIM('a)"
  66.170      hence "a $$ i \<le> x $$ i"
  66.171        using x order_less_imp_le[of "a$$i" "x$$i"] 
  66.172 -      by(simp add: set_ext_iff eucl_less[where 'a='a] eucl_le[where 'a='a] euclidean_eq)
  66.173 +      by(simp add: set_eq_iff eucl_less[where 'a='a] eucl_le[where 'a='a] euclidean_eq)
  66.174    }
  66.175    moreover
  66.176    { fix i assume "i<DIM('a)"
  66.177      hence "x $$ i \<le> b $$ i"
  66.178        using x order_less_imp_le[of "x$$i" "b$$i"]
  66.179 -      by(simp add: set_ext_iff eucl_less[where 'a='a] eucl_le[where 'a='a] euclidean_eq)
  66.180 +      by(simp add: set_eq_iff eucl_less[where 'a='a] eucl_le[where 'a='a] euclidean_eq)
  66.181    }
  66.182    ultimately
  66.183    show "a \<le> x \<and> x \<le> b"
  66.184 -    by(simp add: set_ext_iff eucl_less[where 'a='a] eucl_le[where 'a='a] euclidean_eq)
  66.185 +    by(simp add: set_eq_iff eucl_less[where 'a='a] eucl_le[where 'a='a] euclidean_eq)
  66.186  qed
  66.187  
  66.188  lemma subset_interval: fixes a :: "'a::ordered_euclidean_space" shows
  66.189 @@ -4757,7 +4757,7 @@
  66.190    "{a<..<b} \<inter> {c<..<d} = {} \<longleftrightarrow> (\<exists>i<DIM('a). (b$$i \<le> a$$i \<or> d$$i \<le> c$$i \<or> b$$i \<le> c$$i \<or> d$$i \<le> a$$i))" (is ?th4)
  66.191  proof-
  66.192    let ?z = "(\<chi>\<chi> i. ((max (a$$i) (c$$i)) + (min (b$$i) (d$$i))) / 2)::'a"
  66.193 -  note * = set_ext_iff Int_iff empty_iff mem_interval all_conj_distrib[THEN sym] eq_False
  66.194 +  note * = set_eq_iff Int_iff empty_iff mem_interval all_conj_distrib[THEN sym] eq_False
  66.195    show ?th1 unfolding * apply safe apply(erule_tac x="?z" in allE)
  66.196      unfolding not_all apply(erule exE,rule_tac x=x in exI) apply(erule_tac[2-] x=i in allE) by auto
  66.197    show ?th2 unfolding * apply safe apply(erule_tac x="?z" in allE)
  66.198 @@ -4770,7 +4770,7 @@
  66.199  
  66.200  lemma inter_interval: fixes a :: "'a::ordered_euclidean_space" shows
  66.201   "{a .. b} \<inter> {c .. d} =  {(\<chi>\<chi> i. max (a$$i) (c$$i)) .. (\<chi>\<chi> i. min (b$$i) (d$$i))}"
  66.202 -  unfolding set_ext_iff and Int_iff and mem_interval
  66.203 +  unfolding set_eq_iff and Int_iff and mem_interval
  66.204    by auto
  66.205  
  66.206  (* Moved interval_open_subset_closed a bit upwards *)
  66.207 @@ -5440,7 +5440,7 @@
  66.208      then obtain x where "\<forall>n. x n \<in> s \<and> g n = f (x n)" 
  66.209        using choice[of "\<lambda> n xa. xa \<in> s \<and> g n = f xa"] by auto
  66.210      hence x:"\<forall>n. x n \<in> s"  "\<forall>n. g n = f (x n)" by auto
  66.211 -    hence "f \<circ> x = g" unfolding ext_iff by auto
  66.212 +    hence "f \<circ> x = g" unfolding fun_eq_iff by auto
  66.213      then obtain l where "l\<in>s" and l:"(x ---> l) sequentially"
  66.214        using cs[unfolded complete_def, THEN spec[where x="x"]]
  66.215        using cauchy_isometric[OF `0<e` s f normf] and cfg and x(1) by auto
    67.1 --- a/src/HOL/NSA/NatStar.thy	Mon Sep 13 08:43:48 2010 +0200
    67.2 +++ b/src/HOL/NSA/NatStar.thy	Mon Sep 13 11:13:15 2010 +0200
    67.3 @@ -115,7 +115,7 @@
    67.4    @{term real_of_nat} *}
    67.5  
    67.6  lemma starfunNat_real_of_nat: "( *f* real) = hypreal_of_hypnat"
    67.7 -by transfer (simp add: ext_iff real_of_nat_def)
    67.8 +by transfer (simp add: fun_eq_iff real_of_nat_def)
    67.9  
   67.10  lemma starfun_inverse_real_of_nat_eq:
   67.11       "N \<in> HNatInfinite
    68.1 --- a/src/HOL/NSA/Star.thy	Mon Sep 13 08:43:48 2010 +0200
    68.2 +++ b/src/HOL/NSA/Star.thy	Mon Sep 13 11:13:15 2010 +0200
    68.3 @@ -87,7 +87,7 @@
    68.4     sequence) as a special case of an internal set*}
    68.5  
    68.6  lemma starset_n_starset: "\<forall>n. (As n = A) ==> *sn* As = *s* A"
    68.7 -apply (drule ext_iff [THEN iffD2])
    68.8 +apply (drule fun_eq_iff [THEN iffD2])
    68.9  apply (simp add: starset_n_def starset_def star_of_def)
   68.10  done
   68.11  
   68.12 @@ -102,7 +102,7 @@
   68.13  (*----------------------------------------------------------------*)
   68.14  
   68.15  lemma starfun_n_starfun: "\<forall>n. (F n = f) ==> *fn* F = *f* f"
   68.16 -apply (drule ext_iff [THEN iffD2])
   68.17 +apply (drule fun_eq_iff [THEN iffD2])
   68.18  apply (simp add: starfun_n_def starfun_def star_of_def)
   68.19  done
   68.20  
    69.1 --- a/src/HOL/NSA/StarDef.thy	Mon Sep 13 08:43:48 2010 +0200
    69.2 +++ b/src/HOL/NSA/StarDef.thy	Mon Sep 13 11:13:15 2010 +0200
    69.3 @@ -145,7 +145,7 @@
    69.4    "\<lbrakk>\<And>X. f (star_n X) = g (star_n X) 
    69.5      \<equiv> {n. F n (X n) = G n (X n)} \<in> \<U>\<rbrakk>
    69.6        \<Longrightarrow> f = g \<equiv> {n. F n = G n} \<in> \<U>"
    69.7 -by (simp only: ext_iff transfer_all)
    69.8 +by (simp only: fun_eq_iff transfer_all)
    69.9  
   69.10  lemma transfer_star_n [transfer_intro]: "star_n X \<equiv> star_n (\<lambda>n. X n)"
   69.11  by (rule reflexive)
   69.12 @@ -351,12 +351,12 @@
   69.13  lemma transfer_Collect [transfer_intro]:
   69.14    "\<lbrakk>\<And>X. p (star_n X) \<equiv> {n. P n (X n)} \<in> \<U>\<rbrakk>
   69.15      \<Longrightarrow> Collect p \<equiv> Iset (star_n (\<lambda>n. Collect (P n)))"
   69.16 -by (simp add: atomize_eq set_ext_iff all_star_eq Iset_star_n)
   69.17 +by (simp add: atomize_eq set_eq_iff all_star_eq Iset_star_n)
   69.18  
   69.19  lemma transfer_set_eq [transfer_intro]:
   69.20    "\<lbrakk>a \<equiv> Iset (star_n A); b \<equiv> Iset (star_n B)\<rbrakk>
   69.21      \<Longrightarrow> a = b \<equiv> {n. A n = B n} \<in> \<U>"
   69.22 -by (simp only: set_ext_iff transfer_all transfer_iff transfer_mem)
   69.23 +by (simp only: set_eq_iff transfer_all transfer_iff transfer_mem)
   69.24  
   69.25  lemma transfer_ball [transfer_intro]:
   69.26    "\<lbrakk>a \<equiv> Iset (star_n A); \<And>X. p (star_n X) \<equiv> {n. P n (X n)} \<in> \<U>\<rbrakk>
    70.1 --- a/src/HOL/Nat.thy	Mon Sep 13 08:43:48 2010 +0200
    70.2 +++ b/src/HOL/Nat.thy	Mon Sep 13 11:13:15 2010 +0200
    70.3 @@ -1360,7 +1360,7 @@
    70.4    by (induct n) simp_all
    70.5  
    70.6  lemma of_nat_eq_id [simp]: "of_nat = id"
    70.7 -  by (auto simp add: ext_iff)
    70.8 +  by (auto simp add: fun_eq_iff)
    70.9  
   70.10  
   70.11  subsection {* The Set of Natural Numbers *}
    71.1 --- a/src/HOL/Nat_Transfer.thy	Mon Sep 13 08:43:48 2010 +0200
    71.2 +++ b/src/HOL/Nat_Transfer.thy	Mon Sep 13 11:13:15 2010 +0200
    71.3 @@ -170,7 +170,7 @@
    71.4    apply (rule iffI)
    71.5    apply (erule finite_imageI)
    71.6    apply (erule finite_imageD)
    71.7 -  apply (auto simp add: image_def set_ext_iff inj_on_def)
    71.8 +  apply (auto simp add: image_def set_eq_iff inj_on_def)
    71.9    apply (drule_tac x = "int x" in spec, auto)
   71.10    apply (drule_tac x = "int x" in spec, auto)
   71.11    apply (drule_tac x = "int x" in spec, auto)
    72.1 --- a/src/HOL/Nitpick.thy	Mon Sep 13 08:43:48 2010 +0200
    72.2 +++ b/src/HOL/Nitpick.thy	Mon Sep 13 11:13:15 2010 +0200
    72.3 @@ -58,7 +58,7 @@
    72.4  lemma Ex1_def [nitpick_def, no_atp]:
    72.5  "Ex1 P \<equiv> \<exists>x. P = {x}"
    72.6  apply (rule eq_reflection)
    72.7 -apply (simp add: Ex1_def set_ext_iff)
    72.8 +apply (simp add: Ex1_def set_eq_iff)
    72.9  apply (rule iffI)
   72.10   apply (erule exE)
   72.11   apply (erule conjE)
    73.1 --- a/src/HOL/Nitpick_Examples/Manual_Nits.thy	Mon Sep 13 08:43:48 2010 +0200
    73.2 +++ b/src/HOL/Nitpick_Examples/Manual_Nits.thy	Mon Sep 13 11:13:15 2010 +0200
    73.3 @@ -110,7 +110,7 @@
    73.4  "my_int_rel (x, y) (u, v) = (x + v = u + y)"
    73.5  
    73.6  quotient_type my_int = "nat \<times> nat" / my_int_rel
    73.7 -by (auto simp add: equivp_def ext_iff)
    73.8 +by (auto simp add: equivp_def fun_eq_iff)
    73.9  
   73.10  definition add_raw where
   73.11  "add_raw \<equiv> \<lambda>(x, y) (u, v). (x + (u\<Colon>nat), y + (v\<Colon>nat))"
    74.1 --- a/src/HOL/Nominal/Examples/Class1.thy	Mon Sep 13 08:43:48 2010 +0200
    74.2 +++ b/src/HOL/Nominal/Examples/Class1.thy	Mon Sep 13 11:13:15 2010 +0200
    74.3 @@ -2167,7 +2167,7 @@
    74.4  apply(auto simp add: fresh_left calc_atm forget)
    74.5  apply(generate_fresh "coname")
    74.6  apply(rule_tac f="fresh_fun" in arg_cong)
    74.7 -apply(simp add:  ext_iff)
    74.8 +apply(simp add:  fun_eq_iff)
    74.9  apply(rule allI)
   74.10  apply(simp add: trm.inject alpha fresh_prod fresh_atm)
   74.11  apply(perm_simp add: trm.inject alpha fresh_prod fresh_atm fresh_left, auto)
   74.12 @@ -2183,7 +2183,7 @@
   74.13  apply(auto simp add: fresh_left calc_atm forget)
   74.14  apply(generate_fresh "name")
   74.15  apply(rule_tac f="fresh_fun" in arg_cong)
   74.16 -apply(simp add:  ext_iff)
   74.17 +apply(simp add:  fun_eq_iff)
   74.18  apply(rule allI)
   74.19  apply(simp add: trm.inject alpha fresh_prod fresh_atm)
   74.20  apply(perm_simp add: trm.inject alpha fresh_prod fresh_atm fresh_left, auto)
   74.21 @@ -2199,13 +2199,13 @@
   74.22  apply(auto simp add: fresh_left calc_atm forget abs_fresh)[1]
   74.23  apply(generate_fresh "name")
   74.24  apply(rule_tac f="fresh_fun" in arg_cong)
   74.25 -apply(simp add:  ext_iff)
   74.26 +apply(simp add:  fun_eq_iff)
   74.27  apply(rule allI)
   74.28  apply(simp add: trm.inject alpha fresh_prod fresh_atm)
   74.29  apply(rule forget)
   74.30  apply(simp add: fresh_left calc_atm)
   74.31  apply(rule_tac f="fresh_fun" in arg_cong)
   74.32 -apply(simp add:  ext_iff)
   74.33 +apply(simp add:  fun_eq_iff)
   74.34  apply(rule allI)
   74.35  apply(simp add: trm.inject alpha fresh_prod fresh_atm)
   74.36  apply(rule forget)
   74.37 @@ -2224,13 +2224,13 @@
   74.38  apply(auto simp add: fresh_left calc_atm forget abs_fresh)[1]
   74.39  apply(generate_fresh "name")
   74.40  apply(rule_tac f="fresh_fun" in arg_cong)
   74.41 -apply(simp add:  ext_iff)
   74.42 +apply(simp add:  fun_eq_iff)
   74.43  apply(rule allI)
   74.44  apply(simp add: trm.inject alpha fresh_prod fresh_atm)
   74.45  apply(rule forget)
   74.46  apply(simp add: fresh_left calc_atm)
   74.47  apply(rule_tac f="fresh_fun" in arg_cong)
   74.48 -apply(simp add:  ext_iff)
   74.49 +apply(simp add:  fun_eq_iff)
   74.50  apply(rule allI)
   74.51  apply(simp add: trm.inject alpha fresh_prod fresh_atm)
   74.52  apply(rule forget)
   74.53 @@ -2255,7 +2255,7 @@
   74.54  apply(auto simp add: fresh_prod fresh_atm)[1]
   74.55  apply(simp)
   74.56  apply(rule_tac f="fresh_fun" in arg_cong)
   74.57 -apply(simp add:  ext_iff)
   74.58 +apply(simp add:  fun_eq_iff)
   74.59  apply(rule allI)
   74.60  apply(simp add: trm.inject alpha fresh_prod fresh_atm)
   74.61  apply(rule conjI)
   74.62 @@ -2283,7 +2283,7 @@
   74.63  apply(auto simp add: fresh_prod fresh_atm)[1]
   74.64  apply(simp)
   74.65  apply(rule_tac f="fresh_fun" in arg_cong)
   74.66 -apply(simp add:  ext_iff)
   74.67 +apply(simp add:  fun_eq_iff)
   74.68  apply(rule allI)
   74.69  apply(simp add: trm.inject alpha fresh_prod fresh_atm)
   74.70  apply(rule conjI)
   74.71 @@ -2304,13 +2304,13 @@
   74.72  apply(subgoal_tac "OrR1 <a>.M d = OrR1 <c>.([(c,a)]\<bullet>M) d")
   74.73  apply(auto simp add: fresh_left calc_atm forget abs_fresh)[1]
   74.74  apply(rule_tac f="fresh_fun" in arg_cong)
   74.75 -apply(simp add:  ext_iff)
   74.76 +apply(simp add:  fun_eq_iff)
   74.77  apply(rule allI)
   74.78  apply(simp add: trm.inject alpha fresh_prod fresh_atm)
   74.79  apply(rule forget)
   74.80  apply(simp add: fresh_left calc_atm)
   74.81  apply(rule_tac f="fresh_fun" in arg_cong)
   74.82 -apply(simp add:  ext_iff)
   74.83 +apply(simp add:  fun_eq_iff)
   74.84  apply(rule allI)
   74.85  apply(simp add: trm.inject alpha fresh_prod fresh_atm)
   74.86  apply(rule forget)
   74.87 @@ -2328,13 +2328,13 @@
   74.88  apply(subgoal_tac "OrR2 <a>.M d = OrR2 <c>.([(c,a)]\<bullet>M) d")
   74.89  apply(auto simp add: fresh_left calc_atm forget abs_fresh)[1]
   74.90  apply(rule_tac f="fresh_fun" in arg_cong)
   74.91 -apply(simp add:  ext_iff)
   74.92 +apply(simp add:  fun_eq_iff)
   74.93  apply(rule allI)
   74.94  apply(simp add: trm.inject alpha fresh_prod fresh_atm)
   74.95  apply(rule forget)
   74.96  apply(simp add: fresh_left calc_atm)
   74.97  apply(rule_tac f="fresh_fun" in arg_cong)
   74.98 -apply(simp add:  ext_iff)
   74.99 +apply(simp add:  fun_eq_iff)
  74.100  apply(rule allI)
  74.101  apply(simp add: trm.inject alpha fresh_prod fresh_atm)
  74.102  apply(rule forget)
  74.103 @@ -2353,13 +2353,13 @@
  74.104  apply(subgoal_tac "ImpR (x).<a>.M d = ImpR (ca).<c>.([(c,a)]\<bullet>[(ca,x)]\<bullet>M) d")
  74.105  apply(auto simp add: fresh_left calc_atm forget abs_fresh)[1]
  74.106  apply(rule_tac f="fresh_fun" in arg_cong)
  74.107 -apply(simp add:  ext_iff)
  74.108 +apply(simp add:  fun_eq_iff)
  74.109  apply(rule allI)
  74.110  apply(simp add: trm.inject alpha fresh_prod fresh_atm abs_perm abs_fresh fresh_left calc_atm)
  74.111  apply(rule forget)
  74.112  apply(simp add: fresh_left calc_atm)
  74.113  apply(rule_tac f="fresh_fun" in arg_cong)
  74.114 -apply(simp add:  ext_iff)
  74.115 +apply(simp add:  fun_eq_iff)
  74.116  apply(rule allI)
  74.117  apply(simp add: trm.inject alpha fresh_prod fresh_atm abs_perm fresh_left calc_atm abs_fresh)
  74.118  apply(rule forget)
  74.119 @@ -2378,7 +2378,7 @@
  74.120  apply(subgoal_tac "ImpL <a>.M (x).N y = ImpL <ca>.([(ca,a)]\<bullet>M) (caa).([(caa,x)]\<bullet>N) y")
  74.121  apply(auto simp add: fresh_left calc_atm forget abs_fresh)[1]
  74.122  apply(rule_tac f="fresh_fun" in arg_cong)
  74.123 -apply(simp add:  ext_iff)
  74.124 +apply(simp add:  fun_eq_iff)
  74.125  apply(rule allI)
  74.126  apply(simp add: trm.inject alpha fresh_prod fresh_atm abs_perm abs_fresh fresh_left calc_atm)
  74.127  apply(rule forget)
    75.1 --- a/src/HOL/Nominal/Nominal.thy	Mon Sep 13 08:43:48 2010 +0200
    75.2 +++ b/src/HOL/Nominal/Nominal.thy	Mon Sep 13 11:13:15 2010 +0200
    75.3 @@ -148,11 +148,11 @@
    75.4  (* permutation on sets *)
    75.5  lemma empty_eqvt:
    75.6    shows "pi\<bullet>{} = {}"
    75.7 -  by (simp add: perm_fun_def perm_bool empty_iff [unfolded mem_def] ext_iff)
    75.8 +  by (simp add: perm_fun_def perm_bool empty_iff [unfolded mem_def] fun_eq_iff)
    75.9  
   75.10  lemma union_eqvt:
   75.11    shows "(pi\<bullet>(X\<union>Y)) = (pi\<bullet>X) \<union> (pi\<bullet>Y)"
   75.12 -  by (simp add: perm_fun_def perm_bool Un_iff [unfolded mem_def] ext_iff)
   75.13 +  by (simp add: perm_fun_def perm_bool Un_iff [unfolded mem_def] fun_eq_iff)
   75.14  
   75.15  (* permutations on products *)
   75.16  lemma fst_eqvt:
   75.17 @@ -2069,7 +2069,7 @@
   75.18    show "?LHS"
   75.19    proof (rule ccontr)
   75.20      assume "(pi\<bullet>f) \<noteq> f"
   75.21 -    hence "\<exists>x. (pi\<bullet>f) x \<noteq> f x" by (simp add: ext_iff)
   75.22 +    hence "\<exists>x. (pi\<bullet>f) x \<noteq> f x" by (simp add: fun_eq_iff)
   75.23      then obtain x where b1: "(pi\<bullet>f) x \<noteq> f x" by force
   75.24      from b have "pi\<bullet>(f ((rev pi)\<bullet>x)) = f (pi\<bullet>((rev pi)\<bullet>x))" by force
   75.25      hence "(pi\<bullet>f)(pi\<bullet>((rev pi)\<bullet>x)) = f (pi\<bullet>((rev pi)\<bullet>x))" 
   75.26 @@ -2763,7 +2763,7 @@
   75.27    and     at: "at TYPE ('x)"
   75.28    shows "cp TYPE ('a\<Rightarrow>'b) TYPE('x) TYPE('y)"
   75.29  using c1 c2
   75.30 -apply(auto simp add: cp_def perm_fun_def ext_iff)
   75.31 +apply(auto simp add: cp_def perm_fun_def fun_eq_iff)
   75.32  apply(simp add: rev_eqvt[symmetric])
   75.33  apply(simp add: pt_rev_pi[OF pt_list_inst[OF pt_prod_inst[OF pt, OF pt]], OF at])
   75.34  done
   75.35 @@ -2988,7 +2988,7 @@
   75.36    and     cp:  "cp TYPE('a) TYPE('x) TYPE('y)"
   75.37    shows "pi\<bullet>([a].x) = [(pi\<bullet>a)].(pi\<bullet>x)"
   75.38    apply(simp add: abs_fun_def perm_fun_def abs_fun_if)
   75.39 -  apply(simp only: ext_iff)
   75.40 +  apply(simp only: fun_eq_iff)
   75.41    apply(rule allI)
   75.42    apply(subgoal_tac "(((rev pi)\<bullet>(xa::'y)) = (a::'y)) = (xa = pi\<bullet>a)")(*A*)
   75.43    apply(subgoal_tac "(((rev pi)\<bullet>xa)\<sharp>x) = (xa\<sharp>(pi\<bullet>x))")(*B*)
   75.44 @@ -3029,7 +3029,7 @@
   75.45    and   a  :: "'x"
   75.46    shows "([a].x = [a].y) = (x = y)"
   75.47  apply(auto simp add: abs_fun_def)
   75.48 -apply(auto simp add: ext_iff)
   75.49 +apply(auto simp add: fun_eq_iff)
   75.50  apply(drule_tac x="a" in spec)
   75.51  apply(simp)
   75.52  done
   75.53 @@ -3045,7 +3045,7 @@
   75.54        and a2: "[a].x = [b].y" 
   75.55    shows "x=[(a,b)]\<bullet>y \<and> a\<sharp>y"
   75.56  proof -
   75.57 -  from a2 have "\<forall>c::'x. ([a].x) c = ([b].y) c" by (force simp add: ext_iff)
   75.58 +  from a2 have "\<forall>c::'x. ([a].x) c = ([b].y) c" by (force simp add: fun_eq_iff)
   75.59    hence "([a].x) a = ([b].y) a" by simp
   75.60    hence a3: "nSome(x) = ([b].y) a" by (simp add: abs_fun_def)
   75.61    show "x=[(a,b)]\<bullet>y \<and> a\<sharp>y"
   75.62 @@ -3076,7 +3076,7 @@
   75.63    shows "[a].x =[b].y"
   75.64  proof -
   75.65    show ?thesis 
   75.66 -  proof (simp only: abs_fun_def ext_iff, intro strip)
   75.67 +  proof (simp only: abs_fun_def fun_eq_iff, intro strip)
   75.68      fix c::"'x"
   75.69      let ?LHS = "if c=a then nSome(x) else if c\<sharp>x then nSome([(a,c)]\<bullet>x) else nNone"
   75.70      and ?RHS = "if c=b then nSome(y) else if c\<sharp>y then nSome([(b,c)]\<bullet>y) else nNone"
    76.1 --- a/src/HOL/Number_Theory/UniqueFactorization.thy	Mon Sep 13 08:43:48 2010 +0200
    76.2 +++ b/src/HOL/Number_Theory/UniqueFactorization.thy	Mon Sep 13 11:13:15 2010 +0200
    76.3 @@ -213,7 +213,7 @@
    76.4      ultimately have "count M a = count N a"
    76.5        by auto
    76.6    }
    76.7 -  thus ?thesis by (simp add:multiset_ext_iff)
    76.8 +  thus ?thesis by (simp add:multiset_eq_iff)
    76.9  qed
   76.10  
   76.11  definition multiset_prime_factorization :: "nat => nat multiset" where
    77.1 --- a/src/HOL/Predicate.thy	Mon Sep 13 08:43:48 2010 +0200
    77.2 +++ b/src/HOL/Predicate.thy	Mon Sep 13 11:13:15 2010 +0200
    77.3 @@ -72,7 +72,7 @@
    77.4    by (simp add: mem_def)
    77.5  
    77.6  lemma pred_equals_eq2 [pred_set_conv]: "((\<lambda>x y. (x, y) \<in> R) = (\<lambda>x y. (x, y) \<in> S)) = (R = S)"
    77.7 -  by (simp add: ext_iff mem_def)
    77.8 +  by (simp add: fun_eq_iff mem_def)
    77.9  
   77.10  
   77.11  subsubsection {* Order relation *}
   77.12 @@ -99,10 +99,10 @@
   77.13    by (simp add: bot_fun_eq bot_bool_eq)
   77.14  
   77.15  lemma bot_empty_eq: "bot = (\<lambda>x. x \<in> {})"
   77.16 -  by (auto simp add: ext_iff)
   77.17 +  by (auto simp add: fun_eq_iff)
   77.18  
   77.19  lemma bot_empty_eq2: "bot = (\<lambda>x y. (x, y) \<in> {})"
   77.20 -  by (auto simp add: ext_iff)
   77.21 +  by (auto simp add: fun_eq_iff)
   77.22  
   77.23  
   77.24  subsubsection {* Binary union *}
   77.25 @@ -197,10 +197,10 @@
   77.26    by (auto simp add: SUP2_iff)
   77.27  
   77.28  lemma SUP_UN_eq: "(SUP i. (\<lambda>x. x \<in> r i)) = (\<lambda>x. x \<in> (UN i. r i))"
   77.29 -  by (simp add: SUP1_iff ext_iff)
   77.30 +  by (simp add: SUP1_iff fun_eq_iff)
   77.31  
   77.32  lemma SUP_UN_eq2: "(SUP i. (\<lambda>x y. (x, y) \<in> r i)) = (\<lambda>x y. (x, y) \<in> (UN i. r i))"
   77.33 -  by (simp add: SUP2_iff ext_iff)
   77.34 +  by (simp add: SUP2_iff fun_eq_iff)
   77.35  
   77.36  
   77.37  subsubsection {* Intersections of families *}
   77.38 @@ -230,10 +230,10 @@
   77.39    by (auto simp add: INF2_iff)
   77.40  
   77.41  lemma INF_INT_eq: "(INF i. (\<lambda>x. x \<in> r i)) = (\<lambda>x. x \<in> (INT i. r i))"
   77.42 -  by (simp add: INF1_iff ext_iff)
   77.43 +  by (simp add: INF1_iff fun_eq_iff)
   77.44  
   77.45  lemma INF_INT_eq2: "(INF i. (\<lambda>x y. (x, y) \<in> r i)) = (\<lambda>x y. (x, y) \<in> (INT i. r i))"
   77.46 -  by (simp add: INF2_iff ext_iff)
   77.47 +  by (simp add: INF2_iff fun_eq_iff)
   77.48  
   77.49  
   77.50  subsection {* Predicates as relations *}
   77.51 @@ -251,7 +251,7 @@
   77.52  
   77.53  lemma pred_comp_rel_comp_eq [pred_set_conv]:
   77.54    "((\<lambda>x y. (x, y) \<in> r) OO (\<lambda>x y. (x, y) \<in> s)) = (\<lambda>x y. (x, y) \<in> r O s)"
   77.55 -  by (auto simp add: ext_iff elim: pred_compE)
   77.56 +  by (auto simp add: fun_eq_iff elim: pred_compE)
   77.57  
   77.58  
   77.59  subsubsection {* Converse *}
   77.60 @@ -276,7 +276,7 @@
   77.61  
   77.62  lemma conversep_converse_eq [pred_set_conv]:
   77.63    "(\<lambda>x y. (x, y) \<in> r)^--1 = (\<lambda>x y. (x, y) \<in> r^-1)"
   77.64 -  by (auto simp add: ext_iff)
   77.65 +  by (auto simp add: fun_eq_iff)
   77.66  
   77.67  lemma conversep_conversep [simp]: "(r^--1)^--1 = r"
   77.68    by (iprover intro: order_antisym conversepI dest: conversepD)
   77.69 @@ -294,10 +294,10 @@
   77.70      (iprover intro: conversepI ext dest: conversepD)
   77.71  
   77.72  lemma conversep_noteq [simp]: "(op ~=)^--1 = op ~="
   77.73 -  by (auto simp add: ext_iff)
   77.74 +  by (auto simp add: fun_eq_iff)
   77.75  
   77.76  lemma conversep_eq [simp]: "(op =)^--1 = op ="
   77.77 -  by (auto simp add: ext_iff)
   77.78 +  by (auto simp add: fun_eq_iff)
   77.79  
   77.80  
   77.81  subsubsection {* Domain *}
   77.82 @@ -347,7 +347,7 @@
   77.83    "Powp A == \<lambda>B. \<forall>x \<in> B. A x"
   77.84  
   77.85  lemma Powp_Pow_eq [pred_set_conv]: "Powp (\<lambda>x. x \<in> A) = (\<lambda>x. x \<in> Pow A)"
   77.86 -  by (auto simp add: Powp_def ext_iff)
   77.87 +  by (auto simp add: Powp_def fun_eq_iff)
   77.88  
   77.89  lemmas Powp_mono [mono] = Pow_mono [to_pred pred_subset_eq]
   77.90  
   77.91 @@ -430,7 +430,7 @@
   77.92  
   77.93  lemma bind_bind:
   77.94    "(P \<guillemotright>= Q) \<guillemotright>= R = P \<guillemotright>= (\<lambda>x. Q x \<guillemotright>= R)"
   77.95 -  by (auto simp add: bind_def ext_iff)
   77.96 +  by (auto simp add: bind_def fun_eq_iff)
   77.97  
   77.98  lemma bind_single:
   77.99    "P \<guillemotright>= single = P"
  77.100 @@ -442,14 +442,14 @@
  77.101  
  77.102  lemma bottom_bind:
  77.103    "\<bottom> \<guillemotright>= P = \<bottom>"
  77.104 -  by (auto simp add: bot_pred_def bind_def ext_iff)
  77.105 +  by (auto simp add: bot_pred_def bind_def fun_eq_iff)
  77.106  
  77.107  lemma sup_bind:
  77.108    "(P \<squnion> Q) \<guillemotright>= R = P \<guillemotright>= R \<squnion> Q \<guillemotright>= R"
  77.109 -  by (auto simp add: bind_def sup_pred_def ext_iff)
  77.110 +  by (auto simp add: bind_def sup_pred_def fun_eq_iff)
  77.111  
  77.112  lemma Sup_bind: "(\<Squnion>A \<guillemotright>= f) = \<Squnion>((\<lambda>x. x \<guillemotright>= f) ` A)"
  77.113 -  by (auto simp add: bind_def Sup_pred_def SUP1_iff ext_iff)
  77.114 +  by (auto simp add: bind_def Sup_pred_def SUP1_iff fun_eq_iff)
  77.115  
  77.116  lemma pred_iffI:
  77.117    assumes "\<And>x. eval A x \<Longrightarrow> eval B x"
  77.118 @@ -457,7 +457,7 @@
  77.119    shows "A = B"
  77.120  proof -
  77.121    from assms have "\<And>x. eval A x \<longleftrightarrow> eval B x" by blast
  77.122 -  then show ?thesis by (cases A, cases B) (simp add: ext_iff)
  77.123 +  then show ?thesis by (cases A, cases B) (simp add: fun_eq_iff)
  77.124  qed
  77.125    
  77.126  lemma singleI: "eval (single x) x"
  77.127 @@ -492,7 +492,7 @@
  77.128  
  77.129  lemma single_not_bot [simp]:
  77.130    "single x \<noteq> \<bottom>"
  77.131 -  by (auto simp add: single_def bot_pred_def ext_iff)
  77.132 +  by (auto simp add: single_def bot_pred_def fun_eq_iff)
  77.133  
  77.134  lemma not_bot:
  77.135    assumes "A \<noteq> \<bottom>"
  77.136 @@ -512,7 +512,7 @@
  77.137  
  77.138  lemma not_is_empty_single:
  77.139    "\<not> is_empty (single x)"
  77.140 -  by (auto simp add: is_empty_def single_def bot_pred_def ext_iff)
  77.141 +  by (auto simp add: is_empty_def single_def bot_pred_def fun_eq_iff)
  77.142  
  77.143  lemma is_empty_sup:
  77.144    "is_empty (A \<squnion> B) \<longleftrightarrow> is_empty A \<and> is_empty B"
  77.145 @@ -543,7 +543,7 @@
  77.146    moreover from assm have "\<And>x. eval A x \<Longrightarrow> singleton dfault A = x"
  77.147      by (rule singleton_eqI)
  77.148    ultimately have "eval (single (singleton dfault A)) = eval A"
  77.149 -    by (simp (no_asm_use) add: single_def ext_iff) blast
  77.150 +    by (simp (no_asm_use) add: single_def fun_eq_iff) blast
  77.151    then show ?thesis by (simp add: eval_inject)
  77.152  qed
  77.153  
  77.154 @@ -714,13 +714,13 @@
  77.155    "member xq = eval (pred_of_seq xq)"
  77.156  proof (induct xq)
  77.157    case Empty show ?case
  77.158 -  by (auto simp add: ext_iff elim: botE)
  77.159 +  by (auto simp add: fun_eq_iff elim: botE)
  77.160  next
  77.161    case Insert show ?case
  77.162 -  by (auto simp add: ext_iff elim: supE singleE intro: supI1 supI2 singleI)
  77.163 +  by (auto simp add: fun_eq_iff elim: supE singleE intro: supI1 supI2 singleI)
  77.164  next
  77.165    case Join then show ?case
  77.166 -  by (auto simp add: ext_iff elim: supE intro: supI1 supI2)
  77.167 +  by (auto simp add: fun_eq_iff elim: supE intro: supI1 supI2)
  77.168  qed
  77.169  
  77.170  lemma eval_code [code]: "eval (Seq f) = member (f ())"
    78.1 --- a/src/HOL/Predicate_Compile_Examples/Hotel_Example.thy	Mon Sep 13 08:43:48 2010 +0200
    78.2 +++ b/src/HOL/Predicate_Compile_Examples/Hotel_Example.thy	Mon Sep 13 11:13:15 2010 +0200
    78.3 @@ -79,10 +79,10 @@
    78.4  declare Let_def[code_pred_inline]
    78.5  
    78.6  lemma [code_pred_inline]: "insert == (%y A x. y = x | A x)"
    78.7 -by (auto simp add: insert_iff[unfolded mem_def] ext_iff intro!: eq_reflection)
    78.8 +by (auto simp add: insert_iff[unfolded mem_def] fun_eq_iff intro!: eq_reflection)
    78.9  
   78.10  lemma [code_pred_inline]: "(op -) == (%A B x. A x \<and> \<not> B x)"
   78.11 -by (auto simp add: Diff_iff[unfolded mem_def] ext_iff intro!: eq_reflection)
   78.12 +by (auto simp add: Diff_iff[unfolded mem_def] fun_eq_iff intro!: eq_reflection)
   78.13  
   78.14  setup {* Code_Prolog.map_code_options (K
   78.15    {ensure_groundness = true,
    79.1 --- a/src/HOL/Predicate_Compile_Examples/Specialisation_Examples.thy	Mon Sep 13 08:43:48 2010 +0200
    79.2 +++ b/src/HOL/Predicate_Compile_Examples/Specialisation_Examples.thy	Mon Sep 13 11:13:15 2010 +0200
    79.3 @@ -31,7 +31,7 @@
    79.4  
    79.5  lemma [code_pred_inline]:
    79.6    "max = max_nat"
    79.7 -by (simp add: ext_iff max_def max_nat_def)
    79.8 +by (simp add: fun_eq_iff max_def max_nat_def)
    79.9  
   79.10  definition
   79.11    "max_of_my_Suc x = max x (Suc x)"
    80.1 --- a/src/HOL/Probability/Borel.thy	Mon Sep 13 08:43:48 2010 +0200
    80.2 +++ b/src/HOL/Probability/Borel.thy	Mon Sep 13 11:13:15 2010 +0200
    80.3 @@ -1031,7 +1031,7 @@
    80.4    have "f -` {\<omega>} \<inter> space M = {x\<in>space M. f x = \<omega>}" by auto
    80.5    with * have **: "{x\<in>space M. f x = \<omega>} \<in> sets M" by simp
    80.6    have f: "f = (\<lambda>x. if f x = \<omega> then \<omega> else Real (real (f x)))"
    80.7 -    by (simp add: ext_iff Real_real)
    80.8 +    by (simp add: fun_eq_iff Real_real)
    80.9    show "f \<in> borel_measurable M"
   80.10      apply (subst f)
   80.11      apply (rule measurable_If)
   80.12 @@ -1264,7 +1264,7 @@
   80.13  proof -
   80.14    have *: "(\<lambda>x. f x + g x) =
   80.15       (\<lambda>x. if f x = \<omega> then \<omega> else if g x = \<omega> then \<omega> else Real (real (f x) + real (g x)))"
   80.16 -     by (auto simp: ext_iff pinfreal_noteq_omega_Ex)
   80.17 +     by (auto simp: fun_eq_iff pinfreal_noteq_omega_Ex)
   80.18    show ?thesis using assms unfolding *
   80.19      by (auto intro!: measurable_If)
   80.20  qed
   80.21 @@ -1276,7 +1276,7 @@
   80.22    have *: "(\<lambda>x. f x * g x) =
   80.23       (\<lambda>x. if f x = 0 then 0 else if g x = 0 then 0 else if f x = \<omega> then \<omega> else if g x = \<omega> then \<omega> else
   80.24        Real (real (f x) * real (g x)))"
   80.25 -     by (auto simp: ext_iff pinfreal_noteq_omega_Ex)
   80.26 +     by (auto simp: fun_eq_iff pinfreal_noteq_omega_Ex)
   80.27    show ?thesis using assms unfolding *
   80.28      by (auto intro!: measurable_If)
   80.29  qed
    81.1 --- a/src/HOL/Probability/Euclidean_Lebesgue.thy	Mon Sep 13 08:43:48 2010 +0200
    81.2 +++ b/src/HOL/Probability/Euclidean_Lebesgue.thy	Mon Sep 13 11:13:15 2010 +0200
    81.3 @@ -104,7 +104,7 @@
    81.4    from positive_integral_isoton[unfolded isoton_fun_expand isoton_iff_Lim_mono, of f u]
    81.5    show ?ilim using mono lim i by auto
    81.6    have "(SUP i. f i) = u" using mono lim SUP_Lim_pinfreal
    81.7 -    unfolding ext_iff SUPR_fun_expand mono_def by auto
    81.8 +    unfolding fun_eq_iff SUPR_fun_expand mono_def by auto
    81.9    moreover have "(SUP i. f i) \<in> borel_measurable M"
   81.10      using i by (rule borel_measurable_SUP)
   81.11    ultimately show "u \<in> borel_measurable M" by simp
    82.1 --- a/src/HOL/Probability/Information.thy	Mon Sep 13 08:43:48 2010 +0200
    82.2 +++ b/src/HOL/Probability/Information.thy	Mon Sep 13 11:13:15 2010 +0200
    82.3 @@ -505,7 +505,7 @@
    82.4      by auto
    82.5    also have "\<dots> = log b (\<Sum>x\<in>X`space M. if ?d x \<noteq> 0 then 1 else 0)"
    82.6      apply (rule arg_cong[where f="\<lambda>f. log b (\<Sum>x\<in>X`space M. f x)"])
    82.7 -    using distribution_finite[of X] by (auto simp: ext_iff real_of_pinfreal_eq_0)
    82.8 +    using distribution_finite[of X] by (auto simp: fun_eq_iff real_of_pinfreal_eq_0)
    82.9    finally show ?thesis
   82.10      using finite_space by (auto simp: setsum_cases real_eq_of_nat)
   82.11  qed
   82.12 @@ -645,7 +645,7 @@
   82.13    let "?dZ A" = "real (distribution Z A)"
   82.14    let ?M = "X ` space M \<times> Y ` space M \<times> Z ` space M"
   82.15  
   82.16 -  have split_beta: "\<And>f. split f = (\<lambda>x. f (fst x) (snd x))" by (simp add: ext_iff)
   82.17 +  have split_beta: "\<And>f. split f = (\<lambda>x. f (fst x) (snd x))" by (simp add: fun_eq_iff)
   82.18  
   82.19    have "- (\<Sum>(x, y, z) \<in> ?M. ?dXYZ {(x, y, z)} *
   82.20      log b (?dXYZ {(x, y, z)} / (?dXZ {(x, z)} * ?dYZ {(y,z)} / ?dZ {z})))
    83.1 --- a/src/HOL/Probability/Lebesgue_Integration.thy	Mon Sep 13 08:43:48 2010 +0200
    83.2 +++ b/src/HOL/Probability/Lebesgue_Integration.thy	Mon Sep 13 11:13:15 2010 +0200
    83.3 @@ -1106,7 +1106,7 @@
    83.4      by (rule positive_integral_isoton)
    83.5         (auto intro!: borel_measurable_pinfreal_setsum assms positive_integral_mono
    83.6                       arg_cong[where f=Sup]
    83.7 -             simp: isoton_def le_fun_def psuminf_def ext_iff SUPR_def Sup_fun_def)
    83.8 +             simp: isoton_def le_fun_def psuminf_def fun_eq_iff SUPR_def Sup_fun_def)
    83.9    thus ?thesis
   83.10      by (auto simp: isoton_def psuminf_def positive_integral_setsum[OF assms])
   83.11  qed
   83.12 @@ -1365,7 +1365,7 @@
   83.13      then have *: "(\<lambda>x. g x * indicator A x) = g"
   83.14        "\<And>x. g x * indicator A x = g x"
   83.15        "\<And>x. g x \<le> f x"
   83.16 -      by (auto simp: le_fun_def ext_iff indicator_def split: split_if_asm)
   83.17 +      by (auto simp: le_fun_def fun_eq_iff indicator_def split: split_if_asm)
   83.18      from g show "\<exists>x. simple_function (\<lambda>xa. x xa * indicator A xa) \<and> x \<le> f \<and> (\<forall>xa\<in>A. \<omega> \<noteq> x xa) \<and>
   83.19        simple_integral g = simple_integral (\<lambda>xa. x xa * indicator A xa)"
   83.20        using `A \<in> sets M`[THEN sets_into_space]
    84.1 --- a/src/HOL/Probability/Positive_Infinite_Real.thy	Mon Sep 13 08:43:48 2010 +0200
    84.2 +++ b/src/HOL/Probability/Positive_Infinite_Real.thy	Mon Sep 13 11:13:15 2010 +0200
    84.3 @@ -1036,7 +1036,7 @@
    84.4    qed
    84.5    from choice[OF this] obtain r where f: "f = (\<lambda>i. Real (r i))"
    84.6      and pos: "\<forall>i. 0 \<le> r i"
    84.7 -    by (auto simp: ext_iff)
    84.8 +    by (auto simp: fun_eq_iff)
    84.9    hence [simp]: "\<And>i. real (f i) = r i" by auto
   84.10  
   84.11    have "mono (\<lambda>n. setsum r {..<n})" (is "mono ?S")
   84.12 @@ -1156,7 +1156,7 @@
   84.13  lemma psuminf_0: "psuminf f = 0 \<longleftrightarrow> (\<forall>i. f i = 0)"
   84.14  proof safe
   84.15    assume "\<forall>i. f i = 0"
   84.16 -  hence "f = (\<lambda>i. 0)" by (simp add: ext_iff)
   84.17 +  hence "f = (\<lambda>i. 0)" by (simp add: fun_eq_iff)
   84.18    thus "psuminf f = 0" using psuminf_const by simp
   84.19  next
   84.20    fix i assume "psuminf f = 0"
    85.1 --- a/src/HOL/Probability/Probability_Space.thy	Mon Sep 13 08:43:48 2010 +0200
    85.2 +++ b/src/HOL/Probability/Probability_Space.thy	Mon Sep 13 11:13:15 2010 +0200
    85.3 @@ -34,14 +34,14 @@
    85.4  lemma (in prob_space) distribution_cong:
    85.5    assumes "\<And>x. x \<in> space M \<Longrightarrow> X x = Y x"
    85.6    shows "distribution X = distribution Y"
    85.7 -  unfolding distribution_def ext_iff
    85.8 +  unfolding distribution_def fun_eq_iff
    85.9    using assms by (auto intro!: arg_cong[where f="\<mu>"])
   85.10  
   85.11  lemma (in prob_space) joint_distribution_cong:
   85.12    assumes "\<And>x. x \<in> space M \<Longrightarrow> X x = X' x"
   85.13    assumes "\<And>x. x \<in> space M \<Longrightarrow> Y x = Y' x"
   85.14    shows "joint_distribution X Y = joint_distribution X' Y'"
   85.15 -  unfolding distribution_def ext_iff
   85.16 +  unfolding distribution_def fun_eq_iff
   85.17    using assms by (auto intro!: arg_cong[where f="\<mu>"])
   85.18  
   85.19  lemma prob_space: "prob (space M) = 1"
    86.1 --- a/src/HOL/Probability/Sigma_Algebra.thy	Mon Sep 13 08:43:48 2010 +0200
    86.2 +++ b/src/HOL/Probability/Sigma_Algebra.thy	Mon Sep 13 11:13:15 2010 +0200
    86.3 @@ -716,7 +716,7 @@
    86.4  
    86.5  lemma range_binaryset_eq: "range(binaryset A B) = {A,B,{}}"
    86.6    apply (simp add: binaryset_def)
    86.7 -  apply (rule set_ext)
    86.8 +  apply (rule set_eqI)
    86.9    apply (auto simp add: image_iff)
   86.10    done
   86.11  
    87.1 --- a/src/HOL/Product_Type.thy	Mon Sep 13 08:43:48 2010 +0200
    87.2 +++ b/src/HOL/Product_Type.thy	Mon Sep 13 11:13:15 2010 +0200
    87.3 @@ -151,7 +151,7 @@
    87.4  next
    87.5    fix a c :: 'a and b d :: 'b
    87.6    have "Pair_Rep a b = Pair_Rep c d \<longleftrightarrow> a = c \<and> b = d"
    87.7 -    by (auto simp add: Pair_Rep_def ext_iff)
    87.8 +    by (auto simp add: Pair_Rep_def fun_eq_iff)
    87.9    moreover have "Pair_Rep a b \<in> prod" and "Pair_Rep c d \<in> prod"
   87.10      by (auto simp add: prod_def)
   87.11    ultimately show "Pair a b = Pair c d \<longleftrightarrow> a = c \<and> b = d"
   87.12 @@ -394,7 +394,7 @@
   87.13    (Haskell "fst" and "snd")
   87.14  
   87.15  lemma prod_case_unfold [nitpick_def]: "prod_case = (%c p. c (fst p) (snd p))"
   87.16 -  by (simp add: ext_iff split: prod.split)
   87.17 +  by (simp add: fun_eq_iff split: prod.split)
   87.18  
   87.19  lemma fst_eqD: "fst (x, y) = a ==> x = a"
   87.20    by simp
   87.21 @@ -423,11 +423,11 @@
   87.22    by (rule split_conv [THEN iffD1])
   87.23  
   87.24  lemma split_Pair [simp]: "(\<lambda>(x, y). (x, y)) = id"
   87.25 -  by (simp add: ext_iff split: prod.split)
   87.26 +  by (simp add: fun_eq_iff split: prod.split)
   87.27  
   87.28  lemma split_eta: "(\<lambda>(x, y). f (x, y)) = f"
   87.29    -- {* Subsumes the old @{text split_Pair} when @{term f} is the identity function. *}
   87.30 -  by (simp add: ext_iff split: prod.split)
   87.31 +  by (simp add: fun_eq_iff split: prod.split)
   87.32  
   87.33  lemma split_comp: "split (f \<circ> g) x = f (g (fst x)) (snd x)"
   87.34    by (cases x) simp
   87.35 @@ -797,25 +797,25 @@
   87.36    "f \<circ>\<rightarrow> g = (\<lambda>x. prod_case g (f x))"
   87.37  
   87.38  lemma scomp_unfold: "scomp = (\<lambda>f g x. g (fst (f x)) (snd (f x)))"
   87.39 -  by (simp add: ext_iff scomp_def prod_case_unfold)
   87.40 +  by (simp add: fun_eq_iff scomp_def prod_case_unfold)
   87.41  
   87.42  lemma scomp_apply [simp]: "(f \<circ>\<rightarrow> g) x = prod_case g (f x)"
   87.43    by (simp add: scomp_unfold prod_case_unfold)
   87.44  
   87.45  lemma Pair_scomp: "Pair x \<circ>\<rightarrow> f = f x"
   87.46 -  by (simp add: ext_iff scomp_apply)
   87.47 +  by (simp add: fun_eq_iff scomp_apply)
   87.48  
   87.49  lemma scomp_Pair: "x \<circ>\<rightarrow> Pair = x"
   87.50 -  by (simp add: ext_iff scomp_apply)
   87.51 +  by (simp add: fun_eq_iff scomp_apply)
   87.52  
   87.53  lemma scomp_scomp: "(f \<circ>\<rightarrow> g) \<circ>\<rightarrow> h = f \<circ>\<rightarrow> (\<lambda>x. g x \<circ>\<rightarrow> h)"
   87.54 -  by (simp add: ext_iff scomp_unfold)
   87.55 +  by (simp add: fun_eq_iff scomp_unfold)
   87.56  
   87.57  lemma scomp_fcomp: "(f \<circ>\<rightarrow> g) \<circ>> h = f \<circ>\<rightarrow> (\<lambda>x. g x \<circ>> h)"
   87.58 -  by (simp add: ext_iff scomp_unfold fcomp_def)
   87.59 +  by (simp add: fun_eq_iff scomp_unfold fcomp_def)
   87.60  
   87.61  lemma fcomp_scomp: "(f \<circ>> g) \<circ>\<rightarrow> h = f \<circ>> (g \<circ>\<rightarrow> h)"
   87.62 -  by (simp add: ext_iff scomp_unfold fcomp_apply)
   87.63 +  by (simp add: fun_eq_iff scomp_unfold fcomp_apply)
   87.64  
   87.65  code_const scomp
   87.66    (Eval infixl 3 "#->")
   87.67 @@ -919,11 +919,11 @@
   87.68  
   87.69  lemma apfst_id [simp] :
   87.70    "apfst id = id"
   87.71 -  by (simp add: ext_iff)
   87.72 +  by (simp add: fun_eq_iff)
   87.73  
   87.74  lemma apsnd_id [simp] :
   87.75    "apsnd id = id"
   87.76 -  by (simp add: ext_iff)
   87.77 +  by (simp add: fun_eq_iff)
   87.78  
   87.79  lemma apfst_eq_conv [simp]:
   87.80    "apfst f x = apfst g x \<longleftrightarrow> f (fst x) = g (fst x)"
   87.81 @@ -1130,7 +1130,7 @@
   87.82    assumes "f ` A = A'" and "g ` B = B'"
   87.83    shows "prod_fun f g ` (A \<times> B) = A' \<times> B'"
   87.84  unfolding image_def
   87.85 -proof(rule set_ext,rule iffI)
   87.86 +proof(rule set_eqI,rule iffI)
   87.87    fix x :: "'a \<times> 'c"
   87.88    assume "x \<in> {y\<Colon>'a \<times> 'c. \<exists>x\<Colon>'b \<times> 'd\<in>A \<times> B. y = prod_fun f g x}"
   87.89    then obtain y where "y \<in> A \<times> B" and "x = prod_fun f g y" by blast
    88.1 --- a/src/HOL/Quotient.thy	Mon Sep 13 08:43:48 2010 +0200
    88.2 +++ b/src/HOL/Quotient.thy	Mon Sep 13 11:13:15 2010 +0200
    88.3 @@ -34,7 +34,7 @@
    88.4  
    88.5  lemma equivp_reflp_symp_transp:
    88.6    shows "equivp E = (reflp E \<and> symp E \<and> transp E)"
    88.7 -  unfolding equivp_def reflp_def symp_def transp_def ext_iff
    88.8 +  unfolding equivp_def reflp_def symp_def transp_def fun_eq_iff
    88.9    by blast
   88.10  
   88.11  lemma equivp_reflp:
   88.12 @@ -97,7 +97,7 @@
   88.13  
   88.14  lemma eq_comp_r:
   88.15    shows "((op =) OOO R) = R"
   88.16 -  by (auto simp add: ext_iff)
   88.17 +  by (auto simp add: fun_eq_iff)
   88.18  
   88.19  subsection {* Respects predicate *}
   88.20  
   88.21 @@ -130,11 +130,11 @@
   88.22  
   88.23  lemma fun_map_id:
   88.24    shows "(id ---> id) = id"
   88.25 -  by (simp add: ext_iff id_def)
   88.26 +  by (simp add: fun_eq_iff id_def)
   88.27  
   88.28  lemma fun_rel_eq:
   88.29    shows "((op =) ===> (op =)) = (op =)"
   88.30 -  by (simp add: ext_iff)
   88.31 +  by (simp add: fun_eq_iff)
   88.32  
   88.33  
   88.34  subsection {* Quotient Predicate *}
   88.35 @@ -209,7 +209,7 @@
   88.36    have "\<forall>a. (rep1 ---> abs2) ((abs1 ---> rep2) a) = a"
   88.37      using q1 q2
   88.38      unfolding Quotient_def
   88.39 -    unfolding ext_iff
   88.40 +    unfolding fun_eq_iff
   88.41      by simp
   88.42    moreover
   88.43    have "\<forall>a. (R1 ===> R2) ((abs1 ---> rep2) a) ((abs1 ---> rep2) a)"
   88.44 @@ -219,7 +219,7 @@
   88.45    moreover
   88.46    have "\<forall>r s. (R1 ===> R2) r s = ((R1 ===> R2) r r \<and> (R1 ===> R2) s s \<and>
   88.47          (rep1 ---> abs2) r  = (rep1 ---> abs2) s)"
   88.48 -    unfolding ext_iff
   88.49 +    unfolding fun_eq_iff
   88.50      apply(auto)
   88.51      using q1 q2 unfolding Quotient_def
   88.52      apply(metis)
   88.53 @@ -238,7 +238,7 @@
   88.54  lemma abs_o_rep:
   88.55    assumes a: "Quotient R Abs Rep"
   88.56    shows "Abs o Rep = id"
   88.57 -  unfolding ext_iff
   88.58 +  unfolding fun_eq_iff
   88.59    by (simp add: Quotient_abs_rep[OF a])
   88.60  
   88.61  lemma equals_rsp:
   88.62 @@ -253,7 +253,7 @@
   88.63    assumes q1: "Quotient R1 Abs1 Rep1"
   88.64    and     q2: "Quotient R2 Abs2 Rep2"
   88.65    shows "(Rep1 ---> Abs2) (\<lambda>x. Rep2 (f (Abs1 x))) = (\<lambda>x. f x)"
   88.66 -  unfolding ext_iff
   88.67 +  unfolding fun_eq_iff
   88.68    using Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2]
   88.69    by simp
   88.70  
   88.71 @@ -261,7 +261,7 @@
   88.72    assumes q1: "Quotient R1 Abs1 Rep1"
   88.73    and     q2: "Quotient R2 Abs2 Rep2"
   88.74    shows "(Rep1 ---> Abs2) (\<lambda>x. (Abs1 ---> Rep2) f x) = (\<lambda>x. f x)"
   88.75 -  unfolding ext_iff
   88.76 +  unfolding fun_eq_iff
   88.77    using Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2]
   88.78    by simp
   88.79  
   88.80 @@ -445,7 +445,7 @@
   88.81     is an equivalence this may be useful in regularising *)
   88.82  lemma babs_reg_eqv:
   88.83    shows "equivp R \<Longrightarrow> Babs (Respects R) P = P"
   88.84 -  by (simp add: ext_iff Babs_def in_respects equivp_reflp)
   88.85 +  by (simp add: fun_eq_iff Babs_def in_respects equivp_reflp)
   88.86  
   88.87  
   88.88  (* 3 lemmas needed for proving repabs_inj *)
   88.89 @@ -617,12 +617,12 @@
   88.90    shows "((Abs2 ---> Rep3) ---> (Abs1 ---> Rep2) ---> (Rep1 ---> Abs3)) op \<circ> = op \<circ>"
   88.91    and   "(id ---> (Abs1 ---> id) ---> Rep1 ---> id) op \<circ> = op \<circ>"
   88.92    using Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2] Quotient_abs_rep[OF q3]
   88.93 -  unfolding o_def ext_iff by simp_all
   88.94 +  unfolding o_def fun_eq_iff by simp_all
   88.95  
   88.96  lemma o_rsp:
   88.97    "((R2 ===> R3) ===> (R1 ===> R2) ===> (R1 ===> R3)) op \<circ> op \<circ>"
   88.98    "(op = ===> (R1 ===> op =) ===> R1 ===> op =) op \<circ> op \<circ>"
   88.99 -  unfolding fun_rel_def o_def ext_iff by auto
  88.100 +  unfolding fun_rel_def o_def fun_eq_iff by auto
  88.101  
  88.102  lemma cond_prs:
  88.103    assumes a: "Quotient R absf repf"
  88.104 @@ -633,7 +633,7 @@
  88.105    assumes q: "Quotient R Abs Rep"
  88.106    shows "(id ---> Rep ---> Rep ---> Abs) If = If"
  88.107    using Quotient_abs_rep[OF q]
  88.108 -  by (auto simp add: ext_iff)
  88.109 +  by (auto simp add: fun_eq_iff)
  88.110  
  88.111  lemma if_rsp:
  88.112    assumes q: "Quotient R Abs Rep"
  88.113 @@ -645,7 +645,7 @@
  88.114    and     q2: "Quotient R2 Abs2 Rep2"
  88.115    shows "(Rep2 ---> (Abs2 ---> Rep1) ---> Abs1) Let = Let"
  88.116    using Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2]
  88.117 -  by (auto simp add: ext_iff)
  88.118 +  by (auto simp add: fun_eq_iff)
  88.119  
  88.120  lemma let_rsp:
  88.121    shows "(R1 ===> (R1 ===> R2) ===> R2) Let Let"
  88.122 @@ -659,7 +659,7 @@
  88.123    assumes a1: "Quotient R1 Abs1 Rep1"
  88.124    and     a2: "Quotient R2 Abs2 Rep2"
  88.125    shows "(Rep1 ---> (Abs1 ---> Rep2) ---> Abs2) op \<in> = op \<in>"
  88.126 -  by (simp add: ext_iff mem_def Quotient_abs_rep[OF a1] Quotient_abs_rep[OF a2])
  88.127 +  by (simp add: fun_eq_iff mem_def Quotient_abs_rep[OF a1] Quotient_abs_rep[OF a2])
  88.128  
  88.129  locale quot_type =
  88.130    fixes R :: "'a \<Rightarrow> 'a \<Rightarrow> bool"
    89.1 --- a/src/HOL/Quotient_Examples/FSet.thy	Mon Sep 13 08:43:48 2010 +0200
    89.2 +++ b/src/HOL/Quotient_Examples/FSet.thy	Mon Sep 13 11:13:15 2010 +0200
    89.3 @@ -563,12 +563,12 @@
    89.4  
    89.5  lemma [quot_preserve]:
    89.6    "(rep_fset ---> (map rep_fset \<circ> rep_fset) ---> (abs_fset \<circ> map abs_fset)) op # = finsert"
    89.7 -  by (simp add: ext_iff Quotient_abs_rep[OF Quotient_fset]
    89.8 +  by (simp add: fun_eq_iff Quotient_abs_rep[OF Quotient_fset]
    89.9        abs_o_rep[OF Quotient_fset] map_id finsert_def)
   89.10  
   89.11  lemma [quot_preserve]:
   89.12    "((map rep_fset \<circ> rep_fset) ---> (map rep_fset \<circ> rep_fset) ---> (abs_fset \<circ> map abs_fset)) op @ = funion"
   89.13 -  by (simp add: ext_iff Quotient_abs_rep[OF Quotient_fset]
   89.14 +  by (simp add: fun_eq_iff Quotient_abs_rep[OF Quotient_fset]
   89.15        abs_o_rep[OF Quotient_fset] map_id sup_fset_def)
   89.16  
   89.17  lemma list_all2_app_l:
   89.18 @@ -771,7 +771,7 @@
   89.19  
   89.20  lemma inj_map_eq_iff:
   89.21    "inj f \<Longrightarrow> (map f l \<approx> map f m) = (l \<approx> m)"
   89.22 -  by (simp add: set_ext_iff[symmetric] inj_image_eq_iff)
   89.23 +  by (simp add: set_eq_iff[symmetric] inj_image_eq_iff)
   89.24  
   89.25  text {* alternate formulation with a different decomposition principle
   89.26    and a proof of equivalence *}
    90.1 --- a/src/HOL/Quotient_Examples/Quotient_Int.thy	Mon Sep 13 08:43:48 2010 +0200
    90.2 +++ b/src/HOL/Quotient_Examples/Quotient_Int.thy	Mon Sep 13 11:13:15 2010 +0200
    90.3 @@ -14,7 +14,7 @@
    90.4    "intrel (x, y) (u, v) = (x + v = u + y)"
    90.5  
    90.6  quotient_type int = "nat \<times> nat" / intrel
    90.7 -  by (auto simp add: equivp_def ext_iff)
    90.8 +  by (auto simp add: equivp_def fun_eq_iff)
    90.9  
   90.10  instantiation int :: "{zero, one, plus, uminus, minus, times, ord, abs, sgn}"
   90.11  begin
    91.1 --- a/src/HOL/Random.thy	Mon Sep 13 08:43:48 2010 +0200
    91.2 +++ b/src/HOL/Random.thy	Mon Sep 13 11:13:15 2010 +0200
    91.3 @@ -85,7 +85,7 @@
    91.4  
    91.5  lemma pick_drop_zero:
    91.6    "pick (filter (\<lambda>(k, _). k > 0) xs) = pick xs"
    91.7 -  by (induct xs) (auto simp add: ext_iff)
    91.8 +  by (induct xs) (auto simp add: fun_eq_iff)
    91.9  
   91.10  lemma pick_same:
   91.11    "l < length xs \<Longrightarrow> Random.pick (map (Pair 1) xs) (Code_Numeral.of_nat l) = nth xs l"
   91.12 @@ -132,7 +132,7 @@
   91.13      by (induct xs) simp_all
   91.14    ultimately show ?thesis
   91.15      by (auto simp add: select_weight_def select_def scomp_def split_def
   91.16 -      ext_iff pick_same [symmetric])
   91.17 +      fun_eq_iff pick_same [symmetric])
   91.18  qed
   91.19  
   91.20  
    92.1 --- a/src/HOL/Recdef.thy	Mon Sep 13 08:43:48 2010 +0200
    92.2 +++ b/src/HOL/Recdef.thy	Mon Sep 13 11:13:15 2010 +0200
    92.3 @@ -45,7 +45,7 @@
    92.4  text{*cut*}
    92.5  
    92.6  lemma cuts_eq: "(cut f r x = cut g r x) = (ALL y. (y,x):r --> f(y)=g(y))"
    92.7 -by (simp add: ext_iff cut_def)
    92.8 +by (simp add: fun_eq_iff cut_def)
    92.9  
   92.10  lemma cut_apply: "(x,a):r ==> (cut f r a)(x) = f(x)"
   92.11  by (simp add: cut_def)
    93.1 --- a/src/HOL/Set.thy	Mon Sep 13 08:43:48 2010 +0200
    93.2 +++ b/src/HOL/Set.thy	Mon Sep 13 11:13:15 2010 +0200
    93.3 @@ -489,20 +489,18 @@
    93.4  
    93.5  subsubsection {* Equality *}
    93.6  
    93.7 -lemma set_ext: assumes prem: "(!!x. (x:A) = (x:B))" shows "A = B"
    93.8 +lemma set_eqI: assumes prem: "(!!x. (x:A) = (x:B))" shows "A = B"
    93.9    apply (rule prem [THEN ext, THEN arg_cong, THEN box_equals])
   93.10     apply (rule Collect_mem_eq)
   93.11    apply (rule Collect_mem_eq)
   93.12    done
   93.13  
   93.14 -lemma set_ext_iff [no_atp]: "(A = B) = (ALL x. (x:A) = (x:B))"
   93.15 -by(auto intro:set_ext)
   93.16 -
   93.17 -lemmas expand_set_eq [no_atp] = set_ext_iff
   93.18 +lemma set_eq_iff [no_atp]: "(A = B) = (ALL x. (x:A) = (x:B))"
   93.19 +by(auto intro:set_eqI)
   93.20  
   93.21  lemma subset_antisym [intro!]: "A \<subseteq> B ==> B \<subseteq> A ==> A = B"
   93.22    -- {* Anti-symmetry of the subset relation. *}
   93.23 -  by (iprover intro: set_ext subsetD)
   93.24 +  by (iprover intro: set_eqI subsetD)
   93.25  
   93.26  text {*
   93.27    \medskip Equality rules from ZF set theory -- are they appropriate
    94.1 --- a/src/HOL/SetInterval.thy	Mon Sep 13 08:43:48 2010 +0200
    94.2 +++ b/src/HOL/SetInterval.thy	Mon Sep 13 11:13:15 2010 +0200
    94.3 @@ -241,7 +241,7 @@
    94.4  lemma atLeastatMost_psubset_iff:
    94.5    "{a..b} < {c..d} \<longleftrightarrow>
    94.6     ((~ a <= b) | c <= a & b <= d & (c < a | b < d))  &  c <= d"
    94.7 -by(simp add: psubset_eq set_ext_iff less_le_not_le)(blast intro: order_trans)
    94.8 +by(simp add: psubset_eq set_eq_iff less_le_not_le)(blast intro: order_trans)
    94.9  
   94.10  lemma atLeastAtMost_singleton_iff[simp]:
   94.11    "{a .. b} = {c} \<longleftrightarrow> a = b \<and> b = c"
    95.1 --- a/src/HOL/String.thy	Mon Sep 13 08:43:48 2010 +0200
    95.2 +++ b/src/HOL/String.thy	Mon Sep 13 11:13:15 2010 +0200
    95.3 @@ -60,12 +60,12 @@
    95.4  
    95.5  lemma char_case_nibble_pair [code, code_unfold]:
    95.6    "char_case f = split f o nibble_pair_of_char"
    95.7 -  by (simp add: ext_iff split: char.split)
    95.8 +  by (simp add: fun_eq_iff split: char.split)
    95.9  
   95.10  lemma char_rec_nibble_pair [code, code_unfold]:
   95.11    "char_rec f = split f o nibble_pair_of_char"
   95.12    unfolding char_case_nibble_pair [symmetric]
   95.13 -  by (simp add: ext_iff split: char.split)
   95.14 +  by (simp add: fun_eq_iff split: char.split)
   95.15  
   95.16  syntax
   95.17    "_Char" :: "xstr => char"    ("CHR _")
    96.1 --- a/src/HOL/Sum_Type.thy	Mon Sep 13 08:43:48 2010 +0200
    96.2 +++ b/src/HOL/Sum_Type.thy	Mon Sep 13 11:13:15 2010 +0200
    96.3 @@ -32,17 +32,17 @@
    96.4  lemma Inl_Rep_inject: "inj_on Inl_Rep A"
    96.5  proof (rule inj_onI)
    96.6    show "\<And>a c. Inl_Rep a = Inl_Rep c \<Longrightarrow> a = c"
    96.7 -    by (auto simp add: Inl_Rep_def ext_iff)
    96.8 +    by (auto simp add: Inl_Rep_def fun_eq_iff)
    96.9  qed
   96.10  
   96.11  lemma Inr_Rep_inject: "inj_on Inr_Rep A"
   96.12  proof (rule inj_onI)
   96.13    show "\<And>b d. Inr_Rep b = Inr_Rep d \<Longrightarrow> b = d"
   96.14 -    by (auto simp add: Inr_Rep_def ext_iff)
   96.15 +    by (auto simp add: Inr_Rep_def fun_eq_iff)
   96.16  qed
   96.17  
   96.18  lemma Inl_Rep_not_Inr_Rep: "Inl_Rep a \<noteq> Inr_Rep b"
   96.19 -  by (auto simp add: Inl_Rep_def Inr_Rep_def ext_iff)
   96.20 +  by (auto simp add: Inl_Rep_def Inr_Rep_def fun_eq_iff)
   96.21  
   96.22  definition Inl :: "'a \<Rightarrow> 'a + 'b" where
   96.23    "Inl = Abs_sum \<circ> Inl_Rep"
   96.24 @@ -178,7 +178,7 @@
   96.25  by auto
   96.26  
   96.27  lemma UNIV_Plus_UNIV [simp]: "UNIV <+> UNIV = UNIV"
   96.28 -proof (rule set_ext)
   96.29 +proof (rule set_eqI)
   96.30    fix u :: "'a + 'b"
   96.31    show "u \<in> UNIV <+> UNIV \<longleftrightarrow> u \<in> UNIV" by (cases u) auto
   96.32  qed
    97.1 --- a/src/HOL/Tools/Datatype/datatype.ML	Mon Sep 13 08:43:48 2010 +0200
    97.2 +++ b/src/HOL/Tools/Datatype/datatype.ML	Mon Sep 13 11:13:15 2010 +0200
    97.3 @@ -483,7 +483,7 @@
    97.4             [(indtac rep_induct [] THEN_ALL_NEW Object_Logic.atomize_prems_tac) 1,
    97.5              REPEAT (rtac TrueI 1),
    97.6              rewrite_goals_tac (mk_meta_eq @{thm choice_eq} ::
    97.7 -              Thm.symmetric (mk_meta_eq @{thm ext_iff}) :: range_eqs),
    97.8 +              Thm.symmetric (mk_meta_eq @{thm fun_eq_iff}) :: range_eqs),
    97.9              rewrite_goals_tac (map Thm.symmetric range_eqs),
   97.10              REPEAT (EVERY
   97.11                [REPEAT (eresolve_tac ([rangeE, ex1_implies_ex RS exE] @
    98.1 --- a/src/HOL/Tools/Sledgehammer/clausifier.ML	Mon Sep 13 08:43:48 2010 +0200
    98.2 +++ b/src/HOL/Tools/Sledgehammer/clausifier.ML	Mon Sep 13 11:13:15 2010 +0200
    98.3 @@ -78,7 +78,7 @@
    98.4  
    98.5  (**** REPLACING ABSTRACTIONS BY COMBINATORS ****)
    98.6  
    98.7 -val fun_cong_all = @{thm ext_iff [THEN iffD1]}
    98.8 +val fun_cong_all = @{thm fun_eq_iff [THEN iffD1]}
    98.9  
   98.10  (* Removes the lambdas from an equation of the form "t = (%x. u)".
   98.11     (Cf. "extensionalize_term" in "Sledgehammer_Translate".) *)
    99.1 --- a/src/HOL/Transitive_Closure.thy	Mon Sep 13 08:43:48 2010 +0200
    99.2 +++ b/src/HOL/Transitive_Closure.thy	Mon Sep 13 11:13:15 2010 +0200
    99.3 @@ -82,7 +82,7 @@
    99.4  subsection {* Reflexive-transitive closure *}
    99.5  
    99.6  lemma reflcl_set_eq [pred_set_conv]: "(sup (\<lambda>x y. (x, y) \<in> r) op =) = (\<lambda>x y. (x, y) \<in> r \<union> Id)"
    99.7 -  by (auto simp add: ext_iff)
    99.8 +  by (auto simp add: fun_eq_iff)
    99.9  
   99.10  lemma r_into_rtrancl [intro]: "!!p. p \<in> r ==> p \<in> r^*"
   99.11    -- {* @{text rtrancl} of @{text r} contains @{text r} *}
   99.12 @@ -186,7 +186,7 @@
   99.13  lemmas rtrancl_idemp [simp] = rtranclp_idemp [to_set]
   99.14  
   99.15  lemma rtrancl_idemp_self_comp [simp]: "R^* O R^* = R^*"
   99.16 -  apply (rule set_ext)
   99.17 +  apply (rule set_eqI)
   99.18    apply (simp only: split_tupled_all)
   99.19    apply (blast intro: rtrancl_trans)
   99.20    done
   99.21 @@ -487,7 +487,7 @@
   99.22  lemmas trancl_converseD = tranclp_converseD [to_set]
   99.23  
   99.24  lemma tranclp_converse: "(r^--1)^++ = (r^++)^--1"
   99.25 -  by (fastsimp simp add: ext_iff
   99.26 +  by (fastsimp simp add: fun_eq_iff
   99.27      intro!: tranclp_converseI dest!: tranclp_converseD)
   99.28  
   99.29  lemmas trancl_converse = tranclp_converse [to_set]
   100.1 --- a/src/HOL/UNITY/Comp/Alloc.thy	Mon Sep 13 08:43:48 2010 +0200
   100.2 +++ b/src/HOL/UNITY/Comp/Alloc.thy	Mon Sep 13 11:13:15 2010 +0200
   100.3 @@ -358,7 +358,7 @@
   100.4    done
   100.5  
   100.6  lemma surj_sysOfAlloc [iff]: "surj sysOfAlloc"
   100.7 -  apply (simp add: surj_iff ext_iff o_apply)
   100.8 +  apply (simp add: surj_iff fun_eq_iff o_apply)
   100.9    apply record_auto
  100.10    done
  100.11  
  100.12 @@ -386,7 +386,7 @@
  100.13    done
  100.14  
  100.15  lemma surj_sysOfClient [iff]: "surj sysOfClient"
  100.16 -  apply (simp add: surj_iff ext_iff o_apply)
  100.17 +  apply (simp add: surj_iff fun_eq_iff o_apply)
  100.18    apply record_auto
  100.19    done
  100.20  
  100.21 @@ -410,7 +410,7 @@
  100.22    done
  100.23  
  100.24  lemma surj_client_map [iff]: "surj client_map"
  100.25 -  apply (simp add: surj_iff ext_iff o_apply)
  100.26 +  apply (simp add: surj_iff fun_eq_iff o_apply)
  100.27    apply record_auto
  100.28    done
  100.29  
   101.1 --- a/src/HOL/UNITY/Lift_prog.thy	Mon Sep 13 08:43:48 2010 +0200
   101.2 +++ b/src/HOL/UNITY/Lift_prog.thy	Mon Sep 13 11:13:15 2010 +0200
   101.3 @@ -337,10 +337,10 @@
   101.4  
   101.5  (*Lets us prove one version of a theorem and store others*)
   101.6  lemma o_equiv_assoc: "f o g = h ==> f' o f o g = f' o h"
   101.7 -by (simp add: ext_iff o_def)
   101.8 +by (simp add: fun_eq_iff o_def)
   101.9  
  101.10  lemma o_equiv_apply: "f o g = h ==> \<forall>x. f(g x) = h x"
  101.11 -by (simp add: ext_iff o_def)
  101.12 +by (simp add: fun_eq_iff o_def)
  101.13  
  101.14  lemma fst_o_lift_map: "sub i o fst o lift_map i = fst"
  101.15  apply (rule ext)
   102.1 --- a/src/HOL/Wellfounded.thy	Mon Sep 13 08:43:48 2010 +0200
   102.2 +++ b/src/HOL/Wellfounded.thy	Mon Sep 13 11:13:15 2010 +0200
   102.3 @@ -781,7 +781,7 @@
   102.4  
   102.5            let ?N1 = "{ n \<in> N. (n, a) \<in> r }"
   102.6            let ?N2 = "{ n \<in> N. (n, a) \<notin> r }"
   102.7 -          have N: "?N1 \<union> ?N2 = N" by (rule set_ext) auto
   102.8 +          have N: "?N1 \<union> ?N2 = N" by (rule set_eqI) auto
   102.9            from Nless have "finite N" by (auto elim: max_ext.cases)
  102.10            then have finites: "finite ?N1" "finite ?N2" by auto
  102.11            
   103.1 --- a/src/HOL/Word/Misc_Typedef.thy	Mon Sep 13 08:43:48 2010 +0200
   103.2 +++ b/src/HOL/Word/Misc_Typedef.thy	Mon Sep 13 11:13:15 2010 +0200
   103.3 @@ -53,14 +53,14 @@
   103.4  
   103.5  lemma set_Rep: 
   103.6    "A = range Rep"
   103.7 -proof (rule set_ext)
   103.8 +proof (rule set_eqI)
   103.9    fix x
  103.10    show "(x \<in> A) = (x \<in> range Rep)"
  103.11      by (auto dest: Abs_inverse [of x, symmetric])
  103.12  qed  
  103.13  
  103.14  lemma set_Rep_Abs: "A = range (Rep o Abs)"
  103.15 -proof (rule set_ext)
  103.16 +proof (rule set_eqI)
  103.17    fix x
  103.18    show "(x \<in> A) = (x \<in> range (Rep o Abs))"
  103.19      by (auto dest: Abs_inverse [of x, symmetric])
   104.1 --- a/src/HOL/Word/Word.thy	Mon Sep 13 08:43:48 2010 +0200
   104.2 +++ b/src/HOL/Word/Word.thy	Mon Sep 13 11:13:15 2010 +0200
   104.3 @@ -4695,7 +4695,7 @@
   104.4  apply simp
   104.5  apply (rule_tac t="\<lambda>a. x (1 + (n - m + a))" and s="\<lambda>a. x (1 + (n - m) + a)"
   104.6         in subst)
   104.7 - apply (clarsimp simp add: ext_iff)
   104.8 + apply (clarsimp simp add: fun_eq_iff)
   104.9   apply (rule_tac t="(1 + (n - m + xb))" and s="1 + (n - m) + xb" in subst)
  104.10    apply simp
  104.11   apply (rule refl)
   105.1 --- a/src/HOL/ZF/Games.thy	Mon Sep 13 08:43:48 2010 +0200
   105.2 +++ b/src/HOL/ZF/Games.thy	Mon Sep 13 11:13:15 2010 +0200
   105.3 @@ -323,7 +323,7 @@
   105.4  lemma wf_option_of[recdef_wf, simp, intro]: "wf option_of"
   105.5  proof -
   105.6    have option_of: "option_of = inv_image is_option_of Rep_game"
   105.7 -    apply (rule set_ext)
   105.8 +    apply (rule set_eqI)
   105.9      apply (case_tac "x")
  105.10      by (simp add: option_to_is_option_of) 
  105.11    show ?thesis
   106.1 --- a/src/HOL/ZF/HOLZF.thy	Mon Sep 13 08:43:48 2010 +0200
   106.2 +++ b/src/HOL/ZF/HOLZF.thy	Mon Sep 13 11:13:15 2010 +0200
   106.3 @@ -155,7 +155,7 @@
   106.4    by (auto simp add: explode_def)
   106.5  
   106.6  lemma explode_CartProd_eq: "explode (CartProd a b) = (% (x,y). Opair x y) ` ((explode a) \<times> (explode b))"
   106.7 -  by (simp add: explode_def set_ext_iff CartProd image_def)
   106.8 +  by (simp add: explode_def set_eq_iff CartProd image_def)
   106.9  
  106.10  lemma explode_Repl_eq: "explode (Repl A f) = image f (explode A)"
  106.11    by (simp add: explode_def Repl image_def)
  106.12 @@ -830,7 +830,7 @@
  106.13    apply (subst set_like_def)
  106.14    apply (auto simp add: image_def)
  106.15    apply (rule_tac x="Sep (Ext_ZF_hull R y) (\<lambda> z. z \<in> (Ext (R^+) y))" in exI)
  106.16 -  apply (auto simp add: explode_def Sep set_ext 
  106.17 +  apply (auto simp add: explode_def Sep set_eqI 
  106.18      in_Ext_RTrans_implies_Elem_Ext_ZF_hull)
  106.19    done
  106.20   
   107.1 --- a/src/HOL/ZF/Zet.thy	Mon Sep 13 08:43:48 2010 +0200
   107.2 +++ b/src/HOL/ZF/Zet.thy	Mon Sep 13 11:13:15 2010 +0200
   107.3 @@ -22,7 +22,7 @@
   107.4    "zimage f A == Abs_zet (image f (Rep_zet A))"
   107.5  
   107.6  lemma zet_def': "zet = {A :: 'a set | A f z. inj_on f A \<and> f ` A = explode z}"
   107.7 -  apply (rule set_ext)
   107.8 +  apply (rule set_eqI)
   107.9    apply (auto simp add: zet_def)
  107.10    apply (rule_tac x=f in exI)
  107.11    apply auto
  107.12 @@ -118,7 +118,7 @@
  107.13    "zsubset a b \<equiv> ! x. zin x a \<longrightarrow> zin x b"
  107.14  
  107.15  lemma explode_union: "explode (union a b) = (explode a) \<union> (explode b)"
  107.16 -  apply (rule set_ext)
  107.17 +  apply (rule set_eqI)
  107.18    apply (simp add: explode_def union)
  107.19    done
  107.20  
  107.21 @@ -163,7 +163,7 @@
  107.22    by (simp add: zet_ext_eq zin_zexplode_eq Repl zimage_iff)
  107.23  
  107.24  lemma range_explode_eq_zet: "range explode = zet"
  107.25 -  apply (rule set_ext)
  107.26 +  apply (rule set_eqI)
  107.27    apply (auto simp add: explode_mem_zet)
  107.28    apply (drule image_zet_rep)
  107.29    apply (simp add: image_def)
   108.1 --- a/src/HOL/ex/Execute_Choice.thy	Mon Sep 13 08:43:48 2010 +0200
   108.2 +++ b/src/HOL/ex/Execute_Choice.thy	Mon Sep 13 11:13:15 2010 +0200
   108.3 @@ -26,7 +26,7 @@
   108.4    case True then show ?thesis by (simp add: is_empty_def keys_def valuesum_def)
   108.5  next
   108.6    case False
   108.7 -  then have l: "\<exists>l. l \<in> dom (Mapping.lookup m)" by (auto simp add: is_empty_def ext_iff mem_def keys_def)
   108.8 +  then have l: "\<exists>l. l \<in> dom (Mapping.lookup m)" by (auto simp add: is_empty_def fun_eq_iff mem_def keys_def)
   108.9    then have "(let l = SOME l. l \<in> dom (Mapping.lookup m) in
  108.10       the (Mapping.lookup m l) + (\<Sum>k \<in> dom (Mapping.lookup m) - {l}. the (Mapping.lookup m k))) =
  108.11         (\<Sum>k \<in> dom (Mapping.lookup m). the (Mapping.lookup m k))"
   109.1 --- a/src/HOL/ex/Landau.thy	Mon Sep 13 08:43:48 2010 +0200
   109.2 +++ b/src/HOL/ex/Landau.thy	Mon Sep 13 11:13:15 2010 +0200
   109.3 @@ -189,7 +189,7 @@
   109.4    qed (simp_all add: less_fun_def less_eq_fun_refl, auto intro: less_eq_fun_trans)
   109.5    show "class.preorder_equiv less_eq_fun less_fun" using preorder_equiv_axioms .
   109.6    show "preorder_equiv.equiv less_eq_fun = equiv_fun"
   109.7 -    by (simp add: ext_iff equiv_def equiv_fun_less_eq_fun)
   109.8 +    by (simp add: fun_eq_iff equiv_def equiv_fun_less_eq_fun)
   109.9  qed
  109.10  
  109.11  
   110.1 --- a/src/HOL/ex/Summation.thy	Mon Sep 13 08:43:48 2010 +0200
   110.2 +++ b/src/HOL/ex/Summation.thy	Mon Sep 13 11:13:15 2010 +0200
   110.3 @@ -24,7 +24,7 @@
   110.4  
   110.5  lemma \<Delta>_shift:
   110.6    "\<Delta> (\<lambda>k. l + f k) = \<Delta> f"
   110.7 -  by (simp add: \<Delta>_def ext_iff)
   110.8 +  by (simp add: \<Delta>_def fun_eq_iff)
   110.9  
  110.10  lemma \<Delta>_same_shift:
  110.11    assumes "\<Delta> f = \<Delta> g"
  110.12 @@ -100,7 +100,7 @@
  110.13  proof -
  110.14    from \<Delta>_\<Sigma> have "\<Delta> (\<Sigma> (\<Delta> f) j) = \<Delta> f" .
  110.15    then obtain k where "plus k \<circ> \<Sigma> (\<Delta> f) j = f" by (blast dest: \<Delta>_same_shift)
  110.16 -  then have "\<And>q. f q = k + \<Sigma> (\<Delta> f) j q" by (simp add: ext_iff)
  110.17 +  then have "\<And>q. f q = k + \<Sigma> (\<Delta> f) j q" by (simp add: fun_eq_iff)
  110.18    then show ?thesis by simp
  110.19  qed
  110.20  
   111.1 --- a/src/HOLCF/Algebraic.thy	Mon Sep 13 08:43:48 2010 +0200
   111.2 +++ b/src/HOLCF/Algebraic.thy	Mon Sep 13 11:13:15 2010 +0200
   111.3 @@ -446,7 +446,7 @@
   111.4  apply (clarify, simp add: fd_take_fixed_iff)
   111.5  apply (simp add: finite_fixes_approx)
   111.6  apply (rule inj_onI, clarify)
   111.7 -apply (simp add: set_ext_iff fin_defl_eqI)
   111.8 +apply (simp add: set_eq_iff fin_defl_eqI)
   111.9  done
  111.10  
  111.11  lemma fd_take_covers: "\<exists>n. fd_take n a = a"
   112.1 --- a/src/HOLCF/Cfun.thy	Mon Sep 13 08:43:48 2010 +0200
   112.2 +++ b/src/HOLCF/Cfun.thy	Mon Sep 13 11:13:15 2010 +0200
   112.3 @@ -178,7 +178,7 @@
   112.4  text {* Extensionality for continuous functions *}
   112.5  
   112.6  lemma expand_cfun_eq: "(f = g) = (\<forall>x. f\<cdot>x = g\<cdot>x)"
   112.7 -by (simp add: Rep_CFun_inject [symmetric] ext_iff)
   112.8 +by (simp add: Rep_CFun_inject [symmetric] fun_eq_iff)
   112.9  
  112.10  lemma ext_cfun: "(\<And>x. f\<cdot>x = g\<cdot>x) \<Longrightarrow> f = g"
  112.11  by (simp add: expand_cfun_eq)
   113.1 --- a/src/HOLCF/Ffun.thy	Mon Sep 13 08:43:48 2010 +0200
   113.2 +++ b/src/HOLCF/Ffun.thy	Mon Sep 13 11:13:15 2010 +0200
   113.3 @@ -27,7 +27,7 @@
   113.4  next
   113.5    fix f g :: "'a \<Rightarrow> 'b"
   113.6    assume "f \<sqsubseteq> g" and "g \<sqsubseteq> f" thus "f = g"
   113.7 -    by (simp add: below_fun_def ext_iff below_antisym)
   113.8 +    by (simp add: below_fun_def fun_eq_iff below_antisym)
   113.9  next
  113.10    fix f g h :: "'a \<Rightarrow> 'b"
  113.11    assume "f \<sqsubseteq> g" and "g \<sqsubseteq> h" thus "f \<sqsubseteq> h"
  113.12 @@ -103,7 +103,7 @@
  113.13  proof
  113.14    fix f g :: "'a \<Rightarrow> 'b"
  113.15    show "f \<sqsubseteq> g \<longleftrightarrow> f = g" 
  113.16 -    unfolding expand_fun_below ext_iff
  113.17 +    unfolding expand_fun_below fun_eq_iff
  113.18      by simp
  113.19  qed
  113.20  
  113.21 @@ -111,7 +111,7 @@
  113.22  
  113.23  lemma maxinch2maxinch_lambda:
  113.24    "(\<And>x. max_in_chain n (\<lambda>i. S i x)) \<Longrightarrow> max_in_chain n S"
  113.25 -unfolding max_in_chain_def ext_iff by simp
  113.26 +unfolding max_in_chain_def fun_eq_iff by simp
  113.27  
  113.28  lemma maxinch_mono:
  113.29    "\<lbrakk>max_in_chain i Y; i \<le> j\<rbrakk> \<Longrightarrow> max_in_chain j Y"
   114.1 --- a/src/HOLCF/IOA/ABP/Correctness.thy	Mon Sep 13 08:43:48 2010 +0200
   114.2 +++ b/src/HOLCF/IOA/ABP/Correctness.thy	Mon Sep 13 11:13:15 2010 +0200
   114.3 @@ -210,7 +210,7 @@
   114.4  
   114.5  lemma compat_single_ch: "compatible srch_ioa rsch_ioa"
   114.6  apply (simp add: compatible_def Int_def)
   114.7 -apply (rule set_ext)
   114.8 +apply (rule set_eqI)
   114.9  apply (induct_tac x)
  114.10  apply simp_all
  114.11  done
  114.12 @@ -218,7 +218,7 @@
  114.13  text {* totally the same as before *}
  114.14  lemma compat_single_fin_ch: "compatible srch_fin_ioa rsch_fin_ioa"
  114.15  apply (simp add: compatible_def Int_def)
  114.16 -apply (rule set_ext)
  114.17 +apply (rule set_eqI)
  114.18  apply (induct_tac x)
  114.19  apply simp_all
  114.20  done
  114.21 @@ -232,7 +232,7 @@
  114.22  apply (simp del: del_simps
  114.23    add: compatible_def asig_of_par asig_comp_def actions_def Int_def)
  114.24  apply simp
  114.25 -apply (rule set_ext)
  114.26 +apply (rule set_eqI)
  114.27  apply (induct_tac x)
  114.28  apply simp_all
  114.29  done
  114.30 @@ -242,7 +242,7 @@
  114.31  apply (simp del: del_simps
  114.32    add: compatible_def asig_of_par asig_comp_def actions_def Int_def)
  114.33  apply simp
  114.34 -apply (rule set_ext)
  114.35 +apply (rule set_eqI)
  114.36  apply (induct_tac x)
  114.37  apply simp_all
  114.38  done
  114.39 @@ -252,7 +252,7 @@
  114.40  apply (simp del: del_simps
  114.41    add: compatible_def asig_of_par asig_comp_def actions_def Int_def)
  114.42  apply simp
  114.43 -apply (rule set_ext)
  114.44 +apply (rule set_eqI)
  114.45  apply (induct_tac x)
  114.46  apply simp_all
  114.47  done
  114.48 @@ -262,7 +262,7 @@
  114.49  apply (simp del: del_simps
  114.50    add: compatible_def asig_of_par asig_comp_def actions_def Int_def)
  114.51  apply simp
  114.52 -apply (rule set_ext)
  114.53 +apply (rule set_eqI)
  114.54  apply (induct_tac x)
  114.55  apply simp_all
  114.56  done
  114.57 @@ -272,7 +272,7 @@
  114.58  apply (simp del: del_simps
  114.59    add: compatible_def asig_of_par asig_comp_def actions_def Int_def)
  114.60  apply simp
  114.61 -apply (rule set_ext)
  114.62 +apply (rule set_eqI)
  114.63  apply (induct_tac x)
  114.64  apply simp_all
  114.65  done
  114.66 @@ -282,7 +282,7 @@
  114.67  apply (simp del: del_simps
  114.68    add: compatible_def asig_of_par asig_comp_def actions_def Int_def)
  114.69  apply simp
  114.70 -apply (rule set_ext)
  114.71 +apply (rule set_eqI)
  114.72  apply (induct_tac x)
  114.73  apply simp_all
  114.74  done
   115.1 --- a/src/HOLCF/IOA/meta_theory/CompoExecs.thy	Mon Sep 13 08:43:48 2010 +0200
   115.2 +++ b/src/HOLCF/IOA/meta_theory/CompoExecs.thy	Mon Sep 13 11:13:15 2010 +0200
   115.3 @@ -296,7 +296,7 @@
   115.4    "Execs (A||B) = par_execs (Execs A) (Execs B)"
   115.5  apply (unfold Execs_def par_execs_def)
   115.6  apply (simp add: asig_of_par)
   115.7 -apply (rule set_ext)
   115.8 +apply (rule set_eqI)
   115.9  apply (simp add: compositionality_ex actions_of_par)
  115.10  done
  115.11  
   116.1 --- a/src/HOLCF/IOA/meta_theory/CompoScheds.thy	Mon Sep 13 08:43:48 2010 +0200
   116.2 +++ b/src/HOLCF/IOA/meta_theory/CompoScheds.thy	Mon Sep 13 11:13:15 2010 +0200
   116.3 @@ -542,7 +542,7 @@
   116.4  
   116.5  apply (unfold Scheds_def par_scheds_def)
   116.6  apply (simp add: asig_of_par)
   116.7 -apply (rule set_ext)
   116.8 +apply (rule set_eqI)
   116.9  apply (simp add: compositionality_sch actions_of_par)
  116.10  done
  116.11  
   117.1 --- a/src/HOLCF/IOA/meta_theory/CompoTraces.thy	Mon Sep 13 08:43:48 2010 +0200
   117.2 +++ b/src/HOLCF/IOA/meta_theory/CompoTraces.thy	Mon Sep 13 11:13:15 2010 +0200
   117.3 @@ -962,7 +962,7 @@
   117.4  
   117.5  apply (unfold Traces_def par_traces_def)
   117.6  apply (simp add: asig_of_par)
   117.7 -apply (rule set_ext)
   117.8 +apply (rule set_eqI)
   117.9  apply (simp add: compositionality_tr externals_of_par)
  117.10  done
  117.11  
   118.1 --- a/src/HOLCF/Library/List_Cpo.thy	Mon Sep 13 08:43:48 2010 +0200
   118.2 +++ b/src/HOLCF/Library/List_Cpo.thy	Mon Sep 13 11:13:15 2010 +0200
   118.3 @@ -115,7 +115,7 @@
   118.4   apply (induct n arbitrary: S)
   118.5    apply (subgoal_tac "S = (\<lambda>i. [])")
   118.6    apply (fast intro: lub_const)
   118.7 -  apply (simp add: ext_iff)
   118.8 +  apply (simp add: fun_eq_iff)
   118.9   apply (drule_tac x="\<lambda>i. tl (S i)" in meta_spec, clarsimp)
  118.10   apply (rule_tac x="(\<Squnion>i. hd (S i)) # x" in exI)
  118.11   apply (subgoal_tac "range (\<lambda>i. hd (S i) # tl (S i)) = range S")
   119.1 --- a/src/HOLCF/Pcpo.thy	Mon Sep 13 08:43:48 2010 +0200
   119.2 +++ b/src/HOLCF/Pcpo.thy	Mon Sep 13 11:13:15 2010 +0200
   119.3 @@ -89,7 +89,7 @@
   119.4  lemma lub_equal:
   119.5    "\<lbrakk>chain X; chain Y; \<forall>k. X k = Y k\<rbrakk>
   119.6      \<Longrightarrow> (\<Squnion>i. X i) = (\<Squnion>i. Y i)"
   119.7 -  by (simp only: ext_iff [symmetric])
   119.8 +  by (simp only: fun_eq_iff [symmetric])
   119.9  
  119.10  lemma lub_eq:
  119.11    "(\<And>i. X i = Y i) \<Longrightarrow> (\<Squnion>i. X i) = (\<Squnion>i. Y i)"
   120.1 --- a/src/HOLCF/Up.thy	Mon Sep 13 08:43:48 2010 +0200
   120.2 +++ b/src/HOLCF/Up.thy	Mon Sep 13 11:13:15 2010 +0200
   120.3 @@ -135,7 +135,7 @@
   120.4     (\<exists>A. chain A \<and> (\<Squnion>i. Y i) = Iup (\<Squnion>i. A i) \<and>
   120.5     (\<exists>j. \<forall>i. Y (i + j) = Iup (A i))) \<or> (Y = (\<lambda>i. Ibottom))"
   120.6  apply (rule disjCI)
   120.7 -apply (simp add: ext_iff)
   120.8 +apply (simp add: fun_eq_iff)
   120.9  apply (erule exE, rename_tac j)
  120.10  apply (rule_tac x="\<lambda>i. THE a. Iup a = Y (i + j)" in exI)
  120.11  apply (simp add: up_lemma4)