Definition codeSysPrfNot :=
  existH 2
    (andH (substituteFormula LNN codeSysPrf 0 (var 2))
       (substituteFormula LNN
          (substituteFormula LNN (primRecFormula 1 (proj1_sig codeNotIsPR)) 0
             (var 2)) 1 (var 0))).

(* Specifications: *)
Lemma freeVarCodeSysPrfN : forall v : nat, In v (freeVarFormula LNN codeSysPrfNot) -> v <= 1.
Lemma codeSysPrfNCorrect1 : forall (f : fol.Formula L) (A : fol.Formulas L) (p : Prf L A (fol.notH L f)), (forall g : fol.Formula L, In g A -> mem _ U g) -> SysPrf T (substituteFormula LNN (substituteFormula LNN codeSysPrfNot 0 (natToTerm (codeFormula L codeF codeR f))) 1 (natToTerm (codePrf L codeF codeR A (fol.notH L f) p))).
Lemma codeSysPrfNCorrect2 : forall (f : fol.Formula L) (A : fol.Formulas L), (exists g : fol.Formula L, In g A /\ ~ mem _ U g) -> forall p : Prf L A (fol.notH L f), SysPrf T (notH (substituteFormula LNN (substituteFormula LNN codeSysPrfNot 0 (natToTerm (codeFormula L codeF codeR f))) 1 (natToTerm (codePrf L codeF codeR A (fol.notH L f) p)))).
Lemma codeSysPrfNCorrect3 : forall (f : fol.Formula L) (n : nat), (forall (A : fol.Formulas L) (p : Prf L A (fol.notH L f)), n <> codePrf L codeF codeR A (fol.notH L f) p) -> SysPrf T (notH (substituteFormula LNN (substituteFormula LNN codeSysPrfNot 0 (natToTerm (codeFormula L codeF codeR f))) 1 (natToTerm n))).