Commit graph

36377 commits

Author SHA1 Message Date
Leonardo de Moura
ddf12c91c2 fix: do not consider auxiliary declarations as local instances 2020-09-07 08:08:35 -07:00
Leonardo de Moura
36bc65385d chore: naming convention 2020-09-07 08:03:41 -07:00
Leonardo de Moura
79130bc3f9 feat: add addAndCompilePartial 2020-09-07 07:56:11 -07:00
Leonardo de Moura
f30b5bdcba chore: control code size explosion 2020-09-07 07:23:44 -07:00
Leonardo de Moura
81582e4482 feat: break PreDefinitions into strongly connected components 2020-09-06 14:22:06 -07:00
Leonardo de Moura
56e6b9b398 feat: add Tarjan's SCC 2020-09-06 14:19:59 -07:00
Leonardo de Moura
565d617bab chore: fix test 2020-09-06 08:57:33 -07:00
Leonardo de Moura
35a81e80d6 refactor: move PreDeclaration (now PreDefinition) to its own module 2020-09-06 08:54:38 -07:00
Leonardo de Moura
d0993d07a1 chore: rename Definition.lean => DefView.lean 2020-09-06 08:40:48 -07:00
Leonardo de Moura
6704468f07 feat: add coeId instance
Add an example showing why it is useful.

TODO: reconsider whether we should use the approximation described in
the new test or not.
2020-09-06 08:27:26 -07:00
Leonardo de Moura
d8855c2673 feat: elaborate all definitions using elabMutualDef 2020-09-06 07:23:47 -07:00
Leonardo de Moura
102d2ae57d fix: avoid unnecessary reduction
```lean
forallBoundedTelescope `(Nat -> IO Nat) 1 fun xs type => ...
```
should assign `IO Nat` to `type` instead of `IO.RealWorld -> ...`
2020-09-06 06:57:52 -07:00
Leonardo de Moura
dc60739bd6 feat: partition non recursive 2020-09-05 09:22:18 -07:00
Leonardo de Moura
3ae3c51a8c feat: add Array.partition 2020-09-05 08:48:15 -07:00
Leonardo de Moura
52aef7611a chore: fix val vs value naming convention 2020-09-05 08:38:37 -07:00
Leonardo de Moura
fbe18ee84c feat: addAndCompileNonRec 2020-09-05 08:32:56 -07:00
Leonardo de Moura
4e7ca37204 chore: use Lean version 2020-09-05 08:15:53 -07:00
Leonardo de Moura
61670a773a chore: update stage0 2020-09-05 08:04:32 -07:00
Leonardo de Moura
20c041b421 feat: mkUnsafeRecName and isUnsafeRecName? in Lean 2020-09-05 08:03:52 -07:00
Leonardo de Moura
91cedab090 feat: add addAndCompileAsUnsafe 2020-09-05 07:56:02 -07:00
Leonardo de Moura
9b788db91f feat: compute level parameters for mutually recursive definitions 2020-09-05 07:34:26 -07:00
Leonardo de Moura
0d39c00782 feat: modifiers for 'let rec's 2020-09-05 06:48:38 -07:00
Leonardo de Moura
19be535fb3 chore: add TODO 2020-09-04 19:29:54 -07:00
Leonardo de Moura
7e0395a3b0 fix: code is reachable 2020-09-04 19:14:51 -07:00
Leonardo de Moura
d089a25f0e chore: update stage0 2020-09-04 19:00:51 -07:00
Leonardo de Moura
250dc3e3a9 fix: adjust expanders and elaborators to new matchAlts node 2020-09-04 18:59:28 -07:00
Leonardo de Moura
8d72e4c1e8 chore: update stage0 2020-09-04 18:42:55 -07:00
Leonardo de Moura
7dc1b461fa chore: give a proper node to matchAlts 2020-09-04 18:42:09 -07:00
Leonardo de Moura
70c42456b9 feat: expand intro+matchAlts macro 2020-09-04 18:22:56 -07:00
Leonardo de Moura
68d7b9d40b chore: update stage0 2020-09-04 16:36:31 -07:00
Leonardo de Moura
a88b2be72a feat: add intro + funMatchAlts syntax 2020-09-04 16:32:53 -07:00
Leonardo de Moura
ef64e1c25a feat: fun+match macro
Example:
```
fun
  | 0 => true
  | _ => false
```
2020-09-04 16:23:01 -07:00
Leonardo de Moura
b2f932c4dc feat: lift let rec expressions nested in a mutual block 2020-09-04 15:40:58 -07:00
Leonardo de Moura
12f69a78b7 chore: change meaning of lambdaTelescope
`lambdaTelescope` now only consumes `lambda`s.
`lambdaLetTelescope` implements the old behavior.
2020-09-04 13:35:17 -07:00
Leonardo de Moura
0199e93079 chore: add Array.erase 2020-09-04 13:35:01 -07:00
Leonardo de Moura
3dbd2b728b feat: add Array.getMax? 2020-09-04 10:40:34 -07:00
Leonardo de Moura
a04fc631e0 doc: Closure.lean
@Kha I documented the new `Closure.lean` module, and tried to capture
the issues we discussed this morning.
Tomorrow, I will implement a similar procedure for "closing" all the
let-recs in a `mutual` block.
2020-09-03 18:06:30 -07:00
Leonardo de Moura
555a3f0dcf feat: new and improved mkAuxDefinition 2020-09-03 17:37:06 -07:00
Leonardo de Moura
f34fd3e6b4 refactor: move Closure.lean to Meta
We will need to improve the support for let-decls. We will use
the new `trackZeta`.
2020-09-03 11:54:08 -07:00
Leonardo de Moura
ad774ae397 feat: support for tracking which let-decls have been zeta expanded 2020-09-03 11:32:46 -07:00
Leonardo de Moura
5cc0dd75ec refactor: remove unnecessary abstraction 2020-09-03 10:16:56 -07:00
Leonardo de Moura
238c38fed9 feat: preserve nonDep flag at LocalDecl.ldecl 2020-09-03 09:08:59 -07:00
Leonardo de Moura
3ab19a1cc6 chore: update stage0 2020-09-03 08:50:37 -07:00
Leonardo de Moura
1480b39d86 chore: no Task in Theorem 2020-09-03 08:47:55 -07:00
Leonardo de Moura
0faaa5ac54 fix: use mkForallFVars and mkLambdaFVars 2020-09-03 08:33:16 -07:00
Leonardo de Moura
06c6002d45 feat: lift nested 'let-rec's 2020-09-02 18:53:18 -07:00
Leonardo de Moura
f2a6562eed feat: validate 'let rec' types 2020-09-02 17:02:40 -07:00
Leonardo de Moura
1afecc3fbf fix: applyAttributes at 'let rec' 2020-09-02 17:02:35 -07:00
Leonardo de Moura
9ffd1b1672 feat: filter unused variables in mutually recursive definitions 2020-09-02 17:02:35 -07:00
Leonardo de Moura
8aa5409bac feat: elaborate 'let rec'
Remark: the actual lift is going to be performed at `MutualDef.lean`.
2020-09-02 17:02:35 -07:00