Skip to content

Commit f3a3255

Browse files
CoolRmalEtienneC30
andauthored
Update Mathlib/Data/Setoid/Partition.lean
Co-authored-by: Etienne Marion <66847262+EtienneC30@users.noreply.github.com>
1 parent c65b54c commit f3a3255

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Mathlib/Data/Setoid/Partition.lean

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,10 @@ theorem piecewise_bij {t : ι → Set β} (ht : IndexedPartition t)
508508

509509
theorem piecewise_preimage (t : Set β) : hs.piecewise f ⁻¹' t = ⋃ i, s i ∩ (f i ⁻¹' t) := by
510510
refine ext fun x => ⟨fun hx => ?_, fun ⟨a, ⟨i, hi⟩, ha⟩ => ?_⟩
511-
· rw [mem_preimage, IndexedPartition.piecewise_apply, ← mem_preimage] at hx
512-
exact mem_iUnion_of_mem (s := fun i => s i ∩ ((f i)⁻¹' t)) (hs.index x)
513-
(mem_inter (hs.mem_index x) hx)
514-
· rw [← hi, ← (IndexedPartition.mem_iff_index_eq hs).mp ha.1] at ha
515-
simp_all [IndexedPartition.piecewise_apply]
511+
· rw [mem_preimage, piecewise_apply, ← mem_preimage] at hx
512+
exact mem_iUnion_of_mem (hs.index x) (mem_inter (hs.mem_index x) hx)
513+
· rw [← hi, ← (mem_iff_index_eq hs).mp ha.1] at ha
514+
simp_all [piecewise_apply]
516515

517516
theorem range_piecewise : range (hs.piecewise f) = ⋃ i, f i '' s i := by
518517
ext x; constructor

0 commit comments

Comments
 (0)