|
1 | 1 | /-
|
2 |
| -Copyright (c) 2021 Yaël Dillies. All rights reserved. |
| 2 | +Copyright (c) 2021 Aaron Anderson, Yaël Dillies. All rights reserved. |
3 | 3 | Released under Apache 2.0 license as described in the file LICENSE.
|
4 |
| -Authors: Yaël Dillies |
| 4 | +Authors: Aaron Anderson, Kevin Buzzard, Yaël Dillies, Eric Wieser |
5 | 5 | -/
|
6 | 6 | import data.finset.pairwise
|
7 | 7 | import data.set.finite
|
8 | 8 |
|
9 | 9 | /-!
|
10 |
| -# Finite supremum independence |
| 10 | +# Supremum independence |
11 | 11 |
|
12 | 12 | In this file, we define supremum independence of indexed sets. An indexed family `f : ι → α` is
|
13 | 13 | sup-independent if, for all `a`, `f a` and the supremum of the rest are disjoint.
|
14 | 14 |
|
15 | 15 | In distributive lattices, this is equivalent to being pairwise disjoint.
|
16 | 16 |
|
17 |
| -## Implementation notes |
| 17 | +## Main definitions |
18 | 18 |
|
19 |
| -We avoid the "obvious" definition `∀ i ∈ s, disjoint (f i) ((s.erase i).sup f)` because `erase` |
20 |
| -would require decidable equality on `ι`. |
| 19 | +* `finset.sup_indep s f`: a family of elements `f` are supremum independent on the finite set `s`. |
| 20 | +* `complete_lattice.set_independent s`: a set of elements are supremum independent. |
| 21 | +* `complete_lattice.independent f`: a family of elements are supremum independent. |
21 | 22 |
|
22 |
| -## TODO |
| 23 | +## Implementation notes |
23 | 24 |
|
24 |
| -`complete_lattice.independent` and `complete_lattice.set_independent` should live in this file. |
| 25 | +For the finite version, we avoid the "obvious" definition |
| 26 | +`∀ i ∈ s, disjoint (f i) ((s.erase i).sup f)` because `erase` would require decidable equality on |
| 27 | +`ι`. |
25 | 28 | -/
|
26 | 29 |
|
27 | 30 | variables {α β ι ι' : Type*}
|
28 | 31 |
|
| 32 | +/-! ### On lattices with a bottom element, via `finset.sup` -/ |
| 33 | + |
29 | 34 | namespace finset
|
30 | 35 | section lattice
|
31 | 36 | variables [lattice α] [order_bot α]
|
@@ -141,6 +146,156 @@ by { rw ←sup_eq_bUnion, exact hs.sup hg }
|
141 | 146 | end distrib_lattice
|
142 | 147 | end finset
|
143 | 148 |
|
| 149 | + |
| 150 | +/-! ### On complete lattices via `has_Sup.Sup` -/ |
| 151 | + |
| 152 | +namespace complete_lattice |
| 153 | +variables [complete_lattice α] |
| 154 | + |
| 155 | +open set |
| 156 | + |
| 157 | +/-- An independent set of elements in a complete lattice is one in which every element is disjoint |
| 158 | + from the `Sup` of the rest. -/ |
| 159 | +def set_independent (s : set α) : Prop := ∀ ⦃a⦄, a ∈ s → disjoint a (Sup (s \ {a})) |
| 160 | + |
| 161 | +variables {s : set α} (hs : set_independent s) |
| 162 | + |
| 163 | +@[simp] |
| 164 | +lemma set_independent_empty : set_independent (∅ : set α) := |
| 165 | +λ x hx, (set.not_mem_empty x hx).elim |
| 166 | + |
| 167 | +theorem set_independent.mono {t : set α} (hst : t ⊆ s) : |
| 168 | + set_independent t := |
| 169 | +λ a ha, (hs (hst ha)).mono_right (Sup_le_Sup (diff_subset_diff_left hst)) |
| 170 | + |
| 171 | +/-- If the elements of a set are independent, then any pair within that set is disjoint. -/ |
| 172 | +lemma set_independent.disjoint {x y : α} (hx : x ∈ s) (hy : y ∈ s) (h : x ≠ y) : disjoint x y := |
| 173 | +disjoint_Sup_right (hs hx) ((mem_diff y).mpr ⟨hy, by simp [h.symm]⟩) |
| 174 | + |
| 175 | +lemma set_independent_pair {a b : α} (hab : a ≠ b) : |
| 176 | + set_independent ({a, b} : set α) ↔ disjoint a b := |
| 177 | +begin |
| 178 | + split, |
| 179 | + { intro h, |
| 180 | + exact h.disjoint (mem_insert _ _) (mem_insert_of_mem _ (mem_singleton _)) hab, }, |
| 181 | + { rintros h c ((rfl : c = a) | (rfl : c = b)), |
| 182 | + { convert h using 1, |
| 183 | + simp [hab, Sup_singleton] }, |
| 184 | + { convert h.symm using 1, |
| 185 | + simp [hab, Sup_singleton] }, }, |
| 186 | +end |
| 187 | + |
| 188 | +include hs |
| 189 | + |
| 190 | +/-- If the elements of a set are independent, then any element is disjoint from the `Sup` of some |
| 191 | +subset of the rest. -/ |
| 192 | +lemma set_independent.disjoint_Sup {x : α} {y : set α} (hx : x ∈ s) (hy : y ⊆ s) (hxy : x ∉ y) : |
| 193 | + disjoint x (Sup y) := |
| 194 | +begin |
| 195 | + have := (hs.mono $ insert_subset.mpr ⟨hx, hy⟩) (mem_insert x _), |
| 196 | + rw [insert_diff_of_mem _ (mem_singleton _), diff_singleton_eq_self hxy] at this, |
| 197 | + exact this, |
| 198 | +end |
| 199 | + |
| 200 | +omit hs |
| 201 | + |
| 202 | +/-- An independent indexed family of elements in a complete lattice is one in which every element |
| 203 | + is disjoint from the `supr` of the rest. |
| 204 | +
|
| 205 | + Example: an indexed family of non-zero elements in a |
| 206 | + vector space is linearly independent iff the indexed family of subspaces they generate is |
| 207 | + independent in this sense. |
| 208 | +
|
| 209 | + Example: an indexed family of submodules of a module is independent in this sense if |
| 210 | + and only the natural map from the direct sum of the submodules to the module is injective. -/ |
| 211 | +def independent {ι : Sort*} {α : Type*} [complete_lattice α] (t : ι → α) : Prop := |
| 212 | +∀ i : ι, disjoint (t i) (⨆ (j ≠ i), t j) |
| 213 | + |
| 214 | +lemma set_independent_iff {α : Type*} [complete_lattice α] (s : set α) : |
| 215 | + set_independent s ↔ independent (coe : s → α) := |
| 216 | +begin |
| 217 | + simp_rw [independent, set_independent, set_coe.forall, Sup_eq_supr], |
| 218 | + refine forall₂_congr (λ a ha, _), |
| 219 | + congr' 2, |
| 220 | + convert supr_subtype.symm, |
| 221 | + simp [supr_and], |
| 222 | +end |
| 223 | + |
| 224 | +variables {t : ι → α} (ht : independent t) |
| 225 | + |
| 226 | +theorem independent_def : independent t ↔ ∀ i : ι, disjoint (t i) (⨆ (j ≠ i), t j) := |
| 227 | +iff.rfl |
| 228 | + |
| 229 | +theorem independent_def' {ι : Type*} {t : ι → α} : |
| 230 | + independent t ↔ ∀ i, disjoint (t i) (Sup (t '' {j | j ≠ i})) := |
| 231 | +by {simp_rw Sup_image, refl} |
| 232 | + |
| 233 | +theorem independent_def'' {ι : Type*} {t : ι → α} : |
| 234 | + independent t ↔ ∀ i, disjoint (t i) (Sup {a | ∃ j ≠ i, t j = a}) := |
| 235 | +by {rw independent_def', tidy} |
| 236 | + |
| 237 | +@[simp] |
| 238 | +lemma independent_empty (t : empty → α) : independent t. |
| 239 | + |
| 240 | +@[simp] |
| 241 | +lemma independent_pempty (t : pempty → α) : independent t. |
| 242 | + |
| 243 | +/-- If the elements of a set are independent, then any pair within that set is disjoint. -/ |
| 244 | +lemma independent.disjoint {x y : ι} (h : x ≠ y) : disjoint (t x) (t y) := |
| 245 | +disjoint_Sup_right (ht x) ⟨y, by simp [h.symm]⟩ |
| 246 | + |
| 247 | +lemma independent.mono {ι : Type*} {α : Type*} [complete_lattice α] |
| 248 | + {s t : ι → α} (hs : independent s) (hst : t ≤ s) : |
| 249 | + independent t := |
| 250 | +λ i, (hs i).mono (hst i) (supr_le_supr $ λ j, supr_le_supr $ λ _, hst j) |
| 251 | + |
| 252 | +/-- Composing an independent indexed family with an injective function on the index results in |
| 253 | +another indepedendent indexed family. -/ |
| 254 | +lemma independent.comp {ι ι' : Sort*} {α : Type*} [complete_lattice α] |
| 255 | + {s : ι → α} (hs : independent s) (f : ι' → ι) (hf : function.injective f) : |
| 256 | + independent (s ∘ f) := |
| 257 | +λ i, (hs (f i)).mono_right begin |
| 258 | + refine (supr_le_supr $ λ i, _).trans (supr_comp_le _ f), |
| 259 | + exact supr_le_supr_const hf.ne, |
| 260 | +end |
| 261 | + |
| 262 | +lemma independent_pair {i j : ι} (hij : i ≠ j) (huniv : ∀ k, k = i ∨ k = j): |
| 263 | + independent t ↔ disjoint (t i) (t j) := |
| 264 | +begin |
| 265 | + split, |
| 266 | + { intro h, |
| 267 | + exact h.disjoint hij, }, |
| 268 | + { rintros h k, |
| 269 | + obtain rfl | rfl := huniv k, |
| 270 | + { refine h.mono_right (supr_le $ λ i, supr_le $ λ hi, eq.le _), |
| 271 | + rw (huniv i).resolve_left hi }, |
| 272 | + { refine h.symm.mono_right (supr_le $ λ j, supr_le $ λ hj, eq.le _), |
| 273 | + rw (huniv j).resolve_right hj } }, |
| 274 | +end |
| 275 | + |
| 276 | +/-- Composing an indepedent indexed family with an order isomorphism on the elements results in |
| 277 | +another indepedendent indexed family. -/ |
| 278 | +lemma independent.map_order_iso {ι : Sort*} {α β : Type*} |
| 279 | + [complete_lattice α] [complete_lattice β] (f : α ≃o β) {a : ι → α} (ha : independent a) : |
| 280 | + independent (f ∘ a) := |
| 281 | +λ i, ((ha i).map_order_iso f).mono_right (f.monotone.le_map_supr2 _) |
| 282 | + |
| 283 | +@[simp] lemma independent_map_order_iso_iff {ι : Sort*} {α β : Type*} |
| 284 | + [complete_lattice α] [complete_lattice β] (f : α ≃o β) {a : ι → α} : |
| 285 | + independent (f ∘ a) ↔ independent a := |
| 286 | +⟨ λ h, have hf : f.symm ∘ f ∘ a = a := congr_arg (∘ a) f.left_inv.comp_eq_id, |
| 287 | + hf ▸ h.map_order_iso f.symm, |
| 288 | + λ h, h.map_order_iso f⟩ |
| 289 | + |
| 290 | +/-- If the elements of a set are independent, then any element is disjoint from the `supr` of some |
| 291 | +subset of the rest. -/ |
| 292 | +lemma independent.disjoint_bsupr {ι : Type*} {α : Type*} [complete_lattice α] |
| 293 | + {t : ι → α} (ht : independent t) {x : ι} {y : set ι} (hx : x ∉ y) : |
| 294 | + disjoint (t x) (⨆ i ∈ y, t i) := |
| 295 | +disjoint.mono_right (bsupr_le_bsupr' $ λ i hi, (ne_of_mem_of_not_mem hi hx : _)) (ht x) |
| 296 | + |
| 297 | +end complete_lattice |
| 298 | + |
144 | 299 | lemma complete_lattice.independent_iff_sup_indep [complete_lattice α] {s : finset ι} {f : ι → α} :
|
145 | 300 | complete_lattice.independent (f ∘ (coe : s → ι)) ↔ s.sup_indep f :=
|
146 | 301 | begin
|
|
0 commit comments