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

Properly detect redundant parameter exceptions #54

Closed
SoongNoonien opened this issue Apr 29, 2024 · 3 comments
Closed

Properly detect redundant parameter exceptions #54

SoongNoonien opened this issue Apr 29, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@SoongNoonien
Copy link
Member

SoongNoonien commented Apr 29, 2024

As it has been seen in #51 there are places in the code where parameter exceptions are only returned after a (possibly partial) check for redundancy. It would be much better if there were a nicely documented function which decides if a parameter exception is redundant. And by redundant I mean if it isn't possibly for the exception to apply, so for example an exception 1//2+i ∈ ℤ can safely be ignored.
But it is worth noting that 1//2+i ∈ ℤ shouldn't occur in the first place as we usually deal with "reduced" polynomials where reduced means without integral part.

@SoongNoonien SoongNoonien added the enhancement New feature or request label Apr 29, 2024
@fingolfin fingolfin changed the title Propperly detect redundant parameter exceptions Properly detect redundant parameter exceptions May 15, 2024
@SoongNoonien
Copy link
Member Author

Also it might be worth reconsidering if a set is really the best data structure to store the exceptions. We need to compare the exceptions pairwise anyway to decide if they imply one another.

@SoongNoonien
Copy link
Member Author

With #155 the situation here improves. At least for all pairs of exceptions all cancellation should now be detected. But there are still exceptions which are never an integer but aren't irgnored. For example $\frac{3}{4} \in \mathbb{Z}$ or $\frac{1}{q+2} \in \mathbb{Z}$. Though I'm not sure if those can occur in the first place.

@fingolfin
Copy link
Member

Can we address this similar to what I describe in #177 ? I.e. $\frac{3}{4} \in \mathbb{Z}$ or $\frac{1}{q+2} \in \mathbb{Z}$ can be rewritten as $3 \in 4\mathbb{Z}$ or $1 \in (q+2)\mathbb{Z}$. And then trick to "factor the left side, kill any factors that are invertible modulo the right side simplifies the first to $1 \in 4\mathbb{Z}$.

Then finally, kill anything of the form c \in n \mathbb{ZZ} if c is an integer constant (here: 1) and the right hand modulus n is provably > 1. This is trivial in your examples. Of course it can be trickier if the modulus is e.g. $q-3$. In that case we actually do get a special case for $q=4$. And of course it can be more complicated...

That said, my instinct would be to close this for now as resolved, and open a new issue for concrete instances as they crop up. Most likely working towards the long-term vision outlined in #28 will yield more relevant examples

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

No branches or pull requests

2 participants