author | huffman |
Sun, 14 Mar 2010 19:48:33 -0700 | |
changeset 35794 | 8cd7134275cc |
parent 35168 | 07b3112e464b |
child 35901 | 12f09bf2c77f |
permissions | -rw-r--r-- |
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 |
Author: Brian Huffman |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
3 |
*) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
4 |
|
35794 | 5 |
header {* Continuous deflations and embedding-projection pairs *} |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
6 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
7 |
theory Deflation |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
8 |
imports Cfun |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
9 |
begin |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
10 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
11 |
defaultsort cpo |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
12 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
13 |
subsection {* Continuous deflations *} |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
14 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
15 |
locale deflation = |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
16 |
fixes d :: "'a \<rightarrow> 'a" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
17 |
assumes idem: "\<And>x. d\<cdot>(d\<cdot>x) = d\<cdot>x" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
18 |
assumes below: "\<And>x. d\<cdot>x \<sqsubseteq> x" |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
19 |
begin |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
20 |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
21 |
lemma below_ID: "d \<sqsubseteq> ID" |
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
22 |
by (rule below_cfun_ext, simp add: below) |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
23 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
24 |
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
|
25 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
26 |
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
|
27 |
by (auto simp add: eq_sym_conv idem) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
28 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
29 |
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
|
30 |
by (auto simp add: eq_sym_conv idem) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
31 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
32 |
text {* |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
33 |
The pointwise ordering on deflation functions coincides with |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
34 |
the subset ordering of their sets of fixed-points. |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
35 |
*} |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
36 |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
37 |
lemma belowI: |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
38 |
assumes f: "\<And>x. d\<cdot>x = x \<Longrightarrow> f\<cdot>x = x" shows "d \<sqsubseteq> f" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
39 |
proof (rule below_cfun_ext) |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
40 |
fix x |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
41 |
from below have "f\<cdot>(d\<cdot>x) \<sqsubseteq> f\<cdot>x" by (rule monofun_cfun_arg) |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
42 |
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
|
43 |
finally show "d\<cdot>x \<sqsubseteq> f\<cdot>x" . |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
44 |
qed |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
45 |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
46 |
lemma belowD: "\<lbrakk>f \<sqsubseteq> d; f\<cdot>x = x\<rbrakk> \<Longrightarrow> d\<cdot>x = x" |
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
47 |
proof (rule below_antisym) |
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
48 |
from below show "d\<cdot>x \<sqsubseteq> x" . |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
49 |
next |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
50 |
assume "f \<sqsubseteq> d" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
51 |
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
|
52 |
also assume "f\<cdot>x = x" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
53 |
finally show "x \<sqsubseteq> d\<cdot>x" . |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
54 |
qed |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
55 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
56 |
end |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
57 |
|
33503 | 58 |
lemma deflation_strict: "deflation d \<Longrightarrow> d\<cdot>\<bottom> = \<bottom>" |
59 |
by (rule deflation.below [THEN UU_I]) |
|
60 |
||
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
61 |
lemma adm_deflation: "adm (\<lambda>d. deflation d)" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
62 |
by (simp add: deflation_def) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
63 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
64 |
lemma deflation_ID: "deflation ID" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
65 |
by (simp add: deflation.intro) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
66 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
67 |
lemma deflation_UU: "deflation \<bottom>" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
68 |
by (simp add: deflation.intro) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
69 |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
70 |
lemma deflation_below_iff: |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
71 |
"\<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
|
72 |
apply safe |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
73 |
apply (simp add: deflation.belowD) |
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
74 |
apply (simp add: deflation.belowI) |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
75 |
done |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
76 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
77 |
text {* |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
78 |
The composition of two deflations is equal to |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
79 |
the lesser of the two (if they are comparable). |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
80 |
*} |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
81 |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
82 |
lemma deflation_below_comp1: |
28611 | 83 |
assumes "deflation f" |
84 |
assumes "deflation g" |
|
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
85 |
shows "f \<sqsubseteq> g \<Longrightarrow> f\<cdot>(g\<cdot>x) = f\<cdot>x" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
86 |
proof (rule below_antisym) |
29237 | 87 |
interpret g: deflation g by fact |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
88 |
from g.below show "f\<cdot>(g\<cdot>x) \<sqsubseteq> f\<cdot>x" by (rule monofun_cfun_arg) |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
89 |
next |
29237 | 90 |
interpret f: deflation f by fact |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
91 |
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
|
92 |
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
|
93 |
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
|
94 |
finally show "f\<cdot>x \<sqsubseteq> f\<cdot>(g\<cdot>x)" . |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
95 |
qed |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
96 |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
97 |
lemma deflation_below_comp2: |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
98 |
"\<lbrakk>deflation f; deflation g; f \<sqsubseteq> g\<rbrakk> \<Longrightarrow> g\<cdot>(f\<cdot>x) = f\<cdot>x" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
99 |
by (simp only: deflation.belowD deflation.idem) |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
100 |
|
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 |
subsection {* Deflations with finite range *} |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
103 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
104 |
lemma finite_range_imp_finite_fixes: |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
105 |
"finite (range f) \<Longrightarrow> finite {x. f x = x}" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
106 |
proof - |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
107 |
have "{x. f x = x} \<subseteq> range f" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
108 |
by (clarify, erule subst, rule rangeI) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
109 |
moreover assume "finite (range f)" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
110 |
ultimately show "finite {x. f x = x}" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
111 |
by (rule finite_subset) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
112 |
qed |
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 |
locale finite_deflation = deflation + |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
115 |
assumes finite_fixes: "finite {x. d\<cdot>x = x}" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
116 |
begin |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
117 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
118 |
lemma finite_range: "finite (range (\<lambda>x. d\<cdot>x))" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
119 |
by (simp add: range_eq_fixes finite_fixes) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
120 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
121 |
lemma finite_image: "finite ((\<lambda>x. d\<cdot>x) ` A)" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
122 |
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
|
123 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
124 |
lemma compact: "compact (d\<cdot>x)" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
125 |
proof (rule compactI2) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
126 |
fix Y :: "nat \<Rightarrow> 'a" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
127 |
assume Y: "chain Y" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
128 |
have "finite_chain (\<lambda>i. d\<cdot>(Y i))" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
129 |
proof (rule finite_range_imp_finch) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
130 |
show "chain (\<lambda>i. d\<cdot>(Y i))" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
131 |
using Y by simp |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
132 |
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
|
133 |
by clarsimp |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
134 |
thus "finite (range (\<lambda>i. d\<cdot>(Y i)))" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
135 |
using finite_range by (rule finite_subset) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
136 |
qed |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
137 |
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
|
138 |
by (simp add: finite_chain_def maxinch_is_thelub Y) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
139 |
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
|
140 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
141 |
assume "d\<cdot>x \<sqsubseteq> (\<Squnion>i. Y i)" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
142 |
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
|
143 |
by (rule monofun_cfun_arg) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
144 |
hence "d\<cdot>x \<sqsubseteq> (\<Squnion>i. d\<cdot>(Y i))" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
145 |
by (simp add: contlub_cfun_arg Y idem) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
146 |
hence "d\<cdot>x \<sqsubseteq> d\<cdot>(Y j)" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
147 |
using j by simp |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
148 |
hence "d\<cdot>x \<sqsubseteq> Y j" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
149 |
using below by (rule below_trans) |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
150 |
thus "\<exists>j. d\<cdot>x \<sqsubseteq> Y j" .. |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
151 |
qed |
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 |
end |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
154 |
|
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 |
subsection {* Continuous embedding-projection pairs *} |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
157 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
158 |
locale ep_pair = |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
159 |
fixes e :: "'a \<rightarrow> 'b" and p :: "'b \<rightarrow> 'a" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
160 |
assumes e_inverse [simp]: "\<And>x. p\<cdot>(e\<cdot>x) = x" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
161 |
and e_p_below: "\<And>y. e\<cdot>(p\<cdot>y) \<sqsubseteq> y" |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
162 |
begin |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
163 |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
164 |
lemma e_below_iff [simp]: "e\<cdot>x \<sqsubseteq> e\<cdot>y \<longleftrightarrow> x \<sqsubseteq> y" |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
165 |
proof |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
166 |
assume "e\<cdot>x \<sqsubseteq> e\<cdot>y" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
167 |
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
|
168 |
thus "x \<sqsubseteq> y" by simp |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
169 |
next |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
170 |
assume "x \<sqsubseteq> y" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
171 |
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
|
172 |
qed |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
173 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
174 |
lemma e_eq_iff [simp]: "e\<cdot>x = e\<cdot>y \<longleftrightarrow> x = y" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
175 |
unfolding po_eq_conv e_below_iff .. |
27401
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_eq_iff: |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
178 |
"\<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
|
179 |
by (safe, erule subst, erule subst, simp) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
180 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
181 |
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
|
182 |
by (auto, rule exI, erule sym) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
183 |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
184 |
lemma e_below_iff_below_p: "e\<cdot>x \<sqsubseteq> y \<longleftrightarrow> x \<sqsubseteq> p\<cdot>y" |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
185 |
proof |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
186 |
assume "e\<cdot>x \<sqsubseteq> y" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
187 |
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
|
188 |
then show "x \<sqsubseteq> p\<cdot>y" by simp |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
189 |
next |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
190 |
assume "x \<sqsubseteq> p\<cdot>y" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
191 |
then have "e\<cdot>x \<sqsubseteq> e\<cdot>(p\<cdot>y)" by (rule monofun_cfun_arg) |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
192 |
then show "e\<cdot>x \<sqsubseteq> y" using e_p_below by (rule below_trans) |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
193 |
qed |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
194 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
195 |
lemma compact_e_rev: "compact (e\<cdot>x) \<Longrightarrow> compact x" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
196 |
proof - |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
197 |
assume "compact (e\<cdot>x)" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
198 |
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
|
199 |
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
|
200 |
hence "adm (\<lambda>y. \<not> x \<sqsubseteq> y)" by simp |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
201 |
thus "compact x" by (rule compactI) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
202 |
qed |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
203 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
204 |
lemma compact_e: "compact x \<Longrightarrow> compact (e\<cdot>x)" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
205 |
proof - |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
206 |
assume "compact x" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
207 |
hence "adm (\<lambda>y. \<not> x \<sqsubseteq> y)" by (rule compactD) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
208 |
hence "adm (\<lambda>y. \<not> x \<sqsubseteq> p\<cdot>y)" by (rule adm_subst [OF cont_Rep_CFun2]) |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
209 |
hence "adm (\<lambda>y. \<not> e\<cdot>x \<sqsubseteq> y)" by (simp add: e_below_iff_below_p) |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
210 |
thus "compact (e\<cdot>x)" by (rule compactI) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
211 |
qed |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
212 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
213 |
lemma compact_e_iff: "compact (e\<cdot>x) \<longleftrightarrow> compact x" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
214 |
by (rule iffI [OF compact_e_rev compact_e]) |
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 |
text {* Deflations from ep-pairs *} |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
217 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
218 |
lemma deflation_e_p: "deflation (e oo p)" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
219 |
by (simp add: deflation.intro e_p_below) |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
220 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
221 |
lemma deflation_e_d_p: |
28611 | 222 |
assumes "deflation d" |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
223 |
shows "deflation (e oo d oo p)" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
224 |
proof |
29237 | 225 |
interpret deflation d by fact |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
226 |
fix x :: 'b |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
227 |
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
|
228 |
by (simp add: idem) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
229 |
show "(e oo d oo p)\<cdot>x \<sqsubseteq> x" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
230 |
by (simp add: e_below_iff_below_p below) |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
231 |
qed |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
232 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
233 |
lemma finite_deflation_e_d_p: |
28611 | 234 |
assumes "finite_deflation d" |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
235 |
shows "finite_deflation (e oo d oo p)" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
236 |
proof |
29237 | 237 |
interpret finite_deflation d by fact |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
238 |
fix x :: 'b |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
239 |
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
|
240 |
by (simp add: idem) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
241 |
show "(e oo d oo p)\<cdot>x \<sqsubseteq> x" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
242 |
by (simp add: e_below_iff_below_p below) |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
243 |
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
|
244 |
by (simp add: finite_image) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
245 |
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
|
246 |
by (simp add: image_image) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
247 |
thus "finite {x. (e oo d oo p)\<cdot>x = x}" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
248 |
by (rule finite_range_imp_finite_fixes) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
249 |
qed |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
250 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
251 |
lemma deflation_p_d_e: |
28611 | 252 |
assumes "deflation d" |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
253 |
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
|
254 |
shows "deflation (p oo d oo e)" |
28611 | 255 |
proof - |
29237 | 256 |
interpret d: deflation d by fact |
28613 | 257 |
{ |
258 |
fix x |
|
259 |
have "d\<cdot>(e\<cdot>x) \<sqsubseteq> e\<cdot>x" |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
260 |
by (rule d.below) |
28613 | 261 |
hence "p\<cdot>(d\<cdot>(e\<cdot>x)) \<sqsubseteq> p\<cdot>(e\<cdot>x)" |
262 |
by (rule monofun_cfun_arg) |
|
263 |
hence "(p oo d oo e)\<cdot>x \<sqsubseteq> x" |
|
264 |
by simp |
|
265 |
} |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
266 |
note p_d_e_below = this |
28611 | 267 |
show ?thesis |
28613 | 268 |
proof |
269 |
fix x |
|
270 |
show "(p oo d oo e)\<cdot>x \<sqsubseteq> x" |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
271 |
by (rule p_d_e_below) |
28613 | 272 |
next |
273 |
fix x |
|
274 |
show "(p oo d oo e)\<cdot>((p oo d oo e)\<cdot>x) = (p oo d oo e)\<cdot>x" |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
275 |
proof (rule below_antisym) |
28613 | 276 |
show "(p oo d oo e)\<cdot>((p oo d oo e)\<cdot>x) \<sqsubseteq> (p oo d oo e)\<cdot>x" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
277 |
by (rule p_d_e_below) |
28613 | 278 |
have "p\<cdot>(d\<cdot>(d\<cdot>(d\<cdot>(e\<cdot>x)))) \<sqsubseteq> p\<cdot>(d\<cdot>(e\<cdot>(p\<cdot>(d\<cdot>(e\<cdot>x)))))" |
279 |
by (intro monofun_cfun_arg d) |
|
280 |
hence "p\<cdot>(d\<cdot>(e\<cdot>x)) \<sqsubseteq> p\<cdot>(d\<cdot>(e\<cdot>(p\<cdot>(d\<cdot>(e\<cdot>x)))))" |
|
281 |
by (simp only: d.idem) |
|
282 |
thus "(p oo d oo e)\<cdot>x \<sqsubseteq> (p oo d oo e)\<cdot>((p oo d oo e)\<cdot>x)" |
|
283 |
by simp |
|
284 |
qed |
|
285 |
qed |
|
28611 | 286 |
qed |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
287 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
288 |
lemma finite_deflation_p_d_e: |
28611 | 289 |
assumes "finite_deflation d" |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
290 |
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
|
291 |
shows "finite_deflation (p oo d oo e)" |
28611 | 292 |
proof - |
29237 | 293 |
interpret d: finite_deflation d by fact |
28611 | 294 |
show ?thesis |
28613 | 295 |
proof (intro_locales) |
296 |
have "deflation d" .. |
|
297 |
thus "deflation (p oo d oo e)" |
|
298 |
using d by (rule deflation_p_d_e) |
|
299 |
next |
|
300 |
show "finite_deflation_axioms (p oo d oo e)" |
|
301 |
proof |
|
302 |
have "finite ((\<lambda>x. d\<cdot>x) ` range (\<lambda>x. e\<cdot>x))" |
|
303 |
by (rule d.finite_image) |
|
304 |
hence "finite ((\<lambda>x. p\<cdot>x) ` (\<lambda>x. d\<cdot>x) ` range (\<lambda>x. e\<cdot>x))" |
|
305 |
by (rule finite_imageI) |
|
306 |
hence "finite (range (\<lambda>x. (p oo d oo e)\<cdot>x))" |
|
307 |
by (simp add: image_image) |
|
308 |
thus "finite {x. (p oo d oo e)\<cdot>x = x}" |
|
309 |
by (rule finite_range_imp_finite_fixes) |
|
310 |
qed |
|
311 |
qed |
|
28611 | 312 |
qed |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
313 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
314 |
end |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
315 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
316 |
subsection {* Uniqueness of ep-pairs *} |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
317 |
|
28613 | 318 |
lemma ep_pair_unique_e_lemma: |
35168 | 319 |
assumes 1: "ep_pair e1 p" and 2: "ep_pair e2 p" |
28613 | 320 |
shows "e1 \<sqsubseteq> e2" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
321 |
proof (rule below_cfun_ext) |
28613 | 322 |
fix x |
323 |
have "e1\<cdot>(p\<cdot>(e2\<cdot>x)) \<sqsubseteq> e2\<cdot>x" |
|
35168 | 324 |
by (rule ep_pair.e_p_below [OF 1]) |
28613 | 325 |
thus "e1\<cdot>x \<sqsubseteq> e2\<cdot>x" |
35168 | 326 |
by (simp only: ep_pair.e_inverse [OF 2]) |
28613 | 327 |
qed |
328 |
||
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
329 |
lemma ep_pair_unique_e: |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
330 |
"\<lbrakk>ep_pair e1 p; ep_pair e2 p\<rbrakk> \<Longrightarrow> e1 = e2" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
331 |
by (fast intro: below_antisym elim: ep_pair_unique_e_lemma) |
28613 | 332 |
|
333 |
lemma ep_pair_unique_p_lemma: |
|
35168 | 334 |
assumes 1: "ep_pair e p1" and 2: "ep_pair e p2" |
28613 | 335 |
shows "p1 \<sqsubseteq> p2" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
336 |
proof (rule below_cfun_ext) |
28613 | 337 |
fix x |
338 |
have "e\<cdot>(p1\<cdot>x) \<sqsubseteq> x" |
|
35168 | 339 |
by (rule ep_pair.e_p_below [OF 1]) |
28613 | 340 |
hence "p2\<cdot>(e\<cdot>(p1\<cdot>x)) \<sqsubseteq> p2\<cdot>x" |
341 |
by (rule monofun_cfun_arg) |
|
342 |
thus "p1\<cdot>x \<sqsubseteq> p2\<cdot>x" |
|
35168 | 343 |
by (simp only: ep_pair.e_inverse [OF 2]) |
28613 | 344 |
qed |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
345 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
346 |
lemma ep_pair_unique_p: |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
347 |
"\<lbrakk>ep_pair e p1; ep_pair e p2\<rbrakk> \<Longrightarrow> p1 = p2" |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
348 |
by (fast intro: below_antisym elim: ep_pair_unique_p_lemma) |
27401
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 |
subsection {* Composing ep-pairs *} |
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 |
lemma ep_pair_ID_ID: "ep_pair ID ID" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
353 |
by default simp_all |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
354 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
355 |
lemma ep_pair_comp: |
28613 | 356 |
assumes "ep_pair e1 p1" and "ep_pair e2 p2" |
357 |
shows "ep_pair (e2 oo e1) (p1 oo p2)" |
|
358 |
proof |
|
29237 | 359 |
interpret ep1: ep_pair e1 p1 by fact |
360 |
interpret ep2: ep_pair e2 p2 by fact |
|
28613 | 361 |
fix x y |
362 |
show "(p1 oo p2)\<cdot>((e2 oo e1)\<cdot>x) = x" |
|
363 |
by simp |
|
364 |
have "e1\<cdot>(p1\<cdot>(p2\<cdot>y)) \<sqsubseteq> p2\<cdot>y" |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
365 |
by (rule ep1.e_p_below) |
28613 | 366 |
hence "e2\<cdot>(e1\<cdot>(p1\<cdot>(p2\<cdot>y))) \<sqsubseteq> e2\<cdot>(p2\<cdot>y)" |
367 |
by (rule monofun_cfun_arg) |
|
368 |
also have "e2\<cdot>(p2\<cdot>y) \<sqsubseteq> y" |
|
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
369 |
by (rule ep2.e_p_below) |
28613 | 370 |
finally show "(e2 oo e1)\<cdot>((p1 oo p2)\<cdot>y) \<sqsubseteq> y" |
371 |
by simp |
|
372 |
qed |
|
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
373 |
|
27681 | 374 |
locale pcpo_ep_pair = ep_pair + |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
375 |
constrains e :: "'a::pcpo \<rightarrow> 'b::pcpo" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
376 |
constrains p :: "'b::pcpo \<rightarrow> 'a::pcpo" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
377 |
begin |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
378 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
379 |
lemma e_strict [simp]: "e\<cdot>\<bottom> = \<bottom>" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
380 |
proof - |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
381 |
have "\<bottom> \<sqsubseteq> p\<cdot>\<bottom>" by (rule minimal) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
382 |
hence "e\<cdot>\<bottom> \<sqsubseteq> e\<cdot>(p\<cdot>\<bottom>)" by (rule monofun_cfun_arg) |
31076
99fe356cbbc2
rename constant sq_le to below; rename class sq_ord to below; less->below in many lemma names
huffman
parents:
29252
diff
changeset
|
383 |
also have "e\<cdot>(p\<cdot>\<bottom>) \<sqsubseteq> \<bottom>" by (rule e_p_below) |
27401
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
384 |
finally show "e\<cdot>\<bottom> = \<bottom>" by simp |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
385 |
qed |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
386 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
387 |
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
|
388 |
by (rule e_eq_iff [where y="\<bottom>", unfolded e_strict]) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
389 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
390 |
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
|
391 |
by simp |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
392 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
393 |
lemma p_strict [simp]: "p\<cdot>\<bottom> = \<bottom>" |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
394 |
by (rule e_inverse [where x="\<bottom>", unfolded e_strict]) |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
395 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
396 |
lemmas stricts = e_strict p_strict |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
397 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
398 |
end |
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
399 |
|
4edc81f93e35
New theory of deflations and embedding-projection pairs
huffman
parents:
diff
changeset
|
400 |
end |