Commit graph

8 commits

Author SHA1 Message Date
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