Section FinContainer.
Variable spec : FinContainerSpec.
Definition finContainer (a:Type) := {x : shape spec & Vector (card x) a}.
Definition finContainer_traverse a b (F : Applicative) (f : a -> F b) (x : finContainer a) : F (finContainer b) :=
let (s, v) := x in map (existT _ s) (traverse f v).

Lemma finContainer_free_applicative a b (F G : Applicative) (eta : IdiomaticTransformation F G) (f : a -> F b) (x : finContainer a) :
eta _ (finContainer_traverse f x) = finContainer_traverse (fun y => eta _ (f y)) x.