added unit :: linorder
authornipkow
Tue, 20 May 2014 16:00:00 +0200
changeset 57016 c44ce6f4067d
parent 57015 842bb6d36263
child 57017 afdf75c0de58
child 57023 0662ccd94158
added unit :: linorder
src/HOL/Product_Type.thy
--- a/src/HOL/Product_Type.thy	Tue May 20 15:59:16 2014 +0200
+++ b/src/HOL/Product_Type.thy	Tue May 20 16:00:00 2014 +0200
@@ -130,6 +130,22 @@
 
 end
 
+instantiation unit :: linorder
+begin
+
+definition less_eq_unit :: "unit \<Rightarrow> unit \<Rightarrow> bool" where
+"less_eq_unit _ _ = True"
+
+definition less_unit :: "unit \<Rightarrow> unit \<Rightarrow> bool" where
+"less_unit _ _ = False"
+
+declare less_eq_unit_def [simp] less_unit_def [simp]
+
+instance
+proof qed auto
+
+end
+
 lemma [code]:
   "HOL.equal (u\<Colon>unit) v \<longleftrightarrow> True" unfolding equal unit_eq [of u] unit_eq [of v] by rule+