Skip to content

Thesis defect corrections, the step drift diagnosed, and the build matched to the published thesis - #42

Merged
salindne merged 13 commits into
masterfrom
pr22-thesis-notation
Aug 27, 2026
Merged

Thesis defect corrections, the step drift diagnosed, and the build matched to the published thesis#42
salindne merged 13 commits into
masterfrom
pr22-thesis-notation

Conversation

@salindne

@salindne salindne commented Aug 27, 2026

Copy link
Copy Markdown
Owner

The notation pass this PR was scoped for is cancelled on measurement. What lands instead is a set of thesis defect corrections, the step-numbering drift the author reported diagnosed to its cause, and the reconstructed build brought into agreement with the published thesis on pages and on algorithm numbers.

Five attempted corrections in this PR turned out to be wrong and are retracted with their evidence. That is the most useful part of it, so it gets its own section.

Why the notation pass is cancelled

The plan was to move coefficient-level formulas from two-digit indexing (u_{11}) to primes (u^{\prime\prime}_1), matching the generated tables. Measured in chapter5.tex:

count
u_1 as a polynomial, divisor 1 (/u_1, \pmod{u_1}) 123
u_1 as a coefficient of degree 1 1
u_{11} two-digit, divisor 1 degree 1 49

Mapping u_{11} \to u_1 would collide the coefficient with 123 polynomial uses. The two-digit form is not redundant with the prime notation; it is what disambiguates coefficients from polynomials, and removing it would create the ambiguity the PR existed to remove. The only escape is to rename the polynomials too, which would split the prose from the pseudocode that the 2026-08-09 decision keeps on divisor-level indexing.

Worth recording because it is the opposite of where the risk was expected: 21 of 28 align* blocks in chapter 5 carry coefficient notation only and would have been mechanical. The blocks were viable and the prose is what makes the pass unsound.

The original problem resolves the other way round. The generated tables should carry two-digit notation, and ideally from the generator rather than by hand. Folded into PR31.

The step drift the author reported is \EndIf

The algpseudocode environment, whose engine is algorithmicx, numbers \EndIf lines. The prose never counted them as steps, so every reference drifts by the number of \EndIf lines above it, and the drift grows down each algorithm.

One preamble line fixes it, \algtext*{EndIf}. Precisely what it does, because the mechanism is the argument: \algtext* binds the entity's text to \ALG@x@notext, and algorithmicx.sty:193-197 then emits \item[] rather than \item. The list's default label is {\ALG@step}, which is what advances ALG@line, so an empty label bypasses it. The line loses its text, loses its number, and consumes no number. That last part is why later references move.

Seven anchors across the two genus-3 split algorithms confirm it:

algorithm step named in prose prose says \EndIf numbered suppressed
3DBL monic quotient q', remainder r' 10--11 12--13 10--11
3DBL compute the six ratios 14 17 14
3DBL M_2' = (r(2v_1 + h) + qk)/u_1 15 18 15
3DBL z, then v_n 17--18 20--21 17--18
3ADD compute the six ratios 14 17 14
3ADD M_2' 16 19 16
3ADD u_n 17 20 17

Every one lands with suppression, and without it each is off by exactly the count of \EndIf lines above it. The first row is off by two rather than three, which is what rules out a constant offset from some other cause. The author reported the Degree 3 Addition description as "3 lines off" before any diagnosis was attempted, and three is that algorithm's \EndIf count.

The first diagnosis was wrong and was reverted inside this PR. It blamed the \State Go to ... and See description escape lines and edited 20 \Statex lines. It fitted alg:g3explSPLIT3ADD only because that algorithm happens to have three \EndIf and three escape lines. alg:explRAM2ADD discriminates: two \EndIf, zero escape lines, and it drifts by two.

The corrections that stand

