Set Implicit Arguments.
Unset Strict Implicit.

Require Import List.


Section ListLength.

Variable A : Set.


Lemma length_app_plus :
 forall l m : list A, length (l ++ m) = length l + length m.
  intros l; elim l; simpl in |- *; auto.
Qed.

Hint Rewrite length_app_plus using auto with arith : listeq.

Require Export Arith.

Lemma length_app_sym : forall l m : list A, length (l ++ m) = length (m ++ l).
  intros; autorewrite with listeq; auto with arith.
Qed.

Lemma length_app_ass :
 forall l m n : list A, length ((l ++ m) ++ n) = length (l ++ m ++ n).
  intros; autorewrite with listeq; auto with arith.
Qed.

End ListLength.

Hint Rewrite length_app_plus using auto with arith : listeq.
Hint Extern 4 (length _ = length _) =>
  autorewrite with listeq; auto with arith: list.