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).
Definition codeApp : nat -> nat -> nat :=
evalStrongRec 1
(fun n Hrecs p1 : nat =>
switchPR n
(S
(cPair (cPairPi1 (pred n))
(codeNth (n - S (cPairPi2 (pred n))) Hrecs))) p1).

Lemma codeAppIsPR : isPR 2 codeApp.