From eda47ce337614162b6144bfde5e749c0c02e1b87 Mon Sep 17 00:00:00 2001 From: Martin Bies Date: Wed, 17 Jan 2024 20:14:21 +0100 Subject: [PATCH] Join the two toric tutorials, make general improvements and update the code to latest OSCAR standard --- _data/examples.yml | 12 +- _data/tutorials/ToricGeometryInOSCAR.ipynb | 2964 +++++++++++++------ _data/tutorials/ToricGeometryInOSCAR1.ipynb | 2422 --------------- 3 files changed, 2106 insertions(+), 3292 deletions(-) delete mode 100644 _data/tutorials/ToricGeometryInOSCAR1.ipynb diff --git a/_data/examples.yml b/_data/examples.yml index 9ca60fc5..653f2284 100644 --- a/_data/examples.yml +++ b/_data/examples.yml @@ -15,20 +15,12 @@ date: June 6, 2023 - title: Toric geometry - repository: oscar-system/oscar-website - filename: _data/tutorials/ToricGeometryInOSCAR1 - author: Luca Remke - thumbnail: oscar.png - language: julia - date: June 6, 2023 - -- title: Toric geometry - advanced topics repository: oscar-system/oscar-website filename: _data/tutorials/ToricGeometryInOSCAR - author: Martin Bies + author: Martin Bies, Luca Remke thumbnail: oscar.png language: julia - date: March 7, 2023 + date: January 17, 2024 - title: Quadratic lattices repository: oscar-system/oscar-website diff --git a/_data/tutorials/ToricGeometryInOSCAR.ipynb b/_data/tutorials/ToricGeometryInOSCAR.ipynb index 416bf999..33d431cb 100644 --- a/_data/tutorials/ToricGeometryInOSCAR.ipynb +++ b/_data/tutorials/ToricGeometryInOSCAR.ipynb @@ -2,18 +2,53 @@ "cells": [ { "cell_type": "markdown", - "id": "6f3718b4", + "id": "1181aec5-bf82-4eb3-87bf-40870ebe0436", "metadata": {}, "source": [ - "# Tutorial: Toric geometry in OSCAR" + "# Toric varieties in *OSCAR*" ] }, { "cell_type": "markdown", - "id": "79181e71", + "id": "aa5a7942-0d7c-44f4-817e-d99dfdd8a428", "metadata": {}, "source": [ - "Author: Martin Bies" + "Authors: Martin Bies, Luca Remke\n", + "Version: OSCAR version 0.14.0\n", + "\n", + "This tutorial provides an introduction to (normal) toric varieties in OSCAR. The aim is to describe important functionality and to exemplify it, so that users can start to use OSCAR more easily. Still, let us note that this tutorial does not aim to cover all of the existing functionality. Instead, we present a selection of arguably very important functions and features. For a more complete overview, please consult the documentation at https://docs.oscar-system.org/stable/AlgebraicGeometry/ToricVarieties/intro/.\n", + "\n", + "For this tutorial, the reader is assumed to be familiar with OSCAR's commutative algebra and polyhedral geometry methods.\n", + "\n", + "The content of this notebook is as follows:\n", + "1. [Affine toric varieties](#1-Affine-toric-varieties)\n", + " 1. [Constructing affine toric varieties](#1.A-Constructing-affine-toric-varieties)\n", + " 2. [Properties and attributes](#1.B-Properties-and-attributes)\n", + "2. [The projective space](#2-The-projective-space)\n", + " 1. [Constructing the projective space ](#2.A-Constructing-the-projective-space)\n", + " 2. [Properties and attributes](#2.B-Properties-and-attributes)\n", + " 3. [Weil and Cartier divisors](#2.C-Weil-and-Cartier-divisors)\n", + " 4. [Divisor classes](#2.D-Divisor-classes)\n", + " 5. [Line bundles](#2.E-Line-bundles)\n", + " 6. [Line bundle cohomology with cohomCalg](#2.F-Line-bundle-cohomology-with-cohomCalg)\n", + " 7. [The polyhedral fan](#2.G-The-polyhedral-fan)\n", + "3. [More general constructions of normal toric varieties](#3-More-general-constructions-of-normal-toric-varieties)\n", + " 1. [The projective space from its fan](#3.A-The-projective-space-from-its-fan)\n", + " 2. [Del Pezzo surfaces](#3.B-Del-Pezzo-surfaces)\n", + " 3. [Hirzebruch surfaces](#3.C-Hirzebruch-surfaces)\n", + " 4. [Weighted projective spaces](#3.D-Weighted-projective-spaces)\n", + " 5. [Affine spaces](#3.E-Affine-spaces)\n", + " 6. [Cyclic quotient singularities](3.F-Cyclic-quotient-singularities)\n", + " 7. [Toric blowups](#3.G-Toric-blowups)\n", + " 8. [Cartesian products](#3.H-Cartesian-products)\n", + " 9. [Triangulations](#3.I-Triangulations)\n", + " 10. [Benchmarking: An involved triangulation computation](#3.J-Benchmarking:-An-involved-triangulation-computation)\n", + " 11. [Turning off input checks](#3.K-Turning-off-input-checks)\n", + "4. [Advanced topics](#4-Advanced-topics)\n", + " 1. [Vanishing sets](#4.A-Vanishing-sets)\n", + " 2. [Intersection theory](#4.B-Intersection-theory)\n", + " 3. [Toric morphisms](#4.C-Toric-morphisms)\n", + "5. [Toric schemes and subvarieties](#5-Toric-schemes-and-subvarieties)" ] }, { @@ -26,8 +61,6 @@ "name": "stdout", "output_type": "stream", "text": [ - "\r", - "\r", " ----- ----- ----- - ----- \n", "| | | | | | | | | | \n", "| | | | | | | | \n", @@ -37,17 +70,10 @@ " ----- ----- ----- - - - - \n", "\n", "...combining (and extending) ANTIC, GAP, Polymake and Singular\n", - "Version\u001b[32m 0.12.1-DEV \u001b[39m... \n", + "Version\u001b[32m 0.14.0 \u001b[39m... \n", " ... which comes with absolutely no warranty whatsoever\n", "Type: '?Oscar' for more information\n", - "(c) 2019-2023 by The OSCAR Development Team\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "\u001b[36m\u001b[1m[ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mPrecompiling Oscar [f1435218-dba5-11e9-1e4d-f1a5fab5fc13]\n" + "(c) 2019-2024 by The OSCAR Development Team\n" ] } ], @@ -68,9 +94,7 @@ "id": "01ac12be", "metadata": {}, "source": [ - "Any geometry course (analytic geometry, algebraic geometry and of course toric geometry too) begins with the study of affine varieties/schemes. So we first recall that affine toric varieties are encoded by rational polyhedral cones.\n", - "\n", - "Specifically, let us state theorem 1.2.18 of the book *Toric Varieties* by David Cox, John Little and Hal Schenck:\n", + "We begin by discussing affine toric varieties. Those varieties are encoded by rational polyhedral cones, as stated in theorem 1.2.18 of the book *Toric Varieties* by David Cox, John Little and Hal Schenck:\n", "\n", "Let $\\sigma \\subseteq N_{\\mathbb{R}} \\cong \\mathbb{R}^n$ be a rational polyhedral cone with semigroup $S_\\sigma = \\sigma^\\vee \\cap M$. Then the associated affine toric variety $U_\\sigma$ is given by\n", "\n", @@ -80,7 +104,7 @@ "\n", "$$\\mathrm{dim}( U_\\sigma ) = n \\, \\Leftrightarrow \\, \\text{the torus of $U_\\sigma$ is } T_N = N \\otimes_{\\mathbb{Z}} \\mathbb{C}^\\ast \\, \\Leftrightarrow \\, \\sigma \\text{ is strongly convex.}$$\n", "\n", - "As per usual, we focus on *strongy convex* polyhedral cones $\\sigma$, so that $T_N$ is the algebraic torus of $U_\\sigma$." + "We focus on *strongy convex* polyhedral cones $\\sigma$, so that $T_N$ is the algebraic torus of $U_\\sigma$." ] }, { @@ -88,49 +112,37 @@ "id": "fd6d25b2", "metadata": {}, "source": [ - "## 1.1 Constructing affine toric varieties" + "## 1.A Constructing affine toric varieties" ] }, { - "cell_type": "code", - "execution_count": 2, - "id": "87af490a", + "cell_type": "markdown", + "id": "9df226ea-7255-4759-a923-858c7c4a8073", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Polyhedral cone in ambient dimension 2" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], "source": [ - " C = positive_hull([1 0; 0 1])" + "The following code constructs the affine space $\\mathbb{C}^2$ as toric variety:" ] }, { "cell_type": "code", - "execution_count": 3, - "id": "8c12f35f", + "execution_count": 2, + "id": "87af490a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Normal, affine toric variety" + "Normal toric variety" ] }, - "execution_count": 3, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ - " antv = affine_normal_toric_variety(C)" + "C = positive_hull([1 0; 0 1])\n", + "antv = affine_normal_toric_variety(C)" ] }, { @@ -138,7 +150,7 @@ "id": "27cdee35", "metadata": {}, "source": [ - "## 1.2 Properties and attributes" + "## 1.B Properties and attributes" ] }, { @@ -146,12 +158,14 @@ "id": "cec721c2", "metadata": {}, "source": [ - "The cone $\\sigma$ encodes a lot of information about the affine toric variety $U_\\sigma$. In the background, OSCAR conducts such investigations in polyhedral geometry with Polymake (cf. https://polymake.org/doku.php/start). This allows us to access a lot of properties of affine toric varieties. Here are a few examples" + "The cone $\\sigma$ encodes a lot of information about the affine toric variety $U_\\sigma$. In the background, *OSCAR* conducts such investigations in polyhedral geometry with Polymake (cf. https://polymake.org/doku.php/start). This allows us to access a lot of properties of affine toric varieties.\n", + "\n", + "The following support our claim that the toric variety *antv* constructed above is nothing but the affine space $\\mathbb{C}^2$:" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "id": "a04652f4", "metadata": {}, "outputs": [ @@ -161,7 +175,7 @@ "true" ] }, - "execution_count": 4, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -172,7 +186,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "id": "2f39b2fe", "metadata": {}, "outputs": [ @@ -182,7 +196,7 @@ "false" ] }, - "execution_count": 5, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -193,8 +207,8 @@ }, { "cell_type": "code", - "execution_count": 6, - "id": "90757e21", + "execution_count": 5, + "id": "803b48d6-b5ab-47a8-af1b-21c3e93a97c6", "metadata": {}, "outputs": [ { @@ -203,13 +217,13 @@ "true" ] }, - "execution_count": 6, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "is_simplicial(antv)" + "is_affine(antv)" ] }, { @@ -217,12 +231,12 @@ "id": "c60aee82", "metadata": {}, "source": [ - "We can also look for polynomials that cut out this affine variety in $\\mathbb{C}^k$ for a suitable integer $k$. The ideal, which cuts out the affine variety in question is nothing but the toric ideal. We compute it as follows:" + "To prove that *antv* is $\\mathbb{C}^2$, we can seek polynomials that cut out this affine variety in $\\mathbb{C}^k$ for suitable integer $k$. In the case at hand, the polynomial ideal to be investigated is the toric ideal. We compute it as follows:" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "id": "0d1a6293", "metadata": {}, "outputs": [ @@ -232,13 +246,35 @@ "ideal(0)" ] }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "I = toric_ideal(antv)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "50032e50-e14c-4a31-a8c9-317bc3e831b0", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Multivariate polynomial ring in 2 variables x1, x2\n", + " over rational field" + ] + }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "toric_ideal(antv)" + "parent(gens(I)[1])" ] }, { @@ -246,7 +282,9 @@ "id": "514cfe40", "metadata": {}, "source": [ - "This means, that the variety *antv* is nothing but $\\mathbb{C}^2$. Here is a more interesting example:" + "This means, that the variety *antv* is cut out by the trivial ideal in $\\mathbb{C}^2$. In other words, *antv* indeed just happens to be $\\mathbb{C}^2$.\n", + "\n", + "For a more interesting example, we consider the rational normal cone of degree 2:" ] }, { @@ -258,7 +296,7 @@ { "data": { "text/plain": [ - "Polyhedral cone in ambient dimension 2" + "Normal toric variety" ] }, "execution_count": 8, @@ -267,19 +305,28 @@ } ], "source": [ - "C2 = positive_hull([1 1; -1 1])" + "C2 = positive_hull([1 1; -1 1])\n", + "antv2 = affine_normal_toric_variety(C2)" + ] + }, + { + "cell_type": "markdown", + "id": "825f0b77-1ad9-483b-bc6d-9c9f2cfd61b9", + "metadata": {}, + "source": [ + "This variety is not smooth, but has a singularity. This we verify in *OSCAR* as follows:" ] }, { "cell_type": "code", "execution_count": 9, - "id": "f393b3b0", + "id": "6eeea25e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Normal, affine toric variety" + "false" ] }, "execution_count": 9, @@ -288,19 +335,19 @@ } ], "source": [ - "antv2 = affine_normal_toric_variety(C2)" + "is_smooth(antv2)" ] }, { "cell_type": "code", "execution_count": 10, - "id": "6eeea25e", + "id": "81fb971c", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "false" + "true" ] }, "execution_count": 10, @@ -309,19 +356,27 @@ } ], "source": [ - "is_smooth(antv2)" + "is_simplicial(antv2)" + ] + }, + { + "cell_type": "markdown", + "id": "d3e50042-b776-4c07-bcd8-637efe816797", + "metadata": {}, + "source": [ + "Just as above we can identify this affine variety more concretely by investigating its toric ideal:" ] }, { "cell_type": "code", "execution_count": 11, - "id": "81fb971c", + "id": "cbd5268b", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "true" + "ideal(-x1*x2 + x3^2)" ] }, "execution_count": 11, @@ -330,19 +385,20 @@ } ], "source": [ - "is_simplicial(antv2)" + "I2 = toric_ideal(antv2)" ] }, { "cell_type": "code", "execution_count": 12, - "id": "cbd5268b", + "id": "d9cca2e7-d931-487d-9495-0296dec3020b", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "ideal(-x1*x2 + x3^2)" + "Multivariate polynomial ring in 3 variables x1, x2, x3\n", + " over rational field" ] }, "execution_count": 12, @@ -351,7 +407,7 @@ } ], "source": [ - "toric_ideal(antv2)" + "parent(gens(I2)[1])" ] }, { @@ -359,7 +415,82 @@ "id": "75760f69", "metadata": {}, "source": [ - "So in $\\mathbb{C}^3$ with coordinate ring $\\mathbb{C}[ x_1, x_2, x_3 ]$ we are looking at the variety $X = V( - x_1 x_2 + x_3^2 )$. This is a rather classical example of a simplicial, affine toric variety." + "So in $\\mathbb{C}^3$ with coordinate ring $\\mathbb{C}[ x_1, x_2, x_3 ]$ we are looking at the variety $X = V( - x_1 x_2 + x_3^2 )$. This is a rather classical example of a simplicial, affine toric variety.\n", + "\n", + "Similarly, we can consider the following affine toric variety:" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "69b221e3-788d-4ba7-8f5f-70ad6a9cbeb5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Normal toric variety" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "C3 = positive_hull([2 -1; 0 1])\n", + "antv3 = affine_normal_toric_variety(C)" + ] + }, + { + "cell_type": "markdown", + "id": "5bcd3ee4-7fe4-4372-9159-d65e4f5c9b24", + "metadata": {}, + "source": [ + "The cone *C3* is different from *C2*, yet *antv3* is isomorphic to *antv2*:" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "5c423e01-8786-412b-b378-de94bce06741", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "ideal(0)" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "I3 = toric_ideal(antv3)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "51b947f6-94e4-43f3-8bd3-8ea34169cc50", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Multivariate polynomial ring in 2 variables x1, x2\n", + " over rational field" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "parent(gens(I3)[1])" ] }, { @@ -375,9 +506,7 @@ "id": "fadfad9f", "metadata": {}, "source": [ - "More general toric varieties are constructed by providing not only one strongly convex polyhedral cone, but a collection of \"compatible\" cones. Such a collection is termed a (strongly convex polyhedral) fan.\n", - "\n", - "We give details on how to create fans and the corresponding toric varieties in section 3 of this tutorial. In this section however, we demonstrate the existing functionality in OSCAR by studying the projective space. Specifically, let us focus on the projective space $\\mathbb{P}^2$." + "The most general (normal) toric varieties are encoded by collections of strongly convex polyhedral cones. And of course, it must not be a \"random\" collection of cones, but the cones have to be \"compatible\" with each other. Specifically, the collection in question must form a polyhedral fan. We give details on how to create such fans and the corresponding toric varieties in section 3 of this tutorial. However, before we discuss those advaned varieties, we wish to demonstrate more of the existing toric functionality in *OSCAR* by studying the well-known case of the projective space. For concreteness, we focus on the projective space $\\mathbb{P}^2$." ] }, { @@ -385,7 +514,7 @@ "id": "13866e6b", "metadata": {}, "source": [ - "## 2.1 Constructing the projective space " + "## 2.A Constructing the projective space" ] }, { @@ -398,17 +527,17 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 16, "id": "2fff056f", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor" + "Normal toric variety" ] }, - "execution_count": 13, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -422,11 +551,9 @@ "id": "6a11cd23", "metadata": {}, "source": [ - "As you can notice, upon creation a lot of information on this space is already known.\n", + "Notice that the constructor expects us to state as first argument *NormalToricVariety*. This is a design choice made after careful consideration. Namely, the projective space could in principle be constructed as a scheme (with an arbitrary coefficient ring) or merely as a space parametrized by homogeneous coordinates. Depending on which of these perspectives is desired, specialized algorithms may be available.\n", "\n", - "Notice that the constructor expects us to state as first argument *NormalToricVariety*. This is to tell OSCAR that we want the projective space as a toric variety.\n", - "\n", - "This is a design decision that was taken after careful consideration. Namely, the projective space could in principle be constructed as a scheme (with an arbitrary coefficient ring) or merely as a space parametrized by homogeneous coordinates. Depending on which of these perspectives is desired, specializes algorithms may be available. As of February 2023, there are many specialized toric algorithms. So in this regard, providing *NormalToricVariety* as the first argument ensures that we can perform a large number of computations." + "As of February 2024, a lot of specialized toric functionality exists in OSCAR. In this regard, providing *NormalToricVariety* as the first argument not only ensures that we obtain the projective space as toric variety, but also that we can perform a large number of computations with it." ] }, { @@ -434,7 +561,7 @@ "id": "70b7fd79", "metadata": {}, "source": [ - "## 2.2 Properties and attributes" + "## 2.B Properties and attributes" ] }, { @@ -442,12 +569,12 @@ "id": "23f17fcc", "metadata": {}, "source": [ - "We can check for properties by invoking \"is_\" followed by the property that we want to compute. Here are a few examples:" + "Before we proceed, let us conduct a few consistency checks. If *P2* truely is the projective space of dimension 2, then is cannot be affine, but must be both smooth and projective. Let us verify this with *OSCAR*:" ] }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 17, "id": "f7507d2b", "metadata": {}, "outputs": [ @@ -457,7 +584,7 @@ "false" ] }, - "execution_count": 14, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -468,7 +595,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 18, "id": "d246d1f3", "metadata": {}, "outputs": [ @@ -478,7 +605,7 @@ "true" ] }, - "execution_count": 15, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -489,7 +616,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 19, "id": "055158b8", "metadata": {}, "outputs": [ @@ -499,7 +626,7 @@ "true" ] }, - "execution_count": 16, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -513,12 +640,14 @@ "id": "7ce3b10c", "metadata": {}, "source": [ - "An exception to this rule is the torus factor. Namely, since the terminology is to ask for \"having a torus factor\", we have to invoke:" + "Likewise, *P2* must not have a torus factor. Let us elaborate a bit before we verify this.\n", + "\n", + "Toric varieties contain the set $\\mathbb{C}^\\ast$ to a suitable power as dense open set. $\\mathbb{C}^\\ast$ (to some power) is called the algebraic torus, and this gives toric varieties their name. If *P2* had a torus factor, it would mean that *P2* factors into two varieties of which one is isomorphic to an algebraic torus. This is clearly not the case for *P2*, as we can verify with *OSCAR*:" ] }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 20, "id": "bb12c962", "metadata": {}, "outputs": [ @@ -528,7 +657,7 @@ "false" ] }, - "execution_count": 17, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -542,12 +671,12 @@ "id": "dd19627d", "metadata": {}, "source": [ - "A basic attribute that we would like to access is the dimension of the space:" + "Another basic, yet important, information about *P2* is its dimension. This should be 2 if *P2* is the projective space of dimension 2:" ] }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 21, "id": "3bda02cc", "metadata": {}, "outputs": [ @@ -557,7 +686,7 @@ "2" ] }, - "execution_count": 18, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -566,12 +695,44 @@ "dim(P2)" ] }, + { + "cell_type": "markdown", + "id": "871c20c8-7721-4586-8afd-5c737d338b7c", + "metadata": {}, + "source": [ + "In addition, we should expect that the projective space $\\mathbb{P}^2$ is covered by three affine open subsets:" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "d21d4183-468c-43e3-b776-07a497db41ac", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3-element Vector{AffineNormalToricVariety}:\n", + " Normal toric variety\n", + " Normal toric variety\n", + " Normal toric variety" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "affine_open_covering(P2)" + ] + }, { "cell_type": "markdown", "id": "2957ec7e", "metadata": {}, "source": [ - "The next interesting class of attributes concerns the divisors on toric varieties. Let us turn to them next." + "To conduct more interesting tests and computations with *P2*, let us next discuss divisors." ] }, { @@ -579,42 +740,57 @@ "id": "31454363", "metadata": {}, "source": [ - "## 2.3 The groups of Weil and Cartier divisors" + "## 2.C Weil and Cartier divisors" ] }, { "cell_type": "markdown", - "id": "27612484", + "id": "ce72efda-cee9-4128-83e2-bbcbd8757b3b", "metadata": {}, "source": [ - "The group of the torus-invariant Weil divisors $\\mathrm{Div}_T(\\mathbb{P}^2)$ can be accessed as follows:" + "Affine schemes/varieties come with a coordinate that tells us a lot of information about these varieties. For normal toric varieties - even if not affine - there exists a counterpart to this ring, the so-called Cox ring (often also called the homogeneous coordinate ring):" ] }, { "cell_type": "code", - "execution_count": 19, - "id": "73df96b6", + "execution_count": 23, + "id": "446da093-b403-4144-ae6c-ffaf57651da0", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "GrpAb: Z^3" + "Multivariate polynomial ring in 3 variables over QQ graded by \n", + " x1 -> [1]\n", + " x2 -> [1]\n", + " x3 -> [1]" ] }, - "execution_count": 19, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "torusinvariant_weil_divisor_group(P2)" + "cox_ring(P2)" + ] + }, + { + "cell_type": "markdown", + "id": "288c4a7f-881f-4b2c-b076-92e3625d8fe1", + "metadata": {}, + "source": [ + "Just as for affine varieties/schemes, it makes sense in a toric variety to talk about $\\mathbb{V}(x1)$, $\\mathbb{V}(x2)$ and $\\mathbb{V}(x3)$. These are Weil divisors. Over the integer $\\mathbb{Z}$, these three divisors generate an important class of divisors on $\\mathbb{P}^2$: The so-called *torus-invariant* Weil divisors.\n", + "\n", + "We briefly mention that the algebraic torus $\\mathbb{C}^\\ast$ (to some power) is not only a dense open set of any toric variety, but also provides a torus action on the toric variety. The interested reader can find details about this in the book *Toric Varieties* by David Cox, John Little and Hal Schenck.\n", + "\n", + "For this tutorial, we suffice it to conclude from the above that the group of torusinvariant Weil divisors on $\\mathbb{P}^2$ is $\\mathbb{Z}^3$. Let us now compute this group for *P2*:" ] }, { "cell_type": "code", - "execution_count": 20, - "id": "e44c310c", + "execution_count": 24, + "id": "73df96b6", "metadata": {}, "outputs": [ { @@ -623,13 +799,13 @@ "GrpAb: Z^3" ] }, - "execution_count": 20, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "torusinvariant_cartier_divisor_group(P2)" + "torusinvariant_weil_divisor_group(P2)" ] }, { @@ -637,125 +813,137 @@ "id": "8eda8764", "metadata": {}, "source": [ - "Of course, we can map torus-invariant Weil divisors to the class group $\\mathrm{Cl}( \\mathbb{P}^2 )$:" + "Divisors are linearly equivalent if their difference is a principal divisor, i.e. the divisor of a rational function. For the projective space $\\mathbb{P}^2$, we therefore usually only talk about the hyperplane class. Put yet differently, we should expect that\n", + "* $D_1 = \\mathbb{V}(x1)$,\n", + "* $D_2 = \\mathbb{V}(x2)$,\n", + "* $D_3 = \\mathbb{V}(x3)$,\n", + " \n", + "are linearly equivalent. To see this, we can map torus-invariant Weil divisors to the class group $\\mathrm{Cl}( \\mathbb{P}^2 )$, which factors exactly by the linear equivalence of the torusinvariant Weil divisors." ] }, { "cell_type": "code", - "execution_count": 21, - "id": "4d121b10", + "execution_count": 25, + "id": "d76865be-f9b7-4c03-97a3-42580e61856c", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Map with following data\n", - "Domain:\n", - "=======\n", - "Abelian group with structure: Z^3\n", - "Codomain:\n", - "=========\n", - "Abelian group with structure: Z" + "GrpAb: Z" ] }, - "execution_count": 21, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "f1 = map_from_torusinvariant_weil_divisor_group_to_class_group(P2)" - ] - }, - { - "cell_type": "markdown", - "id": "b0394386", - "metadata": {}, - "source": [ - "To see the mapping prescription, we can access the matrix of this map:" + "class_group(P2)" ] }, { "cell_type": "code", - "execution_count": 22, - "id": "44633dd2", + "execution_count": 26, + "id": "4d121b10", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "[1]\n", - "[1]\n", - "[1]" + "Map\n", + " from GrpAb: Z^3\n", + " to GrpAb: Z" ] }, - "execution_count": 22, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "matrix(f1)" + "f1 = map_from_torusinvariant_weil_divisor_group_to_class_group(P2)" ] }, { "cell_type": "markdown", - "id": "44a08404", + "id": "b0394386", "metadata": {}, "source": [ - "This means, that there are 3 torus-invariant Weil divisors $D_1$, $D_2$, $D_3$ for $\\mathbb{P}^2$ (each corresponding to a ray in the fan of $\\mathbb{P}^2$). The map to the class group assigns to each of the 3 torus-invariant Weil divisors the same divisor class, i.e. $[D_1] = [D_2] = [D_3]$. Or put differently, the Weil divisors $D_1$, $D_2$, $D_3$ are linearly equivalent: $D_1 \\sim D_2 \\sim D_3$.\n", - "\n", - "Of course, we can also use this information to find the Class group $\\mathrm{Cl} ( \\mathbb{P}^2 )$:" + "To see the mapping prescription, execute the following:" ] }, { "cell_type": "code", - "execution_count": 23, - "id": "283ccebc", + "execution_count": 27, + "id": "44633dd2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "GrpAb: Z" + "[1]\n", + "[1]\n", + "[1]" ] }, - "execution_count": 23, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "class_group(P2)" + "matrix(f1)" ] }, { "cell_type": "markdown", - "id": "1c61b200", + "id": "44a08404", "metadata": {}, "source": [ - "Similarly, we want to understand how the group of torus-invariant Cartier divisors $\\mathrm{Div}_T(\\mathbb{P}^2)$ map to the Picard group:" + "This means $[D_1] = [D_2] = [D_3]$. Or put differently, the Weil divisors $D_1$, $D_2$, $D_3$ are linearly equivalent: $D_1 \\sim D_2 \\sim D_3$.\n", + "\n", + "Similar functionality also exist for the group of torus-invariant Cartier divisors $\\mathrm{Div}_T(\\mathbb{P}^2)$. In the case of $\\mathbb{P}^2$ those maps are a bit boring, essentially because $\\mathbb{P}^2$ is smooth: Every toric variety in *OSCAR* is normal and so every Cartier divisor is a Weil divisor. Conversely, since $\\mathbb{P}^2$ is smooth, every Weil divisor is Cartier and the notions coincide.\n", + "\n", + "For non-smooth toric varieties, the notions will be different. With such spaces in mind, let us briefly demonstrate the corresponding functionality." ] }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 28, + "id": "cda1a0bd-f90b-4882-b868-101c782e9fda", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "GrpAb: Z^3" + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "torusinvariant_cartier_divisor_group(P2)" + ] + }, + { + "cell_type": "code", + "execution_count": 29, "id": "3f9d50be", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Map with following data\n", - "Domain:\n", - "=======\n", - "Abelian group with structure: Z^3\n", - "Codomain:\n", - "=========\n", - "Abelian group with structure: Z" + "Map\n", + " from GrpAb: Z^3\n", + " to GrpAb: Z" ] }, - "execution_count": 24, + "execution_count": 29, "metadata": {}, "output_type": "execute_result" } @@ -766,7 +954,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 30, "id": "a9df2d5c", "metadata": {}, "outputs": [ @@ -778,7 +966,7 @@ "[1]" ] }, - "execution_count": 25, + "execution_count": 30, "metadata": {}, "output_type": "execute_result" } @@ -787,17 +975,9 @@ "matrix(f2)" ] }, - { - "cell_type": "markdown", - "id": "f7ec2b3d", - "metadata": {}, - "source": [ - "With this, we can also find the Picard group $\\mathrm{Pic} ( \\mathbb{P}^2 )$ of the projective space:" - ] - }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 31, "id": "0a4b0bdb", "metadata": {}, "outputs": [ @@ -807,7 +987,7 @@ "GrpAb: Z" ] }, - "execution_count": 26, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } @@ -821,41 +1001,14 @@ "id": "1acc118e", "metadata": {}, "source": [ - "Recall that $\\mathbb{P}^2$ is smooth. Therefore, the notion of the torus-invariant Cartier divisors and of the torus-invariant Weil divisors coincide. Indeed, we can see this by considering the map from the torus-invariant Cartier divisors to the torus-invariant Weil divisors:" + "We can of course compute a map that take the torus-invariant Cartier divisors to the torus-invariant Weil divisors:" ] }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 32, "id": "40cc9d48", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Map with following data\n", - "Domain:\n", - "=======\n", - "Abelian group with structure: Z^3\n", - "Codomain:\n", - "=========\n", - "Abelian group with structure: Z^3" - ] - }, - "execution_count": 27, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "f3 = map_from_torusinvariant_cartier_divisor_group_to_torusinvariant_weil_divisor_group(P2)" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "id": "4b3b02c3", - "metadata": {}, "outputs": [ { "data": { @@ -865,12 +1018,13 @@ "[0 0 1]" ] }, - "execution_count": 28, + "execution_count": 32, "metadata": {}, "output_type": "execute_result" } ], "source": [ + "f3 = map_from_torusinvariant_cartier_divisor_group_to_torusinvariant_weil_divisor_group(P2)\n", "matrix(f3)" ] }, @@ -884,7 +1038,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 33, "id": "bfb6d2c1", "metadata": {}, "outputs": [ @@ -894,7 +1048,7 @@ "true" ] }, - "execution_count": 29, + "execution_count": 33, "metadata": {}, "output_type": "execute_result" } @@ -913,7 +1067,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 34, "id": "75425fdb", "metadata": {}, "outputs": [ @@ -926,7 +1080,7 @@ "with components [1 0 0]" ] }, - "execution_count": 30, + "execution_count": 34, "metadata": {}, "output_type": "execute_result" } @@ -945,7 +1099,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 35, "id": "e7490bcc", "metadata": {}, "outputs": [ @@ -955,7 +1109,7 @@ "[1 0 0]" ] }, - "execution_count": 31, + "execution_count": 35, "metadata": {}, "output_type": "execute_result" } @@ -969,7 +1123,7 @@ "id": "5d720827", "metadata": {}, "source": [ - "This functionality is particularly useful in the context of line bundles on toric varieties, i.e. the elements of the Picard group $\\mathrm{Pic}(\\mathbb{P}^2)$. We will study line bundles momentarily.\n", + "This functionality is particularly useful in the context of line bundles on toric varieties, i.e. the elements of the Picard group $\\mathrm{Pic}(\\mathbb{P}^2)$. We will turn to line bundles momentarily.\n", "\n", "We complete this section by briefly mentioning the character lattice $N(\\mathbb{P}^2)$. Since $\\mathbb{P}^2$ has no torus factor, there is a short exact sequence:\n", "\n", @@ -980,23 +1134,19 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 36, "id": "0885bf20", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Map with following data\n", - "Domain:\n", - "=======\n", - "Abelian group with structure: Z^2\n", - "Codomain:\n", - "=========\n", - "Abelian group with structure: Z^3" + "Map\n", + " from GrpAb: Z^2\n", + " to GrpAb: Z^3" ] }, - "execution_count": 32, + "execution_count": 36, "metadata": {}, "output_type": "execute_result" } @@ -1007,7 +1157,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 37, "id": "ee225293", "metadata": {}, "outputs": [ @@ -1017,7 +1167,7 @@ "true" ] }, - "execution_count": 33, + "execution_count": 37, "metadata": {}, "output_type": "execute_result" } @@ -1028,7 +1178,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 38, "id": "f4b82bcc", "metadata": {}, "outputs": [ @@ -1038,7 +1188,7 @@ "false" ] }, - "execution_count": 34, + "execution_count": 38, "metadata": {}, "output_type": "execute_result" } @@ -1049,7 +1199,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 39, "id": "092c219c", "metadata": {}, "outputs": [ @@ -1060,7 +1210,7 @@ "[0 1 -1]" ] }, - "execution_count": 35, + "execution_count": 39, "metadata": {}, "output_type": "execute_result" } @@ -1074,7 +1224,72 @@ "id": "6ad5fde4", "metadata": {}, "source": [ - "The columns of this matrix are the ray generators of the fan of the projective space $\\mathbb{P}^2$." + "The columns of this matrix are the ray generators of the fan of the projective space $\\mathbb{P}^2$, that is the non-negative span of them defines a 1-dimensional cone (i.e. a ray) and these 1-dimensional cones are part of the polyhedral fan that defines $\\mathbb{P}^2$. In fact, any cone in this fan is generated by a proper subset of these three ray generators. We will return to the polyhedral fan of $\\mathbb{P}^2$ towards the end of section 2.\n", + "\n", + "Before we discuss divisor classes, let us mention the following important divisors:" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "id": "2ae26e41-bf34-4634-8842-7dfac0ca96d4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Torus-invariant, non-prime divisor on a normal toric variety" + ] + }, + "execution_count": 40, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "trivial_divisor(P2)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "id": "25736ad1-ce5f-406c-8463-95ea493e9088", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Torus-invariant, non-prime divisor on a normal toric variety" + ] + }, + "execution_count": 41, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "anticanonical_divisor(P2)" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "id": "6a96eaa8-fe7f-4542-b9c9-3e15e77b6982", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Torus-invariant, non-prime divisor on a normal toric variety" + ] + }, + "execution_count": 42, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "canonical_divisor(P2)" ] }, { @@ -1082,7 +1297,7 @@ "id": "6cd0092d", "metadata": {}, "source": [ - "## 2.4 Divisor classes" + "## 2.D Divisor classes" ] }, { @@ -1097,7 +1312,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 43, "id": "d0ea6e65", "metadata": {}, "outputs": [ @@ -1107,7 +1322,7 @@ "Torus-invariant, non-prime divisor on a normal toric variety" ] }, - "execution_count": 36, + "execution_count": 43, "metadata": {}, "output_type": "execute_result" } @@ -1126,7 +1341,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 44, "id": "be31a562", "metadata": {}, "outputs": [ @@ -1136,7 +1351,7 @@ "true" ] }, - "execution_count": 37, + "execution_count": 44, "metadata": {}, "output_type": "execute_result" } @@ -1147,7 +1362,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 45, "id": "5c0cf695", "metadata": {}, "outputs": [ @@ -1157,7 +1372,7 @@ "true" ] }, - "execution_count": 38, + "execution_count": 45, "metadata": {}, "output_type": "execute_result" } @@ -1168,7 +1383,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 46, "id": "0b5ac695", "metadata": {}, "outputs": [ @@ -1178,7 +1393,7 @@ "true" ] }, - "execution_count": 39, + "execution_count": 46, "metadata": {}, "output_type": "execute_result" } @@ -1189,7 +1404,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 47, "id": "675e5a95", "metadata": {}, "outputs": [ @@ -1199,7 +1414,7 @@ "false" ] }, - "execution_count": 40, + "execution_count": 47, "metadata": {}, "output_type": "execute_result" } @@ -1210,7 +1425,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 48, "id": "e4d5e530", "metadata": {}, "outputs": [ @@ -1223,7 +1438,7 @@ " 3" ] }, - "execution_count": 41, + "execution_count": 48, "metadata": {}, "output_type": "execute_result" } @@ -1242,7 +1457,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 49, "id": "2023e857", "metadata": {}, "outputs": [ @@ -1252,7 +1467,7 @@ "Divisor class on a normal toric variety" ] }, - "execution_count": 42, + "execution_count": 49, "metadata": {}, "output_type": "execute_result" } @@ -1271,7 +1486,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 50, "id": "562a3509", "metadata": {}, "outputs": [ @@ -1281,7 +1496,7 @@ "Torus-invariant, non-prime divisor on a normal toric variety" ] }, - "execution_count": 43, + "execution_count": 50, "metadata": {}, "output_type": "execute_result" } @@ -1300,7 +1515,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 51, "id": "93ab1ec0", "metadata": {}, "outputs": [ @@ -1310,7 +1525,7 @@ "false" ] }, - "execution_count": 44, + "execution_count": 51, "metadata": {}, "output_type": "execute_result" } @@ -1329,7 +1544,7 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 52, "id": "995a13a1", "metadata": {}, "outputs": [ @@ -1342,7 +1557,7 @@ " 0" ] }, - "execution_count": 45, + "execution_count": 52, "metadata": {}, "output_type": "execute_result" } @@ -1361,7 +1576,7 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 53, "id": "976234e7", "metadata": {}, "outputs": [ @@ -1371,7 +1586,7 @@ "true" ] }, - "execution_count": 46, + "execution_count": 53, "metadata": {}, "output_type": "execute_result" } @@ -1393,7 +1608,7 @@ "id": "d6a284d3", "metadata": {}, "source": [ - "## 2.5 Line bundles " + "## 2.E Line bundles " ] }, { @@ -1406,7 +1621,7 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 54, "id": "4a9c565c", "metadata": {}, "outputs": [ @@ -1416,7 +1631,7 @@ "GrpAb: Z" ] }, - "execution_count": 47, + "execution_count": 54, "metadata": {}, "output_type": "execute_result" } @@ -1435,7 +1650,7 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 55, "id": "ffe01311", "metadata": {}, "outputs": [ @@ -1445,7 +1660,7 @@ "Toric line bundle on a normal toric variety" ] }, - "execution_count": 48, + "execution_count": 55, "metadata": {}, "output_type": "execute_result" } @@ -1464,7 +1679,7 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 56, "id": "ffb7372e", "metadata": {}, "outputs": [ @@ -1474,7 +1689,7 @@ "false" ] }, - "execution_count": 49, + "execution_count": 56, "metadata": {}, "output_type": "execute_result" } @@ -1493,7 +1708,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 57, "id": "1c96c57e", "metadata": {}, "outputs": [ @@ -1503,7 +1718,7 @@ "Torus-invariant, cartier, non-principal, prime divisor on a normal toric variety" ] }, - "execution_count": 50, + "execution_count": 57, "metadata": {}, "output_type": "execute_result" } @@ -1514,25 +1729,23 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 58, "id": "609c75ab", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Element of\n", - "GrpAb: Z\n", - "with components [1]" + "Divisor class on a normal toric variety" ] }, - "execution_count": 51, + "execution_count": 58, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "divisor_class(L)" + "toric_divisor_class(L)" ] }, { @@ -1545,7 +1758,7 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 59, "id": "adb2b460", "metadata": {}, "outputs": [ @@ -1555,7 +1768,7 @@ "true" ] }, - "execution_count": 52, + "execution_count": 59, "metadata": {}, "output_type": "execute_result" } @@ -1566,7 +1779,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 60, "id": "b1b942de", "metadata": {}, "outputs": [ @@ -1576,7 +1789,7 @@ "true" ] }, - "execution_count": 53, + "execution_count": 60, "metadata": {}, "output_type": "execute_result" } @@ -1595,7 +1808,7 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": 61, "id": "92714585", "metadata": {}, "outputs": [ @@ -1605,7 +1818,7 @@ "1" ] }, - "execution_count": 54, + "execution_count": 61, "metadata": {}, "output_type": "execute_result" } @@ -1616,23 +1829,96 @@ }, { "cell_type": "markdown", - "id": "3db328f8", + "id": "39fa26c4-6f8a-4a09-894d-7e6c7ce86533", "metadata": {}, "source": [ - "## 2.6 Line bundle cohomology with cohomCalg" + "Let us mention that toric line bundles can be tensorised via `*`. The `n`-th tensor product is calculated via `^n`. In particular, `^(-1)` calculates the inverse of a line bundle. Alternatively, the inverse can also be calculated via `inv`.\n", + "\n", + "The following lines bundles are of particular importance:" ] }, { - "cell_type": "markdown", - "id": "666b495d", + "cell_type": "code", + "execution_count": 62, + "id": "a80dd03d-88f1-4138-b3d0-943f5dbb7140", "metadata": {}, - "source": [ + "outputs": [ + { + "data": { + "text/plain": [ + "Toric line bundle on a normal toric variety" + ] + }, + "execution_count": 62, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "structure_sheaf(P2)" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "id": "88ec3919-1f4f-41e2-b10c-f13e326028d5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Toric line bundle on a normal toric variety" + ] + }, + "execution_count": 63, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "anticanonical_bundle(P2)" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "id": "b9770c33-8ef1-4b08-909d-2677430cd635", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Toric line bundle on a normal toric variety" + ] + }, + "execution_count": 64, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "canonical_bundle(P2)" + ] + }, + { + "cell_type": "markdown", + "id": "3db328f8", + "metadata": {}, + "source": [ + "## 2.F Line bundle cohomology with cohomCalg" + ] + }, + { + "cell_type": "markdown", + "id": "666b495d", + "metadata": {}, + "source": [ "To compute line bundle cohomology, we use the cohomCalg algorithm (cf. https://github.com/BenjaminJurke/cohomCalg). It is executed as follows:" ] }, { "cell_type": "code", - "execution_count": 55, + "execution_count": 65, "id": "c4d97a06", "metadata": {}, "outputs": [ @@ -1645,7 +1931,7 @@ " 0" ] }, - "execution_count": 55, + "execution_count": 65, "metadata": {}, "output_type": "execute_result" } @@ -1659,14 +1945,14 @@ "id": "04043994", "metadata": {}, "source": [ - "This means that $h^0( \\mathbb{P}^2, \\mathcal{L} ) = 3$ and $h^1( \\mathbb{P}^2, \\mathcal{L} ) = h^2( \\mathbb{P}^2, \\mathcal{L} ) = 0$. This result is of course well-known to the experts. This functionality works as long as the variety in question is either (smooth and complete) or (simplicial and projective).\n", + "This means that $h^0( \\mathbb{P}^2, \\mathcal{L} ) = 3$ and $h^1( \\mathbb{P}^2, \\mathcal{L} ) = h^2( \\mathbb{P}^2, \\mathcal{L} ) = 0$. This result is of course well-known to the experts. This functionality works as long as the variety in question is both smooth and complete. It will also work if the variety is both simplicial and projective.\n", "\n", "Of course, we can also compute just some of the line bundle cohomologies. For instance, the following finds $h^0( \\mathbb{P}^2, \\mathcal{L} )$:" ] }, { "cell_type": "code", - "execution_count": 56, + "execution_count": 66, "id": "e98bfca4", "metadata": {}, "outputs": [ @@ -1676,7 +1962,7 @@ "3" ] }, - "execution_count": 56, + "execution_count": 66, "metadata": {}, "output_type": "execute_result" } @@ -1695,20 +1981,20 @@ }, { "cell_type": "code", - "execution_count": 57, + "execution_count": 67, "id": "29a8dc10", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Multivariate Polynomial Ring in x1, x2, x3 over Rational Field graded by \n", + "Multivariate polynomial ring in 3 variables over QQ graded by \n", " x1 -> [1]\n", " x2 -> [1]\n", " x3 -> [1]" ] }, - "execution_count": 57, + "execution_count": 67, "metadata": {}, "output_type": "execute_result" } @@ -1727,7 +2013,7 @@ }, { "cell_type": "code", - "execution_count": 58, + "execution_count": 68, "id": "e8adc2f5", "metadata": {}, "outputs": [ @@ -1740,7 +2026,7 @@ " x1" ] }, - "execution_count": 58, + "execution_count": 68, "metadata": {}, "output_type": "execute_result" } @@ -1751,7 +2037,7 @@ }, { "cell_type": "code", - "execution_count": 59, + "execution_count": 69, "id": "cdb4bd92", "metadata": {}, "outputs": [ @@ -1764,7 +2050,7 @@ " 1" ] }, - "execution_count": 59, + "execution_count": 69, "metadata": {}, "output_type": "execute_result" } @@ -1778,12 +2064,44 @@ "id": "cfb244cf", "metadata": {}, "source": [ - "For convenience, the default is to use the homogeneous components. That is:" + "Note that in this expression *x1_* refers to $\\frac{1}{x_1}$. We can see this as follows:" ] }, { "cell_type": "code", - "execution_count": 60, + "execution_count": 70, + "id": "46b7ef1d-a274-4bf7-ae6e-23637f5554ef", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Quotient\n", + " of multivariate polynomial ring in 4 variables x1, x2, x1_, x2_\n", + " over rational field\n", + " by ideal(x1*x1_ - 1, x2*x2_ - 1)" + ] + }, + "execution_count": 70, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "parent(basis_of_global_sections_via_rational_functions(L)[1])" + ] + }, + { + "cell_type": "markdown", + "id": "3f17c182-c006-474e-8a59-b7c503ec5365", + "metadata": {}, + "source": [ + "For convenience, by default we use the homogeneous components:" + ] + }, + { + "cell_type": "code", + "execution_count": 71, "id": "9dcf5d1d", "metadata": {}, "outputs": [ @@ -1796,7 +2114,7 @@ " x1" ] }, - "execution_count": 60, + "execution_count": 71, "metadata": {}, "output_type": "execute_result" } @@ -1810,7 +2128,7 @@ "id": "17cc5a0b", "metadata": {}, "source": [ - "## 2.7 The fan" + "## 2.G The polyhedral fan" ] }, { @@ -1818,12 +2136,12 @@ "id": "a2eba4c5", "metadata": {}, "source": [ - "We now come back to constructing more general toric varieties. As mentioned above, this in general relies on the construction of a fan consisting of strongly convex polyhedral cones. This polyhedral geometry is the backbone for many computations in toric geometry. In particular, OSCAR knows the fan of the projective space $\\mathbb{P}^2$:" + "We now come back to constructing more general toric varieties. As mentioned above, this in general relies on the construction of a polyhedral fan consisting of strongly convex polyhedral cones. This polyhedral geometry is the backbone for many computations in toric geometry. Of course, *OSCAR* knows the fan of the projective space $\\mathbb{P}^2$:" ] }, { "cell_type": "code", - "execution_count": 61, + "execution_count": 72, "id": "0a74c277", "metadata": {}, "outputs": [ @@ -1833,13 +2151,13 @@ "Polyhedral fan in ambient dimension 2" ] }, - "execution_count": 61, + "execution_count": 72, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "fan_of_P2 = fan(P2)" + "fan_of_P2 = polyhedral_fan(P2)" ] }, { @@ -1852,7 +2170,7 @@ }, { "cell_type": "code", - "execution_count": 62, + "execution_count": 73, "id": "86663d07", "metadata": {}, "outputs": [ @@ -1865,7 +2183,7 @@ " [-1, -1]" ] }, - "execution_count": 62, + "execution_count": 73, "metadata": {}, "output_type": "execute_result" } @@ -1876,7 +2194,7 @@ }, { "cell_type": "code", - "execution_count": 63, + "execution_count": 74, "id": "4dc823b7", "metadata": {}, "outputs": [ @@ -1889,7 +2207,7 @@ " Polyhedral cone in ambient dimension 2" ] }, - "execution_count": 63, + "execution_count": 74, "metadata": {}, "output_type": "execute_result" } @@ -1900,7 +2218,7 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": 75, "id": "366f8954", "metadata": {}, "outputs": [ @@ -1913,7 +2231,7 @@ " [[1, 0], [-1, -1]]" ] }, - "execution_count": 64, + "execution_count": 75, "metadata": {}, "output_type": "execute_result" } @@ -1935,7 +2253,7 @@ "id": "e2bfeac2", "metadata": {}, "source": [ - "# 3 Constructing more general toric varieties" + "# 3 More general constructions of normal toric varieties" ] }, { @@ -1943,7 +2261,7 @@ "id": "7ecd714e", "metadata": {}, "source": [ - "## 3.1 $\\mathbb{P}^2$ from its fan" + "## 3.A The projective space from its fan" ] }, { @@ -1951,12 +2269,19 @@ "id": "092572b7", "metadata": {}, "source": [ - "We now want to demonstrate how a toric variety can be created from a fan. As we have gained familarity with the projective space in the previous sections, it is natural to exemplify the operations on the projective space $\\mathbb{P}^2$. For this, we proceed as follows:" + "We now want to demonstrate how a toric variety can be created from a fan. As we have gained familarity with the projective space in the previous sections, it is natural to exemplify the operations on the projective space $\\mathbb{P}^2$.\n", + "\n", + "In OSCAR, a normal toric variety can be created from a polyhedral fan in a number of ways. This includes the following:\n", + "- Specify the maximal cones `max_cones` and the ray generators `rays` of the fan.\n", + "- Construct the polyhedral fan `PF` and use it as input for the toric variety.\n", + "- Specify a polyhedron `P`. Internally, we then create the normal fan of this polyhedron and return the corresponding normal toric variety.\n", + "\n", + "Let us use the first method. The interested reader can find information on the other two approaches in the documentation." ] }, { "cell_type": "code", - "execution_count": 65, + "execution_count": 76, "id": "8788d277", "metadata": {}, "outputs": [ @@ -1966,7 +2291,7 @@ "Normal toric variety" ] }, - "execution_count": 65, + "execution_count": 76, "metadata": {}, "output_type": "execute_result" } @@ -1974,7 +2299,7 @@ "source": [ "ray_generators = [[1, 0], [0, 1], [-1, -1]]\n", "max_cones = [[1, 2], [2, 3], [3, 1]]\n", - "X = normal_toric_variety(ray_generators, max_cones)" + "X = normal_toric_variety(max_cones, ray_generators)" ] }, { @@ -1982,12 +2307,12 @@ "id": "5e1f2c1c", "metadata": {}, "source": [ - "When created in this way, the variety \"knows\" less information than by using the standard constructor projective_space()\", as demonstrated in the previous section. The reason is that by providing the fan, we can construct all sorts of toric varieties. But we can of course compute the necessary information to convince ourselves that this indeed is the projective space $\\mathbb{P}^2$:" + "Let us again conduct a few consistency checks to gain confidence that this variety indeed is the projective space $\\mathbb{P}^2$:" ] }, { "cell_type": "code", - "execution_count": 66, + "execution_count": 77, "id": "8e7161a1", "metadata": {}, "outputs": [ @@ -1997,7 +2322,7 @@ "true" ] }, - "execution_count": 66, + "execution_count": 77, "metadata": {}, "output_type": "execute_result" } @@ -2008,7 +2333,7 @@ }, { "cell_type": "code", - "execution_count": 67, + "execution_count": 78, "id": "a25915fe", "metadata": {}, "outputs": [ @@ -2018,7 +2343,7 @@ "true" ] }, - "execution_count": 67, + "execution_count": 78, "metadata": {}, "output_type": "execute_result" } @@ -2029,7 +2354,7 @@ }, { "cell_type": "code", - "execution_count": 68, + "execution_count": 79, "id": "8ae4ef3f", "metadata": {}, "outputs": [ @@ -2039,7 +2364,7 @@ "2" ] }, - "execution_count": 68, + "execution_count": 79, "metadata": {}, "output_type": "execute_result" } @@ -2050,7 +2375,7 @@ }, { "cell_type": "code", - "execution_count": 69, + "execution_count": 80, "id": "2f9d0238", "metadata": {}, "outputs": [ @@ -2060,7 +2385,7 @@ "GrpAb: Z" ] }, - "execution_count": 69, + "execution_count": 80, "metadata": {}, "output_type": "execute_result" } @@ -2071,7 +2396,7 @@ }, { "cell_type": "code", - "execution_count": 70, + "execution_count": 81, "id": "93402cb5", "metadata": {}, "outputs": [ @@ -2081,7 +2406,7 @@ "GrpAb: Z^3" ] }, - "execution_count": 70, + "execution_count": 81, "metadata": {}, "output_type": "execute_result" } @@ -2092,20 +2417,20 @@ }, { "cell_type": "code", - "execution_count": 71, + "execution_count": 82, "id": "fddc4772", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Multivariate Polynomial Ring in x1, x2, x3 over Rational Field graded by \n", + "Multivariate polynomial ring in 3 variables over QQ graded by \n", " x1 -> [1]\n", " x2 -> [1]\n", " x3 -> [1]" ] }, - "execution_count": 71, + "execution_count": 82, "metadata": {}, "output_type": "execute_result" } @@ -2119,7 +2444,7 @@ "id": "188baebd", "metadata": {}, "source": [ - "## 3.2 Del Pezzo surfaces " + "## 3.B Del Pezzo surfaces " ] }, { @@ -2132,17 +2457,17 @@ }, { "cell_type": "code", - "execution_count": 72, + "execution_count": 83, "id": "758338e3", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor" + "Normal toric variety" ] }, - "execution_count": 72, + "execution_count": 83, "metadata": {}, "output_type": "execute_result" } @@ -2161,7 +2486,7 @@ }, { "cell_type": "code", - "execution_count": 73, + "execution_count": 84, "id": "d39239ef", "metadata": {}, "outputs": [ @@ -2171,7 +2496,7 @@ "GrpAb: Z^4" ] }, - "execution_count": 73, + "execution_count": 84, "metadata": {}, "output_type": "execute_result" } @@ -2182,7 +2507,7 @@ }, { "cell_type": "code", - "execution_count": 74, + "execution_count": 85, "id": "c41eda83", "metadata": {}, "outputs": [ @@ -2192,7 +2517,7 @@ "Toric line bundle on a normal toric variety" ] }, - "execution_count": 74, + "execution_count": 85, "metadata": {}, "output_type": "execute_result" } @@ -2203,7 +2528,7 @@ }, { "cell_type": "code", - "execution_count": 75, + "execution_count": 86, "id": "faa01be0", "metadata": {}, "outputs": [ @@ -2216,7 +2541,7 @@ " 0" ] }, - "execution_count": 75, + "execution_count": 86, "metadata": {}, "output_type": "execute_result" } @@ -2235,7 +2560,7 @@ }, { "cell_type": "code", - "execution_count": 76, + "execution_count": 87, "id": "99fec84b", "metadata": {}, "outputs": [ @@ -2251,7 +2576,7 @@ " x1^3*e1*e2^2" ] }, - "execution_count": 76, + "execution_count": 87, "metadata": {}, "output_type": "execute_result" } @@ -2265,7 +2590,7 @@ "id": "ba7e87fd", "metadata": {}, "source": [ - "## 3.3 Hirzebruch surfaces" + "## 3.C Hirzebruch surfaces" ] }, { @@ -2278,17 +2603,17 @@ }, { "cell_type": "code", - "execution_count": 77, + "execution_count": 88, "id": "dbbe622c", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor" + "Normal toric variety" ] }, - "execution_count": 77, + "execution_count": 88, "metadata": {}, "output_type": "execute_result" } @@ -2299,77 +2624,54 @@ }, { "cell_type": "markdown", - "id": "3f55c72f", - "metadata": {}, - "source": [ - "## 3.4 Toric blowups" - ] - }, - { - "cell_type": "markdown", - "id": "8e86a586", + "id": "9a7bbcf8-18ac-4079-932f-a5ac5770c811", "metadata": {}, "source": [ - "By means of a star subdivision, one can conduct a toric blowup. The relevant functionality is available in OSCAR. To this end let us look at the projective space anew:" + "Of course, we can create line bundles on this surface and investigate their properties:" ] }, { "cell_type": "code", - "execution_count": 78, - "id": "d4670946", + "execution_count": 89, + "id": "b0b16a08-b4b5-470d-9bdf-c1fde2a12b06", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor" + "(false, false, false, false)" ] }, - "execution_count": 78, + "execution_count": 89, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "P2" + "l = ToricLineBundle(F2, [0,1])\n", + "(is_trivial(l), is_basepoint_free(l), is_ample(l), is_very_ample(l))" ] }, { - "cell_type": "code", - "execution_count": 79, - "id": "102f0b2c", + "cell_type": "markdown", + "id": "e314b32a-3404-4def-963e-1eb7c2d67fe4", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Multivariate Polynomial Ring in x1, x2, x3 over Rational Field graded by \n", - " x1 -> [1]\n", - " x2 -> [1]\n", - " x3 -> [1]" - ] - }, - "execution_count": 79, - "metadata": {}, - "output_type": "execute_result" - } - ], "source": [ - "cox_ring(P2)" + "## 3.D Weighted projective spaces" ] }, { "cell_type": "markdown", - "id": "0f456d86", + "id": "4e6e9e60-c3ae-4ed4-9fbd-0a6534681613", "metadata": {}, "source": [ - "Let us now perform a blowup of the locus $V( x_1, x_2 )$. This is done as follows:" + "There is also support for weighted projective spaces in *OSCAR*:" ] }, { "cell_type": "code", - "execution_count": 80, - "id": "33bdb050", + "execution_count": 90, + "id": "1b0d0198-f953-47e2-bd39-51ed03931fd0", "metadata": {}, "outputs": [ { @@ -2378,529 +2680,1115 @@ "Normal toric variety" ] }, - "execution_count": 80, + "execution_count": 90, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "BP2 = blowup_on_ith_minimal_torus_orbit(P2, 1, \"e\")" - ] - }, - { - "cell_type": "markdown", - "id": "beafefdf", - "metadata": {}, - "source": [ - "The number \"1\" selects the maximal cone of the fan of $\\mathbb{P}^2$ which we divide by the star subdivision. The string \"e\" defines the name for the new homogeneous coordinate of the toric variety. Here we have the following correspondence between ray generators and homogeneous variables:\n", - "\\begin{align}\n", - "x_1 &\\leftrightarrow [1,0] \\,\\\\\n", - "x_2 &\\leftrightarrow [0,1] \\,\\\\\n", - "x_3 &\\leftrightarrow [-1,-1] \\,.\n", - "\\end{align}\n", - "The blowup thus requires a star subdivision of the cone $C = \\mathrm{Span}_{\\mathbb{Z}_{\\geq 0}} \\left\\{ [1,0], [0,1]\\right\\}$. To this end, we first compute the sum of the generators of $C$. This is a new ray generator:\n", - "$$e \\leftrightarrow [1,1] \\,,$$\n", - "which we use to define the cones which maximally subdivide $C$, namely:\n", - "$$C_1 = \\mathrm{Span}_{\\mathbb{Z}_{\\geq 0}} \\left\\{ [1,0], [1,1]\\right\\} \\, , \\qquad C_2 = \\mathrm{Span}_{\\mathbb{Z}_{\\geq 0}} \\left\\{ [1,1], [0,1]\\right\\} \\, .$$\n", - "Let us see that this is indeed the case for the above computed toric space $B\\mathbb{P}^2$:" + "P231 = weighted_projective_space(NormalToricVariety, [2,3,1])" ] }, { "cell_type": "code", - "execution_count": 81, - "id": "36166499", + "execution_count": 91, + "id": "c4e7217a-70d7-49e0-9f37-bc642fea7114", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Polyhedral fan in ambient dimension 2" + "false" ] }, - "execution_count": 81, + "execution_count": 91, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "fan_of_BP2 = fan(BP2)" + "is_smooth(P231)" ] }, { "cell_type": "code", - "execution_count": 82, - "id": "b9b15ce5", + "execution_count": 92, + "id": "80065099-2add-4060-b325-af8831c4d2b8", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "4-element SubObjectIterator{RayVector{QQFieldElem}}:\n", - " [0, 1]\n", - " [-1, -1]\n", - " [1, 0]\n", - " [1, 1]" + "true" ] }, - "execution_count": 82, + "execution_count": 92, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "rays(fan_of_BP2)" - ] - }, - { - "cell_type": "markdown", - "id": "c33a5c6e", - "metadata": {}, - "source": [ - "So we notice the new ray $[1,1]$. To find the new cones $C_1$ and $C_2$, we issue the following:" + "is_simplicial(P231)" ] }, { "cell_type": "code", - "execution_count": 83, - "id": "03632a99", + "execution_count": 93, + "id": "298b2445-fc78-454b-81b9-34befe045959", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "4-element Vector{SubObjectIterator{RayVector{QQFieldElem}}}:\n", - " [[0, 1], [-1, -1]]\n", - " [[-1, -1], [1, 0]]\n", - " [[1, 0], [1, 1]]\n", - " [[0, 1], [1, 1]]" + "true" ] }, - "execution_count": 83, + "execution_count": 93, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "[rays(c) for c in maximal_cones(fan_of_BP2)]" + "is_projective(P231)" ] }, { "cell_type": "markdown", - "id": "19ffe865", + "id": "5c1dcebd-9fa2-4d0a-bffe-a6b3395f513c", "metadata": {}, "source": [ - "So indeed, the last two cones are the expected new cones. The first two are the cones that exist for the fan of $\\mathbb{P}^2$ and were not changed.\n", - "\n", - "The variable $e$ we can see most prominently in the Cox ring:" + "Consequently the necessary conditions are satisfied to apply *cohomCalg* to compute line bundle cohomology on this space:" ] }, { "cell_type": "code", - "execution_count": 84, - "id": "74ada845", + "execution_count": 94, + "id": "343ee970-b1e0-4f6e-8b14-dfc5bccbf617", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Multivariate Polynomial Ring in x2, x3, x1, e over Rational Field graded by \n", - " x2 -> [1 0]\n", - " x3 -> [0 1]\n", - " x1 -> [1 0]\n", - " e -> [-1 1]" + "3-element Vector{ZZRingElem}:\n", + " 37\n", + " 0\n", + " 0" ] }, - "execution_count": 84, + "execution_count": 94, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "cox_ring(BP2)" + "l = toric_line_bundle(P231, [3])\n", + "all_cohomologies(l)" ] }, { "cell_type": "markdown", - "id": "2652aab6", + "id": "577ec868-1a52-425f-8875-59244de599b9", "metadata": {}, "source": [ - "It is instructive to look at the following alternative grading of the Cox ring (and we order the variables in ascending order):\n", - "$$\\begin{array}{ccc|c} x_1 & x_2 & x_3 & e \\\\ \\hline 1 & 1 & 1 & 0 \\\\ 1 & 1 & 0 & -1 \\end{array}$$\n", - "In the first line you notice the ordinary grading of the Cox ring of $\\mathbb{P}^2$. The second line corresonds to the toric blowup that has been conducted. The $-1$ for $e$ tells us that this is the homogeneous coordinate introduced to resemble the blowup $\\mathbb{P}^1$. The 1 for $x_1$ and $x_2$ tells us that this blowup added a $\\mathbb{P}^1$ at the locus $\\{ x_1 = x_2 = 0\\}$ in $\\mathbb{P}^2$. In other words, in $B\\mathbb{P}^2$, $x_1$ and $x_2$ cannot vanish simultaneously:\n", - "$$\\{ [x_1 : x_2 : x_3 : e] \\in B\\mathbb{P}^2 | x_1 = x_2 = 0\\} = \\emptyset \\, .$$\n", - "It is instructive to recall that the generators of the Stanley-Reisner ideal encode exactly which homogeneous variables cannot vanish simultaneously:" + "## 3.E Affine spaces" + ] + }, + { + "cell_type": "markdown", + "id": "99db80bb-6626-448d-9369-752db49baf5d", + "metadata": {}, + "source": [ + "Likewise, affine spaces are supported:" ] }, { "cell_type": "code", - "execution_count": 85, - "id": "98458ccb", + "execution_count": 95, + "id": "e42943d5-6e98-4d70-92ea-7756654b40ae", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "ideal(x2*x1, x3*e)" + "Normal toric variety" ] }, - "execution_count": 85, + "execution_count": 95, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "stanley_reisner_ideal(BP2)" - ] - }, - { - "cell_type": "markdown", - "id": "bf5cf9ed", - "metadata": {}, - "source": [ - "This means that $\\emptyset = V( x_2, x_1 ) \\subseteq B \\mathbb{P}^2$ and $\\emptyset = V( x_3, e ) \\subset B \\mathbb{P}^2$.\n", - "\n", - "Along these lines, we can also see that the locus $V(e) \\subset B\\mathbb{P}^2$ is a $\\mathbb{P}^1$. Namely, from the Stanley-Reisner ideal we learn that $x_3$ and $e$ cannot vanish simultaneously. So $x_3 \\neq 0$ and we can rescale it to $1$. This rescaling effectively eliminates the 2nd line in the grading of the Cox ring and leaves us with\n", - "$$\\begin{array}{ccc|c} x_1 & x_2 \\\\ \\hline 1 & 1 \\end{array}$$\n", - "So we notice, that the variables $x_1$ and $x_2$ each enjoy the standard grading $(1,1)$. Also, since $x_1 x_2 \\in I_{\\text{SR}}( B\\mathbb{P}^2 )$, it holds $\\emptyset = V( x_2, x_1 ) \\subset B \\mathbb{P}^2$. This implies $V( e ) \\cong \\mathbb{P}^1_{[x_1 \\colon x_2]}$." - ] - }, - { - "cell_type": "markdown", - "id": "3b26c45b", - "metadata": {}, - "source": [ - "## 3.5 Cartesian products" - ] - }, - { - "cell_type": "markdown", - "id": "649d7b9a", - "metadata": {}, - "source": [ - "It is also possible to compute Cartesian products of toric varieties. Here is an example:" + "A5 = affine_space(NormalToricVariety, 5)" ] }, { "cell_type": "code", - "execution_count": 86, - "id": "d2857411", + "execution_count": 96, + "id": "fc83d7f4-75ac-435d-bcd1-fa5e1af73356", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Normal toric variety" + "true" ] }, - "execution_count": 86, + "execution_count": 96, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "product = P2 * F2" + "is_affine(A5)" ] }, { "cell_type": "code", - "execution_count": 87, - "id": "3a224cb4", + "execution_count": 97, + "id": "51a8212e-4f55-488e-ae39-cdd8e47a6152", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Multivariate Polynomial Ring in 7 variables xx1, xx2, xx3, yt1, ..., yx2 over Rational Field graded by \n", - " xx1 -> [1 0 0]\n", - " xx2 -> [1 0 0]\n", - " xx3 -> [1 0 0]\n", - " yt1 -> [0 1 0]\n", - " yx1 -> [0 0 1]\n", - " yt2 -> [0 1 0]\n", - " yx2 -> [0 2 1]" + "5" ] }, - "execution_count": 87, + "execution_count": 97, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "cox_ring(product)" + "dim(A5)" ] }, { "cell_type": "markdown", - "id": "76c4fa36", + "id": "9b0c4f9d-0a7c-47a8-b96a-ee2c483644e5", "metadata": {}, "source": [ - "Notice that the set of variables \"xx*\" correspond to the $\\mathbb{P}^2$ factor, and the remaining variables are the homogeneous coordinates of the Hirzebruch surface $\\mathbb{F}_2$." + "## 3.F Cyclic quotient singularities" ] }, { "cell_type": "markdown", - "id": "4e02bd35", + "id": "8c66165b-de5f-4eb8-a799-ab62eda9ef20", "metadata": {}, "source": [ - "## 3.6 Triangulations" + "Cyclic quotient singularities are quotients of $\\mathbb{C}^2$ by the action of $\\mathbb{Z}/n\\mathbb{Z}$ acting via \n", + "\\begin{equation*}\n", + " \\begin{pmatrix} \\xi & 0 \\\\ 0 & \\xi^q \\end{pmatrix},\n", + "\\end{equation*}\n", + "where $\\xi$ is an $n$-th root of unity and $q,n$ are coprime integers,such that $0 < q < n$. Here is an example:" ] }, { - "cell_type": "markdown", - "id": "d3749867", + "cell_type": "code", + "execution_count": 98, + "id": "a7db6459-5a5d-4995-8d79-7543fda40042", "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Cyclic quotient singularity Y(7, 5)" + ] + }, + "execution_count": 98, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "Triangulations of polytopes open an entire arena for creating families of toric varieties whose properties are often related to one-another in interesting ways. A prominent example along these lines is the Kreuzer-Skarke database (cf. http://hep.itp.tuwien.ac.at/~kreuzer/CY/). Another popular example is the conifold transition, which we now use to demonstrate triangulation functionality in OSCAR:" + "cqs = cyclic_quotient_singularity(7,5)" ] }, { "cell_type": "code", - "execution_count": 88, - "id": "3058f5f6", + "execution_count": 99, + "id": "33bbe62e-9e0a-4549-9045-804f8f275cdf", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Polyhedron in ambient dimension 3" + "2" ] }, - "execution_count": 88, + "execution_count": 99, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "P = convex_hull([0 0 0; 0 0 1; 1 0 1; 1 1 1; 0 1 1])" + "dim(cqs)" + ] + }, + { + "cell_type": "markdown", + "id": "e4b6e2a5-7924-4802-a047-c40550120700", + "metadata": {}, + "source": [ + "Note that in the constructor `cyclic_quotient_singularity(n, q)`, we must have $0 [1]\n", - " x2 -> [-1]\n", - " x3 -> [1]\n", - " x4 -> [-1]" + "7-element Vector{ZZRingElem}:\n", + " 17\n", + " 11\n", + " 23\n", + " 46\n", + " 18\n", + " 19\n", + " 37" ] }, - "execution_count": 94, + "execution_count": 105, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "cox_ring(v1)" + "r = QQFieldElem(2464144958, 145732115)\n", + "cf = rational_to_continued_fraction_hirzebruch_jung(r)" ] }, { "cell_type": "code", - "execution_count": 95, - "id": "c6acecd8", + "execution_count": 106, + "id": "498ed407-0a4e-498a-8961-8761055b5b16", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "ideal(x2*x4)" + "2464144958//145732115" ] }, - "execution_count": 95, + "execution_count": 106, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "stanley_reisner_ideal(v1)" + "continued_fraction_hirzebruch_jung_to_rational(cf)" ] }, { "cell_type": "markdown", - "id": "333957a6", + "id": "4bedf6e7-cb89-4701-9458-5294c57bd198", "metadata": {}, "source": [ - "If we repeat these line with $v_2$, then the only difference is:" + "Finally, we can also compute the Hirzebruch-Jung continued fraction corresponding to $q/(n-q)$:" ] }, { "cell_type": "code", - "execution_count": 96, - "id": "56b8624e", + "execution_count": 107, + "id": "1f60f94e-01a4-4db4-9041-d5365cc08cdf", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "ideal(x1*x3)" + "2-element Vector{ZZRingElem}:\n", + " 4\n", + " 2" ] }, - "execution_count": 96, + "execution_count": 107, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "stanley_reisner_ideal(v2)" + "dcf = dual_continued_fraction_hirzebruch_jung(cqs)" ] }, { - "cell_type": "markdown", - "id": "069877aa", + "cell_type": "code", + "execution_count": 108, + "id": "389d65ca-7dcc-4d7a-aa28-2744f80632b8", "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "7//2" + ] + }, + "execution_count": 108, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "So in a sence, the transition from $v_1$ to $v_2$ means that the roles of ($x_2$, $x_4$) and ($x_1$, $x_3$) are exchanged. Indeed, the conifold transition means to first perform a deformation which shrinks an algebraic cycle to zero. This leads to a conifold singularity which is subsequently resolved by blowing up another algebraic cycle." + "continued_fraction_hirzebruch_jung_to_rational(dcf)" ] }, { "cell_type": "markdown", - "id": "05a3e827", + "id": "3f55c72f", "metadata": {}, "source": [ - "## 3.7 Benchmarking an involved triangulation computation" + "## 3.G Toric blowups" ] }, { "cell_type": "markdown", - "id": "9edb57a6", + "id": "8e86a586", "metadata": {}, "source": [ - "Triangulations are a topic that features prominently in applied mathematics, e.g. in string theory. The following code was used in a recent string theory publication (https://arxiv.org/abs/2205.00008):" + "By means of a star subdivision, one can conduct a toric blowup. The relevant functionality is available in OSCAR. To this end let us look at the projective space anew:" ] }, { "cell_type": "code", - "execution_count": 97, - "id": "60ef9e8f", + "execution_count": 109, + "id": "d4670946", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "involved_triangulation (generic function with 1 method)" + "Normal, non-affine, smooth, projective, 2-dimensional toric variety without torusfactor" ] }, - "execution_count": 97, + "execution_count": 109, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "P2" + ] + }, + { + "cell_type": "code", + "execution_count": 110, + "id": "102f0b2c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Multivariate polynomial ring in 3 variables over QQ graded by \n", + " x1 -> [1]\n", + " x2 -> [1]\n", + " x3 -> [1]" + ] + }, + "execution_count": 110, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cox_ring(P2)" + ] + }, + { + "cell_type": "markdown", + "id": "0f456d86", + "metadata": {}, + "source": [ + "Let us now perform a blowup of the locus $V( x_1, x_2 )$. This is done as follows:" + ] + }, + { + "cell_type": "code", + "execution_count": 111, + "id": "33bdb050", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Toric blowdown morphism" + ] + }, + "execution_count": 111, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "BP2 = blowup_on_ith_minimal_torus_orbit(P2, 1, \"e\")" + ] + }, + { + "cell_type": "markdown", + "id": "beafefdf", + "metadata": {}, + "source": [ + "The number \"1\" selects the maximal cone of the fan of $\\mathbb{P}^2$ which we divide by the star subdivision. The string \"e\" defines the name for the new homogeneous coordinate of the toric variety. Here we have the following correspondence between ray generators and homogeneous variables:\n", + "\\begin{align}\n", + "x_1 &\\leftrightarrow [1,0] \\,\\\\\n", + "x_2 &\\leftrightarrow [0,1] \\,\\\\\n", + "x_3 &\\leftrightarrow [-1,-1] \\,.\n", + "\\end{align}\n", + "The blowup thus requires a star subdivision of the cone $C = \\mathrm{Span}_{\\mathbb{Z}_{\\geq 0}} \\left\\{ [1,0], [0,1]\\right\\}$. To this end, we first compute the sum of the generators of $C$. This is a new ray generator:\n", + "$$e \\leftrightarrow [1,1] \\,,$$\n", + "which we use to define the cones which maximally subdivide $C$, namely:\n", + "$$C_1 = \\mathrm{Span}_{\\mathbb{Z}_{\\geq 0}} \\left\\{ [1,0], [1,1]\\right\\} \\, , \\qquad C_2 = \\mathrm{Span}_{\\mathbb{Z}_{\\geq 0}} \\left\\{ [1,1], [0,1]\\right\\} \\, .$$\n", + "Let us see that this is indeed the case for the above computed toric space $B\\mathbb{P}^2$:" + ] + }, + { + "cell_type": "code", + "execution_count": 112, + "id": "36166499", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Polyhedral fan in ambient dimension 2" + ] + }, + "execution_count": 112, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "fan_of_BP2 = polyhedral_fan(domain(BP2))" + ] + }, + { + "cell_type": "code", + "execution_count": 113, + "id": "b9b15ce5", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "4-element SubObjectIterator{RayVector{QQFieldElem}}:\n", + " [1, 0]\n", + " [0, 1]\n", + " [-1, -1]\n", + " [1, 1]" + ] + }, + "execution_count": 113, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "rays(fan_of_BP2)" + ] + }, + { + "cell_type": "markdown", + "id": "c33a5c6e", + "metadata": {}, + "source": [ + "So we notice the new ray $[1,1]$. To find the new cones $C_1$ and $C_2$, we issue the following:" + ] + }, + { + "cell_type": "code", + "execution_count": 114, + "id": "03632a99", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "4-element Vector{SubObjectIterator{RayVector{QQFieldElem}}}:\n", + " [[1, 0], [1, 1]]\n", + " [[0, 1], [1, 1]]\n", + " [[0, 1], [-1, -1]]\n", + " [[1, 0], [-1, -1]]" + ] + }, + "execution_count": 114, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "[rays(c) for c in maximal_cones(fan_of_BP2)]" + ] + }, + { + "cell_type": "markdown", + "id": "19ffe865", + "metadata": {}, + "source": [ + "So indeed, the last two cones are the expected new cones. The first two are the cones that exist for the fan of $\\mathbb{P}^2$ and were not changed.\n", + "\n", + "The variable $e$ we can see most prominently in the Cox ring:" + ] + }, + { + "cell_type": "code", + "execution_count": 115, + "id": "74ada845", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Multivariate polynomial ring in 4 variables over QQ graded by \n", + " x1 -> [1 0]\n", + " x2 -> [1 0]\n", + " x3 -> [0 1]\n", + " e -> [-1 1]" + ] + }, + "execution_count": 115, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cox_ring(domain(BP2))" + ] + }, + { + "cell_type": "markdown", + "id": "2652aab6", + "metadata": {}, + "source": [ + "It is instructive to look at the following alternative grading of the Cox ring (and we order the variables in ascending order):\n", + "$$\\begin{array}{ccc|c} x_1 & x_2 & x_3 & e \\\\ \\hline 1 & 1 & 1 & 0 \\\\ 1 & 1 & 0 & -1 \\end{array}$$\n", + "In the first line you notice the ordinary grading of the Cox ring of $\\mathbb{P}^2$. The second line corresonds to the toric blowup that has been conducted. The $-1$ for $e$ tells us that this is the homogeneous coordinate introduced to resemble the blowup $\\mathbb{P}^1$. The 1 for $x_1$ and $x_2$ tells us that this blowup added a $\\mathbb{P}^1$ at the locus $\\{ x_1 = x_2 = 0\\}$ in $\\mathbb{P}^2$. In other words, in $B\\mathbb{P}^2$, $x_1$ and $x_2$ cannot vanish simultaneously:\n", + "$$\\{ [x_1 : x_2 : x_3 : e] \\in B\\mathbb{P}^2 | x_1 = x_2 = 0\\} = \\emptyset \\, .$$\n", + "It is instructive to recall that the generators of the Stanley-Reisner ideal encode exactly which homogeneous variables cannot vanish simultaneously:" + ] + }, + { + "cell_type": "code", + "execution_count": 116, + "id": "98458ccb", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "ideal(x1*x2, x3*e)" + ] + }, + "execution_count": 116, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "stanley_reisner_ideal(domain(BP2))" + ] + }, + { + "cell_type": "markdown", + "id": "bf5cf9ed", + "metadata": {}, + "source": [ + "This means that $\\emptyset = V( x_2, x_1 ) \\subseteq B \\mathbb{P}^2$ and $\\emptyset = V( x_3, e ) \\subset B \\mathbb{P}^2$.\n", + "\n", + "Along these lines, we can also see that the locus $V(e) \\subset B\\mathbb{P}^2$ is a $\\mathbb{P}^1$. Namely, from the Stanley-Reisner ideal we learn that $x_3$ and $e$ cannot vanish simultaneously. So $x_3 \\neq 0$ and we can rescale it to $1$. This rescaling effectively eliminates the 2nd line in the grading of the Cox ring and leaves us with\n", + "$$\\begin{array}{ccc|c} x_1 & x_2 \\\\ \\hline 1 & 1 \\end{array}$$\n", + "So we notice, that the variables $x_1$ and $x_2$ each enjoy the standard grading $(1,1)$. Also, since $x_1 x_2 \\in I_{\\text{SR}}( B\\mathbb{P}^2 )$, it holds $\\emptyset = V( x_2, x_1 ) \\subset B \\mathbb{P}^2$. This implies $V( e ) \\cong \\mathbb{P}^1_{[x_1 \\colon x_2]}$." + ] + }, + { + "cell_type": "markdown", + "id": "3b26c45b", + "metadata": {}, + "source": [ + "## 3.H Cartesian products" + ] + }, + { + "cell_type": "markdown", + "id": "649d7b9a", + "metadata": {}, + "source": [ + "It is also possible to compute Cartesian products of toric varieties. Here is an example:" + ] + }, + { + "cell_type": "code", + "execution_count": 117, + "id": "d2857411", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Normal toric variety" + ] + }, + "execution_count": 117, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "product = P2 * F2" + ] + }, + { + "cell_type": "code", + "execution_count": 118, + "id": "3a224cb4", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Multivariate polynomial ring in 7 variables over QQ graded by \n", + " xx1 -> [1 0 0]\n", + " xx2 -> [1 0 0]\n", + " xx3 -> [1 0 0]\n", + " yt1 -> [0 1 0]\n", + " yx1 -> [0 0 1]\n", + " yt2 -> [0 1 0]\n", + " yx2 -> [0 2 1]" + ] + }, + "execution_count": 118, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cox_ring(product)" + ] + }, + { + "cell_type": "markdown", + "id": "76c4fa36", + "metadata": {}, + "source": [ + "Notice that the set of variables \"xx*\" correspond to the $\\mathbb{P}^2$ factor, and the remaining variables are the homogeneous coordinates of the Hirzebruch surface $\\mathbb{F}_2$." + ] + }, + { + "cell_type": "markdown", + "id": "4e02bd35", + "metadata": {}, + "source": [ + "## 3.I Triangulations" + ] + }, + { + "cell_type": "markdown", + "id": "d3749867", + "metadata": {}, + "source": [ + "Triangulations of polytopes open an entire arena for creating families of toric varieties whose properties are often related to one-another in interesting ways. A prominent example along these lines is the Kreuzer-Skarke database (cf. http://hep.itp.tuwien.ac.at/~kreuzer/CY/). Another popular example is the conifold transition, which we now use to demonstrate triangulation functionality in OSCAR:" + ] + }, + { + "cell_type": "code", + "execution_count": 119, + "id": "3058f5f6", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Polyhedron in ambient dimension 3" + ] + }, + "execution_count": 119, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "P = convex_hull([0 0 0; 0 0 1; 1 0 1; 1 1 1; 0 1 1])" + ] + }, + { + "cell_type": "code", + "execution_count": 120, + "id": "2e6c745e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2-element Vector{NormalToricVariety}:\n", + " Normal toric variety\n", + " Normal toric variety" + ] + }, + "execution_count": 120, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + " (v1, v2) = normal_toric_varieties_from_star_triangulations(P)" + ] + }, + { + "cell_type": "markdown", + "id": "613b4fe6", + "metadata": {}, + "source": [ + "If desired, you can look at $P$ by invoking *visualize(P)*. The polyhedron $P$ admits exactly two fine, regular, star triangulations. These were used to create the toric varieties $v_1$ and $v_2$. We now study these two varieties:" + ] + }, + { + "cell_type": "code", + "execution_count": 121, + "id": "355ceab9", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "true" + ] + }, + "execution_count": 121, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "is_smooth(v1)" + ] + }, + { + "cell_type": "code", + "execution_count": 122, + "id": "57442ac8", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "false" + ] + }, + "execution_count": 122, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "is_projective(v1)" + ] + }, + { + "cell_type": "code", + "execution_count": 123, + "id": "d184417e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3" + ] + }, + "execution_count": 123, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dim(v1)" + ] + }, + { + "cell_type": "code", + "execution_count": 124, + "id": "69e68a1c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "false" + ] + }, + "execution_count": 124, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "is_complete(v1)" + ] + }, + { + "cell_type": "code", + "execution_count": 125, + "id": "2cd0d131", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Multivariate polynomial ring in 4 variables over QQ graded by \n", + " x1 -> [1]\n", + " x2 -> [-1]\n", + " x3 -> [-1]\n", + " x4 -> [1]" + ] + }, + "execution_count": 125, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cox_ring(v1)" + ] + }, + { + "cell_type": "code", + "execution_count": 126, + "id": "c6acecd8", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "ideal(x1*x4)" + ] + }, + "execution_count": 126, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "stanley_reisner_ideal(v1)" + ] + }, + { + "cell_type": "markdown", + "id": "333957a6", + "metadata": {}, + "source": [ + "If we repeat these line with $v_2$, then the only difference is:" + ] + }, + { + "cell_type": "code", + "execution_count": 127, + "id": "56b8624e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "ideal(x2*x3)" + ] + }, + "execution_count": 127, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "stanley_reisner_ideal(v2)" + ] + }, + { + "cell_type": "markdown", + "id": "069877aa", + "metadata": {}, + "source": [ + "So in a sence, the transition from $v_1$ to $v_2$ means that the roles of ($x_2$, $x_4$) and ($x_1$, $x_3$) are exchanged. Indeed, the conifold transition means to first perform a deformation which shrinks an algebraic cycle to zero. This leads to a conifold singularity which is subsequently resolved by blowing up another algebraic cycle." + ] + }, + { + "cell_type": "markdown", + "id": "05a3e827", + "metadata": {}, + "source": [ + "## 3.J Benchmarking: An involved triangulation computation" + ] + }, + { + "cell_type": "markdown", + "id": "9edb57a6", + "metadata": {}, + "source": [ + "Triangulations are a topic that features prominently in applied mathematics, e.g. in string theory. The following code was used in a string theory publication (https://arxiv.org/abs/2205.00008):" + ] + }, + { + "cell_type": "code", + "execution_count": 128, + "id": "60ef9e8f", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "involved_triangulation (generic function with 1 method)" + ] + }, + "execution_count": 128, "metadata": {}, "output_type": "execute_result" } @@ -2994,7 +3882,7 @@ }, { "cell_type": "code", - "execution_count": 98, + "execution_count": 129, "id": "2ba11127", "metadata": {}, "outputs": [ @@ -3002,7 +3890,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " 267.974 ms (358874 allocations: 13.91 MiB)\n" + " 277.839 ms (823024 allocations: 30.45 MiB)\n" ] }, { @@ -3011,7 +3899,7 @@ "ideal(x24*x1, x17*x1, x2*x1, x0*x1, x2*x28, x9*x28, x14*x25, x0*x25, x17*x24, x9*x2, x0*x2, x0*x14, x9*x14*x1, x0*x24*x28, x14*x17*x28, x9*x24*x25, x2*x17*x25, x22*x25*x28*x1, x14*x22*x28*x1, x9*x22*x25*x1, x22*x24*x25*x28, x17*x22*x25*x28, x14*x22*x24*x28, x0*x17*x22*x28, x2*x22*x24*x25, x9*x17*x22*x25, x14*x2*x22*x24, x9*x14*x22*x24, x0*x9*x22*x24, x14*x2*x17*x22, x9*x14*x17*x22, x0*x9*x17*x22)" ] }, - "execution_count": 98, + "execution_count": 129, "metadata": {}, "output_type": "execute_result" } @@ -3027,10 +3915,10 @@ "metadata": {}, "source": [ "You might find it interesting to compare your executation time to the following result:\n", - "* Execution time: 267.974ms,\n", - "* 358874 allocations (13.91 MiB).\n", + "* Execution time: 264.934ms,\n", + "* 820981 allocations (30.42 MiB).\n", "\n", - "This result was obtained on March 7, 2023 by runnning the OSCAR (see the beginning of this notebook for the version) with Julia 1.7.3 on a TUXEDO InfinityBook Pro 14 v4 with Intel Core i7-Quad-Core, 32GB RAM and operating system Ubuntu 20.04.5 LTS." + "This result was obtained on January 17, 2024 by runnning the OSCAR (see the beginning of this notebook for the version) with Julia 1.9.2 on a TUXEDO InfinityBook Pro 14 v6 with Intel Core i7-Quad-Core, 64GB RAM and operating system Tuxedo OS (based on Ubuntu 22.04)." ] }, { @@ -3038,7 +3926,7 @@ "id": "c4c37903", "metadata": {}, "source": [ - "## 3.8 Turning off input checks" + "## 3.K Turning off input checks" ] }, { @@ -3055,7 +3943,7 @@ }, { "cell_type": "code", - "execution_count": 99, + "execution_count": 130, "id": "d2a40fcc", "metadata": {}, "outputs": [ @@ -3065,7 +3953,7 @@ "Normal toric variety" ] }, - "execution_count": 99, + "execution_count": 130, "metadata": {}, "output_type": "execute_result" } @@ -3088,7 +3976,7 @@ }, { "cell_type": "code", - "execution_count": 100, + "execution_count": 131, "id": "06a0a031", "metadata": {}, "outputs": [], @@ -3107,865 +3995,1221 @@ }, { "cell_type": "code", - "execution_count": 101, + "execution_count": 132, "id": "ea12eede", "metadata": {}, - "outputs": [], + "outputs": [], + "source": [ + "weights = matrix(ZZ, [1 1 1 0; 1 1 0 1; 1 0 1 1; 0 -1 0 0; 0 0 -1 0; 0 0 0 -1])\n", + "set_attribute!(variety, :map_from_torusinvariant_weil_divisor_group_to_class_group, hom(torusinvariant_weil_divisor_group(variety), class_group(variety), weights))" + ] + }, + { + "cell_type": "markdown", + "id": "503fae45", + "metadata": {}, + "source": [ + "When executing *del_pezzo_surface(3)* more properties are set by OSCAR. But that put aside, the above are the internal steps of the constructor.\n", + "\n", + "With that said, the following should identify this space as the del Pezzo surface $dP_3$:" + ] + }, + { + "cell_type": "code", + "execution_count": 133, + "id": "676ade3c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Multivariate polynomial ring in 6 variables over QQ graded by \n", + " x1 -> [1 1 1 0]\n", + " x2 -> [1 1 0 1]\n", + " x3 -> [1 0 1 1]\n", + " e1 -> [0 -1 0 0]\n", + " e2 -> [0 0 -1 0]\n", + " e3 -> [0 0 0 -1]" + ] + }, + "execution_count": 133, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "cox_ring(variety)" + ] + }, + { + "cell_type": "code", + "execution_count": 134, + "id": "8dc6087a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "true" + ] + }, + "execution_count": 134, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "is_smooth(variety)" + ] + }, + { + "cell_type": "code", + "execution_count": 135, + "id": "38b14b68", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "true" + ] + }, + "execution_count": 135, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "is_projective(variety)" + ] + }, + { + "cell_type": "code", + "execution_count": 136, + "id": "bb28b32e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "5-element Vector{ZZRingElem}:\n", + " 1\n", + " 0\n", + " 4\n", + " 0\n", + " 1" + ] + }, + "execution_count": 136, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "[betti_number(variety,i) for i in range(0,4)]" + ] + }, + { + "cell_type": "code", + "execution_count": 137, + "id": "ea340fdd", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "GrpAb: Z^4" + ] + }, + "execution_count": 137, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "picard_group(variety)" + ] + }, + { + "cell_type": "code", + "execution_count": 138, + "id": "3a0716f1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "GrpAb: Z^6" + ] + }, + "execution_count": 138, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "torusinvariant_weil_divisor_group(variety)" + ] + }, + { + "cell_type": "code", + "execution_count": 139, + "id": "ea65ee31", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "GrpAb: Z^2" + ] + }, + "execution_count": 139, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "character_lattice(variety)" + ] + }, + { + "cell_type": "markdown", + "id": "2b8a09dc", + "metadata": {}, + "source": [ + "# 4 Advanced topics" + ] + }, + { + "cell_type": "markdown", + "id": "034ecbc0", + "metadata": {}, + "source": [ + "## 4.A Vanishing sets" + ] + }, + { + "cell_type": "markdown", + "id": "8d31a88e", + "metadata": {}, + "source": [ + "For (smooth, complete) and (simplicial, projective) toric varieties, it is possible to find a unified description for all line bundles for which a certain cohomology class vanishes. This set is then referred to as a vanishing set.\n", + "\n", + "The first description of this approach can be found in appendix B of https://arxiv.org/pdf/1802.08860.pdf. The corresponding functionality is available in Oscar.\n", + "\n", + "We begin by demonstrating this for the projective space $\\mathbb{P}^2$, for which the vanishing sets are well-known. Namely:\n", + "\\begin{align}\n", + "V^0( \\mathbb{P}^2 ) &= \\{ \\mathcal{L} \\in \\mathrm{Pic}(\\mathbb{P}^2) | h^0(\\mathbb{P}^2, \\mathcal{L}) = 0\\} = \\{ \\mathcal{L} \\in \\mathrm{Pic}(\\mathbb{P}^2) | \\mathrm{deg}( \\mathcal{L} ) < 0 \\} \\, , \\\\\n", + "V^1( \\mathbb{P}^2 ) &= \\{ \\mathcal{L} \\in \\mathrm{Pic}(\\mathbb{P}^2) | h^1(\\mathbb{P}^2, \\mathcal{L}) = 0\\} = \\mathrm{Pic}(\\mathbb{P}^2) \\, , \\\\\n", + "V^2( \\mathbb{P}^2 ) &= \\{ \\mathcal{L} \\in \\mathrm{Pic}(\\mathbb{P}^2) | h^2(\\mathbb{P}^2, \\mathcal{L}) = 0\\} = \\{ \\mathcal{L} \\in \\mathrm{Pic}(\\mathbb{P}^2) | \\mathrm{deg}( \\mathcal{L} ) > -2 \\}\\, .\n", + "\\end{align}\n", + "Let us recompute this with OSCAR:" + ] + }, + { + "cell_type": "code", + "execution_count": 140, + "id": "fac1fd5d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3-element Vector{ToricVanishingSet}:\n", + " Toric vanishing set for cohomology indices [0]\n", + " Toric vanishing set for cohomology indices [1]\n", + " Toric vanishing set for cohomology indices [2]" + ] + }, + "execution_count": 140, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "vs = vanishing_sets(P2)" + ] + }, + { + "cell_type": "code", + "execution_count": 141, + "id": "94fafa02", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1-element Vector{Polyhedron{QQFieldElem}}:\n", + " Polyhedron in ambient dimension 1" + ] + }, + "execution_count": 141, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "polyhedra(vs[1])" + ] + }, + { + "cell_type": "code", + "execution_count": 142, + "id": "e68b153c", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Polyhedron in ambient dimension 1" + ] + }, + "execution_count": 142, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "weights = matrix(ZZ, [1 1 1 0; 1 1 0 1; 1 0 1 1; 0 -1 0 0; 0 0 -1 0; 0 0 0 -1])\n", - "set_attribute!(variety, :map_from_torusinvariant_weil_divisor_group_to_class_group, hom(torusinvariant_weil_divisor_group(variety), class_group(variety), weights))" + "p0 = polyhedra(vs[1])[1]" ] }, { - "cell_type": "markdown", - "id": "503fae45", + "cell_type": "code", + "execution_count": 143, + "id": "00fe619e", "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1-element SubObjectIterator{PointVector{QQFieldElem}}:\n", + " [0]" + ] + }, + "execution_count": 143, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "When executing *del_pezzo_surface(3)* more properties are set by OSCAR. But that put aside, the above are the internal steps of the constructor.\n", - "\n", - "With that said, the following should identify this space as the del Pezzo surface $dP_3$:" + "vertices(p0)" ] }, { "cell_type": "code", - "execution_count": 102, - "id": "676ade3c", + "execution_count": 144, + "id": "e5601b17", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Multivariate Polynomial Ring in 6 variables x1, x2, x3, e1, ..., e3 over Rational Field graded by \n", - " x1 -> [1 1 1 0]\n", - " x2 -> [1 1 0 1]\n", - " x3 -> [1 0 1 1]\n", - " e1 -> [0 -1 0 0]\n", - " e2 -> [0 0 -1 0]\n", - " e3 -> [0 0 0 -1]" + "1-element SubObjectIterator{RayVector{QQFieldElem}}:\n", + " [1]" ] }, - "execution_count": 102, + "execution_count": 144, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "cox_ring(variety)" + "rays(p0)" + ] + }, + { + "cell_type": "markdown", + "id": "2c2b2a89", + "metadata": {}, + "source": [ + "We are thus looking at $C = \\mathrm{Span}_{\\mathbb{Z}_{\\geq 0}}(1) \\}$. This cone is a subset of $\\mathrm{Pic}( \\mathbb{P}^2)$ and the vanishing set is its complement, that is:\n", + "$$V^0( \\mathbb{P}^2 ) = \\{ \\mathcal{L} \\in \\mathrm{Pic}(\\mathbb{P}^2) | h^0(\\mathbb{P}^2, \\mathcal{L}) = 0\\} = \\{ \\mathcal{L} \\in \\mathrm{Pic}(\\mathbb{P}^2) | \\mathcal{L} ) \\notin C \\} \\, .$$\n", + "It is readily verified that this indeed matches the above expectation.\n", + "\n", + "Recall that $V^1( \\mathbb{P}^2 ) = \\mathrm{Pic}(\\mathbb{P}^2)$. This we can see quickly:" ] }, { "cell_type": "code", - "execution_count": 103, - "id": "8dc6087a", + "execution_count": 145, + "id": "23379a97", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "true" + "Polyhedron{QQFieldElem}[]" ] }, - "execution_count": 103, + "execution_count": 145, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "is_smooth(variety)" + "polyhedra(vs[2])" + ] + }, + { + "cell_type": "markdown", + "id": "dab23dd6", + "metadata": {}, + "source": [ + "This list of polyhedra is empty. In other words, the vanishing set is the complement of the empty set in $\\mathrm{Pic}( \\mathbb{P}^2 )$, which is nothing but the entire Picard group.\n", + "\n", + "Let us now look at the vanishing set for $h^2$:" ] }, { "cell_type": "code", - "execution_count": 104, - "id": "38b14b68", + "execution_count": 146, + "id": "35435687", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "true" + "1-element Vector{Polyhedron{QQFieldElem}}:\n", + " Polyhedron in ambient dimension 1" ] }, - "execution_count": 104, + "execution_count": 146, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "is_projective(variety)" + "polyhedra(vs[3])" ] }, { "cell_type": "code", - "execution_count": 105, - "id": "bb28b32e", + "execution_count": 147, + "id": "826cb0db", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "5-element Vector{ZZRingElem}:\n", - " 1\n", - " 0\n", - " 4\n", - " 0\n", - " 1" + "Polyhedron in ambient dimension 1" ] }, - "execution_count": 105, + "execution_count": 147, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "[betti_number(variety,i) for i in range(0,4)]" + "p3 = polyhedra(vs[3])[1]" ] }, { "cell_type": "code", - "execution_count": 106, - "id": "ea340fdd", + "execution_count": 148, + "id": "7654fa72", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "GrpAb: Z^4" + "1-element SubObjectIterator{PointVector{QQFieldElem}}:\n", + " [-3]" ] }, - "execution_count": 106, + "execution_count": 148, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "picard_group(variety)" + "vertices(p3)" ] }, { "cell_type": "code", - "execution_count": 107, - "id": "3a0716f1", + "execution_count": 149, + "id": "7fa64721", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "GrpAb: Z^6" + "1-element SubObjectIterator{RayVector{QQFieldElem}}:\n", + " [-1]" ] }, - "execution_count": 107, + "execution_count": 149, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "torusinvariant_weil_divisor_group(variety)" + "rays(p3)" + ] + }, + { + "cell_type": "markdown", + "id": "f8a9d175", + "metadata": {}, + "source": [ + "We are thus looking at $P_3 = \\{-3\\} + \\mathrm{Span}_{\\mathbb{Z}_{\\geq 0}} \\{-1\\}$. Its complement is $V^2( \\mathbb{P}^2 )$, which matches our expectation.\n", + "\n", + "Recall that we constructed a line bundle $\\mathcal{L}$ on $\\mathbb{P}^2$ above:" ] }, { "cell_type": "code", - "execution_count": 108, - "id": "ea65ee31", + "execution_count": 150, + "id": "8bdbe371", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "GrpAb: Z^2" + "Toric line bundle on a normal toric variety" ] }, - "execution_count": 108, + "execution_count": 150, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "character_lattice(variety)" + "L = toric_line_bundle(P2, [1])" ] }, { "cell_type": "markdown", - "id": "2b8a09dc", + "id": "741417ca", "metadata": {}, "source": [ - "# 4 Advanced topics" + "Its cohomologies are:" ] }, { - "cell_type": "markdown", - "id": "034ecbc0", + "cell_type": "code", + "execution_count": 151, + "id": "59c8bc52", "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3-element Vector{ZZRingElem}:\n", + " 3\n", + " 0\n", + " 0" + ] + }, + "execution_count": 151, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "## 4.1 Vanishing sets " + "all_cohomologies(L)" ] }, { "cell_type": "markdown", - "id": "8d31a88e", + "id": "6dd40d08", "metadata": {}, "source": [ - "For (smooth, complete) and (simplicial, projective) toric varieties, it is possible to find a unified description for all line bundles for which a certain cohomology class vanishes. This set is then referred to as a vanishing set.\n", - "\n", - "The first description of this approach can be found in appendix B of https://arxiv.org/pdf/1802.08860.pdf. The corresponding functionality is available in Oscar.\n", - "\n", - "We begin by demonstrating this for the projective space $\\mathbb{P}^2$, for which the vanishing sets are well-known. Namely:\n", - "\\begin{align}\n", - "V^0( \\mathbb{P}^2 ) &= \\{ \\mathcal{L} \\in \\mathrm{Pic}(\\mathbb{P}^2) | h^0(\\mathbb{P}^2, \\mathcal{L}) = 0\\} = \\{ \\mathcal{L} \\in \\mathrm{Pic}(\\mathbb{P}^2) | \\mathrm{deg}( \\mathcal{L} ) < 0 \\} \\, , \\\\\n", - "V^1( \\mathbb{P}^2 ) &= \\{ \\mathcal{L} \\in \\mathrm{Pic}(\\mathbb{P}^2) | h^1(\\mathbb{P}^2, \\mathcal{L}) = 0\\} = \\mathrm{Pic}(\\mathbb{P}^2) \\, , \\\\\n", - "V^2( \\mathbb{P}^2 ) &= \\{ \\mathcal{L} \\in \\mathrm{Pic}(\\mathbb{P}^2) | h^2(\\mathbb{P}^2, \\mathcal{L}) = 0\\} = \\{ \\mathcal{L} \\in \\mathrm{Pic}(\\mathbb{P}^2) | \\mathrm{deg}( \\mathcal{L} ) > -2 \\}\\, .\n", - "\\end{align}\n", - "Let us recompute this with OSCAR:" + "So $L$ is not $V^0( \\mathbb{P}^2 )$ but in $V^1( \\mathbb{P}^2 )$ and $V^2( \\mathbb{P}^2 )$:" ] }, { "cell_type": "code", - "execution_count": 109, - "id": "fac1fd5d", + "execution_count": 152, + "id": "a6b48579", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "3-element Vector{ToricVanishingSet}:\n", - " Toric vanishing set for cohomology index 0\n", - " Toric vanishing set for cohomology index 1\n", - " Toric vanishing set for cohomology index 2" + "false" ] }, - "execution_count": 109, + "execution_count": 152, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "vs = vanishing_sets(P2)" + "contains(vs[1],L)" ] }, { "cell_type": "code", - "execution_count": 110, - "id": "94fafa02", + "execution_count": 153, + "id": "95d1c418", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "1-element Vector{Polyhedron{QQFieldElem}}:\n", - " Polyhedron in ambient dimension 1" + "true" ] }, - "execution_count": 110, + "execution_count": 153, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "polyhedra(vs[1])" + "contains(vs[2],L)" ] }, { "cell_type": "code", - "execution_count": 111, - "id": "e68b153c", + "execution_count": 154, + "id": "da686378", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Polyhedron in ambient dimension 1" + "true" ] }, - "execution_count": 111, + "execution_count": 154, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "p0 = polyhedra(vs[1])[1]" + "contains(vs[3],L)" + ] + }, + { + "cell_type": "markdown", + "id": "643f4604", + "metadata": {}, + "source": [ + "## 4.B Intersection theory" + ] + }, + { + "cell_type": "markdown", + "id": "1b882d96", + "metadata": {}, + "source": [ + "Intersection theory for toric varieties is well-understood and the Chow ring under good control. For a good example, let us consider the del Pezzo surface $dP_2$:" ] }, { "cell_type": "code", - "execution_count": 112, - "id": "00fe619e", + "execution_count": 155, + "id": "50fb2c0a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "1-element SubObjectIterator{PointVector{QQFieldElem}}:\n", - " [0]" + "Normal toric variety" ] }, - "execution_count": 112, + "execution_count": 155, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "vertices(p0)" + "dP2 = del_pezzo_surface(2)" + ] + }, + { + "cell_type": "markdown", + "id": "8d866b1c", + "metadata": {}, + "source": [ + "Recall that this constructors invokes standard names for the homogeneous coordinates. This we can see upon execution of the Cox ring:" ] }, { "cell_type": "code", - "execution_count": 113, - "id": "e5601b17", + "execution_count": 156, + "id": "8c404f51", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "1-element SubObjectIterator{RayVector{QQFieldElem}}:\n", - " [1]" + "Multivariate polynomial ring in 5 variables over QQ graded by \n", + " x1 -> [1 1 1]\n", + " x2 -> [1 1 0]\n", + " x3 -> [1 0 1]\n", + " e1 -> [0 -1 0]\n", + " e2 -> [0 0 -1]" ] }, - "execution_count": 113, + "execution_count": 156, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "rays(p0)" + "S = cox_ring(dP2)" ] }, { "cell_type": "markdown", - "id": "2c2b2a89", + "id": "e019841a", "metadata": {}, "source": [ - "We are thus looking at $C = \\mathrm{Span}_{\\mathbb{Z}_{\\geq 0}}(1) \\}$. This cone is a subset of $\\mathrm{Pic}( \\mathbb{P}^2)$ and the vanishing set is its complement, that is:\n", - "$$V^0( \\mathbb{P}^2 ) = \\{ \\mathcal{L} \\in \\mathrm{Pic}(\\mathbb{P}^2) | h^0(\\mathbb{P}^2, \\mathcal{L}) = 0\\} = \\{ \\mathcal{L} \\in \\mathrm{Pic}(\\mathbb{P}^2) | \\mathcal{L} ) \\notin C \\} \\, .$$\n", - "It is readily verified that this indeed matches the above expectation.\n", + "We now recall the toric ideal-variety correspondence from proposition 5.2.7 in the book \"Toric Varieties\" by David Cox, Hal Schenk and John Little:\n", "\n", - "Recall that $V^1( \\mathbb{P}^2 ) = \\mathrm{Pic}(\\mathbb{P}^2)$. This we can see quickly:" + "Let $X_\\Sigma$ be a simplicial toric variety. Then there is a bijective correspondence\n", + "$$ \\{ \\text{ closed subvarieties of $X_\\Sigma$ } \\} \\leftrightarrow \\{ \\text{ radical homogeneous ideals $I \\subseteq B(\\Sigma) \\subseteq S$} \\} \\, .$$\n", + "In this expression $B(\\Sigma)$ is the irrelevant ideal. For instance, for $\\mathrm{dP}_2$ we have:" ] }, { "cell_type": "code", - "execution_count": 114, - "id": "23379a97", + "execution_count": 157, + "id": "29b3a229", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Polyhedron{QQFieldElem}[]" + "ideal(x2*x3*e2, x1*x3*e2, x2*x3*e1, x1*x2*e1, x1*e1*e2)" ] }, - "execution_count": 114, + "execution_count": 157, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "polyhedra(vs[2])" + "irrelevant_ideal(dP2)" ] }, { "cell_type": "markdown", - "id": "dab23dd6", + "id": "d0e0bae1", "metadata": {}, "source": [ - "This list of polyhedra is empty. In other words, the vanishing set is the complement of the empty set in $\\mathrm{Pic}( \\mathbb{P}^2 )$, which is nothing but the entire Picard group.\n", + "Consequently, for every radical homogeneous ideal $I \\subseteq B(\\Sigma) \\subseteq S$, we find a closed subvariety $V( I ) \\subseteq X_\\Sigma$ and every closed subvariety of a simplicial toric variety $X_\\Sigma$ arises in this way.\n", "\n", - "Let us now look at the vanishing set for $h^2$:" + "An algebraic cycle is a formal linear sum of such closed subvarieties. Modulo rational equivalence, the algebraic cycles furnish the Chow ring. We can compute this ring as follows in OSCAR:" ] }, { "cell_type": "code", - "execution_count": 115, - "id": "35435687", + "execution_count": 158, + "id": "da0d77a6", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "1-element Vector{Polyhedron{QQFieldElem}}:\n", - " Polyhedron in ambient dimension 1" + "Quotient\n", + " of multivariate polynomial ring in 5 variables x1, x2, x3, e1, e2\n", + " over rational field\n", + " by ideal(x1 - x3 + e1, x2 - x3 + e1 - e2, x1*x2, x1*x3, e1*e2, x2*e2, x3*e1)" ] }, - "execution_count": 115, + "execution_count": 158, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "polyhedra(vs[3])" + "chow_ring(dP2)" ] }, { - "cell_type": "code", - "execution_count": 116, - "id": "826cb0db", + "cell_type": "markdown", + "id": "39ab0ff2", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Polyhedron in ambient dimension 1" - ] - }, - "execution_count": 116, - "metadata": {}, - "output_type": "execute_result" - } - ], "source": [ - "p3 = polyhedra(vs[3])[1]" + "There are several ways to create a rational equivalence class of an algebraic cycle. Here is one way to create such an object:" ] }, { "cell_type": "code", - "execution_count": 117, - "id": "7654fa72", + "execution_count": 159, + "id": "9a8a9e87", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "1-element SubObjectIterator{PointVector{QQFieldElem}}:\n", - " [-3]" + "Rational equivalence class on a normal toric variety represented by 6V(x3)+V(e1)+7V(e2)" ] }, - "execution_count": 117, + "execution_count": 159, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "vertices(p3)" + "d = toric_divisor(dP2, [1, 2, 3, 4, 5]);\n", + "ac = rational_equivalence_class(d)" + ] + }, + { + "cell_type": "markdown", + "id": "30344208", + "metadata": {}, + "source": [ + "So $ac$ is represented by an algebraic cycle which in turn is given by a formal linear sum of the closed subvarieties $V(x_3)$, $V(e_1)$ and $V(e_2)$, namely $6 V(x_3) + 1 V( e_1 ) + 7 V( e_2 )$.\n", + "\n", + "Intersections of rational equivalence classes can be computed in OSCAR:" ] }, { "cell_type": "code", - "execution_count": 118, - "id": "7fa64721", + "execution_count": 160, + "id": "85c9c7e1", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "1-element SubObjectIterator{RayVector{QQFieldElem}}:\n", - " [-1]" + "Rational equivalence class on a normal toric variety represented by 34V(x2,x3)" ] }, - "execution_count": 118, + "execution_count": 160, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "rays(p3)" + "ac * ac" ] }, { "cell_type": "markdown", - "id": "f8a9d175", + "id": "2f2eae9e", "metadata": {}, "source": [ - "We are thus looking at $P_3 = \\{-3\\} + \\mathrm{Span}_{\\mathbb{Z}_{\\geq 0}} \\{-1\\}$. Its complement is $V^2( \\mathbb{P}^2 )$, which matches our expectation.\n", - "\n", - "Recall that we constructed a line bundle $\\mathcal{L}$ on $\\mathbb{P}^2$ above:" + "If we only care about topological intersection numbers, then the intersection form suffices:" ] }, { "cell_type": "code", - "execution_count": 119, - "id": "8bdbe371", + "execution_count": 161, + "id": "bfc4c884", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Toric line bundle on a normal toric variety" + "Dict{MPolyRingElem, QQFieldElem} with 15 entries:\n", + " x1*x3 => 0\n", + " x3*e2 => 1\n", + " x1^2 => -1\n", + " x1*e1 => 1\n", + " e2^2 => -1\n", + " x3^2 => 0\n", + " x2*x3 => 1\n", + " e1*e2 => 0\n", + " x2*e1 => 1\n", + " x1*e2 => 1\n", + " x2^2 => 0\n", + " e1^2 => -1\n", + " x3*e1 => 0\n", + " x1*x2 => 0\n", + " x2*e2 => 0" ] }, - "execution_count": 119, + "execution_count": 161, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "L = toric_line_bundle(P2, [1])" + "intersection_form(dP2)" ] }, { "cell_type": "markdown", - "id": "741417ca", + "id": "1266dbbe", "metadata": {}, "source": [ - "Its cohomologies are:" + "Note that this is obtained upon normalization with the volume form:" ] }, { "cell_type": "code", - "execution_count": 120, - "id": "59c8bc52", + "execution_count": 162, + "id": "485e2919", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "3-element Vector{ZZRingElem}:\n", - " 3\n", - " 0\n", - " 0" + "Cohomology class on a normal toric variety given by -e2^2" ] }, - "execution_count": 120, + "execution_count": 162, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "all_cohomologies(L)" + "volume_form(dP2)" ] }, { "cell_type": "markdown", - "id": "6dd40d08", + "id": "017512d5-6c7d-4b96-8035-fd2811b85084", "metadata": {}, "source": [ - "So $L$ is not $V^0( \\mathbb{P}^2 )$ but in $V^1( \\mathbb{P}^2 )$ and $V^2( \\mathbb{P}^2 )$:" + "## 4.C Toric morphisms" + ] + }, + { + "cell_type": "markdown", + "id": "c397e642-decf-4d8c-b1bc-7c5288f07a9d", + "metadata": {}, + "source": [ + "Morphisms among toric varieties are well understood. Let $X$ and $Y$ be toric varieties with polyhedral fans $F_X$ in $\\mathbb{Z}^n$ and $F_Y$ in $\\mathbb{Z}^m$. It can be shown that a grid morphism $\\mathbb{Z}^n \\to \\mathbb{Z}^m$, such that the image of every cone in $F_X$ is contained in a cone of $F_Y$ defines a morphism $X \\to Y$. Even the converse is true!\n", + "\n", + "Consequently, toric morphisms are computationally accessible and a lot is known about them. Let us give a simple example:" ] }, { "cell_type": "code", - "execution_count": 121, - "id": "a6b48579", + "execution_count": 163, + "id": "26ef6f83-a0f6-45a3-9c99-55309216ca63", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "false" + "Normal toric variety" ] }, - "execution_count": 121, + "execution_count": 163, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "contains(vs[1],L)" + "domain_variety = projective_space(NormalToricVariety, 1)" ] }, { "cell_type": "code", - "execution_count": 122, - "id": "95d1c418", + "execution_count": 164, + "id": "27281fc7-e601-4b03-bf44-bca1c7363cd2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "true" + "Normal toric variety" ] }, - "execution_count": 122, + "execution_count": 164, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "contains(vs[2],L)" + "codomain_variety = hirzebruch_surface(2)" ] }, { "cell_type": "code", - "execution_count": 123, - "id": "da686378", + "execution_count": 165, + "id": "4a26bb4f-51d9-4617-8905-0291f2e0d32b", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "true" + "Map\n", + " from GrpAb: Z\n", + " to GrpAb: Z^2" ] }, - "execution_count": 123, + "execution_count": 165, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "contains(vs[3],L)" + "mapping_matrix = matrix(ZZ, [[0, 1]])\n", + "grid_morphism = hom(character_lattice(domain_variety), character_lattice(codomain_variety), mapping_matrix)" ] }, { - "cell_type": "markdown", - "id": "643f4604", + "cell_type": "code", + "execution_count": 166, + "id": "a866ed2f-298e-4dce-bc74-315745d1d299", "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Toric morphism" + ] + }, + "execution_count": 166, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "## 4.2 Intersection theory" + "tm = toric_morphism(domain_variety, grid_morphism, codomain_variety)" ] }, { "cell_type": "markdown", - "id": "1b882d96", + "id": "a9c20520-7cf8-4d7c-9fc9-3ba1f967b593", "metadata": {}, "source": [ - "Intersection theory for toric varieties is well-understood and the Chow ring under good control. For a good example, let us consider the del Pezzo surface $dP_2$:" + "A toric morphism induces, among others, a map among the class groups of the toric varieties in question. In the example above we have:" ] }, { "cell_type": "code", - "execution_count": 124, - "id": "50fb2c0a", + "execution_count": 167, + "id": "62eefd38-74d7-421e-a8d8-acec090ab95b", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor" + "Map\n", + " from GrpAb: Z\n", + " to GrpAb: Z^2" ] }, - "execution_count": 124, + "execution_count": 167, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "dP2 = del_pezzo_surface(2)" - ] - }, - { - "cell_type": "markdown", - "id": "8d866b1c", - "metadata": {}, - "source": [ - "Recall that this constructors invokes standard names for the homogeneous coordinates. This we can see upon execution of the Cox ring:" + "induced_morphism = morphism_on_class_group(tm)" ] }, { "cell_type": "code", - "execution_count": 125, - "id": "8c404f51", + "execution_count": 168, + "id": "81a87d79-70ce-4329-8869-202f7c968321", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Multivariate Polynomial Ring in x1, x2, x3, e1, e2 over Rational Field graded by \n", - " x1 -> [1 1 1]\n", - " x2 -> [1 1 0]\n", - " x3 -> [1 0 1]\n", - " e1 -> [0 -1 0]\n", - " e2 -> [0 0 -1]" + "[0 1]" ] }, - "execution_count": 125, + "execution_count": 168, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "S = cox_ring(dP2)" + "matrix(induced_morphism)" ] }, { "cell_type": "markdown", - "id": "e019841a", + "id": "44e6dc87-06d9-4434-adb7-868fceb5be8b", "metadata": {}, "source": [ - "We now recall the toric ideal-variety correspondence from proposition 5.2.7 in the book \"Toric Varieties\" by David Cox, Hal Schenk and John Little:\n", + "# 5 Toric schemes and subvarieties" + ] + }, + { + "cell_type": "markdown", + "id": "581f93e1-8182-4fa5-84c3-074625ea4baa", + "metadata": {}, + "source": [ + "Every toric variety has an underlying schemes, obtained by forgetting the toric origin and \"just\" gluing affine schemes. On the long run, we aim to extend the interplay between schemes and toric varieties:\n", + "* Toric algorithms often exhibit superior performance over generic scheme algorithms.\n", + "* Certain operations, e.g. blow-ups, can force us to leave the regime of toric geometry. This is easily facilitated by consider the toric variety as schemes\n", "\n", - "Let $X_\\Sigma$ be a simplicial toric variety. Then there is a bijective correspondence\n", - "$$ \\{ \\text{ closed subvarieties of $X_\\Sigma$ } \\} \\leftrightarrow \\{ \\text{ radical homogeneous ideals $I \\subseteq B(\\Sigma) \\subseteq S$} \\} \\, .$$\n", - "In this expression $B(\\Sigma)$ is the irrelevant ideal. For instance, for $\\mathrm{dP}_2$ we have:" + "Let us return to one of our starting examples to demonstrate this \"forgetting the toric origin\":" ] }, { "cell_type": "code", - "execution_count": 126, - "id": "29b3a229", + "execution_count": 169, + "id": "0f1629cc-ba61-46e8-93cc-43e20ea8cc50", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "ideal(x2*x3*e2, x1*x3*e2, x2*x3*e1, x1*x2*e1, x1*e1*e2)" + "Spectrum\n", + " of quotient\n", + " of multivariate polynomial ring in 3 variables x1, x2, x3\n", + " over rational field\n", + " by ideal(-x1*x2 + x3^2)" ] }, - "execution_count": 126, + "execution_count": 169, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "irrelevant_ideal(dP2)" + "C2 = positive_hull([1 1; -1 1])\n", + "antv2 = affine_normal_toric_variety(C2)\n", + "scheme_of_antv2 = underlying_scheme(antv2)" ] }, { "cell_type": "markdown", - "id": "d0e0bae1", + "id": "6d86d894-bb9d-41d3-b068-8a3e7d8150da", "metadata": {}, "source": [ - "Consequently, for every radical homogeneous ideal $I \\subseteq B(\\Sigma) \\subseteq S$, we find a closed subvariety $V( I ) \\subseteq X_\\Sigma$ and every closed subvariety of a simplicial toric variety $X_\\Sigma$ arises in this way.\n", + "Recall that we introduced affine toric varieties via theorem 1.2.18 of the book *Toric Varieties* by David Cox, John Little and Hal Schenck:\n", "\n", - "An algebraic cycle is a formal linear sum of such closed subvarieties. Modulo rational equivalence, the algebraic cycles furnish the Chow ring. We can compute this ring as follows in OSCAR:" + "Let $\\sigma \\subseteq N_{\\mathbb{R}} \\cong \\mathbb{R}^n$ be a rational polyhedral cone with semigroup $S_\\sigma = \\sigma^\\vee \\cap M$. Then the associated affine toric variety $U_\\sigma$ is given by\n", + "\n", + "$$ U_\\sigma = \\mathrm{Spec} \\left(\\mathbb{C} \\left[ S_\\sigma \\right]\\right) = \\mathrm{Spec} \\left(\\mathbb{C} \\left[ \\sigma^\\vee \\cap M \\right]\\right) \\, .$$\n", + "\n", + "Above, *scheme_of_antv2* is exactly $U_\\sigma$! The interested reader can find details on how to investigate this scheme $U_\\sigma$ in the documentation on the scheme functionality.\n", + "\n", + "Certainly, we would also like to be able to define subvarieties of toric varieties in the same way that we do for schemes/varieties. Indeed this is possible. As proven in the book *Toric varieties* by David Cox, John Little, Hal Schenk every closed subvariety of a simplicial toric variety is cut out by finitely many homogeneous polynomials in the Cox ring. Here is an example:" ] }, { "cell_type": "code", - "execution_count": 127, - "id": "da0d77a6", + "execution_count": 170, + "id": "fb3cd27d-ca19-4184-9259-0b02472b7fd2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Quotient of Multivariate Polynomial Ring in x1, x2, x3, e1, e2 over Rational Field by ideal(x1 - x3 + e1, x2 - x3 + e1 - e2, x1*x2, x1*x3, e1*e2, x2*e2, x3*e1)" + "Closed subvariety of a normal toric variety" ] }, - "execution_count": 127, + "execution_count": 170, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "chow_ring(dP2)" + "(x1, x2, x3) = gens(cox_ring(P2))\n", + "c = closed_subvariety_of_toric_variety(P2, [x1])" ] }, { "cell_type": "markdown", - "id": "39ab0ff2", + "id": "d2c8bab5-0024-4dcc-9c7a-101cf6c6ec5c", "metadata": {}, "source": [ - "There are several ways to create a rational equivalence class of an algebraic cycle. Here is one way to create such an object:" + "It can happen that such a subvariety is the empty set. We easily verify that *c* is not empty:" ] }, { "cell_type": "code", - "execution_count": 128, - "id": "9a8a9e87", + "execution_count": 171, + "id": "653ebfc3-f970-4d54-8887-6f786a38e387", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Rational equivalence class on a normal toric variety represented by 6V(x3)+V(e1)+7V(e2)" + "false" ] }, - "execution_count": 128, + "execution_count": 171, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "d = toric_divisor(dP2, [1, 2, 3, 4, 5]);\n", - "ac = rational_equivalence_class(d)" + "is_empty(c)" ] }, { "cell_type": "markdown", - "id": "30344208", + "id": "736b3e9c-eabb-4b48-8590-fdc2f5354b11", "metadata": {}, "source": [ - "So $ac$ is represented by an algebraic cycle which in turn is given by a formal linear sum of the closed subvarieties $V(x_3)$, $V(e_1)$ and $V(e_2)$, namely $6 V(x_3) + 1 V( e_1 ) + 7 V( e_2 )$.\n", - "\n", - "Intersections of rational equivalence classes can be computed in OSCAR:" + "Here is an example of an empty subvariety:" ] }, { "cell_type": "code", - "execution_count": 129, - "id": "85c9c7e1", + "execution_count": 172, + "id": "433b7b20-aa6e-4b8a-beca-d920073c8469", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Rational equivalence class on a normal toric variety represented by 34V(x2,x3)" + "true" ] }, - "execution_count": 129, + "execution_count": 172, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "ac * ac" + "c2 = closed_subvariety_of_toric_variety(P2, [x1, x2, x3])\n", + "is_empty(c2)" ] }, { "cell_type": "markdown", - "id": "2f2eae9e", + "id": "ee77ff2d-91f9-4533-94a1-91c42eabc991", "metadata": {}, "source": [ - "If we only care about topological intersection numbers, then the intersection form suffices:" + "This is not at all surprising. After all, we know that the homogeneous coordinates *x1*, *x2*, *x3* of the projective space must not vanish simultaneously.\n", + "\n", + "The defining ideal of such a subvariety is recovered as follows:" ] }, { "cell_type": "code", - "execution_count": 130, - "id": "bfc4c884", + "execution_count": 173, + "id": "a95adc1c-7af2-44bd-a0c8-ebf644c687d9", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Dict{MPolyRingElem, QQFieldElem} with 15 entries:\n", - " x1*x3 => 0\n", - " x3*e2 => 1\n", - " x1^2 => -1\n", - " x1*e1 => 1\n", - " e2^2 => -1\n", - " x3^2 => 0\n", - " x2*x3 => 1\n", - " e1*e2 => 0\n", - " x2*e1 => 1\n", - " x1*e2 => 1\n", - " x2^2 => 0\n", - " e1^2 => -1\n", - " x3*e1 => 0\n", - " x1*x2 => 0\n", - " x2*e2 => 0" + "ideal(x1)" ] }, - "execution_count": 130, + "execution_count": 173, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "intersection_form(dP2)" - ] - }, - { - "cell_type": "markdown", - "id": "1266dbbe", - "metadata": {}, - "source": [ - "Note that this is obtained upon normalization with the volume form:" + "defining_ideal(c)" ] }, { "cell_type": "code", - "execution_count": 131, - "id": "485e2919", + "execution_count": 174, + "id": "4bb11370-7734-4f14-a17d-aeb16d40e561", "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Cohomology class on a normal toric variety given by -e2^2" + "ideal(x1, x2, x3)" ] }, - "execution_count": 131, + "execution_count": 174, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "volume_form(dP2)" + "defining_ideal(c2)" ] }, { "cell_type": "code", "execution_count": null, - "id": "ba367246", + "id": "4d58b314-0af4-4de7-8184-f4bdea9f2d83", "metadata": {}, "outputs": [], "source": [] @@ -3973,15 +5217,15 @@ ], "metadata": { "kernelspec": { - "display_name": "Julia 1.7.2", + "display_name": "Julia 1.9.2", "language": "julia", - "name": "julia-1.7" + "name": "julia-1.9" }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.7.2" + "version": "1.9.2" } }, "nbformat": 4, diff --git a/_data/tutorials/ToricGeometryInOSCAR1.ipynb b/_data/tutorials/ToricGeometryInOSCAR1.ipynb deleted file mode 100644 index f8379a57..00000000 --- a/_data/tutorials/ToricGeometryInOSCAR1.ipynb +++ /dev/null @@ -1,2422 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "a6df9a27", - "metadata": {}, - "source": [ - "# Toric Varieties\n", - "\n", - "This tutorial provides an introduction to (normal) toric varieties in OSCAR.\n", - "The aim is to describe the basic constructions for toric varieties and to explain them with minimal examples.\n", - "In order to facilitate the introduction, some of the methods are not presented in their entirety.\n", - "For a full description of the topic, see https://docs.oscar-system.org/stable/AlgebraicGeometry/ToricVarieties/intro/.\n", - "\n", - "\n", - "The reader is assumed to be familiar with OSCAR's commutative algebra and polyhedral geometry methods.\n", - "\n", - "\n", - "The first step is to import the OSCAR package." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "2c3cd666", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "polymake: WARNING: Recompiling in /home/remkela/.julia/scratchspaces/d720cf60-89b5-51f5-aff5-213f193123e7/polymake_12579369564355830599_1.9_userdir/wrappers.0/build/Opt, please be patient...\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - " ----- ----- ----- - ----- \n", - "| | | | | | | | | | \n", - "| | | | | | | | \n", - "| | ----- | | | |----- \n", - "| | | | |-----| | | \n", - "| | | | | | | | | | \n", - " ----- ----- ----- - - - - \n", - "\n", - "...combining (and extending) ANTIC, GAP, Polymake and Singular\n", - "Version\u001b[32m 0.12.0 \u001b[39m... \n", - " ... which comes with absolutely no warranty whatsoever\n", - "Type: '?Oscar' for more information\n", - "(c) 2019-2023 by The OSCAR Development Team\n" - ] - } - ], - "source": [ - "using Oscar" - ] - }, - { - "cell_type": "markdown", - "id": "6f0fcc8b", - "metadata": {}, - "source": [ - "## Normal Toric Varieties\n", - "\n", - "### Construction\n", - "\n", - "There are two types of toric varieties in OSCAR, distinguishing between affine and non-affine cases.\n", - "Here `AffineNormalToricVariety` is the toric variety $U_\\sigma$ of a cone $\\sigma$ and `NormalToricVariety` is the toric variety $X_\\Sigma$ of a polyhedral fan $\\Sigma$.\n", - "\n", - "#### Construction of affine normal toric varieties\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `affine_normal_toric_variety(C::Cone)` | Constructs the affine normal toric variety $U_C$ corresponding to the polyhedral cone `C`. |\n", - "| `normal_toric_variety(C::Cone)` | Constructs the (affine) normal toric variety $X_\\Sigma$ corresponding to the polyhedral fan $\\Sigma = C$ consisting only of the cone `C`. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "7f51ee28", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Normal, affine toric variety" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# rational normal cone of degree 2\n", - "C = positive_hull([2 -1; 0 1])\n", - "U = affine_normal_toric_variety(C)" - ] - }, - { - "cell_type": "markdown", - "id": "6d66c9f9", - "metadata": {}, - "source": [ - "#### Construction of normal toric varieties\n", - "\n", - "In OSCAR, there are three different ways to construct a normal toric variety:\n", - "\n", - "| Method |\n", - "| :----------- |\n", - "| `normal_toric_variety(rays::Vector{Vector{Int64}}, max_cones::Vector{Vector{Int64}})` |\n", - "| `normal_toric_variety(PF::PolyhedralFan)` |\n", - "| `normal_toric_variety(P::Polyhedron)` |\n", - "\n", - "- by specifying the rays `rays` and and the maximum cones `max_cones` as a vector of vectors.\n", - "- by specifying a fan `PF`.\n", - "- by specifying a polyhedron `P`.\n", - "\n", - "##### Example\n", - "\n", - "The projective surface $\\mathbb{P}^2$ can be constructed as follows:" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "90fc4940", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Normal toric variety" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# specifying the ray generators and the maximal cones\n", - "ray_generators = [[1,0],[0,1],[-1,-1]]\n", - "max_cones = [[1,2],[2,3],[1,3]]\n", - "P2 = normal_toric_variety(ray_generators, max_cones)" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "63f3b9f1", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Normal toric variety" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# specifying the fan\n", - "R = [1 0; 0 1; -1 -1]\n", - "IM = IncidenceMatrix([[1,2],[2,3],[1,3]])\n", - "PF = PolyhedralFan(R, IM)\n", - "P2 = normal_toric_variety(PF)" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "95bd1aa8", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Normal toric variety" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# specifying the polyhedron\n", - "P = simplex(2)\n", - "P2 = normal_toric_variety(P)" - ] - }, - { - "cell_type": "markdown", - "id": "0827262a", - "metadata": {}, - "source": [ - "### Famous Toric Vareties\n", - "\n", - "OSCAR already includes many of the most important normal toric varieties:\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `affine_space(::Type{NormalToricVariety}, d::Int)` | Constructs the (toric) affine space of dimension `d`. |\n", - "| `del_pezzo_surface(b::Int)` | Constructs the del Pezzo surface with `b` blowups for `b` at most 3. |\n", - "| `hirzebruch_surface(r::Int)` | Constructs the `r`-th Hirzebruch surface.. |\n", - "| `projective_space(::Type{NormalToricVariety}, d::Int)` | Constructs the projective space of dimension `d`. |\n", - "| `weighted_projective_space(::Type{NormalToricVariety}, w::Vector{T})` | Constructs the weighted projective space corresponding to the weights `w`. |\n", - "\n", - "##### Example\n", - "\n", - "Constructing toric varieties using predefined methods provides some of their properties:" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "cc247924", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "projective_space(NormalToricVariety, 2)" - ] - }, - { - "cell_type": "markdown", - "id": "4056aedd", - "metadata": {}, - "source": [ - "#### Further Constructions\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `blowup_on_ith_minimal_torus_orbit(v::AbstractNormalToricVariety, n::Int, coordinate_name::String)` | Return the blowup of the normal toric variety `v` on its `n`-th minimal torus orbit. |\n", - "| `Base.:*(v::AbstractNormalToricVariety, w::AbstractNormalToricVariety)` | Return the Cartesian/direct product of two normal toric varieties `v` and `w`. |\n", - "| `normal_toric_varieties_from_star_triangulations(P::Polyhedron)` | Return the list of toric varieties obtained from fine regular star triangulations of the polyhedron `P`. |\n", - "| `normal_toric_varieties_from_glsm(charges::ZZMatrix)` | Return a normal toric variety from a Witten's Generalized-Sigma Model (GLSM). |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "b5c373f1", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Normal toric variety" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P1 = projective_space(NormalToricVariety, 1)\n", - "P = P1 * P1\n", - "blowup_on_ith_minimal_torus_orbit(P, 1, \"e\")" - ] - }, - { - "cell_type": "markdown", - "id": "500666e3", - "metadata": {}, - "source": [ - "### Properties of Toric Varieties\n", - "\n", - "The following properties can be checked for normal toric varieties:\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `has_torusfactor(v::AbstractNormalToricVariety)` | Checks if the normal toric variety `v` has a torus factor. |\n", - "| `is_affine(v::AbstractNormalToricVariety)` | Checks if the normal toric variety `v` is affine. |\n", - "| `is_complete(v::AbstractNormalToricVariety)` | Checks if the normal toric variety `v` is complete. |\n", - "| `is_fano(v::AbstractNormalToricVariety)` | Checks if the normal toric variety `v` is fano. |\n", - "| `is_gorenstein(v::AbstractNormalToricVariety)` | Checks if the normal toric variety `v` is Gorenstein. |\n", - "| `is_simplicial(v::AbstractNormalToricVariety)` | Checks if the normal toric variety `v` is simplicial. |\n", - "| `is_smooth(v::AbstractNormalToricVariety)` | Checks if the normal toric variety `v` is smooth. |\n", - "| `is_normal(v::AbstractNormalToricVariety)` | Checks if the normal toric variety `v` is normal. |\n", - "| `is_orbifold(v::AbstractNormalToricVariety)` | Checks if the normal toric variety `v` is an orbifold. |\n", - "| `is_projective(v::AbstractNormalToricVariety)` | Checks if the normal toric variety `v` is projective. |\n", - "| `is_projective_space(v::AbstractNormalToricVariety)` | Decides if the normal toric varieties `v` is a projective space. |\n", - "| `is_q_gorenstein(v::AbstractNormalToricVariety)` | Checks if the normal toric variety `v` is Q-Gorenstein. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "0a7e0e12", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(false, false, true, true)" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Properties of the projective plane\n", - "P2 = projective_space(NormalToricVariety, 2)\n", - "(has_torusfactor(P2), is_affine(P2), is_complete(P2), is_smooth(P2))" - ] - }, - { - "cell_type": "markdown", - "id": "5db884e8", - "metadata": {}, - "source": [ - "### Operations for Toric Varieties\n", - "\n", - "#### Affine Open Covering\n", - "\n", - "\n", - "\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `affine_open_covering(v::AbstractNormalToricVariety)` | Computes an affine open cover of the normal toric variety `v`, i.e. returns a list of affine toric varieties. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "b1c110b1", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "3-element Vector{AffineNormalToricVariety}:\n", - " Normal, affine toric variety\n", - " Normal, affine toric variety\n", - " Normal, affine toric variety" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "affine_open_covering(P2)" - ] - }, - { - "cell_type": "markdown", - "id": "ddec9d99", - "metadata": {}, - "source": [ - "#### Characters, Weil Divisors, Cartier Divisors, Class Group and Picard Group\n", - "\n", - "The following groups can be identified for normal toric varieties:\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `torusinvariant_cartier_divisor_group(v::AbstractNormalToricVariety)` | Cartier divisor group of an abstract normal toric variety `v`. |\n", - "| `character_lattice(v::AbstractNormalToricVariety)` | Character lattice of a normal toric variety `v`. |\n", - "| `class_group(v::AbstractNormalToricVariety)` | Class group of the normal toric variety `v`. |\n", - "| `picard_group(v::AbstractNormalToricVariety)` | Picard group of an abstract normal toric variety `v`. |\n", - "| `torusinvariant_weil_divisor_group(v::AbstractNormalToricVariety)` | Torusinvariant divisor group of a normal toric variety `v`. |\n", - "| `torusinvariant_prime_divisors(v::AbstractNormalToricVariety)` | List of all torus invariant prime divisors in a normal toric variety `v`. |\n", - "\n", - "In addition, it is possible to construct the following mappings between these groups:\n", - "\n", - "| Method |\n", - "| :----------- |\n", - "| `map_from_torusinvariant_cartier_divisor_group_to_torusinvariant_weil_divisor_group(v::AbstractNormalToricVariety)` |\n", - "| `map_from_torusinvariant_cartier_divisor_group_to_picard_group(v::AbstractNormalToricVariety)` |\n", - "| `map_from_character_lattice_to_torusinvariant_weil_divisor_group(v::AbstractNormalToricVariety)` |\n", - "| `map_from_torusinvariant_weil_divisor_group_to_class_group(v::AbstractNormalToricVariety)` |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "28a3cd8f", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "4-element Vector{GrpAbFinGen}:\n", - " GrpAb: Z^2\n", - " GrpAb: Z\n", - " GrpAb: Z\n", - " GrpAb: Z^3" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "[\n", - " character_lattice(P2),\n", - " class_group(P2),\n", - " picard_group(P2),\n", - " torusinvariant_weil_divisor_group(P2)\n", - "]" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "id": "698e791c", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Map with following data\n", - "Domain:\n", - "=======\n", - "Abelian group with structure: Z^2\n", - "Codomain:\n", - "=========\n", - "Abelian group with structure: Z^3" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "map_from_character_lattice_to_torusinvariant_weil_divisor_group(P2)" - ] - }, - { - "cell_type": "markdown", - "id": "a5fb869b", - "metadata": {}, - "source": [ - "#### Cones and Fans\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `fan(v::AbstractNormalToricVariety)` | Fan of an abstract normal toric variety `v`. |\n", - "| `cone(v::AffineNormalToricVariety)` | Cone of the affine normal toric variety `v`. |\n", - "| `dual_cone(v::AffineNormalToricVariety)` | Dual cone of the affine normal toric variety `v`. |\n", - "| `hilbert_basis(v::AffineNormalToricVariety)` | Hilbert basis of the cone dual to the cone of `v`. |\n", - "| `mori_cone(v::NormalToricVariety)` | Mori cone of the normal toric variety `v`. |\n", - "| `nef_cone(v::NormalToricVariety)` | Nef cone of the normal toric variety `v`. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "60c6a3fc", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2-element Vector{SubObjectIterator{RayVector{QQFieldElem}}}:\n", - " [[1, 0], [0, 1], [-1, -1]]\n", - " [[1, 0], [0, 1]]" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "[\n", - " rays(fan(P2)),\n", - " rays(cone(affine_open_covering(P2)[1]))\n", - "]" - ] - }, - { - "cell_type": "markdown", - "id": "4903f8af", - "metadata": {}, - "source": [ - "#### Dimensions\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `dim(v::AbstractNormalToricVariety)` | Dimension of the normal toric variety `v`. |\n", - "| `dim_of_torusfactor(v::AbstractNormalToricVariety)` | Dimension of the torus factor of the normal toric variety `v`. |\n", - "| `euler_characteristic(v::AbstractNormalToricVariety)` | Euler characteristic of the normal toric variety `v`. |\n", - "| `betti_number(v::AbstractNormalToricVariety, i::Int)` | `i`-th Betti number of a complete and simplicial toric variety `v`. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "id": "44cdc411", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(2, 0, 3, 1, 0)" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "(dim(P2), dim_of_torusfactor(P2), euler_characteristic(P2), betti_number(P2, 0), betti_number(P2, 1))" - ] - }, - { - "cell_type": "markdown", - "id": "9b97b607", - "metadata": {}, - "source": [ - "#### Rings and ideals\n", - "\n", - "OSCAR supports several rings and ideals for toric varieties. For each of these coordinate names and the coefficient ring must be chosen. The coefficient ring is fixed to $\\mathbb{Q}$. The coordinate names are $x_1,...,x_n$ by default and can be changed using the following setter functions:\n", - "\n", - "| Method |\n", - "| :----------- |\n", - "| `set_coordinate_names(v::AbstractNormalToricVariety, coordinate_names::Vector{String})` |\n", - "| `set_coordinate_names_of_torus(v::AbstractNormalToricVariety, coordinate_names::Vector{String})` |\n", - "| `coordinate_names(v::AbstractNormalToricVariety)` |\n", - "| `coordinate_names_of_torus(v::AbstractNormalToricVariety)` |\n", - "\n", - "nce one of the following methods of calculating rings or ideals has been used, the choice of coordinate names is fixed:\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `cox_ring(v::AbstractNormalToricVariety)` | Cox ring (or total coordinate ring) of the normal toric variety `v`. |\n", - "| `irrelevant_ideal(v::AbstractNormalToricVariety)` | Irrelevant ideal of a normal toric variety `v`. |\n", - "| `ideal_of_linear_relations(v::AbstractNormalToricVariety)` | Ideal of linear relations of the simplicial and complete toric variety `v`. |\n", - "| `stanley_reisner_ideal(v::AbstractNormalToricVariety)` | Stanley-Reisner ideal of a normal toric variety `v`. |\n", - "| `toric_ideal(antv::AffineNormalToricVariety)` | Toric ideal defining the affine normal toric variety `v`. |\n", - "| `coordinate_ring_of_torus(v::AbstractNormalToricVariety)` | Coordinate ring of the torus of the normal toric variety `v`. |\n", - "\n", - "To check if any of the above objects have been cached, use the following method:\n", - "\n", - "| Method |\n", - "| :----------- |\n", - "| `is_finalized(v::AbstractNormalToricVariety)` |\n", - "\n", - "The above rings and ideals can also be computed with a different choice of coordinate name and coefficient ring. To do this, a user-defined ring `R::MPolyRing` must be passed as the first argument in the above methods, e.g. `toric_ideal(R::MPolyRing, antv::AffineNormalToricVariety)`. The already cached rings and ideals will not be changed.\n", - "\n", - "In the same way, characters can be turned into rational functions:\n", - "\n", - "| Method |\n", - "| :----------- |\n", - "| `character_to_rational_function(v::AbstractNormalToricVariety, character::Vector{fmpz})` |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "id": "3b9b1713", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Quotient of Multivariate Polynomial Ring in x1, x2, x1_, x2_ over Rational Field by ideal(x1*x1_ - 1, x2*x2_ - 1)" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Coordinate ring of the torus of the projective plane with the standard coordinate names\n", - "P2 = projective_space(NormalToricVariety, 2)\n", - "coordinate_ring_of_torus(P2)" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "id": "a613e742", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Quotient of Multivariate Polynomial Ring in y1, y2, y1_, y2_ over Rational Field by ideal(y1*y1_ - 1, y2*y2_ - 1)" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Coordinate ring of the torus of the projective plane with modified coordinate names\n", - "P2 = projective_space(NormalToricVariety, 2)\n", - "set_coordinate_names_of_torus(P2, [\"y1\", \"y2\"])\n", - "coordinate_ring_of_torus(P2)" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "id": "8ebfc64e", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "x2^2*x1_" - ] - }, - "execution_count": 16, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# rational function of a character with the standard coordinate names\n", - "P2 = projective_space(NormalToricVariety, 2)\n", - "character_to_rational_function(P2, [-1,2])" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "id": "798fe020", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "x2^2*x3" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# rational function of a character with modified coefficient ring\n", - "P2 = projective_space(NormalToricVariety, 2)\n", - "R,_ = PolynomialRing(QQ, 4)\n", - "character_to_rational_function(R, P2, [-1,2])" - ] - }, - { - "cell_type": "markdown", - "id": "efcb2f74", - "metadata": {}, - "source": [ - "#### Auxiliary Methods\n", - "\n", - "- The rows of a matrix `binoms` can be converted into binomials. To do this, each row $r$ is written as $r=u-v$ with $u,v \\geq 0$ by splitting the positive and negative entries. The line $r$ then corresponds to $x^u - x^v$. Return is the resulting ideal.\n", - "\n", - "| Method |\n", - "| :----------- |\n", - "| `binomial_exponents_to_ideal(binoms::Union{AbstractMatrix, fmpz_mat})` |\n", - "\n", - "- The following method yields the toric ideal generated from the linear relations between the points `pts`. It is given by the set $\\{x^u - x^v \\; \\vert \\; u,v \\in \\mathbb{Z}_{\\geq 0}^{n}(pts)^T \\cdot (u-v) = 0\\}$ of binomials.\n", - "\n", - "| Methode |\n", - "| :----------- |\n", - "| `toric_ideal(pts::fmpz_mat)` | \n", - "\n", - "\n", - "##### Example\n", - "\n", - "The matrix\n", - "$$\n", - "A = \n", - "\\begin{pmatrix}\n", - "-1 & -1 & 0 & 2 \\\\\n", - "2 & 3 & -2 & -1 \\\\\n", - "\\end{pmatrix}\n", - "$$\n", - "yields\n", - "$$\n", - "\\begin{aligned}\n", - "r_1 &= (0,0,0,2) - (1,1,0,0) \\quad \\leftrightarrow \\quad x_4^2 - x_1x_2 \\\\\n", - "r_2 &= (2,3,0,0) - (0,0,2,1) \\quad \\leftrightarrow \\quad x_1^2x_2^3 - x_3^2x_4.\n", - "\\end{aligned}\n", - "$$" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "id": "ca20b4c7", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "ideal(-x1*x2 + x4^2, x1^2*x2^3 - x3^2*x4)" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "A = [-1 -1 0 2; 2 3 -2 -1]\n", - "binomial_exponents_to_ideal(A)" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "id": "04b0a580", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "ideal(x2*x3 - x4^2, -x1*x3 + x2^2*x4, -x1*x4 + x2^3, -x1*x3^2 + x2*x4^3, -x1*x3^3 + x4^5)" - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "C = positive_hull([-2 5; 1 0]);\n", - "H = hilbert_basis(C)\n", - "toric_ideal(H)" - ] - }, - { - "cell_type": "markdown", - "id": "33276170", - "metadata": {}, - "source": [ - "## Cyclic Quotient Singularities\n", - "\n", - "Cyclic quotient singularities are quotients of $\\mathbb{C}^2$ by the action of $\\mathbb{Z}/n\\mathbb{Z}$ acting via \n", - "\\begin{equation*}\n", - " \\begin{pmatrix} \\xi & 0 \\\\ 0 & \\xi^q \\end{pmatrix},\n", - "\\end{equation*}\n", - "where $\\xi$ is an $n$-th root of unity and $q,n$ are coprime integers,such that $0 < q < n$.\n", - "\n", - "Note that OSCAR uses the *Hirzebruch-Jung continued fraction* for cyclic quotient singularities instead of the continued fraction known from the literature and used in the rest of OSCAR.\n", - "\n", - "### Constructors\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `CyclicQuotientSingularity(n::fmpz, q::fmpz)` | Cyclic quotient singularity for the parameters `n` and `q`, with $0
`basis_of_global_sections(l::ToricLineBundle)` | Returns a basis of the global sections of the toric line bundle `l` in terms of a homogeneous component of the Cox ring of `toric_variety(l)`. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "id": "774dcd9c", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2-element Vector{Vector}:\n", - " MPolyQuoRingElem{QQMPolyRingElem}[x1_^2, x2*x1_^2, x2^2*x1_^2, x1_, x2*x1_, 1]\n", - " MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}[x3^2, x2*x3, x2^2, x1*x3, x1*x2, x1^2]" - ] - }, - "execution_count": 37, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "l = ToricLineBundle(P2, [fmpz(2)])\n", - "[\n", - " basis_of_global_sections_via_rational_functions(l),\n", - " basis_of_global_sections_via_homogeneous_component(l)\n", - "]" - ] - }, - { - "cell_type": "markdown", - "id": "50a06b48", - "metadata": {}, - "source": [ - "## Line bundle cohomology with cohomCalg\n", - "\n", - "OSCAR uses the cohomCalg algorithm to compute the dimension of line bundle cohomologies and vanishing sets.\n", - "\n", - "### Dimensions of line bundle cohomology\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `all_cohomologies(l::ToricLineBundle)` | Computes the dimension of all sheaf cohomologies of the toric line bundle `l`. |\n", - "| `cohomology(l::ToricLineBundle, i::Int)` | Computes the dimension of the `i`-th sheaf cohomology of the toric line bundle `l`. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 38, - "id": "62b6277f", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "3-element Vector{ZZRingElem}:\n", - " 6\n", - " 0\n", - " 0" - ] - }, - "execution_count": 38, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "l = ToricLineBundle(P2, [fmpz(2)])\n", - "all_cohomologies(l)" - ] - }, - { - "cell_type": "markdown", - "id": "f07b7e1d", - "metadata": {}, - "source": [ - "### Toric vanishing sets\n", - "\n", - "Vanishing sets describe subsets of the Picard group of toric varieties and can be described as the complement of a finite family of polyhedra. The calculation in OSCAR can only be done for smooth and complete or simplicial and projective toric varieties and is done via:\n", - "\n", - "| Method |\n", - "| :----------- |\n", - "| `vanishing_sets(variety::AbstractNormalToricVariety)` |\n", - "\n", - "The result is a vector of vanishing sets. The length of this vector is one greater than the dimension of the normal toric variety `v`. \n", - "The first vanishing set in this vector describes all line bundles for which the $0$-th sheaf cohomology vanishes. More generally, the $n-1$-th sheaf cohomology vanishes if a line bundle is contained in the $n$-th vanishing set. This can be checked as follows:\n", - "\n", - "| Method |\n", - "| :----------- |\n", - "| `contains(tvs::ToricVanishingSet,l::ToricLineBundle)` |\n", - "\n", - "A vanishing set can in principle cover the entire Picard group. This can be checked with `isfull`. \n", - "This methods returns true if the vanishing set is the entire Picard group and false otherwise.\n", - "\n", - "| Method |\n", - "| :----------- |\n", - "| `isfull(tvs::ToricVanishingSet)` |\n", - "\n", - "Beyond this, OSCAR supports the following attributes for vanishing sets:\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `toric_variety(tvs::ToricVanishingSet)` | Toric variety of the vanishing set `tvs`. |\n", - "| `polyhedra(tvs::ToricVanishingSet)` | Vector of the polyhedra whose complement defines the vanishing set `tvs`. |\n", - "| `cohomology_index(tvs::ToricVanishingSet)` | Cohomology index of the toric vanishing set `tvs`. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "id": "47eeca6b", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "3-element Vector{Any}:\n", - " Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor\n", - " Polyhedron{QQFieldElem}[Polyhedron in ambient dimension 1]\n", - " 0" - ] - }, - "execution_count": 39, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "vs = vanishing_sets(P2)\n", - "[\n", - " toric_variety(vs[1]),\n", - " polyhedra(vs[1]),\n", - " cohomology_index(vs[1])\n", - "]" - ] - }, - { - "cell_type": "code", - "execution_count": 40, - "id": "3cabda0f", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(false, true, true)" - ] - }, - "execution_count": 40, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "vs = vanishing_sets(P2)\n", - "l = ToricLineBundle(P2, [fmpz(2)])\n", - "(contains(vs[1], l), contains(vs[2], l), contains(vs[3], l))" - ] - }, - { - "cell_type": "markdown", - "id": "b9390325", - "metadata": {}, - "source": [ - "## Cohomology Classes\n", - "\n", - "### Constructors\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `cohomology_class(v::AbstractNormalToricVariety, p::MPolyQuoRingElem)` | Toric cohomology class on the toric variety `v` corresponding to the polynomial `p`. |\n", - "| `cohomology_class(d::ToricDivisor)` | Toric cohomology class corresponding to the toric divisor `d`. |\n", - "| `cohomology_class(c::ToricDivisorClass)` | Toric cohomology class corresponding to the toric divisor class `c`. |\n", - "| `cohomology_class(l::ToricLineBundle)` | Toric cohomology class corresponding to the toric line bundle `l`. |\n", - "\n", - "Furthermore, cohomology classes can be added or subtracted with the operators `+` and `-`. \n", - "Multiplication with a scalar from the left is done with `*`, whereby only integers or the types `ZZRingElem`, `QQFieldElem` are allowed as scalars. \n", - "\n", - "The wedge product of cohomology classes can be formed with `*`. \n", - "The n-fold wedge product is formed with `^n`, where `n` must be an integer or of type `ZZRingElem`.\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 41, - "id": "c16f86ee", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "3-element Vector{CohomologyClass}:\n", - " Cohomology class on a normal toric variety given by 6*x3\n", - " Cohomology class on a normal toric variety given by 2*x3\n", - " Cohomology class on a normal toric variety given by 2*x3" - ] - }, - "execution_count": 41, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "d = toric_divisor(P2, [1,2,3])\n", - "tdc = toric_divisor_class(P2, [2])\n", - "l = toric_line_bundle(P2, [2])\n", - "[\n", - " cohomology_class(d),\n", - " cohomology_class(tdc),\n", - " cohomology_class(l)\n", - "]" - ] - }, - { - "cell_type": "markdown", - "id": "e346e73d", - "metadata": {}, - "source": [ - "### Properties\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `is_trivial(c::CohomologyClass)` | Checks if the cohomology class `c` is trivial. |\n", - "\n", - "Equality of cohomology classes can be tested via `==`.\n", - "\n", - "### Attributes\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `toric_variety(c::CohomologyClass)` | Normal toric variety of the cohomology class `c`. |\n", - "| `coefficients(c::CohomologyClass)` | Coefficients of the cohomology class `c`. |\n", - "| `exponents(c::CohomologyClass)` | Exponents of the cohomology class `c`. |\n", - "| `polynomial(c::CohomologyClass)` | Polynomial in the cohomology ring of the normal toric variety `toric_variety(c)` which corresponds to `c`. |\n", - "| `polynomial(c::CohomologyClass, ring::MPolyQuo)` | Polynomial in `ring` corresponding to the cohomology class in `c`. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "id": "81dbaf3f", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "4-element Vector{Any}:\n", - " Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor\n", - " QQFieldElem[6]\n", - " [0 0 1]\n", - " 6*x3" - ] - }, - "execution_count": 42, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "d = toric_divisor(P2, [1,2,3])\n", - "cc = cohomology_class(d)\n", - "[\n", - " toric_variety(cc),\n", - " coefficients(cc),\n", - " exponents(cc),\n", - " polynomial(cc)\n", - "]" - ] - }, - { - "cell_type": "markdown", - "id": "15b2a0ee", - "metadata": {}, - "source": [ - "### Further Methods\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `integrate(c::CohomologyClass)` | Integrate the cohomolgy class `c` over the normal toric variety `toric_variety(c)`. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 43, - "id": "eaffd43c", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "1" - ] - }, - "execution_count": 43, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "(x1,x2,x3) = gens(cohomology_ring(P2))\n", - "c = cohomology_class(P2, x1+x2*x3)\n", - "integrate(c)" - ] - }, - { - "cell_type": "markdown", - "id": "9f898703", - "metadata": {}, - "source": [ - "### Special attributes of toric varieties\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `cohomology_ring(v::AbstractNormalToricVariety)` | Cohomology ring of the simplicial and complete toric variety `v`. |\n", - "| `volume_form(v::NormalToricVariety)` | Volume form of the normal toric toric variety `v`. |\n", - "| `intersection_form(v::NormalToricVariety)` | Computes the intersection numbers among the cohomology classes associated to the torusinvariant prime divisors of the normal toric toric variety `v`. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 44, - "id": "753ea8d8", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "3-element Vector{Any}:\n", - " 3\n", - " x3^2\n", - " 6" - ] - }, - "execution_count": 44, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "[\n", - " ngens(cohomology_ring(P2)),\n", - " polynomial(volume_form(P2)),\n", - " length(intersection_form(P2))\n", - "]" - ] - }, - { - "cell_type": "markdown", - "id": "7355cd5f", - "metadata": {}, - "source": [ - "## Subvarieties\n", - "\n", - "OSCAR provides functionalities for closed subvarieties of simplicial toric varieties. \n", - "For such a subvariety, a list of homogeneous polynomials or an ideal contained in the Cox ring of the associated simplicial toric variety defines the subvariety by forming the common vanishing set of the polynomials.\n", - "\n", - "### Constructors\n", - "\n", - "The following methods can be used to construct a closed subvariety of a simplicial normal toric variety:\n", - "\n", - "| Method |\n", - "| :----------- |\n", - "| `closed_subvariety_of_toric_variety(toric_variety::AbstractNormalToricVariety, defining_polynomials::Vector{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}})` |\n", - "| `closed_subvariety_of_toric_variety(toric_variety::AbstractNormalToricVariety, defining_ideal::MPolyIdeal)` |\n", - "\n", - "\n", - "### Properties\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `is_empty(c::ClosedSubvarietyOfToricVariety)` | Checks if a closed subvariet`c` of a toric variety is empty. |\n", - "\n", - "### Attributes\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `toric_variety(c::ClosedSubvarietyOfToricVariety)` | Returns the initially provided toric supervariety of `c`. |\n", - "| `defining_ideal(c::ClosedSubvarietyOfToricVariety)` | Returns the ideal in the Cox ring that defines `c`. |\n", - "| `radical(c::ClosedSubvarietyOfToricVariety)` | Returns the radical of the ideal `defining_ideal`. |\n", - "\n", - "Note that a closed subvariety can be contained in different non-isomorphic toric varieties.\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "id": "0c17ff22", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(false, true, true, true)" - ] - }, - "execution_count": 45, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "(x1, x2, x3) = gens(cox_ring(P2))\n", - "c = closed_subvariety_of_toric_variety(P2, [x1])\n", - "(is_empty(c), toric_variety(c) == P2, defining_ideal(c) == ideal([x1]), radical(c) == ideal([x1]))" - ] - }, - { - "cell_type": "markdown", - "id": "caf754f0", - "metadata": {}, - "source": [ - "## The Chow ring\n", - "\n", - "Algebraic cycles are formal linear sum of irreducible subvarieties over the integers.\n", - "Among the algebraic cycles one can define an equivalence, the so-called rational equivalence. \n", - "The set of equivalence classes of algebraic cycles together with the intersection product then furnishes the Chow ring of the variety in question.\n", - "\n", - "### Constructors\n", - "\n", - "The following methods construct the rational equivalence classes of the algebraic cycles:\n", - "\n", - "| Method |\n", - "| :----------- |\n", - "| `rational_equivalence_class(v::AbstractNormalToricVariety, p::MPolyQuoRingElem)` |\n", - "| `rational_equivalence_class(v::AbstractNormalToricVariety, coefficients::Vector{T}) where {T <: IntegerUnion}` | \n", - "| `rational_equivalence_class(c::ToricDivisorClass)` |\n", - "| `rational_equivalence_class(l::ToricLineBundle)` |\n", - "| `rational_equivalence_class(cc::CohomologyClass)` |\n", - "| `rational_equivalence_class(sv::ClosedSubvarietyOfToricVariety)` |\n", - "\n", - "where the cycles correspond to\n", - "- a linear combination of cones given by `p` resp. `coefficients`\n", - "- the toric divisor `d`\n", - "- the toric divisor class `c`\n", - "- the toric line bundle `l`\n", - "- the cohomology class `cc`\n", - "\n", - "Algebraic cycles can be added or subtracted with the operators `+` and `-`. \n", - "Multiplication with a scalar from the left is done with `*`, where the scalars are integers or of type `ZZRingElem`.\n", - "Since the Chow ring can also be defined as a formal linear sum of irreducible subvarieties over the rational numbers, left multiplication with scalars of type `QQFieldElem` is additionally supported.\n", - "\n", - "Furthermore, the intersection product of algebraic cycles is implemented via `*`.\n", - "The n-fold intersection product is formed with `^n`, where `n` must be an integer or of type `ZZRingElem`.\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 46, - "id": "577363a4", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Rational equivalence class on a normal toric variety represented by 6V(x3)" - ] - }, - "execution_count": 46, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "d = toric_divisor(P2, [1,2,3])\n", - "ac = rational_equivalence_class(d)" - ] - }, - { - "cell_type": "markdown", - "id": "7e671590", - "metadata": {}, - "source": [ - "### Attributes\n", - "\n", - "#### Defining attributes\n", - "\n", - "Note that on a simplicial and complete toric variety, the Chow ring is isomorphic to a certain quotient of the Cox ring.\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `toric_variety(ac::RationalEquivalenceClass)` | Normal toric variety of a rational equivalence class `ac` of algebraic cycles. |\n", - "| `polynomial(ac::RationalEquivalenceClass)`

`polynomial(ring::MPolyQuo,ac::RationalEquivalenceClass)`| The ring element corresponding to a given rational equivalence class `ac` of algebraic cycles. The argument `ring` allows to obtain this ring element in a different ring. This allows to change the coefficient ring if desired. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 47, - "id": "bc439f53", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2-element Vector{Any}:\n", - " Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor\n", - " 6*x3" - ] - }, - "execution_count": 47, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "d = toric_divisor(P2, [1,2,3])\n", - "ac = rational_equivalence_class(d)\n", - "[\n", - " toric_variety(ac),\n", - " polynomial(ac)\n", - "]" - ] - }, - { - "cell_type": "markdown", - "id": "839283b6", - "metadata": {}, - "source": [ - "#### Representatives\n", - "\n", - "To interpret rational equivalence classes of algebraic cycles geometrically, one replaces self-intersections by transverse complete intersections.\n", - "However, this requires a choice of representatives.\n", - "The following methods make such a choice and give the corresponding values:\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `representative(ac::RationalEquivalenceClass)` | Polynomial in the Cox ring mapping to `polynomial(ac)`. |\n", - "| `coefficients(ac::RationalEquivalenceClass)` | Coefficients of `polynomial(ac)`. |\n", - "| `components(ac::RationalEquivalenceClass)` | Turn each monomial of `representative(ac)` into a closed subvariety and return the list formed from these subvarieties. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 48, - "id": "c7c870b0", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "3-element Vector{Any}:\n", - " 36*x1*x3\n", - " QQFieldElem[36]\n", - " 1" - ] - }, - "execution_count": 48, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "d = toric_divisor(P2, [1,2,3])\n", - "ac = rational_equivalence_class(d)\n", - "[\n", - " representative(ac*ac),\n", - " coefficients(ac*ac),\n", - " length(components(ac*ac))\n", - "]" - ] - }, - { - "cell_type": "markdown", - "id": "68dbe169", - "metadata": {}, - "source": [ - "#### Other attributes\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `cohomology_class(ac::RationalEquivalenceClass)` | Cohomology class of a rational equilvalence class of algebraic cycles. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 49, - "id": "3eafb894", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Cohomology class on a normal toric variety given by 6*x3" - ] - }, - "execution_count": 49, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "d = toric_divisor(P2, [1,2,3])\n", - "ac = rational_equivalence_class(d)\n", - "cohomology_class(ac)" - ] - }, - { - "cell_type": "markdown", - "id": "19f04e40", - "metadata": {}, - "source": [ - "### Properties\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `is_trivial(ac::RationalEquivalenceClass)` | Checks if a rational equivalence class `ac` of algebraic cycles is trivial. |\n", - "\n", - "Equality of rational equivalence classes can be tested with `==`.\n", - "\n", - "### Special attributes of toric varieties\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `chow_ring(v::AbstractNormalToricVariety)` | Chow ring of the simplicial toric variety `v`. |\n", - "| `gens_of_rational_equivalence_classes(v::AbstractNormalToricVariety)` | List of generators of the Chow ring of a complete, simplicial toric variety `v`. |\n", - "| `map_gens_of_chow_ring_to_cox_ring(v::AbstractNormalToricVariety)` | Dictionary which maps the generators of the chow ring to monomials in the Cox ring. This dictionary involves a choice, i.e. is not unique. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 51, - "id": "0e7134ea", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(3, 6, 2)" - ] - }, - "execution_count": 51, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P2 = projective_space(NormalToricVariety, 2)\n", - "(ngens(chow_ring(P2)), length(gens_of_rational_equivalence_classes(P2)), length(map_gens_of_chow_ring_to_cox_ring(P2)))" - ] - }, - { - "cell_type": "markdown", - "id": "244b1c22", - "metadata": {}, - "source": [ - "## Toric Morphisms\n", - "\n", - "### Constructors\n", - "\n", - "The following methods construct the toric morphism given by the associated lattice morphism and the domain of the toric morphism.\n", - "The codomain of the morphism can be specified as an optional argument.\n", - "The methods differ only in the type in which the lattice morphism is specified.\n", - "\n", - "| Method |\n", - "| :----------- |\n", - "| `toric_morphism(domain::AbstractNormalToricVariety, mapping_matrix::Vector{Vector{T}}, codomain::T2=nothing) where {T <: IntegerUnion, T2 <: Union{AbstractNormalToricVariety, Nothing}}` |\n", - "| `toric_morphism(domain::AbstractNormalToricVariety, mapping_matrix::Matrix{T}, codomain::T2=nothing) where {T <: IntegerUnion, T2 <: Union{AbstractNormalToricVariety, Nothing}}` |\n", - "| `toric_morphism(domain::AbstractNormalToricVariety, mapping_matrix::ZZMatrix, codomain::T=nothing) where {T <: Union{AbstractNormalToricVariety, Nothing}}` |\n", - "| `toric_morphism(domain::AbstractNormalToricVariety, grid_morphism::GrpAbFinGenMap, codomain::T=nothing) where {T <: Union{AbstractNormalToricVariety, Nothing}}` |\n", - "\n", - "The toric identity morphism from `variety` to `variety` can be definied by:\n", - "\n", - "| Methode |\n", - "| :----------- |\n", - "| `toric_identity_morphism(variety::AbstractNormalToricVariety)` |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 52, - "id": "0df186c4", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "A toric morphism" - ] - }, - "execution_count": 52, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Definition of the same toric morphism by means of the four functions above\n", - "domain = projective_space(NormalToricVariety, 1)\n", - "codomain = hirzebruch_surface(2)\n", - "\n", - "mapping_matrix = [[0, 1]]\n", - "toric_morphism(domain, mapping_matrix)\n", - "\n", - "mapping_matrix = [0 1]\n", - "toric_morphism(domain, mapping_matrix)\n", - "\n", - "mapping_matrix = matrix(ZZ, [0 1])\n", - "toric_morphism(domain, mapping_matrix, codomain)\n", - "\n", - "mapping_matrix = matrix(ZZ, [[0, 1]])\n", - "grid_morphism = hom(character_lattice(domain), character_lattice(codomain), mapping_matrix)\n", - "toric_morphism(domain, grid_morphism, codomain)" - ] - }, - { - "cell_type": "markdown", - "id": "2e06802a", - "metadata": {}, - "source": [ - "### Attributes of Toric Morhpisms\n", - "\n", - "#### General attributes\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `domain(tm::ToricMorphism)` | Domain of the toric morphism `tm`. |\n", - "| `image(tm::ToricMorphism)` | Image of the toric morphism `tm`. |\n", - "| `codomain(tm::ToricMorphism)` | Codomain of the toric morphism `tm`. |\n", - "| `grid_morphism(tm::ToricMorphism)` | Underlying grid morphism of the toric morphism `tm`. |\n", - "| `morphism_on_torusinvariant_weil_divisor_group(tm::ToricMorphism)` | Map of the torusinvariant Weil divisors corresponding to the toric morphism `tm`. |\n", - "| `morphism_on_torusinvariant_cartier_divisor_group(tm::ToricMorphism)` | Map of the torusinvariant Cartier divisors corresponding to the toric morphism `tm`. |\n", - "| `morphism_on_class_group(tm::ToricMorphism)` | Map of the Class groups corresponding to the toric morphism `tm`. |\n", - "| `morphism_on_picard_group(tm::ToricMorphism)` | Map of the Picard groups corresponding to the toric morphism `tm`. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 53, - "id": "37107484", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Normal, non-affine, smooth, projective, gorenstein, fano, 1-dimensional toric variety without torusfactor" - ] - }, - "execution_count": 53, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "tm = toric_identity_morphism(projective_space(NormalToricVariety, 1))\n", - "image(tm)" - ] - }, - { - "cell_type": "code", - "execution_count": 54, - "id": "eb3cde53", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Map with following data\n", - "Domain:\n", - "=======\n", - "Abelian group with structure: Z^2\n", - "Codomain:\n", - "=========\n", - "Abelian group with structure: Z^2" - ] - }, - "execution_count": 54, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "tm = toric_identity_morphism(projective_space(NormalToricVariety, 1))\n", - "morphism_on_torusinvariant_weil_divisor_group(tm)" - ] - }, - { - "cell_type": "code", - "execution_count": 55, - "id": "d790df02", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Map with following data\n", - "Domain:\n", - "=======\n", - "Abelian group with structure: Z^2\n", - "Codomain:\n", - "=========\n", - "Abelian group with structure: Z^2" - ] - }, - "execution_count": 55, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P1 = projective_space(NormalToricVariety, 1)\n", - "morphism_on_cartier_divisor_group(ToricIdentityMorphism(P1))" - ] - }, - { - "cell_type": "markdown", - "id": "43a70f1b", - "metadata": {}, - "source": [ - "#### Special attributes of toric varieties\n", - "\n", - "Each toric variety $v$ can be associated with a special toric variety, the so-called Cox variety.\n", - "It is defined in such a way that the mapping matrix of the toric morphism from the Cox variety to the variety $v$ is given by the ray generators of the variety $v$. \n", - "Thus, if there are exactly $N$ ray generators of the fan of $v$, then the Cox variety of $v$ has a fan for which the ray generators are the standard basis of $\\mathbb{R}^n$ and the maximal cones are in a 1-1 relation to the maximal cones of the fan of $v$.\n", - "\n", - "| Method | Description |\n", - "| :----------- | :----------- |\n", - "| `morphism_from_cox_variety(variety::AbstractNormalToricVariety)` | Quotient morphism from the Cox variety to the toric variety `variety`. |\n", - "| `cox_variety(variety::AbstractNormalToricVariety)` | Cox variety of the toric variety `variety`. |\n", - "\n", - "##### Example" - ] - }, - { - "cell_type": "code", - "execution_count": 56, - "id": "3d305ac5", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "A toric morphism" - ] - }, - "execution_count": 56, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "P1 = projective_space(NormalToricVariety, 1)\n", - "morphism_from_cox_variety(P1)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Julia 1.9.0", - "language": "julia", - "name": "julia-1.9" - }, - "language_info": { - "file_extension": ".jl", - "mimetype": "application/julia", - "name": "julia", - "version": "1.9.0" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -}