Skip to content

Commit

Permalink
Merge pull request #3910 from oscar-system/backports-release-1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
benlorenz authored Jul 3, 2024
2 parents d0b75de + f0b6eb7 commit 27ec7aa
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 53 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Oscar"
uuid = "f1435218-dba5-11e9-1e4d-f1a5fab5fc13"
authors = ["The OSCAR Team <[email protected]>"]
version = "1.1.0"
version = "1.1.1"

[deps]
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ julia> using Oscar
/ _ \ / ___| / ___| / \ | _ \ | Combining ANTIC, GAP, Polymake, Singular
| | | |\___ \| | / _ \ | |_) | | Type "?Oscar" for more information
| |_| | ___) | |___ / ___ \| _ < | Manual: https://docs.oscar-system.org
\___/ |____/ \____/_/ \_\_| \_\ | Version 1.1.0
\___/ |____/ \____/_/ \_\_| \_\ | Version 1.1.1
julia> k, a = quadratic_field(-5)
(Imaginary quadratic field defined by x^2 + 5, sqrt(-5))
Expand Down Expand Up @@ -119,7 +119,7 @@ pm::Array<topaz::HomologyGroup<pm::Integer> >
If you have used OSCAR in the preparation of a paper please cite it as described below:

[OSCAR]
OSCAR -- Open Source Computer Algebra Research system, Version 1.1.0,
OSCAR -- Open Source Computer Algebra Research system, Version 1.1.1,
The OSCAR Team, 2024. (https://www.oscar-system.org)
[OSCAR-book]
Wolfram Decker, Christian Eder, Claus Fieker, Max Horn, Michael Joswig, eds.
Expand All @@ -132,7 +132,7 @@ If you are using BibTeX, you can use the following BibTeX entries:
key = {OSCAR},
organization = {The OSCAR Team},
title = {OSCAR -- Open Source Computer Algebra Research system,
Version 1.1.0},
Version 1.1.1},
year = {2024},
url = {https://www.oscar-system.org},
}
Expand Down
2 changes: 1 addition & 1 deletion etc/update_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ echo "Setting version to $relvers, released $reldate_iso"

# update version in several files
perl -pi -e 's;version = "[^"]+";version = "'$relvers'";' Project.toml
perl -pi -e "s;Version [^ },]+;Version $relvers;" README.md
perl -pi -e "s;Version [^\s},]+;Version $relvers;" README.md
perl -pi -e 's;Date := "[^"]+",;Date := "'$reldate'",;' gap/OscarInterface/PackageInfo.g
perl -pi -e 's;Version := "[^"]+",;Version := "'$relvers'",;' gap/OscarInterface/PackageInfo.g

Expand Down
35 changes: 32 additions & 3 deletions experimental/Schemes/src/IdealSheaves.jl
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,8 @@ function maximal_associated_points(
I::AbsIdealSheaf;
covering=default_covering(scheme(I)),
use_decomposition_info::Bool=true,
algorithm::Symbol=:GTZ
algorithm::Symbol=:GTZ,
mode::Symbol=:save_gluings
)
X = scheme(I)
comps = AbsIdealSheaf[]
Expand Down Expand Up @@ -899,8 +900,27 @@ function maximal_associated_points(
end
end

if mode==:save_gluings && length(comps)==1
R = radical(I)
set_attribute!(R, :is_prime=>true)
P = comps[1]
U = original_chart(P)
object_cache(R)[U] = P(U)
comps = AbsIdealSheaf[R]
end
# Manually fill up the cache
if !use_decomposition_info # We can only do this if all we treated all components on all charts.
if use_decomposition_info
# we can at least remember some partial information
for U in patches(covering)
if isone(I(U))
I_one = ideal(OO(U), one(OO(U)))
for P in comps
object_cache(P)[U] = I_one
end
end
end
else
# We can only do this if all we treated all components on all charts.
for U in patches(covering)
I_one = ideal(OO(U), one(OO(U)))
for P in comps
Expand Down Expand Up @@ -1390,6 +1410,7 @@ function saturation(I::AbsIdealSheaf, J::AbsIdealSheaf)
end

function pushforward(f::AbsCoveredSchemeMorphism, II::AbsIdealSheaf)
@req domain(f)===space(II) "ideal sheaf not defined on domain of morphism"
f_cov = covering_morphism(f)
dom_cov = domain(f_cov)
cod_cov = codomain(f_cov)
Expand All @@ -1401,6 +1422,7 @@ function pushforward(f::AbsCoveredSchemeMorphism, II::AbsIdealSheaf)
end
return IdealSheaf(codomain(f), ideal_dict, check=true) #TODO: Set to false
end


function Base.:^(II::AbsIdealSheaf, k::IntegerUnion)
k < 0 && error("negative powers of ideal sheaves are not allowed")
Expand Down Expand Up @@ -1933,7 +1955,7 @@ function is_subset(I::PrimeIdealSheafFromChart, rad::RadicalOfIdealSheaf)
U = original_chart(I)
return all(g->radical_membership(g, rad(U)), gens(I(U)))
end

function radical(I::AbsIdealSheaf)
result = RadicalOfIdealSheaf(I)
return result
Expand All @@ -1944,6 +1966,13 @@ is_radical(rad::RadicalOfIdealSheaf) = true
########################################################################
# custom functionality for prime ideal sheaves from chart
########################################################################
function is_subset(I::AbsIdealSheaf, P::PrimeIdealSheafFromChart)
X = scheme(I)
@assert X === scheme(P)
U = original_chart(P)
return is_subset(I(U), P(U))
end


function is_subset(P::PrimeIdealSheafFromChart, I::AbsIdealSheaf)
X = scheme(P)
Expand Down
88 changes: 69 additions & 19 deletions experimental/Schemes/src/elliptic_surface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -948,15 +948,46 @@ end
Return the fiber components of the fiber over the point $P \in C$.
"""
function fiber_components(S::EllipticSurface, P)
function fiber_components(S::EllipticSurface, P; algorithm=:exceptional_divisors)
@vprint :EllipticSurface 2 "computing fiber components over $(P)\n"
F = fiber_cartier(S, P)
@vprint :EllipticSurface 2 "decomposing fiber "
comp = maximal_associated_points(ideal_sheaf(F))
@vprint :EllipticSurface 2 "done decomposing fiber\n"
return [weil_divisor(c, check=false) for c in comp]
P = base_ring(S).(P)
W = codomain(S.inc_Weierstrass)
Fcart = fiber_cartier(S, P)
if isone(P[2])
U = default_covering(W)[1]
(x,y,t) = coordinates(U)
F = PrimeIdealSheafFromChart(W, U, ideal(t - P[1]))
elseif isone(P[1])
U = default_covering(W)[4]
(x,y,s) = coordinates(U)
F = PrimeIdealSheafFromChart(W, U, ideal(s - P[2]))
end
FF = ideal_sheaf(Fcart)
EE = exceptional_divisors(S)
EP = filter(E->issubset(FF, E), EE)
for bl in S.ambient_blowups
F = strict_transform(bl, F)
end
F = pullback(S.inc_Y, F)
F = weil_divisor(F, ZZ)
fiber_components = [weil_divisor(E, ZZ) for E in EP]
push!(fiber_components, F)
return fiber_components
end


@attr function exceptional_divisors(S::EllipticSurface)
PP = AbsIdealSheaf[]
@vprintln :EllipticSurface 2 "computing exceptional divisors"
for E in S.ambient_exceptionals
@vprintln :EllipticSurface 4 "decomposing divisor "
mp = maximal_associated_points(ideal_sheaf(pullback(S.inc_Y,E));
use_decomposition_info=true)
append!(PP, mp)
end
@vprintln :EllipticSurface 3 "done"
return PP
end

function fiber(X::EllipticSurface)
b, pt, F = irreducible_fiber(X)
if b
Expand Down Expand Up @@ -1589,12 +1620,12 @@ degree at most ``4`` to Weierstrass form, apply Tate's algorithm and
return the corresponding relatively minimal elliptic surface
as well as the coordinate transformation.
"""
function elliptic_surface(g::MPolyRingElem, P::Vector{<:RingElem})
function elliptic_surface(g::MPolyRingElem, P::Vector{<:RingElem}; minimize=true)
R = parent(g)
(x, y) = gens(R)
P = base_ring(R).(P)
g2, phi2 = transform_to_weierstrass(g, x, y, P);
Y2, phi1 = _elliptic_surface_with_trafo(g2)
Y2, phi1 = _elliptic_surface_with_trafo(g2; minimize)
return Y2, phi2 * phi1
end

Expand Down Expand Up @@ -1628,6 +1659,7 @@ function transform_to_weierstrass(g::MPolyRingElem, x::MPolyRingElem, y::MPolyRi
return switch(g_trans), new_trans
end

g = inv(coeff(g,[0,2]))*g # normalise g
kk = coefficient_ring(R)
kkx, X = polynomial_ring(kk, :x, cached=false)
kkxy, Y = polynomial_ring(kkx, :y, cached=false)
Expand All @@ -1640,11 +1672,19 @@ function transform_to_weierstrass(g::MPolyRingElem, x::MPolyRingElem, y::MPolyRi
@assert all(h->degree(h)<=4, coefficients(G)) "input polynomial must be of degree <= 4 in x"
@assert iszero(coefficients(G)[1]) "coefficient of linear term in y must be zero"
@assert isone(coefficients(G)[2]) "leading coefficient in y must be one"

if length(P) == 3 && isone(P[3])
P = P[1:2]
end


length(P) == 2 || error("need precisely two point coordinates")
(px, py) = P
if length(P) == 2
@assert iszero(evaluate(g, P)) "point does not lie on the hypersurface"
(px, py) = P
else
px = P[1]
end
# assert g.subs({x:px,y:py})==0
@assert iszero(evaluate(g, P)) "point does not lie on the hypersurface"
gx = -evaluate(g, [X + px, zero(X)])
coeff_gx = collect(coefficients(gx))
A = coeff(gx, 4)
Expand All @@ -1653,7 +1693,16 @@ function transform_to_weierstrass(g::MPolyRingElem, x::MPolyRingElem, y::MPolyRi
D = coeff(gx, 1)
E = coeff(gx, 0)
#E, D, C, B, A = coeff_gx
if !iszero(E)
if length(P)==3
@req all(h->degree(h)<=3, coefficients(G)) "infinity (0:1:0) is not a point of this hypersurface"
# y^2 = B*x^3+C*x^2+C*x+D
x1 = F(inv(B)*x)
y1 = F(inv(B)*y)
trans = MapFromFunc(F, F, f->evaluate(numerator(f), [x1, y1])//evaluate(denominator(f), [x1, y1]))
f_trans = B^2*trans(F(g))
result = numerator(B^2*f_trans)
return result, trans
elseif !iszero(E)
b = py
a4, a3, a2, a1, a0 = A,B,C,D,E
A = b
Expand Down Expand Up @@ -2286,7 +2335,7 @@ end
# The transformation is a morphism from the fraction field of the
# parent of g to the fraction field of the `ambient_coordinate_ring`
# of the `weierstrass_chart` of the resulting surface.
function _elliptic_surface_with_trafo(g::MPolyRingElem{<:AbstractAlgebra.Generic.FracFieldElem})
function _elliptic_surface_with_trafo(g::MPolyRingElem{<:AbstractAlgebra.Generic.FracFieldElem}; minimize::Bool=true)
x, y = gens(parent(g))
E = elliptic_curve(g, x, y)
kkt = base_field(E)
Expand All @@ -2296,11 +2345,12 @@ function _elliptic_surface_with_trafo(g::MPolyRingElem{<:AbstractAlgebra.Generic

# The following three commands won't work unless we convert to a rational_function_field
EE = base_change(x->evaluate(x, t), E)

EE = tates_algorithm_global(EE)
EE, _ = short_weierstrass_model(EE)
EE, _ = integral_model(EE)

if minimize
EE = tates_algorithm_global(EE)
EE, _ = short_weierstrass_model(EE)
EE, _ = integral_model(EE)
end

# ...and back.
E2 = base_change(x->evaluate(x, gen(kkt)), EE)

Expand Down
4 changes: 2 additions & 2 deletions gap/OscarInterface/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ SetPackageInfo( rec(

PackageName := "OscarInterface",
Subtitle := "GAP interface to OSCAR",
Version := "1.1.0",
Date := "20/06/2024", # dd/mm/yyyy format
Version := "1.1.1",
Date := "03/07/2024", # dd/mm/yyyy format
License := "GPL-2.0-or-later",

Persons := [
Expand Down
43 changes: 19 additions & 24 deletions test/AlgebraicGeometry/Schemes/elliptic_surface.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# The tests for elliptic surfaces have lead to random failure of the CI-tests,
# see issue no. 3676.
#
# They are now disabled, also because in general they tend to take quite long.
# We keep them, however, to allow for running them locally.
#=

@testset "elliptic surfaces" begin
@testset "trivial lattice" begin
k = GF(29)
Expand All @@ -27,9 +22,18 @@
X = elliptic_surface(E, 2)
triv = trivial_lattice(X)
@test det(triv[2])==-3
end

@testset "trivial lattice QQ" begin
Qt, t = polynomial_ring(QQ, :t)
Qtf = fraction_field(Qt)
E = elliptic_curve(Qtf, [0,0,0,0,t^5*(t-1)^2])
X3 = elliptic_surface(E, 2)
weierstrass_contraction(X3)
trivial_lattice(X3)
end

# This test takes about 1 minute
# This test takes about 30 seconds
@testset "mordel weil lattices" begin
k = GF(29,2)
# The generic fiber of the elliptic fibration
Expand All @@ -51,17 +55,9 @@
X1 = elliptic_surface(short_weierstrass_model(E)[1],2)
Oscar.isomorphism_from_generic_fibers(X,X1)
end
#=
# this test is quite expensive
# probably because it is over QQ
# ... and because there are loads of complicated singular fibers
Qt, t = polynomial_ring(QQ, :t)
Qtf = fraction_field(Qt)
E = elliptic_curve(Qtf, [0,0,0,0,t^5*(t-1)^2])
X3 = elliptic_surface(E, 2)
weierstrass_contraction(X3)
trivial_lattice(X3)
=#




@testset "elliptic parameter" begin
k = GF(29)
Expand Down Expand Up @@ -126,8 +122,7 @@ end


#=
# These tests are disabled, because they take too long, about 5 minutes. But one can run them if in doubt.
# most of the time is spent in decomposing the fibers
# These tests are disabled, because they are dependent on factorisation order...
@testset "two neighbor steps" begin
K = GF(7)
Kt, t = polynomial_ring(K, :t)
Expand Down Expand Up @@ -188,9 +183,9 @@ end
# The following should not take more than at most two minutes.
# But it broke the tests at some point leading to timeout,
# so we put it here to indicate regression.
for (i, g) in enumerate(values(gluings(default_covering(X))))
gluing_domains(g) # Trigger the computation once
end
#for (i, g) in enumerate(values(gluings(default_covering(X))))
# gluing_domains(g) # Trigger the computation once
#end
D_P = section(X, P)
Expand Down Expand Up @@ -272,4 +267,4 @@ end
P = Oscar.extract_mordell_weil_basis(torsion_translation)
@test length(P) == 2
end
=#

2 comments on commit 27ec7aa

@benlorenz
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/110382

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.1.1 -m "<description of version>" 27ec7aad12afa28e41adafd86f5fef5b86f74b38
git push origin v1.1.1

Please sign in to comment.