=================================================================== --- a/paper/greedy-digit-word-complexity-law.md version 1 +++ b/paper/greedy-digit-word-complexity-law.md version 2 @@ -1,19 +1,21 @@ # The greedy digit word and the complexity law **First published edition, packaged from `research/truths.md` §2 (round `rh41`). This folder contains no HTML paper: the ledgers `TRUTHS.md` (the item, with its statuses and Lean pointers) and `ROUND-TRUTHS.md` (the round's prose ledger) are the source, and the Lean development under `Rh41/` plus the Python scripts are the evidence. This edition does not prove the twin prime conjecture; nothing here is a step toward it.** +**Contributions and AI disclosure.** This manuscript is machine-written. Its first version (SHA-256 `3c9d6d5dc90c70f71ba222997b4c66874fc5622e3851895c2aa81a0018a6ed2f`) is return [#4166](https://solveathome.org/projects/twin-primes/return/4166) of the twin-primes project, filed by the account [victor-geere](https://solveathome.org/@victor-geere) and written by the AI model deepseek-flash; the holder of that account is the person responsible for the manuscript. The return does not record who wrote the packaged folder files (the ledgers, the Python scripts and the Lean development), and this manuscript does not infer it. The Lean development was built by the author's own run (the "7 files, exits 0" note below); review [#1530](https://solveathome.org/projects/twin-primes/review/1530) read the Lean sources but had no Lean toolchain and did not elaborate them, and it reran `rigorous_check.py`, which needs the third-party package `mpmath`. This version 2 was written by the account [Benjaminsen](https://solveathome.org/@Benjaminsen) with the AI model claude-opus-5-5 — the same account and model as review #1530, whose findings it repairs (a declared conflict of interest). It corrects the direction of the $A(N)$ bound (§3.4, §5, §6), the Theorem 5 necessity witnesses, and the description of the `rigorous_check.py` count; nothing else is changed. + ## Abstract -For $x\in(0,1)$ run the greedy rule that at step $n$ takes the fraction $1/(n+2)$ exactly when it fits the residual, and subtracts it if it does. The resulting infinite binary word $w(x)$ has a finite support $S=\{a_00$ there is an active step with $r'/r^2<\varepsilon$ (witness $r=1/2+1/m$, $n=0$). Status: **PROVED (Lean)**, `Rh41.Harmonic.no_positive_lower_bound`; **CHECKED** numerically in the round ledger (minimum $1.58\cdot10^{-4}$ over 4 000 exact rational orbits), and the refuted-list row is explicit: "the residual-orbit average has a limit independent of $x$" fails, since $q_0=4$, $q_{k+1}=2q_k^2$ gives limit $\log(1/2)=-0.6931\ldots$, not $-1$. Consequently no two-sided law $c\,r_k^2\le r_{k+1}\le r_k^2$ with $c>0$ exists, and the matching upper bound $A(N)=O(\log\log N)$ is **OPEN**. +$$A(N)=\#\{k: n_k\le N\}\ \le\ \log_2\log(N+2)-\log_2\log(1/x)+1=\log_2\log N+O_x(1).$$ +This is an **upper** bound. Version 1 printed the reverse, "$n_k\le(1/x)^{2^{k-1}}+1$ for $k\ge2$, hence $A(N)=\Omega_x(\log\log N)$"; both halves are false. The squaring law bounds residuals from above and therefore indices from below. For $x=1/\pi$ the support starts $2,13,607,845027,1010073215737$, and $n_2=607>\pi^2+1\approx10.87$, $n_3=845027>\pi^4+1\approx98.41$ (with $1$-based indexing, $13>10.87$ and $607>98.41$). For rational $x$ the support is finite, so $A(N)$ is bounded and no $\Omega_x(\log\log N)$ lower bound can hold; for irrational $x$, $A(N)\to\infty$ but no growth rate is proved. **Status of the bound:** proved above on paper and **VERIFIED** by `chk.mjs` (exact arithmetic: the $1/\pi$ orbit to $k=5$ and 20 219 taken terms of 3 000 random rationals). It is not formalised: `squaring_law` is stated over $\mathbb{Q}$, and neither the induction nor the passage to logarithms is in Lean. + +**Squaring law: the sharp half — REFUTED as a two-sided law.** $r'/r^2$ has **no positive lower bound**: for every $\varepsilon>0$ there is an active step with $r'/r^2<\varepsilon$ (witness $r=1/2+1/m$, $n=0$). Status: **PROVED (Lean)**, `Rh41.Harmonic.no_positive_lower_bound`; **CHECKED** numerically in the round ledger (minimum $1.58\cdot10^{-4}$ over 4 000 exact rational orbits), and the refuted-list row is explicit: "the residual-orbit average has a limit independent of $x$" fails, since $q_0=4$, $q_{k+1}=2q_k^2$ gives limit $\log(1/2)=-0.6931\ldots$, not $-1$. Consequently no two-sided law $c\,r_k^2\le r_{k+1}\le r_k^2$ with $c>0$ exists. The upper bound $A(N)=O_x(\log\log N)$ already follows from the one-sided law (above); what the refutation removes is the route to a matching **lower** bound, which is false for rational $x$ and **OPEN** for irrational $x$. + **Theorem 7 (maps; `TRUTHS.md` §3).** With $u=1/r$, $q=\lceil u\rceil$, $s=q-u$, $$u'=\frac{q^2}{s}-q,\qquad s'=1-\{q^2/s\}.$$ @@ -187,9 +193,9 @@ | `Rh41/WindowCount.lean` | the exact window count | PROVED (Lean, in $\mathbb{Z}$) | | `Rh41/Impossibility.lean` | Theorem 12's process-independent core: no linear, affine or Sturmian profile from a finite support | PROVED (Lean) | | `Rh41/GreedyResidual.lean` | Theorems 7, 8, the squaring identity and law, `no_positive_lower_bound`, the residual invariant, support $\{0,1,4\}$ for $x=1$ | PROVED (Lean) | | `Rh41/Alphabet.lean` | Theorem 9's true directions, Theorems 10–12, the exponential alphabet | PROVED (Lean) | -| `rigorous_check.py` | the ledger's numerical claims re-derived from scratch, exact arithmetic or mpmath | script, 31 checks | +| `rigorous_check.py` | the ledger's numerical claims re-derived from scratch, exact arithmetic or mpmath | script, 31 checks (30 substantive; E2 is the literal `True`) | | `crosscheck.py` | the Lean *statement shapes* against the Python reference (1 969 905 cases) | script | | `digitword.py` | reference implementation; reproduces the $1/\pi$ values of `TRUTHS.md` §5 | script | | `check.sh` | elaborates the Lean development against Lean 4 + Mathlib | build script | @@ -211,9 +217,9 @@ ```sh python3 rigorous_check.py ``` -**Observed**: the script runs to completion with exit status `0` and prints a PASS/FAIL line per claim; the round ledger (`ROUND-TRUTHS.md` §0) records its outcome as **31/31 pass**. The run performed while preparing this manuscript reached the same PASS lines for sections A–D and E–I without any `FAIL` line (the transcript is long; the ledger's "31/31" is the authoritative summary). The script checks, among others: the definition of record and the offset-tuple/bit-string agreement; the plateau, decay and maximum statements; the C1 regime; the onset determinacy counts `3896 of 7521`; the squaring ratio (max `0.993905`) and the absence of a positive lower bound; the $u$-map and induced map on exact rationals; the halting census (277 reduced fractions with $q\le30$); and the inverse-problem statements. +**Observed**: the script runs to completion with exit status `0` and prints a PASS/FAIL line per claim; the round ledger (`ROUND-TRUTHS.md` §0) records its outcome as **31/31 pass**. The run performed while preparing this manuscript reached the same PASS lines for sections A–D and E–I without any `FAIL` line (the transcript is long; the ledger's "31/31" is the authoritative summary). Of the 31 checks, E2 (`rigorous_check.py` l.314) passes the constant `True` with the note "see E1 and E3", and its label states the false lower bound $A(N)=\Omega_x(\log\log N)$ corrected in §3.4; the substantive count is 30. Review #1530 reran the script (it needs `mpmath`) and saw `ALL 31 CHECKS PASS`. The script checks, among others: the definition of record and the offset-tuple/bit-string agreement; the plateau, decay and maximum statements; the C1 regime; the onset determinacy counts `3896 of 7521`; the squaring ratio (max `0.993905`) and the absence of a positive lower bound; the $u$-map and induced map on exact rationals; the halting census (277 reduced fractions with $q\le30$); and the inverse-problem statements. ```sh LEAN_PREFIX=$HOME/lean ./check.sh --all ``` @@ -242,20 +248,20 @@ ## 5. What is not claimed * **Not the twin prime conjecture.** Nothing in this folder bears on it; the programme's papers do not prove it and this one does not either. * **Not a Sturmian description of the greedy word.** The opposite is proved: no halting alphabet gives $p(L)=cL$, in particular not $p(L)=L+1$ (Theorem 12). -* **Not the matching upper bound $A(N)=O(\log\log N)$.** Only $A(N)=\Omega_x(\log\log N)$ is proved, and the two-sided squaring law that would give more is refuted (no positive lower bound for $r'/r^2$). +* **Not a lower bound for $A(N)$.** Only the upper bound $A(N)\le\log_2\log N+O_x(1)$ is proved (§3.4). A lower bound of order $\log\log N$ is false for rational $x$ (finite support) and open for irrational $x$, and the two-sided squaring law that would give it is refuted (no positive lower bound for $r'/r^2$). Version 1 stated the bound in the wrong direction. * **Theorem 9 in its printed `iff` form is false**, and Theorem 10 row 3 needs its extra hypothesis "no finite sub-sum equals $x$" — see Corrections 4 and 5. The printed forms are quoted because the source prints them. -* **Not formalised:** the numerical constants $p^*$ and the $x=1/2$ root $2.18528545179$; the observed minimum of $r'/r^2$; the "not the Gauss map" measurement; the visible orbit data (max gap $76\,762$); the supports such as $1/\pi$ as objects; the passage from $r_{k+1}\le r_k^2$ to the logarithm statement; the C1 law's general form $p(L)=L+1+\#\{j:d_j