Update to AbstractAlgebra 0.48 and Nemo 0.54.#5710
Conversation
| Bp = ZF_basis(N, p_F) | ||
| if is_empty(Bp) | ||
| return [], zeros(kQ, 1, 1) | ||
| return Bp, Hecke.zeros_array(kQ, 1, 1) |
There was a problem hiding this comment.
Replacing [] by Bp is not strictly necessary, it's just a "drive-by" type stability fix.
| # Examples | ||
| ```jldoctest | ||
| julia> struct_consts = zeros(QQ, 3, 3, 3); | ||
| julia> struct_consts = QQ.(zeros(Int, 3, 3, 3)); |
There was a problem hiding this comment.
Maybe should be
| julia> struct_consts = QQ.(zeros(Int, 3, 3, 3)); | |
| julia> struct_consts = zeros(QQFieldElem, 3, 3, 3); |
What do we want here?
There was a problem hiding this comment.
I think we want unaliased entries.
Background: these are later put into Hecke sparse matrices, and iirc they don't guarantee not to mutate any entry objects
| pPw = ideal(R, one(R)) | ||
| else | ||
| pPw = saturated_ideal(PP^w) # the symbolic power | ||
| pPw = saturated_ideal(PP^BigInt(w)) # the symbolic power |
There was a problem hiding this comment.
Workaround: We only have ^(::Ideal, ::Integer). Instead of this change, we couldo also add ^(::Ideal, ZZRingElem) in Nemo or so. Should we?
Separately, I wonder how large w can become in "realistic" examples, and if it isn't sufficient to do
| pPw = saturated_ideal(PP^BigInt(w)) # the symbolic power | |
| pPw = saturated_ideal(PP^Int(w)) # the symbolic power |
There was a problem hiding this comment.
I think Int should be fine here, as we also have some restrictions on the exponents of polynomials.
For univariate FLINT polys, my computer starts to have issues around 2^22.
For multivariate FLINT polys, we seem to support exponents larger than 2^64. However, for AA.Generic.MPoly, we get an overflow error once the exponent reaches typemax(Int). And since powering of non-trivial ideal (in a MPolyRing, i.e. there is at least a non-constant generator) at least powers the generators, we wouldn't be able to handle most cases with a big exponent anyway in the MPoly arithmetics
Thos were breaking releases. Also explicitly require the various updates of our other dependencies that add support for AA 0.48 and Nemo 0.54.
e40ee70 to
001e93c
Compare
... for compat with a future AbstractAlgebra release
Note that zeros(T, ...) for T a type still is usually OK.
Avoids error for not finding is_alternating(::MatrixElem)
Without this we get:
MethodError: no method matching gens_2_prime_divisors(::Vector{Any})
The function `gens_2_prime_divisors` exists, but no method is defined for this combination of argument types.
Closest candidates are:
gens_2_prime_divisors(::Vector{<:RingElem})
@ Oscar .../Oscar.jl/experimental/MatroidRealizationSpaces/src/realization_space.jl:450
Stacktrace:
[1] n_new_Sgens(x::QQMPolyRingElem, t::AbstractAlgebra.Generic.FracFieldElem{QQMPolyRingElem}, Sgens::Vector{RingElem}, R::QQMPolyRing, xs::Vector{QQMPolyRingElem})
@ Oscar .../Oscar.jl/experimental/MatroidRealizationSpaces/src/realization_space.jl:677
So it seems that
unique!([sub_v(x, t, f, R, xs) for f in Sgens])
used to return a `Vector{<:RingElem}` but no more. We work around this
by forcing it to be a `Vector{RingElem}` which isn't great but
at least it works.
But why has this really stopped working?!
001e93c to
e2e2672
Compare
lgoettgens
left a comment
There was a problem hiding this comment.
I answered to all your comments. There is nothing blocking for me left, so please merge at your own pace.
Thos were breaking releases.
Also explicitly require the various updates of our other dependencies that add support for AA 0.48 and Nemo 0.54.
I have not yet run tests locally and expect more changes will be required.
Closes #5638