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
203 changes: 203 additions & 0 deletions research/square-zero-tensor-error/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
# Exact ordinary tensor error of a square-zero border

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

## Statement and scope

All norms below are Euclidean operator norms on finite-dimensional complex
spaces. Let `D` be unitary, let `N^2=0`, and put

```text
C(e) = D (I + e N), sigma = ||N||, a = |e| sigma.
```

For every positive integer `k`, both errors

```text
||C(e)^(tensor k) - D^(tensor k)||,
||(C(e)^(-T))^(tensor k) - (D^(-T))^(tensor k)||
```

equal `F_k(a)`. Define the `(k+1)` by `(k+1)` real matrix `B_k(a)` by

```text
B[i,j] = a^(j-i) sqrt(binomial(j,i) binomial(k-i,j-i)) if 0 <= i < j <= k,
B[i,j] = 0 otherwise.
```

The exact spectral formula is

```text
F_k(a) = ||B_k(a)||.
```

Thus the error can be determined by a matrix of size `k+1`, independently
of the original dimension or rank of `N`. This is an exact finite spectral
formula, not a radical expression for its largest singular value. The case
`a=0` is zero throughout.

Write `gamma_k = sqrt(floor((k+1)^2/4))`. For every `a>=0`,

```text
max(a gamma_k, (1+a/2)^k - 1) <= F_k(a)
F_k(a) <= a gamma_k + ((1+a)^k - 1 - k a) <= (1+a)^k - 1.
```

In particular, the sharp first-order coefficient is

```text
lim_(a -> 0+) F_k(a)/a = gamma_k.
```

These are statements about ordinary tensor powers of completed matrices.
They do not identify the repository's chronological supplier product with
such a tensor power. No native invoice or multiplication exponent changes.

## 1. Reduce an arbitrary square-zero matrix to its largest shear

Since `im(N)` is contained in `ker(N)`, the orthogonal decomposition
`ker(N) + ker(N)^perp` writes `N` as a single off-diagonal block. Applying
the singular-value decomposition to that block gives mutually orthogonal
two-dimensional blocks

```text
[[0, sigma_j], [0, 0]],
```

and zero blocks. Each `sigma_j` is nonnegative and their maximum is `sigma`.
Unitary diagonal changes remove the phase of `e`. Therefore `I+eN` is
unitarily similar to a direct sum of shears `J(b)=[[1,b],[0,1]]`, with
`0<=b<=a`, and identity blocks. A block with `b=a` is present if `a>0`.

Its `k`th tensor power is the direct sum of tensor products of these
blocks. After subtracting identity, every such block has nonnegative
entries. Increasing any shear parameter increases entries. For real
nonnegative matrices, entrywise domination implies norm domination:
`|Mv| <= M|v| <= L|v|` when `0<=M<=L`, hence `||M||<=||L||`.
An identity block can be embedded into a two-dimensional zero-parameter
shear. Consequently the maximum is attained by `J(a)^(tensor k)-I`.

Left multiplication by the unitary `D^(tensor k)` does not change the
forward error. Also

```text
C(e)^(-T) = D^(-T) (I - e N^T).
```

Here `D^(-T)` is unitary, `(N^T)^2=0`, and `||N^T||=sigma`. The same
reduction proves equality of the two orientation errors. The analogous
inverse error has the same value as well, by right unitary multiplication.

## 2. Reduce the largest shear tensor to its symmetric subspace

Index the standard basis of `(C^2)^(tensor k)` by subsets of `{1,...,k}`.
For `M=J(a)^(tensor k)-I`,

```text
M[S,T] = a^(|T|-|S|) if S is a proper subset of T, and 0 otherwise.
```

Suppose `a>0`. The empty-set column is zero. On all nonempty columns,
`M^T M` is strictly positive, since their shared empty-set row contributes
`a^(|S|+|T|)>0`. The elementary positive-matrix eigenvector theorem gives a
unique positive unit eigenvector for its largest eigenvalue. Permutations
of the `k` coordinates commute with `M^T M`, so uniqueness makes that
eigenvector permutation invariant. It is constant on each subset level.
Thus the largest right singular vector belongs to the symmetric subspace.

