Commit graph

9747 commits

Author SHA1 Message Date
Leonardo de Moura
3d1faee826 chore(kernel/abstract_type_context): remove dead method abstract_type_context::abstract
We needed this method when we were using delayed abstractions
2018-06-07 16:28:54 -07:00
Leonardo de Moura
6333043adf refactor(kernel): abstract_local(s) ==> abstract 2018-06-07 16:28:54 -07:00
Leonardo de Moura
de82517d80 refactor(kernel): remove abstract since we only use abstract_locals 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
744bca1964 chore(cmake/Modules/cpplint): disable yet another buggy check 2018-06-06 15:28:44 -07:00
Leonardo de Moura
0a5e7ff1a9 feat(kernel): add local_ctx
We will have only one kind of local constant (aka free variable) in
Lean4. Thus, we need a local context object to implement the kernel
type checker.
2018-06-06 15:24:10 -07:00
Leonardo de Moura
ee7bc150f2 chore(library/init/meta/expr): remove elaborated : bool parameter from expr 2018-06-06 09:47:01 -07:00
Leonardo de Moura
3a7229add3 chore(library/init): pexpr is now an opaque constant 2018-06-06 09:36:22 -07:00
Leonardo de Moura
441b9077b2 feat(library/comp_val): add mk_name_val_ne_proof
We need this procedure otherwise it takes forever to prove equation lemmas
for definitions such as:

```
def macros : name → option macro
| `lambda := some lambda_macro
| `intro_x := some intro_x_macro
| _ := none
```

We never experienced this problem in Lean3 because we used `name`
literals only occurred in patterns of *meta* definitions. So, no
equation lemma was generated.

