Section Traversable.
Variable t : Type -> Type.
Variable traverse : KleeneCoalg (fun x => x) t.
Definition size a (x:t a) : nat := dim (traverse a a x).
Definition iso1 a (x: t a) : {x : t unit & Vector.t a (size x)} :=
let s := coalg traverse unit x in
existT (fun x : t unit => Vector.t a (size x)) (peek (k:=s) (Vector.const tt _))
(eq_rect _ (Vector.t a) (pos s) _ (eq_sym (dim_preservation _ _ _))).
Definition iso2 a (y : {x : t unit & Vector.t a (size x)}) : t a :=
let (t,s) := y in
peek (k:=coalg traverse a t) (eq_rect _ (Vector.t a) s _ (eq_sym (free_b_dim _ _ _ _))).

Lemma iso1_iso2_2 a (y : {x : t unit & Vector.t a (size x)}) :
eq_rect _ (Vector.t a) (projT2 (iso1 (iso2 y))) _ (f_equal (@size unit) (iso1_iso2_1 y)) = projT2 y.