where defect how it is decided
chapter6.tex:1091 u_2 = x^3 + u_{12}x^2 + \ldots; the leading coefficient belongs to u_1, declared in the same sentence. Now u_{22} present in the published PDF's own rendering. Confined to that one declaration: u_{12} at :1160, :1162, :1170, :1239 genuinely means divisor 1 and is untouched
chapter5.tex:403-407 into :416-417, and the twin block at chapter4.tex:1227-1233 bare u_1/u_0 where the result's u_{n_1}/u_{n_0} are meant. 11 names per block two arguments covering different names — see below. Chapter 4 was disagreeing with itself: :1238-1239 already wrote h_2u_{n_1}
chapter4.tex:1224-1225 "u_{n_1} = s_0'' - t_2 and therefore t_2 = s_0'' - u_{n_1}", both signs inverted arb_ramifiedG2_DBL.mag:205 computes upp1 := spp0 + t2; the same page says "Notice that t_2 = u_{n_1} - s_0''" ten lines later; chapter5.tex:394/:644 already had it right
chapter6.tex:1260-1261 two malformed r-subscripts. On u_{n_1} a phantom subscript swallowed three summands; on u_{n_0} it swallowed two and detached the factor (t_7 + r_{r_{01}}), which then multiplied the phantom r. Plus r_{q_01} twice and a missing + matched term for term against arb_splitG3_ADD.mag:10308-10310
chapter6.tex:1235 and :1257 two paragraphs that name a step in prose and then label their own block with a different one :1235 announces "In Step15 ... terms of k" and labelled the block Step14; the block gives k_3/k_2, and Step14's formula is explicitly deferred to the doubling section two sentences earlier. :1257 announces Step17 and labelled the block Step~15. A scan finds no third instance in either chapter
chapter5.tex:1838 unbalanced parenthesis, -w_4( never closed by reading. Not gate-visible: an unbalanced ( is legal in math mode, so the build is silent
chapter5.tex:647 dangling text, "the degree 2 coefficient k_2 = of k" by reading
chapter5.tex:1589-1591 the two n_n adjustments cited as Steps 17/18 of alg:g2nudupl retargeted to alg:g2balnudupl Steps 19 and 20, confirmed in the rendering

The u_{n_1}/u_{n_0} block has two arguments and they cover different names, which the errata now states rather than flattening:

  • Five names by algebra. Each block states a formula and then its factored form, so the two lines must be equal. Expanding (u_{n_1} - s_0'')(u_{11} - u_{n_1}) forces u_{n_1}s_0'', u_{n_1}u_{11}, u_{n_0}s_0'' and u_{n_0}u_{n_1}. Verified symbolically: the corrected lines are equal and the published ones are not.
  • Six h_2u_i names by the code. They sit outside the factorised group and appear identically on both lines, so comparing the lines constrains them not at all. They rest on arb_ramifiedG2_DBL.mag:209-210, vpp1 := ... + h2*upp1, which multiplies h_2 by the result.

The five retractions

1. \vh_1 is h_1 + v_{11}, not v_{21}. The argument for v_{21} was that alg:explRAM2ADD is an addition whose XGCD takes h + v_1 + v_2, supported by the code idiom vh1 := h1 + vp1. That idiom is from Deg12ADD, a different function, where the primed group is the degree-2 divisor. The function this passage describes is Deg2ADD, whose unprimed group is first and whose lines read

t4   := h1 + v1;
upp0 := spp0*(t3 - m3) + m1 + w3*(h2*(spp0 - up1) + t4 + v1) + w4*(u1 + up1 - f4);

so the block's \vh_1 + v_{11} is t4 + v1, that is h_1 + 2v_{11}. The passage says so two lines above the block, stating what it computes as u_n' = (s(-su_1 - 2v_1 - h) + k)/u_2, whose 2v_1 + h has degree-1 coefficient h_1 + 2v_{11}. v_2 reaches this step only through s and k. A code idiom is evidence only from the function under discussion, and the reading this overrode was the one a reader would naturally guess.

2. The generated-table repriming is reverted. Eight OUT rows in latexTables/split_ADD.tex were double-primed on the premise that single primes name the second input and so cannot name the result. In those four blocks there is no second input: the IN rows read D' = [], and the implementing functions Deg01ADDDWN, Deg01ADDUP, Deg02ADDDWN and Deg02ADDUP take no primed parameter at all, so up*/vp* legitimately name the result and the source returns them. Prime depth in these tables is a mechanical transcription of the Magma identifier and tracks arity, not the file.

The edit therefore made four self-consistent tables inconsistent: their bodies define only u^{\prime}_*, so the double-primed OUT rows named quantities appearing nowhere in the block and nowhere in the source. It also hand-edited generator output, which a regeneration would silently undo. The real fault is the label: latexConverter.py:479,561 append $D + D' = D'' = to every addition block regardless of arity. The claim that split_ADD.tex was the sole outlier is withdrawn too. latexTables/ is out of this PR's diff entirely.

3. alg:g3nucomp's S' is corrected in the opposite direction. The algorithm bound S and then tested and divided by an undefined S', and the first repair renamed the binding to S'. That is the wrong half: :561 reads u_n = (s(\vt - v_1) + kS)/u_2, and that factor must be the second gcd because k is formed at :545 from the undivided u_1.

The implementations use the overwrite convention the published text already had. reduced_basis_arithmetic.mag:147-153 reads S,a1,b1 := XGCD(u1,u2), then S,a2,b2 := XGCD(S,v2 + t1), then divides by S. The genus-3 ramified additions scale k by that quantity, k := k*S1 at nine live sites across arb, nch2 and ch2, and omit the multiplier entirely where the second gcd is 1. So :549 and :550 now read S, which is also the only repair well defined on every path: under S' naming, S = 1 at the outer test leaves S' unbound.

This is not a pure notation fix and should not be described as one. Two related defects are recorded and deliberately not corrected, both needing an editorial decision: alg:g3balnucomp assigns and tests S' but then uses \deg(S) and kS, and alg:g2balnucomp assigns and tests S' while dividing by S. alg:g2nucomp is the only one of the four internally consistent as printed, so alg:g3balnucomp is not a clean model to copy.

4. The prose Step~0 references were correct and are restored. Three algorithms carry \setcounter{ALG@line}{-1} immediately after \begin{algorithmic}[1], in the frozen published source as well as here, and the built PDF prints exactly three lines numbered 0:, every one the negative reduced normalization of v_1. So the published Step~0 was deliberate. An intermediate commit read it as an off-by-one and shifted four citations by +1; reverted, and confirmed against Algorithm 50's rendering, which prints 0 for the normalization, 1 to 3 for the d test and its escape, 4 for the z step the next sentence singles out, and 13 to 15 for the u_n computation.

The trap is that a source-level count of \State lines cannot see the counter reset, so Step~1 looked right for a line the document prints as 0. The arbiter for a step reference is the PDF, never the .tex.

5. The \Statex escape-line fix is reverted, as described above.

Two recorded descriptions were also wrong. D' = [] in four IN rows is not ERRATA.md E4's drained filter(); all four are degree-zero additions whose second divisor genuinely is the identity, so E4's claim that the committed .tex is unaffected stands. And the coordinate ordering was recorded as split ascending against ramified descending; measured, every file mixes orderings internally. Folded into PR31.

The build now matches the published thesis on pages and on algorithm numbers

Three reconstruction defects were found by measuring against the published PDF.

  1. \frontmatter and \mainmatter were missing, so the Abstract, Preface and Acknowledgments were numbered as Chapters 1 to 3, shifting every chapter number.
  2. \settocdepth{subsubsection} was missing, so the table of contents printed 33 of the 144 entries the .toc holds, two pages against the published four.
  3. subroutine had its own per-chapter counter and its own list. The eleven subroutines numbered 5.1 to 6.5, were absent from the List of Algorithms, and every algorithm above 34 was numbered too low: the document ended at Algorithm 76 against the published 87.
published, cover discounted rebuilt
total pages 266 266
front matter i to xiii i to xiii
Chapter 1 / 7 / Bibliography begin on 14 / 260 / 263 14 / 260 / 263
Chapter 1 to Chapter 7 span 246 246
algorithm and subroutine numbering 1 to 87 1 to 87
subroutine numbers 35, 38, 40, 44, 48, 51, 60, 61, 62, 70, 71 identical
extracted words 106,780 106,586

The published PDF is 267 pages because its page 1 is a PRISM repository cover sheet added by the institutional repository. The body was exact all along at 246 pages; the entire page gap was front matter.

Item 3 matters beyond typography, and it is why the citation check was redone. A step reference verified against the rebuild alone could have been verified against the wrong algorithm: alg:g3explSPLIT3ADD rendered as Algorithm 60 here against 69 in print. The eighteen citations now read Algorithms 28, 37, 46, 50 and 69, matching the published document, and all eighteen land.

Item 3 also retired a wrong explanation of its own. The List of Algorithms had been recorded as one page short because of "entry indentation and wrapping"; it was short because eleven entries were missing. One residual remains and is genuinely cosmetic: the table of contents runs five pages against four and the list of algorithms three against four. They happen to cancel, which is why the front matter is thirteen roman pages in both, and that cancellation should not be read as evidence of anything.

Thesis/thesis.aux and Thesis/thesis.toc are committed artifacts of the 2020 build and are what the include order was read off. A bare pdflatex thesis overwrites them, so both READMEs now build out of tree. The root README still shipped the destructive command.

E-T14 records a defect the rebuild reproduces rather than introduces: the three front-matter list references are one page low in the published thesis, because each contents line is written before the page break that starts its list. Explicit at frontmatter.tex:65. Note this is not a convergence artifact and an earlier draft of Thesis/README.md said it was: the published PDF's own table of contents prints viii too, so the committed .toc agrees with the converged build to the page.

What is not claimed

No global "every step reference resolves" statement. Eighteen citations were checked against the rendered PDF across five algorithms, and all eighteen land. Nothing outside them was checked. Three earlier attempts to automate this were each wrong, in four distinct ways: counting only \State lines, missing plural Steps~N--M forms, mis-pairing a step number with an unrelated nearby \ref, and an alternation that listed If but not EndIf so both hypotheses were identical by construction.

No Magma gate applies here. No .mag file is touched, so opcount, whitebox, driver, blockcheck and the Magma suite have nothing to say about this PR. Where a correction is matched against code, that is a reading of the source, not an execution. Nothing in the Magma constrains LaTeX numbering, so the \EndIf item can have no code cross-check at all.

The page total is not evidence for the corrections. It is evidence about the reconstruction. The numbering alignment is what supports E-T11.

Word counts state their extraction method (pdftotext then wc -w) because a different tokenizer moves the total by tens of words, and this table has previously carried two different numbers for the same frozen document for exactly that reason.

ThesisPublished/ is untouched.

Left for the author

  • A convention for S against S' across all four NUCOMP algorithms. Three different mixtures are in print.
  • chapter6.tex's "the computation of z ... in Step~17", which names a step that is 18 in the explicit algorithm and 34 in alg:g3balnucomp, citing neither explicitly.
  • latexTables/split_ADD.tex:253, [0,1,y_1,y_0,_1nn^{\prime}_1] in the balancing-weight slot. It compiles, since ,_1 subscripts the comma, so no build catches it.
  • The hardcoded OUT label in latexConverter.py, and the negation sign the generator drops at :191/:206.

Recorded

Thesis/ERRATA.md gains E-T14, rewrites E-T11, E-T12 and E-T13, and brings its Status block and defect table current — the table had still said none of its entries was corrected. NEW_WORK.md gains N35, which records the five retractions rather than only the corrections that stand, per the file's own rule that a hypothesis tested and failed earns the same space as one that held.

Gates

Build clean: 266 pages, 0 errors, 0 undefined references, 0 undefined citations, 0 rerun requests. readme-paths 100/100 · check_paths --strict 259/259 · git diff --name-only master..HEAD -- '*.mag' empty · ThesisPublished/ byte-identical.

…noticed

Six defects were on record from an earlier read; a seventh came from the author
asking whether the descriptions align with the right steps. Two of the six
recorded line numbers were wrong, found because each was located by content
rather than trusted.

E-T11, the seventh and the only systematic one. The author reported that the
Genus 3 Split Model Degree 3 Addition description "ends up being 3 lines off". It
does, and the prose was never wrong: `\State Go to ... Subroutine` and `\State
See description below.` are cross-references, not computational steps, but
`\State` numbers them, so each shifts every later step by one.
alg:g3explSPLIT3ADD and alg:g3explSPLIT3DBL carry three each, which is exactly
the reported drift. Fixed at 20 sites by `\State` -> `\Statex`, 7 in chapter5 and
13 in chapter6. Verified: alg:g3explSPLIT3ADD now numbers 20 steps and the prose's
claims land exactly -- \vt at 6, s' at 7, k at 15, M_2' at 16, u_n at 17. Across
both chapters every explicitly-labelled reference now resolves, 51 of 51, up from
49. The cheap direction: renumbering prose instead would have touched far more
text and enshrined "Go to Subroutine X" as a step of the computation.

The other six, each determined rather than guessed:

- ch6: u_2's x^2 coefficient was u_{12}, which belongs to u_1; now u_{22}.
- ch5: bare u_1/u_0 meaning u_{n_1}/u_{n_0} at 12 sites. Confirmed by ALGEBRA for
  the six products -- expanding the simplified form on the following line matches
  only under this reading -- and by THE CODE for the six h_2u sites, where
  arb_ramifiedG2_ADD.mag computes `vpp1 := s1*(t1*t2 + t0) - t4 + h2*upp1` and
  thesis line 417 matches it term for term. The record described this as "bare
  u_1/u_0"; the h_2u carry-over is the same error in a different shape.
- ch5: a missing `)` closing `-w_4(...)`, structurally fixed by the parallel line
  above it, which closes that group before its trailing terms. Recorded at :1837,
  actually at :1838 -- that line is balanced, 2 open 2 close.
- ch5: `coefficient $k_2 = $ of $k$`, a dangling equals with nothing to equal.
  Recorded at :646, actually at :647.
- ch4: alg:g3nucomp assigned (S,a_2,b_2) then tested S', never defined. The clean
  parallel at :655 assigns S', so the assignment now names S'.
- ch5: steps 17 and 18 were cited for Doubling Algorithm alg:g2nudupl, which has
  15 numbered lines. Both the label and the numbers were wrong: the passage is
  about split-model weight updates and cited the RAMIFIED algorithm. The prose's
  own arithmetic identifies the target -- `n_n = 1 + 2 - 3 = 0` is step 21 of
  alg:g2balnudupl at n_n=1, D=2, and `n_n = -1 + 3 - deg(u_n)` is step 22 at
  n_n=-1 -- so it now cites steps 21 and 22 of alg:g2balnudupl.

DELIBERATELY NOT FIXED, and recorded in E-T11 instead. Two passages write Step~0,
which algorithmicx never produces; in alg:explSPLIT1DBLUP the "Step 0" content is
genuinely step 1. But one of those passages is consistently 0-based throughout
(Step~0 ... Steps~1-3 ... Steps~4--12 ... Steps~13--15), so fixing only its first
citation would leave the paragraph internally inconsistent. That is a decision
about whether the thesis adopts 1-based numbering, not a typo.

Also not fixed: chapter6.tex:1260-1261 have a `_{` closing too late, so `r` is
subscripted by a three-term expression. The certain parts are done -- `r_{q_01}`
-> `r_{q_{01}}` twice, and a missing `+` the parallel block has -- but where the
subscript should end is a claim about the Step 15 mathematics with no parallel or
code line to check it against.

Thesis/thesis.pdf rebuilt from the corrected source, per Thesis/README.md.
ThesisPublished/ untouched.

Gate: the build, which exists as of #41. 0 errors, 271 pages, 0 undefined
references, 0 undefined citations, before and after.
…e code

Both deferred items from the previous commit are closed.

The two Step~0 passages are renumbered 1-based, the author having decided the
thesis numbers from 1 as algorithmicx prints. Each boundary was verified against
content rather than shifted, which mattered: for alg:explSPLIT12ADDUP the offset
is not uniform. Steps 1-3 become 2--4, Steps 4--12 become 5--13, but Steps 13--15
become 15--17, not 14--16, because step 14 is a bare \EndIf that is no part of the
described computation. A uniform shift would have left the u_n computation outside
the cited range.

chapter6.tex:1260-1261, recorded as E-T12. An r_{ was inserted before \vt_2 and
its closing brace landed after r_{q_{01}}, subscripting r by a multi-term
expression. Both lines now read as arb_splitG3_ADD.mag computes them.

Worth recording why this one was deferred rather than guessed. The natural repair
is to close the subscript after \vt_2, giving r_{\vt_2} + ... . The code shows
there is no r_{\vt_2} object at all: the term is plain \vt_2 and the whole r_{ was
spurious. That repair would have compiled cleanly and been wrong, and no gate
here can tell a well-formed subscript from an intended one. The doubled
r_{q_{01}} + r_{q_{01}} is the tell that confirms the correction -- the broken text
kept one copy inside the bogus subscript and one outside, and the code has both.

Thesis/thesis.pdf rebuilt. ThesisPublished/ untouched.
Gate: 0 errors, 271 pages, 0 undefined references, 0 undefined citations.
Eight OUT rows in latexTables/split_ADD.tex declared $D + D' = D''$ and then wrote
single-primed coefficients. Single primes are D', the second input, so those rows
named the result with an operand's notation. Now double-primed, matching every
other generated table: split_DBL, ram_ADD, ram_DBL and ram_arb_ADD are all
double-primed throughout, so this file was the sole outlier. Scoped to OUT rows,
so no body formula moved. Recorded as Thesis/ERRATA.md E-T13.

Three things in E-T13 that are not this fix.

A RETRACTION. Four IN rows read D' = [], exactly the signature ERRATA.md E4
describes for latexConverter.py's drained filter(). It is not that bug: all four
are 01ADDDWN, 01ADDUP, 02ADDDWN and 02ADDUP, degree-zero additions whose second
divisor genuinely is the identity. I raised it as a defect; the block labels
settle it, and E4's claim that the committed .tex is unaffected stands.

A CORRECTION TO THE RECORD. The plan said split_*.tex orders coordinates
low-to-high while ram_*.tex orders high-to-low. Measured, both files mix
orderings internally -- split_ADD 28 ascending against 18 descending, ram_ADD 9
against 5, ram_arb_ADD 6 against 8. No file is internally consistent, which is a
larger problem than "two files disagree". Folded into PR31 by the author's
decision, where these tables first get used.

TWO ITEMS LEFT FOR THE AUTHOR. Lines 191 and 206 leave the v coefficients
unprimed, which may be correct if the output v is the input v unchanged in that
degenerate case. And line 253's weight slot holds `_1nn^{\prime}_1`, a generation
artifact that COMPILES -- `,_1` subscripts the comma, legal and meaningless -- so
no build catches it, and this file has never been compiled anyway, being \input
nowhere.

These tables are not \input by any document, so this fix has no visible effect
today. It is preparation for PR31.
The author reported two symptoms: the Genus 3 Split Degree 3 Addition
description running 3 lines off, and a formula attributed to Steps 14--16 that
looked like Step 18. Both have one cause, and it is not the one committed in
d986c4c.

algorithmic[1] numbers \EndIf lines and the prose never counted them, so each
\EndIf shifts every later reference by one. One preamble line fixes it,
\algtext*{EndIf}, and the prose needed no renumbering for this cause -- it was
right as written.

THE EARLIER DIAGNOSIS WAS WRONG AND IS REVERTED. It blamed `\State Go to ...
Subroutine` and `\State See description below.`, changing 20 to \Statex. That fit
alg:g3explSPLIT3ADD perfectly by coincidence: it has three such lines AND three
\EndIfs, so both hypotheses shift by three there. alg:explRAM2ADD discriminates,
with two \EndIfs and zero \State escapes, and only the \EndIf explanation
survives. All 20 edits reverted.

A hypothesis that fits one instance exactly can still be wrong, and the instance
that looks most convincing is the one least able to discriminate.

Also corrected from that commit: with \EndIf counted the offset in the degree 1
and 2 addition passage looked non-uniform and its last range was written 15--17.
Under the correct numbering the offset is a uniform +1 and the range is 14--16.

And chapter5.tex:643, resolved by the author: \vh_1 = h_1 + v_1 is v_{21}, not
v_{11}. The enclosing algorithm is an addition whose XGCD takes h + v_1 + v_2, so
line 645's \vh_1 + v_{11} is the degree-1 coefficient of that sum.

NO GLOBAL VERIFICATION IS CLAIMED. Three attempts to check every reference
automatically were each wrong: counting only \State lines (13 steps where there
are 19), missing plural Steps~N--M forms (51 references where there are 87), and
mis-pairing a step number with an unrelated nearby \ref. A trustworthy checker is
its own piece of work. What is verified is two algorithms, by hand, and the cause
they share.

Page count moved from 271 to 264 against a published 267, which is unexplained.
Numbering alignment is the stronger evidence, being exact across two algorithms
with different \EndIf counts; the page total still carries the unresolved font
option and the reconstructed title page.

Gate: 0 errors, 264 pages, 0 undefined references, 0 undefined citations.
Asked to verify the \EndIf fix rather than accept it, since the wrong answer had
fit one algorithm perfectly.

The discriminating case is now explicit in E-T11. alg:explRAM2ADD has two \EndIf
and ZERO \State escape lines, so the escape hypothesis predicts no shift there at
all. Suppressing \EndIf puts the prose's Steps 13, 16 and 17 on the monic s''
line, the u_n line and the v_n line; counting \EndIf puts them on \EndIf, the k
line and the \vt line. Three of three against none of three.

Broadened by pairing each prose "In Step~N, <description>" with the block it
immediately follows -- which is what the document actually does -- giving 14
matches across 8 algorithms of varied size and structure in both chapters.

Also recorded: a harness bug found while doing this. A comparison of the two
hypotheses returned identical results everywhere, which looked like evidence they
could not be distinguished. The regex listed State|If|ElsIf|Else without EndIf,
and \EndIf never matches \If because of the leading backslash anchor, so both
branches had already dropped \EndIf and were equal by construction. Alternation
order matters: EndIf must precede If. That is the fourth counting error in this
stretch and the reason no global claim is made.
`thesis.tex` gains `\frontmatter`/`\mainmatter` around the front matter and
`\settocdepth{subsubsection}`.  Both were missing from the reconstructed preamble.

Without the first, `frontmatter.tex`'s Abstract, Preface and Acknowledgments are
numbered Chapters 1 to 3 and every chapter number in the document shifts.  Without
the second the table of contents prints chapters and sections only, two pages
against the published four; the published thesis lists subsections and
subsubsections.

The build is now 266 pages against the published 267, whose page 1 is a PRISM
repository cover sheet that these sources never produced.  Discounting it, both are
266 pages with front matter i to xiii, Chapter 1 on page 14, Chapter 7 on 260,
Bibliography on 263, and an identical 246 page span from Chapter 1 to Chapter 7.
Extracted words 106,463 against 106,841; `NUCOMP` 268 against 268.

One residual and self-cancelling difference is recorded: the table of contents runs
five pages where the published one runs four, and the list of algorithms three where
it runs four.

E-T14 records a defect the rebuild reproduces rather than introduces: the three
front-matter list entries are one page low in the published thesis, because each
contents line is written before the page break that starts its list.

The documented build command now works out of tree, since a bare `pdflatex thesis`
overwrites `thesis.aux` and `thesis.toc`, which are committed artifacts of the 2020
build and are what the include order was read off.

Gates: readme-paths 98/98, check_paths --strict 259/259, build 0 errors, 0 undefined
references, 0 undefined citations, 0 rerun requests.  No .mag file touched.
…orrected

`chapter6.tex:1257` introduced the genus-3 split Degree 3 Addition `u_n` block as
"The explicit formula for Step~15 is", where step 15 of that algorithm is `k`.  It is
Step~17: the sentence above it says "In Step~17, the output polynomial
u_n = rM_1 - qM_2 ... is directly computed monic", and the parallel block above that
reads "In Step~16 ... The explicit formula for Step~16 is".  The same defect is at
`ThesisPublished/chapter6.tex:1257`.

The identical string at `chapter6.tex:521` is correct and is untouched.  It belongs to
Degree 3 Doubling, whose step 15 really is `M_2'`.

E-T11 now rests on seven step references across both genus-3 split algorithms rather
than two.  Every one lands exactly when `\EndIf` is unnumbered, and without suppression
each is off by precisely the number of `\EndIf` lines above it: two for the doubling's
Steps~10--11, three for the other six.  The row that is off by two rules out a constant
offset from any other cause, and the three matches the author's report of the Degree 3
Addition description being "3 lines off".

E-T11's closing paragraph no longer says the page count moved the wrong way
unexplained.  It moved by seven pages while two other reconstruction defects were still
present; with those fixed the build is 266 against a published 267 whose first page is a
repository cover sheet.

One step reference in the same passage is recorded rather than guessed: "the computation
of z ... in Step~17" names a step that is 18 in the explicit algorithm and 34 in
`alg:g3balnucomp`, and the sentence cites neither.

Build: 266 pages, 0 errors, 0 undefined references, 0 undefined citations, 0 rerun
requests.  No .mag file touched; `ThesisPublished/` untouched.
`chapter5.tex:643` now reads `\vh_1 = h_1 + v_{11}`.  An earlier commit on this branch
made it `v_{21}` and that was wrong.

The argument for `v_{21}` was that `alg:explRAM2ADD` is an addition whose XGCD takes
`h + v_1 + v_2`, so the second divisor must appear, supported by the code idiom
`vh1 := h1 + vp1`.  That idiom is from `Deg12ADD`, a different function, where the primed
group is the degree-2 divisor.  The function this passage describes is `Deg2ADD`, whose
signature puts the unprimed group first and whose corresponding lines are

    t4   := h1 + v1;
    upp0 := spp0*(t3 - m3) + m1 + w3*(h2*(spp0 - up1) + t4 + v1) + w4*(u1 + up1 - f4);

at `arb_ramifiedG2_ADD.mag:449,451`, repeated at `:410,412` in branch `ADD09`.  So the
block's `\vh_1 + v_{11}` is `t4 + v1`, that is `h_1 + 2v_{11}`, which is the degree-1
coefficient of the `2v_1 + h` named two lines above the block in the thesis's own
statement of what it computes.  `v_2` reaches this step only through `s` and `k`.

The reading this overrode was the one a reader would naturally guess, and it was correct.
A code idiom is evidence only from the function under discussion.

The other corrections in the same region are unaffected and are now proved rather than
argued: each `align*` block at `:403-407` states a formula and then its factored form, and
the factorisation holds only for the corrected coefficient names.  Checked symbolically
for both `v_{n_1}` and `v_{n_0}`.

Build: 266 pages, 0 errors, 0 undefined references, 0 undefined citations, 0 rerun
requests.
**`latexTables/split_ADD.tex` is reverted to master.** The eight OUT rows were
double-primed on the premise that single primes name the second input and so could not
name the result.  In those four blocks there is no second input: the IN rows at `:5`,
`:62`, `:111` and `:170` all read `D' = []`, and the implementing functions
(`Deg01ADDDWN`, `Deg01ADDUP`, `Deg02ADDDWN`, `Deg02ADDUP`) take no primed parameter at
all, so `up*`/`vp*` legitimately name the result and the source returns them.  Prime
depth in these tables is a mechanical transcription of the Magma identifier and tracks
arity, not the file.

The edit therefore made four self-consistent tables inconsistent: the bodies define only
`u^{\prime}_*`, so the double-primed OUT rows named quantities appearing nowhere in the
block and nowhere in the source.  It also hand-edited generator output, which a
regeneration would silently undo.

The real fault is the label: `latexConverter.py:479,561` append `$D + D' = D'' = ` to every
addition block regardless of arity.  Fixing that, or renaming in the Magma and
regenerating, belongs with the generator.  `E-T13` is rewritten accordingly, and its claim
that `split_ADD.tex` was the sole outlier is withdrawn.

**`chapter4.tex` is corrected in the opposite direction.** `alg:g3nucomp` bound `S` and
then tested and divided by an undefined `S'`; the earlier commit renamed the binding to
`S'`.  That is the wrong half: `:561` reads `u_n = (s(\vt - v_1) + kS)/u_2`, and the factor
must be the second gcd because `k` is formed at `:545` from the undivided `u_1`.

The implementations use the overwrite convention the published text already had.
`reduced_basis_arithmetic.mag:147-153` reads `S,a1,b1 := XGCD(u1,u2)`, then
`S,a2,b2 := XGCD(S,v2 + t1)`, then divides by `S`.  The genus-3 ramified additions scale
`k` by that quantity, `k := k*S1` at nine live sites across arb, nch2 and ch2, and omit
the multiplier where the second gcd is 1.

So `:549` and `:550` now read `S`.  This is also the only repair well defined on every
path: under `S'` naming, `S = 1` at the outer test leaves `S'` unbound.  Chapter 3's
parents carry an explicit `S = S'` for that reason, which the genus-3 specialisations
dropped, and restoring it would renumber steps `chapter6.tex:1090` references.

Two related defects are recorded and deliberately not corrected, both needing an
editorial decision rather than a typo fix: `alg:g3balnucomp` assigns and tests `S'` but
uses `\deg(S)` and `kS`, and `alg:g2balnucomp` assigns and tests `S'` while dividing by
`S`.  `alg:g2nucomp` is the only one of the four consistent as printed.

The "known defects not yet corrected" table said none was corrected; it now records the
status of each, with positions re-anchored to `Thesis/`.

Build: 266 pages, 0 errors, 0 undefined references, 0 undefined citations, 0 rerun
requests.  readme-paths 98/98, check_paths --strict 259/259.  No .mag file touched.
Three algorithms carry `\setcounter{ALG@line}{-1}` immediately after
`\begin{algorithmic}[1]` and genuinely print 0 as their first line:
`chapter5.tex:1631`, `:1956`, `:2232`, identical in the frozen
`ThesisPublished/chapter5.tex:1624`, `:1949`, `:2225`.  The built PDF prints exactly three
lines numbered `0:`, every one the negative reduced normalization of `v_1`.

So the published `Step~0` was deliberate.  An earlier commit on this branch read it as an
off-by-one and shifted four citations by `+1` on the rationale that `algorithmic[1]`
numbers from 1.  Reverted: `Step~0`, `Steps~1-3`, `Steps~4--12`, `Steps~13--15`.  Verified
against the rendering of Algorithm 45, which prints 0 for the normalization, 1 to 3 for the
`d` test and its subroutine escape, 4 for the `z` step the very next sentence singles out,
and 13 to 15 for the `u_n` computation.

The trap is that a source-level count of `\State` lines cannot see the counter reset, so
`Step~1` looked right for a line the document prints as `0`.  The arbiter for a step
reference is the PDF, never the `.tex`.

One citation did have to move, and because of `\algtext*{EndIf}` rather than in spite of
it.  `chapter5.tex:1589-1591` cites the two `n_n` adjustments of `alg:g2balnudupl`.
Retargeting them from `alg:g2nudupl` was right and Steps 21 and 22 were right against the
`\EndIf`-numbered rendering; that algorithm has two `\EndIf` above them, so under
suppression they are Steps 19 and 20, which is what the text now says.  Confirmed in the
rendering: Algorithm 28 prints them at 19 and 20.

Eighteen citations re-checked against the rendered PDF across Algorithms 28, 36, 42, 45 and
60.  All eighteen land.

E-T11 also now states what the preamble line actually does: `\algtext*` makes
`algorithmicx` emit `\item[]`, which bypasses `\ALG@step` and so consumes no line number.
That is why later references move, and it is not a change to how `\EndIf` prints.

Build: 266 pages, 0 errors, 0 undefined references, 0 rerun requests.  readme-paths 98/98,
check_paths --strict 259/259.  No .mag file touched.
…ws about evidence

Ground rule 7: this PR corrects the thesis, so it owes an entry.  N35 records the five
retractions rather than only the corrections that stand, each with the specific failure of
evidence behind it: generalising a code idiom across functions, mistaking arity for a
notation convention, fixing the near half of a two-ended defect, trusting a source-level
count over the rendering, and accepting a hypothesis that fitted one case by coincidence.

Honest limits stated inline per the file's own rule: no .mag file is touched so no formula
gate applies, nothing in the Magma constrains LaTeX numbering, and there is no global claim
that every step reference resolves.
…rent

`chapter6.tex:1235` announced "In Step~15, only the degree 2 and 3 terms of
`k = (f - v_1(v_1 + h)/u_1)` are computed" and then labelled its own block "The explicit
formula for Step~14".  The block gives `k_3` and `k_2`, which is Step~15; and two sentences
earlier the text says Step~14's formula "is identical to that used in the same steps in
Degree 3 Doubling", so Step~14's formula is not given in this section at all.  Present at
`ThesisPublished/chapter6.tex:1235`.

That is the same defect class as `:1257`, found by scanning for paragraphs whose prose step
and whose block label disagree.  A scan of chapters 5 and 6 finds **no third instance**:
every other "The explicit formula for Step~N" agrees with the nearest preceding
"In Step~N".

The errata Status block said 3 files differing and 9 entries.  It is 14 entries, and
`thesis.tex` is present only here, which is recorded separately since it is a reconstruction
rather than a divergence.

Build: 266 pages, 0 errors, 0 undefined references, 0 undefined citations, 0 rerun requests.
readme-paths 98/98, check_paths --strict 259/259.  No .mag file touched.
… published thesis

`subroutine` was defined with its own per-chapter counter and its own list.  The eleven
subroutines therefore numbered 5.1 to 6.5, were **absent from the List of Algorithms**, and
every algorithm above 34 was numbered too low: the document ended at Algorithm 76 against
the published 87.

The published thesis numbers its subroutines **35, 38, 40, 44, 48, 51, 60, 61, 62, 70 and
71**, exactly the integers missing from its own `Algorithm` captions, so the two share one
counter.  With `\let\c@subroutine\c@algorithm` and the `loa` extension the rebuild reproduces
all eleven and tops out at 87.

**This is why it matters beyond typography.** A step reference checked against the rebuild
alone could have been checked against the wrong algorithm: `alg:g3explSPLIT3ADD` rendered as
Algorithm 60 here against 69 in print.  E-T11's eighteen citations are re-verified against
the corrected numbering and now read 28, 37, 46, 50 and 69, matching the published document;
all eighteen still land.

It also retires a wrong explanation.  The List of Algorithms was recorded as one page short
because of "entry indentation and wrapping"; it was short because eleven entries were
missing.  The remaining table-of-contents and list-of-algorithms page difference is density,
and the fact that the two cancel is a coincidence rather than evidence.

**Two further corrections in `chapter4.tex`, both in the section `chapter5.tex:417` sends the
reader to.** `:1227-1233` carried the same `align*` block as `chapter5.tex:403-407` with the
uncorrected coefficient names, while `:1238-1239` four lines below already wrote
`h_2u_{n_1}`, so the derivation and the formula it derives disagreed.  And `:1224-1225` read
"$u_{n_1} = s_0'' - t_2$ and therefore $t_2 = s_0'' - u_{n_1}$" with both signs inverted:
`arb_ramifiedG2_DBL.mag:205` computes `upp1 := spp0 + t2`, the same page says "Notice that
$t_2 = u_{n_1} - s_0''$" ten lines later, and `chapter5.tex:394` and `:644` already had it
right.

**The evidence for that block is split and the errata now says so.** Five names follow by
algebra, since each block states a formula and then its factored form and only the corrected
names make the two equal.  The six `h_2u_i` names sit outside the factorised group and appear
identically on both lines, so they rest on the code instead.  Flattening the two into one
claim over-covered the majority of the names.

Also corrected: E-T11 named `algorithmic[1]` as numbering `\EndIf`, where the package in use
is `algpseudocode` and its engine `algorithmicx`; `algorithmic` has neither `\EndIf` nor
`\algtext`.  E-T11's blanket "nothing needed renumbering" is qualified, since one citation
did.  E-T12's heading said one spurious `r_{` where there were two.  The word-count row now
states its extraction method and reads 106,780 against 106,586, replacing a figure taken with
a different tokenizer.  And the root README shipped the destructive in-tree build command
this branch had already replaced in `Thesis/README.md`.

Build: 266 pages, 0 errors, 0 undefined references, 0 undefined citations, 0 rerun requests.
Landmarks unchanged: front matter i to xiii, Chapter 1 on 14, Chapter 7 on 260.
readme-paths 100/100, check_paths --strict 259/259.  No .mag file touched.
@salindne
salindne merged commit d5ad4a7 into master Aug 27, 2026
6 checks passed
@salindne
salindne deleted the pr22-thesis-notation branch August 27, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant