Zulip Chat Archive
Stream: Is there code for X?
Topic: Left-closed right-open order interval
Will Crichton (Aug 09 2024 at 19:22):
I would like a NonemptyInterval
-style interface but for left-closed right-open intervals, such as Set.Ico
. Does this exist anywhere?
Daniel Weber (Aug 10 2024 at 07:27):
@loogle Prod.fst _ < Prod.snd _
loogle (Aug 10 2024 at 07:27):
:search: Finset.offDiag_filter_lt_eq_filter_le, Finset.sum_sym2_filter_not_isDiag, and 3 more
Yaël Dillies (Aug 10 2024 at 07:35):
This doesn't exist, no. You could just reuse NonemptyInterval
by defining a function NonemptyInterval.toIco
which does the obvious thing, but it will send all [a, a]
to ∅
. I think this is fine and I doubt it's worth making a subtype since it wouldn't even be a lattice.
Last updated: May 02 2025 at 03:31 UTC