Fixpoint nocc (n : nat) (l : list nat) {struct l} : nat :=
  match l with
  | Nil => 0
  | Cons m x => si nat (egal_nat n m) (S (nocc n x)) (nocc n x)
  end.

Theorem sorted_cdr : forall (n : nat) (x : list nat), sorted (Cons nat n x) -> sorted x.