lean4-htt/library/init/data
Leonardo de Moura a7d08d2f3d 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
2018-06-12 13:03:26 -07:00
..
array perf(library/init/data): mark usize, uint16, uint32 and uint64 as [irreducible] 2018-05-07 18:07:04 -07:00
char feat(library/init/data/char/basic): missing theorems for equation compiler 2018-06-06 08:47:17 -07:00
fin feat(library/init/data/hashmap): hash function produces an uint32 instead of nat 2018-05-03 17:56:10 -07:00
hashmap feat(library/init/data/hashmap/basic): missing function 2018-06-04 19:58:24 -07:00
int chore(library/equations_compiler/util): disable generation of equational lemmas 2018-06-12 13:03:25 -07:00
list chore(library/equations_compiler/util): disable generation of equational lemmas 2018-06-12 13:03:25 -07:00
nat feat(kernel/inductive/inductive): dependent elimination for inductive predicates 2018-06-12 13:03:26 -07:00
option chore(library/equations_compiler/util): disable generation of equational lemmas 2018-06-12 13:03:25 -07:00
ordering chore(*): remove some unnecessary files and tactics 2018-05-21 06:29:50 -07:00
rbmap feat(library/init/lean/parser): remove syntax_id, use De Bruijn indices instead 2018-06-06 15:36:28 +02:00
rbtree feat(library/init/data/rbmap,library/init/data/rbtree): add mfold and mfor for rbtree/rbmap 2018-05-09 15:38:57 -07:00
string chore(*): remove end after each match-expression 2018-05-04 11:30:06 -07:00
basic.lean chore(*): remove more files 2018-05-21 06:42:58 -07:00
default.lean chore(*): remove several tactics 2018-05-21 06:53:01 -07:00
dlist.lean chore(library/init/data/dlist): add @[inline] 2018-05-07 18:07:04 -07:00
hashable.lean feat(library/init/data/hashable): add hashable nat instance 2018-05-06 07:53:29 -07:00
repr.lean feat(library/init/data): add instances for has_repr (id A) and has_to_string (id A) 2018-05-10 17:37:57 -07:00
to_string.lean feat(library/init/data): add instances for has_repr (id A) and has_to_string (id A) 2018-05-10 17:37:57 -07:00
uint.lean perf(library/init/data): mark usize, uint16, uint32 and uint64 as [irreducible] 2018-05-07 18:07:04 -07:00
usize.lean perf(library/init/data): mark usize, uint16, uint32 and uint64 as [irreducible] 2018-05-07 18:07:04 -07:00