Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[saw-core-coq] Fix weird universe constraints generated in SAWCorePreludeExtra #1481

Merged
merged 2 commits into from
Oct 14, 2021

Conversation

m-yac
Copy link
Contributor

@m-yac m-yac commented Oct 14, 2021

For some reason, a call to f_equal in the proof of unfold_fold_IRT was generating the constraint prod.u0 < eq.u0, which was causing problems when interacting with returnM_injective in CompMExtra, which generates the constraints:

eq.u0 = Coq.Relations.Relation_Definitions.1 <= prod.u0

Perhaps a better long-term solution is to figure out why returnM_injective generates these constraints and potentially modify it (I suspect it has to do with the use of ~=, which is an operator we need to revisit anyway due to its overlap with the notation for JMEq), but an easy short-term fix is just to modify the proof of unfold_fold_IRT to not use f_equal.

The purpose of this is to catch the situation where we have
a latent universe inconsistency.
Copy link
Contributor

@robdockins robdockins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

I took the liberty of adding a file that just imports everything else so we can more easily notice in the future if a similar universe problem arises.

@m-yac
Copy link
Contributor Author

m-yac commented Oct 14, 2021

Looks great, thanks Rob!

@m-yac m-yac added the PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run label Oct 14, 2021
@mergify mergify bot merged commit d3773e4 into master Oct 14, 2021
@mergify mergify bot deleted the saw-core-coq/fix-universe-constraints branch October 14, 2021 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants