Leonardo de Moura
4afcdeb771
fix: fixes #2775
...
fixes #2744
2023-11-03 05:56:59 -07:00
Kyle Miller
5fc079d9ce
fix: dsimp missing consumeMData when closing goals by rfl ( #2776 )
...
Fixes #2514
2023-10-30 09:32:32 +11:00
Sebastian Ullrich
74b8dda181
feat: check task cancellation in elaborator
2023-10-26 08:33:09 +02:00
Leonardo de Moura
a3642bd8d9
feat: add support for expanding let-declarations to simp
...
Given a local context containing `x : t := e`,
`simp (config := { zeta := false }) [x]` will expand `x` even
if `zeta := false`.
2023-10-25 03:12:35 -07:00
Leonardo de Moura
691defdc5d
chore: typos and PR feedback
...
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
2023-10-25 03:12:35 -07:00
Leonardo de Moura
3b831271ee
fix: fixes #2669 #2281
2023-10-25 03:12:35 -07:00
Leonardo de Moura
3a13200772
refactor: add configuration options to control WHNF
...
This commit also removes parameter `simpleReduce` from discrimination
trees, and take WHNF configuration options.
Reason: it is more dynamic now. For example, the simplifier
will be able to use different configurations for discrimination tree insertion
and retrieval. We need this feature to address issues #2669 and #2281
This commit also removes the dead Meta.Config field `zetaNonDep`.
2023-10-25 03:12:35 -07:00
thorimur
6063deb6bd
fix: rw ... at h unknown fvar bug ( #2728 )
2023-10-25 01:52:19 +00:00
thorimur
291e95e3c5
fix: add instantiateMVars to replaceLocalDecl ( #2712 )
...
* fix: `instantiateMVars` in `replaceLocalDecl`
* docs: update `replaceLocalDecl`
* test: `replaceLocalDecl` instantiates mvars
2023-10-25 10:26:09 +11:00
Leonardo de Moura
a7323c9805
feat: use forall_prop_domain_congr in simp tactic
...
closes #1926
2023-10-23 06:19:19 -07:00
Leonardo de Moura
370476cc14
fix: bug at substCore
2023-10-22 06:48:22 -07:00
Leonardo de Moura
9a7565d66c
perf: closes #2552
2023-10-22 06:48:22 -07:00
thorimur
b5e95bf632
fix: allow constants to be marked for dsimp
2023-10-20 19:06:40 -07:00
Leonardo de Moura
419100d42b
feat: add Simp.Config.ground for simplifying nested ground terms
...
This is an experimental new feature. We need more bells and whistles,
and `cbv` tactic for improving its performance.
2023-10-19 13:59:17 -07:00
Scott Morrison
fb0d0245db
Revert "Cancel outstanding tasks on document edit in the language server" ( #2703 )
...
* Revert "perf: inline `checkInterrupted`"
This reverts commit 6494af4513 .
* Revert "fix: switch to C++ interruption whitelist"
This reverts commit 5aae74199b .
* Revert "fix: do not throw interrupt exceptions inside pure functions"
This reverts commit c0e3b9568e .
* Revert "feat: cancel tasks on document edit"
This reverts commit a2e2481c51 .
* Revert "feat: translate `interrupted` kernel exception"
This reverts commit 14c640c15e .
* Revert "feat: check task cancellation in elaborator"
This reverts commit 2070df2328 .
* Revert "feat: move `check_interrupted` from unused thread class to `Task` cancellation"
This reverts commit bf48a18cf9 .
2023-10-17 00:59:11 +00:00
Scott Morrison
66ab016723
chore: simp tracing reports ← ( #2621 )
...
* chore: simp tracing reports ←
---------
Co-authored-by: Mario Carneiro <di.gama@gmail.com>
2023-10-15 12:12:10 +11:00
Sebastian Ullrich
2070df2328
feat: check task cancellation in elaborator
2023-10-13 09:52:26 +02:00
Scott Morrison
ca0e6b0522
chore: fix MVarId.getType' ( #2595 )
...
* chore: fix MVarId.getType'
* add test
2023-10-09 11:04:33 +00:00
int-y1
8d7520b36f
chore: fix typos in comments
2023-10-08 10:46:05 +02:00
Scott Morrison
c318d5817d
feat: allow configuring occs in rw
2023-09-13 12:03:18 -07:00
Jannis Limperg
13ca443f05
fix: simp: include class projections in UsedSimps ( #2489 )
...
* fix: simp: include class projections in UsedSimps
Fixes #2488
2023-09-07 08:54:00 +10:00
Jannis Limperg
9a262d7cef
fix: simpGoal reports incomplete UsedSimps ( #2487 )
2023-09-01 10:20:49 +10:00
Scott Morrison
61fea57e73
feat: add failIfUnchanged flag to simp
2023-08-13 09:49:25 -07:00
Scott Morrison
a44dd71ad6
feat: add flag for apply to defer failed typeclass syntheses as goals
2023-06-19 20:07:07 -07:00
Gabriel Ebner
bff612e59e
fix: simp: synthesize non-inst-implicit tc args
...
Fixes #2265 .
2023-06-09 16:32:02 -07:00
Gabriel Ebner
7f51628986
fix: simp: strip mdata when testing for True/False
...
Fixes #2173
2023-04-10 21:06:42 -07:00
Gabriel Ebner
572ffe77e3
fix: implement assertAfter using revert
2022-12-21 21:42:07 +01:00
Gabriel Ebner
e386d5941e
refactor: replace ignoreLevelMVarDepth by levelAssignDepth
2022-12-19 20:14:17 +01:00
Leonardo de Moura
0a031fc9bb
chore: replace Expr.forEach with Expr.forEachWhere
2022-12-01 05:19:32 -08:00
Leonardo de Moura
8fc3d77a0b
feat: add trace.Meta.Tactic.simp.numSteps and trace.Meta.Tactic.simp.heads
2022-11-30 07:07:07 -08:00
Leonardo de Moura
c510d16ef5
fix: fixes #1808
2022-11-28 07:48:54 -08:00
Leonardo de Moura
9d8b324f8d
fix: fixes #1869
...
Better support for simplifying class projections.
2022-11-24 11:56:36 -08:00
Leonardo de Moura
556b6706ee
fix: fixes #1856
2022-11-18 19:34:32 -08:00
Leonardo de Moura
edadd8c034
fix: fixes #1841
...
This commit adds the configuration option
`ApplyConfig.approx` (available in Lean 3), and sets it to true by
default like in Lean 3.
2022-11-16 14:46:05 -08:00
Leonardo de Moura
98922b878a
fix: fixes #1815
2022-11-15 17:08:54 -08:00
Leonardo de Moura
1b0c2f7157
feat: parameterize DiscrTree indicating whether non trivial reductions are allowed or not when indexing/retrieving terms
2022-11-15 16:47:12 -08:00
Leonardo de Moura
81c84bf045
feat: do not perform iota reduction at the discrimination tree module
2022-11-15 16:47:12 -08:00
Leonardo de Moura
1cc58e60ef
fix: fixes #1829
2022-11-15 08:31:36 -08:00
Leonardo de Moura
c3d86001c4
chore: simplify dependencies at MatchEqs
2022-11-11 05:51:05 -08:00
Leonardo de Moura
8030aed56e
fix: fixes #1814
...
Missing `hasAssignableMVar` checks.
2022-11-10 20:42:02 -08:00
Mario Carneiro
999b61007c
feat: tweak behavior of congrN to match lean 3 ( #1798 )
2022-11-04 06:55:13 -07:00
Mario Carneiro
ad1c23f172
fix: bug in replaceLocalDeclDefEq
...
fixes #1615
2022-11-01 19:18:25 -07:00
Leonardo de Moura
5f38a483f2
fix: congr tactic
...
`MVarId.congr?` and `MVarId.hcongr?` should return `none` if an
exception is thrown while applying congruence theorem.
`MVarId.hcongr?` should try `eq_of_heq` before trying to apply
`hcongr` theorem.
closes #1787
BTW: Lean 4 `congr` tactic is applying `assumption`. Lean 3 version does not.
2022-10-28 08:00:04 -07:00
Leonardo de Moura
279c34ff46
feat: add MVarId.eqOfHEq tactic
2022-10-28 07:52:45 -07:00
Leonardo de Moura
ad98df80fe
feat: congr theorems using Iff
...
closes #1763
2022-10-26 18:00:24 -07:00
Leonardo de Moura
0b6b754bca
feat: improve apply tactic
...
It tries to address what the Mathlib community calls the "apply bug".
cc @digama0
2022-10-26 16:58:43 -07:00
mcdoll
6cf9a63193
doc: fix typo ( #1775 )
...
equaal -> equal
2022-10-24 15:05:51 +02:00
David Renshaw
16320a297f
doc: fix some typos
...
Leah -> Lean
giveName -> givenName
2022-10-22 21:16:35 +02:00
Mario Carneiro
dd8bbe9367
fix: catch kernel exceptions in Kernel.{isDefEq, whnf}
...
fixes #1756
2022-10-20 05:38:29 -07:00
Mario Carneiro
583e023314
chore: snake-case attributes (part 2)
2022-10-19 09:28:08 -07:00