(* Definition KCmap i o (k : KleeneCoalg i o) a b (f : i a -> i b) (x : o a) : o b := let s := k _ _ x in peek (Vector.map f (pos s)). *)
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).

Lemma dim_preservation a a' b b' (x: t a) v :
dim (traverse b b' (peek (k:=traverse a b x) v)) = dim (traverse a a' x).