Commit graph

73 commits

Author SHA1 Message Date
Leonardo de Moura
8a7edf03ca feat: add commitWhenSome? 2020-08-16 10:55:15 -07:00
Leonardo de Moura
655104d8df fix: use constructor transition when we have an empty set of alternatives 2020-08-16 08:25:38 -07:00
Leonardo de Moura
bb261c51a6 fix: isDefEqQuick 2020-08-15 13:24:43 -07:00
Leonardo de Moura
0be9516bd8 fix: instantiate metavariables in alternative local decls 2020-08-15 08:18:00 -07:00
Leonardo de Moura
63c4ee0acf chore: cleanup 2020-08-15 08:07:46 -07:00
Leonardo de Moura
7eed45dd45 fix: generalize isNatValueTransition 2020-08-15 07:59:31 -07:00
Leonardo de Moura
6e958d6208 refactor: cleanup 2020-08-15 07:55:44 -07:00
Leonardo de Moura
4223bdf8aa feat: add expandNatValuePattern 2020-08-15 07:26:22 -07:00
Leonardo de Moura
5d56cc5505 refactor: DepElim
We go back to the original approach where we pattern matching
alternative variables as `FVar`s.
We fix the original problem we had by implementing a simple
unification procedure for alternative `FVar`s.
2020-08-14 19:03:22 -07:00
Leonardo de Moura
87d506cb90 feat: instantiate metavariables in LocalDecls 2020-08-14 19:02:38 -07:00
Leonardo de Moura
00d46e4a7d chore: preparing to refactor DepElim 2020-08-14 19:02:20 -07:00
Leonardo de Moura
c5316d5cf3 fix: missing withMVarContext 2020-08-14 12:52:51 -07:00
Leonardo de Moura
50abd28f6e feat: generalize "constructor transition" 2020-08-14 12:38:43 -07:00
Leonardo de Moura
e2109ceab6 fix: missing substitution
We should include the `majorFVarId -> ctor-application` substitution
in each subgoal.
2020-08-14 12:38:00 -07:00
Leonardo de Moura
b3894200f0 feat: expose constructorApp? and isConstructorApp? 2020-08-14 12:37:34 -07:00
Leonardo de Moura
8e81c19162 fix: combine "complete" and constructor transitions 2020-08-14 10:50:48 -07:00
Leonardo de Moura
54f6517ca3 fix: condition for using simple casesOn 2020-08-14 10:50:48 -07:00
Leonardo de Moura
2ba4f02de9 chore: move code to testing part 2020-08-13 16:01:52 -07:00
Leonardo de Moura
24025b96c5 feat: elaborate equation RHS 2020-08-13 15:19:40 -07:00
Leonardo de Moura
8b0a100e21 chore: field name 2020-08-13 14:59:28 -07:00
Leonardo de Moura
145a3dddca chore: remove ref from patterns
We don't use them to report errors. We only need `ref` at `Alt`
2020-08-13 12:31:32 -07:00
Leonardo de Moura
f924b481c2 chore: simplify mkElim interface 2020-08-12 16:34:43 -07:00
Leonardo de Moura
57533726f6 feat: add mkFreshExprMVarWithId 2020-08-12 10:35:38 -07:00
Leonardo de Moura
c8ab63ea75 feat: mark auxiliary eliminators as [inline] 2020-08-10 09:41:55 -07:00
Leonardo de Moura
43317d5598 fix: nullary minor premises must be thunks 2020-08-08 16:23:50 -07:00
Leonardo de Moura
d2206dcab2 feat: as-patterns x@pattern 2020-08-08 16:12:44 -07:00
Leonardo de Moura
0ca83699d7 fix: array literal support at DepElim 2020-08-08 15:21:35 -07:00
Leonardo de Moura
0fa404ead2 feat: add support for array literals in the pattern matching compiler 2020-08-07 17:13:15 -07:00
Leonardo de Moura
e1be008516 feat: add caseArraySizes
An auxiliary tactic for pattern matching array literals.
2020-08-07 16:04:57 -07:00
Leonardo de Moura
b624fa78d7 fix: another subst issue 2020-08-07 16:04:01 -07:00
Leonardo de Moura
6b18f486d1 feat: add mkLt and mkLe 2020-08-07 14:47:11 -07:00
Leonardo de Moura
3b0ec1b20a feat: add mkDecideProof 2020-08-07 13:48:37 -07:00
Leonardo de Moura
77e51306c5 fix: missing substitution 2020-08-07 13:37:38 -07:00
Leonardo de Moura
c59fda4c19 feat: add assertExt 2020-08-07 12:06:53 -07:00
Leonardo de Moura
feda5e746f chore: improve error message 2020-08-07 11:50:08 -07:00
Leonardo de Moura
57ac1751cb feat: expose mkElimCore
`mkElimCore` allows caller to pick the motive.
2020-08-07 06:41:47 -07:00
Leonardo de Moura
aa972878d8 feat: add processValue 2020-08-06 16:34:37 -07:00
Leonardo de Moura
fd9be5e8ae feat: add caseValues tactic
It is an auxiliary tactic for compiling pattern matching.
2020-08-06 15:37:00 -07:00
Leonardo de Moura
e423533bca chore: improve DepElim trace messages 2020-08-06 11:02:57 -07:00
Leonardo de Moura
d09eb82c4c feat: add Meta.EqnCompiler trace class 2020-08-06 10:47:26 -07:00
Leonardo de Moura
7342cab0e5 feat: add (ref : Syntax) to Meta.Exception.tactic
cc @Kha
2020-08-06 10:14:32 -07:00
Leonardo de Moura
b1023872b3 refactor: MVarSubst => MVarRenaming 2020-08-06 09:49:42 -07:00
Leonardo de Moura
f934a86646 feat: add (ref : Syntax) to Meta.Exception.other
@Kha The Syntax is here just to provide possition information. The
goal is to improve error message location information in code such as `DepElim`.
2020-08-06 09:40:16 -07:00
Sebastian Ullrich
b6b5f4c9c9 refactor: move whnf-eval functions into Lean.Meta.ReduceEval 2020-08-06 09:27:12 -07:00
Leonardo de Moura
e818368c96 refactor: move EqnCompiler to Meta folder 2020-08-06 09:10:01 -07:00
Leonardo de Moura
eb32fec77e feat: add admit tactic 2020-08-05 15:33:49 -07:00
Leonardo de Moura
b3dcd35661 fix: bugs at cases tactic 2020-08-05 09:44:26 -07:00
Leonardo de Moura
a70962854e chore: mark TODO 2020-08-04 18:50:53 -07:00
Leonardo de Moura
6be71b337f refactor: add prototype2.lean 2020-08-04 18:35:11 -07:00
Leonardo de Moura
943446f1b3 fix: FVarSubst must be a mapping from FVarId to Expr
Reason: `subst` tactic must store the `x |-> e` when substituting `x`
with `e`.
2020-08-04 13:06:08 -07:00