(*******************)
simple induction l. simpl in |- *. try trivial with arith.
simple induction p. intros. simpl in |- *. apply eq_S. try trivial with arith.
intros. clear H0. simpl in |- *. rewrite H. try trivial with arith.
auto with arith.
Qed.

(* Specifications: *)
Lemma replace_sym :
forall (l : list A) (p p' : nat) (x x' : A),
p < length l ->
p' < length l ->
p <> p' -> replace (replace l p' x') p x = replace (replace l p x) p' x'.