Conversation
FBumann
force-pushed
the
claude/new-session-divgg4
branch
from
August 23, 2026 06:19
c103c48 to
937b2ee
Compare
Documentation build overview
40 files changed ·
|
`position(dim)` prints `pos(t)`, and a coordinate comparison prints `t >= 3`.
Both are an index-ish thing against a small integer, and nothing on the page
said which way the unmarked one goes — while the reader's own convention says
the opposite of this language's: papers write their sets as {1, …, T}, where
the index *is* the ordinal and nothing needs marking. So #32's ambiguity
survived into the artifact a reader recovers the model from.
The mark stays on the position, since a coordinate is what a dimension denotes
everywhere else in the language and a position is derived from whichever index
resolution produced. What is added is the legend that makes the unmarked side
readable, and two corrections to what a position prints:
- `pos` is introduced where it is used, gated the way the translation notes
are: one note for the symbol, one for the grouped form, one for the size —
each only where that form printed.
- A group rides a **subscript**, `pos_{season_of(t)}(t)`. As a second
argument it sat where the first one's integer sits, saying nothing about
"within".
- A position counted from the end prints against the size, `|T| - 1` rather
than `-1`: the order runs `0` to `|T| - 1`, so `-1` was an equation
asserting a position the legend had just ruled out. Grouped, it counts back
from the group's size, `|T_{season_of(t)}| - 1`.
- A dimension compared against a *number* names its coordinates in the set
legend (`snapshot` (`int` coordinates)) — the one comparison that can be
read as a position, since every other coordinate prints as prose.
Positions stay 0-based on the page, as in the file, so a clause reads off one
and writes into the other.
`|·|` is a `Format` method rather than an operator: `OPERATOR_NAMES` is a
vocabulary of infix spellings and the Typst gate compiles every one of them
between two operands.
The golden model gains `last`, the from-the-end pair the fixture had no case
for, which is what holds the new arms of the walk to output someone has read.
FBumann
force-pushed
the
claude/math-notation-positional-dim-wd56jz
branch
from
August 23, 2026 06:26
24b0e55 to
b583803
Compare
Contributor
Author
|
Folded into #31 rather than reviewed as a stack: it rewrites lines #31 itself writes — The commit is on Closing — nothing here is abandoned. Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #31, which is the base branch here — the diff is one commit. Retarget to
mainonce #31 lands.What this changes
#31 fixes the ambiguity in the file. This fixes it in the page, where it survived:
position(snapshot) == 0printspos(t) = 0andsnapshot >= 3printst \ge 3, both an index-ish thing against a small integer, with nothing saying which way the unmarked one goes. And the reader's own convention says the opposite of this language's — papers write their sets as{1, …, T}, where the index is the ordinal and nothing needs marking — so a reader recovers a different model from the one the file holds, which is the failure #31 names.The mark stays on the position: a coordinate is what a dimension denotes everywhere else in the language, and a position is derived from whichever index resolution produced, so the derived thing is what gets converted in view. What is added is the legend that makes the unmarked side readable, plus two corrections to what a position prints.
posis introduced where it is used, gated the way the translation notes are — one note for the symbol, one for the grouped form, one for the size, each only where that form printed:A group rides a subscript,$\mathrm{pos}_{\mathrm{season_of}(t)}(t)$ . As a second argument it sat exactly where the first one's integer sits and said nothing about "within" — the same shape an edge fill has, which already rides its translation as a subscript.
A position counted from the end prints against the size:$\mathrm{pos}(t) = \lvert\mathcal{T}\rvert - 1$ , and $\lvert\mathcal{T}_{\mathrm{season_of}(t)}\rvert - 1$ where the count is grouped. The order runs
0to|T| - 1, so-1printed as itself was an equation asserting a position the legend had just ruled out — Python's index sugar, read as math.A dimension compared against a number names its coordinates in the set legend:
index t — snapshot (int coordinates). That is the one comparison a reader can take for a position; every other coordinate prints as prose and could not be.Positions stay 0-based on the page, as in the file, so a clause reads off one and writes into the other.
Why not the alternatives
Considered and rejected on the record, so they are not rediscovered later:
coord(t) >= 3besidepos(t) = 0) taxes the common case, and contradicts the reason the conversion moved left in feat: position(dim) replaces index(dim, i), converting on the left #31: only one side should ever be marked.\hat tfor ordinals) is invisible at body-text size, does not survive plain text, and all three formats would have to agree on it.trange over{1..|T|}per the paper convention and printing values as\tau_t— is the only coherent inversion, and it is nearly free everywhere except a value comparison. It costs the symbol correspondence between page and file, which is what feat: position(dim) replaces index(dim, i), converting on the left #31 says it is protecting.t \succ t_1with the set enumerated in the legend) are more conventional thanpos(t) > 1, but they are a second surface for one construct. The order relation now appears only in the legend line, where it says whatposcounts along.Scope
|·|is aFormatmethod rather than anOPERATOR_NAMESentry: that vocabulary is infix spellings, and the Typst gate compiles every one of them between two operands. Three formats spell it (\lvert…\rvert,abs(…), LaTeX's via Markdown).The golden model gains
last, the from-the-end pair it had no case for — which is what holds the new arms of the walk to output someone has read, under the fixture's three censuses.docs/reference/notation.mdis regenerated.Checks
pixi.shis unreachable from this environment, so the gates ran on a 3.13 venv at the versionspixi.tomlpins, plusprettier@3.9.3andtyposfetched directly: 377 passed (including the three Typst compile tests, which coverabs(cal(T))and the subscriptedpos— they skip without the bindings),ruffcheck and format clean,pyrefly0 errors, prettier clean on the touched files,typosclean,reuse lintcompliant.One thing found on the way, not fixed here
tools/notation.pycannot run end-to-end in this repo: itsPIECEWISEmap points at four example models that stayed behind influxopt/lpspecat the extraction (#17), so_curves()raisesFileNotFoundError. Nothing runs--checkin tests or CI — here or upstream — so the page has been drifting from the models it claims to be generated from with nothing to say so. Its docstring also citestests/test_docs_site.py, which does not exist here.For this PR the fixture-derived half was regenerated normally and the curve rows carried over verbatim, with the one substitution this change makes to them applied (
pos(b) = -1→pos(b) = |B| - 1). All four models render clean against this repo's language unchanged, so porting them back plus a five-line--checkguard is the fix — worth its own PR.Generated by Claude Code