Zulip Chat Archive
Stream: LFTCM 2024
Topic: Things in Rocq I want in Lean
Riccardo Brasca (Mar 28 2024 at 08:26):
This is a random list of things I am seeing the Rocq tutorial and I would like to have in Lean (maybe the're already there and I don't know it):
- the abort command
Riccardo Brasca (Mar 28 2024 at 08:30):
- have ->
Riccardo Brasca (Mar 28 2024 at 08:38):
- rewrite seems easier to combine with other tactics
Riccardo Brasca (Mar 28 2024 at 08:55):
- rw [in ...]
Johan Commelin (Mar 28 2024 at 08:58):
search
in the middle of a tactic script
Johan Commelin (Mar 28 2024 at 09:09):
have -> : some_prop := by proof
as alternative torw [show some_prop by proof]
Floris van Doorn (Mar 28 2024 at 09:31):
Re: have ->
: I think it makes sense to add ←
and →
as rcases
patterns, to rewrite with the term immediately (forwards and backwards) and then clear it. Then you can write obtain → : ... := ...
Johan Commelin (Mar 28 2024 at 09:48):
Yeah, I don't mind whether it is have
or obtain
. I can also imagine that those two tactics get merged anyways.
Cyril Cohen (Mar 28 2024 at 11:11):
What is the difference between have and obtain btw?
Anne Baanen (Mar 28 2024 at 11:13):
have x : P := Q
requires that x
is a single variable, while obtain
accepts any destructuring pattern.
Anne Baanen (Mar 28 2024 at 11:14):
So obtain
is strictly more powerful than have
. And obtain
and rcases
are the same, apart from syntax.
Eric Rodriguez (Mar 28 2024 at 11:37):
Have does some destructuring now, I think
Richard Osborn (Mar 28 2024 at 12:12):
I believe you can write obtain rfl : a = b := ...
in current lean.
Edward van de Meent (Mar 28 2024 at 12:34):
there is some difference though... i believe obtain a := b
removes b
from the context, while have a := b
doesn't...
Edward van de Meent (Mar 28 2024 at 12:34):
so it's not exactly strictly more expressive
Last updated: May 02 2025 at 03:31 UTC