| author | huffman | 
| Mon, 06 Dec 2010 14:17:35 -0800 | |
| changeset 41036 | 4acbacd6c5bc | 
| parent 40888 | 28cd51cff70c | 
| child 41110 | 32099ee71a2f | 
| permissions | -rw-r--r-- | 
| 25904 | 1  | 
(* Title: HOLCF/UpperPD.thy  | 
2  | 
Author: Brian Huffman  | 
|
3  | 
*)  | 
|
4  | 
||
5  | 
header {* Upper powerdomain *}
 | 
|
6  | 
||
7  | 
theory UpperPD  | 
|
8  | 
imports CompactBasis  | 
|
9  | 
begin  | 
|
10  | 
||
11  | 
subsection {* Basis preorder *}
 | 
|
12  | 
||
13  | 
definition  | 
|
14  | 
upper_le :: "'a pd_basis \<Rightarrow> 'a pd_basis \<Rightarrow> bool" (infix "\<le>\<sharp>" 50) where  | 
|
| 
26420
 
57a626f64875
make preorder locale into a superclass of class po
 
huffman 
parents: 
26407 
diff
changeset
 | 
15  | 
"upper_le = (\<lambda>u v. \<forall>y\<in>Rep_pd_basis v. \<exists>x\<in>Rep_pd_basis u. x \<sqsubseteq> y)"  | 
| 25904 | 16  | 
|
17  | 
lemma upper_le_refl [simp]: "t \<le>\<sharp> t"  | 
|
| 
26420
 
57a626f64875
make preorder locale into a superclass of class po
 
huffman 
parents: 
26407 
diff
changeset
 | 
18  | 
unfolding upper_le_def by fast  | 
| 25904 | 19  | 
|
20  | 
lemma upper_le_trans: "\<lbrakk>t \<le>\<sharp> u; u \<le>\<sharp> v\<rbrakk> \<Longrightarrow> t \<le>\<sharp> v"  | 
|
21  | 
unfolding upper_le_def  | 
|
22  | 
apply (rule ballI)  | 
|
23  | 
apply (drule (1) bspec, erule bexE)  | 
|
24  | 
apply (drule (1) bspec, erule bexE)  | 
|
25  | 
apply (erule rev_bexI)  | 
|
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
26  | 
apply (erule (1) below_trans)  | 
| 25904 | 27  | 
done  | 
28  | 
||
| 
30729
 
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
 
wenzelm 
parents: 
29990 
diff
changeset
 | 
29  | 
interpretation upper_le: preorder upper_le  | 
| 25904 | 30  | 
by (rule preorder.intro, rule upper_le_refl, rule upper_le_trans)  | 
31  | 
||
32  | 
lemma upper_le_minimal [simp]: "PDUnit compact_bot \<le>\<sharp> t"  | 
|
33  | 
unfolding upper_le_def Rep_PDUnit by simp  | 
|
34  | 
||
| 
26420
 
57a626f64875
make preorder locale into a superclass of class po
 
huffman 
parents: 
26407 
diff
changeset
 | 
35  | 
lemma PDUnit_upper_mono: "x \<sqsubseteq> y \<Longrightarrow> PDUnit x \<le>\<sharp> PDUnit y"  | 
| 25904 | 36  | 
unfolding upper_le_def Rep_PDUnit by simp  | 
37  | 
||
38  | 
lemma PDPlus_upper_mono: "\<lbrakk>s \<le>\<sharp> t; u \<le>\<sharp> v\<rbrakk> \<Longrightarrow> PDPlus s u \<le>\<sharp> PDPlus t v"  | 
|
39  | 
unfolding upper_le_def Rep_PDPlus by fast  | 
|
40  | 
||
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
41  | 
lemma PDPlus_upper_le: "PDPlus t u \<le>\<sharp> t"  | 
| 
26420
 
57a626f64875
make preorder locale into a superclass of class po
 
huffman 
parents: 
26407 
diff
changeset
 | 
42  | 
unfolding upper_le_def Rep_PDPlus by fast  | 
| 25904 | 43  | 
|
44  | 
lemma upper_le_PDUnit_PDUnit_iff [simp]:  | 
|
| 40436 | 45  | 
"(PDUnit a \<le>\<sharp> PDUnit b) = (a \<sqsubseteq> b)"  | 
| 25904 | 46  | 
unfolding upper_le_def Rep_PDUnit by fast  | 
47  | 
||
48  | 
lemma upper_le_PDPlus_PDUnit_iff:  | 
|
49  | 
"(PDPlus t u \<le>\<sharp> PDUnit a) = (t \<le>\<sharp> PDUnit a \<or> u \<le>\<sharp> PDUnit a)"  | 
|
50  | 
unfolding upper_le_def Rep_PDPlus Rep_PDUnit by fast  | 
|
51  | 
||
52  | 
lemma upper_le_PDPlus_iff: "(t \<le>\<sharp> PDPlus u v) = (t \<le>\<sharp> u \<and> t \<le>\<sharp> v)"  | 
|
53  | 
unfolding upper_le_def Rep_PDPlus by fast  | 
|
54  | 
||
55  | 
lemma upper_le_induct [induct set: upper_le]:  | 
|
56  | 
assumes le: "t \<le>\<sharp> u"  | 
|
| 
26420
 
57a626f64875
make preorder locale into a superclass of class po
 
huffman 
parents: 
26407 
diff
changeset
 | 
57  | 
assumes 1: "\<And>a b. a \<sqsubseteq> b \<Longrightarrow> P (PDUnit a) (PDUnit b)"  | 
| 25904 | 58  | 
assumes 2: "\<And>t u a. P t (PDUnit a) \<Longrightarrow> P (PDPlus t u) (PDUnit a)"  | 
59  | 
assumes 3: "\<And>t u v. \<lbrakk>P t u; P t v\<rbrakk> \<Longrightarrow> P t (PDPlus u v)"  | 
|
60  | 
shows "P t u"  | 
|
61  | 
using le apply (induct u arbitrary: t rule: pd_basis_induct)  | 
|
62  | 
apply (erule rev_mp)  | 
|
63  | 
apply (induct_tac t rule: pd_basis_induct)  | 
|
64  | 
apply (simp add: 1)  | 
|
65  | 
apply (simp add: upper_le_PDPlus_PDUnit_iff)  | 
|
66  | 
apply (simp add: 2)  | 
|
67  | 
apply (subst PDPlus_commute)  | 
|
68  | 
apply (simp add: 2)  | 
|
69  | 
apply (simp add: upper_le_PDPlus_iff 3)  | 
|
70  | 
done  | 
|
71  | 
||
72  | 
||
73  | 
subsection {* Type definition *}
 | 
|
74  | 
||
| 
27373
 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 
huffman 
parents: 
27310 
diff
changeset
 | 
75  | 
typedef (open) 'a upper_pd =  | 
| 
 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 
huffman 
parents: 
27310 
diff
changeset
 | 
76  | 
  "{S::'a pd_basis set. upper_le.ideal S}"
 | 
| 
40888
 
28cd51cff70c
reformulate lemma preorder.ex_ideal, and use it for typedefs
 
huffman 
parents: 
40774 
diff
changeset
 | 
77  | 
by (rule upper_le.ex_ideal)  | 
| 
27373
 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 
huffman 
parents: 
27310 
diff
changeset
 | 
78  | 
|
| 40497 | 79  | 
instantiation upper_pd :: ("domain") below
 | 
| 
27373
 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 
huffman 
parents: 
27310 
diff
changeset
 | 
80  | 
begin  | 
| 
 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 
huffman 
parents: 
27310 
diff
changeset
 | 
81  | 
|
| 
 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 
huffman 
parents: 
27310 
diff
changeset
 | 
82  | 
definition  | 
| 
 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 
huffman 
parents: 
27310 
diff
changeset
 | 
83  | 
"x \<sqsubseteq> y \<longleftrightarrow> Rep_upper_pd x \<subseteq> Rep_upper_pd y"  | 
| 
 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 
huffman 
parents: 
27310 
diff
changeset
 | 
84  | 
|
| 
 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 
huffman 
parents: 
27310 
diff
changeset
 | 
85  | 
instance ..  | 
| 
 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 
huffman 
parents: 
27310 
diff
changeset
 | 
86  | 
end  | 
| 25904 | 87  | 
|
| 40497 | 88  | 
instance upper_pd :: ("domain") po
 | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
89  | 
using type_definition_upper_pd below_upper_pd_def  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
90  | 
by (rule upper_le.typedef_ideal_po)  | 
| 
27373
 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 
huffman 
parents: 
27310 
diff
changeset
 | 
91  | 
|
| 40497 | 92  | 
instance upper_pd :: ("domain") cpo
 | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
93  | 
using type_definition_upper_pd below_upper_pd_def  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
94  | 
by (rule upper_le.typedef_ideal_cpo)  | 
| 
27373
 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 
huffman 
parents: 
27310 
diff
changeset
 | 
95  | 
|
| 25904 | 96  | 
definition  | 
97  | 
upper_principal :: "'a pd_basis \<Rightarrow> 'a upper_pd" where  | 
|
| 
27373
 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 
huffman 
parents: 
27310 
diff
changeset
 | 
98  | 
  "upper_principal t = Abs_upper_pd {u. u \<le>\<sharp> t}"
 | 
| 25904 | 99  | 
|
| 
30729
 
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
 
wenzelm 
parents: 
29990 
diff
changeset
 | 
100  | 
interpretation upper_pd:  | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
101  | 
ideal_completion upper_le upper_principal Rep_upper_pd  | 
| 39984 | 102  | 
using type_definition_upper_pd below_upper_pd_def  | 
103  | 
using upper_principal_def pd_basis_countable  | 
|
104  | 
by (rule upper_le.typedef_ideal_completion)  | 
|
| 25904 | 105  | 
|
| 27289 | 106  | 
text {* Upper powerdomain is pointed *}
 | 
| 25904 | 107  | 
|
108  | 
lemma upper_pd_minimal: "upper_principal (PDUnit compact_bot) \<sqsubseteq> ys"  | 
|
109  | 
by (induct ys rule: upper_pd.principal_induct, simp, simp)  | 
|
110  | 
||
| 40497 | 111  | 
instance upper_pd :: ("domain") pcpo
 | 
| 26927 | 112  | 
by intro_classes (fast intro: upper_pd_minimal)  | 
| 25904 | 113  | 
|
114  | 
lemma inst_upper_pd_pcpo: "\<bottom> = upper_principal (PDUnit compact_bot)"  | 
|
115  | 
by (rule upper_pd_minimal [THEN UU_I, symmetric])  | 
|
116  | 
||
117  | 
||
| 26927 | 118  | 
subsection {* Monadic unit and plus *}
 | 
| 25904 | 119  | 
|
120  | 
definition  | 
|
121  | 
upper_unit :: "'a \<rightarrow> 'a upper_pd" where  | 
|
122  | 
"upper_unit = compact_basis.basis_fun (\<lambda>a. upper_principal (PDUnit a))"  | 
|
123  | 
||
124  | 
definition  | 
|
125  | 
upper_plus :: "'a upper_pd \<rightarrow> 'a upper_pd \<rightarrow> 'a upper_pd" where  | 
|
126  | 
"upper_plus = upper_pd.basis_fun (\<lambda>t. upper_pd.basis_fun (\<lambda>u.  | 
|
127  | 
upper_principal (PDPlus t u)))"  | 
|
128  | 
||
129  | 
abbreviation  | 
|
130  | 
upper_add :: "'a upper_pd \<Rightarrow> 'a upper_pd \<Rightarrow> 'a upper_pd"  | 
|
131  | 
(infixl "+\<sharp>" 65) where  | 
|
132  | 
"xs +\<sharp> ys == upper_plus\<cdot>xs\<cdot>ys"  | 
|
133  | 
||
| 26927 | 134  | 
syntax  | 
135  | 
  "_upper_pd" :: "args \<Rightarrow> 'a upper_pd" ("{_}\<sharp>")
 | 
|
136  | 
||
137  | 
translations  | 
|
138  | 
  "{x,xs}\<sharp>" == "{x}\<sharp> +\<sharp> {xs}\<sharp>"
 | 
|
139  | 
  "{x}\<sharp>" == "CONST upper_unit\<cdot>x"
 | 
|
140  | 
||
141  | 
lemma upper_unit_Rep_compact_basis [simp]:  | 
|
142  | 
  "{Rep_compact_basis a}\<sharp> = upper_principal (PDUnit a)"
 | 
|
143  | 
unfolding upper_unit_def  | 
|
| 27289 | 144  | 
by (simp add: compact_basis.basis_fun_principal PDUnit_upper_mono)  | 
| 26927 | 145  | 
|
| 25904 | 146  | 
lemma upper_plus_principal [simp]:  | 
| 26927 | 147  | 
"upper_principal t +\<sharp> upper_principal u = upper_principal (PDPlus t u)"  | 
| 25904 | 148  | 
unfolding upper_plus_def  | 
149  | 
by (simp add: upper_pd.basis_fun_principal  | 
|
150  | 
upper_pd.basis_fun_mono PDPlus_upper_mono)  | 
|
151  | 
||
| 
37770
 
cddb3106adb8
avoid explicit mandatory prefix markers when prefixes are mandatory implicitly
 
haftmann 
parents: 
36635 
diff
changeset
 | 
152  | 
interpretation upper_add: semilattice upper_add proof  | 
| 
34973
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
153  | 
fix xs ys zs :: "'a upper_pd"  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
154  | 
show "(xs +\<sharp> ys) +\<sharp> zs = xs +\<sharp> (ys +\<sharp> zs)"  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
155  | 
apply (induct xs ys arbitrary: zs rule: upper_pd.principal_induct2, simp, simp)  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
156  | 
apply (rule_tac x=zs in upper_pd.principal_induct, simp)  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
157  | 
apply (simp add: PDPlus_assoc)  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
158  | 
done  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
159  | 
show "xs +\<sharp> ys = ys +\<sharp> xs"  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
160  | 
apply (induct xs ys rule: upper_pd.principal_induct2, simp, simp)  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
161  | 
apply (simp add: PDPlus_commute)  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
162  | 
done  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
163  | 
show "xs +\<sharp> xs = xs"  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
164  | 
apply (induct xs rule: upper_pd.principal_induct, simp)  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
165  | 
apply (simp add: PDPlus_absorb)  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
166  | 
done  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
167  | 
qed  | 
| 26927 | 168  | 
|
| 
34973
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
169  | 
lemmas upper_plus_assoc = upper_add.assoc  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
170  | 
lemmas upper_plus_commute = upper_add.commute  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
171  | 
lemmas upper_plus_absorb = upper_add.idem  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
172  | 
lemmas upper_plus_left_commute = upper_add.left_commute  | 
| 
 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 
haftmann 
parents: 
33808 
diff
changeset
 | 
173  | 
lemmas upper_plus_left_absorb = upper_add.left_idem  | 
| 26927 | 174  | 
|
| 
29990
 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 
huffman 
parents: 
29672 
diff
changeset
 | 
175  | 
text {* Useful for @{text "simp add: upper_plus_ac"} *}
 | 
| 
 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 
huffman 
parents: 
29672 
diff
changeset
 | 
176  | 
lemmas upper_plus_ac =  | 
| 
 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 
huffman 
parents: 
29672 
diff
changeset
 | 
177  | 
upper_plus_assoc upper_plus_commute upper_plus_left_commute  | 
| 
 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 
huffman 
parents: 
29672 
diff
changeset
 | 
178  | 
|
| 
 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 
huffman 
parents: 
29672 
diff
changeset
 | 
179  | 
text {* Useful for @{text "simp only: upper_plus_aci"} *}
 | 
| 
 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 
huffman 
parents: 
29672 
diff
changeset
 | 
180  | 
lemmas upper_plus_aci =  | 
| 
 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 
huffman 
parents: 
29672 
diff
changeset
 | 
181  | 
upper_plus_ac upper_plus_absorb upper_plus_left_absorb  | 
| 
 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 
huffman 
parents: 
29672 
diff
changeset
 | 
182  | 
|
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
183  | 
lemma upper_plus_below1: "xs +\<sharp> ys \<sqsubseteq> xs"  | 
| 27289 | 184  | 
apply (induct xs ys rule: upper_pd.principal_induct2, simp, simp)  | 
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
185  | 
apply (simp add: PDPlus_upper_le)  | 
| 25904 | 186  | 
done  | 
187  | 
||
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
188  | 
lemma upper_plus_below2: "xs +\<sharp> ys \<sqsubseteq> ys"  | 
| 
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
189  | 
by (subst upper_plus_commute, rule upper_plus_below1)  | 
| 25904 | 190  | 
|
| 26927 | 191  | 
lemma upper_plus_greatest: "\<lbrakk>xs \<sqsubseteq> ys; xs \<sqsubseteq> zs\<rbrakk> \<Longrightarrow> xs \<sqsubseteq> ys +\<sharp> zs"  | 
| 25904 | 192  | 
apply (subst upper_plus_absorb [of xs, symmetric])  | 
193  | 
apply (erule (1) monofun_cfun [OF monofun_cfun_arg])  | 
|
194  | 
done  | 
|
195  | 
||
| 40734 | 196  | 
lemma upper_below_plus_iff [simp]:  | 
| 26927 | 197  | 
"xs \<sqsubseteq> ys +\<sharp> zs \<longleftrightarrow> xs \<sqsubseteq> ys \<and> xs \<sqsubseteq> zs"  | 
| 25904 | 198  | 
apply safe  | 
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
199  | 
apply (erule below_trans [OF _ upper_plus_below1])  | 
| 
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
200  | 
apply (erule below_trans [OF _ upper_plus_below2])  | 
| 25904 | 201  | 
apply (erule (1) upper_plus_greatest)  | 
202  | 
done  | 
|
203  | 
||
| 40734 | 204  | 
lemma upper_plus_below_unit_iff [simp]:  | 
| 26927 | 205  | 
  "xs +\<sharp> ys \<sqsubseteq> {z}\<sharp> \<longleftrightarrow> xs \<sqsubseteq> {z}\<sharp> \<or> ys \<sqsubseteq> {z}\<sharp>"
 | 
| 
39970
 
9023b897e67a
simplify proofs of powerdomain inequalities
 
Brian Huffman <brianh@cs.pdx.edu> 
parents: 
37770 
diff
changeset
 | 
206  | 
apply (induct xs rule: upper_pd.principal_induct, simp)  | 
| 
 
9023b897e67a
simplify proofs of powerdomain inequalities
 
Brian Huffman <brianh@cs.pdx.edu> 
parents: 
37770 
diff
changeset
 | 
207  | 
apply (induct ys rule: upper_pd.principal_induct, simp)  | 
| 
 
9023b897e67a
simplify proofs of powerdomain inequalities
 
Brian Huffman <brianh@cs.pdx.edu> 
parents: 
37770 
diff
changeset
 | 
208  | 
apply (induct z rule: compact_basis.principal_induct, simp)  | 
| 
 
9023b897e67a
simplify proofs of powerdomain inequalities
 
Brian Huffman <brianh@cs.pdx.edu> 
parents: 
37770 
diff
changeset
 | 
209  | 
apply (simp add: upper_le_PDPlus_PDUnit_iff)  | 
| 25904 | 210  | 
done  | 
211  | 
||
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
212  | 
lemma upper_unit_below_iff [simp]: "{x}\<sharp> \<sqsubseteq> {y}\<sharp> \<longleftrightarrow> x \<sqsubseteq> y"
 | 
| 
39970
 
9023b897e67a
simplify proofs of powerdomain inequalities
 
Brian Huffman <brianh@cs.pdx.edu> 
parents: 
37770 
diff
changeset
 | 
213  | 
apply (induct x rule: compact_basis.principal_induct, simp)  | 
| 
 
9023b897e67a
simplify proofs of powerdomain inequalities
 
Brian Huffman <brianh@cs.pdx.edu> 
parents: 
37770 
diff
changeset
 | 
214  | 
apply (induct y rule: compact_basis.principal_induct, simp)  | 
| 
 
9023b897e67a
simplify proofs of powerdomain inequalities
 
Brian Huffman <brianh@cs.pdx.edu> 
parents: 
37770 
diff
changeset
 | 
215  | 
apply simp  | 
| 26927 | 216  | 
done  | 
217  | 
||
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
218  | 
lemmas upper_pd_below_simps =  | 
| 
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
219  | 
upper_unit_below_iff  | 
| 
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
220  | 
upper_below_plus_iff  | 
| 
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
221  | 
upper_plus_below_unit_iff  | 
| 25904 | 222  | 
|
| 26927 | 223  | 
lemma upper_unit_eq_iff [simp]: "{x}\<sharp> = {y}\<sharp> \<longleftrightarrow> x = y"
 | 
224  | 
unfolding po_eq_conv by simp  | 
|
225  | 
||
226  | 
lemma upper_unit_strict [simp]: "{\<bottom>}\<sharp> = \<bottom>"
 | 
|
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
227  | 
using upper_unit_Rep_compact_basis [of compact_bot]  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
228  | 
by (simp add: inst_upper_pd_pcpo)  | 
| 26927 | 229  | 
|
230  | 
lemma upper_plus_strict1 [simp]: "\<bottom> +\<sharp> ys = \<bottom>"  | 
|
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
231  | 
by (rule UU_I, rule upper_plus_below1)  | 
| 26927 | 232  | 
|
233  | 
lemma upper_plus_strict2 [simp]: "xs +\<sharp> \<bottom> = \<bottom>"  | 
|
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
234  | 
by (rule UU_I, rule upper_plus_below2)  | 
| 26927 | 235  | 
|
| 
40321
 
d065b195ec89
rename lemmas *_defined_iff and *_strict_iff to *_bottom_iff
 
huffman 
parents: 
40002 
diff
changeset
 | 
236  | 
lemma upper_unit_bottom_iff [simp]: "{x}\<sharp> = \<bottom> \<longleftrightarrow> x = \<bottom>"
 | 
| 26927 | 237  | 
unfolding upper_unit_strict [symmetric] by (rule upper_unit_eq_iff)  | 
238  | 
||
| 
40321
 
d065b195ec89
rename lemmas *_defined_iff and *_strict_iff to *_bottom_iff
 
huffman 
parents: 
40002 
diff
changeset
 | 
239  | 
lemma upper_plus_bottom_iff [simp]:  | 
| 26927 | 240  | 
"xs +\<sharp> ys = \<bottom> \<longleftrightarrow> xs = \<bottom> \<or> ys = \<bottom>"  | 
241  | 
apply (rule iffI)  | 
|
242  | 
apply (erule rev_mp)  | 
|
| 27289 | 243  | 
apply (rule upper_pd.principal_induct2 [where x=xs and y=ys], simp, simp)  | 
244  | 
apply (simp add: inst_upper_pd_pcpo upper_pd.principal_eq_iff  | 
|
| 26927 | 245  | 
upper_le_PDPlus_PDUnit_iff)  | 
246  | 
apply auto  | 
|
247  | 
done  | 
|
248  | 
||
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
249  | 
lemma compact_upper_unit: "compact x \<Longrightarrow> compact {x}\<sharp>"
 | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
250  | 
by (auto dest!: compact_basis.compact_imp_principal)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
251  | 
|
| 26927 | 252  | 
lemma compact_upper_unit_iff [simp]: "compact {x}\<sharp> \<longleftrightarrow> compact x"
 | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
253  | 
apply (safe elim!: compact_upper_unit)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
254  | 
apply (simp only: compact_def upper_unit_below_iff [symmetric])  | 
| 40327 | 255  | 
apply (erule adm_subst [OF cont_Rep_cfun2])  | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
256  | 
done  | 
| 26927 | 257  | 
|
258  | 
lemma compact_upper_plus [simp]:  | 
|
259  | 
"\<lbrakk>compact xs; compact ys\<rbrakk> \<Longrightarrow> compact (xs +\<sharp> ys)"  | 
|
| 27289 | 260  | 
by (auto dest!: upper_pd.compact_imp_principal)  | 
| 26927 | 261  | 
|
| 25904 | 262  | 
|
263  | 
subsection {* Induction rules *}
 | 
|
264  | 
||
265  | 
lemma upper_pd_induct1:  | 
|
266  | 
assumes P: "adm P"  | 
|
| 26927 | 267  | 
  assumes unit: "\<And>x. P {x}\<sharp>"
 | 
268  | 
  assumes insert: "\<And>x ys. \<lbrakk>P {x}\<sharp>; P ys\<rbrakk> \<Longrightarrow> P ({x}\<sharp> +\<sharp> ys)"
 | 
|
| 25904 | 269  | 
shows "P (xs::'a upper_pd)"  | 
| 27289 | 270  | 
apply (induct xs rule: upper_pd.principal_induct, rule P)  | 
271  | 
apply (induct_tac a rule: pd_basis_induct1)  | 
|
| 25904 | 272  | 
apply (simp only: upper_unit_Rep_compact_basis [symmetric])  | 
273  | 
apply (rule unit)  | 
|
274  | 
apply (simp only: upper_unit_Rep_compact_basis [symmetric]  | 
|
275  | 
upper_plus_principal [symmetric])  | 
|
276  | 
apply (erule insert [OF unit])  | 
|
277  | 
done  | 
|
278  | 
||
| 
40576
 
fa5e0cacd5e7
declare {upper,lower,convex}_pd_induct as default induction rules
 
huffman 
parents: 
40497 
diff
changeset
 | 
279  | 
lemma upper_pd_induct  | 
| 
 
fa5e0cacd5e7
declare {upper,lower,convex}_pd_induct as default induction rules
 
huffman 
parents: 
40497 
diff
changeset
 | 
280  | 
[case_names adm upper_unit upper_plus, induct type: upper_pd]:  | 
| 25904 | 281  | 
assumes P: "adm P"  | 
| 26927 | 282  | 
  assumes unit: "\<And>x. P {x}\<sharp>"
 | 
283  | 
assumes plus: "\<And>xs ys. \<lbrakk>P xs; P ys\<rbrakk> \<Longrightarrow> P (xs +\<sharp> ys)"  | 
|
| 25904 | 284  | 
shows "P (xs::'a upper_pd)"  | 
| 27289 | 285  | 
apply (induct xs rule: upper_pd.principal_induct, rule P)  | 
286  | 
apply (induct_tac a rule: pd_basis_induct)  | 
|
| 25904 | 287  | 
apply (simp only: upper_unit_Rep_compact_basis [symmetric] unit)  | 
288  | 
apply (simp only: upper_plus_principal [symmetric] plus)  | 
|
289  | 
done  | 
|
290  | 
||
291  | 
||
292  | 
subsection {* Monadic bind *}
 | 
|
293  | 
||
294  | 
definition  | 
|
295  | 
upper_bind_basis ::  | 
|
296  | 
  "'a pd_basis \<Rightarrow> ('a \<rightarrow> 'b upper_pd) \<rightarrow> 'b upper_pd" where
 | 
|
297  | 
"upper_bind_basis = fold_pd  | 
|
298  | 
(\<lambda>a. \<Lambda> f. f\<cdot>(Rep_compact_basis a))  | 
|
| 26927 | 299  | 
(\<lambda>x y. \<Lambda> f. x\<cdot>f +\<sharp> y\<cdot>f)"  | 
| 25904 | 300  | 
|
| 26927 | 301  | 
lemma ACI_upper_bind:  | 
| 
36635
 
080b755377c0
locale predicates of classes carry a mandatory "class" prefix
 
haftmann 
parents: 
35901 
diff
changeset
 | 
302  | 
"class.ab_semigroup_idem_mult (\<lambda>x y. \<Lambda> f. x\<cdot>f +\<sharp> y\<cdot>f)"  | 
| 25904 | 303  | 
apply unfold_locales  | 
| 
26041
 
c2e15e65165f
locales ACf, ACIf, ACIfSL and ACIfSLlin have been abandoned in favour of the existing algebraic classes ab_semigroup_mult, ab_semigroup_idem_mult, lower_semilattice (resp. uper_semilattice) and linorder
 
haftmann 
parents: 
25925 
diff
changeset
 | 
304  | 
apply (simp add: upper_plus_assoc)  | 
| 25904 | 305  | 
apply (simp add: upper_plus_commute)  | 
| 
29990
 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 
huffman 
parents: 
29672 
diff
changeset
 | 
306  | 
apply (simp add: eta_cfun)  | 
| 25904 | 307  | 
done  | 
308  | 
||
309  | 
lemma upper_bind_basis_simps [simp]:  | 
|
310  | 
"upper_bind_basis (PDUnit a) =  | 
|
311  | 
(\<Lambda> f. f\<cdot>(Rep_compact_basis a))"  | 
|
312  | 
"upper_bind_basis (PDPlus t u) =  | 
|
| 26927 | 313  | 
(\<Lambda> f. upper_bind_basis t\<cdot>f +\<sharp> upper_bind_basis u\<cdot>f)"  | 
| 25904 | 314  | 
unfolding upper_bind_basis_def  | 
315  | 
apply -  | 
|
| 26927 | 316  | 
apply (rule fold_pd_PDUnit [OF ACI_upper_bind])  | 
317  | 
apply (rule fold_pd_PDPlus [OF ACI_upper_bind])  | 
|
| 25904 | 318  | 
done  | 
319  | 
||
320  | 
lemma upper_bind_basis_mono:  | 
|
321  | 
"t \<le>\<sharp> u \<Longrightarrow> upper_bind_basis t \<sqsubseteq> upper_bind_basis u"  | 
|
| 
40002
 
c5b5f7a3a3b1
new theorem names: fun_below_iff, fun_belowI, cfun_eq_iff, cfun_eqI, cfun_below_iff, cfun_belowI
 
huffman 
parents: 
39989 
diff
changeset
 | 
322  | 
unfolding cfun_below_iff  | 
| 25904 | 323  | 
apply (erule upper_le_induct, safe)  | 
| 27289 | 324  | 
apply (simp add: monofun_cfun)  | 
| 
31076
 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 
huffman 
parents: 
30729 
diff
changeset
 | 
325  | 
apply (simp add: below_trans [OF upper_plus_below1])  | 
| 40734 | 326  | 
apply simp  | 
| 25904 | 327  | 
done  | 
328  | 
||
329  | 
definition  | 
|
330  | 
  upper_bind :: "'a upper_pd \<rightarrow> ('a \<rightarrow> 'b upper_pd) \<rightarrow> 'b upper_pd" where
 | 
|
331  | 
"upper_bind = upper_pd.basis_fun upper_bind_basis"  | 
|
332  | 
||
| 
41036
 
4acbacd6c5bc
add set-union-like syntax for powerdomain bind operators
 
huffman 
parents: 
40888 
diff
changeset
 | 
333  | 
syntax  | 
| 
 
4acbacd6c5bc
add set-union-like syntax for powerdomain bind operators
 
huffman 
parents: 
40888 
diff
changeset
 | 
334  | 
"_upper_bind" :: "[logic, logic, logic] \<Rightarrow> logic"  | 
| 
 
4acbacd6c5bc
add set-union-like syntax for powerdomain bind operators
 
huffman 
parents: 
40888 
diff
changeset
 | 
335  | 
    ("(3\<Union>\<sharp>_\<in>_./ _)" [0, 0, 10] 10)
 | 
| 
 
4acbacd6c5bc
add set-union-like syntax for powerdomain bind operators
 
huffman 
parents: 
40888 
diff
changeset
 | 
336  | 
|
| 
 
4acbacd6c5bc
add set-union-like syntax for powerdomain bind operators
 
huffman 
parents: 
40888 
diff
changeset
 | 
337  | 
translations  | 
| 
 
4acbacd6c5bc
add set-union-like syntax for powerdomain bind operators
 
huffman 
parents: 
40888 
diff
changeset
 | 
338  | 
"\<Union>\<sharp>x\<in>xs. e" == "CONST upper_bind\<cdot>xs\<cdot>(\<Lambda> x. e)"  | 
| 
 
4acbacd6c5bc
add set-union-like syntax for powerdomain bind operators
 
huffman 
parents: 
40888 
diff
changeset
 | 
339  | 
|
| 25904 | 340  | 
lemma upper_bind_principal [simp]:  | 
341  | 
"upper_bind\<cdot>(upper_principal t) = upper_bind_basis t"  | 
|
342  | 
unfolding upper_bind_def  | 
|
343  | 
apply (rule upper_pd.basis_fun_principal)  | 
|
344  | 
apply (erule upper_bind_basis_mono)  | 
|
345  | 
done  | 
|
346  | 
||
347  | 
lemma upper_bind_unit [simp]:  | 
|
| 26927 | 348  | 
  "upper_bind\<cdot>{x}\<sharp>\<cdot>f = f\<cdot>x"
 | 
| 27289 | 349  | 
by (induct x rule: compact_basis.principal_induct, simp, simp)  | 
| 25904 | 350  | 
|
351  | 
lemma upper_bind_plus [simp]:  | 
|
| 26927 | 352  | 
"upper_bind\<cdot>(xs +\<sharp> ys)\<cdot>f = upper_bind\<cdot>xs\<cdot>f +\<sharp> upper_bind\<cdot>ys\<cdot>f"  | 
| 27289 | 353  | 
by (induct xs ys rule: upper_pd.principal_induct2, simp, simp, simp)  | 
| 25904 | 354  | 
|
355  | 
lemma upper_bind_strict [simp]: "upper_bind\<cdot>\<bottom>\<cdot>f = f\<cdot>\<bottom>"  | 
|
356  | 
unfolding upper_unit_strict [symmetric] by (rule upper_bind_unit)  | 
|
357  | 
||
| 40589 | 358  | 
lemma upper_bind_bind:  | 
359  | 
"upper_bind\<cdot>(upper_bind\<cdot>xs\<cdot>f)\<cdot>g = upper_bind\<cdot>xs\<cdot>(\<Lambda> x. upper_bind\<cdot>(f\<cdot>x)\<cdot>g)"  | 
|
360  | 
by (induct xs, simp_all)  | 
|
361  | 
||
| 25904 | 362  | 
|
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
363  | 
subsection {* Map *}
 | 
| 25904 | 364  | 
|
365  | 
definition  | 
|
366  | 
  upper_map :: "('a \<rightarrow> 'b) \<rightarrow> 'a upper_pd \<rightarrow> 'b upper_pd" where
 | 
|
| 26927 | 367  | 
  "upper_map = (\<Lambda> f xs. upper_bind\<cdot>xs\<cdot>(\<Lambda> x. {f\<cdot>x}\<sharp>))"
 | 
| 25904 | 368  | 
|
369  | 
lemma upper_map_unit [simp]:  | 
|
| 26927 | 370  | 
  "upper_map\<cdot>f\<cdot>{x}\<sharp> = {f\<cdot>x}\<sharp>"
 | 
| 25904 | 371  | 
unfolding upper_map_def by simp  | 
372  | 
||
373  | 
lemma upper_map_plus [simp]:  | 
|
| 26927 | 374  | 
"upper_map\<cdot>f\<cdot>(xs +\<sharp> ys) = upper_map\<cdot>f\<cdot>xs +\<sharp> upper_map\<cdot>f\<cdot>ys"  | 
| 25904 | 375  | 
unfolding upper_map_def by simp  | 
376  | 
||
| 40577 | 377  | 
lemma upper_map_bottom [simp]: "upper_map\<cdot>f\<cdot>\<bottom> = {f\<cdot>\<bottom>}\<sharp>"
 | 
378  | 
unfolding upper_map_def by simp  | 
|
379  | 
||
| 25904 | 380  | 
lemma upper_map_ident: "upper_map\<cdot>(\<Lambda> x. x)\<cdot>xs = xs"  | 
381  | 
by (induct xs rule: upper_pd_induct, simp_all)  | 
|
382  | 
||
| 33808 | 383  | 
lemma upper_map_ID: "upper_map\<cdot>ID = ID"  | 
| 
40002
 
c5b5f7a3a3b1
new theorem names: fun_below_iff, fun_belowI, cfun_eq_iff, cfun_eqI, cfun_below_iff, cfun_belowI
 
huffman 
parents: 
39989 
diff
changeset
 | 
384  | 
by (simp add: cfun_eq_iff ID_def upper_map_ident)  | 
| 33808 | 385  | 
|
| 25904 | 386  | 
lemma upper_map_map:  | 
387  | 
"upper_map\<cdot>f\<cdot>(upper_map\<cdot>g\<cdot>xs) = upper_map\<cdot>(\<Lambda> x. f\<cdot>(g\<cdot>x))\<cdot>xs"  | 
|
388  | 
by (induct xs rule: upper_pd_induct, simp_all)  | 
|
389  | 
||
| 
33585
 
8d39394fe5cf
ep_pair and deflation lemmas for powerdomain map functions
 
huffman 
parents: 
31076 
diff
changeset
 | 
390  | 
lemma ep_pair_upper_map: "ep_pair e p \<Longrightarrow> ep_pair (upper_map\<cdot>e) (upper_map\<cdot>p)"  | 
| 
 
8d39394fe5cf
ep_pair and deflation lemmas for powerdomain map functions
 
huffman 
parents: 
31076 
diff
changeset
 | 
391  | 
apply default  | 
| 
 
8d39394fe5cf
ep_pair and deflation lemmas for powerdomain map functions
 
huffman 
parents: 
31076 
diff
changeset
 | 
392  | 
apply (induct_tac x rule: upper_pd_induct, simp_all add: ep_pair.e_inverse)  | 
| 
35901
 
12f09bf2c77f
fix LaTeX overfull hbox warnings in HOLCF document
 
huffman 
parents: 
34973 
diff
changeset
 | 
393  | 
apply (induct_tac y rule: upper_pd_induct)  | 
| 40734 | 394  | 
apply (simp_all add: ep_pair.e_p_below monofun_cfun del: upper_below_plus_iff)  | 
| 
33585
 
8d39394fe5cf
ep_pair and deflation lemmas for powerdomain map functions
 
huffman 
parents: 
31076 
diff
changeset
 | 
395  | 
done  | 
| 
 
8d39394fe5cf
ep_pair and deflation lemmas for powerdomain map functions
 
huffman 
parents: 
31076 
diff
changeset
 | 
396  | 
|
| 
 
8d39394fe5cf
ep_pair and deflation lemmas for powerdomain map functions
 
huffman 
parents: 
31076 
diff
changeset
 | 
397  | 
lemma deflation_upper_map: "deflation d \<Longrightarrow> deflation (upper_map\<cdot>d)"  | 
| 
 
8d39394fe5cf
ep_pair and deflation lemmas for powerdomain map functions
 
huffman 
parents: 
31076 
diff
changeset
 | 
398  | 
apply default  | 
| 
 
8d39394fe5cf
ep_pair and deflation lemmas for powerdomain map functions
 
huffman 
parents: 
31076 
diff
changeset
 | 
399  | 
apply (induct_tac x rule: upper_pd_induct, simp_all add: deflation.idem)  | 
| 
35901
 
12f09bf2c77f
fix LaTeX overfull hbox warnings in HOLCF document
 
huffman 
parents: 
34973 
diff
changeset
 | 
400  | 
apply (induct_tac x rule: upper_pd_induct)  | 
| 40734 | 401  | 
apply (simp_all add: deflation.below monofun_cfun del: upper_below_plus_iff)  | 
| 
33585
 
8d39394fe5cf
ep_pair and deflation lemmas for powerdomain map functions
 
huffman 
parents: 
31076 
diff
changeset
 | 
402  | 
done  | 
| 
 
8d39394fe5cf
ep_pair and deflation lemmas for powerdomain map functions
 
huffman 
parents: 
31076 
diff
changeset
 | 
403  | 
|
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
404  | 
(* FIXME: long proof! *)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
405  | 
lemma finite_deflation_upper_map:  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
406  | 
assumes "finite_deflation d" shows "finite_deflation (upper_map\<cdot>d)"  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
407  | 
proof (rule finite_deflation_intro)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
408  | 
interpret d: finite_deflation d by fact  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
409  | 
have "deflation d" by fact  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
410  | 
thus "deflation (upper_map\<cdot>d)" by (rule deflation_upper_map)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
411  | 
have "finite (range (\<lambda>x. d\<cdot>x))" by (rule d.finite_range)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
412  | 
hence "finite (Rep_compact_basis -` range (\<lambda>x. d\<cdot>x))"  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
413  | 
by (rule finite_vimageI, simp add: inj_on_def Rep_compact_basis_inject)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
414  | 
hence "finite (Pow (Rep_compact_basis -` range (\<lambda>x. d\<cdot>x)))" by simp  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
415  | 
hence "finite (Rep_pd_basis -` (Pow (Rep_compact_basis -` range (\<lambda>x. d\<cdot>x))))"  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
416  | 
by (rule finite_vimageI, simp add: inj_on_def Rep_pd_basis_inject)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
417  | 
hence *: "finite (upper_principal ` Rep_pd_basis -` (Pow (Rep_compact_basis -` range (\<lambda>x. d\<cdot>x))))" by simp  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
418  | 
hence "finite (range (\<lambda>xs. upper_map\<cdot>d\<cdot>xs))"  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
419  | 
apply (rule rev_finite_subset)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
420  | 
apply clarsimp  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
421  | 
apply (induct_tac xs rule: upper_pd.principal_induct)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
422  | 
apply (simp add: adm_mem_finite *)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
423  | 
apply (rename_tac t, induct_tac t rule: pd_basis_induct)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
424  | 
apply (simp only: upper_unit_Rep_compact_basis [symmetric] upper_map_unit)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
425  | 
apply simp  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
426  | 
apply (subgoal_tac "\<exists>b. d\<cdot>(Rep_compact_basis a) = Rep_compact_basis b")  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
427  | 
apply clarsimp  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
428  | 
apply (rule imageI)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
429  | 
apply (rule vimageI2)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
430  | 
apply (simp add: Rep_PDUnit)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
431  | 
apply (rule range_eqI)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
432  | 
apply (erule sym)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
433  | 
apply (rule exI)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
434  | 
apply (rule Abs_compact_basis_inverse [symmetric])  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
435  | 
apply (simp add: d.compact)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
436  | 
apply (simp only: upper_plus_principal [symmetric] upper_map_plus)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
437  | 
apply clarsimp  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
438  | 
apply (rule imageI)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
439  | 
apply (rule vimageI2)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
440  | 
apply (simp add: Rep_PDPlus)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
441  | 
done  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
442  | 
  thus "finite {xs. upper_map\<cdot>d\<cdot>xs = xs}"
 | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
443  | 
by (rule finite_range_imp_finite_fixes)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
444  | 
qed  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
445  | 
|
| 40497 | 446  | 
subsection {* Upper powerdomain is a domain *}
 | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
447  | 
|
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
448  | 
definition  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
449  | 
upper_approx :: "nat \<Rightarrow> udom upper_pd \<rightarrow> udom upper_pd"  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
450  | 
where  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
451  | 
"upper_approx = (\<lambda>i. upper_map\<cdot>(udom_approx i))"  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
452  | 
|
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
453  | 
lemma upper_approx: "approx_chain upper_approx"  | 
| 
40484
 
768f7e264e2b
reorganize Bifinite.thy; simplify some proofs related to bifinite class instances
 
huffman 
parents: 
40436 
diff
changeset
 | 
454  | 
using upper_map_ID finite_deflation_upper_map  | 
| 
 
768f7e264e2b
reorganize Bifinite.thy; simplify some proofs related to bifinite class instances
 
huffman 
parents: 
40436 
diff
changeset
 | 
455  | 
unfolding upper_approx_def by (rule approx_chain_lemma1)  | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
456  | 
|
| 
39989
 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 
huffman 
parents: 
39986 
diff
changeset
 | 
457  | 
definition upper_defl :: "defl \<rightarrow> defl"  | 
| 
 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 
huffman 
parents: 
39986 
diff
changeset
 | 
458  | 
where "upper_defl = defl_fun1 upper_approx upper_map"  | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
459  | 
|
| 
39989
 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 
huffman 
parents: 
39986 
diff
changeset
 | 
460  | 
lemma cast_upper_defl:  | 
| 
 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 
huffman 
parents: 
39986 
diff
changeset
 | 
461  | 
"cast\<cdot>(upper_defl\<cdot>A) =  | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
462  | 
udom_emb upper_approx oo upper_map\<cdot>(cast\<cdot>A) oo udom_prj upper_approx"  | 
| 
40484
 
768f7e264e2b
reorganize Bifinite.thy; simplify some proofs related to bifinite class instances
 
huffman 
parents: 
40436 
diff
changeset
 | 
463  | 
using upper_approx finite_deflation_upper_map  | 
| 
 
768f7e264e2b
reorganize Bifinite.thy; simplify some proofs related to bifinite class instances
 
huffman 
parents: 
40436 
diff
changeset
 | 
