{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "3-d CPR-Fano toric variety covered by 12 affine patches" ] }, "execution_count": 1, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# The fastest way to get the ambient space in some \"normalized\" representation.\n", "Delta = ReflexivePolytope(3, 1529)\n", "P = CPRFanoToricVariety(Delta)\n", "P" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "[\n", "Nef-partition {0, 1, 2, 3, 4, 7} U {5, 6, 8, 9, 10, 11},\n", "Nef-partition {0, 1, 2, 3, 4, 5, 6, 8, 9} U {7, 10, 11} (projection)\n", "]" ] }, "execution_count": 2, "metadata": { }, "output_type": "execute_result" } ], "source": [ "Delta.nef_partitions()" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "3-d reflexive polytope in 3-d lattice N" ] }, "execution_count": 3, "metadata": { }, "output_type": "execute_result" } ], "source": [ "Delta.polar()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "[\n", "Nef-partition {0, 1, 4, 7, 11, 12, 13} U {2, 3, 5, 6, 8, 9, 10}\n", "]" ] }, "execution_count": 4, "metadata": { }, "output_type": "execute_result" } ], "source": [ "Delta.polar().nef_partitions()" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [ { "data": { "text/html": "\n\n" }, "execution_count": 5, "metadata": { }, "output_type": "execute_result" } ], "source": [ "Delta.plot3d()" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "#Delta.faces()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "N(-1, -1, -1),\n", "N(-1, 0, 0),\n", "N( 1, 0, 1),\n", "N( 1, 0, 0),\n", "N( 0, -1, 0),\n", "N( 1, 1, 1),\n", "N( 0, 0, -1),\n", "N( 0, -1, 1),\n", "N( 0, 1, -1),\n", "N( 0, 1, 0),\n", "N( 1, 1, 0),\n", "N( 0, 0, 1),\n", "N(-1, 0, -1),\n", "N(-1, -1, 0)\n", "in 3-d lattice N" ] }, "execution_count": 7, "metadata": { }, "output_type": "execute_result" } ], "source": [ "P.fan().rays()" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": "\n\n" }, "execution_count": 8, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# Successive blowups are more convenient to see \"P3 coordinates\" inside\n", "P3 = toric_varieties.P(3)\n", "Sigma = P3.fan().subdivide(sum(sigma.rays()) for sigma in P3.fan()) # Blow up points\n", "Sigma = Sigma.subdivide(sum(sigma.rays()) for sigma in P3.fan(2)) # Blow up lines\n", "P = CPRFanoToricVariety(\n", " Delta_polar=LatticePolytope(Sigma.rays()),\n", " charts=[sigma.ambient_ray_indices() for sigma in Sigma])\n", "P.plot(mode=\"generators\", wall_label=None)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "1529" ] }, "execution_count": 9, "metadata": { }, "output_type": "execute_result" } ], "source": [ "P.Delta().index()" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "" ] }, "execution_count": 10, "metadata": { }, "output_type": "execute_result" } ], "source": [ "X = P.anticanonical_hypersurface()\n", "show(X)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Defining m0, m1, m2, m3, p\n" ] }, { "data": { "text/html": [ "" ] }, "execution_count": 11, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# \"Standalone\" homogeneous polynomial of the family.\n", "# fraction_field is needed to use these parameters in toric setup later\n", "Rm = PolynomialRing(QQ, \"m0, m1, m2, m3, p\").fraction_field()\n", "Rm.inject_variables()\n", "m = Rm.gens()[:-1]\n", "Rx = PolynomialRing(Rm, 4, \"x\")\n", "x = Rx.gens()\n", "I = range(4)\n", "A3 = (sum(m[i]^2 * x[i] for i in I) * sum(1 / x[i] for i in I) - p^2) * prod(x)\n", "show(A3)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "" ] }, "execution_count": 12, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# Antocanonical hypersurface of the blowup with only \"original\" P3 coordinates visible.\n", "show(X.defining_polynomials()[0].subs(dict(zip(X.coordinate_ring().gens()[4:], [1]*10))))" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "" ] }, "execution_count": 13, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# The matching is \"mi^2 coefficients for monomials with zi^2\"\n", "a = [1]*13\n", "a[3] = a[7] = a[8] = m0^2\n", "a[5] = a[6] = a[9] = m1^2\n", "a[4] = a[10] = a[11] = m2^2\n", "a[0] = a[1] = a[2] = m3^2\n", "a[12] = m0^2 + m1^2 + m2^2 + m3^2 - p^2\n", "# This is the family of interest realized in a toric variety.\n", "X = P.anticanonical_hypersurface(coefficients=a)\n", "# X lives in a slightly different space - its coordinate ring includes variables for coefficients\n", "P = X.ambient_space()\n", "show(X.defining_polynomials()[0].subs(dict(zip(X.coordinate_ring().gens()[4:], [1]*10))))" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "" ] }, "execution_count": 14, "metadata": { }, "output_type": "execute_result" }, { "data": { "text/html": [ "" ] }, "execution_count": 14, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# Helper function for constructing subfamilies\n", "def m_to_a(*m):\n", " a = [1]*13\n", " a[3] = a[7] = a[8] = m[0]^2\n", " a[5] = a[6] = a[9] = m[1]^2\n", " a[4] = a[10] = a[11] = m[2]^2\n", " a[0] = a[1] = a[2] = m[3]^2\n", " a[12] = m[0]^2 + m[1]^2 + m[2]^2 + m[3]^2 - p^2\n", " return a\n", "\n", "show(m_to_a(m0,m1,m2,m3))\n", "show(m_to_a(m0,m0,m2,m2))" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "# Fibration code predates toric varieties in Sage, so needs different steps to set up.\n", "from fibration import *\n", "from elliptic_fibration import *" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "2" ] }, "execution_count": 16, "metadata": { }, "output_type": "execute_result" } ], "source": [ "Delta_polar = P.Delta_polar()\n", "slices = reflexive_slices(Delta_polar, symmetries=True)\n", "len(slices)" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "((0, 1, -1), (0, 0, 1), (1, 0, -1), (0, 1, 0), (1, -1, 0), (1, 0, 0))\n", "((1, -1, -1), (1, 1, -1), (1, -1, 1))\n" ] } ], "source": [ "# These are normals for symmetric fibrations, 6 hexagons and 3 quadrangles\n", "for s in slices:\n", " print s.symmetries" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "# The first (i.e. 0-th) slice is the hexagon that seemed to be of bigger interest.\n", "fib = EllipticFibration(Delta_polar, slices[0].normal, extra_parameters=[\"m0\", \"m1\", \"m2\", \"m3\", \"p\"])" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "" ] }, "execution_count": 19, "metadata": { }, "output_type": "execute_result" } ], "source": [ "show(fib.hypersurface())" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/markdown": [ "**Jupyter Kernel terminated:** This might be caused by running out of memory or hitting a bug in some library (e.g., forking too many processes, trying to access invalid memory, etc.). Consider restarting or upgrading your project or running the relevant code directly in a terminal to track down the cause, as [explained here](https://github.com/sagemathinc/cocalc/wiki/KernelTerminated)." ] }, "execution_count": 20, "metadata": { }, "output_type": "execute_result" } ], "source": [ "%%time\n", "j = fib.j()\n", "print(j.numerator().degree(), j.denominator().degree())\n", "print(fib._degree_shift)" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/markdown": [ "**Jupyter Kernel terminated:** This might be caused by running out of memory or hitting a bug in some library (e.g., forking too many processes, trying to access invalid memory, etc.). Consider restarting or upgrading your project or running the relevant code directly in a terminal to track down the cause, as [explained here](https://github.com/sagemathinc/cocalc/wiki/KernelTerminated)." ] }, "execution_count": 0, "metadata": { }, "output_type": "execute_result" } ], "source": [ "fib.singular_fibers_summary()" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/markdown": [ "**Jupyter Kernel terminated:** This might be caused by running out of memory or hitting a bug in some library (e.g., forking too many processes, trying to access invalid memory, etc.). Consider restarting or upgrading your project or running the relevant code directly in a terminal to track down the cause, as [explained here](https://github.com/sagemathinc/cocalc/wiki/KernelTerminated)." ] }, "execution_count": 0, "metadata": { }, "output_type": "execute_result" } ], "source": [ "fib.plot3d().show(frame=False)" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/markdown": [ "**Jupyter Kernel terminated:** This might be caused by running out of memory or hitting a bug in some library (e.g., forking too many processes, trying to access invalid memory, etc.). Consider restarting or upgrading your project or running the relevant code directly in a terminal to track down the cause, as [explained here](https://github.com/sagemathinc/cocalc/wiki/KernelTerminated)." ] }, "execution_count": 0, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# Intersection matrix of torically induced divisors on K3, in our case there is one divisor per point,\n", "# each edge corresponds to a simple intersection. Note that there are no edges 3-6 and 2-7.\n", "M=intersection_matrix(Delta_polar); M" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/markdown": [ "**Jupyter Kernel terminated:** This might be caused by running out of memory or hitting a bug in some library (e.g., forking too many processes, trying to access invalid memory, etc.). Consider restarting or upgrading your project or running the relevant code directly in a terminal to track down the cause, as [explained here](https://github.com/sagemathinc/cocalc/wiki/KernelTerminated)." ] }, "execution_count": 0, "metadata": { }, "output_type": "execute_result" } ], "source": [ "M.dimensions()" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/markdown": [ "**Jupyter Kernel terminated:** This might be caused by running out of memory or hitting a bug in some library (e.g., forking too many processes, trying to access invalid memory, etc.). Consider restarting or upgrading your project or running the relevant code directly in a terminal to track down the cause, as [explained here](https://github.com/sagemathinc/cocalc/wiki/KernelTerminated)." ] }, "execution_count": 0, "metadata": { }, "output_type": "execute_result" } ], "source": [ "curves = [X.intersection(P.subscheme(z)) for z in P.gens()]" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/markdown": [ "**Jupyter Kernel terminated:** This might be caused by running out of memory or hitting a bug in some library (e.g., forking too many processes, trying to access invalid memory, etc.). Consider restarting or upgrading your project or running the relevant code directly in a terminal to track down the cause, as [explained here](https://github.com/sagemathinc/cocalc/wiki/KernelTerminated)." ] }, "execution_count": 0, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# Simplify curve equations and check that they all are given as (polynomial, monomial)\n", "curves = [P.subscheme(c.defining_ideal().groebner_basis()) for c in curves]\n", "for c in curves:\n", " I = c.defining_ideal()\n", " print(I.gens())\n", " assert(I.ngens() == 2)\n", " assert(len(I.gen(1).monomials()) == 1)" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/markdown": [ "**Jupyter Kernel terminated:** This might be caused by running out of memory or hitting a bug in some library (e.g., forking too many processes, trying to access invalid memory, etc.). Consider restarting or upgrading your project or running the relevant code directly in a terminal to track down the cause, as [explained here](https://github.com/sagemathinc/cocalc/wiki/KernelTerminated)." ] }, "execution_count": 0, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# No intersection between 0 and 1\n", "pts = curves[0].intersection(curves[1])\n", "pts.dimension()" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/markdown": [ "**Jupyter Kernel terminated:** This might be caused by running out of memory or hitting a bug in some library (e.g., forking too many processes, trying to access invalid memory, etc.). Consider restarting or upgrading your project or running the relevant code directly in a terminal to track down the cause, as [explained here](https://github.com/sagemathinc/cocalc/wiki/KernelTerminated)." ] }, "execution_count": 0, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# Some intersection between 0 and 8\n", "pts = curves[0].intersection(curves[8])\n", "pts.dimension()\n" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/markdown": [ "**Jupyter Kernel terminated:** This might be caused by running out of memory or hitting a bug in some library (e.g., forking too many processes, trying to access invalid memory, etc.). Consider restarting or upgrading your project or running the relevant code directly in a terminal to track down the cause, as [explained here](https://github.com/sagemathinc/cocalc/wiki/KernelTerminated)." ] }, "execution_count": 0, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# Equations for the intersection in all charts where it is visible\n", "# (no claims that these points are the same or different)\n", "for i in range(P.fan().ngenerating_cones()):\n", " ap = pts.affine_patch(i)\n", " if ap.dimension() != -1:\n", " print(i, ap.defining_ideal().groebner_basis())" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/markdown": [ "**Jupyter Kernel terminated:** This might be caused by running out of memory or hitting a bug in some library (e.g., forking too many processes, trying to access invalid memory, etc.). Consider restarting or upgrading your project or running the relevant code directly in a terminal to track down the cause, as [explained here](https://github.com/sagemathinc/cocalc/wiki/KernelTerminated)." ] }, "execution_count": 0, "metadata": { }, "output_type": "execute_result" } ], "source": [ "cm = matrix(ZZ, len(curves))\n", "for i in range(len(curves)):\n", " for j in range(i + 1, len(curves)):\n", " if curves[i].intersection(curves[j]).dimension() == 0:\n", " cm[i, j] = cm [j, i] = 1\n", "cm" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/markdown": [ "**Jupyter Kernel terminated:** This might be caused by running out of memory or hitting a bug in some library (e.g., forking too many processes, trying to access invalid memory, etc.). Consider restarting or upgrading your project or running the relevant code directly in a terminal to track down the cause, as [explained here](https://github.com/sagemathinc/cocalc/wiki/KernelTerminated)." ] }, "execution_count": 0, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# Assuming that all intersections are 0 or 1 and all self-intersections are -2, we recover the correct intersection matrix\n", "M - cm" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "ename": "NameError", "evalue": "name 'curves' is not defined", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mc\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcurves\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mInteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mc\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mNameError\u001b[0m: name 'curves' is not defined" ] } ], "source": [ "c = curves[0]\n", "c" ] }, { "cell_type": "code", "execution_count": 35, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "Ideal (m0^2*z0^2*z1*z2*z5*z6*z7^2*z8^2*z9^2*z10*z11 + m1^2*z0*z1^2*z2*z4*z6*z7^2*z8^2*z9*z10^2*z12 + m0^2*z0^2*z1*z3*z5*z6^2*z7*z8^2*z9*z11^2*z12 + m1^2*z0*z1^2*z3*z4*z6^2*z7*z8^2*z10*z11*z12^2 + m2^2*z0*z1*z2^2*z4*z5*z7^2*z8*z9^2*z10^2*z13 + m0^2*z0^2*z2*z3*z5^2*z6*z7*z8*z9^2*z11^2*z13 + (m0^2 + m1^2 + m2^2 + m3^2 - p^2)*z0*z1*z2*z3*z4*z5*z6*z7*z8*z9*z10*z11*z12*z13 + m1^2*z1^2*z2*z3*z4^2*z6*z7*z8*z10^2*z12^2*z13 + m3^2*z0*z1*z3^2*z4*z5*z6^2*z8*z11^2*z12^2*z13 + m2^2*z0*z2^2*z3*z4*z5^2*z7*z9^2*z10*z11*z13^2 + m2^2*z1*z2^2*z3*z4^2*z5*z7*z9*z10^2*z12*z13^2 + m3^2*z0*z2*z3^2*z4*z5^2*z6*z9*z11^2*z12*z13^2 + m3^2*z1*z2*z3^2*z4^2*z5*z6*z10*z11*z12^2*z13^2, z8) of Multivariate Polynomial Ring in z0, z1, z2, z3, z4, z5, z6, z7, z8, z9, z10, z11, z12, z13 over Fraction Field of Multivariate Polynomial Ring in m0, m1, m2, m3, p over Rational Field" ] }, "execution_count": 35, "metadata": { }, "output_type": "execute_result" } ], "source": [ "I = c.defining_ideal()\n", "I" ] }, { "cell_type": "code", "execution_count": 44, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "m3^2*z1*z10*z11*z12^2*z13^2*z2*z3^2*z4^2*z5*z6/m2^2 + m3^2*z0*z11^2*z12*z13^2*z2*z3^2*z4*z5^2*z6*z9/m2^2 + z1*z10^2*z12*z13^2*z2^2*z3*z4^2*z5*z7*z9 + z0*z10*z11*z13^2*z2^2*z3*z4*z5^2*z7*z9^2" ] }, "execution_count": 44, "metadata": { }, "output_type": "execute_result" } ], "source": [ "sp = SR(I.groebner_basis()[0])\n", "sp" ] }, { "cell_type": "code", "execution_count": 46, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "Closed subscheme of 3-d CPR-Fano toric variety covered by 24 affine patches defined by:\n", " z0*z2^2*z3*z4*z5^2*z7*z9^2*z10*z11*z13^2 + z1*z2^2*z3*z4^2*z5*z7*z9*z10^2*z12*z13^2 + m3^2/m2^2*z0*z2*z3^2*z4*z5^2*z6*z9*z11^2*z12*z13^2 + m3^2/m2^2*z1*z2*z3^2*z4^2*z5*z6*z10*z11*z12^2*z13^2,\n", " z8" ] }, "execution_count": 46, "metadata": { }, "output_type": "execute_result" } ], "source": [ "P.subscheme(I.groebner_basis())" ] }, { "cell_type": "code", "execution_count": 45, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "[(m3^2*z11*z12*z3*z6 + m2^2*z10*z2*z7*z9, 1),\n", " (z1*z10*z12*z4 + z0*z11*z5*z9, 1),\n", " (m2, -2),\n", " (z13, 2),\n", " (z2, 1),\n", " (z3, 1),\n", " (z4, 1),\n", " (z5, 1)]" ] }, "execution_count": 45, "metadata": { }, "output_type": "execute_result" } ], "source": [ "sp.factor_list()" ] }, { "cell_type": "code", "execution_count": 22, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "im16 = diagonal_matrix(ZZ, [-2]*20)\n", "\n", "cones = P.fan().cones(dim=1)\n", "# The first 4 divisors are coordinate planes from P3\n", "# The next 4 are blown up fixed points\n", "# P1xP1 divisors correspond to the last 6 which are blown up torus invariant lines\n", "# (on the polytope plot they correspond to vertices with 4 edges)\n", "for i in range(6):\n", " # Two lines in P1xP1 intersect each other\n", " im16[8 + 2 * i, 9 + 2 * i] = im16[9 + 2 * i, 8 + 2 * i] = 1\n", " ars = list(cones[8 + i].adjacent())\n", " r1 = ars.pop()\n", " for r2 in ars:\n", " if r2 not in r1.adjacent():\n", " ars.remove(r2)\n", " break\n", " # Now r1 and r2 are \"opposite\"\n", " k = r1.ambient_ray_indices()[0]\n", " im16[k, 8 + 2 * i] = im16[8 + 2 * i, k] = 1\n", " k = r2.ambient_ray_indices()[0]\n", " im16[k, 8 + 2 * i] = im16[8 + 2 * i, k] = 1\n", " # And ars contains another \"opposite pair\"\n", " k = ars[0].ambient_ray_indices()[0]\n", " im16[k, 9 + 2 * i] = im16[9 + 2 * i, k] = 1\n", " k = ars[1].ambient_ray_indices()[0]\n", " im16[k, 9 + 2 * i] = im16[9 + 2 * i, k] = 1\n", "\n", "print(im16.str())" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "16" ] }, "execution_count": 23, "metadata": { }, "output_type": "execute_result" } ], "source": [ "im16.rank()" ] }, { "cell_type": "code", "execution_count": 24, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "[2 (toric), 3 (toric), 6 (toric), 7 (toric), 8 (toric), 13 (toric)]" ] }, "execution_count": 24, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# Sections form 2 chains, 2-13-3 and 6-8-7, so there are 2 cases: \"end\" and \"middle\"\n", "fib.sections()" ] }, { "cell_type": "code", "execution_count": 25, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "2 (toric)" ] }, "execution_count": 25, "metadata": { }, "output_type": "execute_result" } ], "source": [ "s = fib.sections()[0]\n", "s" ] }, { "cell_type": "code", "execution_count": 26, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " F S T_ T_ T_ B_ B_ B_ S_ S_ S_\n", " 0 5 11 1 4 12 7 8 13\n", " \n", "F [ 0 1 0 0 0 0 0 0 1 1 1] F\n", "S [ 1 -2 0 0 0 0 0 0 0 0 1] S\n", "T_0 [ 0 0 -2 0 1 0 0 0 0 1 0] T_0\n", "T_5 [ 0 0 0 -2 1 0 0 0 0 0 1] T_5\n", "T_11 [ 0 0 1 1 -2 0 0 0 0 0 0] T_11\n", "B_1 [ 0 0 0 0 0 -2 0 1 0 1 0] B_1\n", "B_4 [ 0 0 0 0 0 0 -2 1 0 0 1] B_4\n", "B_12 [ 0 0 0 0 0 1 1 -2 0 0 0] B_12\n", "S_7 [ 1 0 0 0 0 0 0 0 -2 1 0] S_7\n", "S_8 [ 1 0 1 0 0 1 0 0 1 -2 0] S_8\n", "S_13 [ 1 1 0 1 0 0 1 0 0 0 -2] S_13\n", " F S T_ T_ T_ B_ B_ B_ S_ S_ S_\n", " 0 5 11 1 4 12 7 8 13\n", " \n" ] } ], "source": [ "# F - fiber, S - section, T_n - top divisors, B_n - bottom divisors, S_n - slice divisors\n", "print s.decorated_intersection_matrix()" ] }, { "cell_type": "code", "execution_count": 27, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "[(0, 1), (5, 1), (9, 1), (11, 1)]" ] }, "execution_count": 27, "metadata": { }, "output_type": "execute_result" } ], "source": [ "proj = s._ef.slice().normal * s._ef.polytope().points()\n", "D_fiber = [(pt, proj[pt]) for pt in s._ef.polytope().skeleton_points() if proj[pt] > 0]\n", "D_fiber" ] }, { "cell_type": "code", "execution_count": 28, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "13 (toric)" ] }, "execution_count": 28, "metadata": { }, "output_type": "execute_result" } ], "source": [ "s = fib.sections()[-1]\n", "s" ] }, { "cell_type": "code", "execution_count": 29, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " F S T_ T_ T_ B_ B_ B_ S_ S_ S_\n", " 0 9 11 1 10 12 6 7 8 \n", " \n", "F [ 0 1 0 0 0 0 0 0 1 1 1] F\n", "S [ 1 -2 0 0 0 0 0 0 0 0 0] S\n", "T_0 [ 0 0 -2 1 1 0 0 0 0 0 1] T_0\n", "T_9 [ 0 0 1 -2 0 0 0 0 0 1 0] T_9\n", "T_11 [ 0 0 1 0 -2 0 0 0 1 0 0] T_11\n", "B_1 [ 0 0 0 0 0 -2 1 1 0 0 1] B_1\n", "B_10 [ 0 0 0 0 0 1 -2 0 0 1 0] B_10\n", "B_12 [ 0 0 0 0 0 1 0 -2 1 0 0] B_12\n", "S_6 [ 1 0 0 0 1 0 0 1 -2 0 1] S_6\n", "S_7 [ 1 0 0 1 0 0 1 0 0 -2 1] S_7\n", "S_8 [ 1 0 1 0 0 1 0 0 1 1 -2] S_8\n", " F S T_ T_ T_ B_ B_ B_ S_ S_ S_\n", " 0 9 11 1 10 12 6 7 8 \n", " \n" ] } ], "source": [ "# F - fiber, S - section, T_n - top divisors, B_n - bottom divisors, S_n - slice divisors\n", "print s.decorated_intersection_matrix()" ] }, { "cell_type": "code", "execution_count": 30, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "" ] }, "execution_count": 30, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# Since we have used the same Delta/Delta_polar and there are no points apart from vertices and the origin,\n", "# coordinates and coefficients are the same and we can use the same a-matching.\n", "fib.set_coefficients(dict(zip(fib.coefficients_ring().gens()[:13], a)))\n", "show(fib.hypersurface())" ] }, { "cell_type": "code", "execution_count": 31, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "#fib.hypersurface()" ] }, { "cell_type": "code", "execution_count": 32, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "" ] }, "execution_count": 32, "metadata": { }, "output_type": "execute_result" } ], "source": [ "show(fib.fiber())" ] }, { "cell_type": "code", "execution_count": 33, "metadata": { "collapsed": false }, "outputs": [ { "ename": "ValueError", "evalue": "degree shift -1/3 is not integer!", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mj\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mj\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;32m/ext/sage/sage-8.1/src/sage/misc/cachefunc.pyx\u001b[0m in \u001b[0;36msage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (build/cythonized/sage/misc/cachefunc.c:13511)\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2377\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcache\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2378\u001b[0m \u001b[0mf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2379\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcache\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_instance\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2380\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcache\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2381\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m/home/user/elliptic_fibration.pyc\u001b[0m in \u001b[0;36mj\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 877\u001b[0m \u001b[0my\u001b[0m\u001b[0;34m^\u001b[0m\u001b[0;36m2\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mx\u001b[0m\u001b[0;34m^\u001b[0m\u001b[0;36m3\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mg2\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mx\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mg3\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 878\u001b[0m \"\"\"\n\u001b[0;32m--> 879\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0;36m4\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mg2\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;36m3\u001b[0m \u001b[0;34m/\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdelta\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 880\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 881\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mplot3d\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m/home/user/elliptic_fibration.pyc\u001b[0m in \u001b[0;36mg2\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 832\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_g2\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 833\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mAttributeError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 834\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_compute_invariants\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 835\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_g2\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 836\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m/home/user/elliptic_fibration.pyc\u001b[0m in \u001b[0;36m_compute_invariants\u001b[0;34m(self, d)\u001b[0m\n\u001b[1;32m 771\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 772\u001b[0m \u001b[0mf0\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mSingularFiber\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_top\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdegenerate\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 773\u001b[0;31m \u001b[0md\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdegree_shift\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 774\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_f_0\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mf0\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 775\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m/home/user/elliptic_fibration.pyc\u001b[0m in \u001b[0;36mdegree_shift\u001b[0;34m(f0)\u001b[0m\n\u001b[1;32m 755\u001b[0m \u001b[0md\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mevo\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mdvo\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m/\u001b[0m \u001b[0;36m6\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 756\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0md\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mis_integral\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 757\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"degree shift %s is not integer!\"\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0md\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 758\u001b[0m if (g2vo + 2 * d < evo[0]\n\u001b[1;32m 759\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mg3vo\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;36m3\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0md\u001b[0m \u001b[0;34m<\u001b[0m \u001b[0mevo\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mValueError\u001b[0m: degree shift -1/3 is not integer!" ] } ], "source": [ "j = fib.j()" ] }, { "cell_type": "code", "execution_count": 34, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "(48, 42)" ] }, "execution_count": 34, "metadata": { }, "output_type": "execute_result" } ], "source": [ "# The normalization above (and raising an exception) is necessary for other applications of this code.\n", "# It fails here because the subfamily has more comlicated singular fibers over zero and infinity than the full family.\n", "# Nevertheless, the j invariant (and probably simpler g2 and g3) are accessible on subsequent calls without normalization.\n", "# Moreover, we can try to compute invariants with the same degree shift as in the generic case above.\n", "fib._compute_invariants(0)\n", "# It is possible that the current code never needs this shift at all, but it is not obvious.\n", "j = fib.j()\n", "j.numerator().degree(), j.denominator().degree()" ] }, { "cell_type": "code", "execution_count": 35, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "'8x I_1, I_2 at (-m1^2)/m0^2, I_2 at -1, I_6 at +Infinity, I_6 at 0'" ] }, "execution_count": 35, "metadata": { }, "output_type": "execute_result" } ], "source": [ "fib.singular_fibers_summary()" ] }, { "cell_type": "code", "execution_count": 36, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "A fibration of $\\Delta^{3}_{2355}$ corresponding to 2-dimensional reflexive slice of a 3-dimensional polytope.
\n", "Points: [2, 3, 6, 7, 8, 13, 14]
\n", "Skeleton points: [2, 3, 6, 7, 8, 13]
\n", "Normal to the slice hyperplane: (1, -1, 0)
\n", "Vertices of the slice polytope:
\n", "M(-1, -1),
\n", "M(-1, 0),
\n", "M( 0, -1),
\n", "M( 1, 1),
\n", "M( 0, 1),
\n", "M( 1, 0)
\n", "in 2-d lattice M
\n", "Coordinate points: $$\\left(\\begin{array}{rrrrrrrrrrrrrr}\n", "1 & 0 & 0 & -1 & -1 & 0 & 0 & 1 & 1 & 1 & 0 & 0 & -1 & -1 \\\\\n", "0 & 1 & 0 & -1 & 0 & -1 & 0 & 1 & 1 & 0 & 1 & -1 & 0 & -1 \\\\\n", "0 & 0 & 1 & -1 & 0 & 0 & -1 & 1 & 0 & 1 & 1 & -1 & -1 & 0\n", "\\end{array}\\right)$$
\n", "Monomial points: $$\\left(\\begin{array}{rrrrrrrrrrrrr}\n", "0 & -1 & 0 & 1 & 0 & 0 & 0 & 1 & 1 & -1 & -1 & 0 & 0 \\\\\n", "0 & 0 & -1 & 0 & 0 & 1 & 1 & -1 & 0 & 1 & 0 & -1 & 0 \\\\\n", "-1 & 0 & 0 & 0 & 1 & 0 & -1 & 0 & -1 & 0 & 1 & 1 & 0\n", "\\end{array}\\right)$$
\n", "Equation of a hypersurface: $$m_{0}^{2} z_{0}^{2} z_{1} z_{2} z_{5} z_{6} z_{7}^{2} z_{8}^{2} z_{9}^{2} z_{10} z_{11} + m_{1}^{2} z_{0} z_{1}^{2} z_{2} z_{4} z_{6} z_{7}^{2} z_{8}^{2} z_{9} z_{10}^{2} z_{12} + m_{0}^{2} z_{0}^{2} z_{1} z_{3} z_{5} z_{6}^{2} z_{7} z_{8}^{2} z_{9} z_{11}^{2} z_{12} + m_{1}^{2} z_{0} z_{1}^{2} z_{3} z_{4} z_{6}^{2} z_{7} z_{8}^{2} z_{10} z_{11} z_{12}^{2} + m_{2}^{2} z_{0} z_{1} z_{2}^{2} z_{4} z_{5} z_{7}^{2} z_{8} z_{9}^{2} z_{10}^{2} z_{13} + m_{0}^{2} z_{0}^{2} z_{2} z_{3} z_{5}^{2} z_{6} z_{7} z_{8} z_{9}^{2} z_{11}^{2} z_{13} + (m_{0}^{2} + m_{1}^{2} + m_{2}^{2} + m_{3}^{2} - p^{2}) z_{0} z_{1} z_{2} z_{3} z_{4} z_{5} z_{6} z_{7} z_{8} z_{9} z_{10} z_{11} z_{12} z_{13} + m_{1}^{2} z_{1}^{2} z_{2} z_{3} z_{4}^{2} z_{6} z_{7} z_{8} z_{10}^{2} z_{12}^{2} z_{13} + m_{3}^{2} z_{0} z_{1} z_{3}^{2} z_{4} z_{5} z_{6}^{2} z_{8} z_{11}^{2} z_{12}^{2} z_{13} + m_{2}^{2} z_{0} z_{2}^{2} z_{3} z_{4} z_{5}^{2} z_{7} z_{9}^{2} z_{10} z_{11} z_{13}^{2} + m_{2}^{2} z_{1} z_{2}^{2} z_{3} z_{4}^{2} z_{5} z_{7} z_{9} z_{10}^{2} z_{12} z_{13}^{2} + m_{3}^{2} z_{0} z_{2} z_{3}^{2} z_{4} z_{5}^{2} z_{6} z_{9} z_{11}^{2} z_{12} z_{13}^{2} + m_{3}^{2} z_{1} z_{2} z_{3}^{2} z_{4}^{2} z_{5} z_{6} z_{10} z_{11} z_{12}^{2} z_{13}^{2}$$
\n", "Projection to the base: $\\left(z_{0} z_{5} z_{9} z_{11}, z_{1} z_{4} z_{10} z_{12}\\right)$
\n", "Coordinate on the base: $z_{0}$
\n", "Fiber over $\\left(t^{ 1 }, 1\\right)$: $$(m_{0}^{2} t^{2} + m_{1}^{2} t) z_{3} z_{6}^{2} z_{7} z_{8}^{2} + (m_{0}^{2} t^{2} + m_{1}^{2} t) z_{2} z_{6} z_{7}^{2} z_{8}^{2} + (m_{3}^{2} t) z_{3}^{2} z_{6}^{2} z_{8} z_{13} + (m_{0}^{2} t^{2} + m_{0}^{2} t + m_{1}^{2} t + m_{2}^{2} t + m_{3}^{2} t - p^{2} t + m_{1}^{2}) z_{2} z_{3} z_{6} z_{7} z_{8} z_{13} + (m_{2}^{2} t) z_{2}^{2} z_{7}^{2} z_{8} z_{13} + (m_{3}^{2} t + m_{3}^{2}) z_{2} z_{3}^{2} z_{6} z_{13}^{2} + (m_{2}^{2} t + m_{2}^{2}) z_{2}^{2} z_{3} z_{7} z_{13}^{2}$$
\n", "Top: ExtA3, generic $F_0$: $I_{4}$
\n", "Bottom: ExtA3, generic $F_\\infty$: $I_{4}$" ] }, "execution_count": 36, "metadata": { }, "output_type": "execute_result" } ], "source": [ "fib.show()" ] }, { "cell_type": "code", "execution_count": 37, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "8x I_1, I_2 at (-m1^2)/m0^2, I_2 at -1, I_6 at +Infinity, I_6 at 0\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "8x I_1, I_4 at -1, I_6 at +Infinity, I_6 at 0\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "4x I_1, I_4 at -1, I_6 at +Infinity, I_6 at 0\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "4x I_1, I_4 at -1, I_6 at +Infinity, I_6 at 0\n", "CPU times: user 9.48 s, sys: 128 ms, total: 9.61 s\n", "Wall time: 10.6 s\n" ] } ], "source": [ "%%time\n", "\n", "# Singular fibers (some of them) for different subfamilies\n", "Ms = [\n", " (m0, m1, m2, m3),\n", " (m0, m0, m2, m3),\n", " (m0, m0, m2, m2),\n", " (m0, m0, m0, m0),\n", "]\n", "for M in Ms:\n", " fib.set_coefficients(dict(zip(fib.coefficients_ring().gens()[:13], m_to_a(*M))))\n", " fib._compute_invariants(0)\n", " print fib.singular_fibers_summary()" ] }, { "cell_type": "code", "execution_count": 41, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "-(m0^2*z3^2*z6^2 + 2*m0^2*z2*z3*z6*z7 - p^2*z2*z3*z6*z7 + m0^2*z2^2*z7^2)*z13*z8" ] }, "execution_count": 41, "metadata": { }, "output_type": "execute_result" } ], "source": [ "SR(fib.fiber()).subs(t=-1).factor()" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "## the euler characteristic looks wrong. Some multiplicities are coming out right and the index of the fiber at 0 should increase.\n", "# by explicitely looking at the j-invariant we could determine the missing fibers" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "# The other slice\n", "fib = EllipticFibration(Delta_polar, slices[1].normal, extra_parameters=[\"m0\", \"m1\", \"m2\", \"m3\", \"p\"])\n", "fib.hypersurface()" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "fib.show()" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "%%time\n", "j = fib.j()\n", "print(j.numerator().degree(), j.denominator().degree())\n", "print(fib._degree_shift)" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false, "scrolled": true }, "outputs": [ ], "source": [ "fib.singular_fibers_summary()" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "fib.set_coefficients(dict(zip(fib.coefficients_ring().gens()[:13], a)))\n", "fib.hypersurface()" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "fib._compute_invariants(0)" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "fib.singular_fibers_summary()" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "fib.sections()" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "%%time\n", "\n", "# Singular fibers (some of them) for different subfamilies\n", "Ms = [\n", " (m0, m1, m2, m3),\n", " (m0, m0, m2, m3),\n", " (m0, m0, m2, m2),\n", " (m0, m0, m0, m0),\n", "]\n", "for M in Ms:\n", " fib.set_coefficients(dict(zip(fib.coefficients_ring().gens()[:13], m_to_a(*M))))\n", " fib._compute_invariants(0)\n", " print fib.singular_fibers_summary()" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "LatticeDiagram?" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "Mnew=matrix(ZZ,[[-2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \n", "0, 0, 1, 0, 0, 1, 1, 0], [0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1], [0, 0, 0, -2, \n", "0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, \n", "1, 0, 1], [0, 0, 0, 0, 0, -2, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -2, 0, 1, \n", "0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0], [1, \n", "0, 0, 0, 0, 0, 1, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 1, 0, 0, 0, -2, 0, 0, 0, \n", "0, 0, 0, 0, 1, 0, 0], [1, 0, 0, 1, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 1, 0, \n", "0, 1, 0, 0, 0, 0, -2, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, -2, 0, 0, 0, 1, \n", "0, 0, 0], [0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, -2, 1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 1, 0, \n", "0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, -2, 0, 0, 0, 0], [0, \n", "0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, -2, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, \n", "0, 0, 0, -2, 0, 0], [0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -2, 0], [0, 0, 1, 0, 1, 0, \n", "0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2]])\n", " " ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "Mnew.is_symmetric()" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "Mnew.rank()" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "# the matrix Mnew is similar to the one constructed by Andrey. This can be seen by checking that they both have the same Jordan form." ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "Jnew,Pnew=Mnew.jordan_form(transformation=True);\n", "J16,P16=im16.jordan_form(transformation=True);" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "collapsed": false }, "outputs": [ ], "source": [ "show(Jnew-J16)" ] } ], "metadata": { "kernelspec": { "display_name": "SageMath (stable)", "name": "sagemath" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.14" } }, "nbformat": 4, "nbformat_minor": 0 }