tuned proofs
authorblanchet
Fri Aug 10 13:33:54 2012 +0200 (2012-08-10)
changeset 48750a151db85a62b
parent 48749 c197b3c3e7fa
child 48758 80ad6e0e147f
tuned proofs
src/HOL/Library/Order_Relation.thy
src/HOL/Library/Zorn.thy
     1.1 --- a/src/HOL/Library/Order_Relation.thy	Thu Aug 09 22:31:04 2012 +0200
     1.2 +++ b/src/HOL/Library/Order_Relation.thy	Fri Aug 10 13:33:54 2012 +0200
     1.3 @@ -71,9 +71,9 @@
     1.4  lemma subset_Image_Image_iff:
     1.5    "\<lbrakk> Preorder r; A \<subseteq> Field r; B \<subseteq> Field r\<rbrakk> \<Longrightarrow>
     1.6     r `` A \<subseteq> r `` B \<longleftrightarrow> (\<forall>a\<in>A.\<exists>b\<in>B. (b,a):r)"
     1.7 -apply(auto simp add: subset_eq preorder_on_def refl_on_def Image_def)
     1.8 -apply metis
     1.9 -by(metis trans_def)
    1.10 +unfolding preorder_on_def refl_on_def Image_def
    1.11 +apply (simp add: subset_eq)
    1.12 +unfolding trans_def by fast
    1.13  
    1.14  lemma subset_Image1_Image1_iff:
    1.15    "\<lbrakk> Preorder r; a : Field r; b : Field r\<rbrakk> \<Longrightarrow> r `` {a} \<subseteq> r `` {b} \<longleftrightarrow> (b,a):r"
     2.1 --- a/src/HOL/Library/Zorn.thy	Thu Aug 09 22:31:04 2012 +0200
     2.2 +++ b/src/HOL/Library/Zorn.thy	Fri Aug 10 13:33:54 2012 +0200
     2.3 @@ -8,7 +8,7 @@
     2.4  header {* Zorn's Lemma *}
     2.5  
     2.6  theory Zorn
     2.7 -imports Order_Relation Main
     2.8 +imports Order_Relation
     2.9  begin
    2.10  
    2.11  (* Define globally? In Set.thy? *)
    2.12 @@ -143,7 +143,7 @@
    2.13   the subset relation!*}
    2.14  
    2.15  lemma empty_set_mem_chain: "({} :: 'a set set) \<in> chain S"
    2.16 -by (unfold chain_def chain_subset_def) auto
    2.17 +  by (unfold chain_def chain_subset_def) simp
    2.18  
    2.19  lemma super_subset_chain: "super S c \<subseteq> chain S"
    2.20    by (unfold super_def) blast
    2.21 @@ -152,13 +152,13 @@
    2.22    by (unfold maxchain_def) blast
    2.23  
    2.24  lemma mem_super_Ex: "c \<in> chain S - maxchain S ==> EX d. d \<in> super S c"
    2.25 -  by (unfold super_def maxchain_def) auto
    2.26 +  by (unfold super_def maxchain_def) simp
    2.27  
    2.28  lemma select_super:
    2.29       "c \<in> chain S - maxchain S ==> (\<some>c'. c': super S c): super S c"
    2.30    apply (erule mem_super_Ex [THEN exE])
    2.31    apply (rule someI2)
    2.32 -  apply auto
    2.33 +  apply simp+
    2.34    done
    2.35  
    2.36  lemma select_not_equals:
    2.37 @@ -286,7 +286,7 @@
    2.38      proof (simp add:Chain_def, intro allI impI, elim conjE)
    2.39        fix a b
    2.40        assume "a \<in> Field r" "?B a \<in> C" "b \<in> Field r" "?B b \<in> C"
    2.41 -      hence "?B a \<subseteq> ?B b \<or> ?B b \<subseteq> ?B a" using 2 by auto
    2.42 +      hence "?B a \<subseteq> ?B b \<or> ?B b \<subseteq> ?B a" using 2 by simp
    2.43        thus "(a, b) \<in> r \<or> (b, a) \<in> r" using `Preorder r` `a:Field r` `b:Field r`
    2.44          by (simp add:subset_Image1_Image1_iff)
    2.45      qed
    2.46 @@ -296,7 +296,7 @@
    2.47        fix a B assume aB: "B:C" "a:B"
    2.48        with 1 obtain x where "x:Field r" "B = r^-1 `` {x}" by auto
    2.49        thus "(a,u) : r" using uA aB `Preorder r`
    2.50 -        by (auto simp add: preorder_on_def refl_on_def) (metis transD)
    2.51 +        by (simp add: preorder_on_def refl_on_def) (rule transD, blast+)
    2.52      qed
    2.53      thus "EX u:Field r. ?P u" using `u:Field r` by blast
    2.54    qed
    2.55 @@ -326,8 +326,7 @@
    2.56  
    2.57  lemma trans_init_seg_of:
    2.58    "r initial_segment_of s \<Longrightarrow> s initial_segment_of t \<Longrightarrow> r initial_segment_of t"
    2.59 -by(simp (no_asm_use) add: init_seg_of_def)
    2.60 -  (metis Domain_iff UnCI Un_absorb2 subset_trans)
    2.61 +by (simp (no_asm_use) add: init_seg_of_def) (metis (no_types) in_mono order_trans)
    2.62  
    2.63  lemma antisym_init_seg_of:
    2.64    "r initial_segment_of s \<Longrightarrow> s initial_segment_of r \<Longrightarrow> r=s"
    2.65 @@ -335,20 +334,17 @@
    2.66  
    2.67  lemma Chain_init_seg_of_Union:
    2.68    "R \<in> Chain init_seg_of \<Longrightarrow> r\<in>R \<Longrightarrow> r initial_segment_of \<Union>R"
    2.69 -by(auto simp add:init_seg_of_def Chain_def Ball_def) blast
    2.70 +by(simp add: init_seg_of_def Chain_def Ball_def) blast
    2.71  
    2.72  lemma chain_subset_trans_Union:
    2.73    "chain\<^bsub>\<subseteq>\<^esub> R \<Longrightarrow> \<forall>r\<in>R. trans r \<Longrightarrow> trans(\<Union>R)"
    2.74 -apply(auto simp add:chain_subset_def)
    2.75 +apply(simp add:chain_subset_def)
    2.76  apply(simp (no_asm_use) add:trans_def)
    2.77 -apply (metis subsetD)
    2.78 -done
    2.79 +by (metis subsetD)
    2.80  
    2.81  lemma chain_subset_antisym_Union:
    2.82    "chain\<^bsub>\<subseteq>\<^esub> R \<Longrightarrow> \<forall>r\<in>R. antisym r \<Longrightarrow> antisym(\<Union>R)"
    2.83 -apply(auto simp add:chain_subset_def antisym_def)
    2.84 -apply (metis subsetD)
    2.85 -done
    2.86 +by (simp add:chain_subset_def antisym_def) (metis subsetD)
    2.87  
    2.88  lemma chain_subset_Total_Union:
    2.89  assumes "chain\<^bsub>\<subseteq>\<^esub> R" "\<forall>r\<in>R. Total r"
    2.90 @@ -403,7 +399,7 @@
    2.91  -- {*The initial segment relation on well-orders: *}
    2.92    let ?WO = "{r::('a*'a)set. Well_order r}"
    2.93    def I \<equiv> "init_seg_of \<inter> ?WO \<times> ?WO"
    2.94 -  have I_init: "I \<subseteq> init_seg_of" by(auto simp:I_def)
    2.95 +  have I_init: "I \<subseteq> init_seg_of" by(simp add: I_def)
    2.96    hence subch: "!!R. R : Chain I \<Longrightarrow> chain\<^bsub>\<subseteq>\<^esub> R"
    2.97      by(auto simp:init_seg_of_def chain_subset_def Chain_def)
    2.98    have Chain_wo: "!!R r. R \<in> Chain I \<Longrightarrow> r \<in> R \<Longrightarrow> Well_order r"
    2.99 @@ -437,7 +433,7 @@
   2.100        by(simp add: Chain_init_seg_of_Union)
   2.101      ultimately have "\<Union>R : ?WO \<and> (\<forall>r\<in>R. (r,\<Union>R) : I)"
   2.102        using mono_Chain[OF I_init] `R \<in> Chain I`
   2.103 -      by(simp (no_asm) add:I_def del:Field_Union)(metis Chain_wo subsetD)
   2.104 +      by(simp (no_asm) add:I_def del:Field_Union)(metis Chain_wo)
   2.105    }
   2.106    hence 1: "\<forall>R \<in> Chain I. \<exists>u\<in>Field I. \<forall>r\<in>R. (r,u) : I" by (subst FI) blast
   2.107  --{*Zorn's Lemma yields a maximal well-order m:*}
   2.108 @@ -475,7 +471,7 @@
   2.109      moreover have "wf(?m-Id)"
   2.110      proof-
   2.111        have "wf ?s" using `x \<notin> Field m`
   2.112 -        by(auto simp add:wf_eq_minimal Field_def Domain_unfold Domain_converse [symmetric]) metis
   2.113 +        by(simp add:wf_eq_minimal Field_def Domain_unfold Domain_converse [symmetric]) metis
   2.114        thus ?thesis using `wf(m-Id)` `x \<notin> Field m`
   2.115          wf_subset[OF `wf ?s` Diff_subset]
   2.116          by (fastforce intro!: wf_Un simp add: Un_Diff Field_def)