Leonardo de Moura
b18b49dd6b
feat(library/tactic/smt/smt_state): add tactic for adding equational lemmas for a definition
2017-01-05 15:47:58 -08:00
Leonardo de Moura
3742d6573d
feat(library/tactic/smt/smt_state): add preprocess tactic
2017-01-05 13:43:50 -08:00
Leonardo de Moura
8eadaf51d8
feat(library/init/meta/smt): add helper tactics: get_facts, proof_for, refutation_for, add_lemmas_from_facts, ...
2017-01-05 12:59:11 -08:00
Leonardo de Moura
52c1a15313
feat(library/tactic/smt): add tactics for adding new lemmas to ematch state
2017-01-05 11:44:25 -08:00
Leonardo de Moura
0969997c64
feat(library/tactic/smt): add ematch smt_tactic
2017-01-04 22:41:36 -08:00
Leonardo de Moura
858ce76e73
feat(library/init/meta/smt/ematch): add commands for creating attributes for hinst_lemmas
2017-01-04 20:31:38 -08:00
Leonardo de Moura
d784aba249
feat(library/tactic/smt/hinst_lemmas): change how transparency is used to process hinst_lemmas
2017-01-04 19:12:37 -08:00
Leonardo de Moura
8144eaa9bf
feat(library/init/meta/smt/ematch): add hinst_lemmas API
2017-01-04 18:04:53 -08:00
Leonardo de Moura
384e8bc795
refactor(library/init/meta/smt): move ematch stuff to new file, and remove priority from hinst_lemma
2017-01-04 17:23:06 -08:00
Leonardo de Moura
5f2b247af9
feat(frontends/lean/tactic_evaluator): step-by-step evaluation for 'begin [smt] ... end' blocks
2017-01-04 14:06:44 -08:00
Leonardo de Moura
d53215a2fb
feat(frontends/lean/tactic_notation, library/init/meta/smt): add by_cases and by_contradiction smt_tactics, support for classical reasoning, add support for 'begin [smt] with config, ... end'
2017-01-04 12:03:45 -08:00
Leonardo de Moura
59f3c9775a
feat(frontends/lean/tactic_notation): add support for begin [smt] ... end blocks
...
TODO: add support for inspecting intermediate states.
2017-01-04 11:13:00 -08:00
Leonardo de Moura
3a62ca0581
refactor(library/init/meta): move smt tactics to library/init/meta/smt, and add interactive definitions
2017-01-04 09:36:50 -08:00
Leonardo de Moura
3adcf30d2f
feat(library/init/meta/smt_tactic): add assert/assertv/define/definev/pose/note for smt_tactic
2017-01-03 17:12:00 -08:00
Leonardo de Moura
554cef1d36
feat(library/tactic/smt/congruence_closure): propagate disequalities
2017-01-03 14:53:27 -08:00
Leonardo de Moura
78f4ab605e
feat(library/tactic/smt): preprocessing configuration options
2017-01-03 11:06:33 -08:00
Leonardo de Moura
de8491474c
feat(library/tactic/smt/congruence_closure): more propagation rules for implication, and cleanup
2017-01-02 19:35:12 -08:00
Leonardo de Moura
cefccd0e47
feat(library/tactic/smt): perform "unit propagation" in the congruence closure module
2017-01-02 18:49:26 -08:00
Leonardo de Moura
b200a86240
feat(library/tactic/smt): simplify congruence_closure internalization, visit lemmas at unit_propagation
2017-01-02 12:23:32 -08:00
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
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
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
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
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
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
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
aa23ba8714
chore(library/init/algebra): remove unnecessary generality
...
We can add it back if we find a compelling use case.
2016-12-27 17:40:34 -08:00
Leonardo de Moura
8fcfe0bbd4
feat(library/init/algebra/ac): add helper classes for AC
2016-12-27 16:54:00 -08:00
Leonardo de Moura
244e115412
chore(library/init/data): add more "short-circuit" instances for int/nat
2016-12-27 11:51:42 -08:00
Leonardo de Moura
773389f9df
feat(library/init/meta/congruence_tactics): add cc_state.gmt and cc_state.inc_gmt
2016-12-27 10:49:20 -08:00
Leonardo de Moura
f3f1ec268b
chore(library/init/meta/tactic): make all arguments in id_locked explicit.
2016-12-26 18:22:37 -08:00
Leonardo de Moura
9e46818563
feat(library/tactic/congruence): ematching
2016-12-26 15:52:18 -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
61d007892b
feat(library/data/stream): add stream module
2016-12-25 16:40:52 -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
b6051a6a03
feat(library/init/meta/congruence_tactics): add cc_dbg that display equivalence classes at failure
2016-12-25 10:46:15 -08:00
Leonardo de Moura
b313328cb9
feat(library/equations_compiler): int constants
2016-12-25 10:00:18 -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
58ca9a3059
feat(library/init/data/int/comp_lemmas): add auxiliary lemmas for comparing int numerals
2016-12-24 13:52:48 -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
Daniel Selsam
95882c14cd
feat(init/data/string/basic.lean): inhabited string
2016-12-23 14:45:53 -08:00