| author | wenzelm | 
| Tue, 13 Oct 2015 20:58:59 +0200 | |
| changeset 61434 | 46d6586eb04c | 
| parent 61076 | bdc1e2f0a86a | 
| child 61983 | 8fb53badad99 | 
| permissions | -rw-r--r-- | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 1 | (* Title: HOL/Lattice/Orders.thy | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 2 | Author: Markus Wenzel, TU Muenchen | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 3 | *) | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 4 | |
| 58879 | 5 | section {* Orders *}
 | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 6 | |
| 16417 | 7 | theory Orders imports Main begin | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 8 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 9 | subsection {* Ordered structures *}
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 10 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 11 | text {*
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 12 |   We define several classes of ordered structures over some type @{typ
 | 
| 61076 | 13 |   'a} with relation @{text "\<sqsubseteq> :: 'a \<Rightarrow> 'a \<Rightarrow> bool"}.  For a
 | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 14 |   \emph{quasi-order} that relation is required to be reflexive and
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 15 |   transitive, for a \emph{partial order} it also has to be
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 16 |   anti-symmetric, while for a \emph{linear order} all elements are
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 17 | required to be related (in either direction). | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 18 | *} | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 19 | |
| 35317 | 20 | class leq = | 
| 21 | fixes leq :: "'a \<Rightarrow> 'a \<Rightarrow> bool" (infixl "[=" 50) | |
| 22 | ||
| 21210 | 23 | notation (xsymbols) | 
| 19736 | 24 | leq (infixl "\<sqsubseteq>" 50) | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 25 | |
| 35317 | 26 | class quasi_order = leq + | 
| 27 | assumes leq_refl [intro?]: "x \<sqsubseteq> x" | |
| 28 | assumes leq_trans [trans]: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> z \<Longrightarrow> x \<sqsubseteq> z" | |
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 29 | |
| 35317 | 30 | class partial_order = quasi_order + | 
| 31 | assumes leq_antisym [trans]: "x \<sqsubseteq> y \<Longrightarrow> y \<sqsubseteq> x \<Longrightarrow> x = y" | |
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 32 | |
| 35317 | 33 | class linear_order = partial_order + | 
| 34 | assumes leq_linear: "x \<sqsubseteq> y \<or> y \<sqsubseteq> x" | |
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 35 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 36 | lemma linear_order_cases: | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 37 | "((x::'a::linear_order) \<sqsubseteq> y \<Longrightarrow> C) \<Longrightarrow> (y \<sqsubseteq> x \<Longrightarrow> C) \<Longrightarrow> C" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 38 | by (insert leq_linear) blast | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 39 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 40 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 41 | subsection {* Duality *}
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 42 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 43 | text {*
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 44 |   The \emph{dual} of an ordered structure is an isomorphic copy of the
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 45 |   underlying type, with the @{text \<sqsubseteq>} relation defined as the inverse
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 46 | of the original one. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 47 | *} | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 48 | |
| 58310 | 49 | datatype 'a dual = dual 'a | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 50 | |
| 39246 | 51 | primrec undual :: "'a dual \<Rightarrow> 'a" where | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 52 | undual_dual: "undual (dual x) = x" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 53 | |
| 35317 | 54 | instantiation dual :: (leq) leq | 
| 55 | begin | |
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 56 | |
| 35317 | 57 | definition | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 58 | leq_dual_def: "x' \<sqsubseteq> y' \<equiv> undual y' \<sqsubseteq> undual x'" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 59 | |
| 35317 | 60 | instance .. | 
| 61 | ||
| 62 | end | |
| 63 | ||
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 64 | lemma undual_leq [iff?]: "(undual x' \<sqsubseteq> undual y') = (y' \<sqsubseteq> x')" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 65 | by (simp add: leq_dual_def) | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 66 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 67 | lemma dual_leq [iff?]: "(dual x \<sqsubseteq> dual y) = (y \<sqsubseteq> x)" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 68 | by (simp add: leq_dual_def) | 
| 
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 | text {*
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 71 |   \medskip Functions @{term dual} and @{term undual} are inverse to
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 72 | each other; this entails the following fundamental properties. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 73 | *} | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 74 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 75 | lemma dual_undual [simp]: "dual (undual x') = x'" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 76 | by (cases x') simp | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 77 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 78 | lemma undual_dual_id [simp]: "undual o dual = id" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 79 | by (rule ext) simp | 
| 
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 | lemma dual_undual_id [simp]: "dual o undual = id" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 82 | by (rule ext) simp | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 83 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 84 | text {*
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 85 |   \medskip Since @{term dual} (and @{term undual}) are both injective
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 86 | and surjective, the basic logical connectives (equality, | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 87 | quantification etc.) are transferred as follows. | 
| 
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 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 90 | lemma undual_equality [iff?]: "(undual x' = undual y') = (x' = y')" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 91 | by (cases x', cases y') simp | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 92 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 93 | lemma dual_equality [iff?]: "(dual x = dual y) = (x = y)" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 94 | by simp | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 95 | |
| 10834 | 96 | lemma dual_ball [iff?]: "(\<forall>x \<in> A. P (dual x)) = (\<forall>x' \<in> dual ` A. P x')" | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 97 | proof | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 98 | assume a: "\<forall>x \<in> A. P (dual x)" | 
| 10834 | 99 | show "\<forall>x' \<in> dual ` A. P x'" | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 100 | proof | 
| 10834 | 101 | fix x' assume x': "x' \<in> dual ` A" | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 102 | have "undual x' \<in> A" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 103 | proof - | 
| 10834 | 104 | from x' have "undual x' \<in> undual ` dual ` A" by simp | 
| 56154 
f0a927235162
more complete set of lemmas wrt. image and composition
 haftmann parents: 
40702diff
changeset | 105 | thus "undual x' \<in> A" by (simp add: image_comp) | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 106 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 107 | with a have "P (dual (undual x'))" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 108 | also have "\<dots> = x'" by simp | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 109 | finally show "P x'" . | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 110 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 111 | next | 
| 10834 | 112 | assume a: "\<forall>x' \<in> dual ` A. P x'" | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 113 | show "\<forall>x \<in> A. P (dual x)" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 114 | proof | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 115 | fix x assume "x \<in> A" | 
| 10834 | 116 | hence "dual x \<in> dual ` A" by simp | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 117 | with a show "P (dual x)" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 118 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 119 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 120 | |
| 40702 | 121 | lemma range_dual [simp]: "surj dual" | 
| 122 | proof - | |
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 123 | have "\<And>x'. dual (undual x') = x'" by simp | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 124 | thus "surj dual" by (rule surjI) | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 125 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 126 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 127 | lemma dual_all [iff?]: "(\<forall>x. P (dual x)) = (\<forall>x'. P x')" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 128 | proof - | 
| 10834 | 129 | have "(\<forall>x \<in> UNIV. P (dual x)) = (\<forall>x' \<in> dual ` UNIV. P x')" | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 130 | by (rule dual_ball) | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 131 | thus ?thesis by simp | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 132 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 133 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 134 | lemma dual_ex: "(\<exists>x. P (dual x)) = (\<exists>x'. P x')" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 135 | proof - | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 136 | have "(\<forall>x. \<not> P (dual x)) = (\<forall>x'. \<not> P x')" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 137 | by (rule dual_all) | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 138 | thus ?thesis by blast | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 139 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 140 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 141 | lemma dual_Collect: "{dual x| x. P (dual x)} = {x'. P x'}"
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 142 | proof - | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 143 |   have "{dual x| x. P (dual x)} = {x'. \<exists>x''. x' = x'' \<and> P x''}"
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 144 | by (simp only: dual_ex [symmetric]) | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 145 | thus ?thesis by blast | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 146 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 147 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 148 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 149 | subsection {* Transforming orders *}
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 150 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 151 | subsubsection {* Duals *}
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 152 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 153 | text {*
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 154 | The classes of quasi, partial, and linear orders are all closed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 155 | under formation of dual structures. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 156 | *} | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 157 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 158 | instance dual :: (quasi_order) quasi_order | 
| 10309 | 159 | proof | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 160 | fix x' y' z' :: "'a::quasi_order dual" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 161 | have "undual x' \<sqsubseteq> undual x'" .. thus "x' \<sqsubseteq> x'" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 162 | assume "y' \<sqsubseteq> z'" hence "undual z' \<sqsubseteq> undual y'" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 163 | also assume "x' \<sqsubseteq> y'" hence "undual y' \<sqsubseteq> undual x'" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 164 | finally show "x' \<sqsubseteq> z'" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 165 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 166 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 167 | instance dual :: (partial_order) partial_order | 
| 10309 | 168 | proof | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 169 | fix x' y' :: "'a::partial_order dual" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 170 | assume "y' \<sqsubseteq> x'" hence "undual x' \<sqsubseteq> undual y'" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 171 | also assume "x' \<sqsubseteq> y'" hence "undual y' \<sqsubseteq> undual x'" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 172 | finally show "x' = y'" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 173 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 174 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 175 | instance dual :: (linear_order) linear_order | 
| 10309 | 176 | proof | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 177 | fix x' y' :: "'a::linear_order dual" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 178 | show "x' \<sqsubseteq> y' \<or> y' \<sqsubseteq> x'" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 179 | proof (rule linear_order_cases) | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 180 | assume "undual y' \<sqsubseteq> undual x'" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 181 | hence "x' \<sqsubseteq> y'" .. thus ?thesis .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 182 | next | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 183 | assume "undual x' \<sqsubseteq> undual y'" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 184 | hence "y' \<sqsubseteq> x'" .. thus ?thesis .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 185 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 186 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 187 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 188 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 189 | subsubsection {* Binary products \label{sec:prod-order} *}
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 190 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 191 | text {*
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 192 | The classes of quasi and partial orders are closed under binary | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 193 | products. Note that the direct product of linear orders need | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 194 |   \emph{not} be linear in general.
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 195 | *} | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 196 | |
| 37678 
0040bafffdef
"prod" and "sum" replace "*" and "+" respectively
 haftmann parents: 
35317diff
changeset | 197 | instantiation prod :: (leq, leq) leq | 
| 35317 | 198 | begin | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 199 | |
| 35317 | 200 | definition | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 201 | leq_prod_def: "p \<sqsubseteq> q \<equiv> fst p \<sqsubseteq> fst q \<and> snd p \<sqsubseteq> snd q" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 202 | |
| 35317 | 203 | instance .. | 
| 204 | ||
| 205 | end | |
| 206 | ||
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 207 | lemma leq_prodI [intro?]: | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 208 | "fst p \<sqsubseteq> fst q \<Longrightarrow> snd p \<sqsubseteq> snd q \<Longrightarrow> p \<sqsubseteq> q" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 209 | by (unfold leq_prod_def) blast | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 210 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 211 | lemma leq_prodE [elim?]: | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 212 | "p \<sqsubseteq> q \<Longrightarrow> (fst p \<sqsubseteq> fst q \<Longrightarrow> snd p \<sqsubseteq> snd q \<Longrightarrow> C) \<Longrightarrow> C" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 213 | by (unfold leq_prod_def) blast | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 214 | |
| 37678 
0040bafffdef
"prod" and "sum" replace "*" and "+" respectively
 haftmann parents: 
35317diff
changeset | 215 | instance prod :: (quasi_order, quasi_order) quasi_order | 
| 10309 | 216 | proof | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 217 | fix p q r :: "'a::quasi_order \<times> 'b::quasi_order" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 218 | show "p \<sqsubseteq> p" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 219 | proof | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 220 | show "fst p \<sqsubseteq> fst p" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 221 | show "snd p \<sqsubseteq> snd p" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 222 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 223 | assume pq: "p \<sqsubseteq> q" and qr: "q \<sqsubseteq> r" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 224 | show "p \<sqsubseteq> r" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 225 | proof | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 226 | from pq have "fst p \<sqsubseteq> fst q" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 227 | also from qr have "\<dots> \<sqsubseteq> fst r" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 228 | finally show "fst p \<sqsubseteq> fst r" . | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 229 | from pq have "snd p \<sqsubseteq> snd q" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 230 | also from qr have "\<dots> \<sqsubseteq> snd r" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 231 | finally show "snd p \<sqsubseteq> snd r" . | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 232 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 233 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 234 | |
| 37678 
0040bafffdef
"prod" and "sum" replace "*" and "+" respectively
 haftmann parents: 
35317diff
changeset | 235 | instance prod :: (partial_order, partial_order) partial_order | 
| 10309 | 236 | proof | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 237 | fix p q :: "'a::partial_order \<times> 'b::partial_order" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 238 | assume pq: "p \<sqsubseteq> q" and qp: "q \<sqsubseteq> p" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 239 | show "p = q" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 240 | proof | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 241 | from pq have "fst p \<sqsubseteq> fst q" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 242 | also from qp have "\<dots> \<sqsubseteq> fst p" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 243 | finally show "fst p = fst q" . | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 244 | from pq have "snd p \<sqsubseteq> snd q" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 245 | also from qp have "\<dots> \<sqsubseteq> snd p" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 246 | finally show "snd p = snd q" . | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 247 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 248 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 249 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 250 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 251 | subsubsection {* General products \label{sec:fun-order} *}
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 252 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 253 | text {*
 | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 254 | The classes of quasi and partial orders are closed under general | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 255 | products (function spaces). Note that the direct product of linear | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 256 |   orders need \emph{not} be linear in general.
 | 
| 
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 | |
| 35317 | 259 | instantiation "fun" :: (type, leq) leq | 
| 260 | begin | |
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 261 | |
| 35317 | 262 | definition | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 263 | leq_fun_def: "f \<sqsubseteq> g \<equiv> \<forall>x. f x \<sqsubseteq> g x" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 264 | |
| 35317 | 265 | instance .. | 
| 266 | ||
| 267 | end | |
| 268 | ||
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 269 | lemma leq_funI [intro?]: "(\<And>x. f x \<sqsubseteq> g x) \<Longrightarrow> f \<sqsubseteq> g" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 270 | by (unfold leq_fun_def) blast | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 271 | |
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 272 | lemma leq_funD [dest?]: "f \<sqsubseteq> g \<Longrightarrow> f x \<sqsubseteq> g x" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 273 | by (unfold leq_fun_def) blast | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 274 | |
| 20523 
36a59e5d0039
Major update to function package, including new syntax and the (only theoretical)
 krauss parents: 
19736diff
changeset | 275 | instance "fun" :: (type, quasi_order) quasi_order | 
| 10309 | 276 | proof | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 277 | fix f g h :: "'a \<Rightarrow> 'b::quasi_order" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 278 | show "f \<sqsubseteq> f" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 279 | proof | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 280 | fix x show "f x \<sqsubseteq> f x" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 281 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 282 | assume fg: "f \<sqsubseteq> g" and gh: "g \<sqsubseteq> h" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 283 | show "f \<sqsubseteq> h" | 
| 
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 x from fg have "f x \<sqsubseteq> g x" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 286 | also from gh have "\<dots> \<sqsubseteq> h x" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 287 | finally show "f x \<sqsubseteq> h x" . | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 288 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 289 | qed | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 290 | |
| 20523 
36a59e5d0039
Major update to function package, including new syntax and the (only theoretical)
 krauss parents: 
19736diff
changeset | 291 | instance "fun" :: (type, partial_order) partial_order | 
| 10309 | 292 | proof | 
| 10157 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 293 | fix f g :: "'a \<Rightarrow> 'b::partial_order" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 294 | assume fg: "f \<sqsubseteq> g" and gf: "g \<sqsubseteq> f" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 295 | show "f = g" | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 296 | proof | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 297 | fix x from fg have "f x \<sqsubseteq> g x" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 298 | also from gf have "\<dots> \<sqsubseteq> f x" .. | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 299 | finally show "f x = g x" . | 
| 
6d3987f3aad9
* HOL/Lattice: fundamental concepts of lattice theory and order structures;
 wenzelm parents: diff
changeset | 300 | qed | 
| 
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 | end |