Zulip Chat Archive
Stream: Is there code for X?
Topic: Finset.range = Finset.Iio
Terence Tao (Aug 23 2024 at 20:18):
The following simple fact does not currently seem to be in Mathlib. Is it worth adding it (possibly even as a simp lemma)?
import Mathlib
example : Finset.range = Finset.Iio := by
ext n m
simp only [Finset.mem_range, Finset.mem_Iio]
Yury G. Kudryashov (Aug 23 2024 at 20:20):
Terence Tao (Aug 23 2024 at 20:20):
OK, I have no idea how I missed that. Thanks.
EDIT: I reconstructed how I got here. I started withexample (n:ℕ) : Finset.range n = Finset.Iio n
, which for some reason does not close by exact?
, hint
, or apply?
, though aesop
can handle it. Then I decided to delete the variable n
without rechecking whether it now closed.
Yury G. Kudryashov (Aug 23 2024 at 20:21):
I think that we should drop Finset.range
and use Finset.Iio
, but I'm too lazy to do the refactor.
Yaël Dillies (Aug 23 2024 at 20:23):
The refactor already exists secretly: It's #11633
Yaël Dillies (Aug 23 2024 at 20:23):
Don't really have time to revive it at the moment, maybe in a few weeks
Yury G. Kudryashov (Aug 23 2024 at 20:32):
I used @loogle Finset.range, Finset.Iio
loogle (Aug 23 2024 at 20:32):
:search: Nat.Iio_eq_range
Terence Tao (Aug 23 2024 at 20:34):
I had searched within Mathlib for range Iio
with no hits, but somehow it had not occurred to me to search for Iio range
:laughing:
Sébastien Gouëzel (Aug 24 2024 at 06:26):
Do you know loogle? See https://loogle.lean-lang.org/?q=Finset.range%2C+Finset.Iio for instance.
Last updated: May 02 2025 at 03:31 UTC