Commit graph

346 commits

Author SHA1 Message Date
Sebastian Ullrich
67fc899d0d feat(shell/server): sync: default "content" to file content
This mostly simplifies debugging and testing
2018-01-23 11:14:18 -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
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
f1510a82c7 chore(tests/lean): fix tests 2017-12-10 19:30:43 -08:00
Leonardo de Moura
1b34160396 feat(library/tactic/tactic_state): display number of goals 2017-12-06 11:20:09 -08:00
Floris van Doorn
52ee29cb48 fix(interactive): fix focus tactic.
Previously it would fail if there was more than one goal.
2017-11-03 12:58:48 -07:00
Jeremy Avigad
bcad5309d9 fix(library/init/meta/interactive): implement docstring fixes from kha 2017-09-22 16:53:22 -04:00
Jeremy Avigad
57f9cbeb78 fix(tests/lean/interactive/*): fix tests 2017-09-21 21:16:20 -04:00
Leonardo de Moura
51bac2918f chore(library/init/core): declare and using structure
This change was requested by several users.
2017-09-05 15:08:20 -07:00
Gabriel Ebner
ce509e621a refactor(library/init/algebra): remove order_pair classes 2017-08-02 14:41:35 +01:00
Mario Carneiro
ec82afb45a fix(tests): fix tests 2017-07-28 16:47:02 +01:00
Mario Carneiro
94ecc3292f fix(tests): fix tests 2017-07-21 02:10:48 -07:00
Sebastian Ullrich
f8cfc4ea1b feat(kernel/error_msgs,frontends/lean/elaborator): add more context to 'type/function expected' errors 2017-07-21 01:46:31 -07:00
Sebastian Ullrich
2bfdcc9069 chore(tests/lean/interactive/info_tactic): make independent of stdlib tactics 2017-07-07 11:22:12 +02:00
Sebastian Ullrich
99a87a9d01 chore(tests/lean/interactive/complete_field): remove. Not supported with new field notation anyway. 2017-07-07 11:22:10 +02:00
Gabriel Ebner
f55d10bb50 chore(tests/lean/interactive): fix tests 2017-07-06 16:32:50 +02:00
Jeremy Avigad
5fd113f50f feat(library/init/logic): add simp rule for 'true implies p' 2017-07-05 14:26:04 -07:00
Leonardo de Moura
bb9e3ddae2 feat(library/init/meta/interactive): rw [-h] ==> rw [← h]
@Armael: this change may affect your project.

The file `doc/changes.md` explains the motivation for the change.
2017-07-05 11:42:55 -07:00
Leonardo de Moura
b68fe0d645 chore(tests/lean/interactive): fix test 2017-07-04 11:57:16 -07:00
Leonardo de Moura
b86847ec72 fix(library/init/logic): mark eq.substr with [elab_as_eliminator]
See issue #1718
2017-07-03 17:27:41 -07:00
Leonardo de Moura
e24f3341d4 feat(library/init/meta/interactive): simp without foo ==> simp [-foo]
This commit also adds "exception" validation.
A bad "exception" was being silently ignored.
We can also exclude hypotheses. Example: `simp [*, -h]`
2017-07-03 17:10:46 -07:00
Leonardo de Moura
76799db032 feat(library/init/meta/interactive): simph ==> simp [*]
This modification was suggested by @kha.

TODO:
- Use `simp [-f]` instead of `simp without f`
- Allow users to remove hypothesis from `*`. Example: `simp [*, -h]`
  for simplify using all hypotheses but `h`.
2017-07-03 15:14:47 -07:00
Leonardo de Moura
16711fcdba feat(library/tactic/dsimplify): new configuration options for dsimp
TODO for `dsimp`:
- Add an option for reducing [reducible] definitions
- Add (to_unfold : list name) similar to the one in the `simp` tactic
2017-07-02 18:26:03 -07:00
Leonardo de Moura
0b36e014e6 chore(tests/lean): fix tests 2017-07-01 21:12:29 -07:00
Leonardo de Moura
4604d7fd5a feat(library/init/meta): allow users to specify tactic for discharging subgoals in the simp tactic family
@dselsam @Armael: this feature may be useful for you.
The doc/changes.md describes many other new features.
2017-07-01 15:35:33 -07:00
Leonardo de Moura
2f2694a343 chore(tests/lean/interactive/info_tactic): fix test output 2017-07-01 13:11:07 -07:00
Leonardo de Moura
b05c4e09ed feat(library/init/meta): add memoize field to simp_config and dsimp_config
We use `memoize := ff` when implementing `conv.interactive.for` and
`conv.interactive.find`.
2017-07-01 10:37:09 -07:00
Leonardo de Moura
f7fe2a775c feat(library/init/meta/rewrite_tactic): improve rewrite tactic
`rewrite` tactic improvements
- Add support for `auto_param` and `opt_param`
- Order new goals using the same strategies available for `apply`
- Allow user to set configuration object in interactive mode.

@Armael This commit should address the issue you raised about the order
of new goals in the `rewrite` tactic.
See new test tests/lean/run/rw1.lean for examples.
2017-06-30 12:03:27 -07:00
Leonardo de Moura
fe51bebab3 refactor(library/init/meta/converter): new conv monad implementation 2017-06-29 16:37:22 -07:00
Mario Carneiro
47c3c0ba84 fix(tests/*): fix tests 2017-06-22 08:24:19 -07:00
Leonardo de Moura
51a28828d6 chore(tests/lean/interactive/info_tactic): fix test 2017-06-21 17:03:24 -07:00
Mario Carneiro
e6f3c5cc22 fix(tests/lean/interactive/mk_input): strip \r from input files (win) 2017-06-21 08:53:11 +02:00
Leonardo de Moura
2866607319 chore(tests): fix tests 2017-06-18 18:33:38 -07:00
Leonardo de Moura
fe774a25cf chore(tests/lean/interactive): fix tests 2017-06-15 10:56:09 -07:00
Leonardo de Moura
5cb96c7fa3 feat(frontends/lean): add option for pretty printing metavars, sorry and delayed abstractions as holes
This option is false by default, but true when executing hole commands
2017-06-15 10:24:26 -07:00
Gabriel Ebner
028c31779d fix(frontends/lean/interactive): revert hole end column
I have tested this change in both emacs and vscode, and replacements
work correctly.

This reverts commit 6c2a144950.
2017-06-15 17:01:10 +02:00
Leonardo de Moura
6c2a144950 fix(frontends/lean/interactive): hole end column 2017-06-15 07:36:11 -07:00
Leonardo de Moura
ba25d4876e feat(frontends/lean/info_manager): multi-line holes 2017-06-15 07:23:06 -07:00
Gabriel Ebner
a001e85d82 fix(frontends/lean/builtin_exprs): set hole position after final token 2017-06-15 11:35:43 +02:00
Leonardo de Moura
7557a9e000 feat(shell/server,frontends/lean): add "hole_commands" server command
The new command returns the list of registered/applicable hole
commands.
2017-06-14 22:16:34 -07:00
Sebastian Ullrich
a72687661b fix(util/stackinfo): avoid and guard against negative overflow in g_stack_threshold computation 2017-06-07 13:22:11 +02:00
Jeremy Avigad
4592210e10 fix(tests/lean/*): fix and expand tests 2017-06-04 13:23:26 -07:00
Jeremy Avigad
650870fd0e fix(tests/lean/interactive/*): fix tests 2017-06-04 13:23:26 -07:00
Jeremy Avigad
4160f23847 fix(library/init/meta/interactive): fix printing of description string for locations 2017-06-04 13:23:26 -07:00
Leonardo de Moura
ca5439c698 feat(frontends/lean/tactic_notation): add support for tac ; [tac_1, ..., tac_n] notation in interactive tactic mode
closes #1634

This commit also changes the semantic of `tactic.focus [tac_1, ..., tac_n]`.
It now fails if the number of goals is not `n`.
Before it would only fail if there were more tactics than goals.

@Armael: See tests/lean/run/handthen.lean for examples of the new notation.
2017-06-02 11:38:04 -07:00
Leonardo de Moura
d10a799b79 chore(tests/lean/interactive/complete_field): fix test 2017-05-27 10:18:44 -07:00
Gabriel Ebner
95300224aa fix(frontends/lean/builtin_cmds): suppress unhelpful #check output 2017-05-23 11:14:31 -07:00
Gabriel Ebner
183bf63e26 fix(frontends/lean/parser): pass error-recovery flag from parser to elaborator 2017-05-23 11:14:31 -07:00
Gabriel Ebner
166c07e1fe fix(frontends/lean/elaborator): do not leak _elab_u names 2017-05-23 11:14:31 -07:00
Gabriel Ebner
d27a0eff15 chore(tests): fix tests 2017-05-23 11:14:31 -07:00