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

Missing characteristic(R::MPolyQuoRing) method #4239

Open
fingolfin opened this issue Oct 24, 2024 · 8 comments
Open

Missing characteristic(R::MPolyQuoRing) method #4239

fingolfin opened this issue Oct 24, 2024 · 8 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@fingolfin
Copy link
Member

Presumably it would return characteristic(base_ring(R)) unless the ideal being factored out happens to be the the entire ring (then return 1). So that would require a GB computation (but hopefully that already is being cached?)

@fieker
Copy link
Contributor

fieker commented Oct 24, 2024 via email

@fingolfin
Copy link
Member Author

Dunno. But even if we only support it for the case were the coeffs are from a field it would already be useful.

@joschmitt
Copy link
Member

What is about Z[x,y]/<2>? Or is this illegal by type?

One can construct the ring and do something with it:

julia> R, (x, y) = ZZ["x", "y"]
(Multivariate polynomial ring in 2 variables over ZZ, ZZMPolyRingElem[x, y])

julia> S, _ = quo(R, ideal(R, [2]))
(Quotient of multivariate polynomial ring by ideal (2), Map: R -> S)

julia> iszero(one(S))
false

julia> iszero(2*one(S))
true

Whether this works by design or by accident I don't know.

@fingolfin
Copy link
Member Author

Thanks to @joschmitt for addressing this over fields. I guess for integers we could handle it by computing a GB and checking if it contains any degree 0 entries; if so, compute their gcd to get the characteristic.

Beyond that I guess it can get arbitrarily complicated and I'd be happy to throw the towel in the situations (as in, throw an error "if you want it, go ahead and implement it")

@thofma
Copy link
Collaborator

thofma commented Oct 26, 2024

Beyond that I guess it can get arbitrarily complicated and I'd be happy to throw the towel in the situations (as in, throw an error "if you want it, go ahead and implement it")

If the input is $I \subseteq R[x_1,...,x_n]$, one could do it generically by returning the characteristic of $R/I \cap R$. Generators for the intersection $R \cap I$ can be computed via a Gröbner basis as you described it.

@fingolfin fingolfin added the enhancement New feature or request label Oct 28, 2024
@fingolfin
Copy link
Member Author

Indeed. What I meant by "arbitrary complicated" is that then next we have to compute a quotient of R, and get its characteristic, and that can of course be a nasty quotient.

But in principle it shouldn't hard to write a generic method -- how well it works in practice is a separate question :-) (perhaps it should be an @attr method to ensure the computed value is remembered)

@JohnAAbbott
Copy link
Contributor

In reply to @fingolfin my guess is that the computation of the G basis would likely dominate other costs (though one could probably construct counter-examples to my guess); so we likely do not need to worry about a quotient of R being nasty.

@fieker
Copy link
Contributor

fieker commented Nov 6, 2024

open for grabs... no further discussion now, unless there is a use case

@fieker fieker removed the triage label Nov 6, 2024
@fingolfin fingolfin added the good first issue Good for newcomers label Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants