Skip to content

Commit

Permalink
[ToricSchemes] Optimize and extend tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HereAround committed Sep 13, 2023
1 parent d69190d commit f58e9f6
Showing 1 changed file with 28 additions and 13 deletions.
41 changes: 28 additions & 13 deletions test/AlgebraicGeometry/ToricVarieties/toric_schemes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ using Test
end

IP1 = projective_space(NormalToricVariety, 1; set_attributes = set_attributes)
set_coordinate_names(IP1, ["x", "y"])
Y = IP1*IP1

@testset "Product of projective spaces" begin
Expand Down Expand Up @@ -51,23 +52,37 @@ using Test
II = IdealSheaf(IP3, I)
end

@testset "conversion of toric morphisms to morphisms of covered schemes" begin
bl = blow_up(IP2, [1, 1])
X = domain(bl)
bl_cov = covering_morphism(bl)
S = cox_ring(IP2)
(x, y, z) = gens(S)
I = IdealSheaf(IP2, ideal(S, [z*(x-y)]))
S = cox_ring(IP2)
(x, y, z) = gens(S)
I = IdealSheaf(IP2, ideal(S, [z*(x-y)]))
J = IdealSheaf(IP2, ideal(S, [x, y]))
bl = blow_up(IP2, [1, 1])
pb_I = pullback(bl, I)
pb_J = pullback(bl, J)

@testset "toric blowdown morphism as morphism of covered schemes" begin
@test scheme(I) === IP2
@test length(Oscar.maximal_associated_points(I)) == 2
g = underlying_morphism(bl)
pb_I = pullback(g, I)
@test length(Oscar.maximal_associated_points(pb_I)) == 3

J = IdealSheaf(IP2, ideal(S, [x, y]))
@test dim(J) == 0
pb_J = pullback(bl, J)
#pb_J = pullback(g, J)
@test dim(pb_J) == 1
end

F2 = hirzebruch_surface(NormalToricVariety, 2; set_attributes = set_attributes)
f = toric_morphism(F2, matrix(ZZ, [[1], [0]]), IP1; check = true)
S = cox_ring(IP1)
(x, y) = gens(S)
K = IdealSheaf(IP1, ideal(S, [x]))
pb_K = pullback(f, K)
# The support of pb_K should be nothing but P1, it is the fiber
# of the P1-fibration that defines the Hirebruch surface over the
# point defined by K.
# TODO: Add a test that verifies that indeed pb_K is P1.
@testset "Hirzebruch surface as P1 fibration over P1" begin
@test length(Oscar.maximal_associated_points(K)) == 1
@test dim(K) == 0
@test length(Oscar.maximal_associated_points(pb_K)) == 1
@test dim(pb_K) == 1
end

end

0 comments on commit f58e9f6

Please sign in to comment.