Skip to content

Commit 0f4d3c5

Browse files
feat(Order): lemmas about iSupIndep (#29791)
* generalize `Finset.SupIndep` "bind" operations from `DistribLattice` to `IsModularLattice` * new lemma `iSupIndep.iInf` * more characterizations of `iSupIndep` on submodules: * `iSupIndep_iff_finset_sum_eq_zero_imp_eq_zero` * `iSupIndep_iff_finset_sum_eq_imp_eq` * add `@[simp]` and `@[grind]` attributes which were helpful for these proofs Original motivation was to have the following fact: ```lean theorem iSupIndep_iInf_genEigenspace [NoZeroSMulDivisors R M] {α : Type*} (f : α → End R M) (k : ℕ∞) : iSupIndep fun μ : α → R ↦ ⨅ a : α, ((f a).genEigenspace (μ a)) k := .iInf (f · |>.genEigenspace · k) (f · |>.independent_genEigenspace k) ``` Co-authored-by: Aristotle Harmonic <aristotle-harmonic@harmonic.fun>
1 parent fcfaca0 commit 0f4d3c5

File tree

11 files changed

+166
-62
lines changed

11 files changed

+166
-62
lines changed

Mathlib/Data/Finset/Disjoint.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ variable [DecidableEq α] {s t u v : Finset α} {a b : α} {f : α → β}
180180
theorem disjoint_insert_left : Disjoint (insert a s) t ↔ a ∉ t ∧ Disjoint s t := by
181181
simp only [disjoint_left, mem_insert, or_imp, forall_and, forall_eq]
182182

183-
@[simp]
183+
@[simp, grind =]
184184
theorem disjoint_insert_right : Disjoint s (insert a t) ↔ a ∉ s ∧ Disjoint s t :=
185185
disjoint_comm.trans <| by rw [disjoint_insert_left, _root_.disjoint_comm]
186186

Mathlib/Data/Finset/Lattice/Fold.lean

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ theorem sup_empty : (∅ : Finset β).sup f = ⊥ :=
5252
theorem sup_cons {b : β} (h : b ∉ s) : (cons b s h).sup f = f b ⊔ s.sup f :=
5353
fold_cons h
5454

55-
@[simp]
55+
@[simp, grind =]
5656
theorem sup_insert [DecidableEq β] {b : β} : (insert b s : Finset β).sup f = f b ⊔ s.sup f :=
5757
fold_insert_idem
5858

@@ -109,6 +109,7 @@ lemma isLUB_sup_id {s : Finset α} : IsLUB s (s.sup id) := by simpa using isLUB_
109109

110110
theorem le_sup_of_le {b : β} (hb : b ∈ s) (h : a ≤ f b) : a ≤ s.sup f := h.trans <| le_sup hb
111111

112+
@[grind _=_]
112113
theorem sup_union [DecidableEq β] : (s₁ ∪ s₂).sup f = s₁.sup f ⊔ s₂.sup f :=
113114
eq_of_forall_ge_iff fun c => by simp [or_imp, forall_and]
114115

@@ -125,11 +126,11 @@ theorem sup_ite (p : β → Prop) [DecidablePred p] :
125126
(s.sup fun i => ite (p i) (f i) (g i)) = (s.filter p).sup f ⊔ (s.filter fun i => ¬p i).sup g :=
126127
fold_ite _
127128

128-
@[gcongr]
129+
@[gcongr, grind ←]
129130
theorem sup_mono_fun {g : β → α} (h : ∀ b ∈ s, f b ≤ g b) : s.sup f ≤ s.sup g :=
130131
Finset.sup_le fun b hb => le_trans (h b hb) (le_sup hb)
131132

132-
@[gcongr]
133+
@[gcongr, grind ←]
133134
theorem sup_mono (h : s₁ ⊆ s₂) : s₁.sup f ≤ s₂.sup f :=
134135
Finset.sup_le (fun _ hb => le_sup (h hb))
135136

Mathlib/Data/Finset/Lattice/Union.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ section Sup
2727

2828
variable [SemilatticeSup α] [OrderBot α]
2929

30-
@[simp]
30+
@[simp, grind =]
3131
theorem sup_biUnion [DecidableEq β] (s : Finset γ) (t : γ → Finset β) :
3232
(s.biUnion t).sup f = s.sup fun x => (t x).sup f :=
3333
eq_of_forall_ge_iff fun c => by simp [@forall_swap _ β]
@@ -38,7 +38,7 @@ section Inf
3838

3939
variable [SemilatticeInf α] [OrderTop α]
4040

41-
@[simp] theorem inf_biUnion [DecidableEq β] (s : Finset γ) (t : γ → Finset β) :
41+
@[simp, grind =] theorem inf_biUnion [DecidableEq β] (s : Finset γ) (t : γ → Finset β) :
4242
(s.biUnion t).inf f = s.inf fun x => (t x).inf f :=
4343
@sup_biUnion αᵒᵈ _ _ _ _ _ _ _ _
4444

Mathlib/Data/Finset/Sigma.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected def sigma : Finset (Σ i, α i) :=
4343

4444
variable {s s₁ s₂ t t₁ t₂}
4545

46-
@[simp]
46+
@[simp, grind =]
4747
theorem mem_sigma {a : Σ i, α i} : a ∈ s.sigma t ↔ a.1 ∈ s ∧ a.2 ∈ t a.1 :=
4848
Multiset.mem_sigma
4949

Mathlib/GroupTheory/Perm/Cycle/Factors.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Authors: Chris Hughes, Yaël Dillies
55
-/
66

77
import Mathlib.Data.List.Iterate
8+
import Mathlib.Data.Set.Pairwise.List
89
import Mathlib.GroupTheory.Perm.Cycle.Basic
910
import Mathlib.GroupTheory.NoncommPiCoprod
1011
import Mathlib.Tactic.Group

Mathlib/LinearAlgebra/DFinsupp.lean

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,40 @@ theorem iSupIndep_iff_dfinsupp_lsum_injective (p : ι → Submodule R N) :
581581
iSupIndep p ↔ Function.Injective (lsum ℕ fun i => (p i).subtype) :=
582582
⟨iSupIndep.dfinsupp_lsum_injective, iSupIndep_of_dfinsupp_lsum_injective p⟩
583583

584+
theorem iSupIndep_iff_finset_sum_eq_zero_imp_eq_zero (p : ι → Submodule R N) :
585+
iSupIndep p ↔ ∀ (s : Finset ι) (v : ι → N),
586+
(∀ i ∈ s, v i ∈ p i) → (∑ i ∈ s, v i = 0) → ∀ i ∈ s, v i = 0 := by
587+
simp_rw [iSupIndep_def, Submodule.disjoint_def]
588+
constructor
589+
· intro h s v hv hv0 i hi
590+
apply h _ _ (hv i hi)
591+
rw [← s.add_sum_erase _ hi, add_eq_zero_iff_neg_eq] at hv0
592+
rw [← Submodule.neg_mem_iff, hv0]
593+
exact SetLike.le_def.mp (biSup_mono <| by grind) (Submodule.sum_mem_biSup <| by grind)
594+
· intro h i x hx hsup
595+
obtain ⟨f, hf, rfl⟩ := (Submodule.mem_iSup_iff_exists_finsupp ..).mp hsup
596+
contrapose! h
597+
use insert i f.support, fun j ↦ if j = i then -f.sum fun _ x ↦ x else f j
598+
refine ⟨fun j hj ↦ ?_, ?_, by grind [neg_eq_zero, Finsupp.mem_support_iff]⟩
599+
· beta_reduce
600+
split_ifs with h
601+
· exact (p j).neg_mem (h ▸ hx)
602+
· simpa [h] using hf j
603+
· specialize hf i
604+
simp at hf
605+
grind [Finsupp.sum, Finset.sum_congr, Finsupp.mem_support_iff]
606+
607+
theorem iSupIndep_iff_finset_sum_eq_imp_eq (p : ι → Submodule R N) :
608+
iSupIndep p ↔ ∀ (s : Finset ι) (v w : ι → N),
609+
(∀ i ∈ s, v i ∈ p i ∧ w i ∈ p i) → (∑ i ∈ s, v i = ∑ i ∈ s, w i) → ∀ i ∈ s, v i = w i := by
610+
rw [iSupIndep_iff_finset_sum_eq_zero_imp_eq_zero]
611+
constructor
612+
· intro h s v w hvw
613+
simpa [sub_eq_zero] using h s (v - w) fun i hi => (p i).sub_mem (hvw i hi).1 (hvw i hi).2
614+
· intro h s v hv hv0
615+
specialize h s v 0
616+
simp_all
617+
584618
/-- A family of additive subgroups over an additive group are independent if and only if
585619
`DFinsupp.sumAddHom` applied with `AddSubgroup.subtype` is injective. -/
586620
theorem iSupIndep_iff_dfinsuppSumAddHom_injective (p : ι → AddSubgroup N) :

Mathlib/LinearAlgebra/Eigenspace/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ theorem independent_maxGenEigenspace [NoZeroSMulDivisors R M] (f : End R M) :
673673
any eigenspace has trivial intersection with the span of all the other eigenspaces. -/
674674
theorem eigenspaces_iSupIndep [NoZeroSMulDivisors R M] (f : End R M) :
675675
iSupIndep f.eigenspace :=
676-
(f.independent_genEigenspace 1).mono fun _ ↦ le_rfl
676+
f.independent_genEigenspace 1
677677

678678
/-- Eigenvectors corresponding to distinct eigenvalues of a linear operator are linearly
679679
independent. -/

Mathlib/Logic/Embedding/Basic.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ variable {α α' : Type*} {β : α → Type*} {β' : α' → Type*}
300300
def sigmaMk (a : α) : β a ↪ Σ x, β x :=
301301
⟨Sigma.mk a, sigma_mk_injective⟩
302302

303+
attribute [grind =] sigmaMk_apply
304+
303305
/-- If `f : α ↪ α'` is an embedding and `g : Π a, β α ↪ β' (f α)` is a family
304306
of embeddings, then `Sigma.map f g` is an embedding. -/
305307
@[simps apply]

Mathlib/Order/CompactlyGenerated/Basic.lean

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,28 @@ section
510510

511511
variable [IsModularLattice α] [IsCompactlyGenerated α]
512512

513+
/--
514+
If each family `f i` is `iSupIndep`, then the family of pointwise infima
515+
`k ↦ ⨅ i, f i (k i)` is also `iSupIndep`.
516+
-/
517+
theorem iSupIndep.iInf {ι : Type*} {κ : ι → Type*} (f : (i : ι) → κ i → α)
518+
(h_indep : ∀ i : ι, iSupIndep (f i)) : iSupIndep (fun k : (i : ι) → κ i ↦ ⨅ i, f i (k i)) := by
519+
rw [iSupIndep_iff_supIndep_of_injOn (iSupIndep.injOn_iInf _ h_indep)]
520+
intro s
521+
induction s using Finset.strongInduction with
522+
| H s ih =>
523+
by_cases hs : 1 < s.card; swap
524+
· by_cases hcard0 : s.card = 0 <;> grind [Finset.card_eq_zero, Finset.card_eq_one]
525+
· obtain ⟨k₁, k₂, _, _, h⟩ := Finset.one_lt_card_iff.mp hs
526+
obtain ⟨i, hi⟩ : ∃ i : ι, k₁ i ≠ k₂ i := Function.ne_iff.mp h
527+
classical
528+
rw [← Finset.image_biUnion_filter_eq s (· i)]
529+
refine Finset.SupIndep.biUnion ?_ (by grind)
530+
apply ((h_indep i).supIndep' _).mono
531+
simp_rw [Finset.sup_le_iff, Finset.mem_filter, and_imp]
532+
rintro _ _ _ _ rfl
533+
exact iInf_le _ _
534+
513535
instance (priority := 100) isAtomic_of_complementedLattice [ComplementedLattice α] : IsAtomic α :=
514536
fun b => by
515537
by_cases h : { c : α | CompleteLattice.IsCompactElement c ∧ c ≤ b } ⊆ {⊥}

Mathlib/Order/Partition/Finpartition.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Yaël Dillies, Bhavik Mehta
55
-/
66
import Mathlib.Data.Finset.Lattice.Prod
7+
import Mathlib.Data.Finset.Pairwise
78
import Mathlib.Data.Fintype.Powerset
89
import Mathlib.Data.Setoid.Basic
910
import Mathlib.Order.Atoms

0 commit comments

Comments
 (0)