equal
deleted
inserted
replaced
27 by intro_classes (simp add: is_lub_def is_ub_def) |
27 by intro_classes (simp add: is_lub_def is_ub_def) |
28 |
28 |
29 instance unit :: pcpo |
29 instance unit :: pcpo |
30 by intro_classes simp |
30 by intro_classes simp |
31 |
31 |
32 |
32 constdefs |
33 subsection {* Type @{typ "'a * 'b"} is a partial order *} |
33 unit_when :: "'a \<rightarrow> unit \<rightarrow> 'a" |
|
34 "unit_when \<equiv> \<Lambda> a _. a" |
|
35 |
|
36 translations |
|
37 "\<Lambda>(). t" == "unit_when\<cdot>t" |
|
38 |
|
39 lemma unit_when [simp]: "unit_when\<cdot>a\<cdot>u = a" |
|
40 by (simp add: unit_when_def) |
|
41 |
|
42 |
|
43 subsection {* Product type is a partial order *} |
34 |
44 |
35 instance "*" :: (sq_ord, sq_ord) sq_ord .. |
45 instance "*" :: (sq_ord, sq_ord) sq_ord .. |
36 |
46 |
37 defs (overloaded) |
47 defs (overloaded) |
38 less_cprod_def: "(op \<sqsubseteq>) \<equiv> \<lambda>p1 p2. (fst p1 \<sqsubseteq> fst p2 \<and> snd p1 \<sqsubseteq> snd p2)" |
48 less_cprod_def: "(op \<sqsubseteq>) \<equiv> \<lambda>p1 p2. (fst p1 \<sqsubseteq> fst p2 \<and> snd p1 \<sqsubseteq> snd p2)" |
77 by (simp add: monofun_def less_cprod_def) |
87 by (simp add: monofun_def less_cprod_def) |
78 |
88 |
79 lemma monofun_snd: "monofun snd" |
89 lemma monofun_snd: "monofun snd" |
80 by (simp add: monofun_def less_cprod_def) |
90 by (simp add: monofun_def less_cprod_def) |
81 |
91 |
82 subsection {* Type @{typ "'a * 'b"} is a cpo *} |
92 subsection {* Product type is a cpo *} |
83 |
93 |
84 lemma lub_cprod: |
94 lemma lub_cprod: |
85 "chain S \<Longrightarrow> range S <<| (\<Squnion>i. fst (S i), \<Squnion>i. snd (S i))" |
95 "chain S \<Longrightarrow> range S <<| (\<Squnion>i. fst (S i), \<Squnion>i. snd (S i))" |
86 apply (rule is_lubI) |
96 apply (rule is_lubI) |
87 apply (rule ub_rangeI) |
97 apply (rule ub_rangeI) |
110 by (rule exI, erule lub_cprod) |
120 by (rule exI, erule lub_cprod) |
111 |
121 |
112 instance "*" :: (cpo, cpo) cpo |
122 instance "*" :: (cpo, cpo) cpo |
113 by intro_classes (rule cpo_cprod) |
123 by intro_classes (rule cpo_cprod) |
114 |
124 |
115 subsection {* Type @{typ "'a * 'b"} is pointed *} |
125 subsection {* Product type is pointed *} |
116 |
126 |
117 lemma minimal_cprod: "(\<bottom>, \<bottom>) \<sqsubseteq> p" |
127 lemma minimal_cprod: "(\<bottom>, \<bottom>) \<sqsubseteq> p" |
118 by (simp add: less_cprod_def) |
128 by (simp add: less_cprod_def) |
119 |
129 |
120 lemma least_cprod: "EX x::'a::pcpo * 'b::pcpo. ALL y. x \<sqsubseteq> y" |
130 lemma least_cprod: "EX x::'a::pcpo * 'b::pcpo. ALL y. x \<sqsubseteq> y" |