saw-core-rocq: Repair solveUnsafeAssert - #3338
Conversation
This is done for symmetry with `addNat_add` and `mulNat_mul`, whose proofs are similarly trivial.
There were two problems: 1. It was never brought into scope when `write_rocq_term` was used to generate Rocq code due to a missing `CryptolPrimitivesForSAWCoreExtra` import. We fix this by adding the import to the top of the generated file. 2. The definition of `solveUnsafeAssert` itself was not properly simplifying proof goals. It is unclear to me if this is a change brought on by more recent versions of Rocq, but in any case, repairing this appears to be a matter of being more precise with `unfold`s and `rewrite`s. Fixes #3336.
|
Unfortunately, I don't have a great way to add a regression test for this, as the existing |
|
In the absence of more comprehensive testing (#3335), I spot-checked what happens if you typecheck the generated Rocq code under
|
|
Having taking a closer look at the causes of these type errors, I think it would be best to leave each of these as future work, as they aren't easily resolvable by simply changing the definition of
|
There were two problems:
write_rocq_termwas used to generate Rocq code due to a missingCryptolPrimitivesForSAWCoreExtraimport. We fix this by adding the import to the top of the generated file.solveUnsafeAssertitself was not properly simplifying proof goals. It is unclear to me if this is a change brought on by more recent versions of Rocq, but in any case, repairing this appears to be a matter of being more precise withunfolds andrewrites.Fixes #3336.