Definition codeListRemove (a l : nat) : nat :=
  evalStrongRec 1
    (fun n Hrecs p1 : nat =>
     switchPR n
       (switchPR (charFunction 2 beq_nat (cPairPi1 (pred n)) p1)
          (codeNth (n - S (cPairPi2 (pred n))) Hrecs)
          (S
             (cPair (cPairPi1 (pred n))
                (codeNth (n - S (cPairPi2 (pred n))) Hrecs)))) 
       (codeList nil)) l a.

(* Specifications: *)
Lemma codeListRemoveCorrect : forall (a : nat) (l : list nat), codeListRemove a (codeList l) = codeList (list_remove nat eq_nat_dec a l).
Lemma codeListRemoveIsPR : isPR 2 codeListRemove.