src/HOL/Orderings.thy
changeset 61169 4de9ff3ea29a
parent 61076 bdc1e2f0a86a
child 61378 3e04c9ca001a
equal deleted inserted replaced
61168:dcdfb6355a05 61169:4de9ff3ea29a
   194 
   194 
   195 lemma less_le: "x < y \<longleftrightarrow> x \<le> y \<and> x \<noteq> y"
   195 lemma less_le: "x < y \<longleftrightarrow> x \<le> y \<and> x \<noteq> y"
   196   by (auto simp add: less_le_not_le intro: antisym)
   196   by (auto simp add: less_le_not_le intro: antisym)
   197 
   197 
   198 sublocale order!: ordering less_eq less +  dual_order!: ordering greater_eq greater
   198 sublocale order!: ordering less_eq less +  dual_order!: ordering greater_eq greater
   199   by default (auto intro: antisym order_trans simp add: less_le)
   199   by standard (auto intro: antisym order_trans simp add: less_le)
   200 
   200 
   201 
   201 
   202 text \<open>Reflexivity.\<close>
   202 text \<open>Reflexivity.\<close>
   203 
   203 
   204 lemma le_less: "x \<le> y \<longleftrightarrow> x < y \<or> x = y"
   204 lemma le_less: "x \<le> y \<longleftrightarrow> x < y \<or> x = y"
  1195 class order_bot = order + bot +
  1195 class order_bot = order + bot +
  1196   assumes bot_least: "\<bottom> \<le> a"
  1196   assumes bot_least: "\<bottom> \<le> a"
  1197 begin
  1197 begin
  1198 
  1198 
  1199 sublocale bot!: ordering_top greater_eq greater bot
  1199 sublocale bot!: ordering_top greater_eq greater bot
  1200   by default (fact bot_least)
  1200   by standard (fact bot_least)
  1201 
  1201 
  1202 lemma le_bot:
  1202 lemma le_bot:
  1203   "a \<le> \<bottom> \<Longrightarrow> a = \<bottom>"
  1203   "a \<le> \<bottom> \<Longrightarrow> a = \<bottom>"
  1204   by (fact bot.extremum_uniqueI)
  1204   by (fact bot.extremum_uniqueI)
  1205 
  1205 
  1223 class order_top = order + top +
  1223 class order_top = order + top +
  1224   assumes top_greatest: "a \<le> \<top>"
  1224   assumes top_greatest: "a \<le> \<top>"
  1225 begin
  1225 begin
  1226 
  1226 
  1227 sublocale top!: ordering_top less_eq less top
  1227 sublocale top!: ordering_top less_eq less top
  1228   by default (fact top_greatest)
  1228   by standard (fact top_greatest)
  1229 
  1229 
  1230 lemma top_le:
  1230 lemma top_le:
  1231   "\<top> \<le> a \<Longrightarrow> a = \<top>"
  1231   "\<top> \<le> a \<Longrightarrow> a = \<top>"
  1232   by (fact top.extremum_uniqueI)
  1232   by (fact top.extremum_uniqueI)
  1233 
  1233