From ec150978dfc52df7755ac52c6caaf501366a00db Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 20 Oct 2026 03:24:25 +0000 Subject: [PATCH] Price the plane-port u=2 screen against the rank-8 cell's 16-child slack. The ideal selected-centre/rank-8/two-unpaid cell still passes 16 added rank-1 children at a=1/98 and fails at 17. The recorded plane-port copy invoice overspends that coverage law, and the decoder-free shrink screen misses the target by at least 68 rank-1 children. No new kappa. Co-authored-by: unpaidmoon --- research/rank8-u2-plane-port-slack/README.md | 122 +++++++++ .../rank8-u2-plane-port-slack/RESULT.json | 14 + .../rank8-u2-plane-port-slack/SOURCES.json | 30 ++ research/rank8-u2-plane-port-slack/TASK.json | 72 +++++ .../rank8-u2-plane-port-slack/VERIFY.json | 22 ++ research/rank8-u2-plane-port-slack/verify.py | 259 ++++++++++++++++++ 6 files changed, 519 insertions(+) create mode 100644 research/rank8-u2-plane-port-slack/README.md create mode 100644 research/rank8-u2-plane-port-slack/RESULT.json create mode 100644 research/rank8-u2-plane-port-slack/SOURCES.json create mode 100644 research/rank8-u2-plane-port-slack/TASK.json create mode 100644 research/rank8-u2-plane-port-slack/VERIFY.json create mode 100644 research/rank8-u2-plane-port-slack/verify.py diff --git a/research/rank8-u2-plane-port-slack/README.md b/research/rank8-u2-plane-port-slack/README.md new file mode 100644 index 0000000000..65e5b510e1 --- /dev/null +++ b/research/rank8-u2-plane-port-slack/README.md @@ -0,0 +1,122 @@ +# The plane-port u=2 screen misses the rank-8/u2 16-child slack + +**Negative pricing result. No new κ.** The selected conditional result stays +`836330098538459/500000000000000000` (`0.001672660197076918`). + +PR #3889 shows that the ideal cell `selected centre + all local mass at rank ≤ 8 ++ two unpaid coordinates` still clears `κ = 1/99` after integer rounding, with +room for **16** added rank-1 children on the nine-call uniform pool and not 17. +That cell is not a producer. This package prices the recorded contract that +actually leaves two unpaid coordinates, and it does not fit that room. + +## Result + +The selected line-port word `{1:2412, 2:418, 3:432, 4:142, 5:82, 8:8}` has mass +5586 per call and idle 1646 under PR1012's identity `72W + 64N`. It is not a +rank-8 delivery of that mass. The recorded u=2 endpoint is ctoth's plane-port +contract (source `E → FULL`, target `0 → E⊥`), as screened in +`research/plane-port-copy-budgets`. + +1. **Source-bound copy invoice.** The direct native bill in + `research/paired-plane-native-payload` uses 112 rank-2 drops per call, so + `C = 224`. Two unpaid coordinates free only `2·(896/9) = 1792/9` units per + call. `224 > 1792/9`, and the demanded mass is + `71·896 + 224·9 = 65632` against capacity `73·896 = 65408`, ratio + **293/292**. Idle would be negative. This invoice cannot be added to any + histogram that already meets the u=2 law, including the ideal rank-8 cell. + +2. **Decoder-free screen.** Drop that invoice and remove the 224 data units as + rank-1 children, which is the favorable `shrink` row at charge 0. Its + relaxation moment at `a = 1/98` has lower bound strictly above 1. Charging + each rank-1 child at the upper enclosure `(1/73)^(97/98)`, at least **68** + such children would have to be removed before that lower bound can fall to 1. + The same test gives **147** on the `unchanged` row. The ideal cell's moment, + after the 16 children that still pass, remains strictly below 1, so the + shrink screen also sits at least 68 maximum-cost rank-1 children above that + saturated bill. + +The shrink word has maximum rank 5 and mass 5298. It is not the rank-8 +histogram `{8:698, 2:1}` whose nine-call repeat is the integer cell. No +source-bound rank-8/u2 producer was found in the pinned inputs. + +## What was recomputed + +From `research/complex-local-word-ceiling/ceiling.py` and the selected mass: + +| Object | Nine-call certificate at a = 1/98 | +|---|---| +| Ideal paid `{8:6282, 2:9}` plus idle `{51:272, 46:1}` | Moment upper bound `< 1`. Adding 16 rank-1 children still passes; 17 fails. | +| Plane-port shrink, centre 0, fractional idle | Moment lower bound `> 1` by at least 68 rank-1 children. | +| Plane-port unchanged, centre 0 | Moment lower bound `> 1` by at least 147 rank-1 children. | +| Copy charge `C = 224` | Coverage overspend 224; ratio 293/292. | + +The 16/17 boundary uses the same additive model as PR #3889: extra rank-1 +children increase the moment and do not receive idle-mass credit. The plane-port +rows use `ceiling.relax`, whose fractional idle packing is optimistic relative +to an integer idle histogram. A failure there rules out every integer idle +packing of the same local word. + +## Scope + +Card `complex-new-helper-inventory`, scope **changed**. The card asks for a new +physically realizable inventory. The handoff asks for a priced rank-8/u2 +contract or a stop. This is the stop. It does not construct a decoder, change +the coverage law, or admit a supplier. + +Not claimed: a lower bound on every possible u=2 mechanism, a bit-side twin, or +a proof that no future rank-8 delivery exists. Joint two-array primitives +outside the one-array copy interface are a different contract. The plane-port +exactness check in discussion 1587 is used as published and is not re-run. + +## Reproduce + +Python 3.12, standard library only, from the repository root: + +```sh +python3.12 -I -B research/rank8-u2-plane-port-slack/verify.py +python3.12 -B scripts/research_package.py --package research/rank8-u2-plane-port-slack +``` + +Expected line: + +```text +PASS_RANK8_U2_PLANE_PORT_SLACK extra_pass=16 shrink_deficit=68 unchanged_deficit=147 above_saturated_cell=true native=293/292 no_new_kappa=true +``` + +`verify.py --write` regenerates `RESULT.json`. The checker hashes the pinned +ceiling engine and reads `CWORD`, `CDATA_DROP` and the template constants from +the pinned plane-port verifier without executing it. Controls reject a moved +selected κ, a rank-8 optimum other than `{8:698, 2:1}`, a line-port word that +passes `a = 1/98`, and a near-empty u=2 word that fails it. + +Not run: Lean, Docker, the selected cold replay, and the plane-port bit screen. + +## Open next questions + +1. Is there a u=2 producer whose paid children have rank at most 8 and whose + additive bill is at most 16 rank-1 children on this nine-call cell? That is + the only way this integer margin could survive contact with a producer. + First step: one literal histogram rerun at `a = 1/98`. Blocker: the selected + line-port word pays the unpaid=1 identity, and no rank-8 delivery of mass + 5586 is pinned here. +2. Can the 112 rank-2 drops be replaced by a charge of at most `1792/9` per + call without losing the `I_2` endpoint? `C = 224` is already impossible + inside this coverage law. First step: one native word on the 56 matched + planes with `C ≤ 199` and a checked transfer. Blocker: the one-array + interface needs two totals per block; a joint two-array primitive is a + different contract. + +## Credit + +The integer 16/17 boundary is Nick Petalas's question as answered by ToikY in +PR #3889 (`research/lever-integer-twins`, head +`a18b03ea76fb373aeb00acc9c4fe119ac617ac83`), on the grid in PR #3874. The +plane-port screen is ctoth's contract in discussion 1587, packaged by +JosieElliston in `research/plane-port-copy-budgets`. The copy-mass obstruction +`293/292` is the accounting in `research/paired-plane-native-payload` (Jeremy +Diviney / the PR2203 lineage) and is recomputed here. The moment engine is +Douglas Colkitt's `research/complex-local-word-ceiling`. The coverage identity +is Sagar Thakrar's PR1012. + +Prepared by unpaidmoon with substantial Cursor Grok assistance. No independent +human or formal-kernel review is claimed. New work is Apache-2.0. diff --git a/research/rank8-u2-plane-port-slack/RESULT.json b/research/rank8-u2-plane-port-slack/RESULT.json new file mode 100644 index 0000000000..2393511e89 --- /dev/null +++ b/research/rank8-u2-plane-port-slack/RESULT.json @@ -0,0 +1,14 @@ +{ + "ideal_extra_rank1_pass": 16, + "ideal_moment_high": "3704354446484012002304355223322905223550337644480295345499911721712485226114421/3705346855594118253554271520278013051304639509300498049262642688253220148477952", + "native_mass_ratio": "293/292", + "native_overspend": 224, + "no_new_kappa": true, + "shrink_c0_moment_low": "115918230524473042007406295047798346987035028812436289993517137146310558101631/115792089237316195423570985008687907853269984665640564039457584007913129639936", + "shrink_max_rank": 5, + "shrink_rank1_deficit": 68, + "status": "PASS_RANK8_U2_PLANE_PORT_SLACK", + "target_a": "1/98", + "target_kappa": "1/99", + "unchanged_rank1_deficit": 147 +} diff --git a/research/rank8-u2-plane-port-slack/SOURCES.json b/research/rank8-u2-plane-port-slack/SOURCES.json new file mode 100644 index 0000000000..52958cdbd9 --- /dev/null +++ b/research/rank8-u2-plane-port-slack/SOURCES.json @@ -0,0 +1,30 @@ +{ + "schema_version": 1, + "base_commit": "bb4bccbf42844d2801487450727c2f63e10d1d0f", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5", + "sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0" + }, + { + "path": "research/complex-local-word-ceiling/ceiling.py", + "usage": "input", + "git_blob": "6c0f54527d879396f689523bfde19928a9b6157c", + "sha256": "86a1432870b3b21d8454106ec9162fddc0471472d9214c590a1420f2426cedfc" + }, + { + "path": "research/plane-port-copy-budgets/verify.py", + "usage": "input", + "git_blob": "7f8effca7c25f1439a55188fc99f59a5fea26cd4", + "sha256": "54e731474e07ac7da1f1afb1b7e432869569e4ef03e8ae78584188b7cd3f9ef1" + } + ] +} diff --git a/research/rank8-u2-plane-port-slack/TASK.json b/research/rank8-u2-plane-port-slack/TASK.json new file mode 100644 index 0000000000..bd864a66b5 --- /dev/null +++ b/research/rank8-u2-plane-port-slack/TASK.json @@ -0,0 +1,72 @@ +{ + "schema_version": 1, + "task_id": "complex-new-helper-inventory", + "priority_revision": 6, + "base_commit": "bb4bccbf42844d2801487450727c2f63e10d1d0f", + "original_card": { + "id": "complex-new-helper-inventory", + "question": "Can a new local cost interface change the deficit-to-recursive-cost ratio beyond current packing?", + "starting_points": [ + "docs/research/research-family-status.md", + "research/complex-local-word-ceiling/README.md", + "research/heterogeneous-owner-assembly/README.md", + "certificates/selected-result.json", + "research/selected-k8-unrestricted-ends/README.md" + ], + "methods": [ + "Propose a changed helper inventory and derive an optimistic exact moment.", + "Design a small completed instance and independently verify its endpoint and rank bill." + ], + "acceptance_gate": "A new physically realizable contract outside the frozen catalogue whose per-call profile, screened with ceiling.ceiling(), beats the selected word's packing ceiling; a lower cap does not establish identical circuitry or order attainable optima, and is insufficient to pass the stronger-budget target under this model. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "first_step": { + "command": [ + "python3", + "-B", + "research/complex-local-word-ceiling/verify.py" + ], + "expected": "PASS_COMPLEX_LOCAL_WORD_CEILING", + "inspect": "Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.", + "scope": "Positive control and planning budget only; this is not a new construction or full cold replay." + }, + "first_experiment": "Before any synthesis, write the candidate per-call local profile (and centre charge / unpaid coordinates if changed) and screen it with ceiling.ceiling(); reject it if even the ideal ceiling does not beat the selected word's by your stated margin.", + "bottleneck_link": "Packing of the selected word is capped at +0.87% (ceiling model); only a lower local excess spend or a changed coverage law raises the cap.", + "allowed_variations": [ + "Narrow to one changed boundary or helper type with explicit counts.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "scope_change_triggers": [ + "Mixing only providers already inside the pinned catalogue.", + "Only changing helper terminal subspaces and monotone frames within the fixed scalar word, entrances and cleanup contract already covered by #1995/#2013.", + "Continuing a partial cost improvement while leaving the same unpriced consumer, restoration or central-readout obligation unresolved; refresh the family expansion decision first. Local product-retiming evidence has a narrow scope and is not a ban on changed graphs or contracts." + ], + "overlap_terms": [ + "helper inventory", + "heterogeneous-owner", + "mutable leaver" + ] + }, + "scope_status": "changed", + "actual_scope": "Price the recorded plane-port u=2 screen against the 16 rank-1 slack of the selected-centre/rank-8/u=2 integer cell. Stop without naming a new producer.", + "scope_change_reason": "The card asks for a new physically realizable helper inventory. Discussion #1166 comment 19029639, following PR #3889, asks first for a source-bound rank-8/u2 contract priced against that cell. The selected line-port word is not that contract. The recorded u=2 endpoint is the plane-port screen, and it fails the cell stop test.", + "bottleneck_link": "The complex side binds. The rank-8/u2 cell is the tightest ideal lever combination that clears kappa 1/99 in the published grid, with only 16 rank-1 children of integer slack on nine calls. A u=2 screen that misses this slack cannot be cited as headroom for a new helper inventory.", + "budget_minutes": 60, + "stop_rule": "Stop once the source-bound C=224 invoice is outside the u=2 coverage law and the decoder-free shrink screen fails a=1/98 by more than 16 rank-1 children. Do not search for another ideal ceiling.", + "outcome": "completed", + "evidence": "PASS_RANK8_U2_PLANE_PORT_SLACK. Ideal nine-call cell passes 16 added rank-1 children at a=1/98 and fails 17. Plane-port shrink moment lower bound is above 1 by at least 68 rank-1 children; the unchanged screen by at least 147. Native copy charge 224 exceeds two unpaid coordinates per call, mass ratio 293/292.", + "author": "unpaidmoon", + "ai_assistance": "Substantial: Cursor Grok selected the handoff, wrote the verifier and README, and ran the checks. No independent human or formal-kernel review is claimed.", + "open_questions": [ + { + "question": "Is there a u=2 producer whose paid children have rank at most 8 and whose additive bill is at most 16 rank-1 children on this nine-call cell?", + "why_it_matters": "That is the only way the rank-8/u2 integer margin could survive a physical contract. The plane-port screen does not.", + "first_step": "Name one literal producer, write its child histogram, and rerun this package moment test at a=1/98.", + "blocked_by": "The selected line-port word pays the unpaid=1 identity. No rank-8 delivery of mass 5586 is in the pinned sources." + }, + { + "question": "Can the 112 rank-2 plane drops be replaced by a charge of at most 1792/9 per call without losing the I_2 endpoint?", + "why_it_matters": "C=224 already exceeds the two unpaid coordinates, so the copy invoice is impossible inside this coverage law before the moment test.", + "first_step": "Give one native word on the 56 matched planes with copy mass C <= 199 and a checked I_2 transfer.", + "blocked_by": "paired-plane-native-payload proves two independent totals per block under the one-array interface; a joint two-array primitive is a different contract." + } + ] +} diff --git a/research/rank8-u2-plane-port-slack/VERIFY.json b/research/rank8-u2-plane-port-slack/VERIFY.json new file mode 100644 index 0000000000..149369538c --- /dev/null +++ b/research/rank8-u2-plane-port-slack/VERIFY.json @@ -0,0 +1,22 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/complex-local-word-ceiling/ceiling.py", + "research/plane-port-copy-budgets/verify.py" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 60, + "checks": "Recompute the 16/17 rank-1 boundary of the rank-8/u2 integer cell; certify plane-port shrink and unchanged moments above 1 at a=1/98; certify the C=224 coverage overspend 293/292; reject a moved selected kappa." + } + ] +} diff --git a/research/rank8-u2-plane-port-slack/verify.py b/research/rank8-u2-plane-port-slack/verify.py new file mode 100644 index 0000000000..0cc75b8396 --- /dev/null +++ b/research/rank8-u2-plane-port-slack/verify.py @@ -0,0 +1,259 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""The recorded u=2 plane-port screen misses the rank-8/u2 16-child slack. + +The selected-centre / rank-8 / two-unpaid integer cell from PR #3889 passes +a = 1/98 after 16 added rank-1 children on the nine-call pool and fails at 17. +That boundary is recomputed here from the selected local mass and +research/complex-local-word-ceiling/ceiling.py. It is not a physical producer. + +The plane-port contract (ctoth, discussion 1587; research/plane-port-copy-budgets) +is the recorded endpoint that leaves two unpaid coordinates. Its source-bound +copy invoice of 112 rank-2 drops per call (C = 224; paired-plane-native-payload) +demands more paid mass than 73 coordinates per family, so it cannot be an +additive bill on a feasible u=2 histogram. Dropping that invoice and shortening +224 data units as rank-1 children, the most favorable screen in the copy-budget +package, still has relaxation moment > 1 at a = 1/98. The certified rank-1 +deficit of that screen is strictly larger than the cell's whole 16-child slack. + +No new kappa. The selected conditional result is unchanged. +""" +import ast +import hashlib +import importlib.util +import json +import sys +from collections import Counter +from fractions import Fraction as Q +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parent.parent +A = Q(1, 98) +CALLS = 9 +FAMILIES = 896 +WIDTH = 73 +SELECTED_MASS = 5586 +CENTRE = 64 +RANK_CAP = 8 +IDLE_CAP = 51 +COPY_CHARGE = 224 +POOL_RANK1_SLACK = 16 + + +class Fail(Exception): + pass + + +def need(ok, why): + if not ok: + raise Fail(why) + + +def pins(): + data = json.loads((HERE / 'SOURCES.json').read_text(encoding='utf-8')) + out = {} + for row in data['files']: + if row['usage'] == 'input': + path = ROOT / row['path'] + digest = hashlib.sha256(path.read_bytes()).hexdigest() + need(digest == row['sha256'], 'pin mismatch: ' + row['path']) + out[row['path']] = path + return out + + +def load_ceiling(path): + spec = importlib.util.spec_from_file_location('pinned_ceiling', path) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +def literal_assignments(path, names): + tree = ast.parse(path.read_text(encoding='utf-8')) + found = {} + for node in tree.body: + if not isinstance(node, ast.Assign) or len(node.targets) != 1: + continue + target = node.targets[0] + if isinstance(target, ast.Name) and target.id in names: + found[target.id] = ast.literal_eval(node.value) + elif isinstance(target, ast.Tuple): + value = node.value + if not isinstance(value, ast.Tuple) or len(value.elts) != len(target.elts): + continue + for name_node, value_node in zip(target.elts, value.elts): + if isinstance(name_node, ast.Name) and name_node.id in names: + found[name_node.id] = ast.literal_eval(value_node) + need(set(found) == set(names), 'plane-port constants missing: ' + ','.join(sorted(set(names) - set(found)))) + return found + + +def optimum(mass, cap): + need(type(mass) is int and mass >= 0, 'mass') + need(type(cap) is int and 0 < cap <= IDLE_CAP, 'cap') + quotient, remainder = divmod(mass, cap) + histogram = {} + if quotient: + histogram[cap] = quotient + if remainder: + histogram[remainder] = 1 + return histogram + + +def moment(ceiling, histogram, families, saving): + low = high = Q(0) + for rank, count in histogram.items(): + left, right = ceiling.child_cost(rank, WIDTH, saving) + low += count * left + high += count * right + return low / families, high / families + + +def ideal_pool(ceiling): + per_call = optimum(SELECTED_MASS, RANK_CAP) + need(per_call == {8: 698, 2: 1}, 'rank-8 optimum of the selected mass') + paid = Counter({rank: count * CALLS for rank, count in per_call.items()}) + paid_mass = SELECTED_MASS * CALLS + need(sum(rank * count for rank, count in paid.items()) == paid_mass, 'ideal paid mass') + idle_mass = (WIDTH - 2) * FAMILIES + CENTRE * CALLS - paid_mass + need(idle_mass == 13918, 'ideal idle mass') + idle = optimum(idle_mass, IDLE_CAP) + need(idle == {51: 272, 46: 1}, 'ideal idle histogram') + histogram = Counter(paid) + Counter(idle) + low, high = moment(ceiling, histogram, FAMILIES, A) + unit_low, unit_high = ceiling.child_cost(1, WIDTH, A) + extra = int((1 - high) * FAMILIES / unit_high) + need(high + Q(extra, FAMILIES) * unit_high < 1 < low + Q(extra + 1, FAMILIES) * unit_low, + 'ideal surcharge boundary') + need(extra == POOL_RANK1_SLACK, 'published 16-child boundary') + saturated = high + Q(POOL_RANK1_SLACK, FAMILIES) * unit_high + need(saturated < 1, 'sixteen rank-1 children still pass') + return dict(paid=dict(paid), idle=idle, moment_low=low, moment_high=high, + unit_low=unit_low, unit_high=unit_high, saturated_high=saturated) + + +def plane_words(constants): + word = dict(constants['CWORD']) + need(word == {1: 2412, 2: 418, 3: 432, 4: 142, 5: 82, 8: 8}, 'selected local word') + need(constants['CDATA_DROP'] == 224, 'data shrink') + need((constants['CM'], constants['CFAM'], constants['CST']) == (WIDTH, FAMILIES, CALLS), + 'plane-port template') + unchanged = {rank: count for rank, count in word.items() if not (rank == 8 and count == 8)} + need(8 not in unchanged, 'centre copies remain') + shrink = dict(unchanged) + shrink[1] -= 224 + need(min(shrink.values()) > 0, 'shrink underflow') + need(max(shrink) == 5, 'shrink is not a rank-8 delivery') + need(sum(rank * count for rank, count in shrink.items()) == 5298, 'shrink mass') + native = dict(shrink) + native[2] = native.get(2, 0) + 112 + return unchanged, shrink, native + + +def rank1_deficit(moment_low, unit_high): + """Largest d such that subtracting d maximum rank-1 costs leaves the lower moment >= 1.""" + need(moment_low > 1, 'profile does not fail') + deficit = int((moment_low - 1) * FAMILIES / unit_high) + need(moment_low - Q(deficit, FAMILIES) * unit_high >= 1, 'deficit enclosure') + need(moment_low - Q(deficit + 1, FAMILIES) * unit_high < 1, 'deficit not maximal') + return deficit + + +def screen(ceiling, local, centre, unpaid): + low, high = ceiling.relax(local, WIDTH, FAMILIES, CALLS, centre, A, unpaid=unpaid) + need(low <= high, 'crossed enclosure') + return low, high + + +def coverage_controls(ceiling, word): + mass = sum(rank * count for rank, count in word.items()) + need(mass == SELECTED_MASS, 'selected mass') + per_call = Q(FAMILIES, CALLS) + line_total = (WIDTH - 1) * per_call + CENTRE + need(line_total - mass == 1646, 'line-port idle 1646') + replica_paid = mass * CALLS + replica_law = (WIDTH - 1) * FAMILIES + CENTRE * CALLS + need(replica_law - replica_paid == 1646 * CALLS, 'nine-call line-port identity') + need(ceiling.max_idle_rank(WIDTH) == IDLE_CAP, 'halving guard') + # The same local word at unpaid=1 and a=1/98 is far above one. u=2 is load-bearing. + line_low, _line_high = screen(ceiling, word, CENTRE, 1) + need(line_low > 1, 'line-port word fails a=1/98') + # A vacuous idle-only word must be able to pass, so a later failure is not a dead engine. + empty_low, empty_high = screen(ceiling, {1: 1}, 1, 2) + need(empty_high < 1, 'near-empty u=2 word passes a=1/98') + + +def native_obstruction(): + demanded = (WIDTH - 2) * FAMILIES + COPY_CHARGE * CALLS + capacity = WIDTH * FAMILIES + need(demanded == 65632 and capacity == 65408, 'native mass arithmetic') + need(Q(demanded, capacity) == Q(293, 292), 'native mass ratio') + need(demanded - capacity == 224, 'native overspend') + per_call_deficit = Q(COPY_CHARGE) - 2 * Q(FAMILIES, CALLS) + need(per_call_deficit == Q(224, 9), 'copy charge exceeds two unpaid coordinates') + + +def main(): + pinned = pins() + ceiling = load_ceiling(pinned['research/complex-local-word-ceiling/ceiling.py']) + constants = literal_assignments( + pinned['research/plane-port-copy-budgets/verify.py'], + {'CWORD', 'CDATA_DROP', 'CM', 'CFAM', 'CST'}) + word = constants['CWORD'] + coverage_controls(ceiling, word) + native_obstruction() + ideal = ideal_pool(ceiling) + unchanged, shrink, native = plane_words(constants) + rows = { + 'unchanged_c0': screen(ceiling, unchanged, 0, 2), + 'shrink_c0': screen(ceiling, shrink, 0, 2), + 'shrink_plus_112_rank2': screen(ceiling, native, COPY_CHARGE, 2), + } + for name, (low, _high) in rows.items(): + need(low > 1, name + ' does not fail a=1/98') + shrink_deficit = rank1_deficit(rows['shrink_c0'][0], ideal['unit_high']) + unchanged_deficit = rank1_deficit(rows['unchanged_c0'][0], ideal['unit_high']) + need(shrink_deficit == 68, 'favorable-screen deficit') + need(unchanged_deficit == 147, 'unchanged-screen deficit') + # shrink_low >= 1 + 68 * uh / F > saturated_high + 68 * uh / F, + # and saturated_high already includes the 16 passing rank-1 children. + need(rows['shrink_c0'][0] - Q(shrink_deficit, FAMILIES) * ideal['unit_high'] + >= 1 > ideal['saturated_high'], 'shrink screen is not above the saturated cell') + selected = json.loads((ROOT / 'certificates/selected-result.json').read_text(encoding='utf-8')) + need(Q(selected['kappa']) == Q(836330098538459, 500000000000000000), 'selected kappa moved') + receipt = { + 'status': 'PASS_RANK8_U2_PLANE_PORT_SLACK', + 'target_a': '1/98', + 'target_kappa': '1/99', + 'ideal_extra_rank1_pass': POOL_RANK1_SLACK, + 'ideal_moment_high': str(ideal['moment_high']), + 'shrink_c0_moment_low': str(rows['shrink_c0'][0]), + 'shrink_rank1_deficit': shrink_deficit, + 'unchanged_rank1_deficit': unchanged_deficit, + 'native_mass_ratio': '293/292', + 'native_overspend': 224, + 'shrink_max_rank': 5, + 'no_new_kappa': True, + } + text = json.dumps(receipt, indent=2, sort_keys=True) + '\n' + path = HERE / 'RESULT.json' + if '--write' in sys.argv: + path.write_text(text, encoding='utf-8') + else: + need(path.read_text(encoding='utf-8') == text, 'RESULT.json differs') + print(receipt['status'] + + ' extra_pass=' + str(POOL_RANK1_SLACK) + + ' shrink_deficit=' + str(shrink_deficit) + + ' unchanged_deficit=' + str(unchanged_deficit) + + ' above_saturated_cell=true' + + ' native=293/292' + + ' no_new_kappa=true') + + +if __name__ == '__main__': + try: + main() + except Fail as exc: + print('FAIL_RANK8_U2_PLANE_PORT_SLACK', exc, file=sys.stderr) + sys.exit(1)