Section RotRcons.
Variable T : Type.
Implicit Types (x : T) (s : seq T).
Canonical seq_eqMixin := EqMixin eqseqP.
Canonical seq_eqType := Eval hnf in EqType (seq T) seq_eqMixin.
Variables (a : pred T) (s : seq T) (A : T -> Prop).
Hypothesis aP : forall x, reflect (A x) (a x).
(* Duplicate-freenes. *)
Fixpoint uniq s := if s is x :: s' then (x \notin s') && uniq s' else true.
(* Removing duplicates *)
Fixpoint undup s :=
if s is x :: s' then if x \in s' then undup s' else x :: undup s' else [::].
Variable T : Type.
End NthTheory.

Lemma set_nth_default T s (y0 x0 : T) n : n < size s -> nth x0 s n = nth y0 s n.