equal
deleted
inserted
replaced
10 |
10 |
11 datatype 'a discr = Discr "'a :: type" |
11 datatype 'a discr = Discr "'a :: type" |
12 |
12 |
13 subsection {* Type @{typ "'a discr"} is a discrete cpo *} |
13 subsection {* Type @{typ "'a discr"} is a discrete cpo *} |
14 |
14 |
15 instantiation discr :: (type) sq_ord |
15 instantiation discr :: (type) below |
16 begin |
16 begin |
17 |
17 |
18 definition |
18 definition |
19 less_discr_def: |
19 below_discr_def: |
20 "(op \<sqsubseteq> :: 'a discr \<Rightarrow> 'a discr \<Rightarrow> bool) = (op =)" |
20 "(op \<sqsubseteq> :: 'a discr \<Rightarrow> 'a discr \<Rightarrow> bool) = (op =)" |
21 |
21 |
22 instance .. |
22 instance .. |
23 end |
23 end |
24 |
24 |
25 instance discr :: (type) discrete_cpo |
25 instance discr :: (type) discrete_cpo |
26 by intro_classes (simp add: less_discr_def) |
26 by intro_classes (simp add: below_discr_def) |
27 |
27 |
28 lemma discr_less_eq [iff]: "((x::('a::type)discr) << y) = (x = y)" |
28 lemma discr_below_eq [iff]: "((x::('a::type)discr) << y) = (x = y)" |
29 by simp |
29 by simp (* FIXME: same discrete_cpo - remove? is [iff] important? *) |
30 |
30 |
31 subsection {* Type @{typ "'a discr"} is a cpo *} |
31 subsection {* Type @{typ "'a discr"} is a cpo *} |
32 |
32 |
33 lemma discr_chain0: |
33 lemma discr_chain0: |
34 "!!S::nat=>('a::type)discr. chain S ==> S i = S 0" |
34 "!!S::nat=>('a::type)discr. chain S ==> S i = S 0" |