proposition: Lemma update_app_r : forall l1 l2 n v, n >= length l1 -> update n v (l1 ++ l2) = l1 ++ update (n - length l1) v l2.
proof: Proof. Proof using IA. intros l1. induction l1 as [| x l1' ]; introv E; rew_list in *. { fequals. math. } { destruct n as [|n']. { false. math. } { rewrite update_cons. fequals. erewrite* IHl1'. math. } } Qed.
imports: Coq.Classes.Morphisms TLC(LibTactics LibLogic LibReflect LibOperation LibProd LibOption LibNat LibInt LibWf LibMonoid LibRelation)