Repository navigation
Prove the uniform query floor for the shared dirty BIT pair - #4179
Open
RossRichardson wants to merge 1 commit into
Open
RossRichardson wants to merge 1 commit into
RossRichardson wants to merge 1 commit into
Conversation
Contributor
|
Independent finite-control audit of the joint dirty-pair floor at Code-disjoint re-enumeration; does not import package Result (7/7): All 12 F_p address-permutation defect cases match; odd-prime gaps check_4179.py#!/usr/bin/env python3
"""Independent finite controls for PR4179 (joint dirty-pair query floor).
Re-enumerates the F_p address-permutation defect cases and the complete
3x3/3x2 F2 Sylvester census. Does not import package check.py / verify.py.
The written all-parameter tariff proof is not re-derived.
James Reed (@rcfc-jreed), with substantial AI assistance (Claude, in Cursor).
Apache-2.0.
"""
import argparse, itertools, json, subprocess, sys
from fractions import Fraction as Q
HEAD = 'de9deae2b787' # may need full; will resolve
PKG = 'research/bit-joint-dirty-pair/'
results = []
def check(name, ok, detail=''):
results.append((name, bool(ok), detail))
print(('PASS ' if ok else 'FAIL ') + name + ((': ' + str(detail)) if detail else ''), flush=True)
return bool(ok)
def binary_rank(rows):
pivots = {}
for row in rows:
while row:
p = row.bit_length() - 1
if p in pivots:
row ^= pivots[p]
else:
pivots[p] = row
break
return len(pivots)
def multiply(a, b):
out = []
for row in a:
value = 0
for j, selected in enumerate(b):
if row >> j & 1:
value ^= selected
out.append(value)
return tuple(out)
def defect_cases():
out = []
for prime, half in ((3, 1), (3, 2), (3, 3), (5, 2)):
dim = 2 * half
addresses = list(itertools.product(range(prime), repeat=dim))
index = {v: i for i, v in enumerate(addresses)}
size = len(addresses)
for rank in range(half + 1):
action = []
for point in addresses:
moved = list(point)
for i in range(rank):
moved[i], moved[half + i] = moved[half + i], moved[i]
action.append(index[tuple(moved)])
fixed = sum(i == j for i, j in enumerate(action))
measured = binary_rank((1 << i) ^ (1 << j) for i, j in enumerate(action))
predicted_fixed = prime ** (dim - rank)
predicted_defect = (size - predicted_fixed) // 2
assert fixed == predicted_fixed and measured == predicted_defect
out.append(dict(prime=prime, address_dimension=dim, query_rank=rank,
fixed_addresses=fixed, boolean_defect_rank=measured))
return out
def sylvester():
cases = both = zero = 0
for u in itertools.product(range(8), repeat=3):
ru = binary_rank(u)
for v in itertools.product(range(4), repeat=3):
cases += 1
rv = binary_rank(v)
ruv = binary_rank(multiply(u, v))
assert ruv >= ru + rv - 3
if ru >= 2 and rv >= 2:
both += 1
zero += ruv == 0
return cases, both, zero
def run(repo):
head = subprocess.check_output(['git', '-C', repo, 'rev-parse', 'pr4179'], text=True).strip()
global HEAD
HEAD = head
result = json.loads(subprocess.check_output(
['git', '-C', repo, 'show', f'{head}:{PKG}RESULT.json']))
check('I1 RESULT scopes no_new_kappa and PASS finite controls',
result['finite_controls']['no_new_kappa'] is True
and result['finite_controls']['status'] == 'PASS_FINITE_JOINT_QUERY_CONTROLS'
and result['source']['no_new_kappa'] is True)
mine = defect_cases()
theirs = result['finite_controls']['defect_rank']['actual_permutation_cases']
check('D1 defect-rank cases match independent F_p enumeration (12 cases)',
mine == theirs, f'mine={len(mine)} theirs={len(theirs)}')
gaps = result['finite_controls']['defect_rank']['normalized_target_minus_relaxed_rank1_plus_any_rank']
check('D2 strict positive gaps for odd primes 3,5,7,11; char-2 gap is 0',
all(Q(gaps[str(q)]) > 0 for q in (3, 5, 7, 11))
and Q(2 - 2, 2 * 2 * 2) == 0
and gaps == {str(q): str(Q(q - 2, 2 * q * q)) for q in (3, 5, 7, 11)})
cases, both, zero = sylvester()
obst = result['finite_controls']['odd_call_rank_obstruction']
check('S1 complete 32768 Sylvester pairs; zero products when both ranks ≥ 2',
cases == 32768 == obst['complete_matrix_pairs']
and zero == 0 == obst['zero_products_in_that_class']
and both == obst['pairs_with_both_ranks_at_least_two'],
f'cases={cases} both={both} zero={zero}')
# four-column positive control
u4 = (0b0101, 0b1010)
v4 = (0b01, 0b10, 0b01, 0b10)
check('S2 four-column boundary allows UV=0 with both ranks 2',
binary_rank(u4) == binary_rank(v4) == 2 and multiply(u4, v4) == (0, 0)
and obst['four_columns_allow_zero_product_with_two_directions'] is True)
# written tariff reduction arithmetic
w = result['finite_controls']['written_tariff_reduction']
check('T1 written tariff reduction notes two-query / three-query / four+ cases',
'2' in w['two_queries'] and '2+x' in w['three_queries'] and '4' in w['four_or_more_queries'])
# source pin facts that are numeric
src = result['source']
check('W1 source word has 660 ordinary independent columns; query profile present',
src['ordinary_independent_input_columns'] == 660
and isinstance(src['query_rank_profile'], dict))
def main():
ap = argparse.ArgumentParser()
ap.add_argument('--repo', required=True)
a = ap.parse_args()
run(a.repo)
ok = all(r[1] for r in results)
print(('PASS' if ok else 'FAIL'), f'{sum(r[1] for r in results)}/{len(results)} checks', flush=True)
sys.exit(0 if ok else 1)
if __name__ == '__main__':
main()James Reed (@rcfc-jreed), with substantial AI assistance (Claude, in Cursor). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #4068: jointly mixing the independent inputs of helpers413/444 cannot reduce the fixed pair's stipulated query tariff below
2 Phi_m(2), for0 <= b <= 1, in the uniform unary-query model. The two original rank-two calls attain this bound even when scalar mixing and finite restored dirty or clean workspace are free.The package supplies the written proof, an independent source binding, finite algebra controls, reviewed implementation, and explicit packing proposals with their missing costs. Proof · Scope and reproduction.
Scope and limits
Fixed finite rational address maps, the same word for all sufficiently large odd address primes, one VALUE stream per query, address-independent scalar mixing, and the complete endpoint before the same injective suffix. The proof includes clean ancillary columns; it does not use a fixed-field representation as a faithful group algebra.
Changed downstream compensation, modulus-dependent words, and newly priced tagged/packed primitives remain open. Query pricing is stipulated; no native supplier, formal-kernel proof, changed selected record or new kappa is claimed.
Test plan
12fa8c5c844be21bfefb38a19503fbd867a11244; current task card unchanged at priority revision7.Hosted CI is separate from these local checks.
Sources and credit
Pins PR4068 at
5a34918402ae2c0c683d8820ad832970e77f6382, retaining Ali Romman's, Sagar Thakrar's and the credited controller/hosting lineage. Jose Manuel's PR2108 and earlier group-algebra/cut bounds are antecedents, not claimed new here. Full attribution and overlap limits are in SOURCE-NOTES.md.Ross Richardson, with substantial OpenAI Codex assistance and separate AI proof/source reviews. Apache-2.0; no independent human certification.