From 2a34ab6f510008d473c6e5e608fbd765aab58ffe Mon Sep 17 00:00:00 2001 From: Martin Bies Date: Tue, 26 Mar 2024 15:02:49 +0100 Subject: [PATCH] [ToricVarieites] Combine test_files toric_blowups and toric_blowdowns --- .../ToricVarieties/toric_blowdowns.jl | 37 ++++++++++++++++++- .../ToricVarieties/toric_blowups.jl | 36 ------------------ 2 files changed, 36 insertions(+), 37 deletions(-) delete mode 100644 test/AlgebraicGeometry/ToricVarieties/toric_blowups.jl diff --git a/test/AlgebraicGeometry/ToricVarieties/toric_blowdowns.jl b/test/AlgebraicGeometry/ToricVarieties/toric_blowdowns.jl index 153a8b40f01b..cfccaa09c42b 100644 --- a/test/AlgebraicGeometry/ToricVarieties/toric_blowdowns.jl +++ b/test/AlgebraicGeometry/ToricVarieties/toric_blowdowns.jl @@ -1,8 +1,43 @@ @testset "Toric blowdowns" begin P2 = projective_space(NormalToricVariety, 2) - bl = blow_up(P2, [1, 1]) + BP2 = domain(blow_up(P2, 1; coordinate_name = "e")) + + @testset "Basic properties of BP2" begin + @test is_normal(BP2) == true + @test is_affine(BP2) == false + @test is_projective(BP2) == true + @test is_projective_space(BP2) == false + @test is_smooth(BP2) == true + @test is_complete(BP2) == true + @test is_orbifold(BP2) == true + @test is_simplicial(BP2) == true + @test has_torusfactor(BP2) == false + end + + @testset "Basic attributes of BP2" begin + @test betti_number(BP2, 0) == 1 + @test betti_number(BP2, 1) == 0 + @test betti_number(BP2, 2) == 2 + @test betti_number(BP2, 3) == 0 + @test betti_number(BP2, 4) == 1 + @test euler_characteristic(BP2) == 4 + @test torsion_free_rank(picard_group(BP2)) == 2 + end + amb = load(joinpath(Oscar.oscardir, "test/AlgebraicGeometry/ToricVarieties", "pr3006.ntv")) + (x1, x2, x3, x4, x, y, z) = gens(cox_ring(amb)); + bd1 = blow_up(amb, ideal([x, y, x1]); coordinate_name = "e1") + amb1 = domain(bd1) + + @testset "Trigger issue of PR3006" begin + @test is_complete(amb1) + @test is_simplicial(amb1) + end + + P2 = projective_space(NormalToricVariety, 2) + bl = blow_up(P2, [1, 1]) + @testset "Basic tests for simple toric blowdown" begin @test torsion_free_rank(domain(grid_morphism(bl))) == 2 @test torsion_free_rank(codomain(grid_morphism(bl))) == 2 diff --git a/test/AlgebraicGeometry/ToricVarieties/toric_blowups.jl b/test/AlgebraicGeometry/ToricVarieties/toric_blowups.jl deleted file mode 100644 index b35169a82818..000000000000 --- a/test/AlgebraicGeometry/ToricVarieties/toric_blowups.jl +++ /dev/null @@ -1,36 +0,0 @@ -@testset "Blowup of toric varieties" begin - - P2 = projective_space(NormalToricVariety, 2) - BP2 = domain(blow_up(P2, 1; coordinate_name = "e")) - - @testset "Basic properties of BP2" begin - @test is_normal(BP2) == true - @test is_affine(BP2) == false - @test is_projective(BP2) == true - @test is_projective_space(BP2) == false - @test is_smooth(BP2) == true - @test is_complete(BP2) == true - @test is_orbifold(BP2) == true - @test is_simplicial(BP2) == true - @test has_torusfactor(BP2) == false - end - - @testset "Basic attributes of BP2" begin - @test betti_number(BP2, 0) == 1 - @test betti_number(BP2, 1) == 0 - @test betti_number(BP2, 2) == 2 - @test betti_number(BP2, 3) == 0 - @test betti_number(BP2, 4) == 1 - @test euler_characteristic(BP2) == 4 - @test torsion_free_rank(picard_group(BP2)) == 2 - end - - @testset "Trigger issue of PR3006" begin - amb = load(joinpath(Oscar.oscardir, "test/AlgebraicGeometry/ToricVarieties", "pr3006.ntv")) - (x1, x2, x3, x4, x, y, z) = gens(cox_ring(amb)); - bd1 = blow_up(amb, ideal([x, y, x1]); coordinate_name = "e1") - amb1 = domain(bd1) - @test is_complete(amb1) - @test is_simplicial(amb1) - end -end