equal
deleted
inserted
replaced
1 (* Title: HOL/HOLCF/Discrete.thy |
1 (* Title: HOL/HOLCF/Discrete.thy |
2 Author: Tobias Nipkow |
2 Author: Tobias Nipkow |
3 *) |
3 *) |
4 |
4 |
5 section {* Discrete cpo types *} |
5 section \<open>Discrete cpo types\<close> |
6 |
6 |
7 theory Discrete |
7 theory Discrete |
8 imports Cont |
8 imports Cont |
9 begin |
9 begin |
10 |
10 |
11 datatype 'a discr = Discr "'a :: type" |
11 datatype 'a discr = Discr "'a :: type" |
12 |
12 |
13 subsection {* Discrete cpo class instance *} |
13 subsection \<open>Discrete cpo class instance\<close> |
14 |
14 |
15 instantiation discr :: (type) discrete_cpo |
15 instantiation discr :: (type) discrete_cpo |
16 begin |
16 begin |
17 |
17 |
18 definition |
18 definition |
21 instance |
21 instance |
22 by standard (simp add: below_discr_def) |
22 by standard (simp add: below_discr_def) |
23 |
23 |
24 end |
24 end |
25 |
25 |
26 subsection {* \emph{undiscr} *} |
26 subsection \<open>\emph{undiscr}\<close> |
27 |
27 |
28 definition |
28 definition |
29 undiscr :: "('a::type)discr => 'a" where |
29 undiscr :: "('a::type)discr => 'a" where |
30 "undiscr x = (case x of Discr y => y)" |
30 "undiscr x = (case x of Discr y => y)" |
31 |
31 |