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.

(* Specifications: *)
Lemma nocc_eq1 : forall n : nat, nocc n (Nil nat) = 0.
Lemma nocc_eq2 :
forall (n m : nat) (x : list nat),
nocc n (Cons nat m x) = si nat (egal_nat n m) (S (nocc n x)) (nocc n x).