src/HOLCF/LowerPD.thy
author haftmann
Mon, 05 Jul 2010 15:12:20 +0200
changeset 37715 44b27ea94a16
parent 36635 080b755377c0
child 37770 cddb3106adb8
permissions -rw-r--r--
tuned proof
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
     1
(*  Title:      HOLCF/LowerPD.thy
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
     2
    Author:     Brian Huffman
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
     3
*)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
     4
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
     5
header {* Lower powerdomain *}
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
     6
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
     7
theory LowerPD
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
     8
imports CompactBasis
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
     9
begin
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    10
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    11
subsection {* Basis preorder *}
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    12
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    13
definition
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    14
  lower_le :: "'a pd_basis \<Rightarrow> 'a pd_basis \<Rightarrow> bool" (infix "\<le>\<flat>" 50) where
26420
57a626f64875 make preorder locale into a superclass of class po
huffman
parents: 26407
diff changeset
    15
  "lower_le = (\<lambda>u v. \<forall>x\<in>Rep_pd_basis u. \<exists>y\<in>Rep_pd_basis v. x \<sqsubseteq> y)"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    16
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    17
lemma lower_le_refl [simp]: "t \<le>\<flat> t"
26420
57a626f64875 make preorder locale into a superclass of class po
huffman
parents: 26407
diff changeset
    18
unfolding lower_le_def by fast
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    19
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    20
lemma lower_le_trans: "\<lbrakk>t \<le>\<flat> u; u \<le>\<flat> v\<rbrakk> \<Longrightarrow> t \<le>\<flat> v"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    21
unfolding lower_le_def
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    22
apply (rule ballI)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    23
apply (drule (1) bspec, erule bexE)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    24
apply (drule (1) bspec, erule bexE)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    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
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    27
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    28
30729
461ee3e49ad3 interpretation/interpret: prefixes are mandatory by default;
wenzelm
parents: 29990
diff changeset
    29
interpretation lower_le: preorder lower_le
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    30
by (rule preorder.intro, rule lower_le_refl, rule lower_le_trans)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    31
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    32
lemma lower_le_minimal [simp]: "PDUnit compact_bot \<le>\<flat> t"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    33
unfolding lower_le_def Rep_PDUnit
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    34
by (simp, rule Rep_pd_basis_nonempty [folded ex_in_conv])
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    35
26420
57a626f64875 make preorder locale into a superclass of class po
huffman
parents: 26407
diff changeset
    36
lemma PDUnit_lower_mono: "x \<sqsubseteq> y \<Longrightarrow> PDUnit x \<le>\<flat> PDUnit y"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    37
unfolding lower_le_def Rep_PDUnit by fast
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    38
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    39
lemma PDPlus_lower_mono: "\<lbrakk>s \<le>\<flat> t; u \<le>\<flat> v\<rbrakk> \<Longrightarrow> PDPlus s u \<le>\<flat> PDPlus t v"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    40
unfolding lower_le_def Rep_PDPlus by fast
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    41
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
    42
lemma PDPlus_lower_le: "t \<le>\<flat> PDPlus t u"
26420
57a626f64875 make preorder locale into a superclass of class po
huffman
parents: 26407
diff changeset
    43
unfolding lower_le_def Rep_PDPlus by fast
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    44
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    45
lemma lower_le_PDUnit_PDUnit_iff [simp]:
26420
57a626f64875 make preorder locale into a superclass of class po
huffman
parents: 26407
diff changeset
    46
  "(PDUnit a \<le>\<flat> PDUnit b) = a \<sqsubseteq> b"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    47
unfolding lower_le_def Rep_PDUnit by fast
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    48
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    49
lemma lower_le_PDUnit_PDPlus_iff:
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    50
  "(PDUnit a \<le>\<flat> PDPlus t u) = (PDUnit a \<le>\<flat> t \<or> PDUnit a \<le>\<flat> u)"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    51
unfolding lower_le_def Rep_PDPlus Rep_PDUnit by fast
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    52
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    53
lemma lower_le_PDPlus_iff: "(PDPlus t u \<le>\<flat> v) = (t \<le>\<flat> v \<and> u \<le>\<flat> v)"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    54
unfolding lower_le_def Rep_PDPlus by fast
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    55
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    56
lemma lower_le_induct [induct set: lower_le]:
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    57
  assumes le: "t \<le>\<flat> u"
26420
57a626f64875 make preorder locale into a superclass of class po
huffman
parents: 26407
diff changeset
    58
  assumes 1: "\<And>a b. a \<sqsubseteq> b \<Longrightarrow> P (PDUnit a) (PDUnit b)"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    59
  assumes 2: "\<And>t u a. P (PDUnit a) t \<Longrightarrow> P (PDUnit a) (PDPlus t u)"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    60
  assumes 3: "\<And>t u v. \<lbrakk>P t v; P u v\<rbrakk> \<Longrightarrow> P (PDPlus t u) v"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    61
  shows "P t u"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    62
