Fixpoint closeFrom (a n : nat) (f : fol.Formula L) {struct n} :
 fol.Formula L :=
  match n with
  | O => f
  | S m => fol.forallH L (a + m) (closeFrom a m f)
  end.

Lemma subToSubAll : forall (T : fol.System L) (A : fol.Formula L) (v : nat) (s : fol.Term L), folProof.SysPrf L T (fol.iffH L (substituteFormula L A v s) (subAllFormula A (fun x : nat => match eq_nat_dec v x with | left _ => s | right _ => fol.var L x end))).