Leonardo de Moura
89441aac2a
feat: match equation theorem generation for new h : discr notation encoding
...
TODO: splitter theorem generation still needs to be fixed.
2022-04-29 11:48:25 -07:00
Leonardo de Moura
eac83586c6
chore: remove leftover
2022-04-29 09:10:27 -07:00
Leonardo de Moura
c959c80310
chore: reset local context at correct place
2022-04-29 09:08:44 -07:00
Leonardo de Moura
8d9626dab7
feat: delaborate match h : d with ...
2022-04-29 07:17:46 -07:00
Leonardo de Moura
0f7754847d
chore: style
2022-04-29 07:17:46 -07:00
Leonardo de Moura
7a369848a0
feat: new mkMatcher
...
TODO: adjust match elaborator
2022-04-29 07:17:46 -07:00
Leonardo de Moura
f4b4b14797
refactor: prepare to handle match h: notation at Meta\Match\Match.lean
2022-04-29 07:17:46 -07:00
Leonardo de Moura
6af1da450e
feat: disable only eta for classes during TC resolution
...
closes #1123
2022-04-26 08:20:39 -07:00
Leonardo de Moura
6bc5433b17
fix: add support for heterogeneous equality at processGenDiseq
2022-04-25 16:56:03 -07:00
Leonardo de Moura
3ad8dcb7ff
fix: nasty interaction between TC resolution and Eta for structures
...
See
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/.60constructor.60.20and.20.60Applicative.60/near/279984801
2022-04-24 08:19:29 -07:00
Leonardo de Moura
47b379e1bc
feat: dsimp! tactic
2022-04-23 18:41:04 -07:00
Leonardo de Moura
342a26a023
feat: dsimp tactic
2022-04-23 18:05:18 -07:00
Leonardo de Moura
13bcbe91cd
fix: regression reported at issue #1113
...
see issue #1113
2022-04-23 15:39:04 -07:00
Leonardo de Moura
36fad4bba0
fix: do not assign metavariables in the major premise type when trying K
2022-04-23 07:31:51 -07:00
Leonardo de Moura
875bf9bf34
fix: apply dsimp at lambda binders
...
This fixes another regression reported at #1113
2022-04-22 13:10:21 -07:00
Leonardo de Moura
c13ed7c0de
fix: regression reported at #1113
...
See #1113
2022-04-22 11:43:58 -07:00
Leonardo de Moura
d1f10a2e71
feat: apply rfl theorems at dsimp
...
closes #1113
2022-04-21 16:26:57 -07:00
Leonardo de Moura
2a0dc1804b
feat: improve isRflProof and isRflTheorem
...
The `Eq.symm` of a `rfl` theorem is a `rfl` theorem, the application
of `rfl` theorem too.
2022-04-21 15:40:38 -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
da33347e9d
fix: use defauld reducibility setting at mkImpDepCongrCtx and mkImpCongrCtx
2022-04-21 14:55:29 -07:00
Leonardo de Moura
f891c5724d
feat: track rfl simp theorems
...
See issue #1113
We need update stage0 before closing the issue.
2022-04-21 13:42:04 -07:00
Leonardo de Moura
73076b855c
fix: bug at processGenDiseq
2022-04-20 10:46:05 -07:00
Leonardo de Moura
4a18679c92
chore: include problematic match auxiliary declaration name in the error message
2022-04-20 10:46:05 -07:00
Leonardo de Moura
4848ad4869
feat: implement autoUnfold at simp
...
Right now, it only supports the following kind of definitions
- Recursive definitions that support smart unfolding.
- Non-recursive definitions where the body is a match-expression. This
kind of definition is only unfolded if the match can be reduced.
2022-04-18 16:51:52 -07:00
Leonardo de Moura
3bdb385c19
fix: make sure "eta for structures" in the elaborator uses projection functions if available
2022-04-11 19:23:10 -07:00
Leonardo de Moura
1add9b814b
chore: style
2022-04-11 18:48:09 -07:00
Leonardo de Moura
e49179c807
fix: simp at local declaration should not create an auxiliary declaration when result is definitionally equal
2022-04-11 07:54:15 -07:00
Leonardo de Moura
fb64a4ccc0
fix: unfold should not create an auxiliary declaration when result is definitionally equal
...
This commit fixes an issue reported on Zulip
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Unfolding.20the.20type.20of.20a.20variable.20creates.20a.20new.20variable
2022-04-11 07:54:15 -07:00
Leonardo de Moura
4374ec4ad8
perf: use Kernel isDefEq for ground terms
...
`state8.lean` now takes 0.29s. It was 0.37s.
2022-04-09 12:24:20 -07:00
Leonardo de Moura
4dd2b26e06
fix: rfl error message and corner case
...
The new `rfl` slightly improves the performance for `rfl` proofs of
ground terms.
Example: `state8.lean` now takes 0.37s. It was 0.52s.
2022-04-09 12:08:04 -07:00
Leonardo de Moura
03f6b87647
feat: add hand-written rfl tactic
...
It requires update stage0
2022-04-09 11:57:27 -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
6e02514eee
chore: style
2022-04-09 10:27:31 -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
152eff5cea
chore: missing double ticks
2022-04-08 15:01:57 -07:00
Leonardo de Moura
5d8b4f33c0
feat: improve binder names introduced by the match discriminant refinement feature
2022-04-08 06:49:09 -07:00
Leonardo de Moura
099fba43d3
chore: remove trace[Meta.debug] leftovers
2022-04-08 06:49:09 -07:00
Leonardo de Moura
de2e2447d2
chore: style
2022-04-07 17:35:05 -07:00
Leonardo de Moura
dcb88d969a
feat: improve auto implicit binder names in definitions/theorems
2022-04-07 14:46:59 -07:00
Leonardo de Moura
cd0d7e676f
chore: rename renameMVar => setMVarUserName
2022-04-07 13:50:58 -07:00
Leonardo de Moura
c26e968c24
chore: style
2022-04-07 11:25:45 -07:00
Leonardo de Moura
fa9b0f6c7e
feat: remove space before propositions with inaccessible names
2022-04-07 07:54:50 -07:00
Leonardo de Moura
9fe5458077
feat: do not display inaccessible proposition names if they do not have forward dependencies
...
Even if `pp.inaccessibleNames = true`
2022-04-02 13:15:17 -07:00
Leonardo de Moura
4a0f68de83
fix: split tactic issue
2022-04-01 15:47:24 -07:00
Leonardo de Moura
ea8f31144e
feat: add predicate to generalize tactic to select subterms to be generalized
2022-04-01 15:47:24 -07:00
Leonardo de Moura
d21e62ecb7
refactor: custom simpMatch for WF module
...
It is just the skeleton right now.
2022-03-31 14:51:07 -07:00
Leonardo de Moura
46ce3013d0
feat: cleanup local context before elaborating match alternatives RHS
2022-03-29 18:52:07 -07:00
Leonardo de Moura
d1e4712038
fix: smart unfolding
...
See new comment to understand the issue.
closes #1081
2022-03-29 15:49:14 -07:00
Leonardo de Moura
a06cd40e29
feat: improve match expression support at simp
2022-03-28 17:17:01 -07:00
Leonardo de Moura
3c964f3b9f
feat: substitute auxiliary equations introduced by the split tactic
2022-03-28 14:29:28 -07:00