proposition: Lemma firstn_app n: forall l1 l2, firstn n (l1 ++ l2) = (firstn n l1) ++ (firstn (n - length l1) l2).
proof: Proof. induction n as [|k iHk]; intros l1 l2. - now simpl. - destruct l1 as [|x xs]. * reflexivity. * rewrite <- app_comm_cons. simpl. f_equal. apply iHk. Qed.
imports: PeanoNat