{ "cells": [ { "cell_type": "markdown", "id": "63724666", "metadata": {}, "source": [ "# Utilities" ] }, { "cell_type": "code", "execution_count": 1, "id": "abe149f0", "metadata": {}, "outputs": [], "source": [ "# Requires extra package:\n", "#! sage -pip install \"pseudowalls==0.0.3\" --extra-index-url https://gitlab.com/api/v4/projects/43962374/packages/pypi/simple\n", "%display latex\n", "\n", "from pseudowalls import *\n", "\n", "Δ = lambda v: v.Q_tilt()\n", "mu = stability.Mumford().slope\n", "ts = stability.Tilt\n", "\n", "var(\"beta\", domain=\"real\")\n", "\n", "def beta_minus(v):\n", " beta = stability.Tilt().beta\n", " solutions = solve(\n", " stability.Tilt(alpha=0).degree(v)==0,\n", " beta)\n", " return min(map(lambda s: s.rhs(), solutions))\n", "\n", "class Object(object):\n", " pass" ] }, { "cell_type": "markdown", "id": "0b574b63", "metadata": {}, "source": [ "# Define Cherns in Examples" ] }, { "cell_type": "markdown", "id": "f1c3a606", "metadata": {}, "source": [ "Define two recurring examples used to illustrate performance of the different theorems to find semistabilizer bounds:" ] }, { "cell_type": "code", "execution_count": 2, "id": "30d3738a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "<html>\\(\\displaystyle \\text{Chern Character:} \\\\ \\begin{array}{l} \\mathrm{ch}_{0} = 3 \\\\ \\mathrm{ch}_{1} = 2 \\ell^{1} \\\\ \\mathrm{ch}_{2} = -2 \\ell^{2} \\end{array}\\)</html>" ], "text/latex": [ "$\\displaystyle \\text{Chern Character:} \\\\ \\begin{array}{l} \\mathrm{ch}_{0} = 3 \\\\ \\mathrm{ch}_{1} = 2 \\ell^{1} \\\\ \\mathrm{ch}_{2} = -2 \\ell^{2} \\end{array}$" ], "text/plain": [ "<pseudowalls.chern_character.Chern_Char object at 0x7f25db3a9990>" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "recurring = Object()\n", "recurring.chern = Chern_Char(3, 2, -2)\n", "recurring.chern" ] }, { "cell_type": "code", "execution_count": 3, "id": "fe394909", "metadata": { "scrolled": false }, "outputs": [ { "data": { "text/html": [ "<html>\\(\\displaystyle \\text{Chern Character:} \\\\ \\begin{array}{l} \\mathrm{ch}_{0} = 29 \\\\ \\mathrm{ch}_{1} = 13 \\ell^{1} \\\\ \\mathrm{ch}_{2} = -\\frac{3}{2} \\ell^{2} \\end{array}\\)</html>" ], "text/latex": [ "$\\displaystyle \\text{Chern Character:} \\\\ \\begin{array}{l} \\mathrm{ch}_{0} = 29 \\\\ \\mathrm{ch}_{1} = 13 \\ell^{1} \\\\ \\mathrm{ch}_{2} = -\\frac{3}{2} \\ell^{2} \\end{array}$" ], "text/plain": [ "<pseudowalls.chern_character.Chern_Char object at 0x7f25d1953e20>" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "extravagant = Object()\n", "extravagant.chern = Chern_Char(29, 13, -3/2)\n", "extravagant.chern" ] }, { "cell_type": "markdown", "id": "09692ba5", "metadata": {}, "source": [ "# Calculate Preliminary Quantities" ] }, { "cell_type": "code", "execution_count": 4, "id": "7576ebe4", "metadata": {}, "outputs": [], "source": [ "m = 1 # value of $\\ell^2$\n", "\n", "# add attributes for ...\n", "for example in [recurring, extravagant]:\n", " example.betaminus = beta_minus(example.chern)\n", " example.twisted = example.chern.twist(example.betaminus)\n", " example.n = example.betaminus.denominator()\n", " example.bgmlv = example.chern.Q_tilt()\n", "\n", "# Actual maximal rank of Pseudo-Semistabilizers\n", "# (needs to be calculated elsewhere)\n", "recurring.actual_rmax = 25\n", "extravagant.actual_rmax = 49313" ] }, { "cell_type": "markdown", "id": "500abba3", "metadata": {}, "source": [ "# First Loose Bound" ] }, { "cell_type": "markdown", "id": "f3e61899", "metadata": {}, "source": [ "Formula for loose bound:" ] }, { "cell_type": "code", "execution_count": 5, "id": "77fff07c", "metadata": {}, "outputs": [], "source": [ "def loose_bound(example):\n", " n = example.n\n", " twisted = example.twisted\n", " return ( m*n^2*twisted.ch[1]^2\n", " ) / gcd(m, 2*n^2)\n", "\n", "for example in [recurring, extravagant]:\n", " example.loose_bound = loose_bound(example)" ] }, { "cell_type": "markdown", "id": "218fa169", "metadata": {}, "source": [ "Loose bounds for the two examples:" ] }, { "cell_type": "code", "execution_count": 6, "id": "9edbb954", "metadata": {}, "outputs": [ { "data": { "text/html": [ "<html>\\(\\displaystyle 144\\)</html>" ], "text/latex": [ "$\\displaystyle 144$" ], "text/plain": [ "144" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "recurring.loose_bound" ] }, { "cell_type": "code", "execution_count": 7, "id": "21b52c4d", "metadata": {}, "outputs": [ { "data": { "text/html": [ "<html>\\(\\displaystyle 215296\\)</html>" ], "text/latex": [ "$\\displaystyle 215296$" ], "text/plain": [ "215296" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "extravagant.loose_bound" ] }, { "cell_type": "markdown", "id": "22bc4b5f", "metadata": {}, "source": [ "# Stronger Convenient Bound" ] }, { "cell_type": "markdown", "id": "ee140573", "metadata": {}, "source": [ "Use expression for bound used in main document" ] }, { "cell_type": "markdown", "id": "8de156d1", "metadata": {}, "source": [ "$\\renewcommand\\nu\\ell$\n", "Redefine \\nu to $\\nu$ in latex\n", "$\\let\\originalDelta\\Delta$\n", "$\\renewcommand\\Delta{\\originalDelta(v)}$\n", "Redefine \\Delta in latex to be $\\Delta$" ] }, { "cell_type": "code", "execution_count": 8, "id": "712b7324", "metadata": {}, "outputs": [ { "data": { "text/html": [ "<html>\\(\\displaystyle \\frac{1}{2} \\, R + \\frac{\\Delta n^{2}}{4 \\, \\nu^{2}} + \\frac{R^{2} \\nu^{2}}{4 \\, \\Delta n^{2}}\\)</html>" ], "text/latex": [ "$\\displaystyle \\frac{1}{2} \\, R + \\frac{\\Delta n^{2}}{4 \\, \\nu^{2}} + \\frac{R^{2} \\nu^{2}}{4 \\, \\Delta n^{2}}$" ], "text/plain": [ "1/2*R + 1/4*Delta*n^2/nu^2 + 1/4*R^2*nu^2/(Delta*n^2)" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from plots_and_expressions import main_theorem1, Delta, nu, R, n\n", "# Delta: symbol for Δ(v)\n", "# n: symbol for denominator for β_(v)\n", "# R : symbol for chern_0(v)\n", "# nu : ...\n", "main_theorem1.corollary_r_bound" ] }, { "cell_type": "code", "execution_count": 9, "id": "43aa5f56", "metadata": {}, "outputs": [], "source": [ "def corrolary_bound(example):\n", " return (\n", " main_theorem1.corollary_r_bound\n", " .subs(Delta==example.bgmlv)\n", " .subs(nu==1)\n", " .subs(R==example.chern.ch[0])\n", " .subs(n==example.n)\n", " )\n", "\n", "\n", "for example in [recurring, extravagant]:\n", " example.corrolary_bound = corrolary_bound(example)" ] }, { "cell_type": "code", "execution_count": 10, "id": "5baed51c", "metadata": {}, "outputs": [ { "data": { "text/html": [ "<html>\\(\\displaystyle 53838.5009765625\\)</html>" ], "text/latex": [ "$\\displaystyle 53838.5009765625$" ], "text/plain": [ "53838.5009765625" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "float(extravagant.corrolary_bound)" ] }, { "cell_type": "code", "execution_count": 11, "id": "fcc15f60", "metadata": {}, "outputs": [ { "data": { "text/html": [ "<html>\\(\\displaystyle 37.515625\\)</html>" ], "text/latex": [ "$\\displaystyle 37.515625$" ], "text/plain": [ "37.515625" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "float(recurring.corrolary_bound)" ] }, { "cell_type": "markdown", "id": "e678a488", "metadata": {}, "source": [ "# Stronger Complicated Bounds" ] }, { "cell_type": "code", "execution_count": 12, "id": "ef8f09ff", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "\n", "def bound_comparisons(example):\n", " n = example.n\n", " a_v = example.betaminus.numerator()\n", "\n", " def theorem_bound(v_twisted, q_val, k):\n", " return int(min(\n", " n^2*q_val^2/k,\n", " v_twisted.ch[0]\n", " + n^2*(v_twisted.ch[1] - q_val)^2/k\n", " ))\n", "\n", " def k(n, a_v, b_q):\n", " n = int(n)\n", " a_v = int(a_v)\n", " b_q = int(b_q)\n", " k = -a_v*b_q % n\n", " return k if k > 0 else k + n\n", "\n", " b_qs = list(range(example.twisted.ch[1]*n+1))\n", " qs = list(map(lambda x: x/n,b_qs))\n", " ks = list(map(lambda b_q: k(n, a_v, b_q), b_qs))\n", " theorem2_bounds = [\n", " theorem_bound(example.twisted, q_val, 1)\n", " for q_val in qs\n", " ]\n", " theorem3_bounds = [\n", " theorem_bound(example.twisted, q_val, k)\n", " for q_val, k in zip(qs,ks)\n", " ]\n", " return qs, theorem2_bounds, theorem3_bounds" ] }, { "cell_type": "markdown", "id": "b1c51cd8", "metadata": {}, "source": [ "Array content:\n", "- First row: $q$-values\n", "- Second row: Theorem 1 bounds on $ch_0(u)$ for u solutions to prob with $ch_1^{\\beta}=q$\n", "- Second row: Theorem 2 bounds on $ch_0(u)$ for u solutions to prob with $ch_1^{\\beta}=q$" ] }, { "cell_type": "code", "execution_count": 13, "id": "9cd102ac", "metadata": {}, "outputs": [ { "data": { "text/html": [ "<html>\\(\\displaystyle \\begin{array}{l}\n", "\\verb|[[0|\\verb| |\\verb|1/3|\\verb| |\\verb|2/3|\\verb| |\\verb|1|\\verb| |\\verb|4/3|\\verb| |\\verb|5/3|\\verb| |\\verb|2|\\verb| |\\verb|7/3|\\verb| |\\verb|8/3|\\verb| |\\verb|3|\\verb| |\\verb|10/3|\\verb| |\\verb|11/3|\\verb| |\\verb|4]|\\\\\n", "\\verb| |\\verb|[0|\\verb| |\\verb|1|\\verb| |\\verb|4|\\verb| |\\verb|9|\\verb| |\\verb|16|\\verb| |\\verb|25|\\verb| |\\verb|36|\\verb| |\\verb|28|\\verb| |\\verb|19|\\verb| |\\verb|12|\\verb| |\\verb|7|\\verb| |\\verb|4|\\verb| |\\verb|3]|\\\\\n", "\\verb| |\\verb|[0|\\verb| |\\verb|0|\\verb| |\\verb|4|\\verb| |\\verb|3|\\verb| |\\verb|8|\\verb| |\\verb|25|\\verb| |\\verb|12|\\verb| |\\verb|15|\\verb| |\\verb|19|\\verb| |\\verb|6|\\verb| |\\verb|5|\\verb| |\\verb|4|\\verb| |\\verb|3]]|\n", "\\end{array}\\)</html>" ], "text/latex": [ "$\\displaystyle \\begin{array}{l}\n", "\\verb|[[0|\\verb| |\\verb|1/3|\\verb| |\\verb|2/3|\\verb| |\\verb|1|\\verb| |\\verb|4/3|\\verb| |\\verb|5/3|\\verb| |\\verb|2|\\verb| |\\verb|7/3|\\verb| |\\verb|8/3|\\verb| |\\verb|3|\\verb| |\\verb|10/3|\\verb| |\\verb|11/3|\\verb| |\\verb|4]|\\\\\n", "\\verb| |\\verb|[0|\\verb| |\\verb|1|\\verb| |\\verb|4|\\verb| |\\verb|9|\\verb| |\\verb|16|\\verb| |\\verb|25|\\verb| |\\verb|36|\\verb| |\\verb|28|\\verb| |\\verb|19|\\verb| |\\verb|12|\\verb| |\\verb|7|\\verb| |\\verb|4|\\verb| |\\verb|3]|\\\\\n", "\\verb| |\\verb|[0|\\verb| |\\verb|0|\\verb| |\\verb|4|\\verb| |\\verb|3|\\verb| |\\verb|8|\\verb| |\\verb|25|\\verb| |\\verb|12|\\verb| |\\verb|15|\\verb| |\\verb|19|\\verb| |\\verb|6|\\verb| |\\verb|5|\\verb| |\\verb|4|\\verb| |\\verb|3]]|\n", "\\end{array}$" ], "text/plain": [ "array([[0, 1/3, 2/3, 1, 4/3, 5/3, 2, 7/3, 8/3, 3, 10/3, 11/3, 4],\n", " [0, 1, 4, 9, 16, 25, 36, 28, 19, 12, 7, 4, 3],\n", " [0, 0, 4, 3, 8, 25, 12, 15, 19, 6, 5, 4, 3]], dtype=object)" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "np.array(bound_comparisons(recurring))" ] } ], "metadata": { "kernelspec": { "display_name": "SageMath 9.7", "language": "sage", "name": "sagemath" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.8" } }, "nbformat": 4, "nbformat_minor": 5 }