Section FoldLeft.
Variables (T R : Type) (f : R -> T -> R).
Fixpoint foldl z s := if s is x :: s' then foldl (f z x) s' else z.

Lemma reshape_rcons s sh n (m := sumn sh) :
m + n = size s ->
reshape (rcons sh n) s = rcons (reshape sh (take m s)) (drop m s).