Zulip Chat Archive
Stream: new members
Topic: How to get the least element of a set of natural numbers?
Adam Dingle (Feb 10 2024 at 13:35):
Suppose I have a Set ℕ
, i.e. a set of natural numbers. How can I say "Let m be the least element of the set?" Surely Lean knows that the naturals are well-ordered so the least element must exist. I looked around a bit in Mathlib.Init.Set and Mathlib.Order, but I don't see how to proceed.
Yaël Dillies (Feb 10 2024 at 13:36):
If s : Set ℕ
, then you can talk about ⨅₀ s
Yaël Dillies (Feb 10 2024 at 13:36):
This is docs#sInf
Bulhwi Cha (Feb 10 2024 at 13:37):
I get "404 Not Found." This will do instead: docs#InfSet.sInf.
Adam Dingle (Feb 10 2024 at 13:41):
Yaël: Excellent, thanks!
Ruben Van de Velde (Feb 10 2024 at 16:00):
There's also docs#Nat.find
Adam Dingle (Feb 10 2024 at 16:48):
Ruben Van de Velde said:
There's also docs#Nat.find
Aha - thanks, good to know.
Last updated: May 02 2025 at 03:31 UTC