Skip to content

Algernon: instruction algebra, cyclic sheaf obstructions and sparse repair - #40

Merged
patrickdugan merged 6 commits into
mainfrom
research/algernon-algebraic-machine-20261104
Nov 4, 2026
Merged

patrickdugan merged 6 commits into
mainfrom
research/algernon-algebraic-machine-20261104

Conversation

@patrickdugan

Copy link
Copy Markdown
Contributor

Scope

Adds research/algernon/algebraic_machine/ with an executable mathematical counterpart to the LOTUS↔Circuit-Mirror project.

  • Lean 4: standalone proof module for generator-level → word-level semiconjugacy, quotient congruence, latent-period projection and invariant-subset iteration; pinned Lean v4.28.0. CI must kernel-check before proof status is marked verified.
  • Finite instruction algebra: constructed hidden-state lift, exhaustive word checks, explicit corrupted-transition control.
  • Cyclic cellular sheaf: coboundary maps over small prime fields, affine global-state obstruction, H0/H1 versus monodromy, twisted cycles and change-of-basis checks.
  • Sparse intertwining: first-order support-constrained optimal least-squares repair, random/orthogonal support control.
  • Depth error: verified L1 telescoping error bound for column-stochastic transition maps.
  • Reproducibility: 16 CPU unit tests and frozen JSON reference receipt, separate Python/Lean GitHub Actions jobs.

Local CPU evidence

  • 16/16 unit tests passed.
  • 10,206 finite program checks, 0 violations.
  • 503 scalar three-cycle sheaf cases, 0 rank mismatches.
  • One norm-3 defect exactly repaired by an aligned rank-one direction; orthogonal direction leaves residual 3.
  • Deterministic receipt SHA256 70ea47965a06e56ff4ba31a5a800ec5362ed8cb47510d1cb096162ca72a6dc47.

Boundary

No LOTUS activations, trained model, Circom compilation, Qwenputer in-weight execution, or neural weight patch were performed. The Lean source is an unverified candidate until the Lean job passes.

CI gates

  • Python unit tests, reference receipt match
  • Lean compilation and axiom dependency output
  • Reviewed commit merge to main once gates pass

Comment on lines +15 to +39
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install NumPy
run: python -m pip install -r research/algernon/algebraic_machine/requirements.txt
- name: Unit tests
run: python -m unittest discover -s research/algernon/algebraic_machine/tests -v
- name: Reproduce frozen finite-field and monoid receipt
run: |
python -m research.algernon.algebraic_machine.experiments --out /tmp/algernon-algebra-reference.json
python - <<'PY'
import json
from pathlib import Path
expected=json.loads(Path('research/algernon/algebraic_machine/results/reference.json').read_text())
observed=json.loads(Path('/tmp/algernon-algebra-reference.json').read_text())
assert observed==expected, 'algebraic reference experiment drifted'
assert observed['monoid']['program_violations']==0
assert observed['cyclic_sheaf']['monodromy_dim_mismatches']==0
print('Reproduced exact deterministic reference')
PY

lean-kernel:
Comment on lines +40 to +53
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lean 4 standalone proofs
uses: leanprover/lean-action@v1
with:
lake-package-directory: research/algernon/algebraic_machine/lean
auto-config: false
build: true
test: false
use-mathlib-cache: false
- name: Print Lean theorem axiom dependencies
working-directory: research/algernon/algebraic_machine/lean
run: lake env lean Algernon/Semiconjugacy.lean
@patrickdugan
patrickdugan merged commit 9ce00f9 into main Nov 4, 2026
8 checks passed
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.

2 participants