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

Shorten SageMath lines and correct alternative expressions in 6.1

parent 61a90ba0
No related branches found
No related tags found
No related merge requests found
...@@ -167,7 +167,11 @@ $\chern(F)$, and so we can write: ...@@ -167,7 +167,11 @@ $\chern(F)$, and so we can write:
\begin{sagesilent} \begin{sagesilent}
ts = stability.Tilt ts = stability.Tilt
beta_min = var("beta", domain="real") beta_min = var("beta", domain="real")
c_lower_bound = -(ts(beta=beta_min).rank(u)/ts().alpha).expand() + c
c_lower_bound = -(
ts(beta=beta_min).rank(u)
/ts().alpha
).expand() + c
var("q", domain="real") var("q", domain="real")
c_in_terms_of_q = c_lower_bound + q c_in_terms_of_q = c_lower_bound + q
...@@ -205,7 +209,11 @@ Expressing $c$ in terms of $q$ as defined in (eqn \ref{eqn-cintermsofm}) ...@@ -205,7 +209,11 @@ Expressing $c$ in terms of $q$ as defined in (eqn \ref{eqn-cintermsofm})
we get the following: we get the following:
\begin{sagesilent} \begin{sagesilent}
bgmlv1_with_q = bgmlv1.expand().subs(c == c_in_terms_of_q) bgmlv1_with_q = (
bgmlv1
.expand()
.subs(c == c_in_terms_of_q)
)
\end{sagesilent} \end{sagesilent}
\begin{equation} \begin{equation}
...@@ -220,6 +228,7 @@ This can be rearranged to express a bound on $d$ as follows: ...@@ -220,6 +228,7 @@ This can be rearranged to express a bound on $d$ as follows:
var("r_alt",domain="real") # r_alt = r - R/2 temporary substitution var("r_alt",domain="real") # r_alt = r - R/2 temporary substitution
bgmlv1_with_q_reparam = (bgmlv1_with_q.subs(r == r_alt + R/2)/r_alt).expand() bgmlv1_with_q_reparam = (bgmlv1_with_q.subs(r == r_alt + R/2)/r_alt).expand()
bgmlv1_d_ineq = ( bgmlv1_d_ineq = (
((0 >= -bgmlv1_with_q_reparam)/4 + d) # Rearrange for d ((0 >= -bgmlv1_with_q_reparam)/4 + d) # Rearrange for d
.subs(r_alt == r - R/2) # Resubstitute r back in .subs(r_alt == r - R/2) # Resubstitute r back in
...@@ -236,45 +245,47 @@ This can be rearranged to express a bound on $d$ as follows: ...@@ -236,45 +245,47 @@ This can be rearranged to express a bound on $d$ as follows:
\begin{sagesilent} \begin{sagesilent}
# Seperate out the terms of the lower bound for d # Seperate out the terms of the lower bound for d
bgmlv1_d_lowerbound_exp_term = (bgmlv1_d_lowerbound*(R-2*r)).expand().subs(r==2*R)/(R-2*r) bgmlv1_d_lowerbound_without_hyp = bgmlv1_d_lowerbound.subs(1/(R-2*r) == 0)
bgmlv1_d_lowerbound_const_term = bgmlv1_d_lowerbound.subs(1/(R-2*r) == 0).subs(r==0)
bgmlv1_d_lowerbound_linear_term = bgmlv1_d_lowerbound.subs(1/(R-2*r) == 0).subs(r==1)*r
# Verify the simplified forms of the terms that will be mentioned in text bgmlv1_d_lowerbound_exp_term = (
assert bgmlv1_d_lowerbound_const_term == v.twist(beta_min).ch[2]/2 + beta_min*q, "fail" bgmlv1_d_lowerbound
assert bgmlv1_d_lowerbound_linear_term == (v.twist(beta_min).ch[2]/2 + beta_min^2/2 + beta_min*q)*r, "fail" - bgmlv1_d_lowerbound_without_hyp
).expand()
assert bgmlv1_d_lowerbound_exp_term == ( bgmlv1_d_lowerbound_const_term = bgmlv1_d_lowerbound_without_hyp.subs(r==0)
- 2*R*v.twist(beta_min).ch[2]
- 3*R^2*beta_min^2
- 4*R*beta_min*q
+ C*q
- q^2
).expand()/(R-2*r), "fail"
assert bgmlv1_d_lowerbound_exp_term == ( bgmlv1_d_lowerbound_linear_term = (
- 2*D*R + (C^2)/4 bgmlv1_d_lowerbound_without_hyp
- ((C - 4*R*beta_min)/2 - q)^2 - bgmlv1_d_lowerbound_const_term
).expand()/(R-2*r), "fail" ).expand()
# Verify the simplified forms of the terms that will be mentioned in text
assert bgmlv1_d_lowerbound_const_term == (
v.twist(beta_min).ch[2]/2
+ beta_min*q
)
assert bgmlv1_d_lowerbound_exp_term == ( assert bgmlv1_d_lowerbound_exp_term == (
(2*R*beta_min + q) (
*(2*R*beta_min + q - C) - R*v.twist(beta_min).ch[2]/2
+ 2*D*R - R*beta_min*q
).expand()/(2*r - R), "fail" + C*q
- q^2
)/(R-2*r)
).expand()
\end{sagesilent} \end{sagesilent}
\noindent \noindent
Viewing equation \ref{eqn-bgmlv1_d_lowerbound} as a lower bound for $d$ given Viewing equation \ref{eqn-bgmlv1_d_lowerbound} as a lower bound for $d$ given
as a function of $r$, the terms can be rewritten as follows. as a function of $r$, the terms can be rewritten as follows.
The constant term in $r$ is The constant term in $r$ is
$\chern^{\beta}_2(F) + \beta q$. $\chern^{\beta}_2(F)/2 + \beta q$.
The linear term in $r$ is The linear term in $r$ is
$(\chern^{\beta}_2(F)/2 + \beta^2/2 + \beta q)r$. $\sage{bgmlv1_d_lowerbound_linear_term}$.
Finally, there's an hyperbolic term in $r$ which tends to 0 as $r \to \infty$, Finally, there's an hyperbolic term in $r$ which tends to 0 as $r \to \infty$,
and can be written: and can be written:
$\frac{-2R\chern^{\beta}_2(F) - 3R^2\beta^2 - 4Rq\beta + Cq - q^2}{R-2r}$ or $\frac{R\chern^{\beta}_2(F)/2 + R\beta q - Cq + q^2 }{2r-R}$.
$\frac{(2R\beta + q)(2R\beta + q - C) + 2DR}{2r-R}$.
In the case $\beta = \beta_{-}$ (or $\beta_{+}$) we have In the case $\beta = \beta_{-}$ (or $\beta_{+}$) we have
$\chern^{\beta}_2(F) = 0$, $\chern^{\beta}_2(F) = 0$,
so some of these expressions simplify. so some of these expressions simplify.
...@@ -298,7 +309,11 @@ Expressing $c$ in terms of $q$ as defined in (eqn \ref{eqn-cintermsofm}) ...@@ -298,7 +309,11 @@ Expressing $c$ in terms of $q$ as defined in (eqn \ref{eqn-cintermsofm})
we get the following: we get the following:
\begin{sagesilent} \begin{sagesilent}
bgmlv2_with_q = bgmlv2.expand().subs(c == c_in_terms_of_q) bgmlv2_with_q = (
bgmlv2
.expand()
.subs(c == c_in_terms_of_q)
)
\end{sagesilent} \end{sagesilent}
\begin{equation} \begin{equation}
...@@ -311,11 +326,12 @@ This can be rearranged to express a bound on $d$ as follows: ...@@ -311,11 +326,12 @@ This can be rearranged to express a bound on $d$ as follows:
\begin{sagesilent} \begin{sagesilent}
bgmlv2_d_ineq = ( bgmlv2_d_ineq = (
((0 <= bgmlv2_with_q)/2/r + d) # Rearrange for d (0 <= bgmlv2_with_q)/2/r # rescale assuming r > 0
.expand() + d # Rearrange for d
) ).expand()
bgmlv2_d_lowerbound = bgmlv2_d_ineq.rhs() # Keep hold of lower bound for d # Keep hold of lower bound for d
bgmlv2_d_lowerbound = bgmlv2_d_ineq.rhs()
\end{sagesilent} \end{sagesilent}
\begin{equation} \begin{equation}
...@@ -325,9 +341,16 @@ This can be rearranged to express a bound on $d$ as follows: ...@@ -325,9 +341,16 @@ This can be rearranged to express a bound on $d$ as follows:
\begin{sagesilent} \begin{sagesilent}
# Seperate out the terms of the lower bound for d # Seperate out the terms of the lower bound for d
bgmlv2_d_lowerbound_exp_term = (bgmlv2_d_lowerbound*r).expand().subs(r==0)/r bgmlv2_d_lowerbound_without_hyp = bgmlv2_d_lowerbound.subs(1/r == 0)
bgmlv2_d_lowerbound_const_term = bgmlv2_d_lowerbound.subs(1/r == 0).subs(r==0) bgmlv2_d_lowerbound_const_term = bgmlv2_d_lowerbound_without_hyp.subs(r==0)
bgmlv2_d_lowerbound_linear_term = bgmlv2_d_lowerbound.subs(1/r == 0).subs(r==1)*r bgmlv2_d_lowerbound_linear_term = (
bgmlv2_d_lowerbound_without_hyp
- bgmlv2_d_lowerbound_const_term
).expand()
bgmlv2_d_lowerbound_exp_term = (
bgmlv2_d_lowerbound
- bgmlv2_d_lowerbound_without_hyp
).expand()
\end{sagesilent} \end{sagesilent}
Viewing equation \ref{eqn-bgmlv2_d_lowerbound} as a lower bound for $d$ in term Viewing equation \ref{eqn-bgmlv2_d_lowerbound} as a lower bound for $d$ in term
...@@ -361,7 +384,11 @@ Expressing $c$ in terms of $q$ as defined in (eqn \ref{eqn-cintermsofm}) ...@@ -361,7 +384,11 @@ Expressing $c$ in terms of $q$ as defined in (eqn \ref{eqn-cintermsofm})
we get the following: we get the following:
\begin{sagesilent} \begin{sagesilent}
bgmlv3_with_q = bgmlv3.expand().subs(c == c_in_terms_of_q) bgmlv3_with_q = (
bgmlv3
.expand()
.subs(c == c_in_terms_of_q)
)
\end{sagesilent} \end{sagesilent}
\begin{equation} \begin{equation}
...@@ -376,14 +403,17 @@ This can be rearranged to express a bound on $d$ as follows: ...@@ -376,14 +403,17 @@ This can be rearranged to express a bound on $d$ as follows:
var("r_alt",domain="real") # r_alt = r - R temporary substitution var("r_alt",domain="real") # r_alt = r - R temporary substitution
bgmlv3_with_q_reparam = ( bgmlv3_with_q_reparam = (
bgmlv3_with_q.subs(r == r_alt + R) bgmlv3_with_q
.subs(r == r_alt + R)
/r_alt # This operation assumes r_alt > 0 /r_alt # This operation assumes r_alt > 0
).expand() ).expand()
bgmlv3_d_ineq = ( bgmlv3_d_ineq = (
((0 <= bgmlv3_with_q_reparam)/2 + d) # Rearrange for d ((0 <= bgmlv3_with_q_reparam)/2 + d) # Rearrange for d
.subs(r_alt == r - R) # Resubstitute r back in .subs(r_alt == r - R) # Resubstitute r back in
.expand() .expand()
) )
# Check that this equation represents a bound for d # Check that this equation represents a bound for d
assert bgmlv3_d_ineq.lhs() == d, f"Inequality is of the form: {bgmlv3_d_ineq}" assert bgmlv3_d_ineq.lhs() == d, f"Inequality is of the form: {bgmlv3_d_ineq}"
bgmlv3_d_upperbound = bgmlv3_d_ineq.rhs() # Keep hold of lower bound for d bgmlv3_d_upperbound = bgmlv3_d_ineq.rhs() # Keep hold of lower bound for d
...@@ -398,21 +428,26 @@ This can be rearranged to express a bound on $d$ as follows: ...@@ -398,21 +428,26 @@ This can be rearranged to express a bound on $d$ as follows:
# Seperate out the terms of the lower bound for d # Seperate out the terms of the lower bound for d
bgmlv3_d_upperbound_without_hyp = bgmlv3_d_upperbound.subs(1/(R-r) == 0) bgmlv3_d_upperbound_without_hyp = bgmlv3_d_upperbound.subs(1/(R-r) == 0)
bgmlv3_d_upperbound_const_term = bgmlv3_d_upperbound_without_hyp.subs(r==0) bgmlv3_d_upperbound_const_term = bgmlv3_d_upperbound_without_hyp.subs(r==0)
bgmlv3_d_upperbound_linear_term = ( bgmlv3_d_upperbound_linear_term = (
bgmlv3_d_upperbound_without_hyp bgmlv3_d_upperbound_without_hyp
- bgmlv3_d_upperbound_const_term - bgmlv3_d_upperbound_const_term
).expand() ).expand()
bgmlv3_d_upperbound_exp_term = ( bgmlv3_d_upperbound_exp_term = (
bgmlv3_d_upperbound bgmlv3_d_upperbound
- bgmlv3_d_upperbound_without_hyp - bgmlv3_d_upperbound_without_hyp
).expand() ).expand()
# Verify the simplified forms of the terms that will be mentioned in text # Verify the simplified forms of the terms that will be mentioned in text
assert bgmlv3_d_upperbound_const_term == ( assert bgmlv3_d_upperbound_const_term == (
v.twist(beta_min).ch[2] v.twist(beta_min).ch[2]
+ beta_min*q + beta_min*q
).expand() ).expand()
assert bgmlv3_d_upperbound_exp_term == ( assert bgmlv3_d_upperbound_exp_term == (
R*v.twist(beta_min).ch[2] R*v.twist(beta_min).ch[2]
+ (C - q)^2/2 + (C - q)^2/2
......
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