Definition codeArityLNTF (f : nat) :=
  switchPR f
    (switchPR (pred f)
       (switchPR (pred (pred f)) (switchPR (pred (pred (pred f))) 0 1) 2) 3)
    3.

Lemma codeArityLNNFIsCorrect1 : forall f : Functions LNN, codeArityLNTF (codeLNTFunction f) = S (arity LNN (inr _ f)).