src/HOLCF/Deflation.thy
author huffman
Mon, 30 Jun 2008 21:52:17 +0200
changeset 27401 4edc81f93e35
child 27681 8cedebf55539
permissions -rw-r--r--
New theory of deflations and embedding-projection pairs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27401
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
     1
(*  Title:      HOLCF/Deflation.thy
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
     2
    ID:         $Id$
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
     3
    Author:     Brian Huffman
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
     4
*)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
     5
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
     6
header {* Continuous Deflations and Embedding-Projection Pairs *}
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
     7
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
     8
theory Deflation
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
     9
imports Cfun
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    10
begin
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    11
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    12
defaultsort cpo
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    13
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    14
subsection {* Continuous deflations *}
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    15
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    16
locale deflation =
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    17
  fixes d :: "'a \<rightarrow> 'a"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    18
  assumes idem: "\<And>x. d\<cdot>(d\<cdot>x) = d\<cdot>x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    19
  assumes less: "\<And>x. d\<cdot>x \<sqsubseteq> x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    20
begin
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    21
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    22
lemma less_ID: "d \<sqsubseteq> ID"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    23
by (rule less_cfun_ext, simp add: less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    24
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    25
text {* The set of fixed points is the same as the range. *}
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    26
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    27
lemma fixes_eq_range: "{x. d\<cdot>x = x} = range (\<lambda>x. d\<cdot>x)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    28
by (auto simp add: eq_sym_conv idem)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    29
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    30
lemma range_eq_fixes: "range (\<lambda>x. d\<cdot>x) = {x. d\<cdot>x = x}"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    31
by (auto simp add: eq_sym_conv idem)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    32
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    33
text {*
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    34
  The pointwise ordering on deflation functions coincides with
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    35
  the subset ordering of their sets of fixed-points.
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    36
*}
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    37
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    38
lemma lessI:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    39
  assumes f: "\<And>x. d\<cdot>x = x \<Longrightarrow> f\<cdot>x = x" shows "d \<sqsubseteq> f"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    40
proof (rule less_cfun_ext)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    41
  fix x
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    42
  from less have "f\<cdot>(d\<cdot>x) \<sqsubseteq> f\<cdot>x" by (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    43
  also from idem have "f\<cdot>(d\<cdot>x) = d\<cdot>x" by (rule f)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    44
  finally show "d\<cdot>x \<sqsubseteq> f\<cdot>x" .
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    45
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    46
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    47
lemma lessD: "\<lbrakk>f \<sqsubseteq> d; f\<cdot>x = x\<rbrakk> \<Longrightarrow> d\<cdot>x = x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    48
proof (rule antisym_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    49
  from less show "d\<cdot>x \<sqsubseteq> x" .
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    50
next
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    51
  assume "f \<sqsubseteq> d"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    52
  hence "f\<cdot>x \<sqsubseteq> d\<cdot>x" by (rule monofun_cfun_fun)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    53
  also assume "f\<cdot>x = x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    54
  finally show "x \<sqsubseteq> d\<cdot>x" .
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    55
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    56
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    57
end
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    58
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    59
lemma adm_deflation: "adm (\<lambda>d. deflation d)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    60
by (simp add: deflation_def)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    61
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    62
lemma deflation_ID: "deflation ID"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    63
by (simp add: deflation.intro)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    64
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    65
lemma deflation_UU: "deflation \<bottom>"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    66
by (simp add: deflation.intro)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    67
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    68
lemma deflation_less_iff:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    69
  "\<lbrakk>deflation p; deflation q\<rbrakk> \<Longrightarrow> p \<sqsubseteq> q \<longleftrightarrow> (\<forall>x. p\<cdot>x = x \<longrightarrow> q\<cdot>x = x)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    70
 apply safe
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    71
  apply (simp add: deflation.lessD)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    72
 apply (simp add: deflation.lessI)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    73
done
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    74
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    75
text {*
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    76
  The composition of two deflations is equal to
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    77
  the lesser of the two (if they are comparable).
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    78
*}
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    79
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    80
lemma deflation_less_comp1:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    81
  includes deflation f
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    82
  includes deflation g
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    83
  shows "f \<sqsubseteq> g \<Longrightarrow> f\<cdot>(g\<cdot>x) = f\<cdot>x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    84
proof (rule antisym_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    85
  from g.less show "f\<cdot>(g\<cdot>x) \<sqsubseteq> f\<cdot>x" by (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    86
next
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    87
  assume "f \<sqsubseteq> g" hence "f\<cdot>x \<sqsubseteq> g\<cdot>x" by (rule monofun_cfun_fun)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    88
  hence "f\<cdot>(f\<cdot>x) \<sqsubseteq> f\<cdot>(g\<cdot>x)" by (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    89
  also have "f\<cdot>(f\<cdot>x) = f\<cdot>x" by (rule f.idem)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    90
  finally show "f\<cdot>x \<sqsubseteq> f\<cdot>(g\<cdot>x)" .
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    91
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    92
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    93
lemma deflation_less_comp2:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    94
  "\<lbrakk>deflation f; deflation g; f \<sqsubseteq> g\<rbrakk> \<Longrightarrow> g\<cdot>(f\<cdot>x) = f\<cdot>x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    95
by (simp only: deflation.lessD deflation.idem)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    96
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    97
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    98
subsection {* Deflations with finite range *}
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    99
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   100
lemma finite_range_imp_finite_fixes:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   101
  "finite (range f) \<Longrightarrow> finite {x. f x = x}"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   102
proof -
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   103
  have "{x. f x = x} \<subseteq> range f"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   104
    by (clarify, erule subst, rule rangeI)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   105
  moreover assume "finite (range f)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   106
  ultimately show "finite {x. f x = x}"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   107
    by (rule finite_subset)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   108
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   109
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   110
locale finite_deflation = deflation +
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   111
  assumes finite_fixes: "finite {x. d\<cdot>x = x}"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   112
begin
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   113
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   114
lemma finite_range: "finite (range (\<lambda>x. d\<cdot>x))"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   115
by (simp add: range_eq_fixes finite_fixes)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   116
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   117
lemma finite_image: "finite ((\<lambda>x. d\<cdot>x) ` A)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   118
by (rule finite_subset [OF image_mono [OF subset_UNIV] finite_range])
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   119
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   120
lemma compact: "compact (d\<cdot>x)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   121
proof (rule compactI2)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   122
  fix Y :: "nat \<Rightarrow> 'a"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   123
  assume Y: "chain Y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   124
  have "finite_chain (\<lambda>i. d\<cdot>(Y i))"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   125
  proof (rule finite_range_imp_finch)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   126
    show "chain (\<lambda>i. d\<cdot>(Y i))"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   127
      using Y by simp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   128
    have "range (\<lambda>i. d\<cdot>(Y i)) \<subseteq> range (\<lambda>x. d\<cdot>x)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   129
      by clarsimp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   130
    thus "finite (range (\<lambda>i. d\<cdot>(Y i)))"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   131
      using finite_range by (rule finite_subset)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   132
  qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   133
  hence "\<exists>j. (\<Squnion>i. d\<cdot>(Y i)) = d\<cdot>(Y j)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   134
    by (simp add: finite_chain_def maxinch_is_thelub Y)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   135
  then obtain j where j: "(\<Squnion>i. d\<cdot>(Y i)) = d\<cdot>(Y j)" ..
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   136
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   137
  assume "d\<cdot>x \<sqsubseteq> (\<Squnion>i. Y i)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   138
  hence "d\<cdot>(d\<cdot>x) \<sqsubseteq> d\<cdot>(\<Squnion>i. Y i)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   139
    by (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   140
  hence "d\<cdot>x \<sqsubseteq> (\<Squnion>i. d\<cdot>(Y i))"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   141
    by (simp add: contlub_cfun_arg Y idem)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   142
  hence "d\<cdot>x \<sqsubseteq> d\<cdot>(Y j)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   143
    using j by simp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   144
  hence "d\<cdot>x \<sqsubseteq> Y j"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   145
    using less by (rule trans_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   146
  thus "\<exists>j. d\<cdot>x \<sqsubseteq> Y j" ..
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   147
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   148
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   149
end
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   150
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   151
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   152
subsection {* Continuous embedding-projection pairs *}
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   153
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   154
locale ep_pair =
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   155
  fixes e :: "'a \<rightarrow> 'b" and p :: "'b \<rightarrow> 'a"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   156
  assumes e_inverse [simp]: "\<And>x. p\<cdot>(e\<cdot>x) = x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   157
  and e_p_less: "\<And>y. e\<cdot>(p\<cdot>y) \<sqsubseteq> y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   158
begin
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   159
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   160
lemma e_less_iff [simp]: "e\<cdot>x \<sqsubseteq> e\<cdot>y \<longleftrightarrow> x \<sqsubseteq> y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   161
proof
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   162
  assume "e\<cdot>x \<sqsubseteq> e\<cdot>y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   163
  hence "p\<cdot>(e\<cdot>x) \<sqsubseteq> p\<cdot>(e\<cdot>y)" by (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   164
  thus "x \<sqsubseteq> y" by simp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   165
next
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   166
  assume "x \<sqsubseteq> y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   167
  thus "e\<cdot>x \<sqsubseteq> e\<cdot>y" by (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   168
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   169
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   170
lemma e_eq_iff [simp]: "e\<cdot>x = e\<cdot>y \<longleftrightarrow> x = y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   171
unfolding po_eq_conv e_less_iff ..
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   172
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   173
lemma p_eq_iff:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   174
  "\<lbrakk>e\<cdot>(p\<cdot>x) = x; e\<cdot>(p\<cdot>y) = y\<rbrakk> \<Longrightarrow> p\<cdot>x = p\<cdot>y \<longleftrightarrow> x = y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   175
by (safe, erule subst, erule subst, simp)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   176
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   177
lemma p_inverse: "(\<exists>x. y = e\<cdot>x) = (e\<cdot>(p\<cdot>y) = y)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   178
by (auto, rule exI, erule sym)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   179
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   180
lemma e_less_iff_less_p: "e\<cdot>x \<sqsubseteq> y \<longleftrightarrow> x \<sqsubseteq> p\<cdot>y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   181
proof
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   182
  assume "e\<cdot>x \<sqsubseteq> y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   183
  then have "p\<cdot>(e\<cdot>x) \<sqsubseteq> p\<cdot>y" by (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   184
  then show "x \<sqsubseteq> p\<cdot>y" by simp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   185
next
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   186
  assume "x \<sqsubseteq> p\<cdot>y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   187
  then have "e\<cdot>x \<sqsubseteq> e\<cdot>(p\<cdot>y)" by (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   188
  then show "e\<cdot>x \<sqsubseteq> y" using e_p_less by (rule trans_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   189
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   190
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   191
lemma compact_e_rev: "compact (e\<cdot>x) \<Longrightarrow> compact x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   192
proof -
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   193
  assume "compact (e\<cdot>x)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   194
  hence "adm (\<lambda>y. \<not> e\<cdot>x \<sqsubseteq> y)" by (rule compactD)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   195
  hence "adm (\<lambda>y. \<not> e\<cdot>x \<sqsubseteq> e\<cdot>y)" by (rule adm_subst [OF cont_Rep_CFun2])
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   196
  hence "adm (\<lambda>y. \<not> x \<sqsubseteq> y)" by simp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   197
  thus "compact x" by (rule compactI)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   198
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   199
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   200
lemma compact_e: "compact x \<Longrightarrow> compact (e\<cdot>x)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   201
proof -
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   202
  assume "compact x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   203
  hence "adm (\<lambda>y. \<not> x \<sqsubseteq> y)" by (rule compactD)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   204
  hence "adm (\<lambda>y. \<not> x \<sqsubseteq> p\<cdot>y)" by (rule adm_subst [OF cont_Rep_CFun2])
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   205
  hence "adm (\<lambda>y. \<not> e\<cdot>x \<sqsubseteq> y)" by (simp add: e_less_iff_less_p)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   206
  thus "compact (e\<cdot>x)" by (rule compactI)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   207
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   208
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   209
lemma compact_e_iff: "compact (e\<cdot>x) \<longleftrightarrow> compact x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   210
by (rule iffI [OF compact_e_rev compact_e])
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   211
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   212
text {* Deflations from ep-pairs *}
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   213
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   214
lemma deflation_e_p: "deflation (e oo p)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   215
by (simp add: deflation.intro e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   216
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   217
lemma deflation_e_d_p:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   218
  includes deflation d
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   219
  shows "deflation (e oo d oo p)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   220
proof
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   221
  fix x :: 'b
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   222
  show "(e oo d oo p)\<cdot>((e oo d oo p)\<cdot>x) = (e oo d oo p)\<cdot>x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   223
    by (simp add: idem)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   224
  show "(e oo d oo p)\<cdot>x \<sqsubseteq> x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   225
    by (simp add: e_less_iff_less_p less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   226
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   227
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   228
lemma finite_deflation_e_d_p:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   229
  includes finite_deflation d
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   230
  shows "finite_deflation (e oo d oo p)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   231
proof
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   232
  fix x :: 'b
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   233
  show "(e oo d oo p)\<cdot>((e oo d oo p)\<cdot>x) = (e oo d oo p)\<cdot>x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   234
    by (simp add: idem)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   235
  show "(e oo d oo p)\<cdot>x \<sqsubseteq> x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   236
    by (simp add: e_less_iff_less_p less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   237
  have "finite ((\<lambda>x. e\<cdot>x) ` (\<lambda>x. d\<cdot>x) ` range (\<lambda>x. p\<cdot>x))"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   238
    by (simp add: finite_image)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   239
  hence "finite (range (\<lambda>x. (e oo d oo p)\<cdot>x))"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   240
    by (simp add: image_image)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   241
  thus "finite {x. (e oo d oo p)\<cdot>x = x}"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   242
    by (rule finite_range_imp_finite_fixes)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   243
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   244
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   245
lemma deflation_p_d_e:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   246
  includes deflation d
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   247
  assumes d: "\<And>x. d\<cdot>x \<sqsubseteq> e\<cdot>(p\<cdot>x)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   248
  shows "deflation (p oo d oo e)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   249
 apply (default, simp_all)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   250
  apply (rule antisym_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   251
   apply (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   252
   apply (rule trans_less [OF d])
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   253
   apply (simp add: e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   254
  apply (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   255
  apply (rule rev_trans_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   256
  apply (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   257
  apply (rule d)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   258
  apply (simp add: d.idem)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   259
 apply (rule sq_ord_less_eq_trans)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   260
  apply (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   261
  apply (rule d.less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   262
 apply (rule e_inverse)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   263
done
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   264
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   265
lemma finite_deflation_p_d_e:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   266
  includes finite_deflation d
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   267
  assumes d: "\<And>x. d\<cdot>x \<sqsubseteq> e\<cdot>(p\<cdot>x)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   268
  shows "finite_deflation (p oo d oo e)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   269
 apply (rule finite_deflation.intro)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   270
  apply (rule deflation_p_d_e)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   271
   apply (rule `deflation d`)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   272
  apply (rule d)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   273
 apply (rule finite_deflation_axioms.intro)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   274
 apply (rule finite_range_imp_finite_fixes)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   275
 apply (simp add: range_composition [where f="\<lambda>x. p\<cdot>x"])
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   276
 apply (simp add: range_composition [where f="\<lambda>x. d\<cdot>x"])
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   277
 apply (simp add: d.finite_image)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   278
done
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   279
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   280
end
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   281
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   282
subsection {* Uniqueness of ep-pairs *}
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   283
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   284
lemma ep_pair_unique_e:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   285
  "\<lbrakk>ep_pair e1 p; ep_pair e2 p\<rbrakk> \<Longrightarrow> e1 = e2"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   286
 apply (rule ext_cfun)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   287
 apply (rule antisym_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   288
  apply (subgoal_tac "e1\<cdot>(p\<cdot>(e2\<cdot>x)) \<sqsubseteq> e2\<cdot>x")
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   289
   apply (simp add: ep_pair.e_inverse)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   290
  apply (erule ep_pair.e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   291
 apply (subgoal_tac "e2\<cdot>(p\<cdot>(e1\<cdot>x)) \<sqsubseteq> e1\<cdot>x")
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   292
  apply (simp add: ep_pair.e_inverse)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   293
 apply (erule ep_pair.e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   294
done
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   295
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   296
lemma ep_pair_unique_p:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   297
  "\<lbrakk>ep_pair e p1; ep_pair e p2\<rbrakk> \<Longrightarrow> p1 = p2"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   298
 apply (rule ext_cfun)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   299
 apply (rule antisym_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   300
  apply (subgoal_tac "p2\<cdot>(e\<cdot>(p1\<cdot>x)) \<sqsubseteq> p2\<cdot>x")
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   301
   apply (simp add: ep_pair.e_inverse)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   302
  apply (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   303
  apply (erule ep_pair.e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   304
 apply (subgoal_tac "p1\<cdot>(e\<cdot>(p2\<cdot>x)) \<sqsubseteq> p1\<cdot>x")
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   305
  apply (simp add: ep_pair.e_inverse)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   306
 apply (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   307
 apply (erule ep_pair.e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   308
done
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   309
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   310
subsection {* Composing ep-pairs *}
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   311
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   312
lemma ep_pair_ID_ID: "ep_pair ID ID"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   313
by default simp_all
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   314
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   315
lemma ep_pair_comp:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   316
  "\<lbrakk>ep_pair e1 p1; ep_pair e2 p2\<rbrakk>
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   317
    \<Longrightarrow> ep_pair (e2 oo e1) (p1 oo p2)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   318
 apply (rule ep_pair.intro)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   319
  apply (simp add: ep_pair.e_inverse)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   320
 apply (simp, rule trans_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   321
  apply (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   322
  apply (erule ep_pair.e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   323
 apply (erule ep_pair.e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   324
done
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   325
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   326
locale (open) pcpo_ep_pair = ep_pair +
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   327
  constrains e :: "'a::pcpo \<rightarrow> 'b::pcpo"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   328
  constrains p :: "'b::pcpo \<rightarrow> 'a::pcpo"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   329
begin
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   330
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   331
lemma e_strict [simp]: "e\<cdot>\<bottom> = \<bottom>"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   332
proof -
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   333
  have "\<bottom> \<sqsubseteq> p\<cdot>\<bottom>" by (rule minimal)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   334
  hence "e\<cdot>\<bottom> \<sqsubseteq> e\<cdot>(p\<cdot>\<bottom>)" by (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   335
  also have "e\<cdot>(p\<cdot>\<bottom>) \<sqsubseteq> \<bottom>" by (rule e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   336
  finally show "e\<cdot>\<bottom> = \<bottom>" by simp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   337
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   338
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   339
lemma e_defined_iff [simp]: "e\<cdot>x = \<bottom> \<longleftrightarrow> x = \<bottom>"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   340
by (rule e_eq_iff [where y="\<bottom>", unfolded e_strict])
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   341
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   342
lemma e_defined: "x \<noteq> \<bottom> \<Longrightarrow> e\<cdot>x \<noteq> \<bottom>"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   343
by simp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   344
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   345
lemma p_strict [simp]: "p\<cdot>\<bottom> = \<bottom>"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   346
by (rule e_inverse [where x="\<bottom>", unfolded e_strict])
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   347
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   348
lemmas stricts = e_strict p_strict
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   349
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   350
end
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   351
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   352
end