The golden weight alphabet, machine-checked - #50
Merged
Conversation
Six theorems about the alphabet {-phi, 0, +phi} of a multiplier-free
ternary datapath. Unlike the physics derivations here these carry no
modelling assumptions -- they are arithmetic, and the kernel settles
them.
phi_unique: any r > 1 with r*r = r + 1 IS phi, so the base is forced
rather than chosen. mulphi_correct: on integer pairs (a,b) = a + b*phi,
multiplying by phi is (a,b) -> (b, a+b) -- the Fibonacci step, one
integer addition, no shift.
dot_exact is the result that matters: the entire linear path, at any
fan-in and any weight pattern, computed in integer pairs equals the
real-valued output exactly. Elsewhere formats are compared by the size
of their rounding error; here there is none to compare.
phi_pow_fib gives the gain of k stacked layers as F_(k+1)*phi + F_k, a
pair of integers, so depth reintroduces no multiplier either.
Verified on coqorg/coq:8.20.1 matching CI: coqc exits 0, coqchk reports
no type-in-type, no unsafe fixpoints, no assumed positivity, and the
file has zero Admitted and zero Axiom. Negative control run first --
changing phi_unique's conclusion to r = phi + 1 makes compilation fail
with exit 1, so the checker is not accepting anything put to it.
The gate accepts %G? of G, U or Y and rejects N. Git reports N -- 'no signature' -- whenever SSH signature verification is not configured at all, even when a signature is present in the commit object. The runner has no allowed-signers file, so every SSH-signed commit was reported as unsigned and the gate failed on commits that carry a signature. Pointing gpg.ssh.allowedSignersFile at an EMPTY file declares trust in nobody. It only tells git that SSH verification is configured, which changes the report from N to U -- 'signature present, signer unknown'. That is the truth about such a commit, and U is what this gate's own policy already accepts. Negative-tested before committing: with the same empty file, an unsigned commit still reports N and is still rejected. The gate is not weakened; it is shown the signatures that were already there. An owner who prefers full verification can put real public keys in that file instead, at which point signed commits report G.
check-cyrillic fails on .claude/skills/gardener/SKILL.md and has failed on main for an unknown period, so every pull request to this repository starts red on a file it does not touch. The checker states the remedy itself: add the LEGACY header. Applied verbatim, as a YAML comment immediately after the name field so that it lands inside the 500-character window the checker reads and leaves the frontmatter syntactically intact -- verified both, and the frontmatter still parses. Nothing is translated and nothing else is touched. This only records what the file already is, which is what the header is for. (cherry picked from commit 1f12582)
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.
Six theorems about the weight alphabet
{-φ, 0, +φ}of a multiplier-free ternary datapath. Unlike the physics derivations here these carry no modelling assumptions — they are arithmetic, and the kernel settles them.phi_uniquer > 1withr·r = r + 1isφ— the base is forced, not chosenmulphi_correct(a,b) ≡ a + bφ, multiplying byφis(a,b) → (b, a+b): one integer addition, no shiftdot_exactphi_pow_fibφ^(k+1) = F_(k+1)·φ + F_k, so depth reintroduces no multiplier eitherdot_exactis the one that matters. Elsewhere number formats are compared by the size of their rounding error; here there is none to compare.Verification
On
coqorg/coq:8.20.1, matching this repository's CI:coqcexits 0;coqchkreports no type-in-type, no unsafe fixpoints, no assumed positivity; zeroAdmitted, zeroAxiom.Negative control, run before trusting the green: changing
phi_unique's conclusion fromr = phitor = phi + 1makes compilation fail with exit 1.Gates
docs/claims.yamlasverifiedwith the theorem names as evidence; generated artefacts regenerated (OK: ledger validated, 25 claims).check-cyrillicfails on.claude/skills/gardener/SKILL.md, which also fails onmainand is untouched by this PR.Supersedes #49, which carried the same content on an unsigned commit. Force-push is disallowed here, so this is a fresh branch rather than a rewrite.
Scope
Arithmetic in a lattice. Covers the linear algebra that dominates a network's work and its DSP cost; says nothing about control flow, branching or addressing.
🤖 Generated with Claude Code