Definition max_var_nformulae (l : list (NFormula Z)) :=
List.fold_left  (fun acc f => Pos.max acc (max_var xH (fst f))) l xH.
Section MaxVar.
Definition F (acc : positive) (f : Pol Z * Op1) := Pos.max acc (max_var 1 (fst f)).

Lemma max_var_nformulae_correct_aux : forall l p o v,
In (p,o) l -> In v (vars xH p) -> Pos.le v (fold_left F l 1)%positive.