maximization as a categorical construction (e.g. limit)?

31 Views Asked by At

Suppose we have a set $S$, and a lattice $L$, and a function $f:S\to L$. We can define the constructs $\max_sf(s)$ and $\arg\max_sf(s)$.

Is there a way to characterize $\max$ and $\arg\max$ categorically, based on the objects $S,L$, and morphism $f$?