Leonardo de Moura
32cc36214a
feat(library/init/meta/smt_tactic): allow user to select simp attribute to be used during SMT preprocessing, use preprocessing at intros too
2017-01-01 22:26:26 -08:00
Leonardo de Moura
50b25ad45f
feat(library/init/meta/smt_tactic): add smt_tactic.destruct, and a few combinators
2017-01-01 14:50:34 -08:00
Leonardo de Moura
4db7c05fb8
feat(frontends/lean/elaborator): generalize try_monad_coercion
2017-01-01 14:50:01 -08:00
Leonardo de Moura
effe19d334
feat(library/tactic/smt/smt_state): add smt_tactic.intros, define smt_state in Lean as (list smt_goal)
2017-01-01 14:17:03 -08:00
Leonardo de Moura
90096a3ee8
feat(library/init/meta/smt_tactic): add smt_tactic.close
2017-01-01 11:56:36 -08:00
Leonardo de Moura
19154e1ff3
chore(library/tactic/smt/smt_state): typo
2017-01-01 10:41:09 -08:00
Leonardo de Moura
d7e894d197
fix(util/rb_tree): typo
2017-01-01 10:38:41 -08:00
Leonardo de Moura
d2e935522c
feat(library/tactic/smt/smt_state): unique names at intro_all
2017-01-01 09:44:39 -08:00
Scott Morrison
548ca37c47
fix(library/init/meta/interactive): correcting a typo in a comment
2017-01-01 09:34:32 -08:00
Leonardo de Moura
68629b2e5f
feat(library/init/category/transformers): disable instance has_monad_lift_t ==> has_coe
...
It produces non-termination because it triggers sub-problems of the
form (has_monad_lift_t t ?M), and this kind of sub-problem is bad
for the transitive closure rule:
instance has_monad_lift_t_trans (m n o) [has_monad_lift n o] [has_monad_lift_t m n] : has_monad_lift_t m o
The trick above only behaves well for synthesis subproblems that do not
contain sub-variables.
Note that the sub-problem (has_monad_lift_t t ?M) is created by a
similar rule used at has_coe_t.
instance {a : Type u₁} {b : Type u₂} {c : Type u₃} [has_coe a b] [has_coe_t b c] : has_coe_t a c
AND
instance {m n} [has_monad_lift_t m n] {α} : has_coe (m α) (n α) :=
We workaround the issue by disabling
instance {m n} [has_monad_lift_t m n] {α} : has_coe (m α) (n α)
and adding instances of it. Example:
meta instance (α : Type) : has_coe (tactic α) (solver α) := ...
meta instance (α : Type) : has_coe (tactic α) (prover α) := ...
meta instance (α : Type) : has_coe (tactic α) (smt_tactic α) := ...
2017-01-01 09:15:25 -08:00
Leonardo de Moura
a44a975388
feat(library/type_context,frontends/lean/elaborator): add class_exception (for max depth reached), ignore them during coercion resolution (just add a trace message)
2017-01-01 08:51:09 -08:00
Leonardo de Moura
6320168c90
chore(library/init/meta/stactic): delete dead file
2016-12-31 18:26:04 -08:00
Leonardo de Moura
35cc334b10
feat(library/init/meta): smt_tactic skeleton
2016-12-31 18:22:23 -08:00
Leonardo de Moura
66bc3c796a
feat(frontends/lean/elaborator): add extra coercion resolution rule for monads
...
We also removed the notation (♯tac) since it is not needed anymore.
@gebner, the comment at elaborator.cpp explains why you had to use the ♯
notation. The workaround is a little bit hackish, but I think it is
worth it. We will use monad lifts in many different places.
2016-12-31 13:50:15 -08:00
Leonardo de Moura
85f88c4174
refactor(library/data/monad/transformers): move transformers to init
2016-12-31 11:37:13 -08:00
Gabriel Ebner
ae7c8f4070
fix(shell/lean_js): the and_comm name is taken now
2016-12-31 15:19:58 +01:00
Gabriel Ebner
c5e0ea2600
fix(shell/lean): make progress display work on emscripten
2016-12-31 15:16:03 +01:00
Gabriel Ebner
c90530193f
fix(library/st_task_queue): handle null dependencies
2016-12-31 15:15:49 +01:00
Gabriel Ebner
6fa246032f
fix(library/native_compiler): get_exe_location does not exist on emscripten
2016-12-31 15:15:20 +01:00
Gabriel Ebner
a06d9adfec
fix(CMakeLists): do not link to libdl on emscripten
2016-12-31 15:14:53 +01:00
Gabriel Ebner
f076630511
fix(CMakeLists): override MULTI_THREAD for emscripten
2016-12-31 15:13:12 +01:00
Leonardo de Moura
fd4fffea27
chore(frontends/lean/info_manager): cleanup old code
2016-12-30 18:59:15 -08:00
Leonardo de Moura
5f87ec3356
feat(library/tactic): allow user to write their own pretty printer for tactic states
2016-12-30 18:58:50 -08:00
Leonardo de Moura
7a06912427
test(tests/lean/run): add test for destruct tactic
2016-12-30 18:38:35 -08:00
Leonardo de Moura
5d825483c4
refactor(library/init/meta/interactive): tactic.interactive.types ==> interactive.types
...
Motivation: we will use auto-quotation for other tactic monads
2016-12-30 18:06:41 -08:00
Leonardo de Moura
b86494f0d4
feat(library/tactic): add destruct tactic that is similar to cases, but does not use revert/intro/clear
...
This tactic is useful for building more complex tactics using ematch and
cc because it does not invalidate cc_state nor ematch_state.
2016-12-30 17:05:24 -08:00
Leonardo de Moura
9c069a3eda
refactor(library/tactic/congruence): rename directory to smt
2016-12-30 13:15:19 -08:00
Leonardo de Moura
a0e9d38241
feat(library/init/meta/congruence_tactics): allow user to configure congruence_closure module
2016-12-30 12:42:10 -08:00
Leonardo de Moura
cc6d4a6ef8
chore(library/init/meta/interactive): typo
2016-12-30 09:04:27 -08:00
Leonardo de Moura
85b98f08e9
fix(frontends/lean): bad position at spurious 'end' token
2016-12-29 19:51:36 -08:00
Leonardo de Moura
5480036b7b
test(tests/lean/run): add ac_refl tests
2016-12-29 19:51:18 -08:00
Leonardo de Moura
79043177ee
fix(library/tactic/congruence/congruence_closure): bug in the interface between cc and ac modules
2016-12-29 19:25:29 -08:00
Leonardo de Moura
d573704657
feat(library/init/meta): add ac_refl tactic
...
It is basically cc without taking the hypotheses into account.
2016-12-29 19:22:40 -08:00
Leonardo de Moura
84cc00b1ea
fix(library/tactic/ac_tactics,library/tactic/congruence/theory_ac): crash when mixing different AC symbols
2016-12-29 18:38:40 -08:00
Leonardo de Moura
ec1c689073
test(tests/lean/run/cc_ac5): mix two AC symbols
2016-12-29 18:25:00 -08:00
Leonardo de Moura
a500059672
refactor(library/unfold_macros): use replace_visitor_with_tc to implement unfold_macros
...
This commit also fixes a potential peformance problem at
unfold_macros (it was eagerly expanding let-expressions).
2016-12-29 18:11:33 -08:00
Leonardo de Moura
73bf232fea
fix(library/module): deadlock?
...
This commit also undoes the hackish workaround used at e33bd2e665
@gebner Could you please take a quick look at this fix, and check
whether it makes sense?
2016-12-29 17:56:50 -08:00
Leonardo de Moura
e33bd2e665
chore(library/unfold_macros): checking whether commit 7f86ad64eb broke the remote build
2016-12-29 16:18:13 -08:00
Leonardo de Moura
c0f7d01cc4
fix(tests/lean/run/ematch2): remove example that produces a tsunami of redundant equalities to the AC module
2016-12-29 15:55:09 -08:00
Leonardo de Moura
3faa72de24
chore(library/tactic/ac_tactics): style
2016-12-29 15:36:38 -08:00
Leonardo de Moura
97330f9f02
test(tests/lean/run): add new AC test with set union
2016-12-29 15:30:29 -08:00
Leonardo de Moura
52db1f1419
feat(library/data/set): add basic lemmas for demoing the AC procedure
2016-12-29 15:29:33 -08:00
Leonardo de Moura
312445fc57
test(tests/lean/run/cc_ac3): add test that requires superpose
2016-12-29 15:11:33 -08:00
Leonardo de Moura
4f463d6b85
fix(library/tactic/congruence/theory_ac): typo
2016-12-29 15:04:04 -08:00
Leonardo de Moura
b3d15b196d
feat(library/tactic/ac_tactics,library/tactic/congruence/theory_ac): add superpose transition
2016-12-29 14:54:25 -08:00
Leonardo de Moura
846caf53f7
refactor(library/tactic/ac_tactics,library/tactic/congruence/theory_ac): minimize number of AC macros
2016-12-29 13:15:42 -08:00
Leonardo de Moura
7ccbf0eb02
feat(library/tactic/congruence/theory_ac): add collapse transition
2016-12-29 11:24:36 -08:00
Leonardo de Moura
7d17840e3f
feat(library/tactic/congruence/theory_ac): add compose transition
2016-12-29 11:11:44 -08:00
Leonardo de Moura
deaf252acf
chore(library/tactic/congruence/theory_ac): improve trace messages
2016-12-29 09:59:11 -08:00
Leonardo de Moura
4eafd201f6
test(tests/lean/run): add cc+ac sanity test
2016-12-28 21:35:26 -08:00