equal
deleted
inserted
replaced
137 "less_eq_unit _ _ = True" |
137 "less_eq_unit _ _ = True" |
138 |
138 |
139 definition less_unit :: "unit \<Rightarrow> unit \<Rightarrow> bool" where |
139 definition less_unit :: "unit \<Rightarrow> unit \<Rightarrow> bool" where |
140 "less_unit _ _ = False" |
140 "less_unit _ _ = False" |
141 |
141 |
142 declare less_eq_unit_def [simp] less_unit_def [simp] |
142 declare less_eq_unit_def [simp, abs_def, code_unfold] less_unit_def [simp, abs_def, code_unfold] |
143 |
143 |
144 instance |
144 instance |
145 proof qed auto |
145 proof qed auto |
146 |
146 |
147 end |
147 end |
|
148 |
|
149 instantiation unit :: complete_boolean_algebra begin |
|
150 |
|
151 definition "top = ()" |
|
152 definition "bot = ()" |
|
153 definition [code_unfold]: "sup _ _ = ()" |
|
154 definition [code_unfold]: "inf _ _ = ()" |
|
155 definition "Sup _ = ()" |
|
156 definition "Inf _ = ()" |
|
157 definition [simp, code_unfold]: "uminus = (\<lambda>_ :: unit. ())" |
|
158 |
|
159 instance by intro_classes auto |
|
160 |
|
161 end |
|
162 |
|
163 instance unit :: "{complete_linorder, wellorder}" |
|
164 by intro_classes auto |
148 |
165 |
149 lemma [code]: |
166 lemma [code]: |
150 "HOL.equal (u\<Colon>unit) v \<longleftrightarrow> True" unfolding equal unit_eq [of u] unit_eq [of v] by rule+ |
167 "HOL.equal (u\<Colon>unit) v \<longleftrightarrow> True" unfolding equal unit_eq [of u] unit_eq [of v] by rule+ |
151 |
168 |
152 code_printing |
169 code_printing |