Section Substitution_Properties.

Lemma subFormulaForall2 :
forall (f : fol.Formula L) (x v : nat) (s : fol.Term L),
exists nv : nat,
~ In nv (freeVarTerm s) /\
nv <> v /\
~ In nv (list_remove _ eq_nat_dec x (freeVarFormula f)) /\
substituteFormula (forallH x f) v s =
match eq_nat_dec x v with
| left _ => forallH x f
| right _ =>
forallH nv (substituteFormula (substituteFormula f x (var nv)) v s)
end.