English
There is a detailed rewrite expressing pimage f in terms of filter, attach, and image.
Русский
Существует подробное преобразование выражающее pimage f через filter, attach и image.
LaTeX
$$pimage f s = image (fun x => (f x).get (mem_filter.mp x.coe_prop).2) (attach (filter (λ x => (f x).Dom) s)).$$
Lean4
/-- Rewrite `s.pimage f` in terms of `Finset.filter`, `Finset.attach`, and `Finset.image`. -/
theorem pimage_eq_image_filter :
s.pimage f =
{x ∈ s | (f x).Dom}.attach.image fun x : { x // x ∈ filter (fun x => (f x).Dom) s } =>
(f x).get (mem_filter.mp x.coe_prop).2 :=
by aesop (add simp Part.mem_eq)