Commit graph

611 commits

Author SHA1 Message Date
Leonardo de Moura
3ecf8ac8ec feat(library/init/data/persistentarray/basic): add mfoldlFrom and foldlFrom 2019-08-05 07:41:41 -07:00
Leonardo de Moura
af46e36266 fix(library/init/data/persistentarray/basic): universes 2019-08-04 13:00:32 -07:00
Leonardo de Moura
2a58e58480 feat(library/init/data/persistentarray/basic): add mfind and mfindRev 2019-08-04 12:30:12 -07:00
Leonardo de Moura
4bd347de3a feat(library/init/data/persistentarray/basic): PersistentArray.pop 2019-08-04 11:50:05 -07:00
Leonardo de Moura
f55a00a022 feat(library/init/lean): add LocalContext 2019-08-04 09:29:05 -07:00
Leonardo de Moura
84c4637722 fix(library/init/data/array/basic): fix and rename eraseIdxSz ==> eraseIdx' 2019-08-02 14:06:35 -07:00
Leonardo de Moura
0a86911bd0 fix(library/init/data/persistenthashmap/basic): isUnaryNode 2019-08-02 13:59:31 -07:00
Leonardo de Moura
3c5a30649d feat(library/init/data/persistenthashmap/basic): add PersistentHashMap.erase 2019-08-02 13:31:29 -07:00
Leonardo de Moura
69bca3ad42 feat(library/init/data/array/basic): add version of Array.indexOf with property about resulting size 2019-08-02 13:31:29 -07:00
Leonardo de Moura
19e341cfcc feat(library/init/data/array/basic): add Array.indexOf and Array.eraseIdx 2019-08-02 13:31:29 -07:00
Leonardo de Moura
c371b43970 feat(library/init/data): add PersistentHashMap 2019-08-02 13:31:29 -07:00
Leonardo de Moura
8a4bc188c2 feat(library/init/data): add BinomialHeap 2019-07-31 15:13:00 -07:00
Leonardo de Moura
906272d7e9 feat(library/init/data/list/basic): add eraseIdx 2019-07-31 15:04:43 -07:00
Leonardo de Moura
2ddc797f65 feat(library/init/system/filepath): add dirName 2019-07-26 14:53:54 -07:00
Leonardo de Moura
ff88c35fc1 refactor(library/init): move io and platform to system subdir 2019-07-25 17:29:33 -07:00
Leonardo de Moura
f6d3fc881d feat(library/init): add platform.cpp 2019-07-25 17:19:50 -07:00
Leonardo de Moura
8b0730ef7d feat(library/init/data/list/basic): eraseDups 2019-07-22 18:12:03 -07:00
Leonardo de Moura
86d7904ea7 chore(library/init/data/nat/basic): avoid empty set of equations 2019-07-16 13:13:04 -07:00
Leonardo de Moura
ec49741ebc feat(library/init/data/option/basic): add HasBeq (Option a) instance 2019-07-16 07:50:10 -07:00
Leonardo de Moura
b2e1ff8b3e feat(library/init): use new "empty match" syntax 2019-07-15 16:25:14 -07:00
Rob Dockins
a9ebf23fab fix(libraray/init/data): generalize universe variables in array and persistent array operations
This change allows the monadic traversal operations on arrays to use monads that
are defined to raise universe levels.  This happens, for example, when defining
monads using certain continuation-passing idioms.
2019-07-11 17:52:04 -07:00
Leonardo de Moura
7c53be5df7 chore(library/init): remove remaining set notation 2019-07-11 10:31:25 -07:00
Leonardo de Moura
295cabed2e chore(library/init): remove unnecessary notations 2019-07-11 10:27:16 -07:00
Leonardo de Moura
1a81d60820 chore(frontends/lean/parser): simplify binder notation
The `<ident> : <expr>` now requires explicit brackets.
2019-07-08 08:54:19 -07:00
Leonardo de Moura
9d5b0fd309 feat(library/init/data/array/basic): add findRev 2019-07-05 15:51:25 -07:00
Leonardo de Moura
ea6eee516b chore(frontends/lean): use => instead of := in match-expressions
Motivation: use same separator used in lambda expressions as in
other programming languages.
2019-07-04 11:38:38 -07:00
Leonardo de Moura
07cff06b6e chore(library): Π ==> 2019-07-02 17:35:15 -07:00
Leonardo de Moura
0bee94886e feat(frontends/lean/builtin_exprs): , from ==> from, and cleanup suffices 2019-07-02 17:22:50 -07:00
Leonardo de Moura
7ba9a5012a chore(frontends/lean/builtin_exprs): make sure have-expression is consistent with let-expression 2019-07-02 16:46:51 -07:00
Leonardo de Moura
a02443d23d chore(frontends/lean): fun x, e ==> fun x => e 2019-07-02 13:22:11 -07:00
Leonardo de Moura
e29bf35d15 chore(frontends/lean/builtin_exprs): remove hard coded (::) notation 2019-07-02 11:01:05 -07:00
Leonardo de Moura
39221adcd6 chore(frontends/lean/builtin_exprs): remove assume notation 2019-07-02 10:40:07 -07:00
Leonardo de Moura
300414e6e4 chore(frontends/lean): change explicit universe parameter notation in declarations 2019-07-02 08:57:08 -07:00
Leonardo de Moura
6841e47aa4 chore(frontends/lean/builtin_exprs): remove support for (<infix>) and (<infix> <expr>) notations
In Lean 4, we will support the more general

