Leonardo de Moura
1dd8770b3a
feat: forallTelescope and forallTelescopeReducing
2019-11-09 21:10:12 -08:00
Leonardo de Moura
c62355e26b
feat: inferType for let expressions
2019-11-09 20:44:27 -08:00
Leonardo de Moura
cff9e4192d
feat: add inferLambdaType
2019-11-09 20:33:29 -08:00
Leonardo de Moura
c44517c876
chore: fix tests
2019-11-09 20:32:28 -08:00
Leonardo de Moura
00131b14f6
feat: add MetaM.mkForall and MetaM.mkLambda
2019-11-09 20:23:17 -08:00
Leonardo de Moura
981cd44eaa
feat: add lambdaTelescope
2019-11-09 20:20:18 -08:00
Daniel Selsam
f574cdf5e0
feat: fresh contexts for each new subgoal
2019-11-09 15:51:23 -08:00
Daniel Selsam
9ce13e93c9
feat: allow metas in intermediate tc answers
2019-11-09 15:49:39 -08:00
Daniel Selsam
0bab51b66e
feat: solve typeclass subgoals in reverse order
...
Some instance arguments may still need to be reversed.
2019-11-09 15:47:50 -08:00
Sebastian Ullrich
dac6f273b5
feat: simplistic linter framework
2019-11-09 15:43:37 -08:00
Leonardo de Moura
c33a1f977f
feat: ensure isClass unfolds only reducible constants
2019-11-09 14:02:11 -08:00
Leonardo de Moura
d72b22572d
feat: update vector of local instances
2019-11-09 13:49:27 -08:00
Leonardo de Moura
adcb9091ef
fix: avoid redundant let-decls
2019-11-09 12:32:31 -08:00
Leonardo de Moura
1e065d495b
feat: expose hasLooseBVar
2019-11-09 12:29:50 -08:00
Leonardo de Moura
3592f6d34d
chore: withCacheScope => savingCache
2019-11-09 12:17:46 -08:00
Leonardo de Moura
5d3b1f09d2
chore: add TODO
2019-11-09 12:07:09 -08:00
Leonardo de Moura
1eccb19401
feat: add inferForallType
2019-11-09 12:00:45 -08:00
Leonardo de Moura
d54880b6d1
feat: helper functions for debugging, handling metavars, creating telescopes, extract universe level from types, checking whether type is a class, and declaring locals
2019-11-09 11:37:32 -08:00
Leonardo de Moura
d10e08236f
feat: add finally
2019-11-09 07:28:12 -08:00
Leonardo de Moura
e5b77d4de8
feat: combine InferType and TypeUtil into Meta
2019-11-08 16:20:11 -08:00
Leonardo de Moura
d9fb5acb22
chore: use same approach we use for HashMap
2019-11-08 08:28:31 -08:00
Leonardo de Moura
90178cf923
chore: add helper functions
2019-11-08 08:28:31 -08:00
Leonardo de Moura
5c39ea7faa
feat: add InferProjType
2019-11-08 08:28:31 -08:00
Leonardo de Moura
a2cdf4494d
chore: add helper
2019-11-08 08:28:31 -08:00
Leonardo de Moura
2009068a53
feat: add getLooseBVarRange
2019-11-08 08:28:31 -08:00
Leonardo de Moura
f1847ef75f
feat: add inferType helper functions
2019-11-08 08:28:31 -08:00
Leonardo de Moura
54ce57fe26
feat: add instantiateRevRange
2019-11-08 08:28:31 -08:00
Leonardo de Moura
583923492c
chore: naming conventions
2019-11-07 10:40:26 -08:00
Leonardo de Moura
322f18f0c9
chore: WHNFUtil => WHNF
2019-11-07 10:25:58 -08:00
Daniel Selsam
f272f42c1f
fix: (throwaway) context was ignoring const levels
2019-11-07 10:21:24 -08:00
Leonardo de Moura
91e87a0cd4
feat: add reference implementation for whnf
2019-11-07 10:20:15 -08:00
Leonardo de Moura
e020cd2ea0
refactor: parametrize over getConst : Name -> m (Option (ConstantInfo)) instead of env : Environment
...
Motivation: when instatiating these templates, we can make definitions
opaque by returning `none` at `getConst`.
2019-11-07 10:20:15 -08:00
Leonardo de Moura
a087aea871
chore: remove special support for user-facing projection functions
...
We now have kernel projections, and user-facing projection functions
are defined using them. So, we don't need special support anymore for
them. They are just regular functions in Lean4.
2019-11-07 10:20:15 -08:00
Leonardo de Moura
05c125c938
chore: remove dead code
2019-11-07 10:20:15 -08:00
Leonardo de Moura
65d14ed1d3
feat: add smart unfolding
2019-11-07 10:20:15 -08:00
Leonardo de Moura
cbf09b44ea
feat: add getStuckMVar
2019-11-07 10:20:14 -08:00
Leonardo de Moura
3faa033705
refactor: add parametric whnfCore
...
Motivation: `WHNFUtil` will provide a parametric implementation for
WHNF. We will use it to implement `TypeUtil` and `matchPattern`.
2019-11-07 10:20:14 -08:00
Leonardo de Moura
eeb865c97c
chore: merge QuotUtil and InductiveUtil into WHNFUtil
2019-11-07 10:20:14 -08:00
Leonardo de Moura
2a53597035
doc: new MetavarContext requirements and design
2019-11-06 10:03:04 -08:00
Leonardo de Moura
e844a5be74
feat: simplify MetavarContext
...
Remove `AbstractMetavarContext` and `TmpMetavarContext`.
Disable `TypeUtil` until we decide this is the right design.
Using very simple approach:
- No distinction betwen temporary and regular metavariables.
- Metavariables have a `depth` Nat field.
- MetavarContext also has a `depth` field.
- We bump the `MetavarContext` depth when we create a nested problem.
Example: Elaborator (depth = 0) -> Simplifier matcher (depth = 1) -> TC (level = 2) -> TC (level = 3) -> ...
- When MetavarContext is at depth N, isDefEq does not assign variables from depth < N.
- Metavariables from depth N+1 must be fully assigned before we return to level N.
- New design even allows us to invoke tactics from TC.
cc @dselsam
2019-11-05 18:44:33 -08:00
Leonardo de Moura
c3e9ac73e2
refactor: default ==> arbitrary
...
Make sure it is opaque, and avoid `irreducible`
2019-11-05 14:42:42 -08:00
Leonardo de Moura
06fe9d3afa
refactor: EState ==> EStateM
2019-11-05 09:05:10 -08:00
Leonardo de Moura
5bb5ef6296
refactor: State ==> StateM
2019-11-05 07:56:19 -08:00
Leonardo de Moura
cb554d6473
chore: remove unnecessary configuration option
2019-11-04 05:32:45 -08:00
Leonardo de Moura
cf17fbb8e9
chore: missing @[specialize]
2019-11-04 03:59:39 -08:00
Leonardo de Moura
1bf1290570
feat: use kernel projections in constructions
...
Motivation: auxiliary recursors such as `brecOn` do not depend on
user-facing projection definitions anymore.
Thus, we can simplify `whnfCore` at `TypeUtil`.
2019-11-04 03:38:57 -08:00
Leonardo de Moura
4cfa4f0e9c
feat: add temporary hack
...
`mutual` + `partial` doesn't work yet.
2019-11-03 15:35:15 -08:00
Leonardo de Moura
b181ee5a4c
chore: typos
2019-11-02 14:45:17 -07:00
Leonardo de Moura
146aa71886
feat: reduce auxiliary recursors
2019-11-02 14:38:24 -07:00
Leonardo de Moura
359a78b902
feat: aux recursor extension in Lean
2019-11-02 11:24:52 -07:00