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

fix: avoid surprising symmetry inverse on refinement lemma #207

Closed
wants to merge 1 commit into from

Conversation

tobiasgrosser
Copy link
Collaborator

No description provided.

@@ -44,7 +44,7 @@ theorem none_right {x? : Option α} :
rintro ⟨⟩

theorem some_left {x : α} {y? : Option α} :
some x ⊑ y? ↔ y? = some x := by
some x ⊑ y? ↔ some x = y? := by
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am less sure about this change, we conventionally use variable = expr.

Copy link
Collaborator

@bollu bollu Mar 27, 2024

Choose a reason for hiding this comment

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

I would wait for @alexkeizer or @goens to think about whether this is worse for simp.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I find it surprising that this change flips the direction of the statement. This will require updates of our auto-generated proofs when applies as a simp lemma. We can leave it as it is and drop this PR. I just then know that when we activate this, we need to be careful.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The flip might be surprising, but it can be desirable. Say we have some x \sqsubseteq y? as an assumption, then simplifying that to y? = some x gives us a good hypothesis to rewrite along (eliminating the y? variable), while some x = y? would be a bad rewrite, losing some information.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK, got it. Thank you. I will close this then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants