| author | blanchet | 
| Wed, 15 Dec 2010 11:26:29 +0100 | |
| changeset 41155 | 85da8cbb4966 | 
| parent 41111 | b497cc48e563 | 
| child 41286 | 3d7685a4a5ff | 
| permissions | -rw-r--r-- | 
| 25904 | 1 | (* Title: HOLCF/ConvexPD.thy | 
| 2 | Author: Brian Huffman | |
| 3 | *) | |
| 4 | ||
| 5 | header {* Convex powerdomain *}
 | |
| 6 | ||
| 7 | theory ConvexPD | |
| 8 | imports UpperPD LowerPD | |
| 9 | begin | |
| 10 | ||
| 11 | subsection {* Basis preorder *}
 | |
| 12 | ||
| 13 | definition | |
| 14 | convex_le :: "'a pd_basis \<Rightarrow> 'a pd_basis \<Rightarrow> bool" (infix "\<le>\<natural>" 50) where | |
| 15 | "convex_le = (\<lambda>u v. u \<le>\<sharp> v \<and> u \<le>\<flat> v)" | |
| 16 | ||
| 17 | lemma convex_le_refl [simp]: "t \<le>\<natural> t" | |
| 18 | unfolding convex_le_def by (fast intro: upper_le_refl lower_le_refl) | |
| 19 | ||
| 20 | lemma convex_le_trans: "\<lbrakk>t \<le>\<natural> u; u \<le>\<natural> v\<rbrakk> \<Longrightarrow> t \<le>\<natural> v" | |
| 21 | unfolding convex_le_def by (fast intro: upper_le_trans lower_le_trans) | |
| 22 | ||
| 30729 
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
 wenzelm parents: 
29990diff
changeset | 23 | interpretation convex_le: preorder convex_le | 
| 25904 | 24 | by (rule preorder.intro, rule convex_le_refl, rule convex_le_trans) | 
| 25 | ||
| 26 | lemma upper_le_minimal [simp]: "PDUnit compact_bot \<le>\<natural> t" | |
| 27 | unfolding convex_le_def Rep_PDUnit by simp | |
| 28 | ||
| 26420 
57a626f64875
make preorder locale into a superclass of class po
 huffman parents: 
26407diff
changeset | 29 | lemma PDUnit_convex_mono: "x \<sqsubseteq> y \<Longrightarrow> PDUnit x \<le>\<natural> PDUnit y" | 
| 25904 | 30 | unfolding convex_le_def by (fast intro: PDUnit_upper_mono PDUnit_lower_mono) | 
| 31 | ||
| 32 | lemma PDPlus_convex_mono: "\<lbrakk>s \<le>\<natural> t; u \<le>\<natural> v\<rbrakk> \<Longrightarrow> PDPlus s u \<le>\<natural> PDPlus t v" | |
| 33 | unfolding convex_le_def by (fast intro: PDPlus_upper_mono PDPlus_lower_mono) | |
| 34 | ||
| 35 | lemma convex_le_PDUnit_PDUnit_iff [simp]: | |
| 40436 | 36 | "(PDUnit a \<le>\<natural> PDUnit b) = (a \<sqsubseteq> b)" | 
| 25904 | 37 | unfolding convex_le_def upper_le_def lower_le_def Rep_PDUnit by fast | 
| 38 | ||
| 39 | lemma convex_le_PDUnit_lemma1: | |
| 26420 
57a626f64875
make preorder locale into a superclass of class po
 huffman parents: 
26407diff
changeset | 40 | "(PDUnit a \<le>\<natural> t) = (\<forall>b\<in>Rep_pd_basis t. a \<sqsubseteq> b)" | 
| 25904 | 41 | unfolding convex_le_def upper_le_def lower_le_def Rep_PDUnit | 
| 42 | using Rep_pd_basis_nonempty [of t, folded ex_in_conv] by fast | |
| 43 | ||
| 44 | lemma convex_le_PDUnit_PDPlus_iff [simp]: | |
| 45 | "(PDUnit a \<le>\<natural> PDPlus t u) = (PDUnit a \<le>\<natural> t \<and> PDUnit a \<le>\<natural> u)" | |
| 46 | unfolding convex_le_PDUnit_lemma1 Rep_PDPlus by fast | |
| 47 | ||
| 48 | lemma convex_le_PDUnit_lemma2: | |
| 26420 
57a626f64875
make preorder locale into a superclass of class po
 huffman parents: 
26407diff
changeset | 49 | "(t \<le>\<natural> PDUnit b) = (\<forall>a\<in>Rep_pd_basis t. a \<sqsubseteq> b)" | 
| 25904 | 50 | unfolding convex_le_def upper_le_def lower_le_def Rep_PDUnit | 
| 51 | using Rep_pd_basis_nonempty [of t, folded ex_in_conv] by fast | |
| 52 | ||
| 53 | lemma convex_le_PDPlus_PDUnit_iff [simp]: | |
| 54 | "(PDPlus t u \<le>\<natural> PDUnit a) = (t \<le>\<natural> PDUnit a \<and> u \<le>\<natural> PDUnit a)" | |
| 55 | unfolding convex_le_PDUnit_lemma2 Rep_PDPlus by fast | |
| 56 | ||
| 57 | lemma convex_le_PDPlus_lemma: | |
| 58 | assumes z: "PDPlus t u \<le>\<natural> z" | |
| 59 | shows "\<exists>v w. z = PDPlus v w \<and> t \<le>\<natural> v \<and> u \<le>\<natural> w" | |
| 60 | proof (intro exI conjI) | |
| 26420 
57a626f64875
make preorder locale into a superclass of class po
 huffman parents: 
26407diff
changeset | 61 |   let ?A = "{b\<in>Rep_pd_basis z. \<exists>a\<in>Rep_pd_basis t. a \<sqsubseteq> b}"
 | 
| 
57a626f64875
make preorder locale into a superclass of class po
 huffman parents: 
26407diff
changeset | 62 |   let ?B = "{b\<in>Rep_pd_basis z. \<exists>a\<in>Rep_pd_basis u. a \<sqsubseteq> b}"
 | 
| 25904 | 63 | let ?v = "Abs_pd_basis ?A" | 
| 64 | let ?w = "Abs_pd_basis ?B" | |
| 65 | have Rep_v: "Rep_pd_basis ?v = ?A" | |
| 66 | apply (rule Abs_pd_basis_inverse) | |
| 67 | apply (rule Rep_pd_basis_nonempty [of t, folded ex_in_conv, THEN exE]) | |
| 68 | apply (cut_tac z, simp only: convex_le_def lower_le_def, clarify) | |
| 69 | apply (drule_tac x=x in bspec, simp add: Rep_PDPlus, erule bexE) | |
| 70 | apply (simp add: pd_basis_def) | |
| 71 | apply fast | |
| 72 | done | |
| 73 | have Rep_w: "Rep_pd_basis ?w = ?B" | |
| 74 | apply (rule Abs_pd_basis_inverse) | |
| 75 | apply (rule Rep_pd_basis_nonempty [of u, folded ex_in_conv, THEN exE]) | |
| 76 | apply (cut_tac z, simp only: convex_le_def lower_le_def, clarify) | |
| 77 | apply (drule_tac x=x in bspec, simp add: Rep_PDPlus, erule bexE) | |
| 78 | apply (simp add: pd_basis_def) | |
| 79 | apply fast | |
| 80 | done | |
| 81 | show "z = PDPlus ?v ?w" | |
| 82 | apply (insert z) | |
| 83 | apply (simp add: convex_le_def, erule conjE) | |
| 84 | apply (simp add: Rep_pd_basis_inject [symmetric] Rep_PDPlus) | |
| 85 | apply (simp add: Rep_v Rep_w) | |
| 86 | apply (rule equalityI) | |
| 87 | apply (rule subsetI) | |
| 88 | apply (simp only: upper_le_def) | |
| 89 | apply (drule (1) bspec, erule bexE) | |
| 90 | apply (simp add: Rep_PDPlus) | |
| 91 | apply fast | |
| 92 | apply fast | |
| 93 | done | |
| 94 | show "t \<le>\<natural> ?v" "u \<le>\<natural> ?w" | |
| 95 | apply (insert z) | |
| 96 | apply (simp_all add: convex_le_def upper_le_def lower_le_def Rep_PDPlus Rep_v Rep_w) | |
| 97 | apply fast+ | |
| 98 | done | |
| 99 | qed | |
| 100 | ||
| 101 | lemma convex_le_induct [induct set: convex_le]: | |
| 102 | assumes le: "t \<le>\<natural> u" | |
| 103 | assumes 2: "\<And>t u v. \<lbrakk>P t u; P u v\<rbrakk> \<Longrightarrow> P t v" | |
| 26420 
57a626f64875
make preorder locale into a superclass of class po
 huffman parents: 
26407diff
changeset | 104 | assumes 3: "\<And>a b. a \<sqsubseteq> b \<Longrightarrow> P (PDUnit a) (PDUnit b)" | 
| 25904 | 105 | assumes 4: "\<And>t u v w. \<lbrakk>P t v; P u w\<rbrakk> \<Longrightarrow> P (PDPlus t u) (PDPlus v w)" | 
| 106 | shows "P t u" | |
| 107 | using le apply (induct t arbitrary: u rule: pd_basis_induct) | |
| 108 | apply (erule rev_mp) | |
| 109 | apply (induct_tac u rule: pd_basis_induct1) | |
| 110 | apply (simp add: 3) | |
| 111 | apply (simp, clarify, rename_tac a b t) | |
| 112 | apply (subgoal_tac "P (PDPlus (PDUnit a) (PDUnit a)) (PDPlus (PDUnit b) t)") | |
| 113 | apply (simp add: PDPlus_absorb) | |
| 114 | apply (erule (1) 4 [OF 3]) | |
| 115 | apply (drule convex_le_PDPlus_lemma, clarify) | |
| 116 | apply (simp add: 4) | |
| 117 | done | |
| 118 | ||
| 119 | ||
| 120 | subsection {* Type definition *}
 | |
| 121 | ||
| 27373 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 huffman parents: 
27310diff
changeset | 122 | typedef (open) 'a convex_pd = | 
| 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 huffman parents: 
27310diff
changeset | 123 |   "{S::'a pd_basis set. convex_le.ideal S}"
 | 
| 40888 
28cd51cff70c
reformulate lemma preorder.ex_ideal, and use it for typedefs
 huffman parents: 
40774diff
changeset | 124 | by (rule convex_le.ex_ideal) | 
| 27373 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 huffman parents: 
27310diff
changeset | 125 | |
| 41111 | 126 | type_notation (xsymbols) convex_pd ("('(_')\<natural>)")
 | 
| 127 | ||
| 40497 | 128 | instantiation convex_pd :: ("domain") below
 | 
| 27373 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 huffman parents: 
27310diff
changeset | 129 | begin | 
| 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 huffman parents: 
27310diff
changeset | 130 | |
| 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 huffman parents: 
27310diff
changeset | 131 | definition | 
| 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 huffman parents: 
27310diff
changeset | 132 | "x \<sqsubseteq> y \<longleftrightarrow> Rep_convex_pd x \<subseteq> Rep_convex_pd y" | 
| 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 huffman parents: 
27310diff
changeset | 133 | |
| 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 huffman parents: 
27310diff
changeset | 134 | instance .. | 
| 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 huffman parents: 
27310diff
changeset | 135 | end | 
| 25904 | 136 | |
| 40497 | 137 | instance convex_pd :: ("domain") po
 | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 138 | using type_definition_convex_pd below_convex_pd_def | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 139 | by (rule convex_le.typedef_ideal_po) | 
| 27373 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 huffman parents: 
27310diff
changeset | 140 | |
| 40497 | 141 | instance convex_pd :: ("domain") cpo
 | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 142 | using type_definition_convex_pd below_convex_pd_def | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 143 | by (rule convex_le.typedef_ideal_cpo) | 
| 27373 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 huffman parents: 
27310diff
changeset | 144 | |
| 25904 | 145 | definition | 
| 146 | convex_principal :: "'a pd_basis \<Rightarrow> 'a convex_pd" where | |
| 27373 
5794a0e3e26c
remove cset theory; define ideal completions using typedef instead of cpodef
 huffman parents: 
27310diff
changeset | 147 |   "convex_principal t = Abs_convex_pd {u. u \<le>\<natural> t}"
 | 
| 25904 | 148 | |
| 30729 
461ee3e49ad3
interpretation/interpret: prefixes are mandatory by default;
 wenzelm parents: 
29990diff
changeset | 149 | interpretation convex_pd: | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 150 | ideal_completion convex_le convex_principal Rep_convex_pd | 
| 39984 | 151 | using type_definition_convex_pd below_convex_pd_def | 
| 152 | using convex_principal_def pd_basis_countable | |
| 153 | by (rule convex_le.typedef_ideal_completion) | |
| 25904 | 154 | |
| 27289 | 155 | text {* Convex powerdomain is pointed *}
 | 
| 25904 | 156 | |
| 157 | lemma convex_pd_minimal: "convex_principal (PDUnit compact_bot) \<sqsubseteq> ys" | |
| 158 | by (induct ys rule: convex_pd.principal_induct, simp, simp) | |
| 159 | ||
| 40497 | 160 | instance convex_pd :: ("domain") pcpo
 | 
| 26927 | 161 | by intro_classes (fast intro: convex_pd_minimal) | 
| 25904 | 162 | |
| 163 | lemma inst_convex_pd_pcpo: "\<bottom> = convex_principal (PDUnit compact_bot)" | |
| 164 | by (rule convex_pd_minimal [THEN UU_I, symmetric]) | |
| 165 | ||
| 166 | ||
| 26927 | 167 | subsection {* Monadic unit and plus *}
 | 
| 25904 | 168 | |
| 169 | definition | |
| 170 | convex_unit :: "'a \<rightarrow> 'a convex_pd" where | |
| 171 | "convex_unit = compact_basis.basis_fun (\<lambda>a. convex_principal (PDUnit a))" | |
| 172 | ||
| 173 | definition | |
| 174 | convex_plus :: "'a convex_pd \<rightarrow> 'a convex_pd \<rightarrow> 'a convex_pd" where | |
| 175 | "convex_plus = convex_pd.basis_fun (\<lambda>t. convex_pd.basis_fun (\<lambda>u. | |
| 176 | convex_principal (PDPlus t u)))" | |
| 177 | ||
| 178 | abbreviation | |
| 179 | convex_add :: "'a convex_pd \<Rightarrow> 'a convex_pd \<Rightarrow> 'a convex_pd" | |
| 180 | (infixl "+\<natural>" 65) where | |
| 181 | "xs +\<natural> ys == convex_plus\<cdot>xs\<cdot>ys" | |
| 182 | ||
| 26927 | 183 | syntax | 
| 184 |   "_convex_pd" :: "args \<Rightarrow> 'a convex_pd" ("{_}\<natural>")
 | |
| 185 | ||
| 186 | translations | |
| 187 |   "{x,xs}\<natural>" == "{x}\<natural> +\<natural> {xs}\<natural>"
 | |
| 188 |   "{x}\<natural>" == "CONST convex_unit\<cdot>x"
 | |
| 189 | ||
| 190 | lemma convex_unit_Rep_compact_basis [simp]: | |
| 191 |   "{Rep_compact_basis a}\<natural> = convex_principal (PDUnit a)"
 | |
| 192 | unfolding convex_unit_def | |
| 27289 | 193 | by (simp add: compact_basis.basis_fun_principal PDUnit_convex_mono) | 
| 26927 | 194 | |
| 25904 | 195 | lemma convex_plus_principal [simp]: | 
| 26927 | 196 | "convex_principal t +\<natural> convex_principal u = convex_principal (PDPlus t u)" | 
| 25904 | 197 | unfolding convex_plus_def | 
| 198 | by (simp add: convex_pd.basis_fun_principal | |
| 199 | convex_pd.basis_fun_mono PDPlus_convex_mono) | |
| 200 | ||
| 37770 
cddb3106adb8
avoid explicit mandatory prefix markers when prefixes are mandatory implicitly
 haftmann parents: 
36635diff
changeset | 201 | interpretation convex_add: semilattice convex_add proof | 
| 34973 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 202 | fix xs ys zs :: "'a convex_pd" | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 203 | show "(xs +\<natural> ys) +\<natural> zs = xs +\<natural> (ys +\<natural> zs)" | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 204 | apply (induct xs ys arbitrary: zs rule: convex_pd.principal_induct2, simp, simp) | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 205 | apply (rule_tac x=zs in convex_pd.principal_induct, simp) | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 206 | apply (simp add: PDPlus_assoc) | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 207 | done | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 208 | show "xs +\<natural> ys = ys +\<natural> xs" | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 209 | apply (induct xs ys rule: convex_pd.principal_induct2, simp, simp) | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 210 | apply (simp add: PDPlus_commute) | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 211 | done | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 212 | show "xs +\<natural> xs = xs" | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 213 | apply (induct xs rule: convex_pd.principal_induct, simp) | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 214 | apply (simp add: PDPlus_absorb) | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 215 | done | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 216 | qed | 
| 26927 | 217 | |
| 34973 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 218 | lemmas convex_plus_assoc = convex_add.assoc | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 219 | lemmas convex_plus_commute = convex_add.commute | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 220 | lemmas convex_plus_absorb = convex_add.idem | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 221 | lemmas convex_plus_left_commute = convex_add.left_commute | 
| 
ae634fad947e
dropped mk_left_commute; use interpretation of locale abel_semigroup instead
 haftmann parents: 
33808diff
changeset | 222 | lemmas convex_plus_left_absorb = convex_add.left_idem | 
| 26927 | 223 | |
| 29990 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 huffman parents: 
29672diff
changeset | 224 | text {* Useful for @{text "simp add: convex_plus_ac"} *}
 | 
| 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 huffman parents: 
29672diff
changeset | 225 | lemmas convex_plus_ac = | 
| 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 huffman parents: 
29672diff
changeset | 226 | convex_plus_assoc convex_plus_commute convex_plus_left_commute | 
| 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 huffman parents: 
29672diff
changeset | 227 | |
| 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 huffman parents: 
29672diff
changeset | 228 | text {* Useful for @{text "simp only: convex_plus_aci"} *}
 | 
| 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 huffman parents: 
29672diff
changeset | 229 | lemmas convex_plus_aci = | 
| 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 huffman parents: 
29672diff
changeset | 230 | convex_plus_ac convex_plus_absorb convex_plus_left_absorb | 
| 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 huffman parents: 
29672diff
changeset | 231 | |
| 31076 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
30729diff
changeset | 232 | lemma convex_unit_below_plus_iff [simp]: | 
| 26927 | 233 |   "{x}\<natural> \<sqsubseteq> ys +\<natural> zs \<longleftrightarrow> {x}\<natural> \<sqsubseteq> ys \<and> {x}\<natural> \<sqsubseteq> zs"
 | 
| 39970 
9023b897e67a
simplify proofs of powerdomain inequalities
 Brian Huffman <brianh@cs.pdx.edu> parents: 
37770diff
changeset | 234 | apply (induct x rule: compact_basis.principal_induct, simp) | 
| 
9023b897e67a
simplify proofs of powerdomain inequalities
 Brian Huffman <brianh@cs.pdx.edu> parents: 
37770diff
changeset | 235 | apply (induct ys rule: convex_pd.principal_induct, simp) | 
| 
9023b897e67a
simplify proofs of powerdomain inequalities
 Brian Huffman <brianh@cs.pdx.edu> parents: 
37770diff
changeset | 236 | apply (induct zs rule: convex_pd.principal_induct, simp) | 
| 
9023b897e67a
simplify proofs of powerdomain inequalities
 Brian Huffman <brianh@cs.pdx.edu> parents: 
37770diff
changeset | 237 | apply simp | 
| 25904 | 238 | done | 
| 239 | ||
| 31076 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
30729diff
changeset | 240 | lemma convex_plus_below_unit_iff [simp]: | 
| 26927 | 241 |   "xs +\<natural> ys \<sqsubseteq> {z}\<natural> \<longleftrightarrow> xs \<sqsubseteq> {z}\<natural> \<and> ys \<sqsubseteq> {z}\<natural>"
 | 
| 39970 
9023b897e67a
simplify proofs of powerdomain inequalities
 Brian Huffman <brianh@cs.pdx.edu> parents: 
37770diff
changeset | 242 | apply (induct xs rule: convex_pd.principal_induct, simp) | 
| 
9023b897e67a
simplify proofs of powerdomain inequalities
 Brian Huffman <brianh@cs.pdx.edu> parents: 
37770diff
changeset | 243 | apply (induct ys rule: convex_pd.principal_induct, simp) | 
| 
9023b897e67a
simplify proofs of powerdomain inequalities
 Brian Huffman <brianh@cs.pdx.edu> parents: 
37770diff
changeset | 244 | apply (induct z rule: compact_basis.principal_induct, simp) | 
| 
9023b897e67a
simplify proofs of powerdomain inequalities
 Brian Huffman <brianh@cs.pdx.edu> parents: 
37770diff
changeset | 245 | apply simp | 
| 25904 | 246 | done | 
| 247 | ||
| 31076 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
30729diff
changeset | 248 | lemma convex_unit_below_iff [simp]: "{x}\<natural> \<sqsubseteq> {y}\<natural> \<longleftrightarrow> x \<sqsubseteq> y"
 | 
| 39970 
9023b897e67a
simplify proofs of powerdomain inequalities
 Brian Huffman <brianh@cs.pdx.edu> parents: 
37770diff
changeset | 249 | apply (induct x rule: compact_basis.principal_induct, simp) | 
| 
9023b897e67a
simplify proofs of powerdomain inequalities
 Brian Huffman <brianh@cs.pdx.edu> parents: 
37770diff
changeset | 250 | apply (induct y rule: compact_basis.principal_induct, simp) | 
| 
9023b897e67a
simplify proofs of powerdomain inequalities
 Brian Huffman <brianh@cs.pdx.edu> parents: 
37770diff
changeset | 251 | apply simp | 
| 26927 | 252 | done | 
| 253 | ||
| 254 | lemma convex_unit_eq_iff [simp]: "{x}\<natural> = {y}\<natural> \<longleftrightarrow> x = y"
 | |
| 255 | unfolding po_eq_conv by simp | |
| 256 | ||
| 257 | lemma convex_unit_strict [simp]: "{\<bottom>}\<natural> = \<bottom>"
 | |
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 258 | using convex_unit_Rep_compact_basis [of compact_bot] | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 259 | by (simp add: inst_convex_pd_pcpo) | 
| 26927 | 260 | |
| 40321 
d065b195ec89
rename lemmas *_defined_iff and *_strict_iff to *_bottom_iff
 huffman parents: 
40002diff
changeset | 261 | lemma convex_unit_bottom_iff [simp]: "{x}\<natural> = \<bottom> \<longleftrightarrow> x = \<bottom>"
 | 
| 26927 | 262 | unfolding convex_unit_strict [symmetric] by (rule convex_unit_eq_iff) | 
| 263 | ||
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 264 | lemma compact_convex_unit: "compact x \<Longrightarrow> compact {x}\<natural>"
 | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 265 | by (auto dest!: compact_basis.compact_imp_principal) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 266 | |
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 267 | lemma compact_convex_unit_iff [simp]: "compact {x}\<natural> \<longleftrightarrow> compact x"
 | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 268 | apply (safe elim!: compact_convex_unit) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 269 | apply (simp only: compact_def convex_unit_below_iff [symmetric]) | 
| 40327 | 270 | apply (erule adm_subst [OF cont_Rep_cfun2]) | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 271 | done | 
| 26927 | 272 | |
| 273 | lemma compact_convex_plus [simp]: | |
| 274 | "\<lbrakk>compact xs; compact ys\<rbrakk> \<Longrightarrow> compact (xs +\<natural> ys)" | |
| 27289 | 275 | by (auto dest!: convex_pd.compact_imp_principal) | 
| 26927 | 276 | |
| 25904 | 277 | |
| 278 | subsection {* Induction rules *}
 | |
| 279 | ||
| 280 | lemma convex_pd_induct1: | |
| 281 | assumes P: "adm P" | |
| 26927 | 282 |   assumes unit: "\<And>x. P {x}\<natural>"
 | 
| 283 |   assumes insert: "\<And>x ys. \<lbrakk>P {x}\<natural>; P ys\<rbrakk> \<Longrightarrow> P ({x}\<natural> +\<natural> ys)"
 | |
| 25904 | 284 | shows "P (xs::'a convex_pd)" | 
| 27289 | 285 | apply (induct xs rule: convex_pd.principal_induct, rule P) | 
| 286 | apply (induct_tac a rule: pd_basis_induct1) | |
| 25904 | 287 | apply (simp only: convex_unit_Rep_compact_basis [symmetric]) | 
| 288 | apply (rule unit) | |
| 289 | apply (simp only: convex_unit_Rep_compact_basis [symmetric] | |
| 290 | convex_plus_principal [symmetric]) | |
| 291 | apply (erule insert [OF unit]) | |
| 292 | done | |
| 293 | ||
| 40576 
fa5e0cacd5e7
declare {upper,lower,convex}_pd_induct as default induction rules
 huffman parents: 
40497diff
changeset | 294 | lemma convex_pd_induct | 
| 
fa5e0cacd5e7
declare {upper,lower,convex}_pd_induct as default induction rules
 huffman parents: 
40497diff
changeset | 295 | [case_names adm convex_unit convex_plus, induct type: convex_pd]: | 
| 25904 | 296 | assumes P: "adm P" | 
| 26927 | 297 |   assumes unit: "\<And>x. P {x}\<natural>"
 | 
| 298 | assumes plus: "\<And>xs ys. \<lbrakk>P xs; P ys\<rbrakk> \<Longrightarrow> P (xs +\<natural> ys)" | |
| 25904 | 299 | shows "P (xs::'a convex_pd)" | 
| 27289 | 300 | apply (induct xs rule: convex_pd.principal_induct, rule P) | 
| 301 | apply (induct_tac a rule: pd_basis_induct) | |
| 25904 | 302 | apply (simp only: convex_unit_Rep_compact_basis [symmetric] unit) | 
| 303 | apply (simp only: convex_plus_principal [symmetric] plus) | |
| 304 | done | |
| 305 | ||
| 306 | ||
| 307 | subsection {* Monadic bind *}
 | |
| 308 | ||
| 309 | definition | |
| 310 | convex_bind_basis :: | |
| 311 |   "'a pd_basis \<Rightarrow> ('a \<rightarrow> 'b convex_pd) \<rightarrow> 'b convex_pd" where
 | |
| 312 | "convex_bind_basis = fold_pd | |
| 313 | (\<lambda>a. \<Lambda> f. f\<cdot>(Rep_compact_basis a)) | |
| 26927 | 314 | (\<lambda>x y. \<Lambda> f. x\<cdot>f +\<natural> y\<cdot>f)" | 
| 25904 | 315 | |
| 26927 | 316 | lemma ACI_convex_bind: | 
| 36635 
080b755377c0
locale predicates of classes carry a mandatory "class" prefix
 haftmann parents: 
35901diff
changeset | 317 | "class.ab_semigroup_idem_mult (\<lambda>x y. \<Lambda> f. x\<cdot>f +\<natural> y\<cdot>f)" | 
| 25904 | 318 | 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: 
25925diff
changeset | 319 | apply (simp add: convex_plus_assoc) | 
| 25904 | 320 | apply (simp add: convex_plus_commute) | 
| 29990 
b11793ea15a3
avoid using ab_semigroup_idem_mult locale for powerdomains
 huffman parents: 
29672diff
changeset | 321 | apply (simp add: eta_cfun) | 
| 25904 | 322 | done | 
| 323 | ||
| 324 | lemma convex_bind_basis_simps [simp]: | |
| 325 | "convex_bind_basis (PDUnit a) = | |
| 326 | (\<Lambda> f. f\<cdot>(Rep_compact_basis a))" | |
| 327 | "convex_bind_basis (PDPlus t u) = | |
| 26927 | 328 | (\<Lambda> f. convex_bind_basis t\<cdot>f +\<natural> convex_bind_basis u\<cdot>f)" | 
| 25904 | 329 | unfolding convex_bind_basis_def | 
| 330 | apply - | |
| 26927 | 331 | apply (rule fold_pd_PDUnit [OF ACI_convex_bind]) | 
| 332 | apply (rule fold_pd_PDPlus [OF ACI_convex_bind]) | |
| 25904 | 333 | done | 
| 334 | ||
| 335 | lemma convex_bind_basis_mono: | |
| 336 | "t \<le>\<natural> u \<Longrightarrow> convex_bind_basis t \<sqsubseteq> convex_bind_basis u" | |
| 337 | apply (erule convex_le_induct) | |
| 31076 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
30729diff
changeset | 338 | apply (erule (1) below_trans) | 
| 27289 | 339 | apply (simp add: monofun_LAM monofun_cfun) | 
| 340 | apply (simp add: monofun_LAM monofun_cfun) | |
| 25904 | 341 | done | 
| 342 | ||
| 343 | definition | |
| 344 |   convex_bind :: "'a convex_pd \<rightarrow> ('a \<rightarrow> 'b convex_pd) \<rightarrow> 'b convex_pd" where
 | |
| 345 | "convex_bind = convex_pd.basis_fun convex_bind_basis" | |
| 346 | ||
| 41036 
4acbacd6c5bc
add set-union-like syntax for powerdomain bind operators
 huffman parents: 
40888diff
changeset | 347 | syntax | 
| 
4acbacd6c5bc
add set-union-like syntax for powerdomain bind operators
 huffman parents: 
40888diff
changeset | 348 | "_convex_bind" :: "[logic, logic, logic] \<Rightarrow> logic" | 
| 
4acbacd6c5bc
add set-union-like syntax for powerdomain bind operators
 huffman parents: 
40888diff
changeset | 349 |     ("(3\<Union>\<natural>_\<in>_./ _)" [0, 0, 10] 10)
 | 
| 
4acbacd6c5bc
add set-union-like syntax for powerdomain bind operators
 huffman parents: 
40888diff
changeset | 350 | |
| 
4acbacd6c5bc
add set-union-like syntax for powerdomain bind operators
 huffman parents: 
40888diff
changeset | 351 | translations | 
| 
4acbacd6c5bc
add set-union-like syntax for powerdomain bind operators
 huffman parents: 
40888diff
changeset | 352 | "\<Union>\<natural>x\<in>xs. e" == "CONST convex_bind\<cdot>xs\<cdot>(\<Lambda> x. e)" | 
| 
4acbacd6c5bc
add set-union-like syntax for powerdomain bind operators
 huffman parents: 
40888diff
changeset | 353 | |
| 25904 | 354 | lemma convex_bind_principal [simp]: | 
| 355 | "convex_bind\<cdot>(convex_principal t) = convex_bind_basis t" | |
| 356 | unfolding convex_bind_def | |
| 357 | apply (rule convex_pd.basis_fun_principal) | |
| 358 | apply (erule convex_bind_basis_mono) | |
| 359 | done | |
| 360 | ||
| 361 | lemma convex_bind_unit [simp]: | |
| 26927 | 362 |   "convex_bind\<cdot>{x}\<natural>\<cdot>f = f\<cdot>x"
 | 
| 27289 | 363 | by (induct x rule: compact_basis.principal_induct, simp, simp) | 
| 25904 | 364 | |
| 365 | lemma convex_bind_plus [simp]: | |
| 26927 | 366 | "convex_bind\<cdot>(xs +\<natural> ys)\<cdot>f = convex_bind\<cdot>xs\<cdot>f +\<natural> convex_bind\<cdot>ys\<cdot>f" | 
| 27289 | 367 | by (induct xs ys rule: convex_pd.principal_induct2, simp, simp, simp) | 
| 25904 | 368 | |
| 369 | lemma convex_bind_strict [simp]: "convex_bind\<cdot>\<bottom>\<cdot>f = f\<cdot>\<bottom>" | |
| 370 | unfolding convex_unit_strict [symmetric] by (rule convex_bind_unit) | |
| 371 | ||
| 40589 | 372 | lemma convex_bind_bind: | 
| 373 | "convex_bind\<cdot>(convex_bind\<cdot>xs\<cdot>f)\<cdot>g = | |
| 374 | convex_bind\<cdot>xs\<cdot>(\<Lambda> x. convex_bind\<cdot>(f\<cdot>x)\<cdot>g)" | |
| 375 | by (induct xs, simp_all) | |
| 376 | ||
| 25904 | 377 | |
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 378 | subsection {* Map *}
 | 
| 25904 | 379 | |
| 380 | definition | |
| 381 |   convex_map :: "('a \<rightarrow> 'b) \<rightarrow> 'a convex_pd \<rightarrow> 'b convex_pd" where
 | |
| 26927 | 382 |   "convex_map = (\<Lambda> f xs. convex_bind\<cdot>xs\<cdot>(\<Lambda> x. {f\<cdot>x}\<natural>))"
 | 
| 25904 | 383 | |
| 384 | lemma convex_map_unit [simp]: | |
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 385 |   "convex_map\<cdot>f\<cdot>{x}\<natural> = {f\<cdot>x}\<natural>"
 | 
| 25904 | 386 | unfolding convex_map_def by simp | 
| 387 | ||
| 388 | lemma convex_map_plus [simp]: | |
| 26927 | 389 | "convex_map\<cdot>f\<cdot>(xs +\<natural> ys) = convex_map\<cdot>f\<cdot>xs +\<natural> convex_map\<cdot>f\<cdot>ys" | 
| 25904 | 390 | unfolding convex_map_def by simp | 
| 391 | ||
| 40577 | 392 | lemma convex_map_bottom [simp]: "convex_map\<cdot>f\<cdot>\<bottom> = {f\<cdot>\<bottom>}\<natural>"
 | 
| 393 | unfolding convex_map_def by simp | |
| 394 | ||
| 25904 | 395 | lemma convex_map_ident: "convex_map\<cdot>(\<Lambda> x. x)\<cdot>xs = xs" | 
| 396 | by (induct xs rule: convex_pd_induct, simp_all) | |
| 397 | ||
| 33808 | 398 | lemma convex_map_ID: "convex_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: 
39989diff
changeset | 399 | by (simp add: cfun_eq_iff ID_def convex_map_ident) | 
| 33808 | 400 | |
| 25904 | 401 | lemma convex_map_map: | 
| 402 | "convex_map\<cdot>f\<cdot>(convex_map\<cdot>g\<cdot>xs) = convex_map\<cdot>(\<Lambda> x. f\<cdot>(g\<cdot>x))\<cdot>xs" | |
| 403 | by (induct xs rule: convex_pd_induct, simp_all) | |
| 404 | ||
| 41110 | 405 | lemma convex_bind_map: | 
| 406 | "convex_bind\<cdot>(convex_map\<cdot>f\<cdot>xs)\<cdot>g = convex_bind\<cdot>xs\<cdot>(\<Lambda> x. g\<cdot>(f\<cdot>x))" | |
| 407 | by (simp add: convex_map_def convex_bind_bind) | |
| 408 | ||
| 409 | lemma convex_map_bind: | |
| 410 | "convex_map\<cdot>f\<cdot>(convex_bind\<cdot>xs\<cdot>g) = convex_bind\<cdot>xs\<cdot>(\<Lambda> x. convex_map\<cdot>f\<cdot>(g\<cdot>x))" | |
| 411 | by (simp add: convex_map_def convex_bind_bind) | |
| 412 | ||
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 413 | lemma ep_pair_convex_map: "ep_pair e p \<Longrightarrow> ep_pair (convex_map\<cdot>e) (convex_map\<cdot>p)" | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 414 | apply default | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 415 | apply (induct_tac x rule: convex_pd_induct, simp_all add: ep_pair.e_inverse) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 416 | apply (induct_tac y rule: convex_pd_induct) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 417 | apply (simp_all add: ep_pair.e_p_below monofun_cfun) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 418 | done | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 419 | |
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 420 | lemma deflation_convex_map: "deflation d \<Longrightarrow> deflation (convex_map\<cdot>d)" | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 421 | apply default | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 422 | apply (induct_tac x rule: convex_pd_induct, simp_all add: deflation.idem) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 423 | apply (induct_tac x rule: convex_pd_induct) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 424 | apply (simp_all add: deflation.below monofun_cfun) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 425 | done | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 426 | |
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 427 | (* FIXME: long proof! *) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 428 | lemma finite_deflation_convex_map: | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 429 | assumes "finite_deflation d" shows "finite_deflation (convex_map\<cdot>d)" | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 430 | proof (rule finite_deflation_intro) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 431 | interpret d: finite_deflation d by fact | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 432 | have "deflation d" by fact | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 433 | thus "deflation (convex_map\<cdot>d)" by (rule deflation_convex_map) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 434 | have "finite (range (\<lambda>x. d\<cdot>x))" by (rule d.finite_range) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 435 | hence "finite (Rep_compact_basis -` range (\<lambda>x. d\<cdot>x))" | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 436 | by (rule finite_vimageI, simp add: inj_on_def Rep_compact_basis_inject) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 437 | hence "finite (Pow (Rep_compact_basis -` range (\<lambda>x. d\<cdot>x)))" by simp | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 438 | 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: 
39970diff
changeset | 439 | by (rule finite_vimageI, simp add: inj_on_def Rep_pd_basis_inject) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 440 | hence *: "finite (convex_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: 
39970diff
changeset | 441 | hence "finite (range (\<lambda>xs. convex_map\<cdot>d\<cdot>xs))" | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 442 | apply (rule rev_finite_subset) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 443 | apply clarsimp | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 444 | apply (induct_tac xs rule: convex_pd.principal_induct) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 445 | apply (simp add: adm_mem_finite *) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 446 | apply (rename_tac t, induct_tac t rule: pd_basis_induct) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 447 | apply (simp only: convex_unit_Rep_compact_basis [symmetric] convex_map_unit) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 448 | apply simp | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 449 | 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: 
39970diff
changeset | 450 | apply clarsimp | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 451 | apply (rule imageI) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 452 | apply (rule vimageI2) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 453 | apply (simp add: Rep_PDUnit) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 454 | apply (rule range_eqI) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 455 | apply (erule sym) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 456 | apply (rule exI) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 457 | apply (rule Abs_compact_basis_inverse [symmetric]) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 458 | apply (simp add: d.compact) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 459 | apply (simp only: convex_plus_principal [symmetric] convex_map_plus) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 460 | apply clarsimp | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 461 | apply (rule imageI) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 462 | apply (rule vimageI2) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 463 | apply (simp add: Rep_PDPlus) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 464 | done | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 465 |   thus "finite {xs. convex_map\<cdot>d\<cdot>xs = xs}"
 | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 466 | by (rule finite_range_imp_finite_fixes) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 467 | qed | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 468 | |
| 40497 | 469 | subsection {* Convex powerdomain is a domain *}
 | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 470 | |
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 471 | definition | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 472 | convex_approx :: "nat \<Rightarrow> udom convex_pd \<rightarrow> udom convex_pd" | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 473 | where | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 474 | "convex_approx = (\<lambda>i. convex_map\<cdot>(udom_approx i))" | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 475 | |
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 476 | lemma convex_approx: "approx_chain convex_approx" | 
| 40484 
768f7e264e2b
reorganize Bifinite.thy; simplify some proofs related to bifinite class instances
 huffman parents: 
40436diff
changeset | 477 | using convex_map_ID finite_deflation_convex_map | 
| 
768f7e264e2b
reorganize Bifinite.thy; simplify some proofs related to bifinite class instances
 huffman parents: 
40436diff
changeset | 478 | unfolding convex_approx_def by (rule approx_chain_lemma1) | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 479 | |
| 39989 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 huffman parents: 
39986diff
changeset | 480 | definition convex_defl :: "defl \<rightarrow> defl" | 
| 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 huffman parents: 
39986diff
changeset | 481 | where "convex_defl = defl_fun1 convex_approx convex_map" | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 482 | |
| 39989 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 huffman parents: 
39986diff
changeset | 483 | lemma cast_convex_defl: | 
| 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 huffman parents: 
39986diff
changeset | 484 | "cast\<cdot>(convex_defl\<cdot>A) = | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 485 | udom_emb convex_approx oo convex_map\<cdot>(cast\<cdot>A) oo udom_prj convex_approx" | 
| 40484 
768f7e264e2b
reorganize Bifinite.thy; simplify some proofs related to bifinite class instances
 huffman parents: 
40436diff
changeset | 486 | using convex_approx finite_deflation_convex_map | 
| 
768f7e264e2b
reorganize Bifinite.thy; simplify some proofs related to bifinite class instances
 huffman parents: 
40436diff
changeset | 487 | unfolding convex_defl_def by (rule cast_defl_fun1) | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 488 | |
| 40497 | 489 | instantiation convex_pd :: ("domain") liftdomain
 | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 490 | begin | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 491 | |
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 492 | definition | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 493 | "emb = udom_emb convex_approx oo convex_map\<cdot>emb" | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 494 | |
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 495 | definition | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 496 | "prj = convex_map\<cdot>prj oo udom_prj convex_approx" | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 497 | |
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 498 | definition | 
| 39989 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 huffman parents: 
39986diff
changeset | 499 |   "defl (t::'a convex_pd itself) = convex_defl\<cdot>DEFL('a)"
 | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 500 | |
| 40491 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 huffman parents: 
40484diff
changeset | 501 | definition | 
| 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 huffman parents: 
40484diff
changeset | 502 | "(liftemb :: 'a convex_pd u \<rightarrow> udom) = udom_emb u_approx oo u_map\<cdot>emb" | 
| 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 huffman parents: 
40484diff
changeset | 503 | |
| 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 huffman parents: 
40484diff
changeset | 504 | definition | 
| 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 huffman parents: 
40484diff
changeset | 505 | "(liftprj :: udom \<rightarrow> 'a convex_pd u) = u_map\<cdot>prj oo udom_prj u_approx" | 
| 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 huffman parents: 
40484diff
changeset | 506 | |
| 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 huffman parents: 
40484diff
changeset | 507 | definition | 
| 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 huffman parents: 
40484diff
changeset | 508 |   "liftdefl (t::'a convex_pd itself) = u_defl\<cdot>DEFL('a convex_pd)"
 | 
| 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 huffman parents: 
40484diff
changeset | 509 | |
| 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 huffman parents: 
40484diff
changeset | 510 | instance | 
| 
6de5839e2fb3
add 'predomain' class: unpointed version of bifinite
 huffman parents: 
40484diff
changeset | 511 | using liftemb_convex_pd_def liftprj_convex_pd_def liftdefl_convex_pd_def | 
| 40494 
db8a09daba7b
add class liftdomain, for bifinite domains where DEFL('a u) = u_defl('a)
 huffman parents: 
40491diff
changeset | 512 | proof (rule liftdomain_class_intro) | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 513 | show "ep_pair emb (prj :: udom \<rightarrow> 'a convex_pd)" | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 514 | unfolding emb_convex_pd_def prj_convex_pd_def | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 515 | using ep_pair_udom [OF convex_approx] | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 516 | by (intro ep_pair_comp ep_pair_convex_map ep_pair_emb_prj) | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 517 | next | 
| 39989 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 huffman parents: 
39986diff
changeset | 518 |   show "cast\<cdot>DEFL('a convex_pd) = emb oo (prj :: udom \<rightarrow> 'a convex_pd)"
 | 
| 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 huffman parents: 
39986diff
changeset | 519 | unfolding emb_convex_pd_def prj_convex_pd_def defl_convex_pd_def cast_convex_defl | 
| 40002 
c5b5f7a3a3b1
new theorem names: fun_below_iff, fun_belowI, cfun_eq_iff, cfun_eqI, cfun_below_iff, cfun_belowI
 huffman parents: 
39989diff
changeset | 520 | by (simp add: cast_DEFL oo_def cfun_eq_iff convex_map_map) | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 521 | qed | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 522 | |
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 523 | end | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 524 | |
| 39989 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 huffman parents: 
39986diff
changeset | 525 | text {* DEFL of type constructor = type combinator *}
 | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 526 | |
| 39989 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 huffman parents: 
39986diff
changeset | 527 | lemma DEFL_convex: "DEFL('a convex_pd) = convex_defl\<cdot>DEFL('a)"
 | 
| 
ad60d7311f43
renamed type and constant 'sfp' to 'defl'; replaced syntax SFP('a) with DEFL('a)
 huffman parents: 
39986diff
changeset | 528 | by (rule defl_convex_pd_def) | 
| 39974 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 529 | |
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 530 | |
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 531 | subsection {* Join *}
 | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 532 | |
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 533 | definition | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 534 | convex_join :: "'a convex_pd convex_pd \<rightarrow> 'a convex_pd" where | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 535 | "convex_join = (\<Lambda> xss. convex_bind\<cdot>xss\<cdot>(\<Lambda> xs. xs))" | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 536 | |
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 537 | lemma convex_join_unit [simp]: | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 538 |   "convex_join\<cdot>{xs}\<natural> = xs"
 | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 539 | unfolding convex_join_def by simp | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 540 | |
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 541 | lemma convex_join_plus [simp]: | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 542 | "convex_join\<cdot>(xss +\<natural> yss) = convex_join\<cdot>xss +\<natural> convex_join\<cdot>yss" | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 543 | unfolding convex_join_def by simp | 
| 
b525988432e9
major reorganization/simplification of HOLCF type classes:
 huffman parents: 
39970diff
changeset | 544 | |
| 40577 | 545 | lemma convex_join_bottom [simp]: "convex_join\<cdot>\<bottom> = \<bottom>" | 
| 546 | unfolding convex_join_def by simp | |
| 547 | ||
| 25904 | 548 | lemma convex_join_map_unit: | 
| 549 | "convex_join\<cdot>(convex_map\<cdot>convex_unit\<cdot>xs) = xs" | |
| 550 | by (induct xs rule: convex_pd_induct, simp_all) | |
| 551 | ||
| 552 | lemma convex_join_map_join: | |
| 553 | "convex_join\<cdot>(convex_map\<cdot>convex_join\<cdot>xsss) = convex_join\<cdot>(convex_join\<cdot>xsss)" | |
| 554 | by (induct xsss rule: convex_pd_induct, simp_all) | |
| 555 | ||
| 556 | lemma convex_join_map_map: | |
| 557 | "convex_join\<cdot>(convex_map\<cdot>(convex_map\<cdot>f)\<cdot>xss) = | |
| 558 | convex_map\<cdot>f\<cdot>(convex_join\<cdot>xss)" | |
| 559 | by (induct xss rule: convex_pd_induct, simp_all) | |
| 560 | ||
| 561 | ||
| 562 | subsection {* Conversions to other powerdomains *}
 | |
| 563 | ||
| 564 | text {* Convex to upper *}
 | |
| 565 | ||
| 566 | lemma convex_le_imp_upper_le: "t \<le>\<natural> u \<Longrightarrow> t \<le>\<sharp> u" | |
| 567 | unfolding convex_le_def by simp | |
| 568 | ||
| 569 | definition | |
| 570 | convex_to_upper :: "'a convex_pd \<rightarrow> 'a upper_pd" where | |
| 571 | "convex_to_upper = convex_pd.basis_fun upper_principal" | |
| 572 | ||
| 573 | lemma convex_to_upper_principal [simp]: | |
| 574 | "convex_to_upper\<cdot>(convex_principal t) = upper_principal t" | |
| 575 | unfolding convex_to_upper_def | |
| 576 | apply (rule convex_pd.basis_fun_principal) | |
| 27289 | 577 | apply (rule upper_pd.principal_mono) | 
| 25904 | 578 | apply (erule convex_le_imp_upper_le) | 
| 579 | done | |
| 580 | ||
| 581 | lemma convex_to_upper_unit [simp]: | |
| 26927 | 582 |   "convex_to_upper\<cdot>{x}\<natural> = {x}\<sharp>"
 | 
