Section section_for_maxs.
#[local] Notation In := List.In.
Definition maxs : list nat -> nat := fold_right max 0.
Proof with (lia || eauto).
unfold maxs. revert n H_IN. induction ns as [ | n' ns IH]; simpl...
intros n [H_eq | H_in]... enough (ENOUGH: fold_right max 0 ns >= n)...
Qed.

Lemma maxs_app (ns1 : list nat) (ns2 : list nat)
: maxs (ns1 ++ ns2) = max (maxs ns1) (maxs ns2).