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

[Merged by Bors] - fix(tactic/ring_exp): fix normalization proof of unchanged subexpressions #11394

Closed
wants to merge 1 commit into from

Conversation

Vierkantor
Copy link
Collaborator

When trying to simplify a goal (instead of proving equalities), ring_exp will rewrite subexpressions to a normal form, then simplify this normal form by removing extraneous + 0s and * 1s. Both steps return a new expression and a proof that the step's input expression equals the output expression.

In some cases where the normal form and simplified form coincide, ex.simplify would instead output a proof that ring_exp's input expression equals the output expression, so we'd get a type error in trying to compose a proof that a = b with a proof that a = b.

This PR fixes that bug by returning instead a proof that b = b, as expected.


Open in Gitpod

…ions

When trying to simplify a goal (instead of proving equalities), `ring_exp` will rewrite subexpressions to a normal form, then simplify this normal form by removing extraneous `+ 0`s and `* 1`s. Both steps return a new expression and a proof that the *step*'s input expression equals the output expression.

In some cases where the normal form and simplified form coincide, `ex.simplify` would instead output a proof that *ring_exp*'s input expression equals the output expression, so we'd get a type error in trying to compose a proof that `a = b` with a proof that `a = b`.

This PR fixes that bug by returning instead a proof that `b = b`, as expected.
@Vierkantor Vierkantor added awaiting-review The author would like community review of the PR t-meta Tactics, attributes or user commands awaiting-CI The author would like to see what CI has to say before doing more work. labels Jan 12, 2022
@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Jan 12, 2022
@robertylewis
Copy link
Member

Thanks!

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Jan 12, 2022
bors bot pushed a commit that referenced this pull request Jan 12, 2022
…ions (#11394)

When trying to simplify a goal (instead of proving equalities), `ring_exp` will rewrite subexpressions to a normal form, then simplify this normal form by removing extraneous `+ 0`s and `* 1`s. Both steps return a new expression and a proof that the *step*'s input expression equals the output expression.

In some cases where the normal form and simplified form coincide, `ex.simplify` would instead output a proof that *ring_exp*'s input expression equals the output expression, so we'd get a type error in trying to compose a proof that `a = b` with a proof that `a = b`.

This PR fixes that bug by returning instead a proof that `b = b`, as expected.
@bors
Copy link

bors bot commented Jan 12, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title fix(tactic/ring_exp): fix normalization proof of unchanged subexpressions [Merged by Bors] - fix(tactic/ring_exp): fix normalization proof of unchanged subexpressions Jan 12, 2022
@bors bors bot closed this Jan 12, 2022
@bors bors bot deleted the fix-ring_exp-normalize branch January 12, 2022 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) t-meta Tactics, attributes or user commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants