diff --git a/docs/ci-verification.md b/docs/ci-verification.md index 006bf5a3d5..63ba3e9aa8 100644 --- a/docs/ci-verification.md +++ b/docs/ci-verification.md @@ -1,6 +1,23 @@ # CI verification -## Current selected-family replay: #5599 +## Current selected-family replay: #6030 + +The [selected record](../certificates/selected-result.json) binds conditional +κ = 0.003125804 to the [proof review](research/pr-intake-evidence/pr6030-audit/PROOF-REVIEW.md), +[validation receipts](research/pr-intake-evidence/pr6030-audit/VALIDATION.json), +and [explicit source closure](../certificates/frontier6030-source.json). +`make frontier6030-verify` follows that source-bound selected replay. The review +separates retained normal primary macOS/Linux evidence from fresh independent +word/invoice/native, original caller, adapted caller and optimized primary checks. +Consult its receipts for exact commands, source heads and limits; the #5599 +checkpoint below retains its own historical replay details. + +The five inherited framework assumptions remain. Neither the full uniform word +nor a complete rounded multiplier is materialized. A source/metadata check is +not an operator replay or a formal theorem proof. Routine research submissions +do not need to rerun this selected-family replay. + +## Historical selected-family replay: #5599 The [selected record](../certificates/selected-result.json) binds conditional κ = 0.00310045 to the [proof review](research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md) diff --git a/docs/research/current-status.md b/docs/research/current-status.md index a84ac12213..c49a245adc 100644 --- a/docs/research/current-status.md +++ b/docs/research/current-status.md @@ -1,6 +1,6 @@ # Current reviewed status -Selected conditional κ: **0.003125804 = 781451/250000000**, DreamingOfClouds' +Selected conditional κ: **0.003125804** = 781451/250000000, DreamingOfClouds' PR6030 on the cumulative P104 construction. The complete caller counts 13,444 productive fields and 66,834 paid calls. The saving is about 0.81775% above the preceding selected PR5599 claim 0.00310045. diff --git a/research/odd-denominator-rounding-budget/README.md b/research/odd-denominator-rounding-budget/README.md new file mode 100644 index 0000000000..b3fbcba1f3 --- /dev/null +++ b/research/odd-denominator-rounding-budget/README.md @@ -0,0 +1,205 @@ +# A bounded fair-bit cap cannot exactly round the denominator-13 inverse + +A stochastic extension of the retained denominator-13 inverse cannot use a +hard cap of fair bits, always return a rounded integer, and remain exactly +unbiased. A bounded sampler can instead accept a quantified bias or return +an explicit failure. Both tradeoffs have sharp closed forms. + +There is an exact standalone sampler with expected draw count two, and that +expectation is optimal. Its worst-case draw count is unbounded. A tempting +bounded retry construction fails: cap that sampler at four bits, restart its +unfinished branch, and the desired probability **1/13 becomes 1/15**. +The correct exact conditional sampler needs abort probability at least **3/16**. + +This is a scoped arithmetic/randomness theorem and failed-construction analysis, +not a new inverse implementation, native supplier or κ. The denominator-13 +service in the pinned source is deterministic; it does not claim the stochastic +substitution tested here. + +## Source-relative changed contract + +[PR #5069](https://github.com/CrocSwap/integer-mult-bounds/pull/5069)'s physical +inverse-coded pair uses the exact mode identity + +$$ +A=I-MM^T/4,\qquad M^TM=56I,\qquad A^{-1}=I-MM^T/52. +$$ + +In particular $A^{-1}M=-M/13$. Its retained +[PR #5037](https://github.com/CrocSwap/integer-mult-bounds/pull/5037) grid kernel +uses deterministic approximation and does not give reversible cleanup. +The proposed change is to use unbiased stochastic grid rounding of a +non-dyadic scalar value, motivated by +[Nick Petalas](https://github.com/petalas)'s +[PR #6026](https://github.com/CrocSwap/integer-mult-bounds/pull/6026) dyadic +stochastic prefix and the coupled inverse ABI in +[PR #6066](https://github.com/CrocSwap/integer-mult-bounds/pull/6066). + +For a scalar value whose fractional part is $a/b$, adjacent-grid stochastic +rounding must choose the upper grid point with exactly that probability. +The calibration $a/b=1/13$ tests a denominator intrinsic to the inverse, not a +claim that every reached service operand has that fraction. Actual reachable +residue classes and caller propagation still need a separate source-bound +analysis. No defect in the deterministic predecessor is alleged. + +## Sharp finite-bit bias bound + +Fix coprime integers $01$. A standalone algorithm has a +fixed input, no free initial random state, and at most $R$ fresh independent +fair bits. It may branch adaptively and stop early, but always returns zero +or one. Pad every early termination with unused bits. It is now a function of +exactly $N=2^R$ equally likely strings. Its success probability is $k/N$ for an +integer $0\leq k\leq N$. + +Let $r$ be the remainder of $aN$ upon division by $b$. The best possible total +variation error from the desired Bernoulli law is + +$$ +\boxed{\epsilon_R=\frac{\min(r,b-r)}{bN}>0.} +$$ + +Indeed the closest integer to $aN/b$ is one of its floor and ceiling, at distances +$r/b$ and $(b-r)/b$. Choosing the corresponding number of successful bit strings +attains the bound. Since $b$ is odd and $a,b$ are coprime, $r$ cannot be zero. +The same lattice argument rules out an exactly unbiased integer-valued result +even if nonadjacent output integers are allowed: its mean is still an integer +divided by $N$. + +This is a theorem about a **hard** fair-bit cap. A non-fair primitive, an +uncharged random reservoir, an explicit failure or an unbounded stopping time +changes the hypotheses. It is not a lower bound on amortized randomness across +an arbitrarily large batch. + +## Sharp abort bound with exact conditional output + +Now allow a third outcome, abort, but demand that the accepted zero/one result +has exactly the desired law. Let $\alpha$ strings return one and $\beta$ return +zero. Exact conditional probability requires + +$$ +\frac{\alpha}{\alpha+\beta}=\frac{a}{b}. +$$ + +Coprimality forces $\alpha=at$ and $\beta=(b-a)t$ for an integer $t$. Therefore +at most $b\lfloor N/b\rfloor$ strings can be accepted, and + +$$ +\boxed{\delta_R=\frac{N-b\lfloor N/b\rfloor}{N}} +$$ + +is the smallest possible abort probability. It is attained by accepting that +many full $b$-sized groups, partitioning each in the ratio $a:(b-a)$ and aborting +the rest. If $Nbit:zeros+=1 + else:nxt[prefix+(coin,)]=newrem + unresolved=nxt + need(len(unresolved)==1,'exact one unresolved fair prefix') + need(ones+zeros+1==1<digit:return 0,i+1 + return None,len(bits) + + +def rejected(fn): + try:fn() + except ValueError:return + raise ValueError('negative control accepted') + + +def main(): + pins=json.loads((HERE/'SOURCES.json').read_text()) + for row in pins['files']: + if row['usage']=='input': + need(hashlib.sha256((ROOT/row['path']).read_bytes()).hexdigest()==row['sha256'],'source bytes') + lattice=0 + for b in range(3,32,2): + for a in range(1,b): + if gcd(a,b)!=1:continue + for r in range(0,11): + n=1<0,'sharp bounded sampler bias') + need(abort==Q(n-b*(n//b),n) and abort>0,'sharp exact conditional abort') + lattice+=1 + triples=0 + for b in (3,5,7,9,11,13,15): + for a in range(1,b): + if gcd(a,b)!=1:continue + for r in range(0,6): + n=1<k)=2^-k. + for k in range(1,65): + need(sum((Q(1,1<