Leonardo de Moura
96a72d67f2
fix: avoid unnecessary dependencies at mkMatcher
...
fixes #1237
2022-06-23 10:21:32 -07:00
Leonardo de Moura
2a940dd4ae
feat: add Expr.collectFVars, LocalDecl.collectFVars, Pattern.collectFVars, and AltLHS.collectFVars
...
They are all in `MetaM`.
These are helper functions for issue #1237 . We need to "cleanup" the
local context before trying to compile the match-expression.
see issue #1237
2022-06-22 15:53:43 -07:00
Leonardo de Moura
bbc196eeb7
fix: make sure WF/Fix.lean tolerates MatcherApp.addArg? failures
...
see #1228
2022-06-17 17:37:33 -07:00
Leonardo de Moura
02c4e548df
feat: replace constant with opaque
2022-06-14 17:02:59 -07:00
Leonardo de Moura
77ae79be46
chore: use let/if in do blocks
2022-06-13 17:10:14 -07:00
Leonardo de Moura
fb574af873
fix: mkSplitterProof
...
This commit fixes the first issue reported at #1179
closes #1179
2022-06-12 19:38:54 -07:00
Leonardo de Moura
09d1530d8e
feat: detect unexpected occurrences of match-expression minor premises
...
The error message is far from perfect, but it is better than ignoring
the issue and failing later with an even more incomprehensible error
message.
see #1179
2022-06-12 12:07:42 -07:00
Leonardo de Moura
17db981880
fix: equation theorem for match with more than one "as" pattern
...
see #1195
see #1179
2022-06-10 18:23:13 -07:00
Leonardo de Moura
041827bed5
chore: unused variables
2022-06-07 17:54:10 -07:00
Sebastian Ullrich
8eefbf5227
chore: further clean up refactored code
2022-06-07 16:37:45 -07:00
Sebastian Ullrich
fb2a2b3de2
fix: fixup previous commit
2022-06-07 16:37:45 -07:00
Sebastian Ullrich
ae7b895f7a
refactor: unname some unused variables
2022-06-07 16:37:45 -07:00
Leonardo de Moura
2c5bafcbd8
fix: dead variables at match equation hypotheses
...
This commit addresses an issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Structural.20Recursion.20Problem/near/284238723
2022-05-28 16:09:35 -07:00
Leonardo de Moura
e26f86dd45
fix: improve simpH?, remove unnecessary hypotheses
2022-05-28 15:30:01 -07:00
Leonardo de Moura
2fc23a2a2b
feat: make sure we can use split to synthesize code
2022-05-23 11:55:57 -07:00
Leonardo de Moura
090503cfd5
chore: cleanup
2022-05-06 17:12:10 -07:00
Leonardo de Moura
cddf9ddd95
fix: forallAltTelescope heterogeneous equality support
2022-04-29 15:37:20 -07:00
Leonardo de Moura
c241ef61b1
fix: use HEq (if needed) for encoding h : discr equalities
2022-04-29 15:05:48 -07:00
Leonardo de Moura
351f0deae9
feat: add mkEqHEq
2022-04-29 14:31:36 -07:00
Leonardo de Moura
941ad84ece
fix: getMkMatcherInputInContext
2022-04-29 12:44:36 -07:00
Leonardo de Moura
d4d538cad8
fix: counterexample generation for new match encoding
2022-04-29 12:36:53 -07:00
Leonardo de Moura
6e1c51dd1a
feat: splitter proof for new match encoding
2022-04-29 12:19:24 -07:00
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
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
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
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
de2e2447d2
chore: style
2022-04-07 17:35:05 -07:00
Leonardo de Moura
a06cd40e29
feat: improve match expression support at simp
2022-03-28 17:17:01 -07:00
Leonardo de Moura
314bd3ae4c
fix: simpH? at match expression equation theorem generator
...
closes #1080
2022-03-28 12:48:54 -07:00
Leonardo de Moura
3d9e587862
fix: check type mismatch at dependent pattern matching compiler
...
see issue #1057
2022-03-21 09:28:02 -07:00
Leonardo de Moura
719db55a9c
chore: fix trace class
2022-03-17 13:22:16 -07:00
Leonardo de Moura
2b71bc84f3
perf: try injection before contradiction at mkSplitterProof
2022-03-15 05:37:10 -07:00
Leonardo de Moura
7ee7ca30b8
fix: index out of bounds
2022-03-15 05:16:19 -07:00
Leonardo de Moura
272dd5533f
chore: style use · instead of . for lambda dot notation
...
We are considering removing `.` as an alternative for `·` in the
lambda dot notation (e.g., `(·+·)`).
Reasons:
- `.` is not a perfect replacement for `·` (e.g., `(·.insert ·)`)
- `.` is too overloaded: `(f.x)` and `(f .x)` and `(f . x)`. We want to keep the first two.
2022-03-11 07:49:03 -08:00
Leonardo de Moura
52b53ab7a2
fix: heuristic for generating equation theorem types
...
closes #1026
2022-02-23 13:10:30 -08:00
Leonardo de Moura
4794b9709f
feat: improve equation theorem and match-splitter generation at MatchEqns.lean
2022-02-22 17:43:42 -08:00
Leonardo de Moura
c73d177c94
perf: simpH? at MatchEqns.lean
2022-02-21 12:04:03 -08:00
Leonardo de Moura
0e40c63292
chore: fix typo
2022-02-21 10:55:38 -08:00
Sebastian Ullrich
54522006f4
refactor: List.get: take Fin to align with Array.get
...
/cc @leodemoura
2022-02-15 18:41:22 +01:00
Leonardo de Moura
5baac1905f
fix: use private names for theorems that are created on demand
...
closes #1006
2022-02-07 13:16:22 -08:00
Leonardo de Moura
12e2a79170
chore: fix codebase after removing auto pure
2022-02-03 18:08:14 -08:00
Leonardo de Moura
cf3b8d4eb4
chore: cleanup
...
Make the code style more uniform.
We still have a lot of leftovers from the old frontend.
2022-01-26 09:18:17 -08:00
Leonardo de Moura
98407798af
fix: mkEquationsFor at Match/MatchEqs.lean
...
closes #974
2022-01-25 18:43:51 -08:00
Leonardo de Moura
d190d6dda4
fix: use default reducibility when proving equation theorems for definition
...
Addresses issue reported by @fpfu at #945
2022-01-20 08:23:51 -08:00