lean2/tests/lean/extra/rec4.lean

9 lines
250 B
Text

import data.vector
open nat vector
set_option pp.implicit true
set_option pp.notation false
definition diag {A : Type} : Π {n}, vector (vector A n) n → vector A n,
diag nil := nil,
diag ((a :: va) :: vs) := a :: diag (map tail vs)