Require Export Coq.Lists.List.
Require Vector.
Definition codeLength : nat -> nat :=
evalStrongRec 0
(fun n Hrecs : nat =>
switchPR n (S (codeNth (n - S (cPairPi2 (pred n))) Hrecs)) 0).

Lemma codeListRemoveIsPR : isPR 2 codeListRemove.
Definition codeIn (a l : nat) : nat :=
evalStrongRec 1
(fun n Hrecs p1 : nat =>
switchPR n
(switchPR (charFunction 2 beq_nat (cPairPi1 (pred n)) p1) 1
(codeNth (n - S (cPairPi2 (pred n))) Hrecs)) 0) l a.