Skip to content

Commit eb32afc

Browse files
committed
chore(Data/Set): golf image_sUnion using grind (#31602)
1 parent bb74cc5 commit eb32afc

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Mathlib/Data/Set/Lattice/Image.lean

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,9 @@ theorem preimage_iUnion₂ {f : α → β} {s : ∀ i, κ i → Set β} :
392392
(f ⁻¹' ⋃ (i) (j), s i j) = ⋃ (i) (j), f ⁻¹' s i j := by simp_rw [preimage_iUnion]
393393

394394
theorem image_sUnion {f : α → β} {s : Set (Set α)} : (f '' ⋃₀ s) = ⋃₀ (image f '' s) := by
395-
ext b
396-
simp only [mem_image, mem_sUnion, exists_prop, sUnion_image, mem_iUnion]
397-
constructor
398-
· rintro ⟨a, ⟨t, ht₁, ht₂⟩, rfl⟩
399-
exact ⟨t, ht₁, a, ht₂, rfl⟩
400-
· rintro ⟨t, ht₁, a, ht₂, rfl⟩
401-
exact ⟨a, ⟨t, ht₁, ht₂⟩, rfl⟩
395+
ext
396+
simp only [Set.mem_iUnion, Set.sUnion_image]
397+
grind
402398

403399
@[simp]
404400
theorem preimage_sUnion {f : α → β} {s : Set (Set β)} : f ⁻¹' ⋃₀ s = ⋃ t ∈ s, f ⁻¹' t := by

0 commit comments

Comments
 (0)