Zulip Chat Archive

Stream: Is there code for X?

Topic: where is `List.max!`


Asei Inoue (Mar 22 2025 at 22:24):

I can't find where List.max! is defined for List.max?. Is there a corresponding function for this?

Kim Morrison (Mar 24 2025 at 00:50):

I don't think so. Are you expecting it to panic?

There is List.maximum defined in Mathlib that returns a WithTop.

Asei Inoue (Mar 24 2025 at 00:51):

yes, panic is expected.
PR adding this is welcome?

Kim Morrison (Mar 24 2025 at 01:19):

Perhaps at Batteries or Mathlib; not lean4 for now, please.

Asei Inoue (Mar 24 2025 at 16:44):

done! https://github.com/leanprover-community/batteries/pull/1174


Last updated: May 02 2025 at 03:31 UTC