using le
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    63
apply (induct t arbitrary: u rule: pd_basis_induct)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    64
apply (erule rev_mp)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    65
apply (induct_tac u rule: pd_basis_induct)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    66
apply (simp add: 1)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    67
apply (simp add: lower_le_PDUnit_PDPlus_iff)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    68
apply (simp add: 2)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    69
apply (subst PDPlus_commute)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    70
apply (simp add: 2)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    71
apply (simp add: lower_le_PDPlus_iff 3)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    72
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    73
27405
785f5dbec8f4 rename approx_pd to pd_take
huffman
parents: 27373
diff changeset
    74
lemma pd_take_lower_chain:
785f5dbec8f4 rename approx_pd to pd_take
huffman
parents: 27373
diff changeset
    75
  "pd_take n t \<le>\<flat> pd_take (Suc n) t"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    76
apply (induct t rule: pd_basis_induct)
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
    77
apply (simp add: compact_basis.take_chain)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    78
apply (simp add: PDPlus_lower_mono)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    79
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    80
27405
785f5dbec8f4 rename approx_pd to pd_take
huffman
parents: 27373
diff changeset
    81
lemma pd_take_lower_le: "pd_take i t \<le>\<flat> t"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    82
apply (induct t rule: pd_basis_induct)
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
    83
apply (simp add: compact_basis.take_less)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    84
apply (simp add: PDPlus_lower_mono)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    85
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    86
27405
785f5dbec8f4 rename approx_pd to pd_take
huffman
parents: 27373
diff changeset
    87
lemma pd_take_lower_mono:
785f5dbec8f4 rename approx_pd to pd_take
huffman
parents: 27373
diff changeset
    88
  "t \<le>\<flat> u \<Longrightarrow> pd_take n t \<le>\<flat> pd_take n u"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    89
apply (erule lower_le_induct)
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
    90
apply (simp add: compact_basis.take_mono)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    91
apply (simp add: lower_le_PDUnit_PDPlus_iff)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    92
apply (simp add: lower_le_PDPlus_iff)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    93
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    94
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    95
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    96
subsection {* Type definition *}
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
    97
27373
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
    98
typedef (open) 'a lower_pd =
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
    99
  "{S::'a pd_basis set. lower_le.ideal S}"
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   100
by (fast intro: lower_le.ideal_principal)
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   101
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
   102
instantiation lower_pd :: (profinite) below
27373
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   103
begin
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   104
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   105
definition
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   106
  "x \<sqsubseteq> y \<longleftrightarrow> Rep_lower_pd x \<subseteq> Rep_lower_pd y"
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   107
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   108
instance ..
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   109
end
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   110
27373
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   111
instance lower_pd :: (profinite) po
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   112
by (rule lower_le.typedef_ideal_po
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
   113
    [OF type_definition_lower_pd below_lower_pd_def])
27373
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   114
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   115
instance lower_pd :: (profinite) cpo
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   116
by (rule lower_le.typedef_ideal_cpo
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
   117
    [OF type_definition_lower_pd below_lower_pd_def])
27373
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   118
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   119
lemma Rep_lower_pd_lub:
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   120
  "chain Y \<Longrightarrow> Rep_lower_pd (\<Squnion>i. Y i) = (\<Union>i. Rep_lower_pd (Y i))"
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   121
by (rule lower_le.typedef_ideal_rep_contlub
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
   122
    [OF type_definition_lower_pd below_lower_pd_def])
27373
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   123
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   124
lemma ideal_Rep_lower_pd: "lower_le.ideal (Rep_lower_pd xs)"
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   125
by (rule Rep_lower_pd [unfolded mem_Collect_eq])
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   126
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   127
definition
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   128
  lower_principal :: "'a pd_basis \<Rightarrow> 'a lower_pd" where
27373
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   129
  "lower_principal t = Abs_lower_pd {u. u \<le>\<flat> t}"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   130
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   131
lemma Rep_lower_principal:
27373
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   132
  "Rep_lower_pd (lower_principal t) = {u. u \<le>\<flat> t}"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   133
unfolding lower_principal_def
27297
2c42b1505f25 removed SetPcpo.thy and cpo instance for type bool;
huffman
parents: 27289
diff changeset
   134
by (simp add: Abs_lower_pd_inverse lower_le.ideal_principal)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   135
30729
461ee3e49ad3 interpretation/interpret: prefixes are mandatory by default;
wenzelm
parents: 29990
diff changeset
   136
