src/HOL/BNF_Wellorder_Relation.thy
changeset 55173 5556470a02b7
parent 55101 57c875e488bd
child 58889 5b7a9633cfa8
equal deleted inserted replaced
55171:dc7a6f6be01b 55173:5556470a02b7
    32 abbreviation UnderS where "UnderS \<equiv> Order_Relation.UnderS r"
    32 abbreviation UnderS where "UnderS \<equiv> Order_Relation.UnderS r"
    33 abbreviation above where "above \<equiv> Order_Relation.above r"
    33 abbreviation above where "above \<equiv> Order_Relation.above r"
    34 abbreviation aboveS where "aboveS \<equiv> Order_Relation.aboveS r"
    34 abbreviation aboveS where "aboveS \<equiv> Order_Relation.aboveS r"
    35 abbreviation Above where "Above \<equiv> Order_Relation.Above r"
    35 abbreviation Above where "Above \<equiv> Order_Relation.Above r"
    36 abbreviation AboveS where "AboveS \<equiv> Order_Relation.AboveS r"
    36 abbreviation AboveS where "AboveS \<equiv> Order_Relation.AboveS r"
       
    37 abbreviation ofilter where "ofilter \<equiv> Order_Relation.ofilter r"
       
    38 lemmas ofilter_def = Order_Relation.ofilter_def[of r]
    37 
    39 
    38 
    40 
    39 subsection {* Auxiliaries *}
    41 subsection {* Auxiliaries *}
    40 
    42 
    41 lemma REFL: "Refl r"
    43 lemma REFL: "Refl r"
   136 definition supr :: "'a set \<Rightarrow> 'a"
   138 definition supr :: "'a set \<Rightarrow> 'a"
   137 where "supr A \<equiv> minim (Above A)"
   139 where "supr A \<equiv> minim (Above A)"
   138 
   140 
   139 definition suc :: "'a set \<Rightarrow> 'a"
   141 definition suc :: "'a set \<Rightarrow> 'a"
   140 where "suc A \<equiv> minim (AboveS A)"
   142 where "suc A \<equiv> minim (AboveS A)"
   141 
       
   142 definition ofilter :: "'a set \<Rightarrow> bool"
       
   143 where
       
   144 "ofilter A \<equiv> (A \<le> Field r) \<and> (\<forall>a \<in> A. under a \<le> A)"
       
   145 
   143 
   146 
   144 
   147 subsubsection {* Properties of max2 *}
   145 subsubsection {* Properties of max2 *}
   148 
   146 
   149 lemma max2_greater_among:
   147 lemma max2_greater_among:
   436     moreover have "A \<le> Field r" using * ofilter_def by simp
   434     moreover have "A \<le> Field r" using * ofilter_def by simp
   437     ultimately have 1: "?B \<noteq> {}" by blast
   435     ultimately have 1: "?B \<noteq> {}" by blast
   438     hence 2: "?a \<in> Field r" using minim_inField[of ?B] by blast
   436     hence 2: "?a \<in> Field r" using minim_inField[of ?B] by blast
   439     have 3: "?a \<in> ?B" using minim_in[of ?B] 1 by blast
   437     have 3: "?a \<in> ?B" using minim_in[of ?B] 1 by blast
   440     hence 4: "?a \<notin> A" by blast
   438     hence 4: "?a \<notin> A" by blast
   441     have 5: "A \<le> Field r" using * ofilter_def[of A] by auto
   439     have 5: "A \<le> Field r" using * ofilter_def by auto
   442     (*  *)
   440     (*  *)
   443     moreover
   441     moreover
   444     have "A = underS ?a"
   442     have "A = underS ?a"
   445     proof
   443     proof
   446       show "A \<le> underS ?a"
   444       show "A \<le> underS ?a"