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
177 changes: 177 additions & 0 deletions research/direct-flow-leaf-tariff/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# The power-tariff transition of the fixed direct-flow leaves

## Statement and inherited inputs

This is a scoped proof about the historical raw-p7 leaf measure. It does not
establish a complete multiplication theorem, a full-flow invoice or a new κ.
The leaf model and inventory are Ryanson Jonathan / pinterbanget's
[PR #4467](https://github.com/CrocSwap/integer-mult-bounds/pull/4467).
DLamdata's [PR #6118](https://github.com/CrocSwap/integer-mult-bounds/pull/6118),
at `6310550e932de70243fc2aaab6f4885688b6fe21`, proves saturation of its
conditional log-deficit. We use its tilted nonlattice local-limit framework as
a cited mathematical input, without replaying its certificate or claiming its
source-law derivation as new work. The new result is the complete real-power
moment asymptotic, including its critical and divergent regimes.

Let

```
P = {1:37305, 2:10695, 3:3360, 4:1530, 5:300,
8:1464, 16:448, 32:448, 48:448}, m = 121,
Z(s) = sum_r P[r] r^s, mu(s) = (log Z)'(s),
a = log 5, mu(alpha) = a,
lambda = t-alpha > 0, sigma^2 = (log Z)''(alpha).
```

The theorem holds for **every fixed real t > alpha**. Its intended application
uses the raw-p7 crossing exponent `t` of #4467/#6118. We inherit, rather than
recertify, #6118's numerical identification of that exponent. No numerical root
or onset estimate is needed for the result below. Since `P` has positive mass
at 1 and 48, `mu` is strictly increasing from 0 to log48; hence alpha exists
uniquely and sigma is positive. The support contains 1, 2 and 3, so the log-rank
law is nonlattice, as in #6118.

For each fixed integer `G >= 0` and real `delta in [0,a]`, put
`N=m exp(Ga+delta)` and define the fixed-depth leaf measure below. At the closed
endpoint `delta=a`, **keep this G**: this is a fixed-depth extension, not a
recalculation of the floor. For actual integer ranks `N >= m`, instead select
`G=floor(log_5(N/m))` and `delta=log(N/m)-Ga in [0,a)`; that selects the original
leaf model from this family. Let `c_G(rho)` be the weighted count
of ordered G-tuples of paid ranks with product rho, retaining `m*rho <= N`.
Each tuple has weight the product of its P multiplicities. The leaf multiset
has `c_G(rho)*P[r]` leaves at rank `ell=r*rho`, using **every** terminal r,
without truncating the terminal rank again. This is the inherited #4467 leaf
model, separated from the other exit components by #6118.

For any fixed real shift u, define its normalized power tariff

```
M_G(u,delta) = sum_ell L_N(ell) ell^(t+u)
/ (N^u sum_ell L_N(ell) ell^t),
A(u) = m^(-u) Z(t+u)/Z(t), v = lambda+u.
```

**Theorem.** Uniformly over `delta in [0,a]` (and therefore along every integer
rank sequence as `G -> infinity`), the following three regimes hold:

1. If `v > 0`, then

`M_G(u,delta) -> A(u) lambda/v`.

2. If `v = 0`, then

`M_G(u,delta) ~ A(u) lambda sigma sqrt(pi/2) sqrt(G)`.

3. If `v < 0`, put

`R(u) = [Z(t+u)/Z(alpha)] exp(-v a)`.

Then `R(u)>1` and

`M_G(u,delta) ~ A(u) lambda sigma sqrt(2*pi*G) exp(-v delta) R(u)^G`.

Here `~` means the ratio tends to one, uniformly in delta. The exponent
threshold is exactly `t+u=alpha`. The boundary offset disappears from the first
two leading terms but survives in the third.

## 1. Exact finite identity

Give each prefix step the probability `p_s(r)=P[r]r^s/Z(s)`. Set
`S_G=sum_i log R_i`, `B=Ga+delta`, and `Y=B-S_G`. Expectations `E_s` refer to
independent prefix steps with law p_s. The independent, untruncated terminal
step has law p_t. Weighting the leaf multiset by ell^t therefore gives exactly

`M_G(u,delta) = A(u) E_t[exp(-uY) | S_G <= B]`. (1)

For any real v define the finite quantity

`J_G(v,delta)=E_alpha[exp(-vY) 1_{Y>=0}]`.

Changing the prefix measure from t to alpha in numerator and denominator of
(1) cancels `(Z(alpha)/Z(t))^G exp(lambda B)`. Thus, for every finite G,

`M_G(u,delta) = A(u) J_G(lambda+u,delta)/J_G(lambda,delta)`. (2)

The denominator is positive because the all-ones prefix is admissible. In
particular `M_G(0,delta)=1` exactly. No asymptotic interchange or extra terminal
barrier occurs in (1) or (2).

## 2. Positive tilt

We use the following standard consequence of the nonlattice interval local
limit theorem, in the precise form used in #6118 §§3–4:

`J_G(w,delta) ~ 1/[w sigma sqrt(2*pi*G)]`, for each fixed w>0. (3)

For clarity, the inputs to (3) are explicit. Under p_alpha, the centered
variable `log R-a` has zero mean, positive finite variance sigma^2 and a
nonlattice law. The uniform interval local limit theorem gives convergence of
the scaled measure near any bounded delta to Lebesgue measure divided by
`sigma sqrt(2*pi)`. It also bounds the scaled probability of every unit interval
by a constant. Integrating exp(-w y) on y>=0 follows by compact step-function
approximation and the summable tail `sum_{j>=J} exp(-w j)`. Atoms at the barrier
are negligible by the same interval theorem with arbitrarily small fixed
interval width. These facts give uniformity in bounded delta and the constant
`integral_0^infinity exp(-wy)dy=1/w`.

This use requires no strong nonlattice condition and claims no convergence
rate. The classical input is C. Stone, *A local limit theorem for nonlattice
multi-dimensional distribution functions*, Ann. Math. Statist. 36 (1965),
546–551, Corollary 1, equation (7):
[DOI](https://doi.org/10.1214/aoms/1177700165). We cite the source-relative
specialization in #6118; we do not assert an independent audit of that paper.

Apply (3) at w=lambda and w=v>0 in (2). Their ratio tends to lambda/v,
proving regime 1. Weak convergence to the exponential law alone would not
justify its negative-u part: (3) supplies the necessary tail control.

## 3. The critical tilt

When v=0, `J_G(0,delta)=P_alpha(S_G<=Ga+delta)`. The ordinary central limit
theorem gives

`J_G(0,delta) -> 1/2` (4)

uniformly in bounded delta. Indeed the standardized endpoint is
`delta/(sigma sqrt(G)) -> 0` uniformly, and the normal distribution is
continuous at zero. Divide (4) by (3) at w=lambda in (2). The resulting
constant is `A(u) lambda sigma sqrt(2*pi)/2`, giving regime 2.

## 4. Below the critical exponent

For v<0 put beta=alpha+v=t+u. A second exact change of measure gives

`J_G(v,delta) = exp(-v delta) R(u)^G P_beta(S_G<=Ga+delta)`. (5)

The signs and offset in (5) follow directly from
`p_beta(tuple)/p_alpha(tuple)=(Z(alpha)/Z(beta))^G exp(v S_G)`.
Since beta<alpha and mu is strictly increasing, `mu(beta)<a`. The weak law of
large numbers gives `P_beta(S_G<=Ga+delta)->1`, uniformly for delta in [0,a].
For example, the complementary event is contained in `S_G/G>a`, whose
probability is at most `Var_beta(log R)/(G(a-mu(beta))^2)` by Chebyshev.
Strict convexity of log Z gives

`log R(u)=log Z(beta)-log Z(alpha)-(beta-alpha)a > 0`.

Divide (5) by (3) at w=lambda in (2) to obtain regime 3.

## 5. Consequence and scope

The normalized leaf tariff has a finite limit precisely when `t+u>alpha`;
it grows as sqrt(G) at equality and exponentially in G below it. Thus a finite
mean log-depth does not authorize substituting an arbitrary power tariff or
exchanging that tariff with the limiting exponential law. The finite limit
above the threshold is explicit, including the independent terminal-rank
factor `Z(t+u)/Z(t)`.

This settles the leaf component only. Relative source, boundary and leaf
masses, their joint normalization, a total refined-induction ceiling, explicit
finite-depth error bounds, physical delivery and every supplier-admission
obligation remain open. The fixed historical raw-p7 law is not the selected
#6030 invoice. Neither the three regimes nor their finite checks change κ.

New proof produced by Nick Petalas. Credit DLamdata (#6118) for the saturation
framework; Ryanson Jonathan / pinterbanget (#4467/#4465/#4459) for the leaf law
and diagnostics; zxv (#4436) for the direct flow; Cinna Davis / 1337isnot1337
(#4405) for refined induction; Jacob Alan Sussman for the lockstep compiler;
and Stone for the classical local limit theorem. Apache-2.0.
109 changes: 109 additions & 0 deletions research/direct-flow-leaf-tariff/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Exact power-tariff asymptotics for direct-flow leaves

Scoped proof produced by Nick Petalas. No new κ.

For the fixed historical raw-p7 leaf measure of Ryanson Jonathan's
[PR #4467](https://github.com/CrocSwap/integer-mult-bounds/pull/4467), this
package derives the full power-tariff asymptotic from the tilted local-limit
framework in DLamdata's
[PR #6118](https://github.com/CrocSwap/integer-mult-bounds/pull/6118)
(`6310550e932de70243fc2aaab6f4885688b6fe21`). This extends that saturation
result; its certificate is not rerun or audited here.

Write `Z(s)=sum_r P[r]r^s`, `a=log5`, `mu(alpha)=a`, `lambda=t-alpha>0`,
`sigma^2=(log Z)''(alpha)`, and `N=121 exp(Ga+delta)`. Define

```
M_G(u,delta) = sum_leaves ell^(t+u) / (N^u sum_leaves ell^t),
A(u) = 121^(-u) Z(t+u)/Z(t), v=lambda+u.
```

Multiplicities are included in both sums. The new theorem is

```
v > 0: M_G -> A(u) lambda/v
v = 0: M_G ~ A(u) lambda sigma sqrt(pi G/2)
v < 0: M_G ~ A(u) lambda sigma sqrt(2 pi G) exp(-v delta) R(u)^G,
R(u)=Z(t+u)/Z(alpha) exp(-v a) > 1.
```

Each statement is for a fixed real u, uniformly over `delta in [0,log5]` in
the fixed-depth family: keep G at the upper endpoint. Actual integer ranks use
`G=floor(log_5(N/121))`, hence `delta in [0,log5)`.
See [PROOF.md](PROOF.md) for the exact finite quotient, the nonlattice
local-limit dependency, critical CLT argument and second change of measure.
In particular, convergence of the mean log-depth does not imply that all
power tariffs converge. The exact threshold is `t+u=alpha`.

## Evidence and reproduction

The infinite-parameter result is a written scoped proof. The standard-library
verifier checks its new finite factorization and tilted quotient using exact
rational arithmetic. It imports no predecessor verifier and computes no
predecessor root, saturation value or full-flow result. It authenticates two
main-branch input files and reads their literal P/M inventory without executing
them.

From the repository root:

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

Other hosts can use their CPython 3.12 executable. Direct replay prints
`PASS_DIRECT_FLOW_LEAF_TARIFF_FINITE_IDENTITIES`: 15 finite fixtures,
225 moment identities, 450 tilted-quotient identities, 210 second-measure-change
identities, 10,191 accepted ordered
prefixes counted across fixtures, and eight rejecting controls. The five
semantic controls omit the terminal factor, truncate the terminal rank, reverse
the power sign, drop the lockstep offset or reverse the tilt shift. Three
boundary/source controls reject excessive depth, an empty barrier domain and
corrupted source bytes. Finite exponent choices are integral so these checks
are exact; they do not certify the asymptotic theorem by enumeration.

All loops are bounded by depth four, nine paid ranks and fixed fixture lists.
The largest ordered-word enumeration has 9^4 tuples. Python's managed allocation
is a Power-of-Ten deviation, with live collections bounded by these fixed
inputs. If a later version accepts variable depth or inventories, it must
replace these fixed bounds with enforced resource limits before reuse.
Functions are below 60 lines, no recursion, callback dispatch or dynamic code
execution is used, and normal/optimized warning-as-error runs exercise the same
explicit checks. Ruff, mypy, Pyright and Pylint are unavailable in the local PATH
and environment; stronger static-analysis coverage is unclaimed. A future
language/toolchain change should add its available diagnostics to VERIFY.json.
No generated receipt is committed or hand-written.

## Limitations

The local-limit theorem is a cited classical mathematical dependency, following
#6118's specialization; independent human and formal proof-kernel review are
unclaimed. The theorem uses any fixed t>alpha and inherits #6118's identification
of the raw-p7 crossing exponent for that application. It does not reverify that
identification. No finite-depth rate or practical rank threshold is supplied.
Relative source/boundary/leaf masses, a complete direct-flow invoice, native
operators, compiler realization, physical costs and selected supplier admission
are unproved here. The historical raw-p7 law is not the selected #6030 invoice;
all five selected framework assumptions remain.

## Open next questions

- Determine the full source/boundary/leaf-normalized exit coefficient, using
compatible tilted measures and retaining the offset. The missing non-leaf
asymptotics and relative masses block a complete refined-induction ceiling.
- Give explicit finite-depth errors for these three regimes. Start with a
quantitative interval local-limit bound for the fixed log{2,3,5} support;
recurrent finite-support phases prevent assuming strong nonlattice decay.

The relevance, first steps and blockers are also in [TASK.json](TASK.json).

## Credit

New theorem and verifier produced by Nick Petalas. DLamdata (#6118) supplies the
saturation framework; Ryanson Jonathan / pinterbanget (#4467/#4465/#4459)
supplies the leaf law and diagnostics; zxv (#4436) supplies the direct flow;
Cinna Davis / 1337isnot1337 (#4405) supplies refined induction; Jacob Alan
Sussman supplies the lockstep compiler; Stone supplies the classical local
limit theorem. All predecessor files and credit remain unchanged. Apache-2.0.
30 changes: 30 additions & 0 deletions research/direct-flow-leaf-tariff/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"schema_version": 1,
"base_commit": "721c03822c421b7f7fcbb2598993b947c4d88419",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "d59b5035e7b4cbaa9d688a1d32dd0d6eb79c466a",
"sha256": "9b8d0eea95b3bf0dfcb7938a732a6439b87a2685dec2a5ab9e525b3b34debbfa"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec",
"sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81"
},
{
"path": "research/direct-flow-leaf-walk/README.md",
"usage": "input",
"git_blob": "02ddde948f2e94874850eadd70d7d32559916848",
"sha256": "bf79c953cd02ad62ffd44c58ae4f5b78f2b3439574176140ba6eceb1b77430cc"
},
{
"path": "research/direct-flow-leaf-walk/verify.py",
"usage": "input",
"git_blob": "42440e630a46c6e581797f52bfb4c0c87bbdac3a",
"sha256": "2030d79d7f136b39b4e2a3f5b033af4bba18ab87579ec352267dc1697e02157d"
}
]
}
Loading
Loading