src/HOLCF/Deflation.thy
author ballarin
Thu, 16 Oct 2008 17:19:47 +0200
changeset 28611 983c1855a7af
parent 27681 8cedebf55539
child 28613 15a41d3fa959
permissions -rw-r--r--
More occurrences of 'includes' gone.
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:
28611
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
    81
  assumes "deflation f"
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
    82
  assumes "deflation g"
27401
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)
28611
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
    85
  interpret g: deflation [g] by fact
27401
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    86
  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
    87
next
28611
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
    88
  interpret f: deflation [f] by fact
27401
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    89
  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
    90
  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
    91
  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
    92
  finally show "f\<cdot>x \<sqsubseteq> f\<cdot>(g\<cdot>x)" .
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    93
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    94
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    95
lemma deflation_less_comp2:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    96
  "\<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
    97
by (simp only: deflation.lessD deflation.idem)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
    98
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
subsection {* Deflations with finite range *}
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   101
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   102
lemma finite_range_imp_finite_fixes:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   103
  "finite (range f) \<Longrightarrow> finite {x. f x = x}"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   104
proof -
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   105
  have "{x. f x = x} \<subseteq> range f"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   106
    by (clarify, erule subst, rule rangeI)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   107
  moreover assume "finite (range f)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   108
  ultimately show "finite {x. f x = x}"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   109
    by (rule finite_subset)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   110
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   111
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   112
locale finite_deflation = deflation +
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   113
  assumes finite_fixes: "finite {x. d\<cdot>x = x}"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   114
begin
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   115
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   116
lemma finite_range: "finite (range (\<lambda>x. d\<cdot>x))"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   117
by (simp add: range_eq_fixes finite_fixes)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   118
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   119
lemma finite_image: "finite ((\<lambda>x. d\<cdot>x) ` A)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   120
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
   121
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   122
lemma compact: "compact (d\<cdot>x)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   123
proof (rule compactI2)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   124
  fix Y :: "nat \<Rightarrow> 'a"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   125
  assume Y: "chain Y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   126
  have "finite_chain (\<lambda>i. d\<cdot>(Y i))"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   127
  proof (rule finite_range_imp_finch)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   128
    show "chain (\<lambda>i. d\<cdot>(Y i))"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   129
      using Y by simp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   130
    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
   131
      by clarsimp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   132
    thus "finite (range (\<lambda>i. d\<cdot>(Y i)))"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   133
      using finite_range by (rule finite_subset)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   134
  qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   135
  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
   136
    by (simp add: finite_chain_def maxinch_is_thelub Y)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   137
  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
   138
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   139
  assume "d\<cdot>x \<sqsubseteq> (\<Squnion>i. Y i)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   140
  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
   141
    by (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   142
  hence "d\<cdot>x \<sqsubseteq> (\<Squnion>i. d\<cdot>(Y i))"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   143
    by (simp add: contlub_cfun_arg Y idem)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   144
  hence "d\<cdot>x \<sqsubseteq> d\<cdot>(Y j)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   145
    using j by simp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   146
  hence "d\<cdot>x \<sqsubseteq> Y j"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   147
    using less by (rule trans_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   148
  thus "\<exists>j. d\<cdot>x \<sqsubseteq> Y j" ..
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   149
qed
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
end
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   152
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
subsection {* Continuous embedding-projection pairs *}
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   155
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   156
locale ep_pair =
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   157
  fixes e :: "'a \<rightarrow> 'b" and p :: "'b \<rightarrow> 'a"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   158
  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
   159
  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
   160
begin
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   161
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   162
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
   163
proof
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   164
  assume "e\<cdot>x \<sqsubseteq> e\<cdot>y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   165
  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
   166
  thus "x \<sqsubseteq> y" by simp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   167
next
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   168
  assume "x \<sqsubseteq> y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   169
  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
   170
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   171
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   172
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
   173
unfolding po_eq_conv e_less_iff ..
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   174
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   175
lemma p_eq_iff:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   176
  "\<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
   177
by (safe, erule subst, erule subst, simp)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   178
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   179
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
   180
by (auto, rule exI, erule sym)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   181
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   182
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
   183
proof
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   184
  assume "e\<cdot>x \<sqsubseteq> y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   185
  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
   186
  then show "x \<sqsubseteq> p\<cdot>y" by simp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   187
next
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   188
  assume "x \<sqsubseteq> p\<cdot>y"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   189
  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
   190
  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
   191
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   192
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   193
lemma compact_e_rev: "compact (e\<cdot>x) \<Longrightarrow> compact x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   194
proof -
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   195
  assume "compact (e\<cdot>x)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   196
  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
   197
  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
   198
  hence "adm (\<lambda>y. \<not> x \<sqsubseteq> y)" by simp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   199
  thus "compact x" by (rule compactI)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   200
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   201
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   202
lemma compact_e: "compact x \<Longrightarrow> compact (e\<cdot>x)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   203
proof -
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   204
  assume "compact x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   205
  hence "adm (\<lambda>y. \<not> x \<sqsubseteq> y)" by (rule compactD)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   206
  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
   207
  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
   208
  thus "compact (e\<cdot>x)" by (rule compactI)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   209
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   210
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   211
lemma compact_e_iff: "compact (e\<cdot>x) \<longleftrightarrow> compact x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   212
by (rule iffI [OF compact_e_rev compact_e])
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
text {* Deflations from ep-pairs *}
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   215
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   216
lemma deflation_e_p: "deflation (e oo p)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   217
by (simp add: deflation.intro e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   218
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   219
lemma deflation_e_d_p:
28611
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   220
  assumes "deflation d"
27401
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   221
  shows "deflation (e oo d oo p)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   222
proof
28611
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   223
  interpret deflation [d] by fact
27401
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   224
  fix x :: 'b
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   225
  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
   226
    by (simp add: idem)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   227
  show "(e oo d oo p)\<cdot>x \<sqsubseteq> x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   228
    by (simp add: e_less_iff_less_p less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   229
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   230
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   231
lemma finite_deflation_e_d_p:
28611
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   232
  assumes "finite_deflation d"
27401
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   233
  shows "finite_deflation (e oo d oo p)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   234
proof
28611
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   235
  interpret finite_deflation [d] by fact
27401
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   236
  fix x :: 'b
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   237
  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
   238
    by (simp add: idem)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   239
  show "(e oo d oo p)\<cdot>x \<sqsubseteq> x"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   240
    by (simp add: e_less_iff_less_p less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   241
  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
   242
    by (simp add: finite_image)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   243
  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
   244
    by (simp add: image_image)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   245
  thus "finite {x. (e oo d oo p)\<cdot>x = x}"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   246
    by (rule finite_range_imp_finite_fixes)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   247
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   248
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   249
lemma deflation_p_d_e:
28611
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   250
  assumes "deflation d"
27401
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   251
  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
   252
  shows "deflation (p oo d oo e)"
28611
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   253
proof -
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   254
  interpret d: deflation [d] by fact
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   255
  show ?thesis
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   256
   apply (default, simp_all)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   257
    apply (rule antisym_less)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   258
     apply (rule monofun_cfun_arg)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   259
     apply (rule trans_less [OF d])
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   260
     apply (simp add: e_p_less)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   261
    apply (rule monofun_cfun_arg)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   262
    apply (rule rev_trans_less)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   263
    apply (rule monofun_cfun_arg)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   264
    apply (rule d)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   265
    apply (simp add: d.idem)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   266
   apply (rule sq_ord_less_eq_trans)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   267
    apply (rule monofun_cfun_arg)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   268
    apply (rule d.less)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   269
   apply (rule e_inverse)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   270
  done
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   271
qed
27401
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   272
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   273
lemma finite_deflation_p_d_e:
28611
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   274
  assumes "finite_deflation d"
27401
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   275
  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
   276
  shows "finite_deflation (p oo d oo e)"
28611
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   277
proof -
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   278
  interpret d: finite_deflation [d] by fact
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   279
  show ?thesis
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   280
   apply (rule finite_deflation.intro)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   281
    apply (rule deflation_p_d_e)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   282
     apply (rule `finite_deflation d` [THEN finite_deflation.axioms(1)])
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   283
    apply (rule d)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   284
   apply (rule finite_deflation_axioms.intro)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   285
   apply (rule finite_range_imp_finite_fixes)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   286
   apply (simp add: range_composition [where f="\<lambda>x. p\<cdot>x"])
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   287
   apply (simp add: range_composition [where f="\<lambda>x. d\<cdot>x"])
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   288
   apply (simp add: d.finite_image)
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   289
  done
983c1855a7af More occurrences of 'includes' gone.
ballarin
parents: 27681
diff changeset
   290
qed
27401
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   291
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   292
end
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   293
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   294
subsection {* Uniqueness of ep-pairs *}
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_e:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   297
  "\<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
   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 "e1\<cdot>(p\<cdot>(e2\<cdot>x)) \<sqsubseteq> e2\<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 (erule ep_pair.e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   303
 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
   304
  apply (simp add: ep_pair.e_inverse)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   305
 apply (erule ep_pair.e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   306
done
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   307
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   308
lemma ep_pair_unique_p:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   309
  "\<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
   310
 apply (rule ext_cfun)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   311
 apply (rule antisym_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   312
  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
   313
   apply (simp add: ep_pair.e_inverse)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   314
  apply (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   315
  apply (erule ep_pair.e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   316
 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
   317
  apply (simp add: ep_pair.e_inverse)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   318
 apply (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   319
 apply (erule ep_pair.e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   320
done
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   321
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   322
subsection {* Composing ep-pairs *}
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   323
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   324
lemma ep_pair_ID_ID: "ep_pair ID ID"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   325
by default simp_all
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   326
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   327
lemma ep_pair_comp:
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   328
  "\<lbrakk>ep_pair e1 p1; ep_pair e2 p2\<rbrakk>
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   329
    \<Longrightarrow> ep_pair (e2 oo e1) (p1 oo p2)"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   330
 apply (rule ep_pair.intro)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   331
  apply (simp add: ep_pair.e_inverse)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   332
 apply (simp, rule trans_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   333
  apply (rule monofun_cfun_arg)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   334
  apply (erule ep_pair.e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   335
 apply (erule ep_pair.e_p_less)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   336
done
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   337
27681
8cedebf55539 dropped locale (open)
haftmann
parents: 27401
diff changeset
   338
locale pcpo_ep_pair = ep_pair +
27401
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   339
  constrains e :: "'a::pcpo \<rightarrow> 'b::pcpo"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   340
  constrains p :: "'b::pcpo \<rightarrow> 'a::pcpo"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   341
begin
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   342
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   343
lemma e_strict [simp]: "e\<cdot>\<bottom> = \<bottom>"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   344
proof -
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   345
  have "\<bottom> \<sqsubseteq> p\<cdot>\<bottom>" by (rule minimal)
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   346
  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
   347
  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
   348
  finally show "e\<cdot>\<bottom> = \<bottom>" by simp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   349
qed
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   350
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   351
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
   352
by (rule e_eq_iff [where y="\<bottom>", unfolded e_strict])
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   353
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   354
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
   355
by simp
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   356
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   357
lemma p_strict [simp]: "p\<cdot>\<bottom> = \<bottom>"
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   358
by (rule e_inverse [where x="\<bottom>", unfolded e_strict])
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   359
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   360
lemmas stricts = e_strict p_strict
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   361
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   362
end
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   363
4edc81f93e35 New theory of deflations and embedding-projection pairs
huffman
parents:
diff changeset
   364
end