We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3b4519b + a71c168 commit 22f13b5Copy full SHA for 22f13b5
doc/changelog/01-added/75-add-length_app_comm.rst
@@ -0,0 +1,5 @@
1
+- in `List.v`
2
+
3
+ + lemma `length_app_comm`
4
+ (`#75 <https://github.com/coq/stdlib/pull/75>`_,
5
+ by Nicholas Hubbard).
theories/Lists/List.v
@@ -239,6 +239,14 @@ Section Facts.
239
intro l; induction l; simpl; auto.
240
Qed.
241
242
+ Lemma length_app_comm : forall l l' : list A, length (l++l') = length (l'++l).
243
+ Proof.
244
+ intros.
245
+ repeat rewrite length_app.
246
+ rewrite Nat.add_comm.
247
+ reflexivity.
248
+ Qed.
249
250
Lemma last_length : forall (l : list A) a, length (l ++ [a]) = S (length l).
251
Proof.
252
intros ; rewrite length_app ; simpl.
0 commit comments