src/HOL/Orderings.thy
changeset 21546 268b6bed0cc8
parent 21524 7843e2fd14a9
child 21620 3d4bfc7f6363
equal deleted inserted replaced
21545:54cc492d80a9 21546:268b6bed0cc8
   820 
   820 
   821   Alternatively, one can use "declare xtrans [trans]" and then
   821   Alternatively, one can use "declare xtrans [trans]" and then
   822   leave out the "(xtrans)" above.
   822   leave out the "(xtrans)" above.
   823 *)
   823 *)
   824 
   824 
       
   825 subsection {* Order on bool *}
       
   826 
       
   827 instance bool :: linorder 
       
   828   le_bool_def: "P \<le> Q \<equiv> P \<longrightarrow> Q"
       
   829   less_bool_def: "P < Q \<equiv> P \<le> Q \<and> P \<noteq> Q"
       
   830   by default (auto simp add: le_bool_def less_bool_def)
       
   831 
       
   832 lemma le_boolI: "(P \<Longrightarrow> Q) \<Longrightarrow> P \<le> Q"
       
   833   by (simp add: le_bool_def)
       
   834 
       
   835 lemma le_boolI': "P \<longrightarrow> Q \<Longrightarrow> P \<le> Q"
       
   836   by (simp add: le_bool_def)
       
   837 
       
   838 lemma le_boolE: "P \<le> Q \<Longrightarrow> P \<Longrightarrow> (Q \<Longrightarrow> R) \<Longrightarrow> R"
       
   839   by (simp add: le_bool_def)
       
   840 
       
   841 lemma le_boolD: "P \<le> Q \<Longrightarrow> P \<longrightarrow> Q"
       
   842   by (simp add: le_bool_def)
       
   843 
   825 subsection {* Monotonicity, syntactic least value operator and min/max *}
   844 subsection {* Monotonicity, syntactic least value operator and min/max *}
   826 
   845 
   827 locale mono =
   846 locale mono =
   828   fixes f
   847   fixes f
   829   assumes mono: "A \<le> B \<Longrightarrow> f A \<le> f B"
   848   assumes mono: "A \<le> B \<Longrightarrow> f A \<le> f B"