diff --git a/research/selected-slack7-cycle-obstruction/README.md b/research/selected-slack7-cycle-obstruction/README.md new file mode 100644 index 0000000000..b512af5904 --- /dev/null +++ b/research/selected-slack7-cycle-obstruction/README.md @@ -0,0 +1,125 @@ +# Slack-7 three-bin cycles on the selected owner map + +**Negative result. No new κ.** On the selected PR1094 owner map, every directed +three-role cycle on three distinct occupied bins that touches a slack-7 bin and +strictly majorizes the slack triple is illegal for the selected source-event +windows. The complex primitive still binds. The selected record is unchanged. + +Selector nonce `c6124726e8f026f5858c9552e1483c86`, track +`incumbent-optimization`, card `selected-packing` (scope key +`ab5d8f0f0d19bbab8625`), priority revision 2. Base +`ef5f39403610d231a0c27e8a6b4f08c10209bcd6`. Scope is **refined** to this one +residual. The baseline binding check returned +`PASS_RESEARCH_BASELINE_BINDINGS_ONLY`. + +## Cycle and sign + +A directed cycle of roles A, B, C in three distinct occupied bins sends A into +B's bin, B into C's bin, and C into A's bin. One role leaves each bin and one +role arrives, so the slack update is + +```text +slack' = slack + departing width - arriving width +``` + +and every new slack must be nonnegative. Prefix compaction is the only offset +freedom used: the test keeps total width inside capacity. It does not rebuild +charts. + +The selected idle slacks on occupied bins are only `{0,1,3,7}`. Exactly ten +roles sit in the seven slack-7 bins, in classes `(7,4)`, `(7,8)` and `(7,9)`. +Every directed cycle that touches a slack-7 bin is written once, starting at +its lowest-index slack-7 role. There are 13 occupied `(slack, width)` classes +and `3 * 13 * 13 = 507` anchored class patterns: + +| sign | patterns | +|---|---:| +| uniformly improving | 77 | +| uniformly worsening | 96 | +| histogram-neutral | 39 | +| capacity-infeasible | 275 | +| not majorization-ordered | 20 | + +For an equal-sum triple, strict majorization is the usual strict partial-sum +order. For every real `0 t^(1-a)` is strictly concave on +`[0, infinity)`, so a strictly majorizing new triple has a strictly smaller +idle power sum. Neutral patterns do not change the multiset. Incomparable +patterns are not claimed to have one sign on the whole interval. + +## What was counted + +Among the 77 improving patterns there are **32,981,939** capacity-feasible +directed cycles and **0** whose three landings all lie in the destination +window lists of `PLAN.json`. Those lists are the selected plan's strict +source-event intervals. The same count includes **0** same-call cycles. +Recomputing the two published rank-8 patterns gives the recorded sizes: + +| classes `(slack, width)` | old slacks | new slacks | capacity | window-legal | +|---|---|---|---:|---:| +| `(7,8), (0,8), (1,7)` | `(7,0,1)` | `(8,0,0)` | 17,567 | 0 | +| `(7,8), (1,7), (0,7)` | `(7,1,0)` | `(8,0,0)` | 4,319 | 0 | + +The other 75 improving patterns, including every pattern that uses a slack-3 +bin, are window-empty as well. The 20 incomparable patterns contribute +**325,142** further capacity-feasible cycles, also with **0** window-legal +landings. That is an exclusion, not a moment-sign theorem. + +The identity check accepts all 69,120 selected roles inside their own windows. +A repair control opens the two blocked legs of one `(7,8),(0,8),(1,7)` triple +whose middle time is unique among landings that already accept the slack-7 +role. The census then reports exactly one window hit, so an empty real count +is not a blind counter. No repaired triple is part of the mathematical claim. + +## What this does not show + +Active-pair exclusion, per-call family uniqueness, chart reconstruction, +controller emission, native replay, invoice, moment repricing and the outer +assembly were not run. The window lists were not regenerated from the parent +execution schedule; the census uses the committed `PLAN.json` lists. Windows already reject every candidate, so those later +checks cannot create a legal cycle inside this domain. Cycles that never touch +a slack-7 bin, cycles on fewer than three bins, and sequential moves are +outside the count. No supplier adoption or selected-frontier change is claimed. +Discussion writes for this account were rejected with FORBIDDEN, so no claim +was posted; that limitation is recorded here and was not retried. + +## Reproduce + +Python 3.12, standard library, from the repository root. `PYTHONOPTIMIZE` was +unset for the first command. The C++ toolchain was aligned for the session and +is not used by this census. + +```sh +python3 -B research/selected-slack7-cycle-obstruction/verify.py +python3 -I -O -B research/selected-slack7-cycle-obstruction/verify.py +python3 -B scripts/research_package.py --package research/selected-slack7-cycle-obstruction +``` + +Expected primary status: + +```text +PASS_SELECTED_SLACK7_CYCLE_OBSTRUCTION improving_patterns=77 capacity=32981939 window=0 same_call=0 known=17567+4319 incomparable_patterns=20 incomparable_capacity=325142 incomparable_window=0 synthetic_window_hits=1 roles=69120 no_new_kappa +``` + +## Open next questions + +Does any directed three-bin cycle that avoids every slack-7 bin strictly +majorize its slack triple and land inside the selected source-event windows? +A yes answer would be an idle-histogram witness on the binding complex side. +The smallest next join anchors the same majorization test at the 754 slack-3 +roles and drops triples that also touch slack 7. The blocker is the larger +class products, together with three-component transitions that are not +majorization-ordered. + +## Credit + +The owner map is Rohan Arun's PR1094, retaining Jeremy Kothe's packing lineage +and Hao Yan's window geometry. The rank-8 counts 17,567 and 4,319 were +published by Aaron Wang / navinor in PR2145; this package recomputes them and +extends the census to every slack-7-touching majorizing pattern. The same-call +three-role census in PR1873 is a different slice; the zero same-call count +here is only inside the slack-7 anchor. Josie Elliston's PR1091 owner audit +remains the geometry predecessor and was not rerun. Apache-2.0. + +Prepared with substantial AI assistance for the census design, exact checks, +implementation and write-up. No independent human review or formal-kernel +verification is claimed. diff --git a/research/selected-slack7-cycle-obstruction/SOURCES.json b/research/selected-slack7-cycle-obstruction/SOURCES.json new file mode 100644 index 0000000000..05230db881 --- /dev/null +++ b/research/selected-slack7-cycle-obstruction/SOURCES.json @@ -0,0 +1,30 @@ +{ + "schema_version": 1, + "base_commit": "ef5f39403610d231a0c27e8a6b4f08c10209bcd6", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "c05fafaa25ba95b2d5af86b1800427198e3d20eb", + "sha256": "89b5928bc92c81e2647b6d702a7ad85a6795b8f44e2eb267b2ff3145d8f2b2ce" + }, + { + "path": "research/complex-t16-rare-pattern-exchanges/data/OWNERS.json.gz", + "usage": "input", + "git_blob": "d3ba33d7e703a3229d9fb8a360f69d2f318bbb70", + "sha256": "87902c528dfab7d503dcf8a784260e3ab6fb7424c418a1820f7261f25be7b6bc" + }, + { + "path": "research/complex-t16-rare-pattern-exchanges/data/PLAN.json", + "usage": "input", + "git_blob": "f1bec76e8e9b7a1f09c1e05cb6cce973b6e59f1b", + "sha256": "7bd786ba8e66408f02aa9ef446eaf20c1bfe981ea2e4dd1e5a929f0aa7767bc0" + } + ] +} diff --git a/research/selected-slack7-cycle-obstruction/TASK.json b/research/selected-slack7-cycle-obstruction/TASK.json new file mode 100644 index 0000000000..d97250e83d --- /dev/null +++ b/research/selected-slack7-cycle-obstruction/TASK.json @@ -0,0 +1,60 @@ +{ + "schema_version": 1, + "task_id": "selected-packing", + "priority_revision": 2, + "base_commit": "ef5f39403610d231a0c27e8a6b4f08c10209bcd6", + "original_card": { + "id": "selected-packing", + "question": "Is there a genuinely unsearched, explicitly bounded improvement to the selected packing?", + "starting_points": [ + "certificates/selected-result.json", + "research/heterogeneous-owner-assembly/README.md" + ], + "methods": [ + "Search a named unclaimed canonical candidate domain with a reproducible partition.", + "Prove a stronger scoped relaxation or exact optimum for one named residual subproblem." + ], + "acceptance_gate": "Check live PR overlap first, price both suppliers and distinguish a search best from an optimum.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Locate the selected packing source in the review and check live PRs for the same residual problem.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "first_experiment": "Define an unclaimed canonical domain and a favorable bound before starting a new search.", + "bottleneck_link": "An actual paid-profile gain can improve the frontier up to the other supplier cap.", + "allowed_variations": [ + "One bounded residual packing instance or exact relaxation." + ], + "scope_change_triggers": [ + "Rerunning an existing search with only a different seed as a separate mathematical contribution." + ], + "overlap_terms": [ + "T16", + "owner exchange", + "packing" + ] + }, + "scope_status": "refined", + "actual_scope": "On the selected PR1094 owner map, every directed three-role cycle on three distinct occupied bins that touches a slack-7 bin and strictly majorizes the slack triple fails the selected source-event window list.", + "scope_change_reason": "The card allows one bounded residual of the selected packing. The full T16 search and the single rank transition {0,1,7}->{0,0,8} are already published. This census is the remaining slack-7-touching majorization class, including that transition as a recomputed control.", + "bottleneck_link": "A legal idle-histogram change is what could raise the binding complex primitive. This residual has 32,981,939 capacity-feasible uniform improvements and zero window-legal ones, so it contributes no paid-profile or kappa gain.", + "budget_minutes": 60, + "stop_rule": "Stop after the complete slack-7-anchored three-bin census, its incomparable companion, and the synthetic window control. Do not open a slack-3 anchor search in this session.", + "outcome": "negative-result", + "evidence": "PASS_SELECTED_SLACK7_CYCLE_OBSTRUCTION improving_patterns=77 capacity=32981939 window=0 same_call=0 known=17567+4319 incomparable_patterns=20 incomparable_capacity=325142 incomparable_window=0 synthetic_window_hits=1 roles=69120 no_new_kappa", + "author": "AI-assisted research session", + "ai_assistance": "Substantial AI assistance was used for the census design, exact arithmetic, implementation, checks, and write-up.", + "open_questions": [ + { + "question": "Does any directed three-bin cycle that avoids every slack-7 bin strictly majorize its slack triple and land inside the selected source-event windows?", + "why_it_matters": "The complex primitive still binds. A window-legal majorizing cycle outside this anchor would be a concrete idle-histogram improvement to price.", + "first_step": "Repeat this majorization join with the anchor restricted to the 754 roles in slack-3 bins, and reject any triple that also touches slack 7 so the domains stay disjoint.", + "blocked_by": "Slack-3 class products are much larger than the slack-7 join, and three-component transitions that are not majorization-ordered still need a separate exact sign rule." + } + ] +} diff --git a/research/selected-slack7-cycle-obstruction/VERIFY.json b/research/selected-slack7-cycle-obstruction/VERIFY.json new file mode 100644 index 0000000000..173f9791a7 --- /dev/null +++ b/research/selected-slack7-cycle-obstruction/VERIFY.json @@ -0,0 +1,32 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/complex-t16-rare-pattern-exchanges/data/OWNERS.json.gz", + "research/complex-t16-rare-pattern-exchanges/data/PLAN.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Recompute the slack-7 three-bin census, the known 17567+4319 rank-8 counts, the incomparable companion, and the one-hit synthetic window repair." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Repeat the census with assertions stripped and isolated imports; the explicit require checks must still pass." + } + ] +} diff --git a/research/selected-slack7-cycle-obstruction/verify.py b/research/selected-slack7-cycle-obstruction/verify.py new file mode 100644 index 0000000000..7dff87fcdc --- /dev/null +++ b/research/selected-slack7-cycle-obstruction/verify.py @@ -0,0 +1,254 @@ +#!/usr/bin/env python3 +"""Exact window obstruction for slack-7 three-bin cycles on the selected map. + +The selected PR1094 owner map is read from the pinned PLAN and OWNERS files. +No supplier, controller, invoice, or selected record is modified. +""" + +import gzip +import json +from collections import defaultdict +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[2] +PLAN = ROOT / "research/complex-t16-rare-pattern-exchanges/data/PLAN.json" +OWNERS = ROOT / "research/complex-t16-rare-pattern-exchanges/data/OWNERS.json.gz" +ANCHORS = ((7, 4), (7, 8), (7, 9)) +KNOWN = { + ((7, 8), (0, 8), (1, 7)): 17567, + ((7, 8), (1, 7), (0, 7)): 4319, +} + + +def require(condition, message): + if not condition: + raise SystemExit(message) + + +def load(): + plan = json.loads(PLAN.read_text()) + with gzip.open(OWNERS, "rt") as handle: + owners = json.load(handle) + capmap = {} + windows = {} + for key, (cap, times) in plan["windows"].items(): + replica, child = map(int, key.split(",")) + windows[(replica, child)] = set(times) + for port in range(112): + capmap[(replica, child, port)] = cap + used = defaultdict(int) + for role in owners: + used[(role["owner_replica"], role["child"], role["port"])] += role["width"] + count = len(owners) + slack = [0] * count + width = [0] * count + owner = [0] * count + child = [0] * count + port = [0] * count + moment = [0] * count + stage = [0] * count + replica = [0] * count + groups = defaultdict(list) + for index, role in enumerate(owners): + bin_id = (role["owner_replica"], role["child"], role["port"]) + slack[index] = capmap[bin_id] - used[bin_id] + require(slack[index] >= 0, "overfull selected bin") + width[index] = role["width"] + owner[index], child[index], port[index] = bin_id + moment[index] = role["time"] + stage[index] = role["stage"] + replica[index] = role["replica"] + require(moment[index] in windows[(bin_id[0], bin_id[1])], "selected role outside its window") + groups[(slack[index], width[index])].append(index) + bins = [(owner[i], child[i], port[i]) for i in range(count)] + return { + "windows": windows, + "slack": slack, + "groups": groups, + "bins": bins, + "time": moment, + "stage": stage, + "replica": replica, + "roles": count, + } + + +def sign(old, new): + """Return improve, worsen, neutral, incomparable, or infeasible.""" + if any(value < 0 for value in new) or sum(old) != sum(new): + return "infeasible" + old_sorted = tuple(sorted(old, reverse=True)) + new_sorted = tuple(sorted(new, reverse=True)) + if old_sorted == new_sorted: + return "neutral" + + def majorizes(left, right): + return left[0] >= right[0] and left[0] + left[1] >= right[0] + right[1] + + if majorizes(new_sorted, old_sorted): + return "improve" + if majorizes(old_sorted, new_sorted): + return "worsen" + return "incomparable" + + +def patterns_for(groups, kind): + classes = list(groups) + found = [] + for anchor in ANCHORS: + for second in classes: + for third in classes: + old = (anchor[0], second[0], third[0]) + new = ( + anchor[0] + anchor[1] - third[1], + second[0] + second[1] - anchor[1], + third[0] + third[1] - second[1], + ) + if sign(old, new) == kind: + found.append((anchor, second, third, old, new)) + return found + + +def census(data, patterns): + windows = data["windows"] + slack = data["slack"] + groups = data["groups"] + bins = data["bins"] + moment = data["time"] + stage = data["stage"] + replica = data["replica"] + capacity = 0 + window = 0 + same_call = 0 + known = {key: 0 for key in KNOWN} + known_window = {key: 0 for key in KNOWN} + for anchor, second, third, _old, _new in patterns: + key = (anchor, second, third) + for first_index in groups[anchor]: + first_bin = bins[first_index] + first_time = moment[first_index] + first_window = windows[(first_bin[0], first_bin[1])] + first_call = (stage[first_index], replica[first_index]) + for second_index in groups[second]: + second_bin = bins[second_index] + if second_bin == first_bin: + continue + if slack[second_index] == 7 and second_index < first_index: + continue + first_lands = first_time in windows[(second_bin[0], second_bin[1])] + second_time = moment[second_index] + second_call = (stage[second_index], replica[second_index]) + for third_index in groups[third]: + third_bin = bins[third_index] + if third_bin == first_bin or third_bin == second_bin: + continue + if slack[third_index] == 7 and third_index < first_index: + continue + capacity += 1 + same = first_call == second_call == (stage[third_index], replica[third_index]) + if same: + same_call += 1 + if key in known: + known[key] += 1 + legal = ( + first_lands + and moment[third_index] in first_window + and second_time in windows[(third_bin[0], third_bin[1])] + ) + if legal: + window += 1 + if key in known_window: + known_window[key] += 1 + return { + "capacity": capacity, + "window": window, + "same_call": same_call, + "known": known, + "known_window": known_window, + } + + +def synthetic_known_window(data): + """Repair both blocked legs of one recorded rank-8 triple and expect one hit. + + On the real windows, the (7,8)->(0,8) landings and the (0,8)->(1,7) + landings are disjoint, and the (1,7) role never lands in the slack-7 bin. + Opening only one of those facts leaves the pattern empty. The control + therefore adds the slack-7 call time to that one middle bin's complement + and adds the unique middle time that already accepts the slack-7 role. + """ + windows = {key: set(value) for key, value in data["windows"].items()} + groups = data["groups"] + bins = data["bins"] + moment = data["time"] + anchor = groups[(7, 8)] + destination = groups[(1, 7)] + require(len(anchor) == 1 and len(destination) == 1, "unique rank-8 endpoint roles moved") + anchor_index = anchor[0] + destination_index = destination[0] + anchor_bin = bins[anchor_index] + destination_bin = bins[destination_index] + by_time = {} + for second_index in groups[(0, 8)]: + second_bin = bins[second_index] + if second_bin == anchor_bin or second_bin == destination_bin: + continue + if moment[anchor_index] not in windows[(second_bin[0], second_bin[1])]: + continue + by_time.setdefault(moment[second_index], []).append(second_index) + singletons = [indexes[0] for indexes in by_time.values() if len(indexes) == 1] + require(len(singletons) == 1, "expected one unique repairable middle time") + windows[(anchor_bin[0], anchor_bin[1])].add(moment[destination_index]) + windows[(destination_bin[0], destination_bin[1])].add(moment[singletons[0]]) + hits = 0 + for second_index in groups[(0, 8)]: + second_bin = bins[second_index] + if second_bin == anchor_bin or second_bin == destination_bin: + continue + if moment[anchor_index] not in windows[(second_bin[0], second_bin[1])]: + continue + if moment[destination_index] not in windows[(anchor_bin[0], anchor_bin[1])]: + continue + if moment[second_index] not in windows[(destination_bin[0], destination_bin[1])]: + continue + hits += 1 + return hits + + +def main(): + require(sign((7, 0, 1), (8, 0, 0)) == "improve", "rank-8 sign control") + require(sign((8, 0, 0), (7, 0, 1)) == "worsen", "reverse rank-8 sign control") + require(sign((7, 1, 7), (3, 4, 8)) == "incomparable", "nonuniform sign control") + require(sign((1, 1, 1), (3, 0, -1)) == "infeasible", "negative-slack sign control") + data = load() + require(data["roles"] == 69120, "role count") + improving = patterns_for(data["groups"], "improve") + incomparable = patterns_for(data["groups"], "incomparable") + require(len(improving) == 77, "improving pattern count") + require(len(patterns_for(data["groups"], "worsen")) == 96, "worsening pattern count") + require(len(patterns_for(data["groups"], "neutral")) == 39, "neutral pattern count") + require(len(patterns_for(data["groups"], "infeasible")) == 275, "infeasible pattern count") + require(len(incomparable) == 20, "incomparable pattern count") + require(3 * len(data["groups"]) ** 2 == 77 + 96 + 39 + 275 + 20, "pattern partition") + result = census(data, improving) + other = census(data, incomparable) + synthetic = synthetic_known_window(data) + require(result["known"] == KNOWN, "known capacity counts drifted: " + str(result["known"])) + require(result["known_window"] == {key: 0 for key in KNOWN}, "known patterns became window-legal") + require(result["capacity"] == 32981939, "capacity total drifted") + require(result["window"] == 0, "a uniformly improving cycle passed every window") + require(result["same_call"] == 0, "same-call improving cycle appeared") + require(other["capacity"] == 325142, "incomparable capacity total drifted: " + str(other["capacity"])) + require(other["window"] == 0, "an incomparable cycle passed every window") + require(synthetic == 1, "synthetic window control drifted: " + str(synthetic)) + print( + "PASS_SELECTED_SLACK7_CYCLE_OBSTRUCTION " + f"improving_patterns=77 capacity={result['capacity']} window=0 " + f"same_call=0 known=17567+4319 incomparable_patterns=20 " + f"incomparable_capacity={other['capacity']} incomparable_window=0 " + f"synthetic_window_hits={synthetic} roles=69120 no_new_kappa" + ) + + +if __name__ == "__main__": + main()