(* last, belast, rcons, and last induction. *)

Fixpoint rcons s z := if s is x :: s' then x :: rcons s' z else [:: z].

(* Specifications: *)
Lemma rcons_cons x s z : rcons (x :: s) z = x :: rcons s z.
Lemma cats1 s z : s ++ [:: z] = rcons s z.