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 _ _ _ _))).

(* Specifications: *)
Lemma iso2_iso1 a (x : t a) : iso2 (iso1 x) = x.
Lemma iso1_iso2_1 a (y : {x : t unit & Vector.t a (size x)}) : projT1 (iso1 (iso2 y)) = projT1 y.
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.
Lemma iso1_iso2 a (y : {x : t unit & Vector.t a (size x)}) : (iso1 (iso2 y)) = y.
Lemma iso_coalg a b (x : t a) : (let (s,v) := iso1 x in kleeneStore (fun b => iso2 (existT _ s b)) v) = traverse a b x.