Leonardo de Moura
7ce0471f28
feat: improve binrel% elaborator
...
It now relies on `binop%` too, and addresses issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Regression.20in.20coercion.20inference/near/281737387
2022-05-09 18:39:52 -07:00
Leonardo de Moura
57c3114875
fix: simpAll and tests
...
We need another `update stage0` to remove workaround at `AC.lean`
2022-04-21 15:00:07 -07:00
Leonardo de Moura
e4304ea1de
fix: always save completion info at resolveName
...
See new test.
2022-04-10 08:00:03 -07:00
Leonardo de Moura
4d077214f9
feat: jump to definition for match pattern variables
2022-04-09 15:36:42 -07:00
Leonardo de Moura
7d99f6f555
perf: isClassQuick? was incorrectly producing undef
...
Then `isClassExpensive?` was being invoked too often. In some
benchmarks the performance hit was substantial. For example,
in the new test `state8.lean`. The runtime on my machine went from 2s
to 0.76s.
2022-04-09 10:38:49 -07:00
Leonardo de Moura
417421dbae
fix: auto completion when autoBoundImplicit is active
2022-04-09 09:11:45 -07:00
Leonardo de Moura
3cf425ba52
fix: pattern hover information
...
We annotate patterns with the corresponding `Syntax` during
elaboration, and do not populate the info tree. Reason: the set of
pattern variables is not known during pattern elaboration.
2022-04-08 15:03:42 -07:00
Leonardo de Moura
1107705525
fix: jump to definition inside recursive definitions was not working on VS Code
...
Remark: it was working on Emacs.
2022-04-06 14:27:49 -07:00
Leonardo de Moura
574927ab0d
fix: jump to definition for recursive declarations
2022-04-06 13:01:16 -07:00
Leonardo de Moura
86432f1833
feat: improve let-pattern and have-pattern macro expansion
2022-03-29 07:33:22 -07:00
Leonardo de Moura
3193acecfa
fix: flush the CoreM and MetaM caches at modifyEnv
...
This fix may impact performance. Note that we don't need to flush the
cache if we are "adding" stuff to the environment. We only need to
flush the caches if the change is not monotonic. BTW, most of the
changes are monotonic. I think this is why we did not hit this bug before.
We may also move all these caches to an environment extension. It is
an easy way to make sure we preserve the cache when extending the
environment.
I tried a few benchmarks and did not notice a significant difference.
cc @kha @gebner
fixes #1051
2022-03-17 16:02:30 -07:00
Leonardo de Moura
d6de53a7aa
perf: custom splitAnd
2022-03-15 16:59:11 -07:00
Leonardo de Moura
ca253c43e1
refactor: pattern elaboration
...
We don't use the following hack anymore:
- /- HACK: `fvarId` is not in the scope of `mvarId`
- If this generates problems in the future, we should update the metavariable declarations. -/
- assignExprMVar mvarId (mkFVar fvarId)
This hack was corrupting the `InfoTree`.
2022-03-09 18:19:14 -08:00
Leonardo de Moura
15e6dd262d
chore: fix tests
2022-02-09 10:13:52 -08:00
Leonardo de Moura
9d34d9bc5a
feat: cache and optimize mkCongrSimp? at simp
...
see #988
2022-02-07 17:01:21 -08:00
Leonardo de Moura
007f0e1d71
feat: use mkCongrSimp? at simp
...
TODO: cache auto generated congr theorems, and `removeUnnecessaryCasts`
see #988
2022-02-07 16:45:01 -08:00
Sebastian Ullrich
2c7d67d498
fix: make info of fields synthesized by structure update synthetic
2022-02-06 08:50:07 -08:00
Sebastian Ullrich
0ef5985b5f
fix: binder info range for let rec/where
2022-02-06 07:21:51 -08:00
Leonardo de Moura
a028a69159
feat: cache isProp and isDecInst at FunInfo
2022-02-04 17:57:28 -08:00
Leonardo de Moura
f9fa24435d
chore: remove problematic instance hasOfNatOfCoe
...
See #403
See https://github.com/leanprover-community/mathport/issues/94
2022-01-20 14:47:25 -08:00
Sebastian Ullrich
bbec84bb18
chore: more output on trace.Elab.info
2022-01-19 21:40:29 +01:00
Leonardo de Moura
de11f7e1bc
feat: add sizeOf spec lemmas as simp theorems
2022-01-17 16:14:38 -08:00
Gabriel Ebner
50abc3e295
fix: correctly pretty-print @Eq
2022-01-12 09:41:41 +01:00
Leonardo de Moura
57b8912279
chore: fix tests
2022-01-10 14:33:02 -08:00
Leonardo de Moura
92a511be29
chore: fix test
2021-12-18 11:05:37 -08:00
Leonardo de Moura
89edc184fb
feat: compleation at #print command
2021-12-15 13:13:39 -08:00
Gabriel Ebner
b905824024
chore: fix tests
2021-12-15 11:42:38 +00:00
Leonardo de Moura
5b14caf329
fix: missing addTermInfo at elabAtomicDiscr
...
closes #820
2021-12-14 17:20:46 -08:00
Sebastian Ullrich
fddbc3c09e
fix: empty option completion
2021-12-10 14:19:19 -08:00
Sebastian Ullrich
77aed3a0b1
fix: add binder info nodes for parameter copies in body
2021-12-09 18:12:51 +01:00
Sebastian Ullrich
4f15805787
feat: annotate declarations with term infos
2021-11-27 07:25:15 -08:00
Sebastian Ullrich
25ebc68b87
fix: emit info tree on command without elaborator
...
Fixes #792
2021-11-16 10:44:17 +01:00
Sebastian Ullrich
6e4fcaaea9
fix: produce info tree even on macro or elab failure
2021-11-11 08:39:31 +01:00
Gabriel Ebner
ce15ea98c5
feat: predictable naming for macro_rules
2021-10-26 20:19:27 +02:00
Leonardo de Moura
42773941ed
chore: fix test
2021-10-02 17:00:07 -07:00
Leonardo de Moura
4c0ae51a81
chore: fix test
2021-09-16 10:13:34 -07:00
Leonardo de Moura
6fb2a2b47b
chore: remove ≅ notation for HEq
...
We don't really needed it here.
2021-09-15 08:06:32 -07:00
Leonardo de Moura
9b0dfc4b90
feat: convert "orphan" kernel nat literals n into ofNat n
2021-09-08 14:58:13 -07:00
Leonardo de Moura
eb94e87195
chore: fix some tests
2021-09-07 17:20:21 -07:00
Leonardo de Moura
c93982d10c
chore: disable pp.analyze for now
...
see #651
2021-09-07 07:51:43 -07:00
Leonardo de Moura
33a0da8c6f
chore: remove simp annotation from PUnit.eq_punit
...
closes #635
2021-08-19 11:22:13 -07:00
Leonardo de Moura
99e8a98f06
feat: allow universes metavariables from any depth to be assigned when ignoreLevelDepth is true
...
We set `ignoreLevelDepth` to true during type class resolution.
2021-08-18 20:20:51 -07:00
Leonardo de Moura
4239ae69f6
chore: fix tests
2021-08-13 17:24:58 -07:00
Leonardo de Moura
1d9d8c7e75
chore: fix tests
...
close #402
2021-08-07 13:22:58 -07:00
Leonardo de Moura
789c7073dc
fix: avoid eager TC synthesis at isDefEq
2021-08-05 12:09:22 -07:00
Daniel Selsam
aefd31b2a2
feat: better bottom-up/structure-type heuristics
2021-08-03 09:13:18 +02:00
Daniel Selsam
702211db2a
feat: pp.analyze detect when struct-inst type needed
2021-08-03 09:13:18 +02:00
Daniel Selsam
c3d62c1076
chore: patch tests for pp.analyze default
2021-08-03 09:13:18 +02:00
Leonardo de Moura
49a87ceb4d
feat: add basic isDefEq cache
2021-07-28 16:29:44 -07:00
Wojciech Nawrocki
54f2769e13
fix: test
2021-07-24 10:45:28 +02:00