proposition: Lemma app_cancel_r : forall l1 l2 l3, l1 ++ l3 = l2 ++ l3 -> l1 = l2.
proof: Proof. Proof using. intros l1. induction l1; introv E; rew_list in *. { rewrites~ (>> self_eq_app_r_inv E). } { destruct l2; rew_list in *. { rewrite <- app_cons_l in E. rewrites~ (>> self_eq_app_r_inv (eq_sym E)). } { inverts E. fequals. applys* IHl1. } } Qed.
imports: Coq.Classes.Morphisms TLC(LibTactics LibLogic LibReflect LibOperation LibProd LibOption LibNat LibInt LibWf LibMonoid LibRelation)