(* Check that dependent rewrite applies on arbitrary terms *)
Inductive listn : nat -> Set :=
| niln : listn 0
| consn : forall n : nat, nat -> listn n -> listn (S n).
Axiom
ax :
forall (n n' : nat) (l : listn (n + n')) (l' : listn (n' + n)),
existT _ (n + n') l = existT _ (n' + n) l'.
(* Used to raise an anomaly instead of an error in 8.1 *)
(* Submitted by Y. Makarov *)
Parameter N : Set.
Parameter E : N -> N -> Prop.

Theorem th : forall x : N, E x x.