Commit graph

38 commits

Author SHA1 Message Date
Leonardo de Moura
eea46610ea fix(library/tactic/simplify): missing projection reduction, add proj := tt to simp 2017-03-27 17:38:40 -07:00
Leonardo de Moura
b09968a37b feat(library/tactic/simplify): add beta := tt to simp 2017-03-27 17:38:31 -07:00
Leonardo de Moura
34f6a92e24 fix(library/tactic/simplify): simp default behavior should eliminate annotations 2017-03-27 15:10:47 -07:00
Leonardo de Moura
8979663164 feat(library/tactic/simplify): relax reducibility constraints when matching implicit arguments
Motivation: if the explicit part matches (what the user sees), then the implicit part must morally match too.
If it doesn't because of reducibility setting, the behavior is usually counterintuitive.
2017-03-08 20:08:54 -08:00
Daniel Selsam
1f6306d068 perf(library/inductive_compiler): simplification with sizeof lemmas 2017-03-01 21:13:20 -08:00
Leonardo de Moura
d1d5428808 feat(library): add check_constants.lean validation, cleanup unused names, minor stdlib fixes 2017-02-21 10:45:31 -08:00
Leonardo de Moura
296d4b0f09 refactor(library/tactic, library/init/meta): simplify_config => simp_config 2017-02-19 13:10:36 -08:00
Leonardo de Moura
0d22410e2e feat(library/tactic): add zeta option, refactor simplify config option, allow users to change simplify_config in interactive mode 2017-02-19 12:11:22 -08:00
Sebastian Ullrich
4d41b03168 chore(frontends/lean,library/tactic): remove old tactic_state functions 2017-02-17 15:41:58 +01:00
Leonardo de Moura
e132d106fb feat(library/tactic/simplify): improve simplify trace messages 2017-02-09 11:13:38 -08:00
Leonardo de Moura
8926e98090 fix(library/tactic/simplify): missing constraints
This bug was introduced in the previous commit.
2017-02-08 23:15:07 -08:00
Leonardo de Moura
e4b3dee526 feat(library/simplify): use custom matcher in the simplifier, and remove hack from type_context
@joehendrix This commit is implementing the matcher that postpones
implicit arguments. The lemma get_data_mk_byte can be proved without
using any hacks in the type_context unifier.

I also added the trace class: simplify.implicit_failure
If we use the command

   set_option trace.simplify.implicit_failure true

Then, the simplifier will generate a diagnostic message every time it
succeeds in the explicit part, but fails in the implicit one.

Please feel free to suggest a better name to his option.

BTW, we can now easily extend the matcher with additional features.
I'm wondering if we will eventually want to write some of these
extensions in Lean.
2017-02-08 22:24:13 -08:00
Leonardo de Moura
2684a77093 fix(library/type_context): fix problem with offset constraints, then adjust simplify 2017-02-06 18:21:14 -08:00
Gabriel Ebner
5fdc737dfc feat(library/tactic): store name of current declaration in tactic_state 2017-01-28 08:27:19 +01:00
Leonardo de Moura
28ce1e6d2b fix(library/tactic/simplify): make sure a partially applied lhs can be used to rewrite terms with "more arguments" in simp
See discussion at issue #1331
2017-01-23 19:53:49 -08:00
Leonardo de Moura
2ca2920284 fix(library/tactic/simplify): relax test
We only need to check whether the resulting expression does not contain
temporary metavariables introduced by the simplifier.
It is ok if it contains regular metavariables that were already in the goal.

This fixes the issue reported at
https://groups.google.com/forum/#!topic/lean-user/3qzchWkut0g
2017-01-23 09:59:06 -08:00
Leonardo de Moura
e8839cbcdc feat(library/app_builder): add mk_eq_mpr that removes unnecessary propext 2017-01-20 20:27:41 -08:00
Leonardo de Moura
94f16d1e44 refactor(library/tactic): move defeq_canonizer::state to tactic_state
It was being stored in the environment before. This was very hackish,
and it was producing a series of unnecessary environment updates, and
thread local caches invalidations.

The new test tests/lean/run/heap.lean is 5x-6x faster after this commit.
2017-01-07 10:17:51 -08:00
Leonardo de Moura
d3795b20dd feat(library/defeq_canonizer): remove thread local cache
The goal is to avoid hard to debug behavior because any tactic (e.g., simp/dsimp/cc) using
defeq_canonize was breaking referential transparency.
2016-12-27 12:56:39 -08:00
Leonardo de Moura
516f45428d fix(library/tactic/simplify): missing clear cache operation 2016-12-19 21:32:46 -08:00
Leonardo de Moura
ac1af2dfda feat(library/tactic/simplify): trace prove failures 2016-12-17 11:53:44 -08:00
Leonardo de Moura
b0d27d6d92 feat(library/tactic/simplify): simplify_core calls itself to discharge hypothese 2016-12-16 10:26:44 -08:00
Daniel Selsam
6120f8cc9f fix(src/library/tactic/simplify): relaxed_whnf when checking if fn is dependent 2016-12-08 07:41:42 -08:00
Daniel Selsam
7bfe0aedb0 feat(library/tactic/simplify): better debug.simplify.try_rewrite tracing 2016-11-29 14:46:35 -08:00
Daniel Selsam
f3dc41b631 fix(library/tactic/simplify): only use auto_eq_congr if number of args match 2016-11-04 10:13:02 -07:00
Gabriel Ebner
1aacf1f20b chore(*): fix style errors 2016-11-04 09:47:17 -07:00
Daniel Selsam
05add2ea02 fix(library/tactic/simplify.cpp): fix debug tracing names 2016-11-02 10:23:38 -07:00
Leonardo de Moura
a9fe684f26 chore(library/tactic/simplify): fix warning in release mode 2016-10-21 13:28:12 -07:00
Leonardo de Moura
99299d1915 feat(library/tactic/simplify): use propext in rewriting rules when simplify_config.use_axioms is tt 2016-10-19 17:59:01 -07:00
Leonardo de Moura
a4ef8f385d feat(library/tactic/simplify): add basic support for lambda-expressions 2016-10-19 14:15:56 -07:00
Leonardo de Moura
205d524409 refactor(library/tactic/simplify): delete old simplifier 2016-10-19 14:03:14 -07:00
Leonardo de Moura
053389b70b feat(library/init/meta/simp_tactic): add new simp primitives 2016-10-19 08:41:25 -07:00
Leonardo de Moura
4d52de6f33 refactor(library/tactic/simplify): add simplify subclasses, and use new simplifier at nested 2016-10-18 16:18:25 -07:00
Leonardo de Moura
fa01e062ef feat(library/tactic/simplifier): add simplify_core_fn
TODO: remove dead code from old simplifier
2016-10-17 09:51:49 -07:00
Leonardo de Moura
7b806755d9 chore(library/tactic/simplify): remove subsingleton support
It is left over from the blast tactic.
Moreover, it is incomplete.
2016-10-16 22:11:12 -07:00
Leonardo de Moura
835c888936 feat(library/tactic/simplify): simplify cache 2016-10-16 16:39:33 -07:00
Leonardo de Moura
bd8478bb25 chore(library/tactic/simplify): remove m_ctx_slss 2016-10-16 16:28:50 -07:00
Leonardo de Moura
aee951af9b chore(library/tactic): move simplifier to tactic folder 2016-10-16 16:25:14 -07:00
Renamed from src/library/tactic/simplifier/simplifier.cpp (Browse further)