Leonardo de Moura
d25ee51b43
refactor(library): move lazy_list back to core library
2017-08-16 14:08:46 -07:00
Leonardo de Moura
dc68cc7445
refactor(library): move stream back to the core library
2017-08-16 13:45:36 -07:00
Leonardo de Moura
19ee270c60
refactor(library): remove vector and bitvec from init
...
Reason: vector in in init folder was introducing an overload (`::`) for
all Lean users. The workaround (use `local infix ::`) was
counterintuitive.
We currently have no special support for bitvectors in the code
generator. Thus, there is no need to have vector and bitvec in the init
folder right now. Moreover, the new parser and elaborator (issue #1674 ) should
provide better ways of managing overloaded symbols.
2017-08-16 13:40:50 -07:00
Mario Carneiro
fb2447468b
chore(init/category/combinators): remove monad.for
...
and variations, in favor of monad.map and variations
2017-07-26 11:52:11 +01:00
Mario Carneiro
cc81118892
refactor(init/data): move out some nat lemmas
2017-07-26 11:52:10 +01:00
Mario Carneiro
74aeb250ec
refactor(*): move out stdlib
2017-07-26 11:52:10 +01:00
Sebastian Ullrich
20c2232bc6
feat(init/meta/interactive): auto-generalize induct parameter
...
Like Isabelle
2017-07-20 01:51:00 -07:00
Sebastian Ullrich
7d39b3e948
refactor(init/meta/interactive): merge generalize and generalize2 and introduce nicer syntax
2017-07-20 01:51:00 -07:00
Sebastian Ullrich
cbf65c1339
fix(init/meta/interactive): implement generalize2 via generalize/kabstract
2017-07-17 13:59:21 +02:00
Mario Carneiro
50bf075d73
feat(data/hash_map): hash_map.of_list
2017-07-05 12:37:54 -07:00
Mario Carneiro
0a77c8338b
feat(data/list/set): map is nodup
2017-07-05 12:37:54 -07:00
Mario Carneiro
42d26a3954
feat(init/data/array): array theorems
2017-07-05 12:37:54 -07:00
Mario Carneiro
1ca6aba076
feat(data/buffer): decidable_eq instance
2017-07-05 12:37:54 -07:00
Mario Carneiro
9d8a898529
feat(data/hash_map): find_empty
2017-07-05 12:37:54 -07:00
Mario Carneiro
9239056c4f
feat(data/list/set): nodup is decidable
2017-07-05 12:37:54 -07:00
Mario Carneiro
b422f3f372
feat(data/buffer/parser): foldl and foldr parsers
2017-07-05 12:37:54 -07:00
Mario Carneiro
803af7cd63
feat(library/data/stream): more stream theorems
2017-07-05 12:37:53 -07:00
Leonardo de Moura
bb9e3ddae2
feat(library/init/meta/interactive): rw [-h] ==> rw [← h]
...
@Armael: this change may affect your project.
The file `doc/changes.md` explains the motivation for the change.
2017-07-05 11:42:55 -07:00
Sebastian Ullrich
30f4b2f2dd
refactor(library): list.taken/dropn ~> list.take/drop
2017-07-05 11:20:10 -07:00
Sebastian Ullrich
c8d6b40991
refactor(frontends/lean/builtin_exprs,library): suppose ~> assume :
2017-07-05 11:20:10 -07:00
Sebastian Ullrich
f024ccd75d
refactor(frontends/lean/token_table,library): take ~> assume
2017-07-05 11:20:10 -07:00
Leonardo de Moura
d0ab9d0cd1
feat(library/init/meta/interactive): simp * as shorthand for simp [*]
2017-07-04 11:57:16 -07:00
Leonardo de Moura
e24f3341d4
feat(library/init/meta/interactive): simp without foo ==> simp [-foo]
...
This commit also adds "exception" validation.
A bad "exception" was being silently ignored.
We can also exclude hypotheses. Example: `simp [*, -h]`
2017-07-03 17:10:46 -07:00
Leonardo de Moura
76799db032
feat(library/init/meta/interactive): simph ==> simp [*]
...
This modification was suggested by @kha.
TODO:
- Use `simp [-f]` instead of `simp without f`
- Allow users to remove hypothesis from `*`. Example: `simp [*, -h]`
for simplify using all hypotheses but `h`.
2017-07-03 15:14:47 -07:00
Leonardo de Moura
16711fcdba
feat(library/tactic/dsimplify): new configuration options for dsimp
...
TODO for `dsimp`:
- Add an option for reducing [reducible] definitions
- Add (to_unfold : list name) similar to the one in the `simp` tactic
2017-07-02 18:26:03 -07:00
Leonardo de Moura
b1bdc4690f
feat(library/init/meta/simp_tactic): cleanup dunfold
...
Here are modifications:
- It fails if no definition is unfolded.
See comment https://github.com/leanprover/lean/issues/1694#issuecomment-310956315
at issue #1694
- Users can provide configuration parameters.
- `dunfold_occs` was deleted.
2017-06-30 20:49:20 -07:00
Gabriel Ebner
a93528df24
fix(leanpkg): read carriage-return as whitespace
2017-06-29 14:25:59 +02:00
Daniel Selsam
8ccdf350de
fix(data/hash_map.lean): rm unused argument to contains_iff
2017-06-26 12:43:36 -07:00
Mario Carneiro
09af93186a
fix(frontends/lean/elaborator): @applications don't make thunks
2017-06-22 08:24:11 -07:00
Sebastian Ullrich
0a48809469
refactor(frontends/lean/tactic_notation): rename note/define tactics to have/let
2017-06-22 08:03:23 -07:00
Mario Carneiro
9f31096892
refactor(init/meta/interactive): rename pose -> define
2017-06-22 08:03:23 -07:00
Mario Carneiro
b775a01fba
refactor(init/meta/interactive): merge assert -> note
2017-06-22 08:03:23 -07:00
Leonardo de Moura
b8fa7f5311
fix(library): expr, level, hash_map, rb_map has_repr instances should be has_to_string since they do not produce results that can be parsed by Lean
...
See #1664
2017-06-18 18:33:27 -07:00
Leonardo de Moura
dc1a1c8540
refactor(library): has_to_string ==> has_repr
...
See issue #1664
This is just the first step to implement proposal described at issue #1664 .
2017-06-18 18:29:19 -07:00
Leonardo de Moura
4eefc41b6e
refactor(*): wrap string in a structure
...
We want to make sure string users do not depend on the string
implementation. This is the first step.
We need this refactoring *now* to make sure it will not be
super painful to address issue #1175
2017-06-07 17:30:49 -07:00
Sebastian Ullrich
3f717c586e
feat(init/meta/interactive): declare format! and sformat! macros and start putting them to use
2017-06-07 10:09:38 -07:00
Mario Carneiro
860e2d904d
feat(init/data/nat): bitwise operations
2017-05-30 12:47:44 -07:00
Johannes Hölzl
ab6797b74c
feat(leanpkg): support (deterministic) timeout value in leanpkg.toml
2017-05-29 06:52:38 +02:00
Mario Carneiro
92d76c22a5
feat(data/pnat): positive natural numbers
2017-05-28 02:32:23 -04:00
Mario Carneiro
6e88119f55
feat(init/meta/injection_tactic): better injection tactic
...
(1) The lhs and rhs will be reduced to whnf before getting the constructor apps
(2) If the lhs and rhs are distinct constructors, it discharges the goal by contradiction
(3) The interactive injection tactic will try to close the goal by assumption if successful
2017-05-27 04:59:40 -04:00
Mario Carneiro
57837c2b3e
fix(init/meta/tactic): let by_cases handle elimination to Type
2017-05-27 04:14:06 -04:00
Mario Carneiro
b827df8b49
refactor(init/logic): remove "contrapos" (which is a duplicate of "mt")
2017-05-27 04:14:03 -04:00
Mario Carneiro
39e7e5cba8
feat(data/vector): more vector operations
2017-05-27 04:14:02 -04:00
Leonardo de Moura
cba0eef101
fix(library/data, library/init/data/array): adjust hash_map PR
2017-05-16 14:46:43 -07:00
Mario Carneiro
6b28499e47
feat(init/data/list,data/list): new basic list operations from haskell
2017-05-16 14:38:43 -07:00
Mario Carneiro
19a919061f
fix(library/data/hash_map): respond to review comments
2017-05-16 14:38:43 -07:00
Mario Carneiro
5d89a93fce
feat(library/data/hash_map): verified hash_map
2017-05-16 14:38:43 -07:00
Mario Carneiro
3b89739850
feat(library/data/list, library/data/array): theorems needed for new hash_map
...
Note that hash_map is moved to library_dev, where the more advanced theorems on lists are available
2017-05-16 14:38:43 -07:00
Leonardo de Moura
a0a8103804
chore(frontends/lean): go back to 'c' as notation for characters
...
This suggestion has been discussed at Slack.
We have decided to use #"c" as notation because we wanted to allow `'`
in the beginning of identifiers like in SML and F*. In particular,
we wanted to allow users to use 'a 'b 'c for naming type parameters
like in SML. However, nobody used this notation. In the Lean standard
library, we are using greek letters for naming type parameters.
So, there is no real motivation for the ugly #"c" syntax.
2017-05-02 13:00:51 -07:00
Gabriel Ebner
fd6407eccb
feat(library/data/buffer/parser): parser combinators for char_buffer
2017-05-01 14:11:38 -07:00