Use the orthonormal level vectors which have value
`binomial(k,j)^(-1/2)` on subsets of size `j`, and zero elsewhere. For
a fixed size-`i` subset there are `binomial(k-i,j-i)` supersets of size `j`.
The matrix entry from level `j` to level `i<j` is therefore

```text
a^(j-i) binomial(k-i,j-i) sqrt(binomial(k,i)/binomial(k,j))
= a^(j-i) sqrt(binomial(j,i) binomial(k-i,j-i)).
```

This is `B_k(a)`. The symmetric subspace is invariant under `M`, and a
largest right singular vector lies there, proving the exact formula.

The finite verifier avoids square roots. In constant-on-level coordinates
it uses `A[i,j]=binomial(k-i,j-i)a^(j-i)` with weight
`W[i,i]=binomial(k,i)`. Its Gram operator is `W^(-1) A^T W A`, similar to
`B^T B`, and has rational entries for rational `a`.

## 3. Sharp coefficient and global bounds

The coefficient of `a` in `B_k(a)` has only its first superdiagonal
nonzero, with entries `sqrt((i+1)(k-i))`. Its singular norm is the maximum
of those entries. Maximizing the integer product gives `gamma_k`.
All remaining entries of `B_k(a)` are nonnegative, so entrywise norm
monotonicity gives the lower bound `a gamma_k`.

Expand `J(a)^(tensor k)-I` by nonempty sets of tensor positions. The
sum of the one-position terms has norm `a gamma_k`. Each product on
`r` positions has norm `a^r`, and there are `binomial(k,r)` such products.
The triangle inequality bounds the remainder by
`(1+a)^k-1-ka`. This proves the sharper upper bound and the first-order
limit. Since `gamma_k<=k`, the simpler upper bound follows.

For the second lower bound use the unit vector `v=(1,1)/sqrt(2)` in
each tensor factor. Its matrix coefficient for `J(a)` is `1+a/2`.
Taking its product matrix coefficient gives `(1+a/2)^k-1`.

For illustration, `F_1(a)=a`, whereas

```text
F_2(a) = a/2 * (sqrt(a^2+8)+a) > sqrt(2) a for a>0.
```

The strict inequality matters: the sharp first-order expression is not
an exact nonzero-parameter error formula.

## 4. A necessary precision budget, with a sufficient choice two bits away

Let `0<delta<=1` be the allowed operator error and `sigma>0`.
Necessarily `|e| sigma gamma_k <= delta`. The explicit sufficient choice

```text
|e| sigma <= delta/(2k)
```

works in both orientations. Indeed, with `x=ka<=delta/2<1`,

```text
(1+a)^k-1 <= sum_(r>=1) x^r = x/(1-x) <= delta.
```

For a dyadic parameter `e=2^(-p)`, `p` a nonnegative integer, this gives

```text
necessary p >= max(0, ceil(log2(sigma gamma_k/delta))),
sufficient p = max(0, ceil(log2(2k sigma/delta))).
```

The sufficient integer is at most two larger than the necessary lower
bound, because `2k/gamma_k<4`. In particular, the required parameter
precision grows as `log2(k)+log2(sigma/delta)+O(1)` when that quantity is
positive. Choosing a fixed nonzero parameter cannot maintain a fixed
error as `k` grows, already by the product-vector lower bound.

This pays only for endpoint approximation. It does not bound the large
coefficients of a singular scalar wrapper, errors inserted inside paid
calls, intermediate magnitudes, owned restoration, storage, movement or
the cost of producing this parameter. Those are separate obligations in
PR4623's global approximation question.

## Credit and limits

Dillon Amburgey's PR4623 poses the global approximation problem and gives
the finite linear-circuit error contract. Its distinction between ordinary
tensor endpoints and chronological supplier substitution is retained here.
Credit Cinna Davis, Jacob Alan Sussman, zxv and the retained native, caller,
compiler and precision lineage. Singular-value decomposition, symmetry on
the Boolean lattice and the positive-matrix eigenvector theorem are
classical. No literature-priority claim is made for those tools.

