Skip to content
Merged
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/connector-chart-rank-distribution/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# The finite-field chart-repair rank enumerator

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

## Statement

Let F be a finite field of order q. Let B0,B1:V -> W be linear maps on the
same finite-dimensional source, with dim W=n. Write

```text
a = rank B0, b = rank B1, c = dim(row B0 intersect row B1).
```

For 0<=r<=n, let N_r count the charts R in GL(W) for which
rank(B1-R B0)=r. The row spaces are subspaces of V*. The source dimension
can be arbitrary, subject to a+b-c<=dim V. The answer depends only on
(q,n,a,b,c), not on the matrices' remaining entries or dim V.

Use the following conventions:

```text
G_q(d,k) = Gaussian binomial [d choose k]_q, or 0 if k<0 or k>d;
J_q(d,k) = product_(i=0..k-1) (q^d-q^i), or 0 if k<0 or k>d;
J_q(d,0) = 1;
gamma = J_q(n,n)/J_q(n,a).
```

For 0<=t<=n define

```text
F_t = sum_(h=0..c, 0<=j<=n-b)
G_q(c,h) G_q(n-b,j) q^((c-h)j+t(c-h)) J_q(t,a-c+h),
where j=t-b+c-h.
```

Define D_0=F_0 and successively

```text
D_t = F_t - sum_(r=0..t-1) G_q(n-r,t-r) D_r.
```

Then the complete chart counts are N_r=gamma D_r. In particular, if
s=min(a,b) and u=max(a,b), the exact fraction attaining the minimum repair
rank u-c is

```text
N_(u-c)/|GL_n(F)| = q^(c(u-c)) J_q(u-c,s-c) / J_q(n,s). (1)
```

The minimum-rank value itself is ywz65's #2680 theorem, which is cited,
not a new claim. The new result is the complete distribution and its
minimum-rank density. The proof below also explains each counting factor.
Empty dimensions and zero maps obey the same formulas.

## Normalize the source coordinates

Choose a basis of the intersection of the two row spaces, extend it
separately to bases of both row spaces, and then extend their union to V*.
Let the corresponding source coordinates be shared coordinates of dimension
c, B0-only coordinates of dimension a-c, B1-only coordinates of dimension
b-c, and unused coordinates. A basis change in W makes B1's nonzero columns
on its coordinates e1,...,eb.

As R varies, C=R B0 ranges over exactly the maps whose row space equals
row B0. Equivalently, its a potentially nonzero columns form an injective
map from F^a to W. There are J_q(n,a) such maps. Each occurs for exactly
gamma charts: after fixing the images of a independent vectors, extend their
images to an ordered basis in product_(i=a..n-1)(q^n-q^i) ways. Thus it
suffices to count C, and multiply the resulting counts by gamma.

Let E=span(e_(c+1),...,e_b), of dimension v=b-c, and let
B=span(e1,...,eb). The residual B1-C contains E in its image. Its remaining
columns are e_i-C_i for the shared coordinates and -C_i for the B0-only
coordinates.

## Count residual images contained in a t-space

Fix a t-dimensional T<=W. It can contain the residual image only if E<=T.
Put h=dim(T intersect B)-v and j=t-v-h. For such T, the number of choices is

```text
G_q(c,h) G_q(n-b,j) q^((c-h)j). (2)
```

To see this, pass to W/E and its distinguished c-dimensional subspace B/E.
Choose the h-dimensional intersection, choose the j-dimensional image in
W/B, and choose its lift modulo the intersection. These lifts are the
linear maps from a fixed j-space to a (c-h)-space, giving q^((c-h)j).
This standard subspace-intersection count uses no independence assumption
about random charts.

The condition im(B1-C)<=T prescribes C modulo T: shared coordinates map to
e_i mod T and B0-only coordinates map to zero. This prescribed quotient map
has rank c-h and kernel dimension a-c+h. An injective lift C must map that
kernel injectively into T, giving J_q(t,a-c+h) choices. On a fixed
complement of the kernel, each of the c-h basis vectors has q^t possible
lifts, independently. Their images are independent modulo T, so these
choices introduce no further injectivity condition. There are therefore

```text
q^(t(c-h)) J_q(t,a-c+h) (3)
```

injective lifts. Multiplying (2) and (3) and summing h gives F_t. Thus F_t
counts pairs (C,T) with C injective, dim T=t and im(B1-C)<=T.

## Recover the exact ranks

If im(B1-C) has dimension r, its t-dimensional superspaces are in bijection
with the (t-r)-subspaces of W/im(B1-C). Consequently

```text
F_t = sum_(r=0..t) D_r G_q(n-r,t-r), (4)
```

where D_r counts injective C with residual rank r. The diagonal coefficient
in this triangular system is one, so the displayed recurrence recovers
all D_r uniquely. The chart multiplicity gives N_r=gamma D_r. This proves
the full distribution for every finite field, including extension fields.

## Extract the minimum density

First assume a<=b. The residual contains E of dimension b-c. At t=b-c,
j=-h in the formula for F_t, so only h=0 is possible. Hence

```text
D_(b-c) = F_(b-c) = q^(c(b-c)) J_q(b-c,a-c).
```

No lower residual rank can occur because E is contained in every residual
image. Dividing by J_q(n,a) proves (1) when a<=b. For the other order, the
bijection R -> R^-1 preserves the residual rank after swapping B0 and B1:

```text
rank(B1-R B0) = rank(B0-R^-1 B1).
```

Apply the first case to the swapped maps. This also proves the symmetry of
the complete chart counts in a and b. There is no assertion that the
numbers of injective C, before multiplying by gamma, are symmetric.

## Worked exact example

Over F2 take dim W=3, dim V=3 and

```text
B0 = [[1,0,0], [0,1,0], [0,0,0]],
B1 = [[1,0,0], [0,0,1], [0,0,0]].
```

Here a=b=2,c=1. The containment counts are (0,2,30,42). Triangular
inversion gives D=(0,2,24,16), and gamma=4. Thus among all 168 invertible
charts the residual-rank histogram is

```text
rank 0 1 2 3
charts 0 8 96 64.
```

Exactly 1/21 of the charts have the minimum rank one. Equal map ranks by
themselves do not determine this distribution: with c=2 the same n,a,b
instead give (4,60,104,0). These are counts of charts, not distinct residual
maps, scalar circuit words, or physically legal native adapters.
126 changes: 126 additions & 0 deletions research/connector-chart-rank-distribution/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Count every finite-field connector chart repair rank

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

Claim type: scoped algebraic proof with finite corroboration. For fixed maps
B0,B1:V -> F_q^n, this package gives the complete histogram of
rank(B1-R B0) over R in GL_n(F_q). It depends only on the two ranks a,b,
their row-space intersection dimension c, n and q. A Gaussian-binomial
containment count followed by triangular inversion gives every coefficient.
[PROOF.md](PROOF.md) proves the formula over every finite field.

If s=min(a,b), u=max(a,b), and
J_q(d,k)=product_(i=0..k-1)(q^d-q^i), the exact fraction of charts attaining
the minimum rank u-c is

```text
q^(c(u-c)) J_q(u-c,s-c) / J_q(n,s).
```

The minimum rank is the cited result of ywz65's
[PR #2680](https://github.com/CrocSwap/integer-mult-bounds/pull/2680).
The new contribution counts the entire distribution and the density of its
minimizers. No predecessor executable or certificate is imported or replayed.

For q=2,n=3,a=b=2,c=1, the 168 charts have repair-rank histogram
`(0,8,96,64)` at ranks zero through three. Thus exactly 1/21 attain rank one.
With c=2 instead, the histogram is `(4,60,104,0)`. This distinguishes chart
multiplicity from the minimum-rank value and from distinct residual maps.

## Evidence and reproduction

The verifier computes the counting formula using integer arithmetic and
compares it with direct matrix subtraction, multiplication and elimination.
Its complete finite domains are:

- 110 canonical parameter cases over F2,F3,F4,F5, with every codomain
dimension through three for F2 and through two for the other fields.
Every feasible a,b,c occurs, and every invertible chart is enumerated.
These cases make 15,090 individual chart comparisons.
- All 4,096 pairs of binary two-by-three maps and all 6,561 pairs of ternary
two-by-two maps. The combined 10,657 arbitrary pairs make 339,504 chart
comparisons. The formula must give every histogram entry, rather than
only its first nonzero entry. These domains include some canonical cases.
- Six invalid-parameter controls and four mathematical controls cover
omitted inversion, omitted chart multiplicity, F4 arithmetic and the
exact minimum-density fixture. F4 is F2[t]/(t^2+t+1), not Z/4.

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

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

The direct marker is `PASS_CONNECTOR_CHART_RANK_DISTRIBUTION`.
Registered commands have separate 120-second limits. Another CPython 3.12
path can replace the local path. Both modes use explicit exceptions, and
both are read-only. Each stdout receipt binds all six package files with
SHA256. No receipt is handwritten or stored in the package. Provenance
pins authenticate historical source bytes, not predecessor mathematics.

## Scope and code constraints

The universal claim is the written counting proof. Finite execution
corroborates its declared domains; independent human and formal proof-kernel
review are unclaimed. The computational formula accepts prime powers
2<=q<=256 and 0<=n<=12. The written theorem has no such upper bounds.

The chart distribution is over the full general linear group. A restricted
native alphabet, chart synthesis cost, scalar work, physical producer,
restoration, storage, precision and a complete supplier invoice are outside
scope. These costs remain unknown. No particular selected caller is claimed
to need this statistic, and no downstream construction campaign follows.
No new kappa, selected-frontier change or complete multiplication theorem
is claimed. Selected scientific cold replay, Lean and Docker were not run.

All functions are below 60 physical lines, use direct calls and have no
recursion, generated code or external processes. Formula loops have at most
13 iterations per dimension. Field-order validation tries at most 255
divisors and eight divisions per selected divisor. Oracle matrices have at
most six rows/columns, enumerate at most 625 candidate charts at a time,
and retain at most 81 maps in the arbitrary-pair scan. The largest pair
scan has 6,561 iterations, each with at most 48 charts. Invalid field orders,
rank parameters and dimension overflow raise explicit errors. Warnings are
errors in both registered commands. No external static analyzer is required
or claimed.

Power of Ten rule 3 deviation: CPython and its standard library allocate
integers, tuples and elimination rows dynamically. The enforced formula
capacity and fixed oracle domains above bound live memory. Each comparison
releases its temporary matrices; only bounded collections and counters
persist. Both modes exercise the finite scans and capacity rejection. A
fixed-allocation port would be needed before native or long-lived use.

## Open next questions

1. For a named physical caller with a legal restricted chart alphabet, how
much of this minimum-rank density survives? Begin by specifying that
alphabet and its complete chart, injection and restoration prices. The
unrestricted distribution is a reference count, not a physical tariff.
2. Can one sample a minimum-rank chart uniformly without enumerating GL_n?
The injective-lift proof suggests a constructive sampler. An exact
uniformity proof and the actual caller's selection cost are still needed.
This package does not reserve or implement that extension.

## Credit and assignment

Credit ywz65 #2680 for the paid residual-rank interface and minimum theorem,
woklerx for the equal-kernel dirty-chart contract, and Ross Richardson #943
for the dirty-query and complete-call context. Gaussian coefficients,
subspace-intersection counting and triangular inversion are classical.
This is a new application and formula in that interface, with no claim of
literature-wide priority. All predecessor files and credit lines are unchanged.

The `connector-alphabet-change` card is explicitly changed to an algebraic
side result about chart multiplicity. It adds neither a connector operation
nor a favorable completed budget. The user's original-work restriction
supersedes the card's predecessor-replay example. Current selected-binding
orientation passed; it is metadata evidence only. Live claims, open PRs,
merged-PR searches and main README searches were used for overlap. The
cached helper covered 416 open PRs and 5,307 Discussion records, but sparse
local coverage omitted 7,622 notes. Targeted searches of all main READMEs
supplemented that cache; unpublished work and arbitrary diffs remain outside
coverage. Lack of a matching record does not establish novelty.
36 changes: 36 additions & 0 deletions research/connector-chart-rank-distribution/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"schema_version": 1,
"base_commit": "de5ec2e7a6074068452f45b1a191b5c72832df4a",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "581f8d87008354eb5b869f7ed9de1317ad837ce8",
"sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec",
"sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81"
},
{
"path": "research/connector-chart-rank-repair/README.md",
"usage": "provenance",
"git_blob": "298bf702a48b6ff2bf3d1e10035aa304ecb25546",
"sha256": "222d197d7ca6cebabc23af9c05db6dec813b7003f7b4bab83aac94dfcd26a745"
},
{
"path": "research/dirty-connector-chart-transport/README.md",
"usage": "provenance",
"git_blob": "2b161ebfccfc3867d3b6b74cc05c761ba1becfd2",
"sha256": "c3d8b2fcc3485e267e25efc260b37ed7a2e8a0bc7d20294e9c79f0792a253d67"
},
{
"path": "research/universal-connector-boundary/README.md",
"usage": "provenance",
"git_blob": "d277f7c5830b1f2bc42e1ff41ab86e7d7564929f",
"sha256": "23415f7829ab8d80a783142f10f7d31abbce84579362769984680af3df954476"
}
]
}
68 changes: 68 additions & 0 deletions research/connector-chart-rank-distribution/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"schema_version": 1,
"task_id": "connector-alphabet-change",
"priority_revision": 8,
"base_commit": "de5ec2e7a6074068452f45b1a191b5c72832df4a",
"original_card": {
"id": "connector-alphabet-change",
"question": "Does one explicit extension of the connector alphabet offer a favorable completed budget?",
"starting_points": [
"docs/research/research-family-status.md",
"research/universal-connector-boundary/README.md",
"certificates/selected-result.json"
],
"methods": [
"Construct and charge a legal extra operation on a minimal instance.",
"Prove a target-specific bound after adding one specified operation family."
],
"acceptance_gate": "State which fixed-alphabet premise changes and charge its implementation; do not declare it free. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.",
"first_step": {
"command": [
"python3",
"-B",
"research/universal-connector-boundary/verify.py"
],
"expected": "PASS_UNIVERSAL_CONNECTOR_BOUNDARY",
"inspect": "Reproduce the 945-pairing control, then read Exact interface to list the allowed calls.",
"scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay."
},
"first_experiment": "Add exactly one legally priced operation and test a tiny dirty-input instance before enumerating larger cases.",
"bottleneck_link": "A new legal connector operation could change recursive interface cost; a larger census in the same alphabet is a separate side result.",
"allowed_variations": [
"Choose one additional operation and a small source count for its first counterexample."
],
"scope_change_triggers": [
"Keeping the alphabet and only increasing the source count; record this as a changed assignment.",
"Extending a source-count census without naming a supplier/interface decision it could change; audit #2973 pruning concerns before relying on the affected predecessor exclusions."
],
"overlap_terms": [
"universal connector",
"source-toggle",
"connector alphabet"
]
},
"scope_status": "changed",
"actual_scope": "Complete finite-field distribution of rank(B1-R B0) over all invertible codomain charts, with exact minimum-rank density.",
"scope_change_reason": "Original successor counting theorem beyond ywz65 #2680; this is a side result, not an extension of the connector alphabet or a physical supplier.",
"bottleneck_link": "Counts the availability of low-rank paid chart repairs. A selected consumer and complete native costs remain unknown; no implementation campaign is started.",
"budget_minutes": 60,
"stop_rule": "Ship the first proved distribution after bounded matrix corroboration; do not extend to sampling or physical synthesis.",
"outcome": "completed",
"evidence": "PROOF.md proves the all-finite-field formula. verify.py compares 110 canonical cases and 10657 arbitrary map pairs against direct complete chart enumeration.",
"author": "Nick Petalas",
"ai_assistance": "Independent human and formal proof-kernel review are unclaimed.",
"open_questions": [
{
"question": "Determine the minimum repair-rank distribution in one named caller's restricted legal chart alphabet.",
"why_it_matters": "Full GL_n density does not price or guarantee native availability.",
"first_step": "Specify one physical caller, chart alphabet and complete prices.",
"blocked_by": "No concrete physical consumer is supplied."
},
{
"question": "Sample a minimum-rank chart exactly uniformly without enumerating GL_n.",
"why_it_matters": "A constructive sampler could make the counting proof usable for chart selection.",
"first_step": "Turn the injective-lift factorization into a sampler and prove its output law.",
"blocked_by": "Uniformity and physical selection costs are unproved."
}
]
}
Loading
Loading