diff --git a/research/p104-exterior-route-recoding/PROOF.md b/research/p104-exterior-route-recoding/PROOF.md new file mode 100644 index 0000000000..473f713394 --- /dev/null +++ b/research/p104-exterior-route-recoding/PROOF.md @@ -0,0 +1,82 @@ +# Port rigidity, two retirements and a cut certificate + +## Word and observations + +The source is Clear1nsight's literal rational continuation word at `89a67c404226d51028e135de2b9169e9020d57af`. Its 1,289 public coordinates are independent over $\mathbb Q$. A paid step deposits one scalar at its destination chart. A terminal reads its chart's local stock. The original program has 5,709 paid sends, 902 distinct demanded outputs at receiver 127, and 387 exterior outputs. Chart 278 owns no public atoms. Its ten paid ingresses all precede its ten egresses. The receiver also owns no public atoms and all its demands are linear combinations of its 902 deposits. Write $v_k$ for the original scalar at step $k$. A step identifier does not specify its chronological time. [Source and method pins](SOURCE-PINS.json) + +First fix the original ingresses and permit arbitrary rational-linear changes to all ten chart-278 egresses. Propagate them through the fixed intervening program. Preserve all exterior terminal operators and allow arbitrary deterministic readout at the receiver. The local equations below give the exact deficit in receiver observations for any such recoding. We then fix either of two specific mergers and charge every additional positive-grade send, while granting each chart all its original local public atoms and all of its **post-merger** paid arrivals at any time. This grants a stronger observer than a causal one for the lower bound. The matching upper bounds reinstall the actual chronology. An additional paid transfer connects comparable original binary spans and costs $p(g)$ for their absolute rank difference $g$. Sharing a value between equal spans may be free. Only the payloads of new corrective sends and the final receiver readouts may be coded during the additive repair. Every native paid formula outside the named merger keeps its post-merger meaning. Reusing a funded channel to convey new information would change this last premise. + +## All ten jointly recoded egresses + +Write $A=95887$, $B=100336$ and $C=95914$. Inject ten independent scalar perturbations at the chart-278 outputs. Following the fixed native formulas gives a rational $387\times 10$ exterior response matrix of rank eight. Its kernel has the basis $e_A-e_B,e_C$. Therefore equality at the exterior on every public input allows exactly + +$$ +\Delta v_A=h,\qquad \Delta v_B=-h,\qquad \Delta v_C=j +$$ + +with every other egress unchanged. Since chart 278 owns no other stock, $h,j$ lie in the span $U$ of its ten ingress functions. Upon propagating these two directions the only changed receiver deposits are + +| Receiver deposit | Change | +|---|---:| +| 103472 | $h$ | +| 104080 | $-h/2$ | +| 88 | $j$ | + +The corrections for $h$ and $j$ can be chosen independently since all ingresses precede the three egresses. The response check uses exact rational elimination and all 387 exterior rows. [Pulse-matrix and receiver replay](check_rigidity.py) + +Let $R$ be the span of the 902 original demanded receiver outputs. Jointly expand these outputs and the ten ingress functions in the 1,289 public coordinates modulo 1,000,003. This is a prime and all denominators in the program are units there. The 912 rows have rank 912. A nonzero minor modulo this prime lifts to a nonzero rational minor. Thus $\dim R=902$, $\dim U=10$ and $R\cap U=0$. Since all 902 targets lie in the span of exactly 902 deposited rows, the original deposits form a basis of $R$. [Full row-rank certificate](check_rigidity.py) + +In $R\oplus U$, the new arrivals are the graph of a linear map $T:R\to U$ on this basis. The table gives $\mathrm{im}\,T=\mathrm{span}(h,j)$. If $d=\dim\mathrm{span}(h,j)$ and $R'$ is the new row span, then + +$$ +\dim R'=902,\qquad R\cap R'=\ker T,\qquad \dim(R+R')-\dim R'=d. +$$ + +In particular **the only successful zero-addition recoding is the original one**. For linear observations and targets, deterministic decodability implies inclusion of the target rows in the observation span. Indeed, observations agree on two inputs differing by a vector in their common kernel, so every recoverable linear target annihilates that kernel. More generally, exactly $d$ additional rational-linear receiver deposits are necessary. Sending a basis of $\mathrm{span}(h,j)$ directly from 278 suffices. Insert these sends after the last ingress and before the first chart-278 egress (zero-based source positions 1704 and 1749). The only changed terminal operators under the old readout are 155442 with shift $h/2+j$ and 155490 with shift $-h/2+j$, at positions 6950 and 6888. Subtract these shifts when the two readers execute. Earlier terminal reads remain valid with their native stock. This count allows arbitrary decoder functions. It counts rational-linear corrective scalars, a material restriction when $d=2$. + +## Two complete mergers and their literal repairs + +The paid slots on $278\to561$ (grade one) and $278\to660$ (grade five) have local payloads + +$$ +v_A=v_{94217}-v_{94218}-v_{95884},\qquad v_B=-v_A+v_{100334}. +$$ + +Retire either slot and remove all its old reader references. Put $v_{100334}$ in the surviving slot. This is an exterior-preserving perturbation with $j=0$. For retiring $B$ take $h=v_B$, and for retiring $A$ take $h=-v_A$. The old receiver decoder then yields changes of $+h/2$ at terminal 155442 and $-h/2$ at 155490, with every other terminal preserved. A new paid send $278\to127$ of the retired native payload lets the two terminal readers subtract their respective errors. Both payloads are known at 278 before either original slot. The fresh send can run in the chronological position of the retired send. The verifier checks native ownership and schedule, propagates the exact operator difference through all 1,289 terminal rows, and separately expands the two changed rows back into public coordinates. [Causal word builder and replay](check_mergers.py) + +## A two-coordinate witness and all minimum-grade routes + +Compare zero with $x_{674}=1, x_{722}=-1$ and all other coordinates zero. The public source charts are 11 and 58, both of rank one. Before either merger $v_A=2$, $v_B=-2$, and the original terminal 155442 at rank-nine chart 127 equals one. After **either** merger, exactly two of the 5,708 paid arrivals are nonzero on this input. They are $v_{94217}=1$ and $v_{94218}=-1$, both arriving at rank-two chart 278. Thus every post-merger chart stock at rank three or above agrees with its stock on zero. The verifier evaluates every surviving paid scalar. [Separating input and full-stock test](check_cuts.py) + +In a fixed finite corrective network of deterministic scalar messages, if the receiver distinguishes this pair then a chronological path must run from a chart with distinct stock to the receiver. Induct on sends. A first difference at a previously indistinguishable chart must arrive from a chart where some difference is already observable. Local deterministic computation does not create a difference from equal stock. Hence a path starts at rank at most two and reaches rank nine. The sum of absolute rank changes is at least seven. This holds even with arbitrary deterministic encoders for a single copy and free deterministic final readers. A data-dependent route or timing choice used as an uncharged communication channel is outside this fixed-schedule model. + +Equality in total grade forces the starting chart to be 278. Every positive-grade send must lie on one strictly ascending path. Up to free equal-span steps, its vertices form a strictly nested chain of original spans between 278 and 127. Enumerating the spans of all 1,103 original frames gives 56 charts in this interval, all with distinct spans. Their counts in ranks two through nine are $1,3,4,3,6,14,24,1$. Recursing from each vertex over **every** strict superchart in this interval gives 933 chains. + +| Positive sends in the chain | 1 | 2 | 3 | 4 | 5 | 6 | 7 | +|---|---:|---:|---:|---:|---:|---:|---:| +| Minimum-grade chains | 1 | 54 | 229 | 325 | 226 | 86 | 12 | + +Every chain attains grade seven by forwarding the retired scalar consecutively in the retired chronological position, before the affected terminal readouts. The direct and a seven-leg word are built for each merger, including all local-reader corrections. Branches with additional positive-grade sends cannot attain total grade seven. The chain count describes positive-grade route topologies and allows arbitrary local coding and free steps. + +## Tariff and independent copies + +Let $L$ independent copies of the post-merger word be available. Either orientation of the merger works in each copy. Allow scalar **rational-linear** corrective messages arbitrarily mixing those copies on a fixed network of original chart labels. The decoder may be deterministic nonlinear. Restrict the input in copy $i$ to $t_i$ times the two-coordinate witness. For each cut between ranks $r$ and $r+1$, $2\le r\le8$, the upper side initially sees zero on this $L$-dimensional space. Its observable linear row space restricted to the test increases in dimension by at most one per upward scalar and cannot increase from internal or downward messages. Correct outputs at 127 recover $(t_1,\ldots,t_L)$, requiring at least $L$ upward scalar crossings of each of the seven cuts. Downward feedback and arbitrary local linear side information already present above the cut cannot evade this count. + +An oriented edge $(a,b)$ between ranks crosses $m=\#\{2\le r\le8:a\le r crossed * seven[1], 'strict cut tariff inequality') + for d, text in [(1, '285.472830172972358520270568'), (5, '94.966797106425725799489376')]: + low, high = price(d) + expected = Fraction(text) + require(expected < 48*(seven[0] - high) <= 48*(seven[1] - low) < + expected + Fraction(1, 10**24), '48-call signed surcharge') + print('PASS all 100 oriented rank pairs satisfy the seven-cut tariff bound.') + print('PASS 48-call surcharges 285.472830172972358520270568… and 94.966797106425725799489376….') + + +def main(): + w, forms, moves, ends = read_word() + point = {674: 1, 722: -1} + original = evaluate(w, forms, point) + require(original[A] == 2 and original[B] == -2 and original[155442] == 1 and + ends[155442] == 127, 'incumbent required output separates the witness from zero') + require([w['initial'][j] for j in point] == [11, 58] and + [len(w['frames'][j]) for j in (11, 58, 278, 127)] == [1, 1, 2, 9], 'source ranks') + for retired in (A, B): + word, merged, routes = merge(w, forms, moves, retired) + values = evaluate(word, merged, point) + require({k: values[k] for k in routes if values[k]} == {94217: 1, 94218: -1}, + 'complete list of nonzero surviving paid arrivals') + require(routes[94217] == (11, 278) and routes[94218] == (58, 278), 'live stock owners') + require(all(values[k] == 0 for k in ends if ends[k] == 127), 'receiver sees the zero vector') + print('PASS each merger kills every fixed paid observation at every chart of rank three or higher.') + + spaces = [span(frame) for frame in w['frames']] + interval = [i for i, s in enumerate(spaces) if spaces[278] <= s <= spaces[127]] + require(len(spaces) == 1103 and len({spaces[i] for i in interval}) == len(interval) and + Counter(len(w['frames'][i]) for i in interval) == {2:1, 3:3, 4:4, 5:3, 6:6, 7:14, 8:24, 9:1}, + 'complete interval of existing charts with unique spans') + require(all(spaces[c] != spaces[i] for c in (11, 58) for i in range(len(spaces)) if i != c), + 'live public sources have no hidden equal-span peers') + + @cache + def paths(u): + if u == 127: + return [(127,)] + return [(u,) + path for v in interval if spaces[u] < spaces[v] for path in paths(v)] + + chains = paths(278) + require(Counter(len(p) - 1 for p in chains) == {1:1, 2:54, 3:229, 4:325, 5:226, 6:86, 7:12}, + '933 strictly ascending chains by number of legs') + require(all(sum(len(w['frames'][b]) - len(w['frames'][a]) for a, b in zip(p, p[1:])) == 7 + for p in chains), 'minimum grade on every recovered chain') + longest = max(chains, key=len) + for retired in (A, B): + word, new, routes, ids = repair(w, forms, moves, retired, longest) + compare(w, forms, word, new, routes, ends, retired, ids) + print('PASS all 933 minimum-grade paths on 56 charts; seven-hop causal reconstruction in both orientations.') + check_price() + + +if __name__ == '__main__': + main() diff --git a/research/p104-exterior-route-recoding/check_mergers.py b/research/p104-exterior-route-recoding/check_mergers.py new file mode 100644 index 0000000000..b7ab16ec83 --- /dev/null +++ b/research/p104-exterior-route-recoding/check_mergers.py @@ -0,0 +1,114 @@ +"""Build each port retirement and two complete repaired words, comparing every output.""" +from collections import Counter +from fractions import Fraction +from pathlib import Path +import sys + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +from check_rigidity import A, B, add +from word import check_causality, read_word, require + + +READER = {155442: Fraction(1, 2), 155490: Fraction(-1, 2)} + + +def merge(w, old, routes, retired): + survivor = B if retired == A else A + fused = dict(old[survivor]) + add(fused, old[retired], 1) + require(fused == {100334: 1}, 'the two payloads sum to one earlier arrival') + forms = {k: {j: q for j, q in row.items() if j != retired} + for k, row in old.items() if k != retired} + forms[survivor] = fused + moves = {k: e for k, e in routes.items() if k != retired} + word = w | {'schedule': [k for k in w['schedule'] if k != retired]} + return word, forms, moves + + +def repair(w, old, routes, retired, path): + require(path[0] == 278 and path[-1] == 127, 'correct repair endpoints') + word, forms, moves = merge(w, old, routes, retired) + pos = w['schedule'].index(retired) + new_ids = list(range(max(old) + 1, max(old) + len(path))) + word['schedule'][pos:pos] = new_ids + for i, k in enumerate(new_ids): + forms[k] = old[retired] if i == 0 else {new_ids[i - 1]: 1} + moves[k] = (path[i], path[i + 1]) + sign = 1 if retired == A else -1 + for k, q in READER.items(): + forms[k][new_ids[-1]] = sign * q + return word, forms, moves, new_ids + + +def pullback(order, forms, key): + row = {key: 1} + for k in reversed(order): + q = row.pop(k, 0) + if q: + add(row, forms[k], q) + require(all(j < 0 for j in row), 'adjoint terminates on public atoms') + return row + + +def compare(w, old, new, forms, moves, ends, retired, new_ids): + check_causality(new, forms, moves, ends) + survivor = B if retired == A else A + # The scalar difference of each common row is a multiple of the retired + # value. The coefficient is propagated simultaneously on all public inputs. + delta = {} + for k in new['schedule']: + if k == survivor: + joint = dict(old[survivor]) + add(joint, old[retired], 1) + require(forms[k] == joint and not any(delta.get(j, 0) for j in joint), + 'survivor receives the sum of the two original payloads') + delta[k] = 1 + elif k in new_ids: + if k == new_ids[0]: + require(forms[k] == old[retired] and not any(delta.get(j, 0) for j in forms[k]), + 'first leg sends the retired payload') + delta[k] = 1 + else: + delta[k] = sum(q * delta[j] for j, q in forms[k].items()) + else: + originals = {j: q for j, q in forms[k].items() if j not in new_ids} + require(originals == {j: q for j, q in old[k].items() if j != retired}, + 'all other original coefficients preserved') + delta[k] = sum(q * delta.get(j, 0) for j, q in forms[k].items()) - old[k].get(retired, 0) + errors = {k: delta[k] for k in ends if delta[k]} + sign = -1 if retired == A else 1 + expected = {} if new_ids else {k: sign * q for k, q in READER.items()} + require(errors == expected, 'whole-word terminal operator comparison') + for k in READER: + orig = pullback(w['schedule'], old, k) + add(orig, pullback(w['schedule'], old, retired), expected.get(k, 0)) + require(pullback(new['schedule'], forms, k) == orig, 'independent public-coordinate adjoint') + + +def main(): + w, old, routes, ends = read_word() + require(routes[A] == (278, 561) and routes[B] == (278, 660) and + [len(w['frames'][c]) for c in (278, 561, 660, 127)] == [2, 3, 7, 9], + 'original port endpoints and grades') + require(old[A] == {94217: 1, 94218: -1, 95884: -1} and + old[B] == {94217: -1, 94218: 1, 95884: 1, 100334: 1}, 'native pair on ingress') + def profile(paid): + return Counter(abs(len(w['frames'][u]) - len(w['frames'][v])) for u, v in paid.values()) + + baseline = Counter({1:3842, 2:792, 3:487, 4:230, 5:314, 6:40, 7:3, 8:1}) + require(profile(routes) == baseline, 'complete original paid profile') + for retired in (A, B): + word, forms, moves = merge(w, old, routes, retired) + compare(w, old, word, forms, moves, ends, retired, []) + word, forms, moves, ids = repair(w, old, routes, retired, (278, 127)) + compare(w, old, word, forms, moves, ends, retired, ids) + expected = baseline.copy() + expected[1 if retired == A else 5] -= 1 + expected[7] += 1 + require(profile(moves) == expected, 'complete repaired paid profile') + print('PASS both funded-port deletions preserve 387 exterior outputs and change exactly two receiver rows.') + print('PASS two direct repairs are causal and recover all 1,289 exact terminal operators.') + + +if __name__ == '__main__': + main() diff --git a/research/p104-exterior-route-recoding/check_rigidity.py b/research/p104-exterior-route-recoding/check_rigidity.py new file mode 100644 index 0000000000..2ea784500b --- /dev/null +++ b/research/p104-exterior-route-recoding/check_rigidity.py @@ -0,0 +1,124 @@ +"""Exact port responses and a modular certificate for rational transversality.""" +from fractions import Fraction +from functools import cache +from math import isqrt +from pathlib import Path +import sys + +sys.path.insert(0, str(Path(__file__).resolve().parent)) +from word import check_causality, read_word, require + + +A, B, PRIVATE = 95887, 100336, 95914 +PRIME = 1_000_003 + + +def add(row, other, factor): + for j, value in other.items(): + total = row.get(j, 0) + factor * value + if total: + row[j] = total + else: + row.pop(j, None) + + +def rational_rank(rows): + pivots = {} + for source in rows: + row = dict(source) + while row: + lead = min(row) + if lead not in pivots: + pivots[lead] = {j: Fraction(q) / row[lead] for j, q in row.items()} + break + add(row, pivots[lead], -row[lead]) + return len(pivots) + + +@cache +def residue(q): + return q.numerator * pow(q.denominator, -1, PRIME) % PRIME + + +def add_mod(row, other, factor): + for j, value in other.items(): + total = (row.get(j, 0) + factor * value) % PRIME + if total: + row[j] = total + else: + row.pop(j, None) + + +def modular_rank(rows): + pivots = {} + for source in rows: + row = dict(source) + while row: + lead = min(row) + if lead not in pivots: + inverse = pow(row[lead], -1, PRIME) + pivots[lead] = {j: q * inverse % PRIME for j, q in row.items()} + break + add_mod(row, pivots[lead], -row[lead]) + return len(pivots) + + +def main(): + w, forms, routes, ends = read_word() + check_causality(w, forms, routes, ends) + order = w['schedule'] + ins = {k for k, (_, v) in routes.items() if v == 278} + outs = {k for k, (u, _) in routes.items() if u == 278} + arrivals = {k for k, (_, v) in routes.items() if v == 127} + interior = {k for k, v in ends.items() if v == 127} + exterior = ends.keys() - interior + require((len(ins), len(outs), len(interior), len(arrivals), len(exterior)) == + (10, 10, 902, 902, 387), 'word dimensions') + require(278 not in w['initial'] and 127 not in w['initial'] and + not any(u == 127 for u, _ in routes.values()), 'source and receiver stock') + require(max(map(order.index, ins)) < min(map(order.index, outs)) and + all(forms[k].keys() <= ins for k in outs), 'all ten ingresses available') + require(all(forms[k].keys() <= arrivals for k in interior), 'native receiver decoder') + + # Overwrite outgoing definitions with ten independent tags. Every other + # operation is the literal word, with public input set to zero. + pulse = {} + for k in order: + row = {} + if k in outs: + row[k] = 1 + else: + for j, q in forms[k].items(): + add(row, pulse.get(j, {}), q) + pulse[k] = row + require(rational_rank(pulse[k] for k in exterior) == 8, 'exterior pulse rank') + shifts = {k: (row.get(A, 0) - row.get(B, 0), row.get(PRIVATE, 0)) + for k, row in pulse.items()} + require(all(shifts[k] == (0, 0) for k in exterior), 'two exterior kernel vectors') + require({k: shifts[k] for k in arrivals if any(shifts[k])} == + {103472: (1, 0), 104080: (Fraction(-1, 2), 0), 88: (0, 1)}, + 'receiver image of the two exterior-invisible directions') + half = Fraction(1, 2) + require({k: shifts[k] for k in ends if any(shifts[k])} == + {155442: (half, 1), 155490: (-half, 1)}, 'terminal image of both free shifts') + require(max(map(order.index, ins)) < min(order.index(k) for k in (155442, 155490)), + 'basis of either shift can be sent before all affected reads') + + require(all(PRIME % d for d in range(2, isqrt(PRIME) + 1)), 'prime field') + symbolic = {~j: {j: 1} for j in range(len(w['initial']))} + for k in order: + row = {} + for j, q in forms[k].items(): + add_mod(row, symbolic[j], residue(q)) + symbolic[k] = row + # Full row ranks over this prime give full row ranks over the rationals. + # Ten source rows and 902 demanded rows suffice because each demanded row + # is already a linear combination of exactly 902 received rows. + targets = sorted((symbolic[k] for k in interior), key=len) + require(modular_rank(targets + [symbolic[k] for k in sorted(ins)]) == 912, + 'joint full row rank on 1,289 independent public inputs') + print('PASS exterior rank 8/10, exact two-dimensional receiver response, joint rank 912/912.') + + +if __name__ == '__main__': + main() diff --git a/research/p104-exterior-route-recoding/retained/LICENSE b/research/p104-exterior-route-recoding/retained/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/p104-exterior-route-recoding/retained/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/p104-exterior-route-recoding/retained/PR7786-NOTICE b/research/p104-exterior-route-recoding/retained/PR7786-NOTICE new file mode 100644 index 0000000000..3b083891bf --- /dev/null +++ b/research/p104-exterior-route-recoding/retained/PR7786-NOTICE @@ -0,0 +1,16 @@ +Iterated returns on the P104 ordinary suppliers + +Clear1nsight prepared the successor construction, explicit witnesses and verification +with substantial OpenAI Codex assistance, including independent computational checks. +The new material is offered under Apache-2.0. + +The exact starting words and the rational and binary replay interfaces are from +Clear1nsight's PR #7781. The paid and productive scalar operations, the 48-call +complex schedule, the punctured binary supplier and the common outer application +come from Ali Romman's PR #7776. The two paid projections build on the local +quotient and terminal repair in #7774 and #7781. The binary paired caller and +finite compiler use work by DreamingOfClouds, Jerry Chen (CubeJerry), zxv and the +contributors cited in their retained sources. SYLforge, Rohan Arun, Cinna Davis, +Douglas Colkitt and other predecessors contributed the caller, physical and +analytic framework. The source-fetch helper is adapted from #7774. The immutable +source manifest identifies the public inputs and their notices. diff --git a/research/p104-exterior-route-recoding/retained/PR7795-NOTICE b/research/p104-exterior-route-recoding/retained/PR7795-NOTICE new file mode 100644 index 0000000000..6cbfdc843f --- /dev/null +++ b/research/p104-exterior-route-recoding/retained/PR7795-NOTICE @@ -0,0 +1,23 @@ +Paid slot 88 and linked chart bounds on the P104 four-return word + +Clear1nsight prepared the scoped arguments, source binding and replay package +with substantial OpenAI Codex assistance, including separate computational +checks of causal stock and directed price. New material is Apache-2.0. + +The source material from PR #7786 and the #7781 predecessor is credited to +Clear1nsight. Ali Romman's #7776 supplies the paid and productive scalar +operation model, the 48-call complex schedule, the punctured binary supplier +and the common outer application. The inherited reconstruction used the +restored-chain and local quotient work in #7774 and #7781. The chart-237 +operator and receiving-bank audit in Ali Romman's #7791 is a distinct earlier +source-aware check. Ali Romman's #7793 supplies a nearby one-source broadcast +result on a different information boundary. + +The cone roster, chart extraction, anchor closure and prior 66 integer-price +certificates preserve Clear1nsight's earlier P104 chart experiments. The +directed power enclosure retains the predecessor evaluate_recursive_power.py +implementation under Apache-2.0. DreamingOfClouds, Jerry Chen (CubeJerry), zxv, +SYLforge, Rohan Arun, Cinna Davis, Douglas Colkitt and the credited predecessor +contributors supplied the caller, compiler, physical and analytic framework. +See the source project's NOTICE and the source package's attribution for the +complete inherited lineage. diff --git a/research/p104-exterior-route-recoding/retained/WORD.json.gz b/research/p104-exterior-route-recoding/retained/WORD.json.gz new file mode 100644 index 0000000000..337a9d4f8b Binary files /dev/null and b/research/p104-exterior-route-recoding/retained/WORD.json.gz differ diff --git a/research/p104-exterior-route-recoding/word.py b/research/p104-exterior-route-recoding/word.py new file mode 100644 index 0000000000..c42aa2db12 --- /dev/null +++ b/research/p104-exterior-route-recoding/word.py @@ -0,0 +1,48 @@ +"""Read the source-bound rational P104 word. apoursh with OpenAI Codex, Apache-2.0.""" +from fractions import Fraction +from functools import cache +import gzip +import hashlib +import json +from pathlib import Path + + +def require(test, message): + if not test: + raise ValueError(message) + + +@cache +def scalar(value): + return Fraction(value) + + +def read_word(): + raw = (Path(__file__).parent / 'retained' / 'WORD.json.gz').read_bytes() + require(hashlib.sha256(raw).hexdigest() == + 'fde0f7eaa3749d0934a9fc0d6320074f021cd722ed6753f3a59a62fb5b221949', + 'original archive') + data = gzip.decompress(raw) + require(hashlib.sha256(data).hexdigest() == + 'c447b6d5ba956fbe40834fe3c1bc69af2f225736f1b97ecd84b57bab9dd283cb', + 'literal source word') + word = json.loads(data) + program = {k: {s: scalar(q) for s, q in row} for k, row in word['forms']} + routes = {k: (a, b) for k, a, b in word['moves']} + terminals = {word['first_output'] + j: c for j, c in enumerate(word['final'])} + require(len(word['schedule']) == len(program) == 6998 and + len(routes) == 5709 and len(terminals) == len(word['initial']) == 1289, + 'source dimensions') + require(set(word['schedule']) == set(program) == routes.keys() | terminals.keys(), + 'complete schedule') + return word, program, routes, terminals + + +def check_causality(word, program, routes, terminals): + homes = {~i: chart for i, chart in enumerate(word['initial'])} + for k in word['schedule']: + owner = routes[k][0] if k in routes else terminals[k] + require(all(homes.get(s) == owner for s in program[k]), + f'wrong causal stock at {k}') + if k in routes: + homes[k] = routes[k][1]