Leonardo de Moura
865316bbf9
feat: improve error message when stuck solving universe constraints
...
closes #343
2021-03-11 17:46:44 -08:00
Leonardo de Moura
be841a7cad
chore: throwError! => throwError, throwErrorAt! => throwErrorAt
...
@Kha I marked the corresponding methods as `protected`.
I currently can't stand `throw_error`, and I am optimistic about
server highlighting feature you are working on :)
2021-03-11 11:59:45 -08:00
Leonardo de Moura
164577d94e
chore: remove parser! and tparser!
...
The new macros are called "leading_parser` and `trailing_parser`.
cc @Kha
2021-03-11 09:36:58 -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
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
8f580a5a70
refactor: remove SimpLemmaKind
2021-03-09 19:25:02 -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
a4abdbf277
refactor: add checkApp
...
Add comment describing possible extension.
2021-03-08 15:26:07 -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
08fc25217d
chore: cleanup, fix docs
2021-03-07 09:01:54 -08:00
Leonardo de Moura
6d236fbf2e
chore: fix docstring
2021-03-07 09:01:54 -08:00
Jan Hrcek
2753822fe7
doc: fix typos
2021-03-07 15:06:02 +01:00
Leonardo de Moura
66f1a88f2c
feat: simp [-decl]
2021-03-04 17:50:44 -08:00
Leonardo de Moura
db499a646f
chore: add profileitM for simp
2021-03-04 17:27:01 -08:00
Leonardo de Moura
fe94731779
perf: do not use decide for rewriting True/False
2021-03-04 13:50:17 -08:00
Leonardo de Moura
9baee4354c
chore: add trace.Debug.Meta.Tactic.simp
...
It is an attempt to distinguish trace messages that are relevant only
for developers.
@Kha I am considering using the prefix `trace.Debug` for (debugging) messages that
are just for us.
2021-03-04 12:27:10 -08:00
Leonardo de Moura
960e964b71
feat: allow user to "erase" [simp] lemmas
2021-03-04 11:36:12 -08:00
Leonardo de Moura
152a84c468
perf: reject rewrites that produce same expr
2021-03-03 20:20:22 -08:00
Leonardo de Moura
6cdc6cb1d0
feat: add contradiction
2021-03-03 17:00:54 -08:00
Leonardo de Moura
40c340d1a0
feat: helper match methods
2021-03-03 16:16:34 -08:00
Leonardo de Moura
4a095a7da6
feat: helper methods
2021-03-03 16:16:17 -08:00
Leonardo de Moura
7df503c4e4
refactor: add findLocalDeclWithType?
2021-03-03 15:44:32 -08:00
Leonardo de Moura
f1245f9dc7
fix: bug at isDefEqOffset
...
fixes #326
2021-03-02 17:28:40 -08:00
Leonardo de Moura
12e9d1f7d2
chore: use double backticks
2021-03-02 17:28:40 -08:00
Leonardo de Moura
1c50603112
fix: ReplaceLocalDecl
2021-02-26 19:31:40 -08:00
Leonardo de Moura
d770c55326
feat: universe level parameters in instances are outParam by default
...
This commit makes sure Lean 4 treats universe level parameters in
instances as `outParam`s. This the behavior in Lean 3.
fixes #319
2021-02-25 13:21:53 -08:00
Leonardo de Moura
d9d948087f
fix: use TransparencyMode.instances at SynthInstance
2021-02-25 13:08:51 -08:00
Leonardo de Moura
3850b1a9aa
perf: workaround for increasing the number of destructive updates
...
See 4908eaf396
2021-02-21 16:22:53 -08:00
Leonardo de Moura
322fc79d84
perf: cache inferConstType
2021-02-21 15:48:36 -08:00
Leonardo de Moura
50b6561f8f
chore: cleanup
2021-02-21 14:04:00 -08:00
Leonardo de Moura
e1f6965266
feat: allow user to define rewrite lemmas with (local) match expressions
2021-02-19 15:18:19 -08:00
Leonardo de Moura
8392b09db2
feat: shouldAddAsStar only for nested terms
2021-02-18 11:33:56 -08:00
Leonardo de Moura
df8634e9ad
fix: assertAfter
2021-02-17 13:52:43 -08:00
Leonardo de Moura
bb2ca97df9
refactor: add options for controlling whether variables are included or not at mkLambdaFVars and mkForallFVars
2021-02-17 13:49:27 -08:00
Leonardo de Moura
1a7535263e
fix: unfolding class projections at simp
2021-02-16 17:55:57 -08:00
Leonardo de Moura
399af03c7c
refactor: move defeq unfolding to reduce, use transform to implement dsimp
2021-02-16 17:41:18 -08:00
Leonardo de Moura
15e6ae2cdb
chore: cleanup
2021-02-16 16:16:21 -08:00
Leonardo de Moura
2ef6605cdf
feat: do not simplify proofs
2021-02-16 16:13:56 -08:00
Leonardo de Moura
5f80659b45
fix: unfold constants at simp
2021-02-16 15:42:31 -08:00
Leonardo de Moura
3e65f586cc
fix: smart unfolding
2021-02-16 15:39:07 -08:00
Leonardo de Moura
4ec85a39a5
fix: Not should not be reducible, special support for Ne
...
Unification hint for `Not`
2021-02-15 17:36:11 -08:00
Leonardo de Moura
e97df2f61b
feat: functions to unfold at simp
2021-02-15 15:32:25 -08:00
Leonardo de Moura
1c5de9842d
feat: use decide at simp
2021-02-15 13:08:45 -08:00
Leonardo de Moura
7bdd3ae5a2
feat: simplify ctor_1 ... = ctor_2 ...
2021-02-15 12:40:19 -08:00
Leonardo de Moura
f07b9926b1
feat: unfold coercions and coeFun, coeSort, coeM, liftCoeM
...
TODO: `coe`
2021-02-14 10:27:34 -08:00
Leonardo de Moura
7e3bc30674
feat: add expandCoe
2021-02-14 10:03:44 -08:00
Leonardo de Moura
0787886cea
feat: improve simp local lemma elaboration
2021-02-13 18:55:19 -08:00