Fixpoint maxl (l : list nat) : nat :=
match l with
| nil => 0
| n :: l' => max n (maxl l')
end.

Lemma maxl_map_const {A:Type} l (f: A → nat) n:
(∀ x, x ∈ l → (f x) = n) →
l ≠ [] → maxl (map f l) = n.