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
Leonardo de Moura
2d01621aba
feat: add TagDeclarationExtension helper
2019-11-02 10:59:06 -07:00
Leonardo de Moura
1a5de2c184
feat: add reduceProjectionFn
...
This is code for reducing user-facing projections functions created by
the `structure` command.
2019-11-02 10:26:38 -07:00
Leonardo de Moura
2d65b2ba9f
feat: reduce Expr.proj
2019-11-01 17:07:38 -07:00
Leonardo de Moura
638ceebab4
feat: helper functions
2019-11-01 17:07:26 -07:00
Leonardo de Moura
36f2bc987e
chore: TypeInference ==> TypeUtil
2019-11-01 16:24:49 -07:00
Leonardo de Moura
b3bce21e3b
feat: use CPS
2019-11-01 16:22:55 -07:00
Leonardo de Moura
1631fbde37
feat: add support for reducing recursor applications
2019-11-01 10:27:39 -07:00
Leonardo de Moura
823221840a
feat: add matchConst helper function
2019-11-01 10:20:34 -07:00
Leonardo de Moura
68bbba365c
feat: add isQuotRecStuck
2019-11-01 10:03:46 -07:00
Leonardo de Moura
cc6a72b789
feat: add reduceQuotRecAux
2019-11-01 09:55:29 -07:00
Leonardo de Moura
431a5de2b0
chore: add helper functions
2019-11-01 09:55:08 -07:00
Leonardo de Moura
32fdea86d9
feat: add isRecStuck
2019-11-01 09:31:19 -07:00
Leonardo de Moura
39d777435c
feat: add reduceRec
2019-11-01 08:40:56 -07:00
Leonardo de Moura
b78ab05360
feat: add reduceRecAux for reducing recursor applications
2019-10-31 20:58:59 -07:00
Leonardo de Moura
a4c2e72f1c
feat: helper functions
2019-10-31 20:58:30 -07:00
Leonardo de Moura
fd167c3829
chore: use Level instead of Univ
2019-10-31 20:13:44 -07:00
Leonardo de Moura
cae045bce8
chore: add helper function
2019-10-31 20:12:22 -07:00
Leonardo de Moura
8c7f514a9d
feat: expose instantiateLevelParams
2019-10-31 20:12:08 -07:00
Leonardo de Moura
51ce321c7e
feat: whnf skeleton
2019-10-31 17:40:05 -07:00
Leonardo de Moura
1b541219c9
chore: add helper function
2019-10-31 17:38:16 -07:00
Leonardo de Moura
665e8b3f4b
chore: style
2019-10-31 11:34:34 -07:00
Leonardo de Moura
952a707732
chore: cleanup
2019-10-31 11:00:05 -07:00
Leonardo de Moura
2df2f6cf62
feat: add processPostponed
2019-10-31 10:52:41 -07:00
Leonardo de Moura
216e87e9a9
feat: add LBool
2019-10-30 19:30:08 -07:00
Leonardo de Moura
136b2c5171
fix: save updateLhs and updateRhs when postponing constraints
2019-10-30 19:29:21 -07:00
Leonardo de Moura
a7921e7013
feat: isDefEq for universe levels
2019-10-30 19:14:44 -07:00
Leonardo de Moura
e32402513d
feat: add hasAssignableLevelMVar
2019-10-30 18:23:30 -07:00
Leonardo de Moura
a9f3aa086d
feat: add Level.dec
2019-10-30 18:23:12 -07:00
Leonardo de Moura
ab88c312b5
chore: TypeContext => TypeInference
2019-10-30 15:51:37 -07:00
Leonardo de Moura
31767d025d
feat: improve AbstractMetavarContext interface
2019-10-30 15:02:33 -07:00
Leonardo de Moura
5f41cb69e4
feat: TmpMetavarContext
2019-10-30 14:56:01 -07:00
Leonardo de Moura
875d7657d9
feat: implement isEquiv in Lean
2019-10-30 14:55:40 -07:00
Leonardo de Moura
4d5d3133bd
feat: universe level helper functions
2019-10-30 13:19:08 -07:00
Leonardo de Moura
7ab79b8729
chore: missing instance
2019-10-28 19:48:27 -07:00
Leonardo de Moura
5878aa0471
fix: mkForallAux modifies mctx
2019-10-28 19:47:56 -07:00
Leonardo de Moura
6c252a3f08
doc: add extra comments
2019-10-28 19:05:50 -07:00
Leonardo de Moura
57c9fb7f91
feat: add AbstractMetavarContext.mkForall and AbstractMetavarContext.mkLambda
2019-10-28 17:25:46 -07:00