-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kernel/inductive/inductive): dependent elimination for inductive…
… predicates In Lean4, we will not generate non dependent recursors for inductive predicates. The main goal is to make the shape of the automatically generated recursors more uniform. The non uniform representation is leftover from Lean2. In Lean2, we wanted to support different kernels with different features. For example: we could create proof relevant kernels, no impredicative universe, etc. Recall that, in a kernel with an impredicative Prop and no proof irrelevance, inductive predicates without dependent elimination are weaker that inductive predicates with dependent elimination. When proof irrelevance is enabled, we can generate the dependent recursor from the non dependent one. Actually, the module drec.cpp generates the dependent recursor. Now, we only support one kind of kernel, and it doesn't make sense anymore to generate non dependent recursors for inductive predicates. This would only produce an unnecessary asymmetry on the inductive datatype module. Remark: we had to create non dependent recursors to help the elaborator. This can be avoid if we improve the elaborator. I will do that in the new elaborator implemented in Lean. Remark: equation lemmas are broken for definitions that pattern match on nested inductive datatypes. The problem is the super messy `prove_eq_rec_invertible_aux` function. This function will not be needed after I finish the new inductive datatype support in the kernel. cc @Kha
- Loading branch information
1 parent
effefb8
commit a7d08d2
Showing
22 changed files
with
165 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
a7d08d2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the elaborate explanations!