Commit graph

12958 commits

Author SHA1 Message Date
Gabriel Ebner
0d8e62ed40 feat(library/tactic/simp_lemmas): add both equational lemmas and the definition itself 2017-08-18 08:54:04 +02:00
Gabriel Ebner
256ca9789f fix(library/tactic/simp_lemmas): fix typo in pp 2017-08-18 08:54:03 +02:00
Gabriel Ebner
6bd3fe2449 feat(library/tactic/simp_lemmas): support congruence lemmas that are metavariable applications 2017-08-18 08:54:03 +02:00
Leonardo de Moura
c0a55cb3ed test(tests/lean/run): add backward chaining examples 2017-08-17 16:36:21 -07:00
Leonardo de Moura
0660e18943 feat(library/metavar_context): add method for setting metavar user facing name 2017-08-17 16:03:32 -07:00
Leonardo de Moura
9927f331f4 chore(frontends/lean/elaborator): remove dead code 2017-08-17 16:03:32 -07:00
Sebastian Ullrich
b08158fcb8 feat(emacs): add searching definitions using helm on C-c C-d 2017-08-17 18:21:09 +02:00
Leonardo de Moura
9334a76810 chore(script/package_registry): remove library_dev from test suite 2017-08-17 07:41:35 -07:00
Mario Carneiro
97815e4eb3 feat(init/logic): false.elim eliminates to Sort 2017-08-17 11:42:55 +02:00
Mario Carneiro
c5bb5cb1eb fix(init/meta/interactive_base): declare |- notation 2017-08-17 11:34:00 +02:00
Leonardo de Moura
6315136279 fix(frontends/lean/definition_cmds): fixes #1790 2017-08-16 15:57:55 -07:00
Leonardo de Moura
dbfee23682 chore(.github/CONTRIBUTING.md): update PR submission guidelines. 2017-08-16 14:22:32 -07:00
Leonardo de Moura
12b28546e8 chore(library/library.md): update documentation 2017-08-16 14:17:26 -07:00
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
Sebastian Ullrich
987e681323 chore(test/lean): add overlooked test 2017-08-15 12:45:14 +02:00
Sebastian Ullrich
579d4a459e chore(init/meta/interactive): check simp lemmas for ambiguous overloads
Fixes #1786
2017-08-15 12:43:02 +02:00
Gabriel Ebner
32ddac5f40 feat(library/tactic/kabstract): expose kabstract to VM 2017-08-14 11:41:54 +02:00
Gabriel Ebner
867bc46d99 feat(library/vm/vm_parser): expose parse_command_like to the vm 2017-08-14 11:41:48 +02:00
Gabriel Ebner
b50597228b chore(tests/lean/print_ax2): remove duplicate and broken test 2017-08-06 10:33:33 +02:00
Gabriel Ebner
e2717ec2c5 fix(library/compiler/inliner): inline auxiliary declarations
Fixes #1763.
2017-08-06 10:24:26 +02:00
Gabriel Ebner
7e4a5a78c8 chore(library/init/algebra/order): generalize lemma 2017-08-06 09:58:24 +02:00
Gabriel Ebner
0c15724e8e fix(library/tactic/simplify): handle universe polymorphic simplification rules
The issue was that instantiate_mvars(infer(m)) had a metavariable, while
infer(instantiate_mvars(m)) did not.  Changing the call from assign to
is_def_eq also unifies the type, assigning the metavariable inside the
type.
2017-08-03 17:42:07 +01:00
Leonardo de Moura
b6c691cead test(tests/lean/run/whnf_mvar): add test to check whether whnf instantiate mvars or not
@digama0 As I suspected, `whnf` already instantiates metavariables.
2017-08-03 11:29:22 +01:00
Gabriel Ebner
22011dcde4 chore(init/algebra/order): typo
Thanks to @fpvandoorn for proof-reading!
2017-08-02 15:41:51 +01:00
Leonardo de Moura
f39e42bf2d fix(library/tactic/destruct_tactic): fixes #1766 2017-08-02 15:35:33 +01:00
Leonardo de Moura
fdaa26f2fd feat(library/equations_compiler/wf_rec): fixes #1782 2017-08-02 15:12:04 +01:00
Gabriel Ebner
66b80dde54 chore(library/init/algebra/order): remove unused lemmas 2017-08-02 14:41:35 +01:00
Gabriel Ebner
f5a6429efc doc(doc/changes): describe order type class changes 2017-08-02 14:41:35 +01:00
Gabriel Ebner
5922f71c50 feat(library/init/algebra/order): add default value for lt 2017-08-02 14:41:35 +01:00
Gabriel Ebner
fe5cb0106c fix(frontends/lean/structure_cmd): disable def-eq check of pre-expressions 2017-08-02 14:41:35 +01:00
Gabriel Ebner
c500f9497d feat(frontends/lean/structure_cmd): inherit default values in old_structure_cmd 2017-08-02 14:41:35 +01:00
Gabriel Ebner
b1954f949b chore(init/data/int): remove unused lemmas 2017-08-02 14:41:35 +01:00
Gabriel Ebner
ce509e621a refactor(library/init/algebra): remove order_pair classes 2017-08-02 14:41:35 +01:00
Sebastian Ullrich
4f66673fc2 feat(init/meta/attribute,library/tactic/attribute): user_attribute apply handlers 2017-08-02 14:32:39 +01:00
Sebastian Ullrich
8571860876 chore(emacs/lean-dev): lean-diff-test-file: create missing files 2017-08-02 14:32:02 +01:00
Gabriel Ebner
becec82311 fix(frontends/lean/structure_cmd): simplify parser 2017-08-02 11:27:13 +01:00
Gabriel Ebner
b6f81e30e5 fix(frontends/lean/structure_cmd): prevent segfault
Fixes #1727.
2017-08-02 11:27:13 +01:00
Leonardo de Moura
39fa7625b8 feat(library/init/meta/interactive): add specialize tactic
closes #1779
2017-08-02 10:20:25 +01:00
Gabriel Ebner
403234f29e fix(frontends/lean/interactive): fix empty prefix in autocompletion 2017-08-01 18:42:31 +01:00
Gabriel Ebner
6d0a7a80af fix(frontends/lean/builtin_exprs): prevent segfault 2017-08-01 14:57:37 +01:00
Gabriel Ebner
c15f2979c6 fix(frontends/lean/util): allow docstrings after variables 2017-08-01 10:18:05 +01:00
Gabriel Ebner
89e1b196db fix(library/compiler/preprocess): do not unfold noncomputable definitions
This happened in Johannes' real number formalization.  We tried to
unfold a noncomputable definition even though it would have been erased
afterwards, and failed.

The check_computable check was introduced in order to fix the error
message in #1401, the error message is still intelligible in that
example.
2017-08-01 08:37:18 +01:00
Gabriel Ebner
2804a0ea27 fix(util/name): escape empty name components using french quotes 2017-07-31 16:01:46 +01:00
Mario Carneiro
092fc89333 doc(changes): changelog 2017-07-28 22:40:25 +01:00
Gabriel Ebner
36dc037d65 perf(util/rc): do not use fences
As suggested by David Chisnall.  If I read the spec correctly, it would
be unsafe to use the release ordering for dec_ref_core: then the
following situation could happen:

```c++
// m_rc -> 2

// Thread 1:
unsigned x = atomic_fetch_sub_explicit(&m_rc, 1u, memory_order_release);

// Thread 2:
unsigned y = atomic_fetch_sub_explicit(&m_rc, 1u, memory_order_release);

// x = y = 1u, m_rc -> 2
```

That is, a release store operation is not required to be visible to
another release operation.

Herb Sutter also recommends the acq_rel ordering for reference counters.
2017-07-28 18:31:04 +01:00
Mario Carneiro
1b28b9f5bd chore(init/data/int/basic): define nat_abs using equation compiler 2017-07-28 16:47:53 +01:00
Mario Carneiro
490cc50b51 chore(init/data/nat): mark simp rules 2017-07-28 16:47:53 +01:00
Mario Carneiro
fb4e952ac8 fix(init/meta/congr_tactic): congr tries assumption first
This gives a workaround for the situation where the `congr` tactic does too much congruence applications, such as reducing `|- a + b = b + a` to `|- a = b` and `|- b = a`, by supplying the desired equalities to stop at using `have`.
2017-07-28 16:47:53 +01:00