Leonardo de Moura
3a369938c8
feat: simpLambda
2021-01-01 09:52:01 -08:00
Leonardo de Moura
27f532c3bb
chore: cleanup
...
`AppBuilder.lean` was still using the "manual auto-lifting" approach.
2021-01-01 09:16:48 -08:00
Leonardo de Moura
59762b727e
refactor: move pre and fuel check to simpLoop
2021-01-01 09:01:39 -08:00
Leonardo de Moura
b756562d4a
feat: simp beta/proj/recursor/matcher
2021-01-01 08:29:21 -08:00
Leonardo de Moura
8d83e71c5e
refactor: use tail recursion at simp loop
2021-01-01 05:59:10 -08:00
Leonardo de Moura
4a06057410
feat: simp
2020-12-31 15:44:18 -08:00
Leonardo de Moura
e2c8b1694b
feat: improve subst
2020-12-31 10:54:55 -08:00
Leonardo de Moura
698908584b
fix: revert
2020-12-31 09:47:05 -08:00
Leonardo de Moura
90428cc09b
feat: expand let-decls at decide!
2020-12-31 09:47:05 -08:00
Leonardo de Moura
bdd0eae625
chore: missing ) in trace message
2020-12-30 20:20:57 -08:00
Leonardo de Moura
a32c45a515
feat: simp infrastructure
2020-12-30 18:00:04 -08:00
Leonardo de Moura
34f6f8ef5d
feat: pre/post simp lemmas
2020-12-30 13:46:14 -08:00
Leonardo de Moura
03cc69f1db
feat: track permutation simp lemmas
2020-12-30 13:46:14 -08:00
Leonardo de Moura
39e374e7cd
fix: improve error message at invalid match-expr
...
The location is not perfect because we only have a `ref` for the whole alternative.
2020-12-29 14:21:02 -08:00
Leonardo de Moura
64f7af9da5
feat: add SimpM
2020-12-29 14:21:02 -08:00
Leonardo de Moura
479da7b914
feat: elaborate noindex! annotation
2020-12-28 17:49:54 -08:00
Leonardo de Moura
7165d50c93
feat: simp lemmas of the form not p
2020-12-28 17:03:32 -08:00
Leonardo de Moura
944cc567d0
chore: cleanup
...
Document why we have `shouldAddAsStar`.
2020-12-28 16:41:00 -08:00
Leonardo de Moura
a58b799bd6
chore: add instances for debugging purposes
2020-12-28 16:34:02 -08:00
Leonardo de Moura
01b6f4f06b
fix: incorrect shadowing of let mut variable
2020-12-28 15:52:11 -08:00
Leonardo de Moura
95ba7b59e8
fix: construct key before validateHint
...
`validateHint` may assign metavariables
2020-12-28 15:40:20 -08:00
Leonardo de Moura
9611e2d84e
feat: add simp attribute
2020-12-28 08:20:28 -08:00
Leonardo de Moura
b855d79718
feat: filter "failed to synthesize ..." errors when there are other errors
2020-12-25 10:03:42 -08:00
Leonardo de Moura
0ca1c13a5d
fix: bugs at ExprDefEq
2020-12-23 17:58:54 -08:00
Leonardo de Moura
78aa3d8e72
chore: use deriving BEq
2020-12-22 18:10:20 -08:00
Leonardo de Moura
4fc06bfcca
feat: add optional (priority := <prio>) to instance command
2020-12-21 10:02:12 -08:00
Leonardo de Moura
498dae8fab
chore: add trace messages
2020-12-19 12:26:37 -08:00
Leonardo de Moura
6133e5de43
chore: make sure subst is a "noop" if there is nothing to substitute
2020-12-17 17:30:23 -08:00
Leonardo de Moura
9736ea55f5
chore: cleanup
2020-12-17 17:30:23 -08:00
Leonardo de Moura
c428e4feaa
fix: bug at injection
2020-12-17 17:30:23 -08:00
Leonardo de Moura
87b6385bea
feat: add deriving DecidableEq
2020-12-17 17:30:23 -08:00
Leonardo de Moura
c7ae8354fd
feat: improve type mismatch error messages
...
Use heuristic to automatically annotate terms with `pp.explicit`.
2020-12-17 07:11:52 -08:00
Leonardo de Moura
7c865e7bd9
feat: sort instances by priority
2020-12-16 10:45:27 -08:00
Leonardo de Moura
0fa262bb93
feat: add priority to InstanceEntry
2020-12-16 10:40:58 -08:00
Leonardo de Moura
ed87480093
refactor: move to attr syntax category
2020-12-15 20:22:04 -08:00
Leonardo de Moura
469c9b7bbf
chore: remove TODO
2020-12-14 11:50:22 -08:00
Leonardo de Moura
f345c8c708
feat: add betaReduce
2020-12-13 15:49:22 -08:00
Leonardo de Moura
04a07c15b9
chore: use deriving Inhabited
2020-12-13 11:57:59 -08:00
Leonardo de Moura
3b6d65c3c3
chore: use deriving Inhabited
2020-12-13 10:09:20 -08:00
Leonardo de Moura
25ecc43a84
fix: missing try at isClass?
2020-12-09 15:19:49 -08:00
Leonardo de Moura
63ab55289e
chore: remove "liftable methods"
...
The new frontend "auto lifting" feature makes them obsolete.
2020-12-09 15:06:07 -08:00
Leonardo de Moura
7a4b544b1c
feat: improve application type mismatch error message
...
If the type error is at an implicit argument, we annotate
application with `pp.explicit := true`
Given the type incorrect definition
```
def f {a b c : α} : a = c :=
Eq.trans (a := a) (b := b = c)
```
We now generate the error
```
error: application type mismatch
@Eq.trans α a (b = c)
argument
b = c
has type
Prop
but is expected to have type
α
```
@Kha Note that we only enable `pp.explicit := true` for the relevant
application. That is, we set `pp.explicit := false` for each children.
Unfortunately, there is a corner case.
```
set_option pp.explicit true
def f {a b c : α} : a = c :=
Eq.trans (a := a) (b := b = c)
```
produces the error
```
error: application type mismatch
@Eq.trans α a (b = c)
argument
@Eq α b c
has type
Prop
but is expected to have type
α
```
The reset `pp.explicit := false` overwrote the user option.
I think the simplest solution is the following
1- The delaborator saves the initial set of Options `Init`
2- When it finds a node annotated with a `pp` options, it only
consider the option if it is not set by `Init`.
What do you think?
2020-12-09 13:58:08 -08:00
Leonardo de Moura
9a422ddc23
fix: Array.back on empty array
2020-12-08 12:21:01 -08:00
Leonardo de Moura
ae5aa51712
chore: add explicit discard
2020-12-08 06:18:18 -08:00
Leonardo de Moura
cbf2b6c0db
feat: change synthinstance threshold
...
Before this commit, the threshold was the amount of "fuel".
Now, it is the maximum number of instances used to solve a TC problem.
We have two thresholds
- `maxInstSize`: default 128
- `maxCoeSize`: default 16. It is similar to `maxInstSize`, but used for automatic coercions.
cc @Kha
2020-12-07 10:45:08 -08:00
Leonardo de Moura
6af3eac142
feat: add MonadStateCacheT based on StateT
2020-12-06 19:07:28 -08:00
Leonardo de Moura
906cb81319
feat: improve inferAppType
...
See comment at `Expr.instantiateRevRange`
2020-12-06 19:01:23 -08:00
Leonardo de Moura
265b7571b4
chore: change checkCache type
2020-12-06 16:24:51 -08:00
Leonardo de Moura
1aaf7c0778
feat: add SimpleScopedEnvExtension
...
`ParserExtension` will probably be the only case where we need the
general case.
2020-12-05 16:38:35 -08:00
Leonardo de Moura
f0372f724c
chore: remove unused attribute
2020-12-05 16:28:58 -08:00