Zulip Chat Archive
Stream: lean4
Topic: Array.qsort and `≥`
Damiano Testa (Dec 07 2023 at 08:45):
Dear All,
I find the first example below a little surprising.
import Init.Data.Array.QSort
#eval Array.qsort #[1, 1, 2, 1] (· ≥ ·) == #[1, 1, 2, 1]
-- true
#eval Array.qsort #[1, 1, 2, 1] (· ≤ ·) == #[1, 1, 2, 1]
-- false
I know that ≥
is unwanted in Mathlib, but I thought that it was mostly motivated in order to avoid code-duplication. :smile:
Mario Carneiro (Dec 07 2023 at 08:51):
note that the function seems to be expecting an irreflexive relation (lt
)
Damiano Testa (Dec 07 2023 at 08:52):
Ok, with >
it works as expected, thanks!
Last updated: Dec 20 2023 at 11:08 UTC