Definition codeFreeVarListFormula : nat -> nat :=
  evalStrongRec 0
    (fun l recs : nat =>
     switchPR l
       (codeApp (codeFreeVarFormula (cPairPi1 (pred l)))
          (codeNth (l - S (cPairPi2 (pred l))) recs)) 0).

Lemma codeFreeVarListFormulaCorrect : forall l : list Formula, codeFreeVarListFormula (codeList (map (codeFormula L codeF codeR) l)) = codeList (freeVarListFormula L l).