Zulip Chat Archive
Stream: mathlib4
Topic: Recognize numeric literals as Fin.succ in Fin n
Jin Wei (May 12 2024 at 04:47):
Hi there! I come across this pattern of lemmas needed in my proof.
lemma one (n : ℕ) : (1 : Fin (Nat.succ (Nat.succ n))) = Fin.succ 0 := rfl
lemma two (n : ℕ) : (2 : Fin (Nat.succ (Nat.succ (Nat.succ n)))) = Fin.succ 1 := rfl
...
I am wondering if there is some way to quantifier over the numeric literals 1, 2, etc and to have one lemma to deal them all.
Kim Morrison (May 13 2024 at 00:16):
You could probably write a simproc.
Jin Wei (May 13 2024 at 01:43):
Kim Morrison said:
You could probably write a simproc.
Thank you! I am not familiar with simproc
but I will look it up.
Last updated: May 02 2025 at 03:31 UTC