rw [prod_fiberwise_of_maps_to, prod_attach (f := fun x => x)]
d n : ℕ
hn : Squarefree n
f : (p : ℕ) → p ∈ n.primeFactors → Fin d
hf : f ∈ n.primeFactors.pi fun x => univ
⊢ ∏ i : Fin d, ∏ p ∈ filter (fun p => f ↑p ⋯ = i) n.primeFactors.attach, ↑p = n
d n : ℕ
hn : Squarefree n
f : (p : ℕ) → p ∈ n.primeFactors → Fin d
hf : f ∈ n.primeFactors.pi fun x => univ
⊢ ∏ x ∈ n.primeFactors, x = n

case h
d n : ℕ
hn : Squarefree n
f : (p : ℕ) → p ∈ n.primeFactors → Fin d
hf : f ∈ n.primeFactors.pi fun x => univ
⊢ ∀ i ∈ n.primeFactors.attach, f ↑i ⋯ ∈ univ