Skip to content

Commit 721d46e

Browse files
committed
feat: characterise independence in compactly-generated lattices (#8154)
Also some loosely-related short lemmas
1 parent bf4260c commit 721d46e

File tree

4 files changed

+48
-3
lines changed

4 files changed

+48
-3
lines changed

Mathlib/Order/CompactlyGenerated.lean

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ This is demonstrated by means of the following four lemmas:
5353
complete lattice, well-founded, compact
5454
-/
5555

56+
open Set
57+
5658
variable {ι : Sort*} {α : Type*} [CompleteLattice α] {f : ι → α}
5759

5860
namespace CompleteLattice
@@ -438,6 +440,28 @@ theorem CompleteLattice.setIndependent_iff_finite {s : Set α} :
438440
exact ⟨ha, Set.Subset.trans ht (Set.diff_subset _ _)⟩⟩
439441
#align complete_lattice.set_independent_iff_finite CompleteLattice.setIndependent_iff_finite
440442

443+
lemma CompleteLattice.independent_iff_supIndep_of_injOn {ι : Type*} {f : ι → α}
444+
(hf : InjOn f {i | f i ≠ ⊥}) :
445+
CompleteLattice.Independent f ↔ ∀ (s : Finset ι), s.SupIndep f := by
446+
refine ⟨fun h ↦ h.supIndep', fun h ↦ CompleteLattice.independent_def'.mpr fun i ↦ ?_⟩
447+
simp_rw [disjoint_iff, inf_sSup_eq_iSup_inf_sup_finset, iSup_eq_bot, ← disjoint_iff]
448+
intro s hs
449+
classical
450+
rw [← Finset.sup_erase_bot]
451+
set t := s.erase ⊥
452+
replace hf : InjOn f (f ⁻¹' t) := fun i hi j _ hij ↦ by refine hf ?_ ?_ hij <;> aesop
453+
have : (Finset.erase (insert i (t.preimage _ hf)) i).image f = t := by
454+
ext a
455+
simp only [Finset.mem_preimage, Finset.mem_erase, ne_eq, Finset.mem_insert, true_or, not_true,
456+
Finset.erase_insert_eq_erase, not_and, Finset.mem_image]
457+
refine ⟨by aesop, fun ⟨ha, has⟩ ↦ ?_⟩
458+
obtain ⟨j, hj, rfl⟩ := hs has
459+
exact ⟨j, ⟨hj, ha, has⟩, rfl⟩
460+
rw [← this, Finset.sup_image]
461+
specialize h (insert i (t.preimage _ hf))
462+
rw [Finset.supIndep_iff_disjoint_erase] at h
463+
exact h i (Finset.mem_insert_self i _)
464+
441465
theorem CompleteLattice.setIndependent_iUnion_of_directed {η : Type*} {s : η → Set α}
442466
(hs : Directed (· ⊆ ·) s) (h : ∀ i, CompleteLattice.SetIndependent (s i)) :
443467
CompleteLattice.SetIndependent (⋃ i, s i) := by

Mathlib/Order/CompleteLattice.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,10 @@ theorem iSup_congr (h : ∀ i, f i = g i) : ⨆ i, f i = ⨆ i, g i :=
693693
congr_arg _ <| funext h
694694
#align supr_congr iSup_congr
695695

696+
theorem biSup_congr {p : ι → Prop} (h : ∀ i, p i → f i = g i) :
697+
⨆ (i) (_ : p i), f i = ⨆ (i) (_ : p i), g i :=
698+
iSup_congr <| fun i ↦ iSup_congr (h i)
699+
696700
theorem Function.Surjective.iSup_comp {f : ι → ι'} (hf : Surjective f) (g : ι' → α) :
697701
⨆ x, g (f x) = ⨆ y, g y := by
698702
simp only [iSup._eq_1]
@@ -758,6 +762,10 @@ theorem iInf_congr (h : ∀ i, f i = g i) : ⨅ i, f i = ⨅ i, g i :=
758762
congr_arg _ <| funext h
759763
#align infi_congr iInf_congr
760764

765+
theorem biInf_congr {p : ι → Prop} (h : ∀ i, p i → f i = g i) :
766+
⨅ (i) (_ : p i), f i = ⨅ (i) (_ : p i), g i :=
767+
biSup_congr (α := αᵒᵈ) h
768+
761769
theorem Function.Surjective.iInf_comp {f : ι → ι'} (hf : Surjective f) (g : ι' → α) :
762770
⨅ x, g (f x) = ⨅ y, g y :=
763771
@Function.Surjective.iSup_comp αᵒᵈ _ _ _ f hf g

Mathlib/Order/Disjoint.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ def Disjoint (a b : α) : Prop :=
4242
∀ ⦃x⦄, x ≤ a → x ≤ b → x ≤ ⊥
4343
#align disjoint Disjoint
4444

45+
@[simp]
46+
theorem disjoint_of_subsingleton [Subsingleton α] : Disjoint a b :=
47+
fun x _ _ ↦ le_of_eq (Subsingleton.elim x ⊥)
48+
4549
theorem disjoint_comm : Disjoint a b ↔ Disjoint b a :=
4650
forall_congr' fun _ ↦ forall_swap
4751
#align disjoint.comm disjoint_comm

Mathlib/Order/SupIndep.lean

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ theorem SupIndep.subset (ht : t.SupIndep f) (h : s ⊆ t) : s.SupIndep f := fun
7272
ht (hu.trans h) (h hi)
7373
#align finset.sup_indep.subset Finset.SupIndep.subset
7474

75+
@[simp]
7576
theorem supIndep_empty (f : ι → α) : (∅ : Finset ι).SupIndep f := fun _ _ a ha =>
7677
(not_mem_empty a ha).elim
7778
#align finset.sup_indep_empty Finset.supIndep_empty
@@ -406,17 +407,21 @@ theorem Independent.setIndependent_range (ht : Independent t) : SetIndependent <
406407
exact ht.comp' surjective_onto_range
407408
#align complete_lattice.independent.set_independent_range CompleteLattice.Independent.setIndependent_range
408409

409-
theorem Independent.injective (ht : Independent t) (h_ne_bot : ∀ i, t i ≠ ⊥) : Injective t := by
410-
intro i j h
410+
theorem Independent.injOn (ht : Independent t) : InjOn t {i | t i ≠ ⊥} := by
411+
rintro i _ j (hj : t j ≠ ⊥) h
411412
by_contra' contra
412-
apply h_ne_bot j
413+
apply hj
413414
suffices t j ≤ ⨆ (k) (_ : k ≠ i), t k by
414415
replace ht := (ht i).mono_right this
415416
rwa [h, disjoint_self] at ht
416417
replace contra : j ≠ i
417418
· exact Ne.symm contra
418419
-- Porting note: needs explicit `f`
419420
exact @le_iSup₂ _ _ _ _ (fun x _ => t x) j contra
421+
422+
theorem Independent.injective (ht : Independent t) (h_ne_bot : ∀ i, t i ≠ ⊥) : Injective t := by
423+
suffices univ = {i | t i ≠ ⊥} by rw [injective_iff_injOn_univ, this]; exact ht.injOn
424+
aesop
420425
#align complete_lattice.independent.injective CompleteLattice.Independent.injective
421426

422427
theorem independent_pair {i j : ι} (hij : i ≠ j) (huniv : ∀ k, k = i ∨ k = j) :
@@ -473,6 +478,10 @@ alias ⟨CompleteLattice.Independent.supIndep, Finset.SupIndep.independent⟩ :=
473478
#align complete_lattice.independent.sup_indep CompleteLattice.Independent.supIndep
474479
#align finset.sup_indep.independent Finset.SupIndep.independent
475480

481+
theorem CompleteLattice.Independent.supIndep' [CompleteLattice α] {f : ι → α} (s : Finset ι)
482+
(h : CompleteLattice.Independent f) : s.SupIndep f :=
483+
CompleteLattice.Independent.supIndep (h.comp Subtype.coe_injective)
484+
476485
/-- A variant of `CompleteLattice.independent_iff_supIndep` for `Fintype`s. -/
477486
theorem CompleteLattice.independent_iff_supIndep_univ [CompleteLattice α] [Fintype ι] {f : ι → α} :
478487
CompleteLattice.Independent f ↔ Finset.univ.SupIndep f := by

0 commit comments

Comments
 (0)