Commit graph

301 commits

Author SHA1 Message Date
Leonardo de Moura
d10a799b79 chore(tests/lean/interactive/complete_field): fix test 2017-05-27 10:18:44 -07:00
Gabriel Ebner
95300224aa fix(frontends/lean/builtin_cmds): suppress unhelpful #check output 2017-05-23 11:14:31 -07:00
Gabriel Ebner
183bf63e26 fix(frontends/lean/parser): pass error-recovery flag from parser to elaborator 2017-05-23 11:14:31 -07:00
Gabriel Ebner
166c07e1fe fix(frontends/lean/elaborator): do not leak _elab_u names 2017-05-23 11:14:31 -07:00
Gabriel Ebner
d27a0eff15 chore(tests): fix tests 2017-05-23 11:14:31 -07:00
Gabriel Ebner
99754188e6 feat(library/compiler/eta_expansion): also eta-expand expressions containing sorry 2017-05-23 11:14:31 -07:00
Gabriel Ebner
af63d4036b chore(tests): update tests 2017-05-23 11:14:31 -07:00
Gabriel Ebner
89ad117be3 chore(tests): update tests with changes to error recovery 2017-05-23 11:14:30 -07:00
Gabriel Ebner
54114fd7bd fix(frontends/lean/tactic_notation): do not clamp errors to the end of {} blocks 2017-05-23 07:28:34 +02:00
Leonardo de Moura
7d2ec25e81 fix(tests/lean/interactive/complete_field): fix tests 2017-05-16 14:50:15 -07:00
Leonardo de Moura
74550fbebc feat(library/init/core): add notation for out_param 2017-05-01 13:52:17 -07:00
Leonardo de Moura
5cef84709f refactor(library): avoid auxiliary definitions such as add/mul/le/etc
See Section "Other goodies" at
https://github.com/leanprover/lean/wiki/Refactoring-structures

This commit also improves the support for projections in the
unifier/matcher.

Now, we consider the extra case-split for projections.
Given a projection `proj`, and the constraint `proj s =?= proj t`, we need to try first `s =?= t` and if it fails, then try to reduce.
This is needed in the standard library because we now have constraints such as:
```
@has_le.le ?A ?s ?a ?b  =?=  @has_le.le nat nat.has_add x y
```
If we reduce the right hand side, we get the unsolvable constraint
```
@has_le.le ?A ?s ?a ?b  =?=  nat.le x y
```
Before this change, the constraint was `@le ?A ?s ?a ?b  =?=  @le nat nat.has_add x y`, and we already perform a case-split in this case.
Moreover, projections were eagerly reduced whenever possible.
The extra case-split generates a performance problem in several tests. For example `fib 8 = 34` was timing out.
I worked around this issue by performing the case-split only when the constraint contains meta-variables.
There are also minor issues. Example. `<` is notation for `has_lt.lt`, but `>` is for `gt`.
2017-05-01 08:52:19 -07:00
Gabriel Ebner
a7d58008ac fix(frontends/lean/parser): show exception message in import errors 2017-04-27 16:04:18 -07:00
Sebastian Ullrich
e9a6c544af refactor(frontends/lean/{elaborator,structure_cmd}): compile structure inheritance to nested fields 2017-04-24 19:35:15 +02:00
Sebastian Ullrich
6ab0a008f9 feat(frontends/lean/{builtin_cmds,interactive}): complete namespace/section after end 2017-04-23 11:26:31 -07:00
Sebastian Ullrich
a54514fead feat(frontends/lean/print_cmd): complete identifiers after #print 2017-04-23 11:26:31 -07:00
Sebastian Ullrich
5b17c3cbd9 fix(frontends/lean/interactive): fall back to elaborator info when not an interactive tactic
Fixes #1530
2017-04-23 11:26:31 -07:00
Gabriel Ebner
01a7efc007 fix(library/module_mgr): do not crash on missing imports
Fixes #1506.
2017-04-04 19:56:33 +02:00
Sebastian Ullrich
cd013f22c0 chore(*): replace "'^.' notation" with "field notation", pretty print using "." 2017-03-31 09:40:49 -07:00
Sebastian Ullrich
3c8e176fb0 fix(frontends/lean/interactive): fix info on new field notation 2017-03-31 09:40:49 -07:00
Gabriel Ebner
f9c1ceb717 fix(frontends/lean/scanner): correctly handle positions in empty files 2017-03-31 09:40:15 -07:00
Leonardo de Moura
71bf0bcc5d fix(frontends/lean/builtin_exprs): fixes #1493 2017-03-27 17:57:13 -07:00
Leonardo de Moura
eea46610ea fix(library/tactic/simplify): missing projection reduction, add proj := tt to simp 2017-03-27 17:38:40 -07:00
Leonardo de Moura
b09968a37b feat(library/tactic/simplify): add beta := tt to simp 2017-03-27 17:38:31 -07:00
Sebastian Ullrich
68c1ff6219 feat(frontends/lean/builtin_exprs): use local field inference for info too 2017-03-27 14:01:38 -07:00
Gabriel Ebner
8c1136c1b6 fix(library/module_mgr): get_first_diff_pos: handle newlines correctly 2017-03-27 14:01:04 -07:00
Gabriel Ebner
2da9d72491 chore(tests/lean/interactive): fix test 2017-03-23 09:14:32 +01:00
Gabriel Ebner
a8ba78e20a refactor(frontends/lean/tactic_notation): remove irtactic in favor of itactic 2017-03-23 09:07:08 +01:00
Gabriel Ebner
d90dda01b0 chore(*): fix tests 2017-03-23 09:03:43 +01:00
Gabriel Ebner
9dfd8e1018 fix(shell/server): fix field completion 2017-03-23 09:03:43 +01:00
Gabriel Ebner
ef0e113b4b chore(tests): fix tests 2017-03-23 09:03:43 +01:00
Gabriel Ebner
c8fff9f4ff refactor(init/meta/interaction_monad): replace rstep by istep 2017-03-23 09:03:41 +01:00
Gabriel Ebner
a591e35544 chore(*): fix tests 2017-03-23 09:00:59 +01:00
Gabriel Ebner
d26e870aa5 chore(*): fix tests 2017-03-23 09:00:59 +01:00
Gabriel Ebner
176fb9c81f chore(tests): changed sorry warnings 2017-03-23 08:57:56 +01:00
Sebastian Ullrich
a5db5ae4de refactor(init/meta/interactive): rw: parse - separately to remove hack 2017-03-22 07:54:12 -07:00
Sebastian Ullrich
9cf80a6c94 feat(init/meta/interactive): rw goal info on ] 2017-03-22 07:54:12 -07:00
Sebastian Ullrich
da7e21696e feat(init/meta/interactive): rw goal info on , 2017-03-22 07:54:12 -07:00
Sebastian Ullrich
f9854be13f feat(frontends/lean/parser): save id info for non-overloaded constants 2017-03-22 07:35:14 -07:00
Sebastian Ullrich
5e0e19c4ad fix(frontends/lean/{interactive,tactic_notation}): fix tests 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
e0856284b0 feat(frontends/lean,emacs): tactic info before elaboration, fix many edge cases 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
c46936d180 fix(frontends/lean/interactive): hard-code tactic pretty printing 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
c387c34365 fix(test/lean/interactive/run_single): include stderr 2017-03-17 18:05:19 -07:00
Leonardo de Moura
83fbb605f4 chore(tests/lean): fix tests 2017-03-15 19:40:52 -07:00
Leonardo de Moura
d352ac4bcb chore(tests/lean): fix tests 2017-03-11 12:20:42 -08:00
Daniel Selsam
538ac8d187 feat(inductive_compiler): generate injectivity lemmas 2017-03-10 22:27:18 -08:00
Leonardo de Moura
9d3c0497cb chore(frontends/lean): rename transient commands
See issue #1432
2017-03-09 18:41:19 -08:00
Sebastian Ullrich
b3887f21a4 fix(shell/server): remove unnecessary dependencies of info_task and use intermediate envs 2017-03-08 10:40:59 -08:00
Leonardo de Moura
1ac240e2db chore(tests/lean): fix tests 2017-03-07 19:45:00 -08:00
Leonardo de Moura
fa99861788 feat(frontends/lean/elaborator): add new ^. notation
see #1403
2017-03-05 20:12:49 -08:00