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 ReplaceTermsTermSub :
forall (n : nat) (ts : fol.Terms L n) (v w s2 : nat),
ReplaceTermsTerm (codeTerms L codeF n (substituteTerms L n ts v (var w))) s2 =
ReplaceTermsTerm (codeTerms L codeF n ts) s2.