Skip to content
Snippets Groups Projects
Commit 0ac0465d authored by Luke Naylor's avatar Luke Naylor
Browse files

Correct the references in example notebook references to more general expressions

parent 65ae7d97
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id:63724666 tags: %% Cell type:markdown id:63724666 tags:
# Utilities # Utilities
%% Cell type:code id:abe149f0 tags: %% Cell type:code id:abe149f0 tags:
``` sage ``` sage
# Requires extra package: # Requires extra package:
#! sage -pip install "pseudowalls==0.0.3" --extra-index-url https://gitlab.com/api/v4/projects/43962374/packages/pypi/simple #! sage -pip install "pseudowalls==0.0.3" --extra-index-url https://gitlab.com/api/v4/projects/43962374/packages/pypi/simple
%display latex %display latex
from pseudowalls import * from pseudowalls import *
Δ = lambda v: v.Q_tilt() Δ = lambda v: v.Q_tilt()
mu = stability.Mumford().slope mu = stability.Mumford().slope
ts = stability.Tilt ts = stability.Tilt
var("beta", domain="real") var("beta", domain="real")
def beta_minus(v): def beta_minus(v):
beta = stability.Tilt().beta beta = stability.Tilt().beta
solutions = solve( solutions = solve(
stability.Tilt(alpha=0).degree(v)==0, stability.Tilt(alpha=0).degree(v)==0,
beta) beta)
return min(map(lambda s: s.rhs(), solutions)) return min(map(lambda s: s.rhs(), solutions))
class Object(object): class Object(object):
pass pass
``` ```
%% Cell type:markdown id:0b574b63 tags: %% Cell type:markdown id:0b574b63 tags:
# Define Cherns in Examples # Define Cherns in Examples
%% Cell type:markdown id:f1c3a606 tags: %% Cell type:markdown id:f1c3a606 tags:
Define two recurring examples used to illustrate performance of the different theorems to find semistabilizer bounds: Define two recurring examples used to illustrate performance of the different theorems to find semistabilizer bounds:
%% Cell type:code id:30d3738a tags: %% Cell type:code id:30d3738a tags:
``` sage ``` sage
recurring = Object() recurring = Object()
recurring.chern = Chern_Char(3, 2, -2) recurring.chern = Chern_Char(3, 2, -2)
recurring.chern recurring.chern
``` ```
%% Output %% Output
$\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}$ $\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}$
<pseudowalls.chern_character.Chern_Char object at 0x7f25db3a9990> <pseudowalls.chern_character.Chern_Char object at 0x7ff9d8e4c110>
%% Cell type:code id:fe394909 tags: %% Cell type:code id:fe394909 tags:
``` sage ``` sage
extravagant = Object() extravagant = Object()
extravagant.chern = Chern_Char(29, 13, -3/2) extravagant.chern = Chern_Char(29, 13, -3/2)
extravagant.chern extravagant.chern
``` ```
%% Output %% Output
$\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}$ $\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}$
<pseudowalls.chern_character.Chern_Char object at 0x7f25d1953e20> <pseudowalls.chern_character.Chern_Char object at 0x7ff9ce32e490>
%% Cell type:markdown id:09692ba5 tags: %% Cell type:markdown id:09692ba5 tags:
# Calculate Preliminary Quantities # Calculate Preliminary Quantities
%% Cell type:code id:7576ebe4 tags: %% Cell type:code id:7576ebe4 tags:
``` sage ``` sage
m = 1 # value of $\ell^2$
# add attributes for ... # add attributes for ...
for example in [recurring, extravagant]: for example in [recurring, extravagant]:
example.betaminus = beta_minus(example.chern) example.betaminus = beta_minus(example.chern)
example.twisted = example.chern.twist(example.betaminus) example.twisted = example.chern.twist(example.betaminus)
example.n = example.betaminus.denominator() example.n = example.betaminus.denominator()
example.m = 1 # \ell^2 = 1 on P^1
example.bgmlv = example.chern.Q_tilt() example.bgmlv = example.chern.Q_tilt()
# Actual maximal rank of Pseudo-Semistabilizers # Actual maximal rank of Pseudo-Semistabilizers
# (needs to be calculated elsewhere) # (needs to be calculated elsewhere)
recurring.actual_rmax = 25 recurring.actual_rmax = 25
extravagant.actual_rmax = 49313 extravagant.actual_rmax = 49313
``` ```
%% Cell type:markdown id:500abba3 tags: %% Cell type:markdown id:500abba3 tags:
# First Loose Bound # First Loose Bound
%% Cell type:markdown id:f3e61899 tags: %% Cell type:markdown id:f3e61899 tags:
Formula for loose bound: Formula for loose bound:
%% Cell type:code id:77fff07c tags: %% Cell type:code id:77fff07c tags:
``` sage ``` sage
def loose_bound(example): def loose_bound(example):
n = example.n n = example.n
twisted = example.twisted twisted = example.twisted
return ( m*n^2*twisted.ch[1]^2 return ( example.m*n^2*twisted.ch[1]^2
) / gcd(m, 2*n^2) ) / gcd(example.m, 2*n^2)
for example in [recurring, extravagant]: for example in [recurring, extravagant]:
example.loose_bound = loose_bound(example) example.loose_bound = loose_bound(example)
``` ```
%% Cell type:markdown id:218fa169 tags: %% Cell type:markdown id:218fa169 tags:
Loose bounds for the two examples: Loose bounds for the two examples:
%% Cell type:code id:9edbb954 tags: %% Cell type:code id:9edbb954 tags:
``` sage ``` sage
recurring.loose_bound recurring.loose_bound
``` ```
%% Output %% Output
$\displaystyle 144$ $\displaystyle 144$
144 144
%% Cell type:code id:21b52c4d tags: %% Cell type:code id:21b52c4d tags:
``` sage ``` sage
extravagant.loose_bound extravagant.loose_bound
``` ```
%% Output %% Output
$\displaystyle 215296$ $\displaystyle 215296$
215296 215296
%% Cell type:markdown id:22bc4b5f tags: %% Cell type:markdown id:22bc4b5f tags:
# Stronger Convenient Bound # Stronger Convenient Bound
%% Cell type:markdown id:ee140573 tags: %% Cell type:markdown id:ee140573 tags:
Use expression for bound used in main document Use expression for bound used in main document
%% Cell type:markdown id:8de156d1 tags: %% Cell type:markdown id:8de156d1 tags:
$\renewcommand\nu\ell$ $\renewcommand\nu\ell$
Redefine \nu to $\nu$ in latex Redefine \nu to $\nu$ in latex
$\let\originalDelta\Delta$ $\let\originalDelta\Delta$
$\renewcommand\Delta{\originalDelta(v)}$ $\renewcommand\Delta{\originalDelta(v)}$
Redefine \Delta in latex to be $\Delta$ $\renewcommand\Omega{\operatorname{lcm}(m,2n^2)}$
Redefine \Delta in latex to be $\Delta$ and \Omega to be $\Omega$
%% Cell type:code id:712b7324 tags: %% Cell type:code id:712b7324 tags:
``` sage ``` sage
from plots_and_expressions import main_theorem1, Delta, nu, R, n from plots_and_expressions import main_theorem1, Delta, m, R, n, lcm_m_2n2
# Delta: symbol for Δ(v) # Delta: symbol for Δ(v)
# n: symbol for denominator for β_(v) # n: symbol for denominator for β_(v)
# R : symbol for chern_0(v) # R : symbol for chern_0(v)
# nu : ... # nu : ...
main_theorem1.corollary_r_bound main_theorem1.corollary_r_bound
``` ```
%% Output %% Output
$\displaystyle \frac{1}{2} \, R + \frac{\Delta n^{2}}{4 \, \nu^{2}} + \frac{R^{2} \nu^{2}}{4 \, \Delta n^{2}}$ $\displaystyle \frac{1}{2} \, R + \frac{\Delta \Omega}{8 \, m} + \frac{R^{2} m}{2 \, \Delta \Omega}$
1/2*R + 1/4*Delta*n^2/nu^2 + 1/4*R^2*nu^2/(Delta*n^2) 1/2*R + 1/8*Delta*Omega/m + 1/2*R^2*m/(Delta*Omega)
%% Cell type:code id:43aa5f56 tags: %% Cell type:code id:43aa5f56 tags:
``` sage ``` sage
def corrolary_bound(example): def corrolary_bound(example):
return ( return (
main_theorem1.corollary_r_bound main_theorem1.corollary_r_bound
.subs(Delta==example.bgmlv) .subs(Delta==example.bgmlv)
.subs(nu==1) .subs(m==example.m)
.subs(R==example.chern.ch[0]) .subs(R==example.chern.ch[0])
.subs(n==example.n) .subs(n==example.n)
.subs(lcm_m_2n2==lcm(example.m,2*example.n^2))
) )
for example in [recurring, extravagant]: for example in [recurring, extravagant]:
example.corrolary_bound = corrolary_bound(example) example.corrolary_bound = corrolary_bound(example)
``` ```
%% Cell type:code id:5baed51c tags: %% Cell type:code id:5baed51c tags:
``` sage ``` sage
float(extravagant.corrolary_bound) extravagant.corrolary_bound
``` ```
%% Output %% Output
$\displaystyle 53838.5009765625$ $\displaystyle \frac{55130625}{1024}$
53838.5009765625 55130625/1024
%% Cell type:code id:fcc15f60 tags: %% Cell type:code id:fcc15f60 tags:
``` sage ``` sage
float(recurring.corrolary_bound) float(recurring.corrolary_bound)
``` ```
%% Output %% Output
$\displaystyle 37.515625$ $\displaystyle 37.515625$
37.515625 37.515625
%% Cell type:markdown id:e678a488 tags: %% Cell type:markdown id:e678a488 tags:
# Stronger Complicated Bounds # Stronger Complicated Bounds
%% Cell type:code id:ef8f09ff tags: %% Cell type:code id:ef8f09ff tags:
``` sage ``` sage
import numpy as np import numpy as np
def bound_comparisons(example): def bound_comparisons(example):
n = example.n n = example.n
a_v = example.betaminus.numerator() a_v = example.betaminus.numerator()
def theorem_bound(v_twisted, q_val, k): def theorem_bound(v_twisted, q_val, k):
return int(min( return int(min(
n^2*q_val^2/k, n^2*q_val^2/k,
v_twisted.ch[0] v_twisted.ch[0]
+ n^2*(v_twisted.ch[1] - q_val)^2/k + n^2*(v_twisted.ch[1] - q_val)^2/k
)) ))
def k(n, a_v, b_q): def k(n, a_v, b_q):
n = int(n) n = int(n)
a_v = int(a_v) a_v = int(a_v)
b_q = int(b_q) b_q = int(b_q)
k = -a_v*b_q % n k = -a_v*b_q % n
return k if k > 0 else k + n return k if k > 0 else k + n
b_qs = list(range(example.twisted.ch[1]*n+1)) b_qs = list(range(example.twisted.ch[1]*n+1))
qs = list(map(lambda x: x/n,b_qs)) qs = list(map(lambda x: x/n,b_qs))
ks = list(map(lambda b_q: k(n, a_v, b_q), b_qs)) ks = list(map(lambda b_q: k(n, a_v, b_q), b_qs))
theorem2_bounds = [ theorem2_bounds = [
theorem_bound(example.twisted, q_val, 1) theorem_bound(example.twisted, q_val, 1)
for q_val in qs for q_val in qs
] ]
theorem3_bounds = [ theorem3_bounds = [
theorem_bound(example.twisted, q_val, k) theorem_bound(example.twisted, q_val, k)
for q_val, k in zip(qs,ks) for q_val, k in zip(qs,ks)
] ]
return qs, theorem2_bounds, theorem3_bounds return qs, theorem2_bounds, theorem3_bounds
``` ```
%% Cell type:markdown id:b1c51cd8 tags: %% Cell type:markdown id:b1c51cd8 tags:
Array content: Array content:
- First row: $q$-values - First row: $q$-values
- Second row: Theorem 1 bounds on $ch_0(u)$ for u solutions to prob with $ch_1^{\beta}=q$ - Second row: Theorem 1 bounds on $ch_0(u)$ for u solutions to prob with $ch_1^{\beta}=q$
- Second row: Theorem 2 bounds on $ch_0(u)$ for u solutions to prob with $ch_1^{\beta}=q$ - Second row: Theorem 2 bounds on $ch_0(u)$ for u solutions to prob with $ch_1^{\beta}=q$
%% Cell type:code id:9cd102ac tags: %% Cell type:code id:9cd102ac tags:
``` sage ``` sage
np.array(bound_comparisons(recurring)) np.array(bound_comparisons(recurring))
``` ```
%% Output %% Output
$\displaystyle \begin{array}{l} $\displaystyle \begin{array}{l}
\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]|\\ \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]|\\
\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]|\\ \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]|\\
\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]]| \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]]|
\end{array}$ \end{array}$
array([[0, 1/3, 2/3, 1, 4/3, 5/3, 2, 7/3, 8/3, 3, 10/3, 11/3, 4], array([[0, 1/3, 2/3, 1, 4/3, 5/3, 2, 7/3, 8/3, 3, 10/3, 11/3, 4],
[0, 1, 4, 9, 16, 25, 36, 28, 19, 12, 7, 4, 3], [0, 1, 4, 9, 16, 25, 36, 28, 19, 12, 7, 4, 3],
[0, 0, 4, 3, 8, 25, 12, 15, 19, 6, 5, 4, 3]], dtype=object) [0, 0, 4, 3, 8, 25, 12, 15, 19, 6, 5, 4, 3]], dtype=object)
......
source diff could not be displayed: it is too large. Options to address this: view the blob.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment