Zulip Chat Archive
Stream: Is there code for X?
Topic: Least extended natural with witness
bottine (Jan 26 2022 at 08:47):
Hey! Say I have a function D -> nat
and I want to find the least n:nat
in the range of the function, plus a preimage, or top. Is there something built-in for hat? Ideally D
could be a subset instead of a type too.
Also, I'm a bit confused about function.argmin
function on well-orders, how does it deal with empty domains?
Patrick Massot (Jan 26 2022 at 08:59):
docs#nat.find will help
bottine (Jan 26 2022 at 09:04):
mmh, thanks
Vincent Beffara (Jan 26 2022 at 09:31):
Or like this? https://github.com/vbeffara/lean/blob/main/src/graph_theory/metric.lean (well_founded.min_mem
)
bottine (Jan 26 2022 at 09:38):
will, have a look, thanks!
Last updated: Dec 20 2023 at 11:08 UTC