Commit graph

1659 commits

Author SHA1 Message Date
Leonardo de Moura
7ccbf0eb02 feat(library/tactic/congruence/theory_ac): add collapse transition 2016-12-29 11:24:36 -08:00
Leonardo de Moura
4eafd201f6 test(tests/lean/run): add cc+ac sanity test 2016-12-28 21:35:26 -08:00
Leonardo de Moura
5b6e81ddb9 chore(tests/lean/run/cc1): remove trace option 2016-12-28 09:03:54 -08:00
Leonardo de Moura
fb54126d08 fix(library/tactic/congruence/congruence_closure): do not assume instances have been canonized. 2016-12-27 11:19:45 -08:00
Leonardo de Moura
f719991c71 feat(library/tactic/congruence/congruence_closure): propagate projection over constructor equality 2016-12-26 19:47:29 -08:00
Leonardo de Moura
941bbd3e96 fix(library/tactic/congruence/congruence_closure): crash when processing partially applied constructors 2016-12-26 18:51:03 -08:00
Leonardo de Moura
7a2ae8d40b test(tests/lean/run/ematch1): add ematching example 2016-12-26 18:26:57 -08:00
Leonardo de Moura
6a5f6a84cd feat(library/tactic/congruence/hinst_lemma): add heuristic instantiation lemmas 2016-12-25 20:11:58 -08:00
Leonardo de Moura
9b35adfc8c feat(library/tactic/congruence/congruence_closure): add support for constructor equalities 2016-12-25 12:47:17 -08:00
Leonardo de Moura
a30081a715 feat(library/tactic/congruence/congruence_closure): interpreted values in the same equivalence class 2016-12-25 11:09:55 -08:00
Leonardo de Moura
b313328cb9 feat(library/equations_compiler): int constants 2016-12-25 10:00:18 -08:00
Leonardo de Moura
f9fb041e04 fix(library/comp_val): mk_int_val_ne_proof
There was a typo in the proof generation. The weird part is that the
proof was valid, but it was very inefficient to check.
The proof was valid because ((n:int) ≥ m) reduces to true/false if n and
m are integer numerals. Thus, if ((n:int) ≥ m) holds then `trivial` is a
valid proof.
However, the reduction is extremely inefficient since it relies on
computations in unary.

In the buggy version, we provided a proof for (a >= 0) where (b >= 0)
was expected. However, both types are definitionally equal to true.
This is why the proof worked.
2016-12-24 15:54:48 -08:00
Leonardo de Moura
3061d8b9a3 feat(library): add mk_int_val_ne_proof 2016-12-24 15:22:31 -08:00
Leonardo de Moura
0906d84c92 fix(library/tactic/congruence/congruence_closure): proof generation for congruence with different arity 2016-12-24 09:12:10 -08:00
Leonardo de Moura
a3600b6f98 test(tests/lean/run/cc6): add more cc tests 2016-12-24 08:50:51 -08:00
Leonardo de Moura
424a6acb68 fix(library/tactic/congruence/congruence_closure): missing proof construction step 2016-12-24 08:43:04 -08:00
Leonardo de Moura
a176bd324d fix(library/tactic/congruence/congruence_closure): check_eq_true 2016-12-23 22:24:39 -08:00
Leonardo de Moura
a13d3c83c9 fix(library/tactic/congruence/congruence_closure): heq bug and add more tests 2016-12-23 21:57:49 -08:00
Leonardo de Moura
b1b694a532 fix(library/tactic/congruence/congruence_closure): bugs, and add basic cc tactic 2016-12-23 19:30:45 -08:00
Leonardo de Moura
ca261b7fa8 feat(library/init/meta/congruence_tactics): add option for retrieving only non-singleton equivalence classes, add auxiliary functions 2016-12-23 18:35:44 -08:00
Leonardo de Moura
a2850ac050 fix(library/tactic/congruence/congruence_closure): bugs in the fo-approx mode, and debug mode compilation errors 2016-12-23 17:31:20 -08:00
Leonardo de Moura
a4173467c4 feat(library/app_builder): use Semireducible if caller did not specify a transparency_mode and ctx.mode() is Reducible or None
see discussion at #1265
2016-12-23 14:41:22 -08:00
Leonardo de Moura
60d3255577 fix(library/type_context): issue #1258 again
This is yet another fix.
2016-12-22 10:51:16 -08:00
Leonardo de Moura
cc077554b5 fix(library/tactic/change_tactic): use id_locked in the change tactic to create checkpoint
closes #1260
2016-12-21 11:29:03 -08:00
Leonardo de Moura
fe3ed3d383 fix(library/constructions/induction_on): induction_on was not being marked as aux_recursor 2016-12-20 22:41:50 -08:00
Leonardo de Moura
98a14ee1c9 chore(tests/lean/run/test_single): use '-j 0' when running tests 2016-12-20 11:45:32 -08:00
Leonardo de Moura
db2e3727a6 feat(library/type_context): add yet another approximation to unifier
@avigad I decided to fallback into first-order unification to address
the (a ∉ []) issue.

@dselsam Have you experienced similar problems in the ICML project?
The new comment at type_context.cpp explains the problem and hack to
workaround it. The issue is yet another instance where using "first-order
unification" produces imprecision, but generates the solution we want.
2016-12-19 20:34:07 -08:00
Leonardo de Moura
47e6f8fa9e fix(library/type_context): do not revert auxiliary local declarations introduced by the recursive equation notation
see #1258
2016-12-19 11:06:50 -08:00
Sebastian Ullrich
d3f57c6497 fix(library/tactic/tactic_state): include implicitly opened namespaces in opened_namespaces 2016-12-18 23:49:00 -08:00
Leonardo de Moura
aa0abd5cef fix(library/equations_compiler/structural_rec): bug in decoder 2016-12-18 22:51:02 -08:00
Leonardo de Moura
1e76ba64e8 test(tests/lean/run/norm_num_tst): add norm_num tactic tests 2016-12-17 21:19:15 -08:00
Leonardo de Moura
0b9bc383b3 test(tests/lean/run): add regression test
This example exposes the problem described by Kha at slack.
2016-12-17 14:08:10 -08:00
Leonardo de Moura
4b97b00536 refactor(library/tools/super): move examples to test folder 2016-12-16 19:05:32 -08:00
Leonardo de Moura
f9ad1dbfc0 fix(frontends/lean/definition_cmds): bug at inline_new_defs
closes #1253
2016-12-15 20:32:06 -08:00
Leonardo de Moura
b2c1ea6fdb fix(library/type_context): failure cache
The new regression test exposes the problem being fixed.
2016-12-13 07:50:03 -08:00
Leonardo de Moura
3de3532a3e chore(tests/lean/run/even): remove duplicate 2016-12-12 10:48:10 -08:00
Leonardo de Moura
7794ecfb69 test(tests/lean/run): add test for performance issue reported in the lean group 2016-12-12 10:38:23 -08:00
Leonardo de Moura
fbc1bb4d89 perf(library/compiler): add common subexpression elimination
It addresses a performance problem reported by Brian (huffman@galois.com).
2016-12-11 14:43:51 -08:00
Leonardo de Moura
aba6f8b8a8 feat(frontends/lean/parser): add support for anonymous parameters
Example:

check λ _, 0
2016-12-10 11:07:58 -08:00
Leonardo de Moura
9f6e71b374 feat(library/tactic): add "approximate" parameter to apply_core and rewrite_core
If this parameter is set to true, then approximate unification is
used.

closes #1208
2016-12-10 10:24:05 -08:00
Leonardo de Moura
55401a95ec fix(frontends/lean/parser): scope in tactic mode 2016-12-10 09:39:13 -08:00
Leonardo de Moura
b5dc88ee37 fix(library/equations_compiler/elim_match): see #1216
Fixes the problem described at #1216.
This is an alternative fix that prevents the m_var_stack from being in
an inconsistent state.
2016-12-08 15:38:14 -08:00
Leonardo de Moura
692701c5ef feat(library/init/meta): use cheap "reflexivity" after simp and rewrite
The idea is to make sure lean doesn't timeout (at reflexivity) when we apply simp or
rewrite in goals such as

    (x y : nat) |- x + y + 10000000000 = x + y + 200000000000000

This commit also addresses an issue raised at #1218
2016-12-08 14:41:26 -08:00
Leonardo de Moura
0818b02eb3 test(tests/lean/run): add test for @1218 2016-12-08 14:10:47 -08:00
Jeremy Avigad
6f64244f2a refactor(library/init/meta/tactic): switch 'pose' and 'note' 2016-12-08 13:17:42 -08:00
Leonardo de Moura
be3cff0c46 feat(library/type_context): move offset constraint resolution to lazy delta loop 2016-12-08 11:00:15 -08:00
Leonardo de Moura
278e960a6b feat(library/type_context): add support for offset constraints in the unifier
see discussion at #1226
2016-12-06 16:51:00 -08:00
Leonardo de Moura
ecd6f8cad6 chore(tests/lean/run/1089): fix test 2016-12-02 16:47:24 -08:00
Leonardo de Moura
78608a37e9 fix(frontends/lean/definition_cmds): implicit universe theorem parameters bug
See discussion at #1178
2016-11-29 11:12:43 -08:00
Gabriel Ebner
385ea13688 feat(kernel/declaration,*): all theorems are delayed, and are revealed on delta-reduction 2016-11-29 11:12:43 -08:00