equal
deleted
inserted
replaced
94 apply (case_tac "decode_list_u\<cdot>y", simp, simp) |
94 apply (case_tac "decode_list_u\<cdot>y", simp, simp) |
95 done |
95 done |
96 |
96 |
97 subsection {* Lists are a predomain *} |
97 subsection {* Lists are a predomain *} |
98 |
98 |
99 definition udefl :: "udom defl \<rightarrow> udom u defl" |
|
100 where "udefl = defl_fun1 (strictify\<cdot>up) (fup\<cdot>ID) ID" |
|
101 |
|
102 lemma cast_udefl: |
|
103 "cast\<cdot>(udefl\<cdot>t) = strictify\<cdot>up oo cast\<cdot>t oo fup\<cdot>ID" |
|
104 unfolding udefl_def by (simp add: cast_defl_fun1 ep_pair_strictify_up) |
|
105 |
|
106 definition list_liftdefl :: "udom u defl \<rightarrow> udom u defl" |
99 definition list_liftdefl :: "udom u defl \<rightarrow> udom u defl" |
107 where "list_liftdefl = (\<Lambda> a. udefl\<cdot>(slist_defl\<cdot>(u_defl\<cdot>a)))" |
100 where "list_liftdefl = (\<Lambda> a. udefl\<cdot>(slist_defl\<cdot>(u_defl\<cdot>a)))" |
108 |
101 |
109 lemma cast_slist_defl: "cast\<cdot>(slist_defl\<cdot>a) = emb oo slist_map\<cdot>(cast\<cdot>a) oo prj" |
102 lemma cast_slist_defl: "cast\<cdot>(slist_defl\<cdot>a) = emb oo slist_map\<cdot>(cast\<cdot>a) oo prj" |
110 using isodefl_slist [where fa="cast\<cdot>a" and da="a"] |
103 using isodefl_slist [where fa="cast\<cdot>a" and da="a"] |
111 unfolding isodefl_def by simp |
104 unfolding isodefl_def by simp |
112 |
|
113 lemma u_emb_bottom: "u_emb\<cdot>\<bottom> = \<bottom>" |
|
114 by (rule pcpo_ep_pair.e_strict [unfolded pcpo_ep_pair_def, OF ep_pair_u]) |
|
115 |
105 |
116 instantiation list :: (predomain) predomain |
106 instantiation list :: (predomain) predomain |
117 begin |
107 begin |
118 |
108 |
119 definition |
109 definition |
137 done |
127 done |
138 qed |
128 qed |
139 |
129 |
140 end |
130 end |
141 |
131 |
|
132 subsection {* Configuring domain package to work with list type *} |
|
133 |
142 lemma liftdefl_list [domain_defl_simps]: |
134 lemma liftdefl_list [domain_defl_simps]: |
143 "LIFTDEFL('a::predomain list) = list_liftdefl\<cdot>LIFTDEFL('a)" |
135 "LIFTDEFL('a::predomain list) = list_liftdefl\<cdot>LIFTDEFL('a)" |
144 by (rule liftdefl_list_def) |
136 by (rule liftdefl_list_def) |
145 |
|
146 subsection {* Configuring list type to work with domain package *} |
|
147 |
137 |
148 abbreviation list_map :: "('a::cpo \<rightarrow> 'b::cpo) \<Rightarrow> 'a list \<rightarrow> 'b list" |
138 abbreviation list_map :: "('a::cpo \<rightarrow> 'b::cpo) \<Rightarrow> 'a list \<rightarrow> 'b list" |
149 where "list_map f \<equiv> Abs_cfun (map (Rep_cfun f))" |
139 where "list_map f \<equiv> Abs_cfun (map (Rep_cfun f))" |
150 |
140 |
151 lemma list_map_ID [domain_map_ID]: "list_map ID = ID" |
141 lemma list_map_ID [domain_map_ID]: "list_map ID = ID" |