English
There is a natural bijection between the space of n-ary heterogeneous functions into a type τ whose arity is built by consing a head α with tail p, and the space of functions from α to the space of p-ary heterogeneous functions into τ. In other words, heterogeneous functions of arity n+1 with head α are the same as functions from α into heterogeneous functions of arity n.
Русский
Существует естественная биекции между множеством n-арных гетерогенных функций, соответствующих конструкции vecCons α p, и множеством функций от α в FromTypes p τ. Иными словами, гетерогенные функции сканирования arity n+1 эквивалентны функциям из α в g пеер Ar types.
LaTeX
$$$$\mathrm{FromTypes}(\mathrm{vecCons}(\alpha, p), \tau) \cong \alpha \to \mathrm{FromTypes}(p, \tau)$$$$
Lean4
/-- The definitional equality between `(vecCons α p)`-ary heterogeneous functions into `τ`
and function from `α` to `p`-ary heterogeneous functions into `τ`. -/
@[simps!]
def fromTypes_cons_equiv {n} (α : Type u) (p : Fin n → Type u) (τ : Type u) :
FromTypes (vecCons α p) τ ≃ (α → FromTypes p τ) :=
fromTypes_succ_equiv _ _