interpretation lower_pd:
29237
e90d9d51106b More porting to new locales.
ballarin
parents: 27405
diff changeset
   137
  ideal_completion lower_le pd_take lower_principal Rep_lower_pd
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   138
apply unfold_locales
27405
785f5dbec8f4 rename approx_pd to pd_take
huffman
parents: 27373
diff changeset
   139
apply (rule pd_take_lower_le)
785f5dbec8f4 rename approx_pd to pd_take
huffman
parents: 27373
diff changeset
   140
apply (rule pd_take_idem)
785f5dbec8f4 rename approx_pd to pd_take
huffman
parents: 27373
diff changeset
   141
apply (erule pd_take_lower_mono)
785f5dbec8f4 rename approx_pd to pd_take
huffman
parents: 27373
diff changeset
   142
apply (rule pd_take_lower_chain)
785f5dbec8f4 rename approx_pd to pd_take
huffman
parents: 27373
diff changeset
   143
apply (rule finite_range_pd_take)
785f5dbec8f4 rename approx_pd to pd_take
huffman
parents: 27373
diff changeset
   144
apply (rule pd_take_covers)
26420
57a626f64875 make preorder locale into a superclass of class po
huffman
parents: 26407
diff changeset
   145
apply (rule ideal_Rep_lower_pd)
27373
5794a0e3e26c remove cset theory; define ideal completions using typedef instead of cpodef
huffman
parents: 27310
diff changeset
   146
apply (erule Rep_lower_pd_lub)
26420
57a626f64875 make preorder locale into a superclass of class po
huffman
parents: 26407
diff changeset
   147
apply (rule Rep_lower_principal)
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
   148
apply (simp only: below_lower_pd_def)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   149
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   150
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   151
text {* Lower powerdomain is pointed *}
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   152
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   153
lemma lower_pd_minimal: "lower_principal (PDUnit compact_bot) \<sqsubseteq> ys"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   154
by (induct ys rule: lower_pd.principal_induct, simp, simp)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   155
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   156
instance lower_pd :: (bifinite) pcpo
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   157
by intro_classes (fast intro: lower_pd_minimal)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   158
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   159
lemma inst_lower_pd_pcpo: "\<bottom> = lower_principal (PDUnit compact_bot)"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   160
by (rule lower_pd_minimal [THEN UU_I, symmetric])
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   161
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   162
text {* Lower powerdomain is profinite *}
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   163
26962
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26927
diff changeset
   164
instantiation lower_pd :: (profinite) profinite
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26927
diff changeset
   165
begin
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   166
26962
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26927
diff changeset
   167
definition
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26927
diff changeset
   168
  approx_lower_pd_def: "approx = lower_pd.completion_approx"
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   169
26962
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26927
diff changeset
   170
instance
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   171
apply (intro_classes, unfold approx_lower_pd_def)
27310
d0229bc6c461 simplify profinite class axioms
huffman
parents: 27309
diff changeset
   172
apply (rule lower_pd.chain_completion_approx)
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   173
apply (rule lower_pd.lub_completion_approx)
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   174
apply (rule lower_pd.completion_approx_idem)
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   175
apply (rule lower_pd.finite_fixes_completion_approx)
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   176
done
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   177
26962
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26927
diff changeset
   178
end
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26927
diff changeset
   179
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   180
instance lower_pd :: (bifinite) bifinite ..
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   181
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   182
lemma approx_lower_principal [simp]:
27405
785f5dbec8f4 rename approx_pd to pd_take
huffman
parents: 27373
diff changeset
   183
  "approx n\<cdot>(lower_principal t) = lower_principal (pd_take n t)"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   184
unfolding approx_lower_pd_def
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   185
by (rule lower_pd.completion_approx_principal)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   186
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   187
lemma approx_eq_lower_principal:
27405
785f5dbec8f4 rename approx_pd to pd_take
huffman
parents: 27373
diff changeset
   188
  "\<exists>t\<in>Rep_lower_pd xs. approx n\<cdot>xs = lower_principal (pd_take n t)"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   189
