Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 091f27e

Browse files
committed
chore(order/{complete_lattice,sup_indep}): move complete_lattice.independent (#12588)
Putting this here means that in future we can talk about `pairwise_disjoint` at the same time, which was previously defined downstream of `complete_lattice.independent`. This commit only moves existing declarations and adjusts module docstrings. The new authorship comes from #5971 and #7199, which predate this file.
1 parent 135c574 commit 091f27e

File tree

4 files changed

+165
-154
lines changed

4 files changed

+165
-154
lines changed

src/group_theory/subgroup/basic.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import group_theory.submonoid.centralizer
99
import algebra.group.conj
1010
import algebra.module.basic
1111
import order.atoms
12+
import order.sup_indep
1213

1314
/-!
1415
# Subgroups

src/order/compactly_generated.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Authors: Oliver Nash
66
import tactic.tfae
77
import order.atoms
88
import order.order_iso_nat
9+
import order.sup_indep
910
import order.zorn
1011
import data.finset.order
1112

src/order/complete_lattice.lean

Lines changed: 0 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,149 +1325,3 @@ protected def function.injective.complete_lattice [has_sup α] [has_inf α] [has
13251325
bot_le := λ a, map_bot.le.trans bot_le,
13261326
..hf.lattice f map_sup map_inf }
13271327

1328-
/-! ### Supremum independence-/
1329-
1330-
namespace complete_lattice
1331-
variables [complete_lattice α]
1332-
1333-
/-- An independent set of elements in a complete lattice is one in which every element is disjoint
1334-
from the `Sup` of the rest. -/
1335-
def set_independent (s : set α) : Prop := ∀ ⦃a⦄, a ∈ s → disjoint a (Sup (s \ {a}))
1336-
1337-
variables {s : set α} (hs : set_independent s)
1338-
1339-
@[simp]
1340-
lemma set_independent_empty : set_independent (∅ : set α) :=
1341-
λ x hx, (set.not_mem_empty x hx).elim
1342-
1343-
theorem set_independent.mono {t : set α} (hst : t ⊆ s) :
1344-
set_independent t :=
1345-
λ a ha, (hs (hst ha)).mono_right (Sup_le_Sup (diff_subset_diff_left hst))
1346-
1347-
/-- If the elements of a set are independent, then any pair within that set is disjoint. -/
1348-
lemma set_independent.disjoint {x y : α} (hx : x ∈ s) (hy : y ∈ s) (h : x ≠ y) : disjoint x y :=
1349-
disjoint_Sup_right (hs hx) ((mem_diff y).mpr ⟨hy, by simp [h.symm]⟩)
1350-
1351-
lemma set_independent_pair {a b : α} (hab : a ≠ b) :
1352-
set_independent ({a, b} : set α) ↔ disjoint a b :=
1353-
begin
1354-
split,
1355-
{ intro h,
1356-
exact h.disjoint (mem_insert _ _) (mem_insert_of_mem _ (mem_singleton _)) hab, },
1357-
{ rintros h c ((rfl : c = a) | (rfl : c = b)),
1358-
{ convert h using 1,
1359-
simp [hab, Sup_singleton] },
1360-
{ convert h.symm using 1,
1361-
simp [hab, Sup_singleton] }, },
1362-
end
1363-
1364-
include hs
1365-
1366-
/-- If the elements of a set are independent, then any element is disjoint from the `Sup` of some
1367-
subset of the rest. -/
1368-
lemma set_independent.disjoint_Sup {x : α} {y : set α} (hx : x ∈ s) (hy : y ⊆ s) (hxy : x ∉ y) :
1369-
disjoint x (Sup y) :=
1370-
begin
1371-
have := (hs.mono $ insert_subset.mpr ⟨hx, hy⟩) (mem_insert x _),
1372-
rw [insert_diff_of_mem _ (mem_singleton _), diff_singleton_eq_self hxy] at this,
1373-
exact this,
1374-
end
1375-
1376-
omit hs
1377-
1378-
/-- An independent indexed family of elements in a complete lattice is one in which every element
1379-
is disjoint from the `supr` of the rest.
1380-
1381-
Example: an indexed family of non-zero elements in a
1382-
vector space is linearly independent iff the indexed family of subspaces they generate is
1383-
independent in this sense.
1384-
1385-
Example: an indexed family of submodules of a module is independent in this sense if
1386-
and only the natural map from the direct sum of the submodules to the module is injective. -/
1387-
def independent {ι : Sort*} {α : Type*} [complete_lattice α] (t : ι → α) : Prop :=
1388-
∀ i : ι, disjoint (t i) (⨆ (j ≠ i), t j)
1389-
1390-
lemma set_independent_iff {α : Type*} [complete_lattice α] (s : set α) :
1391-
set_independent s ↔ independent (coe : s → α) :=
1392-
begin
1393-
simp_rw [independent, set_independent, set_coe.forall, Sup_eq_supr],
1394-
refine forall₂_congr (λ a ha, _),
1395-
congr' 2,
1396-
convert supr_subtype.symm,
1397-
simp [supr_and],
1398-
end
1399-
1400-
variables {t : ι → α} (ht : independent t)
1401-
1402-
theorem independent_def : independent t ↔ ∀ i : ι, disjoint (t i) (⨆ (j ≠ i), t j) :=
1403-
iff.rfl
1404-
1405-
theorem independent_def' {ι : Type*} {t : ι → α} :
1406-
independent t ↔ ∀ i, disjoint (t i) (Sup (t '' {j | j ≠ i})) :=
1407-
by {simp_rw Sup_image, refl}
1408-
1409-
theorem independent_def'' {ι : Type*} {t : ι → α} :
1410-
independent t ↔ ∀ i, disjoint (t i) (Sup {a | ∃ j ≠ i, t j = a}) :=
1411-
by {rw independent_def', tidy}
1412-
1413-
@[simp]
1414-
lemma independent_empty (t : empty → α) : independent t.
1415-
1416-
@[simp]
1417-
lemma independent_pempty (t : pempty → α) : independent t.
1418-
1419-
/-- If the elements of a set are independent, then any pair within that set is disjoint. -/
1420-
lemma independent.disjoint {x y : ι} (h : x ≠ y) : disjoint (t x) (t y) :=
1421-
disjoint_Sup_right (ht x) ⟨y, by simp [h.symm]⟩
1422-
1423-
lemma independent.mono {ι : Type*} {α : Type*} [complete_lattice α]
1424-
{s t : ι → α} (hs : independent s) (hst : t ≤ s) :
1425-
independent t :=
1426-
λ i, (hs i).mono (hst i) (supr_le_supr $ λ j, supr_le_supr $ λ _, hst j)
1427-
1428-
/-- Composing an independent indexed family with an injective function on the index results in
1429-
another indepedendent indexed family. -/
1430-
lemma independent.comp {ι ι' : Sort*} {α : Type*} [complete_lattice α]
1431-
{s : ι → α} (hs : independent s) (f : ι' → ι) (hf : function.injective f) :
1432-
independent (s ∘ f) :=
1433-
λ i, (hs (f i)).mono_right begin
1434-
refine (supr_le_supr $ λ i, _).trans (supr_comp_le _ f),
1435-
exact supr_le_supr_const hf.ne,
1436-
end
1437-
1438-
lemma independent_pair {i j : ι} (hij : i ≠ j) (huniv : ∀ k, k = i ∨ k = j):
1439-
independent t ↔ disjoint (t i) (t j) :=
1440-
begin
1441-
split,
1442-
{ intro h,
1443-
exact h.disjoint hij, },
1444-
{ rintros h k,
1445-
obtain rfl | rfl := huniv k,
1446-
{ refine h.mono_right (supr_le $ λ i, supr_le $ λ hi, eq.le _),
1447-
rw (huniv i).resolve_left hi },
1448-
{ refine h.symm.mono_right (supr_le $ λ j, supr_le $ λ hj, eq.le _),
1449-
rw (huniv j).resolve_right hj } },
1450-
end
1451-
1452-
/-- Composing an indepedent indexed family with an order isomorphism on the elements results in
1453-
another indepedendent indexed family. -/
1454-
lemma independent.map_order_iso {ι : Sort*} {α β : Type*}
1455-
[complete_lattice α] [complete_lattice β] (f : α ≃o β) {a : ι → α} (ha : independent a) :
1456-
independent (f ∘ a) :=
1457-
λ i, ((ha i).map_order_iso f).mono_right (f.monotone.le_map_supr2 _)
1458-
1459-
@[simp] lemma independent_map_order_iso_iff {ι : Sort*} {α β : Type*}
1460-
[complete_lattice α] [complete_lattice β] (f : α ≃o β) {a : ι → α} :
1461-
independent (f ∘ a) ↔ independent a :=
1462-
⟨ λ h, have hf : f.symm ∘ f ∘ a = a := congr_arg (∘ a) f.left_inv.comp_eq_id,
1463-
hf ▸ h.map_order_iso f.symm,
1464-
λ h, h.map_order_iso f⟩
1465-
1466-
/-- If the elements of a set are independent, then any element is disjoint from the `supr` of some
1467-
subset of the rest. -/
1468-
lemma independent.disjoint_bsupr {ι : Type*} {α : Type*} [complete_lattice α]
1469-
{t : ι → α} (ht : independent t) {x : ι} {y : set ι} (hx : x ∉ y) :
1470-
disjoint (t x) (⨆ i ∈ y, t i) :=
1471-
disjoint.mono_right (bsupr_le_bsupr' $ λ i hi, (ne_of_mem_of_not_mem hi hx : _)) (ht x)
1472-
1473-
end complete_lattice

src/order/sup_indep.lean

Lines changed: 163 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
11
/-
2-
Copyright (c) 2021 Yaël Dillies. All rights reserved.
2+
Copyright (c) 2021 Aaron Anderson, Yaël Dillies. All rights reserved.
33
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
55
-/
66
import data.finset.pairwise
77
import data.set.finite
88

99
/-!
10-
# Finite supremum independence
10+
# Supremum independence
1111
1212
In this file, we define supremum independence of indexed sets. An indexed family `f : ι → α` is
1313
sup-independent if, for all `a`, `f a` and the supremum of the rest are disjoint.
1414
1515
In distributive lattices, this is equivalent to being pairwise disjoint.
1616
17-
## Implementation notes
17+
## Main definitions
1818
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.
2122
22-
## TODO
23+
## Implementation notes
2324
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+
`ι`.
2528
-/
2629

2730
variables {α β ι ι' : Type*}
2831

32+
/-! ### On lattices with a bottom element, via `finset.sup` -/
33+
2934
namespace finset
3035
section lattice
3136
variables [lattice α] [order_bot α]
@@ -141,6 +146,156 @@ by { rw ←sup_eq_bUnion, exact hs.sup hg }
141146
end distrib_lattice
142147
end finset
143148

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+
144299
lemma complete_lattice.independent_iff_sup_indep [complete_lattice α] {s : finset ι} {f : ι → α} :
145300
complete_lattice.independent (f ∘ (coe : s → ι)) ↔ s.sup_indep f :=
146301
begin

0 commit comments

Comments
 (0)