Newer
Older
{
"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",
"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 0x7ff85e32f1f0>"
]
},
"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 0x7ff8548d70d0>"
]
},
"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": [
"# 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",
Luke Naylor
committed
" example.m = 1 # \\ell^2 = 1 on P^1\n",
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
" 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",
Luke Naylor
committed
" return ( example.m*n^2*twisted.ch[1]^2\n",
" ) / gcd(example.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": "code",
"execution_count": 8,
"id": "712b7324",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
Luke Naylor
committed
"<html>\\(\\displaystyle \\frac{1}{2} \\, R + \\frac{\\Delta \\Omega}{8 \\, m} + \\frac{R^{2} m}{2 \\, \\Delta \\Omega}\\)</html>"
],
"text/latex": [
Luke Naylor
committed
"$\\displaystyle \\frac{1}{2} \\, R + \\frac{\\Delta \\Omega}{8 \\, m} + \\frac{R^{2} m}{2 \\, \\Delta \\Omega}$"
],
"text/plain": [
Luke Naylor
committed
"1/2*R + 1/8*Delta*Omega/m + 1/2*R^2*m/(Delta*Omega)"
"metadata": {},
"output_type": "execute_result"
}
],
Luke Naylor
committed
"from plots_and_expressions import main_theorem1, Delta, m, R, n, lcm_m_2n2\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",
"id": "43aa5f56",
"metadata": {},
"outputs": [],
"source": [
"def corrolary_bound(example):\n",
" return (\n",
" main_theorem1.corollary_r_bound\n",
" .subs(Delta==example.bgmlv)\n",
Luke Naylor
committed
" .subs(m==example.m)\n",
" .subs(R==example.chern.ch[0])\n",
" .subs(n==example.n)\n",
Luke Naylor
committed
" .subs(lcm_m_2n2==lcm(example.m,2*example.n^2))\n",
" )\n",
"\n",
"\n",
"for example in [recurring, extravagant]:\n",
" example.corrolary_bound = corrolary_bound(example)"
]
},
{
"cell_type": "code",
"id": "5baed51c",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
Luke Naylor
committed
"<html>\\(\\displaystyle \\frac{55130625}{1024}\\)</html>"
Luke Naylor
committed
"$\\displaystyle \\frac{55130625}{1024}$"
Luke Naylor
committed
"55130625/1024"
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
Luke Naylor
committed
"extravagant.corrolary_bound"
]
},
{
"cell_type": "code",
"id": "fcc15f60",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<html>\\(\\displaystyle 37.515625\\)</html>"
],
"text/latex": [
"$\\displaystyle 37.515625$"
],
"text/plain": [
"37.515625"
]
},
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"float(recurring.corrolary_bound)"
]
},
{
"cell_type": "markdown",
"id": "e678a488",
"metadata": {},
"source": [
"# Stronger Complicated Bounds"
]
},
{
"cell_type": "code",
"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",
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
"\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",
"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)"
]
},
"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",
}
},
"nbformat": 4,
"nbformat_minor": 5
}