unfolding approx_lower_pd_def
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   190
by (rule lower_pd.completion_approx_eq_principal)
26407
562a1d615336 rename class bifinite_cpo to profinite; generalize powerdomains from bifinite to profinite
huffman
parents: 26041
diff changeset
   191
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   192
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   193
subsection {* Monadic unit and plus *}
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   194
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   195
definition
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   196
  lower_unit :: "'a \<rightarrow> 'a lower_pd" where
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   197
  "lower_unit = compact_basis.basis_fun (\<lambda>a. lower_principal (PDUnit a))"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   198
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   199
definition
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   200
  lower_plus :: "'a lower_pd \<rightarrow> 'a lower_pd \<rightarrow> 'a lower_pd" where
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   201
  "lower_plus = lower_pd.basis_fun (\<lambda>t. lower_pd.basis_fun (\<lambda>u.
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   202
      lower_principal (PDPlus t u)))"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   203
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   204
abbreviation
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   205
  lower_add :: "'a lower_pd \<Rightarrow> 'a lower_pd \<Rightarrow> 'a lower_pd"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   206
    (infixl "+\<flat>" 65) where
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   207
  "xs +\<flat> ys == lower_plus\<cdot>xs\<cdot>ys"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   208
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   209
syntax
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   210
  "_lower_pd" :: "args \<Rightarrow> 'a lower_pd" ("{_}\<flat>")
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   211
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   212
translations
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   213
  "{x,xs}\<flat>" == "{x}\<flat> +\<flat> {xs}\<flat>"
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   214
  "{x}\<flat>" == "CONST lower_unit\<cdot>x"
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   215
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   216
lemma lower_unit_Rep_compact_basis [simp]:
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   217
  "{Rep_compact_basis a}\<flat> = lower_principal (PDUnit a)"
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   218
unfolding lower_unit_def
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   219
by (simp add: compact_basis.basis_fun_principal PDUnit_lower_mono)
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   220
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   221
lemma lower_plus_principal [simp]:
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   222
  "lower_principal t +\<flat> lower_principal u = lower_principal (PDPlus t u)"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   223
unfolding lower_plus_def
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   224
by (simp add: lower_pd.basis_fun_principal
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   225
    lower_pd.basis_fun_mono PDPlus_lower_mono)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   226
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   227
lemma approx_lower_unit [simp]:
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   228
  "approx n\<cdot>{x}\<flat> = {approx n\<cdot>x}\<flat>"
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   229
apply (induct x rule: compact_basis.principal_induct, simp)
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   230
apply (simp add: approx_Rep_compact_basis)
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   231
done
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   232
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   233
lemma approx_lower_plus [simp]:
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   234
  "approx n\<cdot>(xs +\<flat> ys) = (approx n\<cdot>xs) +\<flat> (approx n\<cdot>ys)"
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   235
by (induct xs ys rule: lower_pd.principal_induct2, simp, simp, simp)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   236
34973
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   237
interpretation lower_add!: semilattice lower_add proof
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   238
  fix xs ys zs :: "'a lower_pd"
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   239
  show "(xs +\<flat> ys) +\<flat> zs = xs +\<flat> (ys +\<flat> zs)"
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   240
    apply (induct xs ys arbitrary: zs rule: lower_pd.principal_induct2, simp, simp)
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   241
    apply (rule_tac x=zs in lower_pd.principal_induct, simp)
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   242
    apply (simp add: PDPlus_assoc)
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   243
    done
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   244
  show "xs +\<flat> ys = ys +\<flat> xs"
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   245
    apply (induct xs ys rule: lower_pd.principal_induct2, simp, simp)
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   246
    apply (simp add: PDPlus_commute)
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   247
    done
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   248
  show "xs +\<flat> xs = xs"
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   249
    apply (induct xs rule: lower_pd.principal_induct, simp)
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   250
    apply (simp add: PDPlus_absorb)
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   251
    done
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   252
qed
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   253
34973
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   254
lemmas lower_plus_assoc = lower_add.assoc
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   255
lemmas lower_plus_commute = lower_add.commute
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   256
lemmas lower_plus_absorb = lower_add.idem
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   257
lemmas lower_plus_left_commute = lower_add.left_commute
ae634fad947e dropped mk_left_commute; use interpretation of locale abel_semigroup instead
haftmann
parents: 33808
diff changeset
   258
lemmas lower_plus_left_absorb = lower_add.left_idem
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   259
29990
b11793ea15a3 avoid using ab_semigroup_idem_mult locale for powerdomains
huffman
parents: 29672
diff changeset
   260
text {* Useful for @{text "simp add: lower_plus_ac"} *}
b11793ea15a3 avoid using ab_semigroup_idem_mult locale for powerdomains
huffman
parents: 29672
diff changeset
   261
lemmas lower_plus_ac =
b11793ea15a3 avoid using ab_semigroup_idem_mult locale for powerdomains
huffman
parents: 29672
diff changeset
   262
  lower_plus_assoc lower_plus_commute lower_plus_left_commute
b11793ea15a3 avoid using ab_semigroup_idem_mult locale for powerdomains
huffman
parents: 29672
diff changeset
   263
b11793ea15a3 avoid using ab_semigroup_idem_mult locale for powerdomains
huffman
parents: 29672
diff changeset
   264
