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

Lemma codeArityLNTFIsCorrect2 : forall n : nat, codeArityLNTF n <> 0 -> exists f : Functions LNT, codeLNTFunction f = n.