Commit graph

11 commits

Author SHA1 Message Date
Leonardo de Moura
6a84b9378a chore(library/inductive_compiler/util): fix assertion 2018-06-07 16:28:54 -07:00
Leonardo de Moura
c0e1d05199 chore(kernel): type_checker ==> old_type_checker 2018-06-06 16:10:40 -07:00
Leonardo de Moura
bdea7d420d chore(*): type_context ==> type_context_old 2018-03-05 12:38:24 -08:00
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
Daniel Selsam
5f0ebf90de fix(frontends/lean/structure_cmd): call inductive compiler without params in type 2017-03-06 14:01:46 -08:00
Daniel Selsam
d461cb001e feat(inductive_compiler): get_ginductive_num_indices 2017-03-06 10:53:58 -08:00
Leonardo de Moura
5f55a7c0e1 fix(library/inductive_compiler/util): allow untrusted/meta declarations when checking intermediate steps
We need that when declaring meta inductive types with nested inductives.
2016-11-13 12:32:49 -08:00
Leonardo de Moura
165e2d5b97 chore(*): fix compilation warnings 2016-09-19 17:36:28 -07:00
Daniel Selsam
52f87760d8 feat(src/library/inductive_compiler): support for nested inductive types 2016-09-16 12:50:59 -07:00
Daniel Selsam
5787b469d0 feat(inductive_compiler): a few useful helper functions 2016-09-10 14:22:27 -07:00
Daniel Selsam
b0c5744eea feat(inductive_compiler): support for mutually inductive types 2016-09-10 14:22:27 -07:00