Commit graph

16 commits

Author SHA1 Message Date
Leonardo de Moura
2832442e7a fix: unfold declarations tagged with [matchPattern] at reduceMatcher? even if transparency setting is not the default one
see #1193

It fixes one of the issues exposed at the issue above.
2022-06-06 15:53:40 -07:00
Leonardo de Moura
9ee529e5ce fix: use PSum instead of Sum when using well-founded recursion
See new test for example that did not work with `Sum` because type
alpha was `Sort u`.
2022-02-17 16:14:34 -08:00
Leonardo de Moura
381f66428a chore: use termination_by'
We are going to define a higher level syntax for `termination_by`.
2022-01-11 15:00:53 -08:00
Leonardo de Moura
1cf8467847 feat: add unfold conv tactic 2022-01-07 13:51:45 -08:00
Leonardo de Moura
49d0f3af52 test: unfold tactic 2022-01-07 13:51:45 -08:00
Leonardo de Moura
6234c60aae chore(*): disable test suite 2018-04-10 12:56:55 -07:00
Leonardo de Moura
abef98c772 refactor(library/init/meta/simp_tactic): make sure dunfold tactics use name convention used at simp, dsimp, ... 2017-07-03 21:36:17 -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
d3c340a30c feat(library/init/meta): improve induction tactic interface
It uses .rec recursor when it is not specified
2017-02-17 10:58:51 -08:00
Leonardo de Moura
f650a1b873 refactor(library/init/meta): avoid '_core' idiom using default parameters
I kept a few core methods (e.g., exact_core and apply_core). Reason:
if we use default parameters

    meta constant exact (e : expr) (md := semireducible) : tactic unit

then, we will not be able to write

    to_expr p >>= exact

The workaround is

    do t <- to_expr p, exact t

or
    to_expr p >>= (fun x, exact x)

One alternative is to change how we handle default parameters, and
eta-expand applications that involve default parameters.
We may also have an attribute [eta_expand]. Then

    attribute [eta_expand] foo

instructs the elaborator to automatically eta-expand foo-applications.
The attribute would give users more control, and avoid potential
performance problems. Without the attribute, then for every function
application the elaborator has to check the type and decide whether it
must be eta-expanded or not.

@gebner @kha What do you think?
2017-02-14 09:46:55 -08:00
Leonardo de Moura
9f6e71b374 feat(library/tactic): add "approximate" parameter to apply_core and rewrite_core
If this parameter is set to true, then approximate unification is
used.

closes #1208
2016-12-10 10:24:05 -08:00
Leonardo de Moura
ef23c591fc feat(library/init/meta): implement unfold tactics in Lean using new building blocks 2016-10-12 17:25:56 -07:00
Leonardo de Moura
148da46481 feat(frontends/lean): 'mutual' and 'meta' are now keywords 2016-09-24 10:44:40 -07:00
Leonardo de Moura
63be1418f7 refactor(library/init): move files to new elaborator 2016-09-16 08:31:21 -07:00
Leonardo de Moura
7ddf1e817b chore(frontends/lean): coercions are disabled by default 2016-07-29 13:03:23 -07:00
Leonardo de Moura
0d8213cf92 feat(library/tactic): add unfold tactic 2016-07-18 15:46:56 -04:00