Remark maxLemma :
forall a b c d : nat, a <= b -> c <= d -> max a c <= max b d.
Remark maxLemma2 :
forall a b : list nat, fold_right max 0 a <= fold_right max 0 (a ++ b).
Remark maxLemma3 :
forall a b : list nat, fold_right max 0 b <= fold_right max 0 (a ++ b).
Remark maxApp :
forall a b : list nat,
{fold_right max 0 (a ++ b) = fold_right max 0 a} +
{fold_right max 0 (a ++ b) = fold_right max 0 b}.

Lemma boundSubTerms :
forall (n : nat) (ts : fol.Terms L n) (v : nat) (s : fol.Term L),
codeTerms L codeF n (substituteTerms L n ts v s) <=
ReplaceTermsTerm (codeTerms L codeF n ts)
(fold_right max 0 (codeTerm s :: freeVarTerms L n ts)).