diff --git a/research/gaussian-concentration-threshold/PROOF.md b/research/gaussian-concentration-threshold/PROOF.md new file mode 100644 index 0000000000..2efc909c8b --- /dev/null +++ b/research/gaussian-concentration-threshold/PROOF.md @@ -0,0 +1,164 @@ +# The sharp concentration threshold for nearest-grid Gaussian dominance + +This scoped proof was produced by Nick Petalas. Apache-2.0. + +## Model and statement + +Let \(s,t\) be integers with \(s0\), define the original-coordinate coefficient at displacement +\(h\ne0\) by + +\[ +k_{i,h}(a)=\exp\{-a[(\rho h+\beta_i)^2-\beta_{i+h}^2]\}. +\] + +The cyclic matrix \(N_{s,t,w}(a)\), for integer \(1\le w0\) such that every +row is strictly diagonally dominant exactly when \(a>A_{s,w}\). Uniformly +over every allowed \(w\ge2\), as even \(s\to\infty\), + +\[ +\boxed{A_{s,w}=\tfrac12(\log s-\log\log s+\log2)+o(1).} \tag{3} +\] + +All logarithms are natural. In particular the leading concentration +coefficient \(1/2\), the subtractive log-log term, and the additive +\(\log2/2\) are necessary for a uniform continuous-concentration guarantee. +For integer \(u\), the least admitted value is +\(\lfloor A_{s,w}/\pi\rfloor+1\); its corresponding expansion has +\(O(1)\), rather than \(o(1)\), rounding uncertainty. + +## Upper bound + +The retained LOG-A-PHASE-SCHUR-AUDIT, section 1, already proves + +\[ +k_{i,-1}+k_{i,1}\le e^{-2a\theta}+e^{-2a(1+\theta)}. \tag{4} +\] + +We use that result as a premise. The new estimate concerns the farther +tail. Since \(\beta_{i+h}^2\le1/4\), for each positive \(h\ge2\), + +\[ +k_{i,h}+k_{i,-h}\le +e^{-a((\rho h+\beta_i)^2-1/4)}+ +e^{-a((\rho h-\beta_i)^2-1/4)}. +\] + +The right side is an even convex function of \(\beta_i\) on +\([-1/2,1/2]\). Indeed each summand's second derivative has the sign of +\(2a(\rho h\pm\beta_i)^2-1\), which is positive for \(a\ge1,h\ge2\). +Its maximum is therefore at an endpoint. Since \(\rho>1\), this gives + +\[ +k_{i,h}+k_{i,-h}\le e^{-ah(h-1)}+e^{-ah(h+1)}. +\] + +Summing the positive convergent series and shifting the first index yields + +\[ +\sum_{|h|\ge2}k_{i,h}\le e^{-2a} + +2\sum_{r\ge2}e^{-ar(r+1)} +\le e^{-2a}+\frac{2e^{-6a}}{1-e^{-6a}}. \tag{5} +\] + +For the last inequality, successive exponents \(r(r+1)\) differ by at least +six for \(r\ge2\). Combine (4), (5), and +\(e^{-2a(1+\theta)}\le e^{-2a}\). A finite band only removes positive terms, +so (1) follows without an infinite-period identification or a tail-admission +assumption. The earlier \(5e^{-2a}\) tail coefficient is sufficient but +does not locate the additive transition constant. + +## Lower bound + +For \(t=s+1\), even \(s\), and \(i=s/2\), the actual nearest convention gives + +\[ +\beta_i=-1/2,\quad +\beta_{i+1}=-1/2+1/s,\quad +\beta_{i-1}=1/2-1/s,\quad +\beta_{i+2}=-1/2+2/s. +\] + +Substitution into the coefficient definition gives exponents +\(2/s\), \(2+4/s\), and \(2+8/s\) at displacements \(+1,-1,+2\). +All three are retained for every \(w\ge2\). Dropping the other nonnegative +entries proves (2). The second farther entry matters: retaining only one +\(e^{-2a}\) contribution predicts an incorrect additive threshold. + +## Threshold and its uniform asymptotics + +Every off-diagonal exponent is positive because +\(|\rho h+\beta_i|\ge\rho|h|-1/2>1/2\ge|\beta_{i+h}|\). +Thus \(\max_i R_i(a)\) is continuous and strictly decreasing. At zero it is +\(2w>1\), and it tends to zero at infinity. This proves existence and +uniqueness of \(A_{s,w}\), including the strict endpoint convention. + +Set \(L=\log s\) and, for any fixed real \(b\), + +\[ +a_s(b)=\tfrac12(L-\log L+b),\qquad e^{-2a_s(b)}=s^{-1}Le^{-b}. +\] + +As \(s\to\infty\), \(a_s(b)\to\infty\), \(a_s(b)/s\to0\), and + +\[ +\frac{1-e^{-2a_s(b)/s}}{s^{-1}L}\longrightarrow1. +\] + +In (1) the other leading contribution, divided by \(s^{-1}L\), is +\(2e^{-b}\); the remaining geometric tail divided by that scale tends +to zero. In (2), the two farther terms have sum + +\[ +s^{-1}Le^{-b}(e^{-4a_s(b)/s}+e^{-8a_s(b)/s}), +\] + +whose normalized limit is also \(2e^{-b}\). Consequently (1) proves +dominance eventually whenever \(b>\log2\), and (2) proves failure +eventually whenever \(b<\log2\). Neither estimate depends on \(w\). +Sandwiching the threshold between these two concentrations, with \(b\) +arbitrarily close to \(\log2\), proves (3) uniformly in \(w\). +No sign at the exact choice \(b=\log2\) is asserted. + +## Scope and predecessor credit + +The matrix convention comes from Jose Manuel's PR3851 physical Gaussian +core. The nearest-neighbor estimate (4) comes from Vlado Vojdanovski's +retained phase-cell audit in the PR1673 lineage and its RaD/hipotures +predecessors. The new result is the matching concentration threshold, +using (5) and the three-entry obstruction. No predecessor computation is +replayed as a contribution. + +This theorem varies concentration outside the unchanged production guard. +It does not prove a changed production caller, coefficient-error bound, +inverse implementation, complete signed invoice, or new multiplication +theorem or kappa. The selected frontier and all five assumptions remain. +The universal result is this written proof; the accompanying exact finite +checks corroborate its new formulas and detect missing-tail admissions. diff --git a/research/gaussian-concentration-threshold/README.md b/research/gaussian-concentration-threshold/README.md new file mode 100644 index 0000000000..c4455545eb --- /dev/null +++ b/research/gaussian-concentration-threshold/README.md @@ -0,0 +1,111 @@ +# A sharp Gaussian concentration threshold + +Scoped proof with exact finite controls. This contribution was produced by +Nick Petalas. Apache-2.0. No new kappa is claimed. + +For the nearest-grid Gaussian matrix with expansion ratio \(1+1/s\), even +\(s\), and any retained bandwidth \(2\le w>= 1 + base = times(base, base) + require(exponent == 0, "power consumes every exponent bit") + return result + + +def decay(k, exponent): + """Enclose exp(-a*exponent), a=k*log(2), for dyadic exponent.""" + require(isinstance(k, int) and 1 <= k <= 16, "dyadic decay parameter") + require(isinstance(exponent, Fraction) and exponent >= 0, + "nonnegative exact decay exponent") + exponent *= k + whole, remainder = divmod(exponent.numerator, exponent.denominator) + denominator = exponent.denominator + require(denominator <= 1 << 24 and denominator & (denominator - 1) == 0, + "bounded power-of-two exponent denominator") + if whole >= BITS: + return (1, 1) if whole == BITS and remainder == 0 else (0, 1) + base = (UNIT // 2, UNIT // 2) + for _ in range(denominator.bit_length() - 1): + base = root(base) + low, high = power(base, remainder) + shift = 1 << whole + return low // shift, (high + shift - 1) // shift + + +def offset(s, index): + rho = Fraction(s + 1, s) + nearest = (2 * (s + 1) * index + s) // (2 * s) + beta = rho * index - nearest + require(-Fraction(1, 2) <= beta < Fraction(1, 2), "half-up offset range") + return beta + + +def exponent(s, index, displacement): + rho = Fraction(s + 1, s) + result = ((rho * displacement + offset(s, index)) ** 2 + - offset(s, index + displacement) ** 2) + require(displacement == 0 or result > 0, "strict off-diagonal decay") + return result + + +def upper(k, s, tail_count=2): + """Universal majorant in the proof, with rational tail terms.""" + require(tail_count in (1, 2), "explicit tail coefficient control") + z = decay(k, Fraction(2, s)) + q = Fraction(1, 1 << k) + tail = tail_count * q ** 2 + 2 * q ** 6 / (1 - q ** 6) + return Fraction(z[0], UNIT) + tail, Fraction(z[1], UNIT) + tail + + +def lower(k, s): + """Three actual entries in the half-tie row, including h=+2.""" + theta = Fraction(1, s) + terms = [decay(k, value) for value in + (2 * theta, 2 + 4 * theta, 2 + 8 * theta)] + return (Fraction(sum(value[0] for value in terms), UNIT), + Fraction(sum(value[1] for value in terms), UNIT)) + + +def check_sources(): + manifest = json.loads((PACKAGE / "SOURCES.json").read_text()) + pins = {} + require(len(manifest["files"]) == 4, "bounded source inventory") + for row in manifest["files"]: + if row["usage"] == "input": + digest = sha256((ROOT / row["path"]).read_bytes()).hexdigest() + require(digest == row["sha256"], "source hash: " + row["path"]) + pins[row["path"]] = digest + require(len(pins) == 2, "both mathematical source conventions are pinned") + return pins + + +def check_arithmetic(): + require(root((UNIT // 4, UNIT // 4)) == (UNIT // 2, UNIT // 2), + "exact square root positive fixture") + value = root((UNIT // 2, UNIT // 2)) + require(value[0] ** 2 <= UNIT ** 2 // 2 <= value[1] ** 2, + "irrational square root enclosure") + require(power((UNIT // 2, UNIT // 2), 3) == (UNIT // 8, UNIT // 8), + "exact interval cube") + require(decay(2, Fraction(3, 2)) == (UNIT // 8, UNIT // 8), + "fractional decay with integral product") + require(decay(1, Fraction(BITS + 1)) == (0, 1), "bounded underflow enclosure") + rejected = 0 + for k, value in ((0, Fraction(1)), (17, Fraction(1)), + (1, Fraction(-1)), (1, Fraction(1, 3))): + try: + decay(k, value) + except ValueError: + rejected += 1 + require(rejected == 4, "all invalid arithmetic domains rejected") + return rejected + + +def check_geometry(): + checked = 0 + for s in (8, 16, 32, 64, 128, 256): + i = s // 2 + require(offset(s, i) == -Fraction(1, 2), "literal half-up tie") + theta = Fraction(1, s) + for h, expected in ((1, 2 * theta), (-1, 2 + 4 * theta), + (2, 2 + 8 * theta)): + require(exponent(s, i, h) == expected, "three-entry lower identity") + checked += 1 + for j in range(s): + require(offset(s, j + s) == offset(s, j), "physical period offsets") + checked += 1 + return checked + + +def check_complete_rows(): + rows = entries = 0 + for s in (8, 16, 32): + for k in (2, 3, 4): + bound = upper(k, s)[1] + for w in (2, s // 2 - 1): + tie_low = None + for i in range(s): + low = high = 0 + for h in range(-w, w + 1): + if h: + left, right = decay(k, exponent(s, i, h)) + low += left + high += right + entries += 1 + require(Fraction(high, UNIT) <= bound, "complete row below majorant") + if i == s // 2: + tie_low = Fraction(low, UNIT) + rows += 1 + require(tie_low is not None and tie_low >= lower(k, s)[0], + "actual half-tie row contains lower witness") + return rows, entries + + +def check_transition_controls(): + admitted = excluded = unresolved = 0 + for log_s in range(4, 25): + s = 1 << log_s + for k in range(2, 13): + lo, hi = lower(k, s) + left, right = upper(k, s) + require(lo <= hi and left <= right and lo <= right, + "consistent independent upper/lower enclosures") + if right < 1: + admitted += 1 + elif lo > 1: + excluded += 1 + else: + unresolved += 1 + s, k = 1 << 19, 8 + bad = lower(k, s)[0] + wrong = upper(k, s, tail_count=1)[1] + require(wrong < 1 < bad, "omitting one leading tail gives a false admission") + require(upper(9, 1 << 20)[1] < 1 < lower(8, 1 << 20)[0], + "same-period positive and negative concentration controls") + require(admitted + excluded + unresolved == 231, "complete bounded scan") + return {"admitted": admitted, "excluded": excluded, "unresolved": unresolved, + "omitted_tail_false_admission": {"s": s, "k": k}, + "same_period_bracket": {"s": 1 << 20, "bad_k": 8, "good_k": 9}} + + +def main(): + sources = check_sources() + rejected = check_arithmetic() + geometry = check_geometry() + rows, entries = check_complete_rows() + require((geometry, rows, entries) == (522, 336, 4368), + "complete registered geometry and row coverage") + transitions = check_transition_controls() + files = sorted(PACKAGE.glob("*")) + require(len(files) == 6 and all(path.is_file() for path in files), + "six regular package artifacts") + result = {"status": "PASS_GAUSSIAN_CONCENTRATION_THRESHOLD", + "arithmetic_rejections": rejected, "geometry_equalities": geometry, + "complete_rows": rows, "complete_entries": entries, + "transition_controls": transitions, "source_sha256": sources, + "package_sha256": {path.name: sha256(path.read_bytes()).hexdigest() + for path in files}, + "scope": "Exact finite controls; the uniform asymptotic claim is a written proof."} + print(json.dumps(result, indent=2, sort_keys=True)) + + +if __name__ == "__main__": + main()