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(tactic/polyrith): fix crash when hypotheses are constant polynomials #17142

Closed
wants to merge 1 commit into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Oct 25, 2022

Without adding P() to the constaints, we end up with 2 : builtins.int instead of 2 : sage.SomePolynomialType, and things only go downhill from there.

Also adds support for the case when there are no variables, by working around a bug in Sage where 0-variate polynomials fail to interface with the "Singular" C library correctly; the workaround is to just introduce a dummy variable.

Closes #17141

This came up on the Xena discord.


Open in Gitpod

Also adds support for the case when there are no variables, by working around a bug in Sage.
@eric-wieser eric-wieser requested a review from a team as a code owner October 25, 2022 00:23
@eric-wieser eric-wieser added the t-meta Tactics, attributes or user commands label Oct 25, 2022
@semorrison
Copy link
Collaborator

I'll label this as not-too-late in case we need to confirm whether this bug exists in Mathlib still.

@semorrison semorrison added the not-too-late This PR was ready at the point mathlib3 was frozen: we will try to merge it and port it to mathlib4 label Jul 16, 2023
eric-wieser added a commit to leanprover-community/mathlib4 that referenced this pull request Oct 9, 2023
@eric-wieser
Copy link
Member Author

I'll label this as not-too-late in case we need to confirm whether this bug exists in Mathlib still.

It does, I just made a PR to fix it.

@eric-wieser eric-wieser added the awaiting-review The author would like community review of the PR label Oct 17, 2023
bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Oct 18, 2023
…als (#7586)

This forward-ports leanprover-community/mathlib#17142

The tests are commented out because the test framework for polyrith was never ported. You can check out the branch and run polyrith manually to see that everything is ok.
@eric-wieser
Copy link
Member Author

Closing since this was fixed in leanprover-community/mathlib4#7586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review The author would like community review of the PR bug not-too-late This PR was ready at the point mathlib3 was frozen: we will try to merge it and port it to mathlib4 t-meta Tactics, attributes or user commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

polyrith fails if expression is an equality of numerals
2 participants