The new result is the exact square-zero tensor-error reduction, its sharp
all-k first-order constant and the resulting two-orientation precision
screen. The written proof is universal within these hypotheses; the
verifier supplies separate finite exact corroboration. No human or formal
proof-kernel acceptance, physical supplier or complete multiplication
theorem is claimed.
133 changes: 133 additions & 0 deletions research/square-zero-tensor-error/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Exact tensor error for square-zero borders

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

Claim type: scoped proof with exact finite corroboration. No new kappa.

For a unitary target `D` and relative error `N^2=0`, put
`C(e)=D(I+eN)` and `a=|e| ||N||`. The exact Euclidean error of every
ordinary tensor power, in both forward and inverse-transpose orientations,
is the norm of an explicit matrix of size `k+1`:

```text
F_k(a) = || B_k(a) ||
B[i,j] = a^(j-i) sqrt(binomial(j,i) binomial(k-i,j-i)), i<j
B[i,j] = 0, i>=j

lim_(a->0+) F_k(a)/a = sqrt(floor((k+1)^2/4)).
```

The reduction holds for every finite original dimension and every rank of
`N`. A rational weighted-coordinate version avoids all square roots in the
verifier. For `0<delta<=1`, the necessary condition
`|e| ||N|| sqrt(floor((k+1)^2/4)) <= delta` and sufficient choice
`|e| ||N|| <= delta/(2k)` give dyadic parameter budgets at most two bits
apart. The tensor count therefore requires an additional `log2(k)+O(1)`
parameter bits, rather than a fixed parameter choice. The exact finite
spectral formula, global bounds and all-k proof are in [PROOF.md](PROOF.md).

## Connection to the open problem

Dillon Amburgey's [PR4623](https://github.com/CrocSwap/integer-mult-bounds/pull/4623)
asks for a global complex approximation and recursive precision contract.
This result isolates its completed-endpoint question under a relative
square-zero hypothesis. The card scope is explicitly changed in
[TASK.json](TASK.json). The predecessor's circuit, budgets and finite
approximation lemma are cited premises, not audit deliverables.

Ordinary tensor powers do not establish chronological supplier substitution.
Applying this theorem to a recursive caller requires its actual owner map
and a proof of the relative square-zero hypothesis. Singular wrappers,
intermediate magnitudes, paid-call errors, restoration, physical storage and
movement remain unpriced here. General polynomial borders are outside the
theorem. The selected frontier is unchanged; no complete multiplication
theorem or independent human or proof-kernel acceptance is claimed.

The classical ingredients are singular-value decomposition, Boolean-lattice
symmetry and the positive-matrix eigenvector theorem. The contribution is
their exact square-zero tensor-error consequence and the sharp precision
screen, with no claim of literature priority for those ingredients.

## Reproduce

From the repository root, using CPython 3.12 and its standard library:

```sh
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/square-zero-tensor-error/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -O -W error -B research/square-zero-tensor-error/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/square-zero-tensor-error
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/square-zero-tensor-error --check-source-history
```

A reviewer may substitute another CPython 3.12 executable. Expected markers
are `PASS_SQUARE_ZERO_TENSOR_ERROR`, `PASS_REGISTERED_RESEARCH_PACKAGE` and
`PASS_RESEARCH_COMMIT_BYTES`. Default replay writes no files. The optional
`--receipt NEW_EXTERNAL_PATH` exclusively creates a generated receipt bound
to the package file hashes and recomputed finite result. No receipt is
handwritten or committed.

The finite verifier compares 21,840 literal tensor entries with a separately
written subset formula, 6,144 compressed action/Gram entries and 21,840
inverse-transpose entries. It also enumerates 2,080 first-order level terms,
192 exact precision choices and a 256-entry mixed rank-two tensor similarity.
Eleven controls cover a changed compression coefficient, missing identity
subtraction, invalid domains and false exact linearization. The all-k and
all-dimension claims rest on the written proof, not these finite counts.

Both commands have 60-second caps. Actual timings, environment and integrity
checks are recorded in [VALIDATION.md](VALIDATION.md). No selected supplier,
predecessor scientific replay, Lean or Docker suite is required or claimed.

## Bounded implementation

The verifier uses no recursion, dynamic evaluation, background work or third
party dependencies. Literal tensors have at most 64 rows in the registered
checks. Helpers enforce a 256-row capacity; the coefficient/precision loop
has 64 tensor counts. Functions stay below 60 physical lines. Preconditions
and scientific checks use explicit exceptions and remain active under `-O`.
Receipt output is restricted to an external path and refuses overwrites.

Power of Ten rule 3 has a managed-runtime deviation in `verify.py`.
CPython integers, fractions and lists allocate dynamically during these
finite exact checks, so allocation cannot be confined to initialization.
The scope is this offline verifier only. Fixed tensor/count domains and
matrix capacities bound live objects and integer expression sizes; normal
and optimized replay verify the controls. There is no persistent service or
unbounded input stream. A native fixed-storage implementation would be the
follow-up only if this checker were put on a constrained execution path.

Python has no compiler warning flags. Warning-strict execution and in-memory
syntax compilation are the applicable diagnostics here. This package changes
no shared CI or repository analysis configuration.

## Sources and overlap

[SOURCES.json](SOURCES.json) pins the original card, selected record and
PR4623 context at canonical main
`7c49fe32c55de02c2c873655c804b16e4c3fef0a`, priority revision 8.
Those files are provenance; no predecessor implementation is imported.
Credit Dillon Amburgey, Cinna Davis, Jacob Alan Sussman, zxv and the retained
native, compiler, caller and precision lineage.

The [advance claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19360690)
records the scope. Live PRs, recent handoffs, active Discussions, merged topic
searches and tracked main README terms were checked. The remote overlap
cache reported complete pagination; its sparse local corpus covered 102 of
8,917 note records. Missing local notes are not evidence of novelty.
Unpublished work and arbitrary historical diffs remain coverage limits.

PR4828 and PR4829 give sharp component shear/port conditioning constants.
They do not compute the error of tensoring a completed shear and subtracting
identity. PR5021 prices errors inserted at ordered paid-call boundaries,
whereas this theorem concerns completed matrix endpoints.

## Open next questions

1. Can an actual legally flattened caller meet the relative square-zero
hypothesis? First provide its source-bound owner map and prove the
relative error squares to zero. Chronological compatibility and restored
independent productive outputs are the blockers to applying this result.
2. Can this endpoint choice fit one complete intermediate-error and wrapper
budget? First bind actual subword norms and additive paid-call errors,
then apply one global finite-circuit budget. The physical caller, scalar
wrappers and numerical oracle contract are absent here.
30 changes: 30 additions & 0 deletions research/square-zero-tensor-error/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"schema_version": 1,
"base_commit": "7c49fe32c55de02c2c873655c804b16e4c3fef0a",
"files": [
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec",
"sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81"
},
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "d59b5035e7b4cbaa9d688a1d32dd0d6eb79c466a",
"sha256": "9b8d0eea95b3bf0dfcb7938a732a6439b87a2685dec2a5ab9e525b3b34debbfa"
},
{
"path": "research/controller-border-interface/README.md",
"usage": "provenance",
"git_blob": "bd5e9c454368fbabb5329daee02ab4585cd98b53",
"sha256": "7923f5b136f281c8a5914d5b77e64c6ad7c110586486dea0f79902701bbab039"
},
{
"path": "research/controller-border-interface/EXACTIFICATION.md",
"usage": "provenance",
"git_blob": "94afb13ae20473f423651e8ff840de508dd339e2",
"sha256": "c11fbd09d6874eeb27f93e403a829fea8378c73b58089e614f458d6c043981d5"
}
]
}
Loading