Section Extensions.
Let orH := orH L.
Let andH := andH L.
Let existH := existH L.
Let iffH := iffH L.
Let ifThenElseH := ifThenElseH L.
intros.
unfold orH, fol.orH in |- *.
rewrite subFormulaImp.
rewrite subFormulaNot.
reflexivity.
Qed.
intros.
unfold andH, fol.andH in |- *.
rewrite subFormulaNot.
rewrite subFormulaOr.
repeat rewrite subFormulaNot.
reflexivity.
Qed.
intros.
unfold iffH, fol.iffH in |- *.
rewrite subFormulaAnd.
repeat rewrite subFormulaImp.
reflexivity.
Qed.

Lemma subFormulaIfThenElse :
forall (f1 f2 f3 : fol.Formula L) (v : nat) (s : fol.Term L),
substituteFormula (ifThenElseH f1 f2 f3) v s =
ifThenElseH (substituteFormula f1 v s) (substituteFormula f2 v s)
(substituteFormula f3 v s).