English
Specialized destructors on WPath give left and right projections: left-projectors map to the tail path, right-projectors reflect the immediate subtree path.
Русский
Специализированные деструкторы WPath дают левые и правые проекции: левая проекция относится к хвостовому пути, правая — к текущему поддереву.
LaTeX
$$$wPathDestLeft$ and $wPathDestRight$ as functionals on WPath$$
Lean4
def wpRec {α : TypeVec n} {C : Type*}
(g : ∀ (a : P.A) (f : P.last.B a → P.last.W), P.WPath ⟨a, f⟩ ⟹ α → (P.last.B a → C) → C) :
∀ (x : P.last.W) (_ : P.WPath x ⟹ α), C
| ⟨a, f⟩, f' => g a f f' fun i => wpRec g (f i) (P.wPathDestRight f' i)