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 codeAppCorrect :
forall l1 l2 : list nat,
codeApp (codeList l1) (codeList l2) = codeList (l1 ++ l2).