integer pow with polynomial_ring(CalciumField(),"x")

3 views
Skip to first unread message

Grégory Vanuxem

unread,
Aug 24, 2024, 2:37:08 PM8/24/24
to Nemo-Devel
Hello,

I need to work around this issue. That seems to be a bug:

julia> CC,x=polynomial_ring(CalciumField(),"x")
(Univariate polynomial ring in x over exact complex field, x)

julia> p=x^2+7*x^9+3
7*x^9 + x^2 + 3

julia> p^3
ERROR: Characteristic not known
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] characteristic(R::CalciumField)
@ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/QjFtH/src/NCRings.jl:187
[3] ^(a::AbstractAlgebra.Generic.Poly{CalciumFieldElem}, b::Int64)
@ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/QjFtH/src/Poly.jl:807
[4] literal_pow(::typeof(^),
x::AbstractAlgebra.Generic.Poly{CalciumFieldElem}, ::Val{3})
@ AbstractAlgebra ~/.julia/packages/AbstractAlgebra/QjFtH/src/NCRings.jl:131
[5] top-level scope
@ REPL[4]:1

julia> p*p*p
343*x^27 + 147*x^20 + 441*x^18 + 21*x^13 + 126*x^11 + 189*x^9 + x^6 +
9*x^4 + 27*x^2 + 27

Not reproducible with ZZ, QQ or QQBar for example.

Do I fill an issue?

Regards,

- Greg

tho...@gmail.com

unread,
Aug 25, 2024, 3:26:39 AM8/25/24
to nemo-devel
I have opened https://github.com/Nemocas/Nemo.jl/pull/1842 to fix this. It should be available within the next few days. You can do `Nemo.characteristic(a::CalciumField) = 0` for as a workaround until the fix is available.

Best,
Tommy

Reply all
Reply to author
Forward
0 new messages