Leonardo de Moura
6ab792733d
feat(library/type_context): smart unfolding
...
closes #1794
2018-01-09 15:09:08 -08:00
Leonardo de Moura
587540f11b
feat(frontends/lean): add abbreviation command
...
This command is not just a cosmetic feature.
We need it to defined `id_rhs` before the tactic framework is defined.
We want `id_rhs` to be used in all definitions generated by the equation
compiler. Right now, it is only used in definitions defined after the
tactic framework.
2018-01-05 15:40:59 -08:00
Leonardo de Moura
43d7bac49b
feat(library/init/meta): add support for new unify at rw tactic
2018-01-04 13:05:55 -08:00
Leonardo de Moura
040722c7e7
feat(library/init/meta): add unify config option to apply_cfg
...
This commit also fixes a problem in the `apply` tactic error messages.
2018-01-04 12:51:59 -08:00
Mario Carneiro
56c54a478f
fix(init/coe): use Sort instead of Type in subtype coe
2017-12-20 14:02:03 -08:00
Leonardo de Moura
ddf014cc7f
feat(library/init/version): add lean.githash : string
2017-12-20 14:00:41 -08:00
Leonardo de Moura
e89eece98c
feat(library/init): add lean.version : nat × nat × nat
...
closes #1873
2017-12-15 17:48:26 -08:00
Leonardo de Moura
91ff183b3e
chore(library): remove out notation for out_param
2017-12-15 15:47:58 -08:00
Leonardo de Moura
f0352d31a1
feat(library/type_context, library): inout ==> out modifier in type class declarations
...
@kha: I decided to implement this change before I start the
type_context modifications. The change did not affect the corelib and
test suite much. The only annoying problem is that `out` cannot be
used to name locals anymore.
2017-12-15 14:46:47 -08:00
Leonardo de Moura
746134d11c
feat(library/init/meta/interactive): add goal tagging support for by_cases
...
This commit also incorporates changes suggested at commit 84a1911949dec94.
2017-12-13 15:17:13 -08:00
Mario Carneiro
17f77367cd
chore(library/init/data/fin/ops): revert 107ad36259.
2017-12-12 10:53:12 -08:00
Sean Leather
107ad36259
feat(library/init/data/fin/ops): fin.succ.inj
2017-12-12 04:23:01 -05:00
Leonardo de Moura
cb74ef1670
chore(library/init/meta/interactive): fix docstring
2017-12-11 16:27:04 -08:00
Leonardo de Moura
533ddc0279
fix(library/init/meta/interactive): remove buggy generalizing param from with_cases
2017-12-11 16:27:04 -08:00
Leonardo de Moura
5217ae735d
feat(library/init/meta/interactive): do not make tag longer when constructor/apply create a single subgoal
2017-12-11 16:27:03 -08:00
Leonardo de Moura
f0231f17bc
feat(library/init/meta): propagate tags in constructor-like tactics
2017-12-11 16:27:03 -08:00
Leonardo de Moura
ebeb5f713a
feat(library/init/meta/interactive): do not make tag longer when induction/cases create a single subgoal
2017-12-11 16:27:03 -08:00
Leonardo de Moura
8bda71af6f
feat(library/init/meta/interactive): new case tactic with support for with_cases and tagging
2017-12-11 16:27:03 -08:00
Leonardo de Moura
bf8fa50481
feat(library/init/data/list/basic): add is_prefix_of and is_suffix_of
2017-12-11 16:27:03 -08:00
Leonardo de Moura
ddfcc2cb0b
feat(library/init/data/list/basic): define decidable_eq (list A) instance manually
...
Motivation: make sure we can use it before we define the tactic `mk_dec_eq_instance`.
2017-12-11 16:27:03 -08:00
Leonardo de Moura
d44996e034
feat(library/init/meta): propagate tag information
2017-12-10 19:15:41 -08:00
Leonardo de Moura
e23db3970a
feat(library/init/meta/tactic): apply tactic return parameter name associated with new metavars
2017-12-10 12:11:58 -08:00
Leonardo de Moura
41cfa1bf63
feat(library/init/meta/tactic): induction tactic returns constructor/param names
2017-12-10 09:46:39 -08:00
Leonardo de Moura
8577fe6984
fix(library/init/meta/interactive): induction ... generalizing ... bug
2017-12-10 08:57:25 -08:00
Leonardo de Moura
f288205cce
feat(library/tactic): goal tagging
2017-12-09 16:29:03 -08:00
Leonardo de Moura
24d5a1592d
fix(library/init): add simp lemmas for auto_param and opt_param
2017-12-09 09:59:00 -08:00
Leonardo de Moura
623ff2454b
chore(library/init/meta/interactive): remove TODO
...
We now have `whnf_ginductive`
2017-12-08 11:47:20 -08:00
Leonardo de Moura
49e7a642c3
feat(library/init/meta/interactive): merge ginduction and induction
...
This commit is based on 638b34b16de6443.
The changes were applied manually to make sure all changes are
compatible with our plans to `induction`.
2017-12-07 19:10:10 -08:00
Leonardo de Moura
84db9e9e43
feat(library/init/meta/interactive): add constructor_matching tactic
2017-12-06 13:17:06 -08:00
Leonardo de Moura
c89e2457bb
feat(library/init/meta/interactive): add cases_type tactic
...
see doc/changes.md
2017-12-06 12:55:10 -08:00
Leonardo de Moura
4f1f15a425
refactor(library/init/meta/match_tactic): cleanup match_tactic interface
2017-12-06 12:52:41 -08:00
Leonardo de Moura
a056e87350
fix(library/init/meta/injection_tactic): add support for ginductive datatypes
2017-12-06 09:39:20 -08:00
Leonardo de Moura
03eda2ecc0
feat(library/init/meta/interactive): add cases_matching p tactic
2017-12-05 18:17:44 -08:00
Leonardo de Moura
b06549bc05
feat(library/init/meta): add guard_names { t } tactical
2017-12-05 16:29:46 -08:00
Leonardo de Moura
a2f55e5d7b
feat(library/tactic/induction_tactic): new name generator for induction and cases tactics
2017-12-05 14:57:36 -08:00
Leonardo de Moura
458958b9fc
feat(kernel/inductive): use ih to name induction hypothesis (instead of ih_1) when there is only one
2017-12-05 13:50:24 -08:00
Leonardo de Moura
0c5ecf6441
feat(library/init/meta/interactive): add iterate n { t }
2017-12-05 12:52:18 -08:00
Leonardo de Moura
6f943d77a2
feat(library/init/meta/interactive): add match_target pat interactive tactic
2017-12-05 12:25:17 -08:00
Leonardo de Moura
b1e8270172
chore(library/init/meta/match_tactic): fix typo
2017-12-05 12:11:04 -08:00
Leonardo de Moura
b5358b1b3e
chore(library/init/meta/interactive): add comment to avoid confusion
2017-12-05 12:07:17 -08:00
Leonardo de Moura
6d96741010
feat(library): provide names for constructor arguments
...
Motivation: `cases` and `induction` tactics use these names when the
user does not provide them.
2017-12-04 16:25:16 -08:00
Leonardo de Moura
c943576e5a
feat(library/init): add funext tactic
2017-12-04 14:54:39 -08:00
Leonardo de Moura
53c9737c70
feat(library/init): new repeat tactic
2017-12-04 12:55:53 -08:00
Leonardo de Moura
75aa94b34c
refactor(library): rename repeat ==> iterate
...
Reason: we will implement a new `repeat` tactic.
2017-12-04 12:34:59 -08:00
Leonardo de Moura
7b97e82fb3
chore(library): remove unnecessary repeat applications
2017-12-04 12:16:11 -08:00
Leonardo de Moura
d4e0dde063
chore(library/init/meta/relation_tactics): simplify subst_vars
2017-12-04 12:00:54 -08:00
Leonardo de Moura
b7322e28c1
feat(library): do not using simp lemmas for sorting arguments of AC operators by default
2017-12-03 15:03:58 -08:00
Leonardo de Moura
d9322b16ca
feat(library): add has_equiv type class
2017-12-03 15:03:58 -08:00
Leonardo de Moura
b6c8551753
feat(library): add to_bool lemmas
2017-12-03 15:03:58 -08:00
Leonardo de Moura
8032d2eefd
feat(library/init/algebra/order): add instance
2017-12-03 15:03:58 -08:00