Require Export Languages.
Definition Formula := Formula LNN.
Definition Formulas := Formulas LNN.
Definition System := System LNN.
Definition Sentence := Sentence LNN.
Definition Term := Term LNN.
Definition Terms := Terms LNN.
Definition var := var LNN.
Definition equal := equal LNN.
Definition impH := impH LNN.
Definition notH := notH LNN.
Definition iffH := iffH LNN.
Definition forallH := forallH LNN.
Definition orH := orH LNN.
Definition andH := andH LNN.
Definition existH := existH LNN.
Definition ifThenElseH := ifThenElseH LNN.
Definition SysPrf := SysPrf LNN.
Definition Plus (x y : Term) : Term :=
apply LNN Plus (Tcons LNN 1 x (Tcons LNN 0 y (Tnil LNN))).
Definition Times (x y : Term) : Term :=
apply LNN Times (Tcons LNN 1 x (Tcons LNN 0 y (Tnil LNN))).
Definition Succ (x : Term) : Term :=
apply LNN Succ (Tcons LNN 0 x (Tnil LNN)).
Definition Zero : Term := apply LNN Zero (Tnil LNN).
Definition LT (x y : Term) : Formula :=
atomic LNN LT (Tcons LNN 1 x (Tcons LNN 0 y (Tnil LNN))).

(* Specifications: *)
Lemma LNN_dec : language_decideable LNN.
Section Free_Variables.
Lemma freeVarPlus :
forall x y : Term,
freeVarTerm LNN (Plus x y) = freeVarTerm LNN x ++ freeVarTerm LNN y.
Lemma freeVarTimes :
forall x y : Term,
freeVarTerm LNN (Times x y) = freeVarTerm LNN x ++ freeVarTerm LNN y.
Lemma freeVarSucc :
forall x : Term, freeVarTerm LNN (Succ x) = freeVarTerm LNN x.
Lemma freeVarZero : freeVarTerm LNN Zero = nil.
Lemma freeVarLT :
forall x y : Term,
freeVarFormula LNN (LT x y) = freeVarTerm LNN x ++ freeVarTerm LNN y.