lean4-htt/src/library/inductive_compiler
Leonardo de Moura 9afb53fad5 feat(kernel/expr): allow metavariables to have user-facing names
We need this feature for:
1) Defining nonlinear search patterns. Example: (?m <= ?m + 1)
2) Preprocessing recursive equations and support the pattern
refinement approach used in Agda. Example: in Agda, they accept
```
def append {A : Type} : Π (m n : nat), Vec A m -> Vec A n -> Vec A (m + n)
| m n nil            ys := ys
| m n (cons m' x xs) ys := cons x (append m' n xs ys)
```
These equations have to be refined. For example, `m` has to be
replaced with `0` (in the first equation), and `succ m'` in the
second. To implement this kind of refinement, we need to convert
the pattern variables (local constants) into metavariables during
elaboration. Then, the unassigned metavariables become local constants
again. This preprocessing step will fix some of the issues on #1594.
To completely fix #1594, we will need yet another preprocessing step
which will implement "complete transition" used in the equation
compiler before we start elim_match.cpp
2017-07-16 07:16:41 -07:00
..
add_decl.cpp feat(kernel/inductive,library/inductive_compiler): do not enforce positivity rule on meta inductives 2017-05-14 19:17:28 -07:00
add_decl.h feat(kernel/inductive,library/inductive_compiler): do not enforce positivity rule on meta inductives 2017-05-14 19:17:28 -07:00
basic.cpp feat(kernel/inductive,library/inductive_compiler): do not enforce positivity rule on meta inductives 2017-05-14 19:17:28 -07:00
basic.h feat(frontends/lean): force user to use meta keyword on meta inductive/structure/class 2016-09-29 17:56:35 -07:00
CMakeLists.txt feat(src/library/inductive_compiler): support for nested inductive types 2016-09-16 12:50:59 -07:00
compiler.cpp feat(kernel/inductive,library/inductive_compiler): do not enforce positivity rule on meta inductives 2017-05-14 19:17:28 -07:00
compiler.h perf(library/inductive_compiler): simplification with sizeof lemmas 2017-03-01 21:13:20 -08:00
ginductive.cpp feat(inductive_compiler): API for is_ginductive_inner_* 2017-03-06 14:01:59 -08:00
ginductive.h feat(inductive_compiler): API for is_ginductive_inner_* 2017-03-06 14:01:59 -08:00
ginductive_decl.cpp fix(library/util): get_datatype_level should not assume inductive datatype result type is a sort 2017-03-02 11:42:16 -08:00
ginductive_decl.h feat(inductive_compiler): API for is_ginductive_inner_* 2017-03-06 14:01:59 -08:00
init_module.cpp feat(src/library/inductive_compiler): support for nested inductive types 2016-09-16 12:50:59 -07:00
init_module.h
mutual.cpp feat(inductive_compiler): generate sizeof_spec for nested constructors 2017-05-20 08:30:57 -07:00
mutual.h perf(library/inductive_compiler): simplification with sizeof lemmas 2017-03-01 21:13:20 -08:00
nested.cpp chore(library/init/meta): add to_unfold parameter to simplify, and remove redundant simp* tactics 2017-07-02 15:26:06 -07:00
nested.h perf(library/inductive_compiler): simplification with sizeof lemmas 2017-03-01 21:13:20 -08:00
util.cpp feat(kernel/expr): allow metavariables to have user-facing names 2017-07-16 07:16:41 -07:00
util.h fix(frontends/lean/structure_cmd): call inductive compiler without params in type 2017-03-06 14:01:46 -08:00