Commit graph

14181 commits

Author SHA1 Message Date
Leonardo de Moura
882fa6e71f fix(library/init/meta/expr): order does not match C++ implementation 2018-06-14 16:12:02 -07:00
Leonardo de Moura
70d489db25 feat(frontends/lean): remove prenum macro
We now encode prenum using expr_lit
2018-06-14 15:46:35 -07:00
Leonardo de Moura
7d40bb5db1 fix(kernel/expr): literal RC issue 2018-06-14 15:36:12 -07:00
Leonardo de Moura
ef38890784 fix(kernel/expr): missing case 2018-06-14 15:28:12 -07:00
Leonardo de Moura
91a65f692f refactor(library/compiler): remove nat_value macro 2018-06-14 15:26:32 -07:00
Leonardo de Moura
78192972e9 chore(kernel): expr_kind::Meta ==> expr_kind::MVar 2018-06-14 15:13:45 -07:00
Leonardo de Moura
73e067d361 feat(kernel): add expression literals 2018-06-14 14:55:14 -07:00
Leonardo de Moura
1a18bb265d chore(frontends/lean): remove a few old_type_checker occurrences 2018-06-14 14:05:04 -07:00
Leonardo de Moura
4878abfda4 chore(util/nat): fix style 2018-06-14 14:04:37 -07:00
Leonardo de Moura
46a846dd99 chore(frontends/lean/inductive_cmds): fix nonsense 2018-06-14 13:51:09 -07:00
Leonardo de Moura
3843c50cd7 chore(tests/kernel): remove old test 2018-06-14 13:49:27 -07:00
Leonardo de Moura
3e846e1fc9 chore(library): remove unnecessary inaccessible annotations 2018-06-14 11:33:00 -07:00
Leonardo de Moura
70fc656931 refactor(library/init/data/nat/basic): remove nat.less_than_or_equal inductive predicate
We now define nat.le using (nat.ble : nat -> nat -> bool) function.
We will add builtin support for reducing `nat.ble` efficiently when the arguments are the to be added nat literals.
2018-06-14 11:30:09 -07:00
Leonardo de Moura
021bc40e95 feat(library/init/lean/expr): new lean.expr type 2018-06-13 15:44:15 -07:00
Leonardo de Moura
4c370e4558 refactor(kernel/expr): fix binder_info 2018-06-13 12:20:58 -07:00
Leonardo de Moura
017e1d7a5f fix(util/name): strcmp does not implement Lean string equality 2018-06-13 11:43:05 -07:00
Leonardo de Moura
7512d1996e feat(runtime): add string_eq and string_ne 2018-06-13 11:42:57 -07:00
Leonardo de Moura
40bf1365ae chore(library/inductive_compiler/nested): compilation warning 2018-06-13 09:59:44 -07:00
Leonardo de Moura
4432629eb0 feat(util/nat): add C++ wrapper for manipulating runtime nat values 2018-06-13 09:29:52 -07:00
Leonardo de Moura
a3e5dd31b3 chore(library/locals): style 2018-06-12 17:58:25 -07:00
Leonardo de Moura
ba598ada1a fix(library/init/meta/expr): expose quote constructor 2018-06-12 17:55:27 -07:00
Leonardo de Moura
1c6350b0f1 fix(frontends/lean/elaborator): quote case 2018-06-12 17:55:00 -07:00
Leonardo de Moura
335c58f8a7 feat(kernel): add expr_kind::Quote
This is a temporary expr constructor. We need it to be able to eliminate
expr_macro, and then define expr using runtime/object
2018-06-12 17:40:00 -07:00
Leonardo de Moura
e590ebf54d feat(kernel/inductive): initialize m_elim_level 2018-06-12 15:17:52 -07:00
Leonardo de Moura
e41a2ef3d8 chore(tests/lean): fix tests 2018-06-12 13:06:33 -07:00
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
Leonardo de Moura
effefb8b03 chore(kernel/inductive): style 2018-06-12 13:03:25 -07:00
Leonardo de Moura
e9b4b811de chore(library/equations_compiler/util): disable generation of equational lemmas
@kha, `eqn_compiler.lemmas` is false by default.
I will keep them disabled until I remove the inductive compiler.
I'm building the new inductive datatype module (to replace the inductive
compiler), and the lemmas will fail to be proved in the next commits
until the transition is complete.
2018-06-12 13:03:25 -07:00
Leonardo de Moura
cf91139c37 refactor(library/inductive_compiler): remove sizeof lemma generation
Remark: we are in the process of deleting the inductive_compiler
2018-06-12 13:03:25 -07:00
Leonardo de Moura
5088252aa8 feat(kernel): add proper constructor struct 2018-06-12 13:03:25 -07:00
Leonardo de Moura
c3c6c4afc3 feat(kernel/inductive): add check_inductive_types 2018-06-12 13:03:25 -07:00
Leonardo de Moura
b2bebbf75d chore(kernel): check_no_mlocal ==> check_no_metavar_no_fvar 2018-06-12 13:03:25 -07:00
Sebastian Ullrich
42d58580e6 chore(script/prepare-commit-msg): remove file extension, guess change type 2018-06-12 17:39:59 +02:00
Sebastian Ullrich
b01288e118 chore(tests/lean/lisp): speed up test 2018-06-12 17:39:59 +02:00
Leonardo de Moura
a632df3211 refactor(kernel/inductive): do not use ginductive inductive declaration format
The format used by ginductive is more compact, but it forces the kernel
to implement the `infer_implicit_params`. It would also create problems
when we make inductive_decls a special case of declaration
2018-06-11 12:52:44 -07:00
Leonardo de Moura
7655d5f328 refactor(kernel): has_local ==> has_fvar 2018-06-11 10:46:05 -07:00
Leonardo de Moura
4ff710b709 fix(kernel/old_type_checker): assertion violation 2018-06-11 10:40:09 -07:00
Leonardo de Moura
d2efeca70c chore(kernel/instantiate): use new function names 2018-06-11 10:18:01 -07:00
Leonardo de Moura
50e50408eb feat(kernel): type checker with local_ctx 2018-06-11 09:59:49 -07:00
Leonardo de Moura
26b47c2852 chore(kernel/old_type_checker): cleanup 2018-06-11 08:57:22 -07:00
Leonardo de Moura
bf165e0f51 fix(kernel/quot): assertion violation 2018-06-09 08:50:32 -07:00
Leonardo de Moura
06337d04e5 chore(library/tactic/simplify): fix compilation error 2018-06-09 08:11:51 -07:00
Leonardo de Moura
c632123fd1 chore(kernel/quot): avoid legacy code 2018-06-09 07:54:45 -07:00
Leonardo de Moura
d5c24806e7 feat(kernel/local_ctx): add methods for replacing legacy Pi/Fun 2018-06-09 07:45:16 -07:00
Leonardo de Moura
a6250840d5 chore(kernel): rename some expr functions 2018-06-09 07:18:24 -07:00
Leonardo de Moura
1612aca0b2 chore(kernel): rename expr kinds 2018-06-09 06:50:14 -07:00
Leonardo de Moura
9626ad919c chore(library/export): remove text export module
This can be implemented in Lean.
2018-06-08 13:36:36 -07:00
Leonardo de Moura
62788a9ca3 refactor(kernel): fix terminology: "free_var" is actually a loose bound variable
We represent free variables uisng local constants.
We will fix this terminology too.
2018-06-08 13:25:36 -07:00
Leonardo de Moura
bd91d08bcd chore(library/replace_visitor): add copy_pos 2018-06-08 11:25:07 -07:00
Leonardo de Moura
03391006dc chore(tests/lean/revert): fix test 2018-06-08 11:21:01 -07:00