oscar-system / Oscar.jl

A comprehensive open source computer algebra system for computations in algebra, geometry, and number theory.
https://www.oscar-system.org
Other
344 stars 126 forks source link

Invalid equality in quotient rings. #1716

Closed SyxP closed 1 year ago

SyxP commented 1 year ago

We construct the ring $S = \mathbb Z[x]/\langle 2x \rangle$ and observe that $3x \neq x\bmod{S}$.

julia> R, (x,) = PolynomialRing(ZZ, ["x"]);

julia> S, π = quo(R, [2x])
(Quotient of Multivariate Polynomial Ring in x over Integer Ring by ideal(2*x), Map from
Multivariate Polynomial Ring in x over Integer Ring to S defined by a julia-function with inverse)

julia> π(2x) == π(zero(R))
true

julia> π(3x) == π(x)
false

julia> iszero(π(3x) - π(x))
true

We should expect π(3x) == π(x) to return true.

julia> Oscar.versioninfo(full=true)
OSCAR version 0.11.0
  combining:
    AbstractAlgebra.jl   v0.27.6
    GAP.jl               v0.8.5
    Hecke.jl             v0.15.8
    Nemo.jl              v0.32.4
    Polymake.jl          v0.8.2
    Singular.jl          v0.14.0
  building on:
    Antic_jll               v0.201.500+0
    Arb_jll                 v200.2300.0+0
    Calcium_jll             v0.401.100+0
    FLINT_jll               v200.900.1+0
    GAP_jll                 v400.1192.2+1
    Singular_jll            v403.101.400+0
    libpolymake_julia_jll   v0.8.3+0
    libsingular_julia_jll   v0.27.0+0
    polymake_jll            v400.700.1+1
See `]st -m` for a full list of dependencies.

Julia Version 1.8.2
Commit 36034abf260 (2022-09-29 15:21 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × AMD Ryzen 7 PRO 3700U w/ Radeon Vega Mobile Gfx
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, znver1)
  Threads: 1 on 8 virtual cores
Official https://julialang.org/ release
tthsqe12 commented 1 year ago

This is an issue with Singular. @hannes14 any ideal why the kNF is not reducing the 3 to a 1? In singular:

> ring R = integer, x, lp;
> reduce(3*x, std(ideal(2*x)));
3x

Edit: would it be safe to say that kNF cannot be used provide unique representatives for elements of a quotient ring, when the base ring is not a field?

hannes14 commented 1 year ago

Should be fixed with https://github.com/Singular/Singular/commit/63d2db479e6d60dfeed92ab8261e782b65a9b9ad (and the commits before this). kNF wrt. a (strong) Groebner basis should now be unique. In a quotient ring the quotient must also be a strong GB.

simonbrandhorst commented 1 year ago

Works now with Version 0.11.3-DEV