Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 163 additions & 0 deletions research/two-axis-monomial-geodesics/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# Exact two-axis record distances

## Model and statement

An address is x=(x0,x1) in F2^2, ordered by x0+2x1. Retain the
affine-quadratic monomial normal form of Cao Yifan / intqwq #4610:

```text
U |x> = i^(a+c0*x0+c1*x1+2*q*x0*x1) |A*x+b>,
A in GL(2,F2), b in F2^2, a,c0,c1 in Z/4, q in F2.
```

Each of the following eight directed records has cost one:

```text
C01: x1 <- x1+x0 C10: x0 <- x0+x1
X0: x0 <- x0+1 X1: x1 <- x1+1
S0: multiply by i^x0 S1: multiply by i^x1
CZ: multiply by (-1)^(x0*x1)
omega: multiply by i.
```

Every exponent uses the current address. Words below are chronological,
with the leftmost record executed first. In particular S_j^-1 and
omega^-1 each require three unit records; they are not additional
cost-one generators. All absolute phases are retained.

**Finite certificate theorem.** This directed Cayley graph has 3,072
vertices and diameter eight. Its numbers of vertices at distances zero
through eight from identity are

```text
1, 8, 42, 162, 467, 884, 940, 475, 93.
```

The n=2 extremizer of unpaidmoon #7286 has exact distance six, attained by

```text
C01, X1, C10, S1, omega, omega.
```

This answers its first open question negatively at the requested first
example: sixteen is the length of that elimination, not a lower bound on
all recipes. The claims of shortestness and diameter use the exhaustive
certificate checks below. They are not a proof-kernel formalization.

## Complete and unique inventory

There are six binary invertible two-by-two matrices, because their rows
are distinct members of {01,10,11}. There are four translations and
4*4*4*2=128 phase choices, giving 6*4*128=3,072 normal forms.
They are distinct as literal monomials. The four output addresses
recover b and both columns of A. If p(x) is the phase exponent, then

```text
a = p(0), c0 = p(e0)-p(0), c1 = p(e1)-p(0),
2q = p(e0+e1)-p(e0)-p(e1)+p(0) modulo 4.
```

Thus these evaluations recover every phase parameter too. The independent
checker enumerates exactly this Cartesian product and checks 3,072 distinct
literal actions. Its closed-form polynomial gate updates are checked on
all four addresses of every normal form for every one of the eight gates.
This accounts for all 24,576 labeled edges, including loops or repeated
endpoints if any occur; no assumed group presentation substitutes for an
edge check. The enumeration and edge closure bind the computational domain
to the stated group. The primary search reaches every member.

For example, an affine bit y=b+u*x0+v*x1 over F2 has the Z/4 polynomial

```text
y = b+(1-2b)*(u*x0+v*x1-2*u*v*x0*x1).
```

This gives the S updates. For CZ, expand 2*y0*y1 using arithmetic in F2
inside the product, and reduce x_j^2 to x_j. CNOT and X only change A,b.
These formulas are implemented independently of the primary basis-action
updates. Gate matrices are also stored literally in the independent check.

## The distance certificate

Code each monomial as eight decimal digits: its four output addresses
followed by its four exponents, in the above address order. A certificate
assigns an integer d(v) between zero and eight to every code. The checker
verifies all of the following:

1. The inventory equals the complete normal-form inventory.
2. Identity has label zero, and it is the only zero label.
3. Every labeled edge u -> v satisfies d(v) <= d(u)+1.
4. Every nonidentity v has an incoming edge u -> v with d(u)=d(v)-1.

For any length-L word from identity to v, condition 3 telescopes to
d(v)<=L. Condition 4 repeatedly decreases a nonnegative integer until
the unique zero vertex is reached. Reversing these incoming edges gives
a word of length d(v). Hence d(v) is the exact directed distance. The
maximum label is therefore the diameter.
Right multiplication preserves every left-generator edge, so the maximum
distance from identity is also the maximum over all ordered vertex pairs.

The primary program builds the labels by literal-action breadth-first
search and replays an attaining shortest word for every vertex. The
independent program can consume the exported table, or generate its own
labels by eight bounded normal-form layers before checking the conditions.
Both report the same SHA256 of the sorted complete table. The proof uses
the edge and predecessor checks, rather than trusting the search algorithm
to establish optimality. Three modified certificates must fail, with their
specific rejection reasons checked.

## Explicit attaining words

The six-record word has output

```text
(x1+1, x0+x1+1)
```

over F2. Its exponent is

```text
2+(1-(x0 xor x1)) = 3-x0-x1+2*x0*x1 modulo 4.
```

Consequently it is precisely the #7286 witness with

```text
A = [[0,1],[1,1]], b=(1,1), a=c0=c1=3, q=1.
```

Its literal code is 31023223 and its certified distance is six. This
hand calculation establishes the claimed identity without running the
predecessor's elimination.

A diameter witness has code 02133322 and normal form

```text
U |x0,x1> = i^(3+3*x1) |x1,x0>.
```

It is attained by

```text
C01, C10, C01, X0, S0, X0, omega, omega.
```

The first three records swap the bits. The X0,S0,X0 block contributes
1-x1 to the phase and restores the output address. The final two records
add two. Its certified distance is eight. There are 93 distance-eight
elements in the complete census.

## Boundary of the conclusion

This is a one-column optimum in exactly the eight-record alphabet, with
absolute phase and unit record prices. If a physical API prices inverse
phases as one record, identifies global phases, permits extra axes or
dirty workspace, or adds other gates, this distance theorem does not
apply to that different optimization problem. Tensor-lifting the displayed
identities gives equal operators at every positive column count, but
shortestness at larger column counts is not claimed. For example scalar
phases can disappear under an even tensor power.

The retained physical movement, restoration and tape hypotheses still
govern implementation of the records. This package supplies no physical
caller, new kappa, uniform n-axis optimum or multiplication theorem.
150 changes: 150 additions & 0 deletions research/two-axis-monomial-geodesics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
# Two-axis monomials need at most eight elementary records

**Exact finite certificate. No new kappa.** In the selected two-axis
affine-quadratic monomial alphabet, the directed diameter is exactly eight.
The particular monomial taking sixteen records under unpaidmoon's
[PR #7286](https://github.com/CrocSwap/integer-mult-bounds/pull/7286)
elimination has a shortest recipe of six records:

```text
C01, X1, C10, S1, omega, omega.
```

This contribution was produced by Nick Petalas. Apache-2.0.

## Result and exact alphabet

An address is (x0,x1), numbered x0+2*x1. C01 adds bit 0 to bit 1;
C10 adds bit 1 to bit 0. Xj flips bit j, Sj multiplies by i^xj, CZ
multiplies by (-1)^(x0*x1), and omega multiplies by i. Each record costs
one. Words execute left to right. S inverses and omega inverse each
cost three records. No absolute phase is discarded.

The finite group consists of all

```text
|x> -> i^(a+c0*x0+c1*x1+2*q*x0*x1) |A*x+b>,
A in GL(2,F2), b in F2^2, a,c0,c1 in Z/4, q in F2.
```

There are 3,072 distinct elements. The complete distance census is

| Distance | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|---|
| Elements | 1 | 8 | 42 | 162 | 467 | 884 | 940 | 475 | 93 |

The six-record word has exactly the predecessor's witness parameters
`A=[[0,1],[1,1]], b=(1,1), a=c0=c1=3, q=1`. Its certified shortest
distance is six. A diameter witness is

```text
|x0,x1> -> i^(3+3*x1) |x1,x0>,
C01, C10, C01, X0, S0, X0, omega, omega.
```

[PROOF.md](PROOF.md) defines the finite certificate theorem and proves why
its exhaustive checks establish shortestness. It also derives both words
by hand. The predecessor's exact elimination count remains a cited result;
none of its scientific code is imported or replayed.

## Verification and reproduction

From the worktree root, CPython 3.12 and its standard library suffice:

```sh
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/two-axis-monomial-geodesics/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/two-axis-monomial-geodesics/independent_check.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/two-axis-monomial-geodesics
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/two-axis-monomial-geodesics --check-source-history
```

Another CPython 3.12 executable may replace the local path. VERIFY.json
registers both scientific commands in warning-strict normal and optimized
modes, each with a sixty-second limit. Default runs write nothing.

The primary checker uses literal actions on four basis addresses. It
enumerates 3,072 states and 24,576 labeled transitions, then replays a
shortest word for every state. It includes four endpoint-changing controls
and two exact-reason domain rejections. The separate checker uses binary
matrix and phase-polynomial parameters, generates the full normal-form
inventory and checks every polynomial transition against literal gate
matrices. Distance inequalities on every edge and a decreasing predecessor
for every nonidentity certify optimality. Three damaged certificates and
one unavailable inverse gate must be rejected.

Both programs print generated receipts binding all seven package files and
the same sorted distance table. Its canonical SHA256 is
`4aec51eef32c395d364567018d10626bc96fe507b0591fa312ef3c3688ce1d4c`.
All four registered commands passed locally on CPython 3.12.15; the primary
checks took 0.045 and 0.047 seconds, and the separate checks each took
0.153 seconds. These are checker durations, not a runtime speedup claim.
The table can be exported outside the checkout and checked independently:

```sh
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B research/two-axis-monomial-geodesics/verify.py --write-certificate /fresh/output/DISTANCES.json
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B research/two-axis-monomial-geodesics/independent_check.py --certificate /fresh/output/DISTANCES.json
```

The directory must exist; export refuses to overwrite an existing file.
Receipts are generated at execution, not hand-written or committed. The
normal-form checker does not import the primary program or any predecessor
module. These are separate implementations, not independent human review.

## Scope, sources and limits

This answers the n=2 first working example in Open next question 1 of
unpaidmoon #7286, head `a51fb99e3cf11c32d7318bd12c35f6d08e07927e`.
It does not alter or audit that pending package. The selected alphabet and
normal form are pinned through Cao Yifan / intqwq #4610's retained
[specialization](../final4610-independent-admission/SPECIALIZATION.md).
Its physical/compiler/native predecessors retain their credit. Classical
finite-group enumeration and shortest-path certificates are not new methods;
the exact synthesis distances and attaining words are the contribution.

The formal-interface-lemma card changes scope to this finite synthesis
side result. Canonical base is `e54523517d0f03e58352e647c403a5af3e525a57`,
priority revision 8, selected #7000. Its source-binding orientation passed;
that is not a selected construction replay. The advance
[claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19592092)
records the bounded question. Live open PRs, recent claims, local locks,
merged-PR searches and main-tree searches were checked before claiming.
These searches do not cover unpublished work or prove universal novelty.

The result is for one column, two axes and exactly the eight unit-price
directed records. More axes, extra workspace, a different phase price,
projective equality or a different gate set may shorten recipes. The
operator identities tensor-lift, but shortestness at other column counts
is unclaimed. No physical tape saving, source-word installation, new
supplier, selected-frontier change, uniform all-n optimum or complete
multiplication theorem is established. Independent human and formal
proof-kernel review are unclaimed. No Lean, Docker or selected cold replay
is run; all five inherited assumptions retain their status.

## Open next questions

- Can two-axis geodesics replace explicit local subwords in one actual
selected normalizer? First find one literal contiguous subword, compare
its complete endpoint and retain all restoration and record prices.
This package does not search or install such substitutions.
- What is the three-axis directed diameter in the same alphabet? First
design a certified reduction or bounded enumeration of that larger
group. The present certificate gives no all-n diameter formula.

## Implementation bounds

Each group inventory contains 3,072 states. Every search is bounded by
3,072 state removals or eight layers, with eight generators per state.
An independent potential check visits exactly 24,576 labeled transitions;
failed-certificate controls may stop early. Each basis action has four
entries. Functions are below sixty lines. Explicit exceptions preserve
checks under -O; normal and optimized warning-strict commands are registered.
No runtime Git, network, subprocess, recursion or dynamic code evaluation
is used. Optional certificate input is a regular file capped at one MB.
Receipt reads cover seven regular files of at most one MB each.

Power of Ten rule 3 has a managed-runtime deviation: CPython dynamically
allocates bounded integers, tuples, dictionaries and sets. The fixed group
and file bounds limit live state; fixed-buffer allocation is not claimed.
Rule 9 has a bounded callback deviation for two rejection controls. Their
only targets are the named local step and word evaluator, with no external
dispatch. No repository-wide analyzer configuration is changed.
24 changes: 24 additions & 0 deletions research/two-axis-monomial-geodesics/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"schema_version": 1,
"base_commit": "e54523517d0f03e58352e647c403a5af3e525a57",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8",
"sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec",
"sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81"
},
{
"path": "research/final4610-independent-admission/SPECIALIZATION.md",
"usage": "provenance",
"git_blob": "7ee84b30892f7354e1c36611f1a5e9b082dc6147",
"sha256": "70430114f744108223bc1d44b98bc25b696c4b408b7b044c2a8bbdfdb434ac5c"
}
]
}
Loading
Loading