Zulip Chat Archive

Stream: Is there code for X?

Topic: maximum of a function


Adam Topaz (Sep 16 2021 at 18:42):

Suppose I have a function f:SLf : S \to L from a type S with [fintype S] to a linearly ordered type L. What's the idiomatic way to obtain the maximum of f? docs#function.max

Mario Carneiro (Sep 16 2021 at 18:42):

I would use docs#finset.max

Mario Carneiro (Sep 16 2021 at 18:43):

actually docs#finset.sup is probably more convenient for this

Adam Topaz (Sep 16 2021 at 18:44):

Thanks.

Scott Morrison (Sep 16 2021 at 20:38):

docs#finset.sup' is often also convenient


Last updated: Dec 20 2023 at 11:08 UTC