text {* Useful for @{text "simp only: lower_plus_aci"} *}
b11793ea15a3 avoid using ab_semigroup_idem_mult locale for powerdomains
huffman
parents: 29672
diff changeset
   265
lemmas lower_plus_aci =
b11793ea15a3 avoid using ab_semigroup_idem_mult locale for powerdomains
huffman
parents: 29672
diff changeset
   266
  lower_plus_ac lower_plus_absorb lower_plus_left_absorb
b11793ea15a3 avoid using ab_semigroup_idem_mult locale for powerdomains
huffman
parents: 29672
diff changeset
   267
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
   268
lemma lower_plus_below1: "xs \<sqsubseteq> xs +\<flat> ys"
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   269
apply (induct xs ys rule: lower_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
   270
apply (simp add: PDPlus_lower_le)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   271
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   272
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
   273
lemma lower_plus_below2: "ys \<sqsubseteq> xs +\<flat> 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
   274
by (subst lower_plus_commute, rule lower_plus_below1)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   275
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   276
lemma lower_plus_least: "\<lbrakk>xs \<sqsubseteq> zs; ys \<sqsubseteq> zs\<rbrakk> \<Longrightarrow> xs +\<flat> ys \<sqsubseteq> zs"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   277
apply (subst lower_plus_absorb [of zs, symmetric])
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   278
apply (erule (1) monofun_cfun [OF monofun_cfun_arg])
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   279
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   280
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
   281
lemma lower_plus_below_iff:
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   282
  "xs +\<flat> ys \<sqsubseteq> zs \<longleftrightarrow> xs \<sqsubseteq> zs \<and> ys \<sqsubseteq> zs"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   283
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
   284
apply (erule below_trans [OF lower_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
   285
apply (erule below_trans [OF lower_plus_below2])
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   286
apply (erule (1) lower_plus_least)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   287
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   288
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
   289
lemma lower_unit_below_plus_iff:
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   290
  "{x}\<flat> \<sqsubseteq> ys +\<flat> zs \<longleftrightarrow> {x}\<flat> \<sqsubseteq> ys \<or> {x}\<flat> \<sqsubseteq> zs"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   291
 apply (rule iffI)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   292
  apply (subgoal_tac
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   293
    "adm (\<lambda>f. f\<cdot>{x}\<flat> \<sqsubseteq> f\<cdot>ys \<or> f\<cdot>{x}\<flat> \<sqsubseteq> f\<cdot>zs)")
25925
3dc4acca4388 change lemma admD to rule_format
huffman
parents: 25904
diff changeset
   294
   apply (drule admD, rule chain_approx)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   295
    apply (drule_tac f="approx i" in monofun_cfun_arg)
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   296
    apply (cut_tac x="approx i\<cdot>x" in compact_basis.compact_imp_principal, simp)
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   297
    apply (cut_tac x="approx i\<cdot>ys" in lower_pd.compact_imp_principal, simp)
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   298
    apply (cut_tac x="approx i\<cdot>zs" in lower_pd.compact_imp_principal, simp)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   299
    apply (clarify, simp add: lower_le_PDUnit_PDPlus_iff)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   300
   apply simp
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   301
  apply simp
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   302
 apply (erule disjE)
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
   303
  apply (erule below_trans [OF _ lower_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
   304
 apply (erule below_trans [OF _ lower_plus_below2])
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   305
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   306
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
   307
lemma lower_unit_below_iff [simp]: "{x}\<flat> \<sqsubseteq> {y}\<flat> \<longleftrightarrow> x \<sqsubseteq> y"
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   308
 apply (rule iffI)
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
   309
  apply (rule profinite_below_ext)
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   310
  apply (drule_tac f="approx i" in monofun_cfun_arg, simp)
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   311
  apply (cut_tac x="approx i\<cdot>x" in compact_basis.compact_imp_principal, simp)
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   312
  apply (cut_tac x="approx i\<cdot>y" in compact_basis.compact_imp_principal, simp)
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   313
  apply clarsimp
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   314
 apply (erule monofun_cfun_arg)
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   315
done
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   316
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
   317
lemmas lower_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
   318
  lower_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
   319
  lower_plus_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
   320
  lower_unit_below_plus_iff
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   321
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   322
lemma lower_unit_eq_iff [simp]: "{x}\<flat> = {y}\<flat> \<longleftrightarrow> x = y"
29990
b11793ea15a3 avoid using ab_semigroup_idem_mult locale for powerdomains
huffman
parents: 29672
diff changeset
   323
by (simp add: po_eq_conv)
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   324
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   325
lemma lower_unit_strict [simp]: "{\<bottom>}\<flat> = \<bottom>"
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   326
unfolding inst_lower_pd_pcpo Rep_compact_bot [symmetric] by simp
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   327
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   328
lemma lower_unit_strict_iff [simp]: "{x}\<flat> = \<bottom> \<longleftrightarrow> x = \<bottom>"
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   329
unfolding lower_unit_strict [symmetric] by (rule lower_unit_eq_iff)
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   330
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   331
lemma lower_plus_strict_iff [simp]:
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   332
  "xs +\<flat> ys = \<bottom> \<longleftrightarrow> xs = \<bottom> \<and> ys = \<bottom>"
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   333
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
   334
apply (rule UU_I, erule subst, rule lower_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
   335
apply (rule UU_I, erule subst, rule lower_plus_below2)
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   336
apply (rule lower_plus_absorb)
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   337
done
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   338
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   339
lemma lower_plus_strict1 [simp]: "\<bottom> +\<flat> ys = ys"
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
   340
apply (rule below_antisym [OF _ lower_plus_below2])
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   341
apply (simp add: lower_plus_least)
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   342
done
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   343
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   344
lemma lower_plus_strict2 [simp]: "xs +\<flat> \<bottom> = xs"
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
   345
apply (rule below_antisym [OF _ lower_plus_below1])
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   346
apply (simp add: lower_plus_least)
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   347
done
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   348
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   349
lemma compact_lower_unit_iff [simp]: "compact {x}\<flat> \<longleftrightarrow> compact x"
27309
c74270fd72a8 clean up and rename some profinite lemmas
huffman
parents: 27297
diff changeset
   350
unfolding profinite_compact_iff by simp
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   351
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   352
lemma compact_lower_plus [simp]:
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   353
  "\<lbrakk>compact xs; compact ys\<rbrakk> \<Longrightarrow> compact (xs +\<flat> ys)"
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   354
by (auto dest!: lower_pd.compact_imp_principal)
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   355
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   356
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   357
subsection {* Induction rules *}
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   358
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   359
lemma lower_pd_induct1:
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   360
  assumes P: "adm P"
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   361
  assumes unit: "\<And>x. P {x}\<flat>"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   362
  assumes insert:
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   363
    "\<And>x ys. \<lbrakk>P {x}\<flat>; P ys\<rbrakk> \<Longrightarrow> P ({x}\<flat> +\<flat> ys)"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   364
  shows "P (xs::'a lower_pd)"
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   365
apply (induct xs rule: lower_pd.principal_induct, rule P)
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   366
apply (induct_tac a rule: pd_basis_induct1)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   367
apply (simp only: lower_unit_Rep_compact_basis [symmetric])
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   368
apply (rule unit)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   369
apply (simp only: lower_unit_Rep_compact_basis [symmetric]
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   370
                  lower_plus_principal [symmetric])
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   371
apply (erule insert [OF unit])
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   372
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   373
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   374
lemma lower_pd_induct:
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   375
  assumes P: "adm P"
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   376
  assumes unit: "\<And>x. P {x}\<flat>"
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   377
  assumes plus: "\<And>xs ys. \<lbrakk>P xs; P ys\<rbrakk> \<Longrightarrow> P (xs +\<flat> ys)"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   378
  shows "P (xs::'a lower_pd)"
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   379
apply (induct xs rule: lower_pd.principal_induct, rule P)
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   380
apply (induct_tac a rule: pd_basis_induct)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   381
apply (simp only: lower_unit_Rep_compact_basis [symmetric] unit)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   382
apply (simp only: lower_plus_principal [symmetric] plus)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   383
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   384
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   385
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   386
subsection {* Monadic bind *}
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   387
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   388
definition
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   389
  lower_bind_basis ::
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   390
  "'a pd_basis \<Rightarrow> ('a \<rightarrow> 'b lower_pd) \<rightarrow> 'b lower_pd" where
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   391
  "lower_bind_basis = fold_pd
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   392
    (\<lambda>a. \<Lambda> f. f\<cdot>(Rep_compact_basis a))
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   393
    (\<lambda>x y. \<Lambda> f. x\<cdot>f +\<flat> y\<cdot>f)"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   394
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   395
lemma ACI_lower_bind:
36635
080b755377c0 locale predicates of classes carry a mandatory "class" prefix
haftmann
parents: 35901
diff changeset
   396
  "class.ab_semigroup_idem_mult (\<lambda>x y. \<Lambda> f. x\<cdot>f +\<flat> y\<cdot>f)"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   397
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
   398
apply (simp add: lower_plus_assoc)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   399
apply (simp add: lower_plus_commute)
29990
b11793ea15a3 avoid using ab_semigroup_idem_mult locale for powerdomains
huffman
parents: 29672
diff changeset
   400
apply (simp add: eta_cfun)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   401
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   402
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   403
lemma lower_bind_basis_simps [simp]:
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   404
  "lower_bind_basis (PDUnit a) =
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   405
    (\<Lambda> f. f\<cdot>(Rep_compact_basis a))"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   406
  "lower_bind_basis (PDPlus t u) =
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   407
    (\<Lambda> f. lower_bind_basis t\<cdot>f +\<flat> lower_bind_basis u\<cdot>f)"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   408
unfolding lower_bind_basis_def
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   409
apply -
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   410
apply (rule fold_pd_PDUnit [OF ACI_lower_bind])
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   411
apply (rule fold_pd_PDPlus [OF ACI_lower_bind])
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   412
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   413
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   414
lemma lower_bind_basis_mono:
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   415
  "t \<le>\<flat> u \<Longrightarrow> lower_bind_basis t \<sqsubseteq> lower_bind_basis u"
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
   416
unfolding expand_cfun_below
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   417
apply (erule lower_le_induct, safe)
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   418
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
   419
apply (simp add: rev_below_trans [OF lower_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
   420
apply (simp add: lower_plus_below_iff)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   421
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   422
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   423
definition
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   424
  lower_bind :: "'a lower_pd \<rightarrow> ('a \<rightarrow> 'b lower_pd) \<rightarrow> 'b lower_pd" where
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   425
  "lower_bind = lower_pd.basis_fun lower_bind_basis"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   426
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   427
lemma lower_bind_principal [simp]:
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   428
  "lower_bind\<cdot>(lower_principal t) = lower_bind_basis t"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   429
unfolding lower_bind_def
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   430
apply (rule lower_pd.basis_fun_principal)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   431
apply (erule lower_bind_basis_mono)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   432
done
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   433
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   434
lemma lower_bind_unit [simp]:
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   435
  "lower_bind\<cdot>{x}\<flat>\<cdot>f = f\<cdot>x"
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   436
by (induct x rule: compact_basis.principal_induct, simp, simp)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   437
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   438
lemma lower_bind_plus [simp]:
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   439
  "lower_bind\<cdot>(xs +\<flat> ys)\<cdot>f = lower_bind\<cdot>xs\<cdot>f +\<flat> lower_bind\<cdot>ys\<cdot>f"
27289
c49d427867aa move lemmas into locales;
huffman
parents: 27267
diff changeset
   440
by (induct xs ys rule: lower_pd.principal_induct2, simp, simp, simp)
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   441
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   442
lemma lower_bind_strict [simp]: "lower_bind\<cdot>\<bottom>\<cdot>f = f\<cdot>\<bottom>"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   443
unfolding lower_unit_strict [symmetric] by (rule lower_bind_unit)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   444
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   445
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   446
subsection {* Map and join *}
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   447
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   448
definition
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   449
  lower_map :: "('a \<rightarrow> 'b) \<rightarrow> 'a lower_pd \<rightarrow> 'b lower_pd" where
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   450
  "lower_map = (\<Lambda> f xs. lower_bind\<cdot>xs\<cdot>(\<Lambda> x. {f\<cdot>x}\<flat>))"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   451
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   452
definition
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   453
  lower_join :: "'a lower_pd lower_pd \<rightarrow> 'a lower_pd" where
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   454
  "lower_join = (\<Lambda> xss. lower_bind\<cdot>xss\<cdot>(\<Lambda> xs. xs))"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   455
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   456
lemma lower_map_unit [simp]:
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   457
  "lower_map\<cdot>f\<cdot>{x}\<flat> = {f\<cdot>x}\<flat>"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   458
unfolding lower_map_def by simp
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   459
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   460
lemma lower_map_plus [simp]:
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   461
  "lower_map\<cdot>f\<cdot>(xs +\<flat> ys) = lower_map\<cdot>f\<cdot>xs +\<flat> lower_map\<cdot>f\<cdot>ys"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   462
unfolding lower_map_def by simp
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   463
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   464
lemma lower_join_unit [simp]:
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   465
  "lower_join\<cdot>{xs}\<flat> = xs"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   466
unfolding lower_join_def by simp
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   467
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   468
lemma lower_join_plus [simp]:
26927
8684b5240f11 rename locales;
huffman
parents: 26806
diff changeset
   469
  "lower_join\<cdot>(xss +\<flat> yss) = lower_join\<cdot>xss +\<flat> lower_join\<cdot>yss"
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   470
unfolding lower_join_def by simp
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   471
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   472
lemma lower_map_ident: "lower_map\<cdot>(\<Lambda> x. x)\<cdot>xs = xs"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   473
by (induct xs rule: lower_pd_induct, simp_all)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   474
33808
31169fdc5ae7 add map_ID lemmas
huffman
parents: 33585
diff changeset
   475
lemma lower_map_ID: "lower_map\<cdot>ID = ID"
31169fdc5ae7 add map_ID lemmas
huffman
parents: 33585
diff changeset
   476
by (simp add: expand_cfun_eq ID_def lower_map_ident)
31169fdc5ae7 add map_ID lemmas
huffman
parents: 33585
diff changeset
   477
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   478
lemma lower_map_map:
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   479
  "lower_map\<cdot>f\<cdot>(lower_map\<cdot>g\<cdot>xs) = lower_map\<cdot>(\<Lambda> x. f\<cdot>(g\<cdot>x))\<cdot>xs"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   480
by (induct xs rule: lower_pd_induct, simp_all)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   481
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   482
lemma lower_join_map_unit:
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   483
  "lower_join\<cdot>(lower_map\<cdot>lower_unit\<cdot>xs) = xs"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   484
by (induct xs rule: lower_pd_induct, simp_all)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   485
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   486
lemma lower_join_map_join:
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   487
  "lower_join\<cdot>(lower_map\<cdot>lower_join\<cdot>xsss) = lower_join\<cdot>(lower_join\<cdot>xsss)"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   488
by (induct xsss rule: lower_pd_induct, simp_all)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   489
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   490
lemma lower_join_map_map:
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   491
  "lower_join\<cdot>(lower_map\<cdot>(lower_map\<cdot>f)\<cdot>xss) =
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   492
   lower_map\<cdot>f\<cdot>(lower_join\<cdot>xss)"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   493
by (induct xss rule: lower_pd_induct, simp_all)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   494
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   495
lemma lower_map_approx: "lower_map\<cdot>(approx n)\<cdot>xs = approx n\<cdot>xs"
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   496
by (induct xs rule: lower_pd_induct, simp_all)
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   497
33585
8d39394fe5cf ep_pair and deflation lemmas for powerdomain map functions
huffman
parents: 31076
diff changeset
   498
lemma ep_pair_lower_map: "ep_pair e p \<Longrightarrow> ep_pair (lower_map\<cdot>e) (lower_map\<cdot>p)"
8d39394fe5cf ep_pair and deflation lemmas for powerdomain map functions
huffman
parents: 31076
diff changeset
   499
apply default
8d39394fe5cf ep_pair and deflation lemmas for powerdomain map functions
huffman
parents: 31076
diff changeset
   500
apply (induct_tac x rule: lower_pd_induct, simp_all add: ep_pair.e_inverse)
35901
12f09bf2c77f fix LaTeX overfull hbox warnings in HOLCF document
huffman
parents: 34973
diff changeset
   501
apply (induct_tac y rule: lower_pd_induct)
12f09bf2c77f fix LaTeX overfull hbox warnings in HOLCF document
huffman
parents: 34973
diff changeset
   502
apply (simp_all add: ep_pair.e_p_below monofun_cfun)
33585
8d39394fe5cf ep_pair and deflation lemmas for powerdomain map functions
huffman
parents: 31076
diff changeset
   503
done
8d39394fe5cf ep_pair and deflation lemmas for powerdomain map functions
huffman
parents: 31076
diff changeset
   504
8d39394fe5cf ep_pair and deflation lemmas for powerdomain map functions
huffman
parents: 31076
diff changeset
   505
lemma deflation_lower_map: "deflation d \<Longrightarrow> deflation (lower_map\<cdot>d)"
8d39394fe5cf ep_pair and deflation lemmas for powerdomain map functions
huffman
parents: 31076
diff changeset
   506
apply default
8d39394fe5cf ep_pair and deflation lemmas for powerdomain map functions
huffman
parents: 31076
diff changeset
   507
apply (induct_tac x rule: lower_pd_induct, simp_all add: deflation.idem)
35901
12f09bf2c77f fix LaTeX overfull hbox warnings in HOLCF document
huffman
parents: 34973
diff changeset
   508
apply (induct_tac x rule: lower_pd_induct)
12f09bf2c77f fix LaTeX overfull hbox warnings in HOLCF document
huffman
parents: 34973
diff changeset
   509
apply (simp_all add: deflation.below monofun_cfun)
33585
8d39394fe5cf ep_pair and deflation lemmas for powerdomain map functions
huffman
parents: 31076
diff changeset
   510
done
8d39394fe5cf ep_pair and deflation lemmas for powerdomain map functions
huffman
parents: 31076
diff changeset
   511
25904
8161f137b0e9 new theory of powerdomains
huffman
parents:
diff changeset
   512
end