Zulip Chat Archive
Stream: Is there code for X?
Topic: tactics
Paige Thomas (May 29 2024 at 05:25):
Is there a tactic that does nothing but evaluate the result of a function? Is there also a tactic that does nothing but evaluate a decidable proposition?
Is there a list of all of the tactics somewhere with descriptions of each? I thought there was one, but I can't seem to find it.
Johan Commelin (May 29 2024 at 05:32):
See the discussion here for a list: https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/Lean.204.20tactics.20list/near/439268892
Paige Thomas (May 29 2024 at 05:33):
Ahh. Thank you.
Martin Dvořák (May 29 2024 at 05:47):
For your second question, decide
is the tactic.
I should probably add it to my list https://github.com/madvorak/lean4-tactics because it pops up quite often.
Paige Thomas (May 29 2024 at 05:52):
Thank you. Do you know what the tactic for the first would be, if the function is one I defined and not just a fun
in the proof?
Paige Thomas (May 29 2024 at 05:52):
Ie, should beta_reduce
work?
Mitchell Lee (May 29 2024 at 05:54):
What about dsimp
?
Paige Thomas (May 29 2024 at 05:55):
Oh. Ok, maybe, yeah. Thank you.
Aaron Eline (Jul 26 2024 at 17:42):
Let’s say I’m trying to prove a goal like a = g
and in my context I have a bunch of types like a = b
and b = f
and f = g
. Obviously I could rewrite each one manually, but I was wondering if there is a tactic that automates the equality chasing
Ruben Van de Velde (Jul 26 2024 at 17:45):
Try cc
Aaron Eline (Jul 26 2024 at 17:46):
Where does that tactic live?
Ruben Van de Velde (Jul 26 2024 at 17:49):
Mathlib.Tactic.CC
Aaron Eline (Jul 26 2024 at 17:49):
Ah thanks, don't have a dep on Mathlib sadly. Let me see if it can be easily extracted.
Ruben Van de Velde (Jul 26 2024 at 17:50):
Then probably rw
or maybe subst
Aaron Eline (Jul 26 2024 at 17:51):
Yeah rw
works but I have manually chain 4-5 equalities, and I was looking for automation. cc
looks perfect and thanks
Yakov Pechersky (Jul 26 2024 at 19:45):
Also maybe solve_by_elim
Kyle Miller (Jul 26 2024 at 22:45):
If each equality involves a variable on the LHS or RHS, you can do subst_vars
Kim Morrison (Jul 27 2024 at 01:04):
solve_by_elim
won't help here: it does backwards chaining of apply
, but knows nothing about equality.
There's in progress automation work on a new tactic grind
that will also solve these problems. But it's not ready yet.
Last updated: May 02 2025 at 03:31 UTC