Prevent zify from looping#273
Conversation
|
@yannl35133 CI is not happy, the VST failure is known and unrelated, the metarocq one is likely unrelated too but others look like actual failures. |
53ff657 to
745bf88
Compare
|
@yannl35133 the VST and metarocq failures are known and unrelated but the bedrock2 failure looks real |
|
The first version worked well but only fixed the issue in >= 9.3. (or we consider that omega's internals are really internals and ask bedrock maintainers to fix their proof script) |
|
bedrock2 should not depend on variable names given by destruct in zify, I believe @andres-erbsen @samuelgruetter would agree But if you want a backwards compat version at the cost of slowdown you can do something like: Or use Ltac2 and length of Control.hyps to see whether destruct adds 1 hyp or 2 hyps net. |
|
Does that work? clear in <9.3 does not fail when H is ltac bound even if destruct cleared it first |
|
Or how about this version (untested): I believe that it would be backwards-compatible even with code that relies on hypothesis names, because in the non-section-var case, it does the same as before, and in the section-var-case, we previously had an infinite loop that prevented this tactic from being used. |
Use
Presumably you need to wrap |
I think it's fine to only fix on Rocq >= 9.3. Eventually (in about a year) the Stdlib library will require Rocq >= 9.3 and the fix will work for all supported version. As a side note, fixing only for master would be what would have been done before Stdlib became an actual library.
An overlay would indeed be a solution. In that case we need a changelog entry though, to warn other users who could have done the same mistake. |
Fixes / closes rocq-prover/rocq#22093