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

Commit d23b833

Browse files
committed
chore(data/set/lattice): add @[simp] to a few lemmas (#9883)
Add `@[simp]` to `Union_subset_iff`, `subset_Inter_iff`, `sUnion_subset_iff`, and `subset_sInter_iff` (new lemma).
1 parent 3d237db commit d23b833

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/data/set/lattice.lean

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ theorem Union_subset {s : ι → set β} {t : set β} (h : ∀ i, s i ⊆ t) : (
179179
-- TODO: should be simpler when sets' order is based on lattices
180180
@supr_le (set β) _ _ _ _ h
181181

182-
theorem Union_subset_iff {s : ι → set β} {t : set β} : (⋃ i, s i) ⊆ t ↔ (∀ i, s i ⊆ t) :=
182+
@[simp] theorem Union_subset_iff {s : ι → set β} {t : set β} : (⋃ i, s i) ⊆ t ↔ (∀ i, s i ⊆ t) :=
183183
⟨λ h i, subset.trans (le_supr s _) h, Union_subset⟩
184184

185185
theorem mem_Inter_of_mem {x : β} {s : ι → set β} : (∀ i, x ∈ s i) → (x ∈ ⋂ i, s i) :=
@@ -188,7 +188,7 @@ mem_Inter.2
188188
theorem subset_Inter {t : set β} {s : ι → set β} (h : ∀ i, t ⊆ s i) : t ⊆ ⋂ i, s i :=
189189
@le_infi (set β) _ _ _ _ h
190190

191-
theorem subset_Inter_iff {t : set β} {s : ι → set β} : t ⊆ (⋂ i, s i) ↔ ∀ i, t ⊆ s i :=
191+
@[simp] theorem subset_Inter_iff {t : set β} {s : ι → set β} : t ⊆ (⋂ i, s i) ↔ ∀ i, t ⊆ s i :=
192192
@le_infi_iff (set β) _ _ _ _
193193

194194
theorem subset_Union : ∀ (s : ι → set β) (i : ι), s i ⊆ (⋃ i, s i) := le_supr
@@ -677,12 +677,15 @@ subset.trans h₁ (subset_sUnion_of_mem h₂)
677677
theorem sUnion_subset {S : set (set α)} {t : set α} (h : ∀ t' ∈ S, t' ⊆ t) : (⋃₀ S) ⊆ t :=
678678
Sup_le h
679679

680-
theorem sUnion_subset_iff {s : set (set α)} {t : set α} : ⋃₀ s ⊆ t ↔ ∀ t' ∈ s, t' ⊆ t :=
681-
⟨λ h t' ht', subset.trans (subset_sUnion_of_mem ht') h, sUnion_subset⟩
680+
@[simp] theorem sUnion_subset_iff {s : set (set α)} {t : set α} : ⋃₀ s ⊆ t ↔ ∀ t' ∈ s, t' ⊆ t :=
681+
@Sup_le_iff (set α) _ _ _
682682

683683
theorem subset_sInter {S : set (set α)} {t : set α} (h : ∀ t' ∈ S, t ⊆ t') : t ⊆ (⋂₀ S) :=
684684
le_Inf h
685685

686+
@[simp] theorem subset_sInter_iff {S : set (set α)} {t : set α} : t ⊆ (⋂₀ S) ↔ ∀ t' ∈ S, t ⊆ t' :=
687+
@le_Inf_iff (set α) _ _ _
688+
686689
theorem sUnion_subset_sUnion {S T : set (set α)} (h : S ⊆ T) : ⋃₀ S ⊆ ⋃₀ T :=
687690
sUnion_subset $ λ s hs, subset_sUnion_of_mem (h hs)
688691

0 commit comments

Comments
 (0)