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 boundSubTerm :
forall (t : fol.Term L) (v : nat) (s : fol.Term L),
codeTerm (substituteTerm L t v s) <=
ReplaceTermTerm (codeTerm t)
(fold_right max 0 (codeTerm s :: freeVarTerm L t)).