Commit graph

26011 commits

Author SHA1 Message Date
Leonardo de Moura
1e0109f321 chore: update stage0 2021-03-11 07:56:29 -08:00
Leonardo de Moura
babdde9068 chore: activate decide and nativeDecide 2021-03-11 07:54:54 -08:00
Leonardo de Moura
b419427e90 chore: update stage0 2021-03-11 07:54:33 -08:00
Leonardo de Moura
90c5f35702 refactor: implement decide and nativeDecide as tactics
TODO: update stage0 and activate
2021-03-11 07:50:54 -08:00
Leonardo de Moura
35b2f596f1 test: use decide and nativeDecide
They are not active yet.
2021-03-11 07:46:33 -08:00
Sebastian Ullrich
7b9f9e806f feat: Syntax.topDown 2021-03-11 13:22:18 +01:00
Sebastian Ullrich
75d87f34a6 chore: lean4-mode: do not re-request goal on each flycheck change 2021-03-11 10:45:04 +01:00
Sebastian Ullrich
f4ed9686aa feat: lean4-mode: show all errors not strictly above in info view 2021-03-11 10:25:49 +01:00
Sebastian Ullrich
bd004b4681 chore: update stage0 2021-03-11 10:20:13 +01:00
Leonardo de Moura
48b855bfe5 chore: fix tests 2021-03-10 18:45:22 -08:00
Leonardo de Moura
68143ca8ba chore: trace[...]! ==> trace[...]
@Kha I think this one is a good change, there is no real reason for
using the `!` suffix here.
2021-03-10 18:44:43 -08:00
Leonardo de Moura
55157a3108 chore: fix test 2021-03-10 14:51:24 -08:00
Leonardo de Moura
30ba56126b fix: missing case
Lean should not get stuck at universe constraints such as `?u =?= ?u + 1`.
2021-03-10 14:48:02 -08:00
Leonardo de Moura
a3923eecc8 feat: filter duplicate universe constraints at error message 2021-03-10 14:40:25 -08:00
Leonardo de Moura
847f95021a fix: losing postponed universe constraints
This bug was exposed by #342
2021-03-10 14:18:03 -08:00
Leonardo de Moura
904c23e901 chore: add annotations
We need these extra annotations after we fix a bug a `commitWhen`.
In the `commitWhen` bug, we were "losing" postponed constraints.
2021-03-10 14:11:03 -08:00
Sebastian Ullrich
0bc6043903 fix: lean4-mode: more fixes, maybe 2021-03-10 18:34:24 +01:00
Sebastian Ullrich
06813e8186 doc: new lean4-mode dependency 2021-03-10 18:12:42 +01:00
Sebastian Ullrich
64bfd803fe chore: lean4-mode: avoid cl 2021-03-10 18:10:06 +01:00
Sebastian Ullrich
31d5f9fa51 fix: lean4-mode: coercion at info view 2021-03-10 17:49:35 +01:00
Leonardo de Moura
1ea4bdb9cd fix: add "band-aid" for #341
closes #341

