research/lab/rs/carry-skeleton

1 directory and 2 files in research/lab/rs/carry-skeleton.

carry-skeleton

  • One step of m n + 1 in base 2 split into its GF(2) skeleton and its carry, and the carry read as an object of the memory dial of beneath.
  • Digits run least significant first, so 2n is a shift towards the higher digits and the ripple carry runs in the same direction as the skeleton's dependency.
  • The skeleton of 3n + 1 is n xor 2n xor 1; the carry word is defect(n) = (3n + 1) xor (n xor 2n xor 1) and the local carry count is d_loc(n) = popcount(defect(n)).
  • Every rule reading here is mrlynum::memory::Rule: Rule::new(1, k, code) at window width k, with the window (c_1, ..., c_k) read as w = sum_j c_j 2^(k - j), first digit most significant, and Rule::allowed(w) true when bit w of the code is set.
  • rho and kappa are mrlynum::memory::perron and mrlynum::memory::kappa, which split the digraph into strongly connected components and make each component's Perron root exact against its integer characteristic polynomial.

THE METHOD

  • carries(n) runs the four-state Mealy transducer directly: state (n_(i-1), q_i), q_0 = 1, q_(i+1) = MAJ(n_i, n_(i-1), q_i), and its output word is asserted equal to defect(n) digit for digit.
  • The substitution M = 2n + 1 is checked as the exact identity M xor 2M = 2 (n xor 2n xor 1) + 1, and M xor 2M is checked against rule 60 rebuilt digit by digit as M_i xor M_(i-1).
  • The zero-carry code of an odd multiplier m is recomputed from supp m: the difference set {|j - j'| : j, j' in supp m} is built, the window width is deg m + 1, and a window is allowed when no two of its 1 digits sit at a distance in that set. No code is copied.
  • A word shorter than the width holds no window and Rule::accepts takes it, so every integer is padded with leading zeros past the width before the set equality is asserted; leading zeros never close a forbidden pair.
  • The carry density is read two ways: the exact integer balance of the stationary vector of the four-state chain, and the mean of d_loc over every n < 2^level.
  • The depth is the longest run of consecutive carry-on positions, sampled on uniform digit strings with a splitmix64 stream seeded in the source, so every depth row reruns identically.

THE CONTROLS

  • carries against defect, the M substitution and the rule-60 rebuild: 0 mismatches each over every n < 2^18.
  • The zero-carry set against the rule: 0 mismatches over every n < 2^16 at m = 3, 5, 7, 9, 11, 15.
  • kappa on codes 7 and 23 asserted against 0.098239 and 0.115204, the two values beneath already prints, reached here from the multiplier and not from the rule.
  • The carry-free map asserted non-growing and asserted to reach 1 from every n < 2^20.
  • The six refutation witnesses pinned as explicit integer pairs, and the worst-case depth level + 1 pinned at level 1, 2, 4, 8, 16, 32, 40.

RUN

  • CARGO_BUILD_JOBS=4 cargo run --release -p carry-skeleton from the repo root. 7.53s on one thread, 7.43s of it the depth sampling. Prints only, writes nothing.
  • CARGO_BUILD_JOBS=4 cargo test -p carry-skeleton, 12 tests, under a second after the build.

READS

  • The identity: 0 mismatches on all three checks below 2^18, and the radius witness holds at every length 2..40.
  • The zero-carry rules, one row per odd multiplier, every code recomputed from the difference set.
msupp mdifference setkcodecard Wrhokappa
30, 112731.6180340.098239
50, 2239561.6180340.167412
70, 1, 21, 232341.4655710.115204
90, 33422015121.6180340.201999
110, 1, 31, 2, 3427951.3802780.115524
150, 1, 2, 31, 2, 3427951.3802780.115524
  • 11 and 15 share a difference set, so they share a rule: the zero-carry set depends on the difference set of supp q and not on m.
  • The density: the stationary vector is (2, 1, 1, 2)/6 on the states (0,0), (0,1), (1,0), (1,1), all four balance residuals exactly 0, carry-on mass exactly 3/6. The mean of d_loc over every n < 2^level reads 4.332031, 5.333008, 6.333252, 7.333313, 8.333328, 9.333332, 10.333333, 11.333333 at level 8, 10, 12, 14, 16, 18, 20, 22, which is level/2 + 1/3 - (-1)^level/(3 * 2^level) exactly: the integer form 3 sum = 3 level 2^(level-1) + 2^level - (-1)^level has residual 0 at every level 8..22, and mean/level falls 0.541504, 0.533301, 0.527771, 0.523808, 0.520833, 0.518518, 0.516667, 0.515152 towards 1/2.
  • The carry-free map: 0 digit-count increases and 0 values failing to reach 1 over every n < 2^20, with T_free(1) = 1.
  • The six refutations, each the least clashing pair below 2^16 and the number of unordered pairs of integers below 2^16 that share the statistic and disagree on d_loc. A statistic is refuted as soon as one such pair exists; the count is how many there are.
statisticleast clashing paird_locdisagreeing pairs below 2^16
popcount1, 22, 0256217518
longest run of 1 digits1, 22, 0417177932
v_21, 32, 3659301399
digit count2, 30, 3662864636
(popcount, v_2)3, 53, 488157572
all four at once19, 253, 49331881
  • The last row subsumes every pair: two integers agreeing on all four statistics already disagree on d_loc, so no pair of them is a summary either.
  • The depth: the carry-on block of the transfer matrix is [[0, 1], [1, 1]], characteristic polynomial x^2 - x - 1, the same as transfer(Rule::new(1, 2, 7)) = [[1, 1], [1, 0]], so the survival rate per digit is phi/2 and the prediction is log_(2/phi) level at 2/phi = 1.236067977.
levelsamplesmean depthstandard errorlog_(2/phi) leveloffsetincrement per quadrupling
162000006.3380.00813.082-6.744-
6420000012.1160.01119.623-7.5075.778
25620000018.4620.01326.164-7.7026.346
102420000024.9670.01332.706-7.7396.504
409620000031.4810.01439.247-7.7666.514
1638420000038.0290.01445.788-7.7596.548
  • The predicted increment per quadrupling is 6.541119; the read increments rise towards it from below, the last reading 6.548 at a standard error of 0.014 per mean, and the offset settles near -7.76, so the base is supported and not established. The mean is a sample mean over 200000 strings and no exponent is fitted.

WITNESSES

  • beneath, The carry of a Collatz step - the identity, the unbounded radius, the zero-carry table, the two couplings, the density, the carry-free cycle theorem, the refutation line and the depth conjecture.