`a + ·` ==> `fun x, a + x`
`· + b` ==> `fun x, x + b`
`· + ·` ==> `fun x y, x + y`
`f · y` ==> `fun x, f a y`
`g · · b` ==> `fun x y, g x y b`
2019-07-02 08:06:06 -07:00
Leonardo de Moura
91e1d30cf8 feat(frontends/lean/builtin_exprs): use ; in do-notation 2019-06-27 18:00:43 -07:00
Leonardo de Moura
ab487ea4ac feat(frontends/lean): allow ; instead of in in let-decls 2019-06-27 17:12:03 -07:00
Leonardo de Moura
315851c4e4 chore(library/init/data): style 2019-06-27 16:45:27 -07:00
Leonardo de Moura
e00dc873a8 chore(library/pattern_attribute): [pattern] ==> [matchPattern] 2019-06-26 11:26:49 -07:00
Leonardo de Moura
af2d6dbd45 chore(library/init): avoid local attribute 2019-06-24 15:48:11 -07:00
Leonardo de Moura
94bca2b9d8 chore(library/init): mimize use of notations 2019-06-24 15:48:11 -07:00
Leonardo de Moura
dda0e38802 chore(library/init): avoid local notation 2019-06-24 15:48:11 -07:00
Leonardo de Moura
9e73d92e42 chore(library/init): remove instances of scoped notation 2019-06-20 14:08:35 -07:00
Leonardo de Moura
1e30f76511 chore(frontends/lean/pp): remove ppAsAnonymousCtor attribute 2019-06-20 11:03:20 -07:00
Leonardo de Moura
1658be20f1 feat(library/init/data/string): add String.isPrefixOf 2019-06-06 14:20:50 -07:00
Leonardo de Moura
67a4ebbde6 feat(library/init/lean/attributes): low level attribute registration, and frontend attribute actions
Remark: the attribute actions used by the frontend are all in IO.
These actions access attributes by name, and need access to the IO.ref
that contains all registered attributes in the system.
2019-06-05 09:15:35 -07:00
Leonardo de Moura
83e4c63d27 feat(library/init/data/persistentarray/basic): add PersistentArray.modify 2019-06-04 10:40:46 -07:00
Leonardo de Moura
30a6a2ade8 feat(library/init/data, runtime): remove parray support from runtime, and implement them in Lean using Scala/Clojure Radix trees
The Scala/Clojure approach for persistent arrays works great with our
`reset/reuse`. We seem to be much more efficient than their
implementations because of `reset/reuse`. The new approach also seems
better than the old one implemented in the runtime, and has a few
advantages:
1- The reroot procedure used in the old approach required
synchronization for multi-threaded code, or we would need to perform
deep copies when sending `parray` objects between threads.
2- We don't need any runtime extension for the new approach.
3- The old approach used "trail lists" for undoing array updates.
This works well for bactracking search use cases, but it is bad
in use cases where we are simultaneously updating the persistent
arrays that have shared nodes.
2019-06-02 09:18:19 -07:00
Leonardo de Moura
3251f1c75b feat(library/init/data/uint): add shift_left and shift_right 2019-06-01 10:57:08 -07:00
Leonardo de Moura
d2d2c32c81 feat(library/init/data/nat/bitwise): use lean::nat_land and lean::nat_lor 2019-05-31 21:55:57 -07:00
Leonardo de Moura
0f43c2e2d9 feat(library/init/data/array/basic): efficient heterogeneous Array.map
This commit also removes Array.hmap.
Motivation: I wanted to use Array.hmap as an example in the paper, but
I found it would be too distracting to explain why we had `Array.hmap`
and `Array.map`.

cc @kha
2019-05-25 16:32:59 -07:00