This is another instance of a compiler bug.
It is in the code that is still written in C/C++.
We need to infer types in the compiler, and we reused the kernel type
checker for this.
However, the compiler performs transformations that may produce type
incorrect terms.
This happens in code that makes heavy use of dependent types (like the
new test).
This is just a workaround for this particular instance of the problem.
The definitive solution will only happen when we replace
this part of the compiler with Lean code, and implement a custom
`inferType` method for the compiler.
2021-03-10 08:11:41 -08:00
Sebastian Ullrich
3eb91d4950 feat: lean4-mode: use full range when selecting messages for info view 2021-03-10 17:09:41 +01:00
Sebastian Ullrich
b6622d2bef feat: server: preserve full range of messages 2021-03-10 17:09:41 +01:00
Sebastian Ullrich
4195507655 feat: lean4-mode: nicer info view using magit sections 2021-03-10 17:09:41 +01:00
Sebastian Ullrich
c2f7ecaf37 feat: server: also transmit array of goals 2021-03-10 17:09:41 +01:00
Sebastian Ullrich
14e11f99e6 feat: lean4-mode: combine goal and next-error views into info view (C-c C-i) 2021-03-10 17:09:41 +01:00
Leonardo de Moura
d2f9e43ca0 chore: update stage0 2021-03-09 19:25:40 -08:00
Leonardo de Moura
8f580a5a70 refactor: remove SimpLemmaKind 2021-03-09 19:25:02 -08:00
Leonardo de Moura
b96e4f6637 chore: update stage0 2021-03-09 19:16:57 -08:00
Leonardo de Moura
0ea267e4de feat: add simp lemma preprocessor 2021-03-09 19:16:14 -08:00
Leonardo de Moura
2004ea5ec0 feat: add AuxLemma.lean 2021-03-09 18:25:19 -08:00
Leonardo de Moura
0068732751 test: benchmarks for simp 2021-03-09 15:09:51 -08:00
Leonardo de Moura
4c82f5c688 test: perf experiments 2021-03-09 13:42:47 -08:00
Sebastian Ullrich
70232f7ad9 fix: lean4-mode: attributes are not documentation
and in particular should not be spell-checked
2021-03-09 17:41:36 +01:00
Sebastian Ullrich
c2b357a5c8 feat: lean4-mode: register lean as code block language in markdown-mode 2021-03-09 10:44:05 +01:00
Leonardo de Moura
0c29987a82 chore: clenaup test 2021-03-08 18:19:15 -08:00
Leonardo de Moura
23319da6c0 fix: position info for rw tactics of the form rw [h1, h2, ..] 2021-03-08 18:18:37 -08:00
Leonardo de Moura
90cab68332 feat: keep going if there are missing alternatives at induction/cases 2021-03-08 17:09:53 -08:00
Leonardo de Moura
142d6cbcbc chore: truncate error messages endPos
@Kha, @Vtec234, @mhuisi:
This is a bit hackish, but it improves the usuability quite a bit in
VS Code. Without this hack, I often get huge blocks of "red squiggly lines".
2021-03-08 16:44:33 -08:00
Leonardo de Moura
ef4ab9c1d1 fix: report error if too many variable names have been provided at induction/cases alternative 2021-03-08 16:26:53 -08:00
Leonardo de Moura
4bbcd305b5 fix: disable implicit-lambdas when elaborating patterns
@Kha, Jason's example on issue #337 suggests that injecting
implicit-lambdas while elaborating patterns is problematic.
The elaborator was injecting `fun {Γ} =>` before the
pattern variable `ftm`.
So, I disabled the implicit-lambda during pattern elaboration. I
didn't find an example where it would be useful.

see #337

cc @JasonGross
2021-03-08 15:45:30 -08:00
Leonardo de Moura
a4abdbf277 refactor: add checkApp
Add comment describing possible extension.
2021-03-08 15:26:07 -08:00
Leonardo de Moura
0c4d72c1d5 refactor: add implicitLambda argument 2021-03-08 15:21:32 -08:00
Leonardo de Moura
f321ad213f fix: reset set of stuck mvars after reporting they are stuck
This bug produced the doubled error message at issue #337
2021-03-08 12:46:50 -08:00
Leonardo de Moura
5d3f0606d2 feat: include type of type in "mismatch errors"
@Kha we do that in Lean 3. It helps when the error is due to incorrect universe levels.

BTW, I had to update `tests/lean/server/content_diag.json` since the
error message is different, but a few other stuff changed too.
Could you please take a look whether the test is still correct?
2021-03-08 09:30:34 -08:00
Leonardo de Moura
0e3aa2c29b fix: scope of forallTelescopeReducing
Nested constructors were being processed using an extended local context.
Fix issue reported by @JasonGross at Zulip.

closes #338
2021-03-08 08:29:48 -08:00
Leonardo de Moura
a7ac27b0e8 refactor: use mutual recursion 2021-03-08 07:41:58 -08:00
Sebastian Ullrich
683c9d7cd3 doc: fix 2021-03-08 14:54:52 +01:00
Leonardo de Moura
4bbf498004 chore: fix tests 2021-03-07 18:52:46 -08:00
Leonardo de Moura
9901898258 feat: add Nat.gcd
This commit also fix some theorem names to new naming convention.
2021-03-07 18:47:02 -08:00