induction lsa1; destruct lsb1; destruct lsa2; destruct lsb2; intuition; simpl in *; try omega.
repeat rewrite app_nil_r.
trivial.
f_equal.
rewrite <-  IHlsa1.
simpl.
trivial.
omega.
simpl.
omega.
Qed.

Lemma length_flatten_eq :
forall (A B : Set)(lsa : list (list A))(lsb : list (list B)),
list_pred (fun a1 a2 => length a1 = length a2) lsa lsb ->
length (flatten lsa) = length (flatten lsb).