English
The Pi-cons construction is eta-equal to the original double-application when you instantiate the inner function with a canonical witness.
Русский
Конструкция Pi.cons эквивалентна двойному применению при явном аргументе-обработчике.
LaTeX
$$$\\text{Pi.cons } m\\ a\\ (f\\ a\\ (mem\\_cons\\_self\\ _)) = f$$$
Lean4
@[simp]
theorem cons_eta {m : Multiset α} {a : α} (f : ∀ a' ∈ a ::ₘ m, δ a') :
(cons m a (f _ (mem_cons_self _ _)) fun a' ha' => f a' (mem_cons_of_mem ha')) = f :=
by
ext a' h'
by_cases h : a' = a
· subst h
rw [Pi.cons_same]
· rw [Pi.cons_ne _ h]