proposition: Lemma app_cancel_same_length_l : forall l1 l2 t1 t2, l1 ++ l2 = t1 ++ t2 -> length l1 = length t1 -> l1 = t1 /\ l2 = t2.
proof: Proof. Proof using. intros l1. induction l1; introv He Hl; rew_list in *. { forwards* ->: length_zero_inv t1. } { destruct t1; rew_list in *; try math. inverts He. forwards* (->&->): IHl1 H1. } Qed.
imports: Coq.Classes.Morphisms TLC(LibTactics LibLogic LibReflect LibOperation LibProd LibOption LibNat LibInt LibWf LibMonoid LibRelation)