Skip to content

Commit

Permalink
Added Fano examples to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan committed Jun 4, 2024
1 parent bccc982 commit 3f4c2c7
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 6 deletions.
5 changes: 4 additions & 1 deletion ToricExtras.m2
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ newPackage(
{
Name => "Will Gilroy",
Email => "[email protected]"
}
},
{
Name => "Rohan Joshi",
Email => "[email protected]"}
},

Headline => "new routines for working with normal toric varieties",
Expand Down
34 changes: 34 additions & 0 deletions ToricExtras/BatyrevConstructions.m2
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,37 @@ batyrevConstructor(List, List, List) := (P, B, C) -> (
)


end-------

degreeOfThreefold = method();
degreeOfThreefold(NormalToricVariety) := X -> (
K = toricDivisor X;
c = chern(1, OO (-K)); -- anticanonical class in the Chow ring
deg = integral (c*c*c);
-- g = 1 + (deg / 2)
return deg;




-- There are 7 smooth Fano 3-folds of Picard rank 3. Of these 5 are projectivations of direct sums of two line bundles over surfaces of Picard rank 2, and by Batyrev's paper have 3 primitive collections
-- Therefore, the remaining two (3-26) and (3-29) have Picard rank

load "BatyrevConstructions.m2"

X = batyrevConstructor({2,1,1,1,1}, {-2}, {})
--X = toricProjectiveSpace 3
K = toricDivisor X
c = chern(1, OO (-K))
deg = integral (c*c*c)
--g = 1 + (deg / 2)

X = batyrevConstructor({1,1,1,1,1}, {2}, {})

integral (c*c*c)

isFano X
isSmooth X
isProjective X
isNef(-toricDivisor X)
isAmple(-toricDivisor X)
60 changes: 55 additions & 5 deletions ToricExtras/BatyrevTests.m2
Original file line number Diff line number Diff line change
@@ -1,31 +1,81 @@
TEST ///
-- a 2-dimensional fan where the partition sizes of the primitive collections are equal
-- This constructs the unique smooth toric del Pezzo surface of Picard rank 3, which is the Bl_1(P^1 x P^1) = Bl_2(P^2)
V = batyrevConstructor({1,1,1,1,1}, {0}, {})
assert(isWellDefined V)
assert(isSmooth V)
assert(isProjective V)
assert(rank picardGroup V == 3)
assert(isFano(V))
///
TEST ///
-- This constructs a smooth toric weak del Pezzo surface of Picard rank 3, which is the blowup of Bl_1 P^2 at the torus fixed-point on the exceptional divisor
V = batyrevConstructor({1,1,1,1,1}, {1}, {})
assert(isWellDefined V)
assert(isSmooth V)
assert(isProjective V)
assert(rank picardGroup V == 3)
assert(not isFano(V)) -- not Fano
assert(isNef(-toricDivisor V)) -- but it is weak Fano

///
TEST ///
-- a 3-dimensional fan where the partition sizes of the primitive collections are not the same
V = batyrevConstructor({1,1,1,2,1},{0,0},{})
-- This constructs a smooth toric Fano of Picard rank 3 which is 3-26 on Fanography. It can be described as the blowup of P^3 at the disjoint union of a point and a line
V = batyrevConstructor({2,1,1,1,1}, {0}, {})
assert(isWellDefined V)
assert(isSmooth V)
assert(isProjective V)
assert(rank picardGroup V == 3)
assert(isFano(V))

degreeOfThreefold = X -> (
K := toricDivisor X;
c := chern(1, OO (-K));
integral (c*c*c)
)

assert(degreeOfThreefold(V) == 46)

///
TEST ///
-- This constructs a smooth toric Fano of Picard rank 3 which is 3-29 on Fanography. It can be described as the blowup of Bl_1 P^3 along a line in the exceptional divisor
V = batyrevConstructor({2,1,1,1,1}, {1}, {})
assert(isWellDefined V)
assert(isSmooth V)
assert(isProjective V)
assert(rank picardGroup V == 3)
assert(isFano(V))

degreeOfThreefold = X -> (
K := toricDivisor X;
c := chern(1, OO (-K));
integral (c*c*c)
)

assert(degreeOfThreefold(V) == 50)

///

TEST ///
-- a 12-dimensional fan where the partition sizes of the primitive collection are all different
-- 15 rays with 105 maximal cones
V = batyrevConstructor({1,2,3,4,5},{0,0,0,0},{0,0})
-- a 3-dimensional fan where the partition sizes of the primitive collections are not the same
V = batyrevConstructor({1,1,1,2,1},{0,0},{})
assert(isWellDefined V)
assert(isSmooth V)
assert(isProjective V)
assert(rank picardGroup V == 3)
///

-- GOOD TEST BUT TAKES TOO LONG:
--TEST ///
-- a 12-dimensional fan where the partition sizes of the primitive collection are all different
-- 15 rays with 105 maximal cones
--V = batyrevConstructor({1,2,3,4,5},{0,0,0,0},{0,0})
--assert(isWellDefined V)
--assert(isSmooth V)
--assert(isProjective V)
--assert(rank picardGroup V == 3)
--///




Expand Down

0 comments on commit 3f4c2c7

Please sign in to comment.