Commit graph

288 commits

Author SHA1 Message Date
Mario Carneiro
316d67c3be fix(library/init/data/setoid): fix redundant parameter
`setoid.refl` has two instances of `setoid A` in it
2018-01-28 15:49:35 -08:00
Mario Carneiro
147436bfb8 fix(init/data/nat/lemmas): generalize nat.iterate to (Sort u) 2018-01-16 11:37:33 -08:00
Sebastian Ullrich
c64284a377 perf(init/data/string/ops): make string.split linear 2018-01-15 10:51:27 +01:00
Sebastian Ullrich
ff346f875b feat(init/data/string/ops): add string.split 2018-01-15 09:58:19 +01:00
Leonardo de Moura
cebde17bec feat(library/tactic/simplify): simp reduces c a_1 ... a_n = c b_1 ... b_n into a_1 = b_1 /\ ... /\ a_n = b_n 2018-01-12 18:18:56 -08:00
Leonardo de Moura
4bd314f7bd feat(library/tactic/simplify): simp reduces c_1 ... = c_2 ... to false 2018-01-12 11:30:45 -08:00
Leonardo de Moura
26da50ab0e feat(library/vm/vm_string): efficient iterator.extract
@kha I've added

   iterator.extract : iterator -> iterator -> option string

It returns `none` if the iterators are "incompatible".
If this function is inconvenient to use, we can change it and return the
empty string in these cases.

Given iterators `it1` and `it2`, if they are sharing the same string
object in memory, then the cost is O(pos(it2) - pos(it1)).
If not, we have an extra O(N) step where we check whether the strings
being iterated by it1 and it2 are equal (`N` is the size of the strings).
In most applications, I believe the iterators will share the string
object.

I didn't test the code much. BTW, I found an unrelated bug at
vm_string.cpp. So, I'm not very confident this code is rock solid.
2018-01-10 13:27:28 -08:00
Leonardo de Moura
6ab792733d feat(library/type_context): smart unfolding
closes #1794
2018-01-09 15:09:08 -08:00
Leonardo de Moura
746134d11c feat(library/init/meta/interactive): add goal tagging support for by_cases
This commit also incorporates changes suggested at commit 84a1911949dec94.
2017-12-13 15:17:13 -08:00
Mario Carneiro
17f77367cd chore(library/init/data/fin/ops): revert 107ad36259. 2017-12-12 10:53:12 -08:00
Sean Leather
107ad36259 feat(library/init/data/fin/ops): fin.succ.inj 2017-12-12 04:23:01 -05:00
Leonardo de Moura
bf8fa50481 feat(library/init/data/list/basic): add is_prefix_of and is_suffix_of 2017-12-11 16:27:03 -08:00
Leonardo de Moura
ddfcc2cb0b feat(library/init/data/list/basic): define decidable_eq (list A) instance manually
Motivation: make sure we can use it before we define the tactic `mk_dec_eq_instance`.
2017-12-11 16:27:03 -08:00
Leonardo de Moura
49e7a642c3 feat(library/init/meta/interactive): merge ginduction and induction
This commit is based on 638b34b16de6443.
The changes were applied manually to make sure all changes are
compatible with our plans to `induction`.
2017-12-07 19:10:10 -08:00
Leonardo de Moura
a2f55e5d7b feat(library/tactic/induction_tactic): new name generator for induction and cases tactics 2017-12-05 14:57:36 -08:00
Leonardo de Moura
458958b9fc feat(kernel/inductive): use ih to name induction hypothesis (instead of ih_1) when there is only one 2017-12-05 13:50:24 -08:00
Leonardo de Moura
6d96741010 feat(library): provide names for constructor arguments
Motivation: `cases` and `induction` tactics use these names when the
user does not provide them.
2017-12-04 16:25:16 -08:00
Leonardo de Moura
c943576e5a feat(library/init): add funext tactic 2017-12-04 14:54:39 -08:00
Leonardo de Moura
75aa94b34c refactor(library): rename repeat ==> iterate
Reason: we will implement a new `repeat` tactic.
2017-12-04 12:34:59 -08:00
Leonardo de Moura
7b97e82fb3 chore(library): remove unnecessary repeat applications 2017-12-04 12:16:11 -08:00
Leonardo de Moura
b7322e28c1 feat(library): do not using simp lemmas for sorting arguments of AC operators by default 2017-12-03 15:03:58 -08:00
Leonardo de Moura
d9322b16ca feat(library): add has_equiv type class 2017-12-03 15:03:58 -08:00
Leonardo de Moura
b6c8551753 feat(library): add to_bool lemmas 2017-12-03 15:03:58 -08:00
Sebastian Ullrich
f6b113849b fix(init/category/monad): bind_pure: remove stray parameter 2017-11-28 17:00:22 +01:00
Leonardo de Moura
c98c39e4b9 chore(library/init/data/rbtree/basic): remove unnecessary equation 2017-11-22 08:22:42 -08:00
Leonardo de Moura
0a1d2908aa feat(library/data/rbtree/main): rbtrees are balanced 2017-11-22 08:02:13 -08:00
Leonardo de Moura
b95b260706 fix(library/data/rbtree): insert 2017-11-22 07:52:18 -08:00
Leonardo de Moura
319faca00a feat(library/data/rbtree): add mem_exact predicate and find_insert lemmas 2017-11-20 11:52:36 -08:00
Leonardo de Moura
a666c7f04e chore(library/init/data/rbmap): add missing file 2017-11-19 19:49:36 -08:00
Leonardo de Moura
1033836953 feat(library/data/rbmap): add rbmap lemmas 2017-11-19 19:49:36 -08:00
Leonardo de Moura
2354338287 feat(library/init/data/rbmap): add rbmap module 2017-11-19 19:49:36 -08:00
Leonardo de Moura
320b33f305 feat(library/data/rbtree): add find and define contains using it 2017-11-18 16:06:16 -08:00
Leonardo de Moura
8ffff9e48b feat(library/data/rbtree): cleanup and add min max 2017-11-18 12:22:10 -08:00
Leonardo de Moura
effa90e884 refactor(library/init/data/rbtree): rbtree does not need (decidable_rel lt) parameter 2017-11-17 22:59:50 -08:00
Leonardo de Moura
52d6adc19c chore(library): use new structure update notation in the core lib 2017-11-17 16:57:54 -08:00
Leonardo de Moura
65368a0c85 refactor(library): rbtree lemmas do not need to be in init folder 2017-11-17 16:14:28 -08:00
Leonardo de Moura
956f29cdb2 chore(library/init/data/rbtree/lemmas): do not rely on and.comm, and.assoc and and.left_comm as simp rules 2017-11-17 15:36:17 -08:00
Leonardo de Moura
2e66c422f3 feat(library/init/data/rbtree/lemmas): simplify blast_disjs 2017-11-17 15:06:49 -08:00
Leonardo de Moura
7dd70b0ef1 feat(library/init/algebra/classes): add is_strict_total_order type class 2017-11-17 15:06:32 -08:00
Leonardo de Moura
e2e8d56e6e feat(library/init/data/rbtree/lemmas): add equiv_or_mem_of_mem_insert lemma 2017-11-17 13:49:58 -08:00
Leonardo de Moura
1b8f9d6550 feat(library/init/data/rbtree/lemmas): add mem_ins_of_mem lemma 2017-11-17 11:42:55 -08:00
Leonardo de Moura
d2b27035ae feat(library/init/data/rbtree/lemmas): add contains_correct user lemma 2017-11-16 17:24:37 -08:00
Leonardo de Moura
d40b255d14 feat(library/init/data/rbtree/lemmas): show that a well formed red black tree is searchable 2017-11-16 17:04:33 -08:00
Leonardo de Moura
10a035a9ba feat(library/init/data/rbtree/lemmas): add contains_correct lemma 2017-11-16 12:20:49 -08:00
Leonardo de Moura
a619bac008 feat(library/init/data/rbtree/lemmas): add is_searchable helper inductive predicate 2017-11-15 19:08:18 -08:00
Leonardo de Moura
7f80bf60d1 feat(library/init/data): start rbtree module 2017-11-15 16:17:39 -08:00
Leonardo de Moura
6e4ef51f26 feat(library/tmp/rbtree_no_index): unbundled rbtree experiment 2017-11-14 12:31:53 -08:00
Leonardo de Moura
394e0d5f0a refactor(library/init): remove has_cmp and is_ordering type classes
Now, `cmp` is just a fixed helper function.
In the future, we will be able to use (more efficient) specialized
versions during code generation by defining simp rules.
2017-11-14 08:33:24 -08:00
Leonardo de Moura
49db6793f0 feat(library/init/data/ordering): cleanup ordering module, and add default cmp implementation 2017-11-13 21:55:41 -08:00
Leonardo de Moura
8e076da666 feat(library/init/data/list/basic): has_le and has_lt instances for lists 2017-11-13 21:52:12 -08:00