Section Positions.
Variables (X: Type) (d: forall x y : X, {x = y} + {x <> y}).
Implicit Types (x y: X) (A B : list X).
Fixpoint pos x A : option nat :=
match A with
| nil => None
| y :: A' => if d x y then Some 0
else match pos x A' with
| Some n => Some (S n)
| None => None
end
end.
Notation nthe n A := (nth_error A n).
End Positions.
Notation nthe n A := (nth_error A n).

Lemma app_incl_R X (A B C : list X) :
A ++ B <<= C -> B <<= C.