Zulip Chat Archive
Stream: metaprogramming / tactics
Topic: Eq.ndrec
Leni Aniva (Aug 06 2025 at 23:09):
Why is Eq.ndrec not a recursor? Is it possible to construct a RecursorInfo corresponding to Eq.ndrec?
#eval do
let rn ← Meta.mkRecursorInfo ``Eq.ndrec
IO.println s!"{rn.majorPos}"
Aaron Liu (Aug 06 2025 at 23:14):
It's defined in terms of Eq.rec
Aaron Liu (Aug 06 2025 at 23:15):
I don't think you'll be able to write a misunderstood the questionRecursorInfo corresponding to Eq.ndrec that the kernel accepts
Kyle Miller (Aug 06 2025 at 23:15):
(I think Leni's question is why is it not registered as a recursor. The casesOn definitions work, yet they're defined in terms of rec)
Kyle Miller (Aug 06 2025 at 23:17):
For unregistered recursors, at least you can specify the major position, like
Meta.mkRecursorInfo ``Eq.ndrec (some 5)
Kyle Miller (Aug 06 2025 at 23:18):
I guess someone could add recursor 5 to the attributes for Eq.ndrec, but it looks like there are no other uses of this attribute in all of core.
Kyle Miller (Aug 06 2025 at 23:19):
I don't know what you're up to, but you could consider unfolding Eq.ndrec first, since that exposes Eq.rec, which is already a recursor.
Last updated: Dec 20 2025 at 21:32 UTC