| 27289 | 583 | by (induct x rule: compact_basis.principal_induct, simp, simp) | 
| 25904 | 584 | |
| 585 | lemma convex_to_upper_plus [simp]: | |
| 26927 | 586 | "convex_to_upper\<cdot>(xs +\<natural> ys) = convex_to_upper\<cdot>xs +\<sharp> convex_to_upper\<cdot>ys" | 
| 27289 | 587 | by (induct xs ys rule: convex_pd.principal_induct2, simp, simp, simp) | 
| 25904 | 588 | |
| 27289 | 589 | lemma convex_to_upper_bind [simp]: | 
| 590 | "convex_to_upper\<cdot>(convex_bind\<cdot>xs\<cdot>f) = | |
| 591 | upper_bind\<cdot>(convex_to_upper\<cdot>xs)\<cdot>(convex_to_upper oo f)" | |
| 592 | by (induct xs rule: convex_pd_induct, simp, simp, simp) | |
| 593 | ||
| 594 | lemma convex_to_upper_map [simp]: | |
| 595 | "convex_to_upper\<cdot>(convex_map\<cdot>f\<cdot>xs) = upper_map\<cdot>f\<cdot>(convex_to_upper\<cdot>xs)" | |
| 596 | by (simp add: convex_map_def upper_map_def cfcomp_LAM) | |
| 597 | ||
| 598 | lemma convex_to_upper_join [simp]: | |
| 599 | "convex_to_upper\<cdot>(convex_join\<cdot>xss) = | |
| 600 | upper_bind\<cdot>(convex_to_upper\<cdot>xss)\<cdot>convex_to_upper" | |
| 601 | by (simp add: convex_join_def upper_join_def cfcomp_LAM eta_cfun) | |
| 602 | ||
| 25904 | 603 | text {* Convex to lower *}
 | 
| 604 | ||
| 605 | lemma convex_le_imp_lower_le: "t \<le>\<natural> u \<Longrightarrow> t \<le>\<flat> u" | |
| 606 | unfolding convex_le_def by simp | |
| 607 | ||
| 608 | definition | |
| 609 | convex_to_lower :: "'a convex_pd \<rightarrow> 'a lower_pd" where | |
| 610 | "convex_to_lower = convex_pd.basis_fun lower_principal" | |
| 611 | ||
| 612 | lemma convex_to_lower_principal [simp]: | |
| 613 | "convex_to_lower\<cdot>(convex_principal t) = lower_principal t" | |
| 614 | unfolding convex_to_lower_def | |
| 615 | apply (rule convex_pd.basis_fun_principal) | |
| 27289 | 616 | apply (rule lower_pd.principal_mono) | 
| 25904 | 617 | apply (erule convex_le_imp_lower_le) | 
| 618 | done | |
| 619 | ||
| 620 | lemma convex_to_lower_unit [simp]: | |
| 26927 | 621 |   "convex_to_lower\<cdot>{x}\<natural> = {x}\<flat>"
 | 
| 27289 | 622 | by (induct x rule: compact_basis.principal_induct, simp, simp) | 
| 25904 | 623 | |
| 624 | lemma convex_to_lower_plus [simp]: | |
| 26927 | 625 | "convex_to_lower\<cdot>(xs +\<natural> ys) = convex_to_lower\<cdot>xs +\<flat> convex_to_lower\<cdot>ys" | 
| 27289 | 626 | by (induct xs ys rule: convex_pd.principal_induct2, simp, simp, simp) | 
| 25904 | 627 | |
| 27289 | 628 | lemma convex_to_lower_bind [simp]: | 
| 629 | "convex_to_lower\<cdot>(convex_bind\<cdot>xs\<cdot>f) = | |
| 630 | lower_bind\<cdot>(convex_to_lower\<cdot>xs)\<cdot>(convex_to_lower oo f)" | |
| 631 | by (induct xs rule: convex_pd_induct, simp, simp, simp) | |
| 632 | ||
| 633 | lemma convex_to_lower_map [simp]: | |
| 634 | "convex_to_lower\<cdot>(convex_map\<cdot>f\<cdot>xs) = lower_map\<cdot>f\<cdot>(convex_to_lower\<cdot>xs)" | |
| 635 | by (simp add: convex_map_def lower_map_def cfcomp_LAM) | |
| 636 | ||
| 637 | lemma convex_to_lower_join [simp]: | |
| 638 | "convex_to_lower\<cdot>(convex_join\<cdot>xss) = | |
| 639 | lower_bind\<cdot>(convex_to_lower\<cdot>xss)\<cdot>convex_to_lower" | |
| 640 | by (simp add: convex_join_def lower_join_def cfcomp_LAM eta_cfun) | |
| 641 | ||
| 25904 | 642 | text {* Ordering property *}
 | 
| 643 | ||
| 31076 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
30729diff
changeset | 644 | lemma convex_pd_below_iff: | 
| 25904 | 645 | "(xs \<sqsubseteq> ys) = | 
| 646 | (convex_to_upper\<cdot>xs \<sqsubseteq> convex_to_upper\<cdot>ys \<and> | |
| 647 | convex_to_lower\<cdot>xs \<sqsubseteq> convex_to_lower\<cdot>ys)" | |
| 39970 
9023b897e67a
simplify proofs of powerdomain inequalities
 Brian Huffman <brianh@cs.pdx.edu> parents: 
37770diff
changeset | 648 | apply (induct xs rule: convex_pd.principal_induct, simp) | 
| 
9023b897e67a
simplify proofs of powerdomain inequalities
 Brian Huffman <brianh@cs.pdx.edu> parents: 
37770diff
changeset | 649 | apply (induct ys rule: convex_pd.principal_induct, simp) | 
| 
9023b897e67a
simplify proofs of powerdomain inequalities
 Brian Huffman <brianh@cs.pdx.edu> parents: 
37770diff
changeset | 650 | apply (simp add: convex_le_def) | 
| 25904 | 651 | done | 
| 652 | ||
| 31076 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
30729diff
changeset | 653 | lemmas convex_plus_below_plus_iff = | 
| 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
30729diff
changeset | 654 | convex_pd_below_iff [where xs="xs +\<natural> ys" and ys="zs +\<natural> ws", standard] | 
| 26927 | 655 | |
| 31076 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
30729diff
changeset | 656 | lemmas convex_pd_below_simps = | 
| 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
30729diff
changeset | 657 | convex_unit_below_plus_iff | 
| 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
30729diff
changeset | 658 | convex_plus_below_unit_iff | 
| 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
30729diff
changeset | 659 | convex_plus_below_plus_iff | 
| 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
30729diff
changeset | 660 | convex_unit_below_iff | 
| 26927 | 661 | convex_to_upper_unit | 
| 662 | convex_to_upper_plus | |
| 663 | convex_to_lower_unit | |
| 664 | convex_to_lower_plus | |
| 31076 
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
 huffman parents: 
30729diff
changeset | 665 | 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: 
30729diff
changeset | 666 | lower_pd_below_simps | 
| 26927 | 667 | |
| 25904 | 668 | end |