Zulip Chat Archive
Stream: general
Topic: Equivalent to Coq's compute tactic
Konstantin Weitz (Jul 29 2025 at 16:32):
How do I fully evaluate a goal in lean, including unfolding all definitions etc.
Henrik Böving (Jul 29 2025 at 16:35):
You can use decide for things that are, well, decidable. If you are looking to fully reduce and then continue proving the answer is that we do not encourage this mode of proof as it leads to impossible to refector APIs and you should instead try to work with grind and simp
Konstantin Weitz (Jul 29 2025 at 16:46):
Yes i'd like to fully reduce and then continue the proof. Are you saying there is no way to do it?
Konstantin Weitz (Jul 29 2025 at 16:49):
Is there a way to mark all the definitions that I'd like to be automatically unfolded by simp?
suhr (Jul 29 2025 at 16:50):
dsimp, but you need to list all the definitions you want to unfold.
Kyle Miller (Jul 29 2025 at 16:51):
Usually people use simp with the definitions they would like to unfold.
The reduce tactic in mathlib reduces everything. Like Henrik said, this approach is really not recommended. We have reduce for exploration purposes.
Could you give a #mwe that illustrates a goal where you'd want to use the Coq compute tactic?
Thomas Murrills (Jul 29 2025 at 16:53):
Konstantin Weitz said:
Is there a way to mark all the definitions that I'd like to be automatically unfolded by simp?
For this, you might be looking for @[simps] (or @[simps!] if necessary) if you have access to Mathlib, which will generate a simp lemma for each (dataful) projection. But whether it’s what you really want depends on the situation.
Last updated: Dec 20 2025 at 21:32 UTC