Skip to content

Formalize the avos semiring, retitle the paper, update README, remove dockerutils - #79

Merged
rappdw merged 7 commits into
mainfrom
docs/math-foundations
Nov 1, 2026
Merged

rappdw merged 7 commits into
mainfrom
docs/math-foundations

Conversation

@rappdw

@rappdw rappdw commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Mathematical foundations. New docs/MATHEMATICAL_FOUNDATIONS.md. Stored as path words in Ahnentafel encoding, the avos sum and product form a genuine semiring (the shortlex path semiring). The RED_ONE/BLACK_ONE diagonal is a display convention that gives identical results on valid graphs (Proposition 4). The document proves the closure, repeated squaring, DAG recurrence, and incremental vertex and edge updates. It replaces the earlier conclusion that the algebra is "not a semiring".
  • Paper. The Red Black Graph notebook is updated to match. Changes:
    • corrected formal definition;
    • new foundations and ±1 diagonal sections;
    • proofs for the two open TODOs;
    • corrected relationship, component and standard-form sections;
    • Ahnentafel and semiring references;
    • %load cells refreshed from the current modules, so every code cell runs.
  • Retitled. The paper is now Red Black Graphs and the Avos Semiring, renamed to notebooks/red-black-graphs.ipynb, with a title cell, an abstract and title/author metadata. The PDF tooling picks the title up from the metadata.
  • Property tests. New tests/avos/test_algebra_properties.py (795 cases). It checks each theorem against every backend using brute-force path enumeration on seeded random graphs. The 12 gaps it found are strict xfails, tracked in (All) Reported diameter can be larger than the true diameter #72–(Reference, Sparse) avos_canonical_ordering is not always upper triangular #76.
  • Outdated analysis removed: MATHEMATICAL_ANALYSIS.md, analysis_semiring.py, and the uncollected tests/avos/tess_semiring.py.
  • dockerutils removed:
    • docker/ and bin/setup-project.sh are deleted.
    • bin/generate-pdf.sh now runs locally, using bin/gen-latex.py and xelatex.
    • bin/test no longer has a Docker option.
  • README rewritten. No dockerutils, and no rbgcf command, which no longer exists. Adds installation extras, a tested example, a working family-data workflow, a corrected implementations table, and consolidated build instructions.
  • Sandbox. .sandy/Dockerfile now uses the Debian 13 CUDA repo and CuPy for CUDA 13. .gitignore now ignores .claude/ and .secrets.

Closes #28. The notebook now names and uses Ahnentafel numbering.
Closes #31. Theorem 1 shows the avos algebra is a semiring, and Proposition 4 resolves the 1/−1 identity question. §10 notes that Strassen-style multiplication doesn't apply, because the semiring has no subtraction.

Related issues opened

Test plan

  • pytest tests: 1165 passed, 82 skipped (GPU, no device available), 12 xfailed (the known gaps above)
  • Each xfail confirmed to fail for its stated reason (--runxfail)
  • All code cells of notebooks/red-black-graphs.ipynb run in order
  • bin/test -u passes (coverage 76%)
  • bin/gen-latex.py produces the LaTeX with its fixups applied
  • bin/generate-pdf.sh end to end. Not run: no xelatex in this environment.
  • pylint: no new messages. It still exits non-zero on main too, because .pylintrc uses options current pylint no longer recognizes.

🤖 Generated with Claude Code

rappdw and others added 6 commits November 1, 2026 09:17
Add docs/MATHEMATICAL_FOUNDATIONS.md. Stored as path words in Ahnentafel
encoding, the avos sum and product form a semiring (the shortlex path
semiring), and the RED_ONE/BLACK_ONE diagonal is a display convention
that gives identical results on valid graphs. This supplies proofs for
closure, repeated squaring, the DAG recurrence and incremental vertex and
edge updates.

Integrate the rewrite into the Red Black Graph notebook: corrected formal
definition, new foundations and +/-1 diagonal sections, proofs for the
open TODOs, corrected relationship, component and standard-form sections,
Ahnentafel and semiring references, and %load cells refreshed from the
current modules so every code cell runs.

Add tests/avos/test_algebra_properties.py, which checks each theorem
against every backend using brute-force path enumeration. Gaps found are
recorded as strict xfails and tracked in #72-#76.

The MATHEMATICAL_ANALYSIS.md references now point at the new document.

Closes #28
Closes #31

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MATHEMATICAL_ANALYSIS.md, analysis_semiring.py and the uncollected
tests/avos/tess_semiring.py concluded the avos algebra is not a semiring.
docs/MATHEMATICAL_FOUNDATIONS.md supersedes them, and
tests/avos/test_algebra_properties.py replaces the old test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dockerutils is no longer used. Remove docker/ (Python 3.6, CUDA 8 and
third-party base images, built only through dockerutils) and
bin/setup-project.sh, which bin/setup-uv.sh supersedes.

bin/generate-pdf.sh now runs locally: bin/gen-latex.py (moved from
docker/notebook) converts the notebook and applies the LaTeX fixups,
then xelatex compiles it. bin/test drops its Docker option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove dockerutils instructions and the rbgcf command, which no longer
exists. Add installation with extras, a tested quick example, links to the
mathematical foundations, a working family-data workflow
(rbg-synthesize, scripts/rbg), a corrected implementations table,
consolidated build instructions, testing and license sections. NumPy 2.x
is now stated as required.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use the Debian 13 CUDA repository to match the sandbox base image, install
CuPy for CUDA 13 system-wide, and ignore .claude/ and .secrets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The old title, "A DAG of Multiple, Interleaved Binary Trees", described
the graph's shape rather than the result, and is only true of each
vertex's unfolded ancestry. The new title names the algebra.

Rename the notebook to notebooks/red-black-graphs.ipynb and give it a
title cell, an abstract, and title/author metadata. Reword the opening of
the introduction to match. Add the notes from the foundations document
that the notebook lacked: Strassen-style multiplication does not apply,
and the implementation gaps are tracked in #72-#76.

Update references in the README, the PDF scripts, the foundations
document, the Avos Algebraic Structure notebook and constants.py.
gen-latex.py now takes the title and author from notebook metadata and
drops the title cell, so the PDF heading is not duplicated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rappdw rappdw changed the title Formalize the avos semiring, update paper and README, remove dockerutils Formalize the avos semiring, retitle the paper, update README, remove dockerutils Nov 1, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Code Coverage

Package Line Rate Complexity Health
. 68% 0 ➖
core 93% 0 ✔
reference 98% 0 ✔
sparse 94% 0 ✔
sparse.csgraph 73% 0 ➖
types 100% 0 ✔
util 67% 0 ➖
Summary 76% (1554 / 2036) 0 ➖

Minimum allowed line rate is 65%

@rappdw
rappdw merged commit 93d650c into main Nov 1, 2026
6 checks passed
@rappdw
rappdw deleted the docs/math-foundations branch November 1, 2026 16:33
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.

(Research) Formalization of Math (Notebook) Utilize Ahnen number

1 participant