Zulip Chat Archive

Stream: general

Topic: nested exception: no goals


Scott Morrison (Sep 08 2019 at 12:33):

Anyone ever seen this before:

The nested exception contains the failure state for the decreasing tactic.
nested exception message:
tactic failed, there are no goals to be solved
state:
no goals

Keeley Hoek (Sep 08 2019 at 12:42):

Does it just mean that dec_tac in using_well_founded failed because a tactic inside expected goals when there weren't any, e.g. with an appeal to refl at the end when everything is gone already?

Scott Morrison (Sep 08 2019 at 12:51):

Hmm... I was getting this without an explicit using_well_founded!

Scott Morrison (Sep 08 2019 at 12:51):

Anyone, I seem to have found a workaround.

Keeley Hoek (Sep 08 2019 at 12:53):

I would suspect that the culprit is something like the tactic.dunfold_targets in init.meta.well_founded_tactics (which run by default)

Keeley Hoek (Sep 08 2019 at 12:53):

Probably there should be some trys wrapping some of that code

Scott Morrison (Sep 08 2019 at 12:56):

ah... I had just found that same file. :-)

Scott Morrison (Sep 08 2019 at 12:56):

But this is in core :-(

Scott Morrison (Sep 08 2019 at 12:56):

So sad.

Keeley Hoek (Sep 08 2019 at 12:57):

indeed

Scott Morrison (Sep 08 2019 at 12:59):

3.5...

Keeley Hoek (Sep 08 2019 at 13:00):

I half typed a comment about that but thought it was a bit sassy

Scott Morrison (Sep 09 2019 at 07:17):

Ok, I've addressed this problem in #1419. It comes at a slight cost: having to add using_well_founded { dec_tac := well_founded_tactics.default_dec_tac' } to half a dozen proofs across mathlib, to used the patched version of default_dec_tac.

Scott Morrison (Sep 09 2019 at 07:18):

I think it's worth it however, to let us make simp better at inequalities.

Keeley Hoek (Sep 09 2019 at 07:47):

@Scott Morrison I think you could do better with the syntax by just defining a structure somewhere with a short name (e.g. wf_tacs) and type well_founded_tactics, equal to { dec_tac := well_founded_tactics.default_dec_tac' }.

Keeley Hoek (Sep 09 2019 at 07:48):

Then using_well_founded wf_tacs works. Depending on how much of a hack using_well_founded is in the parser (probably a lot), we could even define notation for that; maybe using_well_founded'

Keeley Hoek (Sep 09 2019 at 07:50):

Yeah, I have no idea how to do the notation thing, probably not possible.

Keeley Hoek (Sep 09 2019 at 07:51):

Actually, I think with some work I could make it work if you wrote recdef instead of def for the recursive definition, but I don't know a way to make using_well_founded wf_tacs shorter.

Keeley Hoek (Sep 09 2019 at 07:52):

Also, we should put default_dec_tac' in lean 3.5.0 right away

Scott Morrison (Sep 09 2019 at 08:32):

What is the procedure for adding patched tactics in 3.5.0? We both replace the old broken tactic, and add the primed version as an alias for backwards compatibility?

Scott Morrison (Sep 09 2019 at 09:35):

Thanks for this syntax suggestion, I've added it to the PR now.

Keeley Hoek (Sep 09 2019 at 09:37):

I think maybe no-one has patched a tactic yet?
Or just, maybe they have fixed bugs like stuff crashing all of lean if you use it wrong.---not a useful enough fix to warrant a copy to mathlib.


Last updated: Dec 20 2023 at 11:08 UTC