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

Commit f99af7d

Browse files
committed
chore(data/set/lattice): Generalize more / lemmas to dependent families (#11516)
The "bounded union" and "bounded intersection" are both instances of nested `⋃`/`⋂`. But they only apply when the inner one runs over a predicate `p : ι → Prop`, and the resulting set couldn't depend on `p`. This generalizes to `κ : ι → Sort*` and allows dependence on `κ i`. The lemmas are renamed from `bUnion`/`bInter` to `Union₂`/`Inter₂` to show that they are more general. Some generalizations lead to unification problems, so I've kept the `b` version around. Some lemmas were missing between `⋃` and `⋂` or between `⋃`/`⋂` and nested `⋃`/`⋂`, so I'm adding them as well. Renames
1 parent ee36571 commit f99af7d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+339
-296
lines changed

src/algebra/module/submodule_lattice.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private lemma Inf_le' {S : set (submodule R M)} {p} : p ∈ S → Inf S ≤ p :=
133133
set.bInter_subset_of_mem
134134

135135
private lemma le_Inf' {S : set (submodule R M)} {p} : (∀q ∈ S, p ≤ q) → p ≤ Inf S :=
136-
set.subset_bInter
136+
set.subset_Inter₂
137137

138138
instance : has_inf (submodule R M) :=
139139
⟨λ p q,

src/analysis/box_integral/partition/basic.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ by simp [← injective_boxes.eq_iff, finset.ext_iff, prepartition.Union, imp_fal
182182

183183
lemma subset_Union (h : J ∈ π) : ↑J ⊆ π.Union := subset_bUnion_of_mem h
184184

185-
lemma Union_subset : π.Union ⊆ I := bUnion_subset π.le_of_mem'
185+
lemma Union_subset : π.Union ⊆ I := Union₂_subset π.le_of_mem'
186186

187187
@[mono] lemma Union_mono (h : π₁ ≤ π₂) : π₁.Union ⊆ π₂.Union :=
188188
λ x hx, let ⟨J₁, hJ₁, hx⟩ := π₁.mem_Union.1 hx, ⟨J₂, hJ₂, hle⟩ := h hJ₁
@@ -625,8 +625,8 @@ is_partition_iff_Union_eq.2 $ by simp [h₁.Union_eq, h₂.Union_eq]
625625
end is_partition
626626

627627
lemma Union_bUnion_partition (h : ∀ J ∈ π, (πi J).is_partition) : (π.bUnion πi).Union = π.Union :=
628-
(Union_bUnion _ _).trans $ Union_congr id surjective_id $ λ J, Union_congr id surjective_id $ λ hJ,
629-
(h J hJ).Union_eq
628+
(Union_bUnion _ _).trans $ Union_congr_of_surjective id surjective_id $ λ J,
629+
Union_congr_of_surjective id surjective_id $ λ hJ, (h J hJ).Union_eq
630630

631631
lemma is_partition_disj_union_of_eq_diff (h : π₂.Union = I \ π₁.Union) :
632632
is_partition (π₁.disj_union π₂ (h.symm ▸ disjoint_diff)) :=

src/analysis/box_integral/partition/tagged.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ lemma Union_def : π.Union = ⋃ J ∈ π, ↑J := rfl
6262

6363
lemma subset_Union (h : J ∈ π) : ↑J ⊆ π.Union := subset_bUnion_of_mem h
6464

65-
lemma Union_subset : π.Union ⊆ I := bUnion_subset π.le_of_mem'
65+
lemma Union_subset : π.Union ⊆ I := Union₂_subset π.le_of_mem'
6666

6767
/-- A tagged prepartition is a partition if it covers the whole box. -/
6868
def is_partition := π.to_prepartition.is_partition

src/analysis/convex/simplicial_complex/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ begin
139139
end
140140

141141
lemma vertices_subset_space : K.vertices ⊆ K.space :=
142-
vertices_eq.subset.trans $ set.bUnion_mono $ λ x hx, subset_convex_hull 𝕜 x
142+
vertices_eq.subset.trans $ Union₂_mono $ λ x hx, subset_convex_hull 𝕜 x
143143

144144
lemma vertex_mem_convex_hull_iff (hx : x ∈ K.vertices) (hs : s ∈ K.faces) :
145145
x ∈ convex_hull 𝕜 (s : set E) ↔ x ∈ s :=

src/analysis/normed_space/weak_dual.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ variables {E : Type*} [normed_group E] [normed_space 𝕜 E]
170170
is used, i.e., when `polar 𝕜 s` is interpreted as a subset of `weak_dual 𝕜 E`. -/
171171
lemma weak_dual.is_closed_polar (s : set E) : is_closed (weak_dual.polar 𝕜 s) :=
172172
begin
173-
rw [weak_dual.polar, polar_eq_Inter, preimage_bInter],
173+
rw [weak_dual.polar, polar_eq_Inter, preimage_Inter₂],
174174
apply is_closed_bInter,
175175
intros z hz,
176176
rw set.preimage_set_of_eq,

src/analysis/seminorm.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ lemma gauge_lt_one_subset_self (hs : convex ℝ s) (h₀ : (0 : E) ∈ s) (absor
753753
{x | gauge s x < 1} ⊆ s :=
754754
begin
755755
rw gauge_lt_one_eq absorbs,
756-
apply set.bUnion_subset,
756+
apply set.Union₂_subset,
757757
rintro r hr _ ⟨y, hy, rfl⟩,
758758
exact hs.smul_mem_of_zero_mem h₀ hy (Ioo_subset_Icc_self hr),
759759
end

src/data/set/accumulate.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ lemma monotone_accumulate [preorder α] : monotone (accumulate s) :=
3131
lemma bUnion_accumulate [preorder α] (x : α) : (⋃ y ≤ x, accumulate s y) = ⋃ y ≤ x, s y :=
3232
begin
3333
apply subset.antisymm,
34-
{ exact bUnion_subsetx hx, (monotone_accumulate hx : _)) },
35-
{ exact bUnion_monox hx, subset_accumulate) }
34+
{ exact Union₂_subsety hy, monotone_accumulate hy) },
35+
{ exact Union₂_monoy hy, subset_accumulate) }
3636
end
3737

3838
lemma Union_accumulate [preorder α] : (⋃ x, accumulate s x) = ⋃ x, s x :=
3939
begin
4040
apply subset.antisymm,
4141
{ simp only [subset_def, mem_Union, exists_imp_distrib, mem_accumulate],
4242
intros z x x' hx'x hz, exact ⟨x', hz⟩ },
43-
{ exact Union_subset_Union (λ i, subset_accumulate), }
43+
{ exact Union_mono (λ i, subset_accumulate), }
4444
end
4545

4646
end set

src/data/set/intervals/disjoint.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ variables [linear_order α] {s : set α} {a : α} {f : ι → α}
9292

9393
lemma is_glb.bUnion_Ioi_eq (h : is_glb s a) : (⋃ x ∈ s, Ioi x) = Ioi a :=
9494
begin
95-
refine (bUnion_subset $ λ x hx, _).antisymm (λ x hx, _),
95+
refine (Union₂_subset $ λ x hx, _).antisymm (λ x hx, _),
9696
{ exact Ioi_subset_Ioi (h.1 hx) },
9797
{ rcases h.exists_between hx with ⟨y, hys, hay, hyx⟩,
9898
exact mem_bUnion hys hyx }

0 commit comments

Comments
 (0)