author | haftmann |
Wed, 28 Oct 2009 19:09:47 +0100 | |
changeset 33296 | a3924d1069e5 |
parent 25474 | c41b433b0f65 |
child 35317 | d57da4abb47d |
permissions | -rw-r--r-- |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
1 |
(* Title: HOL/Lattice/CompleteLattice.thy |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
2 |
ID: $Id$ |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
3 |
Author: Markus Wenzel, TU Muenchen |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
4 |
*) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
5 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
6 |
header {* Complete lattices *} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
7 |
|
16417 | 8 |
theory CompleteLattice imports Lattice begin |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
9 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
10 |
subsection {* Complete lattice operations *} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
11 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
12 |
text {* |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
13 |
A \emph{complete lattice} is a partial order with general |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
14 |
(infinitary) infimum of any set of elements. General supremum |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
15 |
exists as well, as a consequence of the connection of infinitary |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
16 |
bounds (see \S\ref{sec:connect-bounds}). |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
17 |
*} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
18 |
|
11099 | 19 |
axclass complete_lattice \<subseteq> partial_order |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
20 |
ex_Inf: "\<exists>inf. is_Inf A inf" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
21 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
22 |
theorem ex_Sup: "\<exists>sup::'a::complete_lattice. is_Sup A sup" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
23 |
proof - |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
24 |
from ex_Inf obtain sup where "is_Inf {b. \<forall>a\<in>A. a \<sqsubseteq> b} sup" by blast |
23373 | 25 |
then have "is_Sup A sup" by (rule Inf_Sup) |
26 |
then show ?thesis .. |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
27 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
28 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
29 |
text {* |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
30 |
The general @{text \<Sqinter>} (meet) and @{text \<Squnion>} (join) operations select |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
31 |
such infimum and supremum elements. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
32 |
*} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
33 |
|
19736 | 34 |
definition |
21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21210
diff
changeset
|
35 |
Meet :: "'a::complete_lattice set \<Rightarrow> 'a" where |
19736 | 36 |
"Meet A = (THE inf. is_Inf A inf)" |
21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21210
diff
changeset
|
37 |
definition |
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21210
diff
changeset
|
38 |
Join :: "'a::complete_lattice set \<Rightarrow> 'a" where |
19736 | 39 |
"Join A = (THE sup. is_Sup A sup)" |
40 |
||
21210 | 41 |
notation (xsymbols) |
21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21210
diff
changeset
|
42 |
Meet ("\<Sqinter>_" [90] 90) and |
19736 | 43 |
Join ("\<Squnion>_" [90] 90) |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
44 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
45 |
text {* |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
46 |
Due to unique existence of bounds, the complete lattice operations |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
47 |
may be exhibited as follows. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
48 |
*} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
49 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
50 |
lemma Meet_equality [elim?]: "is_Inf A inf \<Longrightarrow> \<Sqinter>A = inf" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
51 |
proof (unfold Meet_def) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
52 |
assume "is_Inf A inf" |
23373 | 53 |
then show "(THE inf. is_Inf A inf) = inf" |
54 |
by (rule the_equality) (rule is_Inf_uniq [OF _ `is_Inf A inf`]) |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
55 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
56 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
57 |
lemma MeetI [intro?]: |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
58 |
"(\<And>a. a \<in> A \<Longrightarrow> inf \<sqsubseteq> a) \<Longrightarrow> |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
59 |
(\<And>b. \<forall>a \<in> A. b \<sqsubseteq> a \<Longrightarrow> b \<sqsubseteq> inf) \<Longrightarrow> |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
60 |
\<Sqinter>A = inf" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
61 |
by (rule Meet_equality, rule is_InfI) blast+ |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
62 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
63 |
lemma Join_equality [elim?]: "is_Sup A sup \<Longrightarrow> \<Squnion>A = sup" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
64 |
proof (unfold Join_def) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
65 |
assume "is_Sup A sup" |
23373 | 66 |
then show "(THE sup. is_Sup A sup) = sup" |
67 |
by (rule the_equality) (rule is_Sup_uniq [OF _ `is_Sup A sup`]) |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
68 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
69 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
70 |
lemma JoinI [intro?]: |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
71 |
"(\<And>a. a \<in> A \<Longrightarrow> a \<sqsubseteq> sup) \<Longrightarrow> |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
72 |
(\<And>b. \<forall>a \<in> A. a \<sqsubseteq> b \<Longrightarrow> sup \<sqsubseteq> b) \<Longrightarrow> |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
73 |
\<Squnion>A = sup" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
74 |
by (rule Join_equality, rule is_SupI) blast+ |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
75 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
76 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
77 |
text {* |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
78 |
\medskip The @{text \<Sqinter>} and @{text \<Squnion>} operations indeed determine |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
79 |
bounds on a complete lattice structure. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
80 |
*} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
81 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
82 |
lemma is_Inf_Meet [intro?]: "is_Inf A (\<Sqinter>A)" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
83 |
proof (unfold Meet_def) |
11441 | 84 |
from ex_Inf obtain inf where "is_Inf A inf" .. |
23373 | 85 |
then show "is_Inf A (THE inf. is_Inf A inf)" |
86 |
by (rule theI) (rule is_Inf_uniq [OF _ `is_Inf A inf`]) |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
87 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
88 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
89 |
lemma Meet_greatest [intro?]: "(\<And>a. a \<in> A \<Longrightarrow> x \<sqsubseteq> a) \<Longrightarrow> x \<sqsubseteq> \<Sqinter>A" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
90 |
by (rule is_Inf_greatest, rule is_Inf_Meet) blast |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
91 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
92 |
lemma Meet_lower [intro?]: "a \<in> A \<Longrightarrow> \<Sqinter>A \<sqsubseteq> a" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
93 |
by (rule is_Inf_lower) (rule is_Inf_Meet) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
94 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
95 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
96 |
lemma is_Sup_Join [intro?]: "is_Sup A (\<Squnion>A)" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
97 |
proof (unfold Join_def) |
11441 | 98 |
from ex_Sup obtain sup where "is_Sup A sup" .. |
23373 | 99 |
then show "is_Sup A (THE sup. is_Sup A sup)" |
100 |
by (rule theI) (rule is_Sup_uniq [OF _ `is_Sup A sup`]) |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
101 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
102 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
103 |
lemma Join_least [intro?]: "(\<And>a. a \<in> A \<Longrightarrow> a \<sqsubseteq> x) \<Longrightarrow> \<Squnion>A \<sqsubseteq> x" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
104 |
by (rule is_Sup_least, rule is_Sup_Join) blast |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
105 |
lemma Join_lower [intro?]: "a \<in> A \<Longrightarrow> a \<sqsubseteq> \<Squnion>A" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
106 |
by (rule is_Sup_upper) (rule is_Sup_Join) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
107 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
108 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
109 |
subsection {* The Knaster-Tarski Theorem *} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
110 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
111 |
text {* |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
112 |
The Knaster-Tarski Theorem (in its simplest formulation) states that |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
113 |
any monotone function on a complete lattice has a least fixed-point |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
114 |
(see \cite[pages 93--94]{Davey-Priestley:1990} for example). This |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
115 |
is a consequence of the basic boundary properties of the complete |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
116 |
lattice operations. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
117 |
*} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
118 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
119 |
theorem Knaster_Tarski: |
25469 | 120 |
assumes mono: "\<And>x y. x \<sqsubseteq> y \<Longrightarrow> f x \<sqsubseteq> f y" |
25474
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
121 |
obtains a :: "'a::complete_lattice" where |
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
122 |
"f a = a" and "\<And>a'. f a' = a' \<Longrightarrow> a \<sqsubseteq> a'" |
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
123 |
proof |
25469 | 124 |
let ?H = "{u. f u \<sqsubseteq> u}" |
125 |
let ?a = "\<Sqinter>?H" |
|
25474
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
126 |
show "f ?a = ?a" |
25469 | 127 |
proof - |
128 |
have ge: "f ?a \<sqsubseteq> ?a" |
|
129 |
proof |
|
130 |
fix x assume x: "x \<in> ?H" |
|
131 |
then have "?a \<sqsubseteq> x" .. |
|
132 |
then have "f ?a \<sqsubseteq> f x" by (rule mono) |
|
133 |
also from x have "... \<sqsubseteq> x" .. |
|
134 |
finally show "f ?a \<sqsubseteq> x" . |
|
135 |
qed |
|
136 |
also have "?a \<sqsubseteq> f ?a" |
|
137 |
proof |
|
138 |
from ge have "f (f ?a) \<sqsubseteq> f ?a" by (rule mono) |
|
139 |
then show "f ?a \<in> ?H" .. |
|
140 |
qed |
|
141 |
finally show ?thesis . |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
142 |
qed |
25474
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
143 |
|
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
144 |
fix a' |
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
145 |
assume "f a' = a'" |
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
146 |
then have "f a' \<sqsubseteq> a'" by (simp only: leq_refl) |
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
147 |
then have "a' \<in> ?H" .. |
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
148 |
then show "?a \<sqsubseteq> a'" .. |
25469 | 149 |
qed |
150 |
||
151 |
theorem Knaster_Tarski_dual: |
|
152 |
assumes mono: "\<And>x y. x \<sqsubseteq> y \<Longrightarrow> f x \<sqsubseteq> f y" |
|
25474
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
153 |
obtains a :: "'a::complete_lattice" where |
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
154 |
"f a = a" and "\<And>a'. f a' = a' \<Longrightarrow> a' \<sqsubseteq> a" |
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
155 |
proof |
25469 | 156 |
let ?H = "{u. u \<sqsubseteq> f u}" |
157 |
let ?a = "\<Squnion>?H" |
|
25474
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
158 |
show "f ?a = ?a" |
25469 | 159 |
proof - |
160 |
have le: "?a \<sqsubseteq> f ?a" |
|
161 |
proof |
|
162 |
fix x assume x: "x \<in> ?H" |
|
163 |
then have "x \<sqsubseteq> f x" .. |
|
164 |
also from x have "x \<sqsubseteq> ?a" .. |
|
165 |
then have "f x \<sqsubseteq> f ?a" by (rule mono) |
|
166 |
finally show "x \<sqsubseteq> f ?a" . |
|
167 |
qed |
|
168 |
have "f ?a \<sqsubseteq> ?a" |
|
169 |
proof |
|
170 |
from le have "f ?a \<sqsubseteq> f (f ?a)" by (rule mono) |
|
171 |
then show "f ?a \<in> ?H" .. |
|
172 |
qed |
|
173 |
from this and le show ?thesis by (rule leq_antisym) |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
174 |
qed |
25474
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
175 |
|
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
176 |
fix a' |
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
177 |
assume "f a' = a'" |
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
178 |
then have "a' \<sqsubseteq> f a'" by (simp only: leq_refl) |
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
179 |
then have "a' \<in> ?H" .. |
c41b433b0f65
Knaster_Tarski: turned into Isar statement, tuned proofs;
wenzelm
parents:
25469
diff
changeset
|
180 |
then show "a' \<sqsubseteq> ?a" .. |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
181 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
182 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
183 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
184 |
subsection {* Bottom and top elements *} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
185 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
186 |
text {* |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
187 |
With general bounds available, complete lattices also have least and |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
188 |
greatest elements. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
189 |
*} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
190 |
|
19736 | 191 |
definition |
25469 | 192 |
bottom :: "'a::complete_lattice" ("\<bottom>") where |
19736 | 193 |
"\<bottom> = \<Sqinter>UNIV" |
25469 | 194 |
|
21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21210
diff
changeset
|
195 |
definition |
25469 | 196 |
top :: "'a::complete_lattice" ("\<top>") where |
19736 | 197 |
"\<top> = \<Squnion>UNIV" |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
198 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
199 |
lemma bottom_least [intro?]: "\<bottom> \<sqsubseteq> x" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
200 |
proof (unfold bottom_def) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
201 |
have "x \<in> UNIV" .. |
23373 | 202 |
then show "\<Sqinter>UNIV \<sqsubseteq> x" .. |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
203 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
204 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
205 |
lemma bottomI [intro?]: "(\<And>a. x \<sqsubseteq> a) \<Longrightarrow> \<bottom> = x" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
206 |
proof (unfold bottom_def) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
207 |
assume "\<And>a. x \<sqsubseteq> a" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
208 |
show "\<Sqinter>UNIV = x" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
209 |
proof |
23373 | 210 |
fix a show "x \<sqsubseteq> a" by fact |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
211 |
next |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
212 |
fix b :: "'a::complete_lattice" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
213 |
assume b: "\<forall>a \<in> UNIV. b \<sqsubseteq> a" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
214 |
have "x \<in> UNIV" .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
215 |
with b show "b \<sqsubseteq> x" .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
216 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
217 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
218 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
219 |
lemma top_greatest [intro?]: "x \<sqsubseteq> \<top>" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
220 |
proof (unfold top_def) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
221 |
have "x \<in> UNIV" .. |
23373 | 222 |
then show "x \<sqsubseteq> \<Squnion>UNIV" .. |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
223 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
224 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
225 |
lemma topI [intro?]: "(\<And>a. a \<sqsubseteq> x) \<Longrightarrow> \<top> = x" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
226 |
proof (unfold top_def) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
227 |
assume "\<And>a. a \<sqsubseteq> x" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
228 |
show "\<Squnion>UNIV = x" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
229 |
proof |
23373 | 230 |
fix a show "a \<sqsubseteq> x" by fact |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
231 |
next |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
232 |
fix b :: "'a::complete_lattice" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
233 |
assume b: "\<forall>a \<in> UNIV. a \<sqsubseteq> b" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
234 |
have "x \<in> UNIV" .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
235 |
with b show "x \<sqsubseteq> b" .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
236 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
237 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
238 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
239 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
240 |
subsection {* Duality *} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
241 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
242 |
text {* |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
243 |
The class of complete lattices is closed under formation of dual |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
244 |
structures. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
245 |
*} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
246 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
247 |
instance dual :: (complete_lattice) complete_lattice |
10309 | 248 |
proof |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
249 |
fix A' :: "'a::complete_lattice dual set" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
250 |
show "\<exists>inf'. is_Inf A' inf'" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
251 |
proof - |
10834 | 252 |
have "\<exists>sup. is_Sup (undual ` A') sup" by (rule ex_Sup) |
23373 | 253 |
then have "\<exists>sup. is_Inf (dual ` undual ` A') (dual sup)" by (simp only: dual_Inf) |
254 |
then show ?thesis by (simp add: dual_ex [symmetric] image_compose [symmetric]) |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
255 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
256 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
257 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
258 |
text {* |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
259 |
Apparently, the @{text \<Sqinter>} and @{text \<Squnion>} operations are dual to each |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
260 |
other. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
261 |
*} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
262 |
|
10834 | 263 |
theorem dual_Meet [intro?]: "dual (\<Sqinter>A) = \<Squnion>(dual ` A)" |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
264 |
proof - |
10834 | 265 |
from is_Inf_Meet have "is_Sup (dual ` A) (dual (\<Sqinter>A))" .. |
23373 | 266 |
then have "\<Squnion>(dual ` A) = dual (\<Sqinter>A)" .. |
267 |
then show ?thesis .. |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
268 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
269 |
|
10834 | 270 |
theorem dual_Join [intro?]: "dual (\<Squnion>A) = \<Sqinter>(dual ` A)" |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
271 |
proof - |
10834 | 272 |
from is_Sup_Join have "is_Inf (dual ` A) (dual (\<Squnion>A))" .. |
23373 | 273 |
then have "\<Sqinter>(dual ` A) = dual (\<Squnion>A)" .. |
274 |
then show ?thesis .. |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
275 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
276 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
277 |
text {* |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
278 |
Likewise are @{text \<bottom>} and @{text \<top>} duals of each other. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
279 |
*} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
280 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
281 |
theorem dual_bottom [intro?]: "dual \<bottom> = \<top>" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
282 |
proof - |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
283 |
have "\<top> = dual \<bottom>" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
284 |
proof |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
285 |
fix a' have "\<bottom> \<sqsubseteq> undual a'" .. |
23373 | 286 |
then have "dual (undual a') \<sqsubseteq> dual \<bottom>" .. |
287 |
then show "a' \<sqsubseteq> dual \<bottom>" by simp |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
288 |
qed |
23373 | 289 |
then show ?thesis .. |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
290 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
291 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
292 |
theorem dual_top [intro?]: "dual \<top> = \<bottom>" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
293 |
proof - |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
294 |
have "\<bottom> = dual \<top>" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
295 |
proof |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
296 |
fix a' have "undual a' \<sqsubseteq> \<top>" .. |
23373 | 297 |
then have "dual \<top> \<sqsubseteq> dual (undual a')" .. |
298 |
then show "dual \<top> \<sqsubseteq> a'" by simp |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
299 |
qed |
23373 | 300 |
then show ?thesis .. |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
301 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
302 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
303 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
304 |
subsection {* Complete lattices are lattices *} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
305 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
306 |
text {* |
10176 | 307 |
Complete lattices (with general bounds available) are indeed plain |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
308 |
lattices as well. This holds due to the connection of general |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
309 |
versus binary bounds that has been formally established in |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
310 |
\S\ref{sec:gen-bin-bounds}. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
311 |
*} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
312 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
313 |
lemma is_inf_binary: "is_inf x y (\<Sqinter>{x, y})" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
314 |
proof - |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
315 |
have "is_Inf {x, y} (\<Sqinter>{x, y})" .. |
23373 | 316 |
then show ?thesis by (simp only: is_Inf_binary) |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
317 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
318 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
319 |
lemma is_sup_binary: "is_sup x y (\<Squnion>{x, y})" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
320 |
proof - |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
321 |
have "is_Sup {x, y} (\<Squnion>{x, y})" .. |
23373 | 322 |
then show ?thesis by (simp only: is_Sup_binary) |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
323 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
324 |
|
11099 | 325 |
instance complete_lattice \<subseteq> lattice |
10309 | 326 |
proof |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
327 |
fix x y :: "'a::complete_lattice" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
328 |
from is_inf_binary show "\<exists>inf. is_inf x y inf" .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
329 |
from is_sup_binary show "\<exists>sup. is_sup x y sup" .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
330 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
331 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
332 |
theorem meet_binary: "x \<sqinter> y = \<Sqinter>{x, y}" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
333 |
by (rule meet_equality) (rule is_inf_binary) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
334 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
335 |
theorem join_binary: "x \<squnion> y = \<Squnion>{x, y}" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
336 |
by (rule join_equality) (rule is_sup_binary) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
337 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
338 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
339 |
subsection {* Complete lattices and set-theory operations *} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
340 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
341 |
text {* |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
342 |
The complete lattice operations are (anti) monotone wrt.\ set |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
343 |
inclusion. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
344 |
*} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
345 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
346 |
theorem Meet_subset_antimono: "A \<subseteq> B \<Longrightarrow> \<Sqinter>B \<sqsubseteq> \<Sqinter>A" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
347 |
proof (rule Meet_greatest) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
348 |
fix a assume "a \<in> A" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
349 |
also assume "A \<subseteq> B" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
350 |
finally have "a \<in> B" . |
23373 | 351 |
then show "\<Sqinter>B \<sqsubseteq> a" .. |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
352 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
353 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
354 |
theorem Join_subset_mono: "A \<subseteq> B \<Longrightarrow> \<Squnion>A \<sqsubseteq> \<Squnion>B" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
355 |
proof - |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
356 |
assume "A \<subseteq> B" |
23373 | 357 |
then have "dual ` A \<subseteq> dual ` B" by blast |
358 |
then have "\<Sqinter>(dual ` B) \<sqsubseteq> \<Sqinter>(dual ` A)" by (rule Meet_subset_antimono) |
|
359 |
then have "dual (\<Squnion>B) \<sqsubseteq> dual (\<Squnion>A)" by (simp only: dual_Join) |
|
360 |
then show ?thesis by (simp only: dual_leq) |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
361 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
362 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
363 |
text {* |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
364 |
Bounds over unions of sets may be obtained separately. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
365 |
*} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
366 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
367 |
theorem Meet_Un: "\<Sqinter>(A \<union> B) = \<Sqinter>A \<sqinter> \<Sqinter>B" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
368 |
proof |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
369 |
fix a assume "a \<in> A \<union> B" |
23373 | 370 |
then show "\<Sqinter>A \<sqinter> \<Sqinter>B \<sqsubseteq> a" |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
371 |
proof |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
372 |
assume a: "a \<in> A" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
373 |
have "\<Sqinter>A \<sqinter> \<Sqinter>B \<sqsubseteq> \<Sqinter>A" .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
374 |
also from a have "\<dots> \<sqsubseteq> a" .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
375 |
finally show ?thesis . |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
376 |
next |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
377 |
assume a: "a \<in> B" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
378 |
have "\<Sqinter>A \<sqinter> \<Sqinter>B \<sqsubseteq> \<Sqinter>B" .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
379 |
also from a have "\<dots> \<sqsubseteq> a" .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
380 |
finally show ?thesis . |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
381 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
382 |
next |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
383 |
fix b assume b: "\<forall>a \<in> A \<union> B. b \<sqsubseteq> a" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
384 |
show "b \<sqsubseteq> \<Sqinter>A \<sqinter> \<Sqinter>B" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
385 |
proof |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
386 |
show "b \<sqsubseteq> \<Sqinter>A" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
387 |
proof |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
388 |
fix a assume "a \<in> A" |
23373 | 389 |
then have "a \<in> A \<union> B" .. |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
390 |
with b show "b \<sqsubseteq> a" .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
391 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
392 |
show "b \<sqsubseteq> \<Sqinter>B" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
393 |
proof |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
394 |
fix a assume "a \<in> B" |
23373 | 395 |
then have "a \<in> A \<union> B" .. |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
396 |
with b show "b \<sqsubseteq> a" .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
397 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
398 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
399 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
400 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
401 |
theorem Join_Un: "\<Squnion>(A \<union> B) = \<Squnion>A \<squnion> \<Squnion>B" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
402 |
proof - |
10834 | 403 |
have "dual (\<Squnion>(A \<union> B)) = \<Sqinter>(dual ` A \<union> dual ` B)" |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
404 |
by (simp only: dual_Join image_Un) |
10834 | 405 |
also have "\<dots> = \<Sqinter>(dual ` A) \<sqinter> \<Sqinter>(dual ` B)" |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
406 |
by (rule Meet_Un) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
407 |
also have "\<dots> = dual (\<Squnion>A \<squnion> \<Squnion>B)" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
408 |
by (simp only: dual_join dual_Join) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
409 |
finally show ?thesis .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
410 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
411 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
412 |
text {* |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
413 |
Bounds over singleton sets are trivial. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
414 |
*} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
415 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
416 |
theorem Meet_singleton: "\<Sqinter>{x} = x" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
417 |
proof |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
418 |
fix a assume "a \<in> {x}" |
23373 | 419 |
then have "a = x" by simp |
420 |
then show "x \<sqsubseteq> a" by (simp only: leq_refl) |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
421 |
next |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
422 |
fix b assume "\<forall>a \<in> {x}. b \<sqsubseteq> a" |
23373 | 423 |
then show "b \<sqsubseteq> x" by simp |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
424 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
425 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
426 |
theorem Join_singleton: "\<Squnion>{x} = x" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
427 |
proof - |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
428 |
have "dual (\<Squnion>{x}) = \<Sqinter>{dual x}" by (simp add: dual_Join) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
429 |
also have "\<dots> = dual x" by (rule Meet_singleton) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
430 |
finally show ?thesis .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
431 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
432 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
433 |
text {* |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
434 |
Bounds over the empty and universal set correspond to each other. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
435 |
*} |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
436 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
437 |
theorem Meet_empty: "\<Sqinter>{} = \<Squnion>UNIV" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
438 |
proof |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
439 |
fix a :: "'a::complete_lattice" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
440 |
assume "a \<in> {}" |
23373 | 441 |
then have False by simp |
442 |
then show "\<Squnion>UNIV \<sqsubseteq> a" .. |
|
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
443 |
next |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
444 |
fix b :: "'a::complete_lattice" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
445 |
have "b \<in> UNIV" .. |
23373 | 446 |
then show "b \<sqsubseteq> \<Squnion>UNIV" .. |
10157
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
447 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
448 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
449 |
theorem Join_empty: "\<Squnion>{} = \<Sqinter>UNIV" |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
450 |
proof - |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
451 |
have "dual (\<Squnion>{}) = \<Sqinter>{}" by (simp add: dual_Join) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
452 |
also have "\<dots> = \<Squnion>UNIV" by (rule Meet_empty) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
453 |
also have "\<dots> = dual (\<Sqinter>UNIV)" by (simp add: dual_Meet) |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
454 |
finally show ?thesis .. |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
455 |
qed |
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
456 |
|
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
wenzelm
parents:
diff
changeset
|
457 |
end |