∀ {ι : Type u_1} {κ : Type u_2} {β : Type u_3} [inst : CommMonoid β] (f : ι → κ)
  [inst_1 : DecidablePred fun x => x ∈ Set.range f] (s : Finset κ) (hf : Set.InjOn f (f ⁻¹' ↑s)) (g : κ → β),
  ∏ x ∈ s.preimage f hf, g (f x) = ∏ x ∈ s with x ∈ Set.range f, g x