Skip to content

Update to AbstractAlgebra 0.48 and Nemo 0.54.#5710

Merged
lgoettgens merged 18 commits intomasterfrom
mh/update-deps
Jan 21, 2026
Merged

Update to AbstractAlgebra 0.48 and Nemo 0.54.#5710
lgoettgens merged 18 commits intomasterfrom
mh/update-deps

Conversation

@fingolfin
Copy link
Copy Markdown
Member

@fingolfin fingolfin commented Jan 19, 2026

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

## Release Notes
- Update AbstractAlgebra to v0.48 {package: AbstractAlgebra}
- Update Nemo to v0.54 {package: Nemo}

@lgoettgens lgoettgens added the release notes: use body For PRs: the release notes string is included in the body text of the PR label Jan 19, 2026
Comment thread src/AlgebraicGeometry/ToricVarieties/ToricMorphisms/attributes.jl Outdated
Comment thread experimental/MatroidRealizationSpaces/src/realization_space.jl Outdated
Comment thread docs/oscar_references.bib Outdated
Comment thread docs/oscar_references.bib Outdated
Comment thread experimental/FTheoryTools/src/AbstractFTheoryModels/Methods/blowups.jl Outdated
Bp = ZF_basis(N, p_F)
if is_empty(Bp)
return [], zeros(kQ, 1, 1)
return Bp, Hecke.zeros_array(kQ, 1, 1)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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));
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe should be

Suggested change
julia> struct_consts = QQ.(zeros(Int, 3, 3, 3));
julia> struct_consts = zeros(QQFieldElem, 3, 3, 3);

What do we want here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Suggested change
pPw = saturated_ideal(PP^BigInt(w)) # the symbolic power
pPw = saturated_ideal(PP^Int(w)) # the symbolic power

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread src/AlgebraicGeometry/ToricVarieties/ToricMorphisms/attributes.jl Outdated
Comment thread src/AlgebraicGeometry/ToricVarieties/ToricMorphisms/attributes.jl Outdated
Comment thread Project.toml Outdated
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.
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?!
Copy link
Copy Markdown
Member

@lgoettgens lgoettgens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I answered to all your comments. There is nothing blocking for me left, so please merge at your own pace.

@lgoettgens lgoettgens enabled auto-merge (squash) January 21, 2026 13:19
@lgoettgens lgoettgens merged commit f8a9432 into master Jan 21, 2026
35 of 36 checks passed
@lgoettgens lgoettgens deleted the mh/update-deps branch January 21, 2026 14:38
@lgoettgens lgoettgens mentioned this pull request Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: use body For PRs: the release notes string is included in the body text of the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants