Leonardo de Moura
e1c76578c1
chore(tests/lean/run, doc/changes): more tests and document new feature
2017-06-29 17:12:04 -07:00
Leonardo de Moura
fe51bebab3
refactor(library/init/meta/converter): new conv monad implementation
2017-06-29 16:37:22 -07:00
Leonardo de Moura
5dee3415a4
feat(library/init/meta/simp_tactic): add flag for controlling whether simp-tactics fail when input input expression is not modified
2017-06-29 16:03:20 -07:00
Leonardo de Moura
99d55811e4
feat(library/tactic/match_tactic): automatically convert metavariables occurring in patterns into temporary metavariables (i.e., which are considered during matching)
2017-06-29 11:39:18 -07:00
Gabriel Ebner
a93528df24
fix(leanpkg): read carriage-return as whitespace
2017-06-29 14:25:59 +02:00
Leonardo de Moura
a7b895525b
feat(library/tactic/simp_lemmas): simp lemmas may contain metavariables
...
@dselsam `simp` now supports lemmas containing metavariables.
The metavariables are automatically converted into tmp metavars.
The new test contains a few examples.
2017-06-28 18:17:21 -07:00
Leonardo de Moura
103b5d09b3
feat(library/init/meta/tactic): add option for not creating new subgoals at to_expr
2017-06-28 16:46:29 -07:00
Leonardo de Moura
6669ff2132
feat(library/init/meta): add conv interactive mode
...
Remark: this is just the first step, we still need to populate the
`conv.interactive` namespace with tactics such as rewrite, simp, etc.
2017-06-28 16:09:49 -07:00
Leonardo de Moura
73b6facd1e
refactor(library/init/meta): move replace_hyp to tactic.lean
2017-06-28 14:27:32 -07:00
Sebastian Ullrich
08495eef27
refactor(init/meta,frontends/lean/tactic_notation): assume_tac -> «assume» etc.
...
Fixes the eldoc display.
Also allow arbitrary keywords as tactics
2017-06-28 10:43:19 -07:00
Mario Carneiro
c06c62c03e
refactor(init/data/nat/gcd): define gcd using eqn compiler
2017-06-27 18:55:52 -07:00
Mario Carneiro
9f2980a524
feat(init/data/int): int lemmas, more bitwise theorems
2017-06-27 18:55:52 -07:00
Mario Carneiro
9f4f93e931
feat(init/data/int): prove int bitwise ops
2017-06-27 18:55:52 -07:00
Mario Carneiro
e705d89490
feat(init/data/int): bitwise ops for integers
2017-06-27 18:55:52 -07:00
Mario Carneiro
a63bafcc5c
refactor(init/data/nat/bitwise): change definitions to avoid WF
...
The type-correctness of binary_rec_eq (the statement, not the proof) depends on unfolding the embedded well-founded definition of mod. This definition avoids it by using two simpler functions bodd and div2 that reduce well in the kernel.
2017-06-27 18:55:52 -07:00
Sebastian Ullrich
9033cba7d3
feat(frontends/lean,init/meta/interactive): assume and suppose tactics
2017-06-27 18:50:10 -07:00
Leonardo de Moura
6ba425da6a
feat(library/init/meta/interactive): add apply_with interactive tactic
...
The new tactic allows us to set apply_cfg in interactive mode.
2017-06-27 18:37:13 -07:00
Leonardo de Moura
e971acabb0
feat(library/init/meta): handle auto_params and opt_params at apply tactic
2017-06-27 18:17:48 -07:00
Leonardo de Moura
cdec07fc81
feat(library/init/meta/interactive): address issue raised in comment at #1374
...
The example at
https://github.com/leanprover/lean/issues/1342#issuecomment-307912291
2017-06-27 16:45:21 -07:00
Leonardo de Moura
9b03309d83
fix(library/equations_compiler): performance problem reported by @dselsam
2017-06-27 15:24:12 -07:00
Leonardo de Moura
9fdb1c4a4d
chore(library/init/meta/tactic): mark id_locked as [inline]
2017-06-27 13:43:24 -07:00
Leonardo de Moura
5a2b7348f9
feat(library/tactic/apply_tactic): make apply tactic more robust
...
See issue #1342
Support for auto_param and opt_param have not been implemented yet.
2017-06-27 10:42:26 -07:00
Daniel Selsam
8ccdf350de
fix(data/hash_map.lean): rm unused argument to contains_iff
2017-06-26 12:43:36 -07:00
Mario Carneiro
b9c2659b5d
fix(init/meta/interactive): generalize2 rollback if typecheck fails
2017-06-26 12:35:27 -07:00
Daniel Selsam
d95b003c0b
feat(init/meta/congr_tactic.lean): tactic to apply congruence rules
2017-06-26 09:17:53 -04:00
Leonardo de Moura
ce5ca79edf
feat(library/init/meta): add type_check tactic
...
closes #1697
2017-06-25 15:26:32 -07:00
Mario Carneiro
d3d5982544
fix(init/meta/mk_dec_eq_instance): bug for dependent structures
2017-06-25 14:55:47 -07:00
Gabriel Ebner
30a9217a78
feat(library/type_context): unfold lemmas in major premise of acc.rec
2017-06-22 08:33:11 -07:00
Sebastian Ullrich
4d5d2abcba
fix(init/meta): fix build
2017-06-22 08:24:36 -07:00
Mario Carneiro
09af93186a
fix(frontends/lean/elaborator): @applications don't make thunks
2017-06-22 08:24:11 -07:00
Sebastian Ullrich
0a48809469
refactor(frontends/lean/tactic_notation): rename note/define tactics to have/let
2017-06-22 08:03:23 -07:00
Mario Carneiro
9f31096892
refactor(init/meta/interactive): rename pose -> define
2017-06-22 08:03:23 -07:00
Mario Carneiro
b775a01fba
refactor(init/meta/interactive): merge assert -> note
2017-06-22 08:03:23 -07:00
Leonardo de Moura
671b6240c1
fix(library/init/meta): make sure rw still produces useful error messages
2017-06-21 20:58:59 -07:00
Leonardo de Moura
14d768ffa2
feat(library/init/meta/interactive): add simp_all tactic
...
@Armael I added the simp_all tactic. See new test for an example.
2017-06-21 20:43:56 -07:00
Leonardo de Moura
058d073cba
feat(library/init/meta/interactive): allow user to write rw [f] to rewrite using the equational lemmas for f
...
The tactic succeeds if the expression can be rewritten using one of the
equational lemmas associated with `f`.
See discussion at #1680
2017-06-21 18:56:18 -07:00
Leonardo de Moura
35b99aafb2
feat(library/init/category/combinators): add list.mfirst
2017-06-21 18:53:22 -07:00
Leonardo de Moura
b9dee04fdb
feat(library/tactic/simplify): add single_pass simplifier option (default is false)
2017-06-21 16:41:54 -07:00
Scott Morrison
629d5ebbe8
feat(init/meta/simp_tactic) tactics that revert hypotheses should allow elet expressions
...
Conflicts:
library/init/meta/simp_tactic.lean
2017-06-21 13:58:46 -07:00
Scott Morrison
6aba80d389
feat(library/init/meta/simp_tactic,library/init/meta/interactive) interactive tactics for unfold_projection
2017-06-21 13:51:52 -07:00
Mario Carneiro
636e65a216
fix(init/meta/interactive): elab terms of change-with using same type
2017-06-20 12:34:29 -07:00
Leonardo de Moura
cfa34dc83e
chore(library): remove workarounds for issue #1682
2017-06-19 16:09:12 -07:00
Sebastian Ullrich
91c77680c8
refactor(init/meta/coinductive_predicates,frontends/lean/inductive_cmds): declare coinductive in Lean
2017-06-19 11:27:12 -07:00
Sebastian Ullrich
4d444b8b18
feat(init/meta/lean/parser): persist environment in tactic_to_parser
2017-06-19 11:27:12 -07:00
Sebastian Ullrich
492cb20438
feat(init/meta/{interactive_base,parser}): decl_attributes, decl_meta_info, parser.set_env
2017-06-19 11:27:12 -07:00
Gabriel Ebner
2e142d87ae
fix(library/init/data/repr): give correct implementation of nat.repr
2017-06-19 16:20:27 +02:00
Gabriel Ebner
82bb37422d
fix(library/init/data/int): add to_string instance for integers
2017-06-19 14:30:58 +02:00
Leonardo de Moura
b8fa7f5311
fix(library): expr, level, hash_map, rb_map has_repr instances should be has_to_string since they do not produce results that can be parsed by Lean
...
See #1664
2017-06-18 18:33:27 -07:00
Leonardo de Moura
049fecee23
fix(library/init): name has_repr instance is actually a has_to_string instance
...
See #1664
2017-06-18 18:33:16 -07:00
Leonardo de Moura
8b88f21c91
refactor(library): add has_to_string back (but it produces unquoted values)
...
See issue #1664
2017-06-18 18:30:10 -07:00