From ff1b012b41867a453de076301b2a0b814cb5dffb Mon Sep 17 00:00:00 2001
From: Luke Naylor <l.naylor@sms.ed.ac.uk>
Date: Fri, 12 May 2023 18:22:40 +0100
Subject: [PATCH] Rearrange and correct work from last 4 commits

---
 main.tex | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/main.tex b/main.tex
index 93741a6..70ab47f 100644
--- a/main.tex
+++ b/main.tex
@@ -807,22 +807,25 @@ beta_value_expr = (beta == a/n)
 
 \noindent
 That is, $r \equiv -a^{-1}b$ mod $n$ ($a$ is coprime to $n$, and so invertible mod $n$).
+
 Substituting the current values of $q$ and $\beta$ into the condition for the
 radius of the pseudo-wall being positive
 (eqn \ref{eqn:positive_rad_d_bound_betamin}) we get:
 
 \begin{equation}
-	\frac{1}{\lcm(m,2n^2)}\ZZ
+\label{eqn:positive_rad_condition_in_terms_of_q_beta}
+	\frac{1}{m}\ZZ
 	\ni
 	\sage{positive_radius_condition.subs([q_value_expr,beta_value_expr]).factor()}
 	\in
 	\frac{1}{2n^2}\ZZ
 \end{equation}
 
-For each $r$, the smallest element of $\frac{1}{\lcm(m,2n^2)}\ZZ$ strictly larger
-than the lower bound here is exactly $\frac{1}{\lcm(m,2n^2)}$ greater.
-Therefore, if any of the two upper bounds come to within
-$\frac{1}{\lcm(m,2n^2)}$ of this lower bound, then there are no solutions for $d$.
+\noindent
+Both $d$ and the lower bound are elements of $\frac{1}{\lcm(m,2n^2)}\ZZ$.
+So, if any of the two upper bounds on $d$ come to within
+$\frac{1}{\lcm(m,2n^2)}$ of this lower bound, then there are no solutions for
+$d$.
 
 Considering equations
 \ref{eqn:bgmlv2_d_bound_betamin},
@@ -835,9 +838,11 @@ this happens when:
 		\sage{bgmlv2_d_upperbound_exp_term},
 		\sage{bgmlv3_d_upperbound_exp_term_alt.subs(chbv==0)},
 	\right)
-	< \frac{1}{\lcm(m,2n^2)}
+	< \epsilon := \frac{1}{\lcm(m,2n^2)}
 \end{equation}
 
+%% refinements using specific values of q and beta
+
 \begin{sagesilent}
 rhs_numerator = (
 	positive_radius_condition
@@ -849,7 +854,8 @@ rhs_numerator = (
 \end{sagesilent}
 
 \noindent
-Considering the numerator of the right-hand-side:
+Considering the numerator of the right-hand-side of
+(eqn \ref{eqn:positive_rad_condition_in_terms_of_q_beta}):
 
 \begin{align}
 	\sage{rhs_numerator}
@@ -858,7 +864,9 @@ Considering the numerator of the right-hand-side:
 	&\equiv ab &\mod n
 \end{align}
 
-And so, we also have $a(ar+2b) \equiv ab$ (mod $\lcm(m,2n^2)$).
+\noindent
+And so, we also have $a(ar+2b) \equiv ab$ (mod $2n^2$).
+
 
 \minorheading{Irrational $\beta$}
 
-- 
GitLab