Zulip Chat Archive
Stream: general
Topic: Which theorems get automatically generated for inductives?
Markus de Medeiros (Dec 02 2024 at 17:00):
Hopefully this is a simple question, but I can't seem to find an answer by searching. When I declare something with inductive T := ...
, which theorems (like T.rec
, T.recOn
) does Lean generate about T? More generally, is there a flag I can set to see the declarations Lean is making behind the scenes?
Edward van de Meent (Dec 02 2024 at 17:04):
i think there's a command along the lines of whatsnew in
which shows this?
Edward van de Meent (Dec 02 2024 at 17:06):
it is only defined in mathlib afaict, tho
Edward van de Meent (Dec 02 2024 at 17:07):
fwiw, this seems like the kind of thing that can easily be upstreamed into batteries
Markus de Medeiros (Dec 02 2024 at 17:08):
This is exactly what I was looking for, thanks!
Markus de Medeiros (Dec 02 2024 at 17:10):
It might be nice to have this upstreamed, since I think this information is available "out of the box" in Rocq
Edward van de Meent (Dec 02 2024 at 17:12):
ikr?
Kim Morrison (Dec 03 2024 at 00:24):
I think it would be pretty reasonable to upstream it either to Batteries or to Lean. If someone wanted to do this I would review the PR! (And in the Lean case, I'm happy to assist converting the elab
to a @[builtin_command_elab
(e.g. Lean.Elab.Tactic.GuardMsgs.elabGuardMsgs
is a good model to follow).)
Last updated: May 02 2025 at 03:31 UTC