@kha `def macros` was taking more than 1 second to elaborate on my
machine. It is now instantaneous.
2018-06-06 09:18:59 -07:00
Leonardo de Moura
e4a168af91 chore(library/init/meta): remove goal tagging feature 2018-06-06 08:46:47 -07:00
Leonardo de Moura
bd7138349a chore(library/init/meta/pexpr): remove pexpr primitives 2018-06-05 16:28:12 -07:00
Leonardo de Moura
ab481d7e7b chore(library/init/meta): remove unnecessary primitives 2018-06-05 16:13:22 -07:00
Leonardo de Moura
0119926022 fix(kernel/expr): constructor order 2018-06-05 15:56:51 -07:00
Leonardo de Moura
45202eca16 chore(library/init/meta): cleanup 2018-06-05 15:32:59 -07:00
Leonardo de Moura
330c9afbc0 feat(library/metavar_context): store user_name at metavar_decl 2018-06-05 14:29:55 -07:00
Leonardo de Moura
fc8aa30f0f chore(library/pp_options): remove dead option 2018-06-05 14:27:04 -07:00
Leonardo de Moura
6472cb0579 chore(kernel/abstract_type_context): rename has_local_pp_name 2018-06-05 14:26:31 -07:00
Leonardo de Moura
8ae42417eb fix(library/compiler/vm_compiler): missing case 2018-06-05 11:07:38 -07:00
Leonardo de Moura
0dd25b0a24 refactor(util,library): move subscripted_name_set to library 2018-06-05 08:06:32 -07:00
Leonardo de Moura
ff3a3177c3 chore(library/local_context): get_pp_name => get_user_name 2018-06-04 16:08:28 -07:00
Leonardo de Moura
87b5fd70af chore(tests/frontends/lean): remove tests for old parser 2018-06-01 18:31:40 -07:00
Leonardo de Moura
bdd2a53d6a chore(tests/library/rewriter): remove dead tests 2018-06-01 18:28:08 -07:00
Leonardo de Moura
b47aa7997e chore(kernel): remove dead code 2018-06-01 18:07:10 -07:00
Leonardo de Moura
3d38923e07 feat(frontends/lean/inductive_cmds): add option for invoking future inductive module 2018-06-01 16:25:21 -07:00
Leonardo de Moura
8ff6ac9e0f refactor(kernel/environment): intro_rule ==> constructor
Lean is a programming language
2018-06-01 15:35:02 -07:00
Leonardo de Moura
909284dd74 refactor(runtime): normlize object names 2018-06-01 15:34:42 -07:00
Leonardo de Moura
de48d49b53 feat(kernel): preparing for adding new inductive datatype module 2018-06-01 14:47:49 -07:00
Leonardo de Moura
ac0352b584 refactor(kernel): remove quotitent normalizer extension
The `quot` type is now implemented in the kernel.
We will do the same thing for inductives.
We will not support normalizer extensions anymore in Lean4.
It doesn't make sense since we settled with 2 extensions: quotients and
inductives. Moreover, any new extension would require substantial
changes (e.g., code generator).
The normalizer_extension feature was useful when we were experimenting
with different kernel flavors.
2018-06-01 10:52:17 -07:00
Leonardo de Moura
722974e8c7 feat(kernel): add option to skip type checking at add_meta 2018-05-31 17:27:55 -07:00
Leonardo de Moura
9a671d7c7d chore(library/compiler): delete rec_fn_macro 2018-05-31 17:11:25 -07:00
Leonardo de Moura
b95e710e8c feat(library/compiler, library/equations_compiler): avoid rec_fn_macro in the equation and bytecode compilers 2018-05-31 17:08:12 -07:00
Leonardo de Moura
eab962bbc6 feat(kernel): add add_meta 2018-05-31 15:40:50 -07:00
Leonardo de Moura
cab6b39c76 refactor(library): remove sorry checking
We have to revise how we do this.
2018-05-31 15:20:39 -07:00
Leonardo de Moura
8a918a2a14 fix(checker/text_import): commit 3c1ccc9 broke it 2018-05-31 14:59:36 -07:00
Leonardo de Moura
112d1da8d0 refactor(library/module): no need to store trust lvl in declarations
We are going to delete macros. So, we don't need to store trust_lvl information.
2018-05-31 14:55:18 -07:00
Leonardo de Moura
3c1ccc9b74 refactor(kernel): use m_meta instead of m_trusted 2018-05-31 11:18:00 -07:00
Leonardo de Moura
e80765daca fix(library/export_decl): bug at export_decl_modification::perform
The `perform` method was adding the modification to the environment
where it was being applied.
2018-05-31 09:16:46 -07:00
Leonardo de Moura
80545832f4 chore(library): remove user attributes 2018-05-31 09:10:41 -07:00
Leonardo de Moura
f507b882e2 chore(frontends/lean): remove support for user commands from old front end 2018-05-31 09:06:07 -07:00
Leonardo de Moura
0947abaee4 chore(frontends/lean): remove broken declare_trace command
This command is broken, and we will have a new tracing infrastructure in Lean4.
2018-05-31 09:02:25 -07:00
Leonardo de Moura
2e8967adf1 doc(kernel/environment): document why we need is_descendant 2018-05-31 08:14:54 -07:00
Leonardo de Moura
12a03f7784 chore(frontends/lean/definition_cmds): remove dependency 2018-05-30 14:46:54 -07:00
Leonardo de Moura
d3272ca1c5 refactor(frontends/lean,library/tactic/kabstract): remove add_key_equivalence command
This command was never used in the Lean3 corelib and mathlib.
It is safe to assume it is not needed.
2018-05-30 14:10:03 -07:00
Leonardo de Moura
d707a27c2b chore(library/class): unnecessary dependency 2018-05-30 14:05:21 -07:00
Leonardo de Moura
843cd9bacb chore(library/compiler/rec_fn_macro): remove dead code 2018-05-30 13:16:34 -07:00
Leonardo de Moura
2ddb9d1598 refactor(library): remove delayed_abstraction macro
We replace them with a new kind of (delayed) assignment at `metavar_context`
```
mvar := (lctx, locals, v)
```
where `lctx` is a local context, `locals` is a list of local
constants, and `v` is an expression.
When all metavariables in `v` are assigned, this assignment is replaced with
```
mvar := Fun(locals, v)
```
2018-05-30 10:04:04 -07:00
Leonardo de Moura
c9a6f98454 chore(library/sorry): style 2018-05-29 22:27:03 -07:00
Leonardo de Moura
f7b6645b60 fix(frontends/lean/elaborator): add missing synthesize
We added for the following reasons:
1- It should mimic the behavior of `visit_lambda` and `visit_pi`.
2- It minimizes the number of auxiliary metavariables that need to be
   created when we execute `locals.mk_lambda(new_body)`. In Lean3,
   it would minimize the number of delayed abstractions.
2018-05-29 16:40:13 -07:00
Leonardo de Moura
7842036aba feat(library/type_context): avoid delayed_abstractions when creating binders lambda/pi/let
This is the first step to eliminate the delayed_abstraction macro.
2018-05-29 16:37:33 -07:00
Leonardo de Moura
73f83216c1 fix(frontends/lean/elaborator): bug at invoke_tactic
The `is_def_eq` must be performed using the local context associated
with the metavariable.
2018-05-29 16:34:43 -07:00