464  | 
unfolding upper_defl_def by (rule cast_defl_fun1)  | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
465  | 
|
| 40497 | 466  | 
instantiation upper_pd :: ("domain") liftdomain
 | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
467  | 
begin  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
468  | 
|
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
469  | 
definition  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
470  | 
"emb = udom_emb upper_approx oo upper_map\<cdot>emb"  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
471  | 
|
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
472  | 
definition  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
473  | 
"prj = upper_map\<cdot>prj oo udom_prj upper_approx"  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
474  | 
|
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
475  | 
definition  | 
| 
39989
 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 
huffman 
parents: 
39986 
diff
changeset
 | 
476  | 
  "defl (t::'a upper_pd itself) = upper_defl\<cdot>DEFL('a)"
 | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
477  | 
|
| 
40491
 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 
huffman 
parents: 
40484 
diff
changeset
 | 
478  | 
definition  | 
| 
 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 
huffman 
parents: 
40484 
diff
changeset
 | 
479  | 
"(liftemb :: 'a upper_pd u \<rightarrow> udom) = udom_emb u_approx oo u_map\<cdot>emb"  | 
| 
 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 
huffman 
parents: 
40484 
diff
changeset
 | 
480  | 
|
| 
 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 
huffman 
parents: 
40484 
diff
changeset
 | 
481  | 
definition  | 
| 
 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 
huffman 
parents: 
40484 
diff
changeset
 | 
482  | 
"(liftprj :: udom \<rightarrow> 'a upper_pd u) = u_map\<cdot>prj oo udom_prj u_approx"  | 
| 
 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 
huffman 
parents: 
40484 
diff
changeset
 | 
483  | 
|
| 
 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 
huffman 
parents: 
40484 
diff
changeset
 | 
484  | 
definition  | 
| 
 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 
huffman 
parents: 
40484 
diff
changeset
 | 
485  | 
  "liftdefl (t::'a upper_pd itself) = u_defl\<cdot>DEFL('a upper_pd)"
 | 
| 
 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 
huffman 
parents: 
40484 
diff
changeset
 | 
486  | 
|
| 
 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 
huffman 
parents: 
40484 
diff
changeset
 | 
487  | 
instance  | 
| 
 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 
huffman 
parents: 
40484 
diff
changeset
 | 
488  | 
using liftemb_upper_pd_def liftprj_upper_pd_def liftdefl_upper_pd_def  | 
| 
40494
 
db8a09daba7b
add class liftdomain, for bifinite domains where DEFL('a u) = u_defl('a)
 
huffman 
parents: 
40491 
diff
changeset
 | 
489  | 
proof (rule liftdomain_class_intro)  | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
490  | 
show "ep_pair emb (prj :: udom \<rightarrow> 'a upper_pd)"  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
491  | 
unfolding emb_upper_pd_def prj_upper_pd_def  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
492  | 
using ep_pair_udom [OF upper_approx]  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
493  | 
by (intro ep_pair_comp ep_pair_upper_map ep_pair_emb_prj)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
494  | 
next  | 
| 
39989
 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 
huffman 
parents: 
39986 
diff
changeset
 | 
495  | 
  show "cast\<cdot>DEFL('a upper_pd) = emb oo (prj :: udom \<rightarrow> 'a upper_pd)"
 | 
| 
 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 
huffman 
parents: 
39986 
diff
changeset
 | 
496  | 
unfolding emb_upper_pd_def prj_upper_pd_def defl_upper_pd_def cast_upper_defl  | 
| 
40002
 
c5b5f7a3a3b1
new theorem names: fun_below_iff, fun_belowI, cfun_eq_iff, cfun_eqI, cfun_below_iff, cfun_belowI
 
huffman 
parents: 
39989 
diff
changeset
 | 
497  | 
by (simp add: cast_DEFL oo_def cfun_eq_iff upper_map_map)  | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
498  | 
qed  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
499  | 
|
| 25904 | 500  | 
end  | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
501  | 
|
| 
39989
 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 
huffman 
parents: 
39986 
diff
changeset
 | 
502  | 
lemma DEFL_upper: "DEFL('a upper_pd) = upper_defl\<cdot>DEFL('a)"
 | 
| 
 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 
huffman 
parents: 
39986 
diff
changeset
 | 
503  | 
by (rule defl_upper_pd_def)  | 
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
504  | 
|
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
505  | 
|
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
506  | 
subsection {* Join *}
 | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
507  | 
|
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
508  | 
definition  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
509  | 
upper_join :: "'a upper_pd upper_pd \<rightarrow> 'a upper_pd" where  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
510  | 
"upper_join = (\<Lambda> xss. upper_bind\<cdot>xss\<cdot>(\<Lambda> xs. xs))"  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
511  | 
|
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
512  | 
lemma upper_join_unit [simp]:  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
513  | 
  "upper_join\<cdot>{xs}\<sharp> = xs"
 | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
514  | 
unfolding upper_join_def by simp  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
515  | 
|
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
516  | 
lemma upper_join_plus [simp]:  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
517  | 
"upper_join\<cdot>(xss +\<sharp> yss) = upper_join\<cdot>xss +\<sharp> upper_join\<cdot>yss"  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
518  | 
unfolding upper_join_def by simp  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
519  | 
|
| 40577 | 520  | 
lemma upper_join_bottom [simp]: "upper_join\<cdot>\<bottom> = \<bottom>"  | 
521  | 
unfolding upper_join_def by simp  | 
|
522  | 
||
| 
39974
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
523  | 
lemma upper_join_map_unit:  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
524  | 
"upper_join\<cdot>(upper_map\<cdot>upper_unit\<cdot>xs) = xs"  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
525  | 
by (induct xs rule: upper_pd_induct, simp_all)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
526  | 
|
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
527  | 
lemma upper_join_map_join:  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
528  | 
"upper_join\<cdot>(upper_map\<cdot>upper_join\<cdot>xsss) = upper_join\<cdot>(upper_join\<cdot>xsss)"  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
529  | 
by (induct xsss rule: upper_pd_induct, simp_all)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
530  | 
|
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
531  | 
lemma upper_join_map_map:  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
532  | 
"upper_join\<cdot>(upper_map\<cdot>(upper_map\<cdot>f)\<cdot>xss) =  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
533  | 
upper_map\<cdot>f\<cdot>(upper_join\<cdot>xss)"  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
534  | 
by (induct xss rule: upper_pd_induct, simp_all)  | 
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
535  | 
|
| 
 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 
huffman 
parents: 
39970 
diff
changeset
 | 
536  | 
end  |