From f58e9f698fe324f5630a20a940bd80a7f4126e2d Mon Sep 17 00:00:00 2001 From: Martin Bies Date: Thu, 7 Sep 2023 14:10:10 +0200 Subject: [PATCH] [ToricSchemes] Optimize and extend tests --- .../ToricVarieties/toric_schemes.jl | 41 +++++++++++++------ 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/test/AlgebraicGeometry/ToricVarieties/toric_schemes.jl b/test/AlgebraicGeometry/ToricVarieties/toric_schemes.jl index dde3b7b14ecf..c52f16e1a181 100644 --- a/test/AlgebraicGeometry/ToricVarieties/toric_schemes.jl +++ b/test/AlgebraicGeometry/ToricVarieties/toric_schemes.jl @@ -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 @@ -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