Commit graph

17 commits

Author SHA1 Message Date
Joachim Breitner
b181fd83ef
feat: in conv tactic, use try with_reducibe rfl (#3763)
The `conv` tactic tries to close “trivial” goals after itself. As of
now, it uses
`try rfl`, which means it can close goals that are only trivial after
reducing with
default transparency. This is suboptimal

* this can require a fair amount of unfolding, and possibly slow down
the proof
   a lot. And the user cannot even prevent it.
* it does not match what `rw` does, and a user might expect the two to
behave the
   same.

So this PR changes it to `with_reducible rfl`, matching `rw`’s behavior.

I considered `with_reducible eq_refl` to only solve trivial goals that
involve equality,
but not other relations (e.g. `Perm xs xs`), but a discussion on mathlib
pointed out
that it’s expected and desirable to solve more general reflexive goals:


https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Closing.20after.20.60rw.60.2C.20.60conv.60.3A.20.60eq_refl.60.20instead.20of.20.60rfl.60/near/429851605
2024-03-29 11:59:45 +00:00
Mario Carneiro
5f39370d94 chore: rename skip conv to rfl and add no-op skip 2022-08-01 13:54:36 -07:00
Leonardo de Moura
04b7924154 chore: fix tests 2021-09-16 10:29:38 -07:00
Leonardo de Moura
029c5b74a2 feat: ignore implicit arguments at congr conv tactic 2021-09-05 09:44:52 -07:00
Leonardo de Moura
aedc706e7d feat: in modifier at conv tactic
It is just a macro for `pattern`
2021-09-04 18:20:33 -07:00
Leonardo de Moura
229373a7e6 chore: fix test 2021-09-03 18:59:13 -07:00
Leonardo de Moura
3f70bc543f feat: add simp conv tactic 2021-09-03 12:06:29 -07:00
Leonardo de Moura
8a249bddd2 feat: add try rfl at end of convTarget 2021-09-03 08:14:47 -07:00
Leonardo de Moura
b5b5ef6fdf feat: add funext conv tactic 2021-09-03 08:00:37 -07:00
Leonardo de Moura
95b83ac2c0 feat: add 'conv at .. => ..' support 2021-09-02 19:40:08 -07:00
Leonardo de Moura
397774157f feat: nested tactic support in conv mode 2021-09-02 19:12:05 -07:00
Leonardo de Moura
41ce24e2c6 feat: add done and traceState conv tactics 2021-09-02 18:46:03 -07:00
Leonardo de Moura
33361929b9 feat: add rewrite conv tactic 2021-09-02 18:13:19 -07:00
Leonardo de Moura
4df9983843 feat: lhs and rhs conv tactics 2021-09-02 15:05:51 -07:00
Leonardo de Moura
e3ccc03a45 chore: add nested conv tactics 2021-09-01 18:44:35 -07:00
Leonardo de Moura
7a69c6483d feat: add congr conv tactic 2021-09-01 18:32:21 -07:00
Leonardo de Moura
346e3ac845 feat: add helper methods for conv 2021-09-01 17:43:32 -07:00