diff --git a/research/p104-event-contact-step/CLAIM.md b/research/p104-event-contact-step/CLAIM.md new file mode 100644 index 0000000000..cdad5e3f83 --- /dev/null +++ b/research/p104-event-contact-step/CLAIM.md @@ -0,0 +1,23 @@ +CLAIM — compose a further event-level P104 retime with the priced helper-706 handoff. + +Base: current canonical main `5e0052ca0aa3036a3afa8b0438927377c8d97d53`, priority revision 7. The exact construction input is [PR #5569](https://github.com/CrocSwap/integer-mult-bounds/pull/5569) at `af9f091ac6f30c6eaacb9c27777bfbe2d0e5ffdf`. I take its open joint-retime/handoff question and the released [free-stop handoff](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19181969). + +Question: does one additional legal event-frame change survive helper 706's changed endpoint and improve the complete paid profile beyond the raw .00308181851522-.00308181851523 crossing? Start with the exact event lattice from [PR #5568](https://github.com/CrocSwap/integer-mult-bounds/pull/5568), pinned at `47a347ff70044615e7be6581d275d12f5df38295`, with a 60-second single-worker solve; inspect and simplify any output to a small explicit edit. Event-order changes are a separate bounded fallback. This does not claim the predecessor retime or handoff as new work. + +Success requires an exact regenerated word, arbitrary-input forward/transpose and native replay, unchanged or explicitly repriced targets, the full physical caller, all ordinary costs, two rational moment engines and all compiler/outer predicates. A float/solver gain is not a kappa result. Retain the five framework assumptions and the helper-endpoint contract, pending independent scientific acceptance. No selected-frontier update. + +Overlap: 320 open PRs and 4,836 Discussion records were scanned with complete remote pagination at 20:03-20:04 UTC. Sparse local coverage is incomplete; the relevant P104 predecessor sources and live handoffs were read directly. The free-stop lead is released; toolkit construction and the existing native/caller audits remain credited and separate. The p19 headline in PR5440 has an explicit unresolved physical/compiler attachment and is not treated as a complete paid-caller baseline. + +Expected artifact: one source-pinned package, a short proof of its actual paid delta, complete replay and a focused conditional-kappa PR if the step survives. Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. + +```json +{ + "schema": "integer-mult-coordination/v1", + "kind": "CLAIM", + "task": "scalar-to-moment", + "scope": "P104 event-frame retime after the PR5569 priced helper-706 handoff; complete paid-profile step", + "base": "5e0052ca0aa3036a3afa8b0438927377c8d97d53", + "expiry": "2026-10-25T22:05:17.733973+00:00", + "artifact": null +} +``` diff --git a/research/p104-event-contact-step/LITERAL-CHANGES.diff b/research/p104-event-contact-step/LITERAL-CHANGES.diff new file mode 100644 index 0000000000..3b5a79727e --- /dev/null +++ b/research/p104-event-contact-step/LITERAL-CHANGES.diff @@ -0,0 +1,13 @@ +--- PR5569 pricing.py ++++ pricing.py +@@ -14,2 +14,2 @@ +-KAPPA, TESTED = Q('.00308181'), Q('.0030818105') +-PREVIOUS = Q('.00304117') ++KAPPA, TESTED = Q('.00308189'), Q('.0030818905') ++PREVIOUS = Q('.00308181') +@@ -142 +142 @@ +- return encode({'kappa':KAPPA,'kappa_decimal':'.00308181','previous_open_pr5545':PREVIOUS,'gain':KAPPA-PREVIOUS, ++ return encode({'kappa':KAPPA,'kappa_decimal':'.00308189','previous_open_pr5569':PREVIOUS,'gain':KAPPA-PREVIOUS, +@@ -154 +154 @@ +- 'tensor_native_growth_bound':'Each rank-r Gaussian has row l1 norm at most 2^(rf); sum of local ranks is 5894.'}, ++ 'tensor_native_growth_bound':f'Each rank-r Gaussian has row l1 norm at most 2^(rf); sum of local ranks is {sum(r*n for r,n in local["paid"].items())}.'}, diff --git a/research/p104-event-contact-step/PROOF.md b/research/p104-event-contact-step/PROOF.md new file mode 100644 index 0000000000..0051c81df5 --- /dev/null +++ b/research/p104-event-contact-step/PROOF.md @@ -0,0 +1,130 @@ +# One contact changes the complete P104 paid profile + +## Source and statement + +The input is the exact PR5569 word at +`af9f091ac6f30c6eaacb9c27777bfbe2d0e5ffdf`. See +[SOURCES.json](SOURCES.json) for the source bytes and retained PR5545 engine. +All event numbers below are zero-based source indices. + +The construction changes the chart of `ADD 451 += 228` at event 12658. +It retains every scalar instruction, coefficient and position in the scalar +sequence. It also retains all 735 public initial and final frames, 527 helper +targets, eight owned lifetimes and the 104 literal ports. + +At each of the 18 forward local calls, the paid change is + +```text +H2 - 2 H3 + H4. +``` + +The complete conditional claim is kappa = 0.00308189. This claim uses the +five inherited framework assumptions and the source helper-endpoint contract. +It does not change the selected record. + +## Exact contact identity + +Let O, A, B and C denote the following binary subspaces. Each list is an +independent basis in the fixed nine-dimensional ambient space. + +| Frame | Name | Basis | Dimension | +| --- | --- | --- | --- | +| 3 | O | `[]` | 0 | +| 262 | A | `[11,21,486]` | 3 | +| 737 | B | `[11,21,33,455]` | 4 | +| 520 | C | `[1,10,20,32,64,390]` | 6 | + +Their spans satisfy O < A < B < C. The replay checks these inclusions on +the complete binary spans. Chart transport preserves the abstract row. +Two transports through an intermediate chart compose to the direct transport. +A common chart change commutes with addition of two rows. + +Register 228 stays at A after event 9575. Its next scalar use after the +changed contact is event 12674 at C. Register 451 stays at O after event +12591. Its next scalar use after the changed contact is event 14424 at B. +The constructor checks every intervening register access, including reads. + +The old paths are 228: A to C, and 451: O to A to B. They meet at A for +the addition. The new paths are 228: A to B to C, and 451: O to B. They +meet at B for the same addition. Thus both abstract rows agree at their +next unchanged use. Every other row is unchanged. This proves the local +identity for arbitrary inputs, including arbitrary helper inputs. + +The old bill is H3 + H3 + H1. The new bill is H1 + H2 + H4. Their +difference is H2 - 2 H3 + H4. Paid count and rank mass are unchanged. +The only newly used ordered native frame pair is (3,737). The exact +native replay checks this pair and all 2,921 distinct paid/target pairs, +including their signed Pauli images, absolute phases and ranks. + +## Strict concave gain + +For 0 < k < 1, x raised to 1-k is strictly concave on positive x. Hence + +```text +2^(1-k) + 4^(1-k) < 2 * 3^(1-k). +``` + +Let M(k) be target moment minus paid moment. The new complete moment is + +```text +M_new(k) = M_parent(k) + 18 * (2 * 3^(1-k) - 2^(1-k) - 4^(1-k)). +``` + +It is strictly larger throughout that range. This is a change to the paid +profile. It is not extra numerical precision for the same equation. + +The exact rational engines give these crossing intervals: + +| Word | Lower endpoint | Upper endpoint | +| --- | --- | --- | +| PR5569 | 0.00308181851522 | 0.00308181851523 | +| This word | 0.00308189496866 | 0.00308189496867 | + +The raw gain is strictly between 0.00000007645343 and 0.00000007645345. +The claimed endpoint is 0.00308189; it is tested at 0.0030818905. Its raw +headroom is between 0.00000000496866 and 0.00000000496867. + +The checker also bounds M_new'(k) with rational intervals on [0,0.0034]. +The derivative lies between -255126 and -237752, so the crossing is unique +on that band. Its upper endpoint is the raw funding ceiling for this fixed +invoice under the retained BIT cap. A different word, endpoint contract or +BIT supplier is outside this ceiling. No global optimum is claimed. + +## Complete caller and costs + +The unchanged caller has 18 forward local calls, 15 query shears and +3,120 whole idle jobs. It has 66,852 paid jobs, 12,814 productive fields, +rank-mass surplus 760, maximum paid rank 72 and maximum target rank 145. +The verifier derives the invoice from the physical event list and checks it +again from the two controller path lengths. It prices all helper targets, +normalizers, main adapters, query shears, idles, routes and owned operations. + +There are 25,140 local events and 21,686 scalar/owned events. The scalar +allowance is 217,428, the route allowance is 5,164,000 and the complete +nonrecursive bound is 184,647,552, below the retained 1,000,000,000 budget. +Peak owned occupancy stays one. The sum of local paid ranks is 6,013. +The source report's old literal 5,894 is replaced by this derived sum in +the native growth bound. This report correction does not change the +moment or the claimed gain. + +Two exact moment engines check the tested endpoint. The compiler checks +include all three tail ratios, the completion and splitting terms, the +integer threshold and the retained BIT stock. All 54 strict and four +functional outer predicates are positive. The source engine rejects its +insufficient BIT and old-cutoff controls. The new controls reject a missing +source transport, a wrong contact frame, a wrong coefficient, a descending +public return and the unchanged word presented as an improvement. + +## Scope + +This is an author-checked conditional construction. Finite exact replay +and the chart identity do not prove the full integer multiplication theorem. +The native all-column realization, owned erasure, uniform compiler closure, +precision/fixed-tape execution and analytic recovery remain inherited +assumptions. The free helper endpoints are inherited from PR5561/PR5569; +this contact changes none of them. The enormous uniform word and a complete +rounded multiplier are not materialized. Independent scientific review and +hosted CI are separate from the local checks. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +All retained source notices and predecessor credit remain in the package. diff --git a/research/p104-event-contact-step/README.md b/research/p104-event-contact-step/README.md new file mode 100644 index 0000000000..b55323d445 --- /dev/null +++ b/research/p104-event-contact-step/README.md @@ -0,0 +1,119 @@ +# Conditional kappa 0.00308189 from one P104 contact change + +This construction increases complete conditional kappa from 0.00308181 in +[PR #5569](https://github.com/CrocSwap/integer-mult-bounds/pull/5569) to +**0.00308189**. The raw crossing increases by between 7.645343e-8 and +7.645345e-8. The selected record remains 0.003027288235. + +One ADD contact moves from a three-dimensional chart to a four-dimensional +chart. Each of the 18 local calls replaces two rank-three paid jobs with +one rank-two and one rank-four job. Strict concavity proves a positive +signed-moment change for every 0 < kappa < 1. Every public endpoint, +productive target, scalar instruction and owned lifetime stays fixed. + +Read [the proof](PROOF.md), [the four-site construction](construct.py), +[the complete receipt](RESULT.json), [the source pins](SOURCES.json) and +[the verification record](VALIDATION.md). The complete bill retains +66,852 paid jobs and 12,814 productive fields. The exact raw crossing is +in (0.00308189496866, 0.00308189496867). The claim is tested at +0.0030818905, below that crossing. + +This is a small paid-profile step after the priced helper-706 handoff. +It composes with that handoff and retains the source's free helper endpoints. +It is not a new controller or a new selected frontier. No independent human +review or complete proof-kernel verification is claimed. + +## Reproduction + +Python 3.12 and the standard library suffice. No optimization solver is +needed to reconstruct or verify the published word. + +```sh +python3.12 -B scripts/research_package.py --package research/p104-event-contact-step +``` + +Both registered modes must print: + +```text +PASS_P104_EVENT_CONTACT_KAPPA_00308189 +``` + +The launcher must print `PASS_REGISTERED_RESEARCH_PACKAGE`. It runs exact +source reconstruction, both arbitrary-input endpoints, dense transpose +columns, all signed native maps, the physical caller, two moment engines, +the compiler and all 58 outer predicates. It compares the complete result +with the committed receipt and runs the negative controls. + +The PR5545 official source export is retained unchanged as an executable +dependency. The verifier checks its archive hash, inventory and 33 payload +files before import. It also checks the PR5569 word and price source against +their Git blob IDs and SHA256 values. These files are retained sources, +not new contributions. Compressed word regeneration is compared by its +complete decompressed payload. + +The price implementation retains the source's mathematical tests. Its +[diff](LITERAL-CHANGES.diff) changes the claim/comparison declarations and +derives the actual local rank sum in the reported native growth bound. +The latter corrects the old literal 5,894 to 6,013; it is not the source of +the kappa gain. + +## Limits and ceiling + +The five framework assumptions remain: native all-column implementation, +owned erasure, uniform compiler closure, precision and fixed-tape costs, +and analytic recovery. Independent acceptance of the source helper-endpoint +contract also remains inherited. The new change preserves those endpoints. +The uniform word and complete rounded multiplier are not materialized. + +On [0,0.0034], the fixed invoice has a strictly decreasing signed moment. +Its raw funding ceiling is the crossing interval above. The headroom above +the claimed endpoint is between 4.96866e-9 and 4.96867e-9. This is not a +ceiling for other words or suppliers. + +The p19 proposals have larger numerical headlines. In particular, +[PR #5440](https://github.com/CrocSwap/integer-mult-bounds/pull/5440) records +an unresolved chain-to-native compiler and physical attachment. This package +improves the complete P104 paid-caller line; it does not claim to exceed that +proposal's extra-premise numerical model. + +## Coordination and credit + +Base: current canonical main `5e0052ca0aa3036a3afa8b0438927377c8d97d53`. +The [canonical claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/5574) +records the changed scope, initial overlap coverage and test. +[TASK.json](TASK.json) retains the revision-7 card. The released +[event-placement handoff](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19181969) +supplied the research lead. The event-level model in +[PR #5568](https://github.com/CrocSwap/integer-mult-bounds/pull/5568) by +@DreamingOfClouds informed discovery. The submitted edit was then isolated +by a direct single-contact scan and is reconstructed without that solver. + +- Joel Pulikkan, @GamingPuzzled, supplied the exact PR5569 word and priced + helper-706 handoff, building on his successor-handoff work in + [PR #5472](https://github.com/CrocSwap/integer-mult-bounds/pull/5472). +- @DreamingOfClouds supplied the free-endpoint word in + [PR #5561](https://github.com/CrocSwap/integer-mult-bounds/pull/5561) + and the event-level toolkit and released handoff. +- @thu-nmrc supplied the coupled contacts in + [PR #5551](https://github.com/CrocSwap/integer-mult-bounds/pull/5551). +- Ali Romman supplied the complete caller and source closure in + [PR #5544](https://github.com/CrocSwap/integer-mult-bounds/pull/5544) and + [PR #5545](https://github.com/CrocSwap/integer-mult-bounds/pull/5545). +- The retained source notices credit Gareth Davidson, David Arias and + Cinna Davis for the P104 word, coalescing and private reuse; Cinna Davis + for the controller; Jacob Alan Sussman for productive recursion; zxv and + Cao Yifan for the interval, compiler and native framework. The official + source closure preserves the earlier geometry, BIT and analytic notices. + +New construction, proof and verification by Ali Romman with substantial +OpenAI Codex assistance. Apache-2.0. The search, proof and checks were +performed by the same assistant; they are not independent review. + +## Open next questions + +Independently review this contact and the inherited helper-endpoint contract, +then recompute the complete invoice from the word. A later construction +must change a paid itinerary or a target contract. Another root digit does +not change this invoice. No wider optimality or native-admission claim +follows from the bounded contact search. Structured questions are in +[TASK.json](TASK.json). diff --git a/research/p104-event-contact-step/RESULT.json b/research/p104-event-contact-step/RESULT.json new file mode 100644 index 0000000000..9eca7f2d6c --- /dev/null +++ b/research/p104-event-contact-step/RESULT.json @@ -0,0 +1,360 @@ +{ + "controls": { + "missing_source_transport": "Common scalar chart", + "non_nested_return": "Nested chronological transport", + "old_contact_frame": "Scalar destination and coefficient", + "unchanged_word": "One changed scalar chart", + "wrong_scalar_coefficient": "All 743 public and owned rows" + }, + "fixed_invoice_ceiling": { + "kappa_interval": [ + "0", + "17/5000" + ], + "moment_derivative": [ + "-100090376785506719797181787089356985109563298610876508023534659/392318858461667547739736838950479151006397215279002157056", + "-186549445205703696124004258008448731416061197407185050870233759/784637716923335095479473677900958302012794430558004314112" + ], + "scope": "This fixed paid and target invoice; the inherited BIT cap is retained." + }, + "inventory": { + "all_productive_targets_fixed": true, + "all_public_endpoints_fixed": true, + "changed_contacts": [ + [ + [ + "ADD", + 451, + 228, + "1", + 262 + ], + [ + "ADD", + 451, + 228, + "1", + 737 + ] + ] + ], + "events": 25140, + "global_paid_delta": { + "2": 18, + "3": -36, + "4": 18 + }, + "local_paid_delta": { + "2": 1, + "3": -2, + "4": 1 + }, + "ordered_scalar_events": 21686, + "owned_lifetimes_fixed": true, + "source_events": 25140 + }, + "local": { + "endpoint_coefficients": 552049, + "helpers": { + "4": 83, + "5": 5, + "8": 15, + "9": 424 + }, + "owned_lifetimes": 8, + "paid": { + "1": 2211, + "2": 459, + "3": 494, + "4": 94, + "5": 164, + "6": 18, + "7": 14 + }, + "peak_owned_fields": 1, + "public_inputs": 735, + "real_scalar_allowance": 217428 + }, + "native": { + "distinct_maps": 2921, + "helper_normalizers": 1054, + "helpers": { + "4": 83, + "5": 5, + "8": 15, + "9": 424 + }, + "main_adapters": 208, + "proof": "Every signed Pauli image and exact global phase; frame induction at every positive tensor width", + "recipe_payload_sha256": "51b77e6cc39bb8a51be9df5a3808f232a7f93e32cdd43fea8ed8aadc6cb1c7ea", + "wrong_phase_rejected": true + }, + "parent_raw_interval": [ + "154090925761/50000000000000", + "308181851523/100000000000000" + ], + "physical": { + "central_square_columns": 53248, + "full_calls": 18, + "main_targets": { + "145": 208, + "17": 416, + "25": 416, + "33": 416, + "41": 416, + "49": 416, + "57": 416, + "65": 416, + "73": 208 + }, + "new_paid_jobs": 0, + "physical_contacts": 7488, + "ports": 104, + "route_payload_sha256": "7f4f0ca768ffbc4f93dcff575592c4c67411f46b4289e45b73f715a2ad47b142", + "tensor_rule": "Factorwise native maps; scalar signs stay outside the tensor power.", + "whole_idle_jobs": { + "16": 416, + "24": 416, + "32": 416, + "40": 416, + "48": 416, + "56": 416, + "64": 416, + "72": 208 + }, + "wrapper_sites": [ + 1, + 3, + 5, + 7, + 9, + 11, + 13, + 15, + 17, + 19, + 21, + 23, + 25, + 27, + 29, + 31 + ] + }, + "raw_gain_interval": [ + "7645343/100000000000000", + "1529069/20000000000000" + ], + "result": { + "compiler": { + "H": 690116000000000, + "N": "2^690116000000000", + "eta": { + "lower": "0.000000150554445553564883795851", + "upper": "0.000000150554445553564883795852" + }, + "gap": "1/14000000000", + "integer_test_exponent": 49294, + "logarithm_power": 1000, + "theta": "63/64", + "uniform_saving": "21573233/7000000000", + "word_materialized": false + }, + "full_forward_calls": 18, + "gain": "1/12500000", + "kappa": "308189/100000000", + "kappa_decimal": ".00308189", + "margin_at_previous": { + "lower": "0.020815664773694609944898641645", + "upper": "0.020815664773694609944898641646" + }, + "negative_controls": { + "old_BIT": "Rejected by outer inequalities", + "old_cutoff": "Rejected by completion-tail ratio greater than one" + }, + "nonrecursive": { + "fixed_scalar_growth_bound": "At most 2^(16*26000) before native factors; a declared constant, not an attained norm.", + "local_routes": 5164000, + "local_scalar": 217428, + "peak_owned_fields": 1, + "raw_budget": 1000000000, + "raw_scalar_upper": 184647552, + "tensor_native_growth_bound": "Each rank-r Gaussian has row l1 norm at most 2^(rf); sum of local ranks is 6013." + }, + "ordinary_BIT": { + "admitted": "17/5000", + "after_cover": "69/20000", + "atom": "1/250", + "before_cover": "3459/1000000", + "ordinary_saving": "8590884599/2500000000000", + "prime_rule": "odd q > 2^26*N^5 avoiding all fixed denominators and rank witnesses" + }, + "outer": { + "functional_checks": { + "actual_new_BIT_stock_sublinear": "3485999999253/3500000000000", + "fixed_halo_explicit_metadata_branch": "269500000001/3500000000", + "new_BIT_row_stock_sublinear_in_active_group": "13957999997009/14000000000000", + "new_semantic_group_guard": "3/14000000000" + }, + "margins": { + "boundary_algebraic_matrix": "604050495956853537/196000000000000000000", + "fused_gaussian": "604050495870560611/196000000000000000000", + "global_coordinate_router": "1348327/437500000", + "group_bit_router": "18876578433455019/6125000000000000000", + "group_scans": "6999999999/7000000000", + "main_transform": "604050481956853537/196000000000000000000", + "microbox_face_corrections": "269500000001/3500000000", + "polynomial_products": "13999999999/14000000000", + "sparse_union_movement": "80229050495956853537/196000000000000000000" + }, + "parameters": { + "a": "1348327/437500000", + "b": "8629293/2800000000", + "beta": "13999999997/14000000000", + "bit_saving": "17/5000", + "cap_xi": "178229050481956853537/196000000000000000000", + "complex_uniform_saving": "21573233/7000000000", + "d": "1/14000000000", + "epsilon": "13999999999/14000000000", + "kappa": "308189/100000000", + "lambda_": "3987672439/4000000000", + "lambda_prime": "13956853537/14000000000", + "layout": "1/14000000000", + "q": "43146463/14000000000", + "r0": "1/140000000000", + "stop": "1/14000000000", + "tested_saving": "6163781/2000000000" + }, + "strict_checks": { + "actual_bit_above_effective": "139173/437500000", + "actual_logarithmic_gamma_guard": "1/14000000000", + "actual_logarithmic_group_guard": "17770949539043146463/98000000000000000000", + "alpha_logarithm_absorption": "1/140000000000", + "boundary_algebraic_matrix_above_kappa": "55956853537/196000000000000000000", + "cap_above_band": "80229050481956853537/196000000000000000000", + "cap_below_cell": "17770949504043146463/196000000000000000000", + "cap_below_phase_cell_power": "213770949518043146463/196000000000000000000", + "complex_above_effective": "1/14000000000", + "complex_below_one_over_32": "78870707/2800000000", + "complex_endpoint": "1/7000000000", + "epsilon_below_one": "1/14000000000", + "epsilon_positive": "13999999999/14000000000", + "fine_prime_halo_umbrella": "7/2", + "fused_gaussian_above_kappa": "55870560611/196000000000000000000", + "gaussian_above_main": "6956853537/98000000000000000000", + "global_coordinate_router_above_kappa": "1/3500000000", + "global_gamma_power_slack": "9/140000000000", + "group_below_dimension": "1/7000000000", + "group_bit_router_above_kappa": "2183455019/6125000000000000000", + "group_gauge_power_slack": "17770949538343146463/98000000000000000000", + "group_key_fits_record": "1/7000000000", + "group_positive": "13999999997/14000000000", + "group_scans_above_kappa": "6978426769/7000000000", + "halo_covers_generic_inverse_radius": "5", + "improvement_over_user_baseline": "675459790400418148631/500000000000000000000000", + "lambda_above_internal": "1/28000000000", + "lambda_above_sigma": "3/28000000000", + "lambda_above_tau": "1/28000000000", + "lambda_prime_above_lambda": "1/28000000000", + "lambda_prime_above_leaf": "5591370707/39200000000000000000", + "leaf_saving_above_effective": "2791370707/39200000000000000000", + "main_transform_above_kappa": "41956853537/196000000000000000000", + "membership_arithmetic_fits_record": "1/14000000000", + "microbox_face_corrections_above_kappa": "134744606693/1750000000", + "microbox_halo_volume": "1106000000003/14000000000", + "new_complex_uniform_saving_above_b": "1/14000000000", + "new_semantic_guard_with_C1_one": "1/14000000000", + "polynomial_products_above_kappa": "13956853539/14000000000", + "positive_layout_slack": "1/14000000000", + "q_below_effective": "1/14000000000", + "q_below_internal": "1/14000000000", + "q_below_leaf": "5591370707/39200000000000000000", + "q_positive": "43146463/14000000000", + "short_record_fallback": "2791370707/2800000000", + "source_axis_superpolynomial": "1/14000000000", + "sparse_union_movement_above_kappa": "79625000055956853537/196000000000000000000", + "stop_below_one": "13999999999/14000000000", + "stop_positive": "1/14000000000", + "strassen_integer_power_gap": "1951441519231", + "support_router_span": "3/14000000000", + "theta_positive_polynomial_power": "2", + "union_header_fits_record": "3/14000000000", + "union_tag_work_per_visit_fits_record": "3/14000000000" + } + }, + "paid": { + "1": 41358, + "16": 416, + "2": 8262, + "24": 416, + "3": 8892, + "32": 416, + "4": 1692, + "40": 416, + "48": 416, + "5": 2952, + "56": 416, + "6": 324, + "64": 416, + "7": 252, + "72": 208 + }, + "paid_calls": 66852, + "previous_open_pr5569": "308181/100000000", + "productive_fields": 12814, + "query_shears": 15, + "rank_mass_surplus": 760, + "raw_headroom": [ + "248433/50000000000000", + "496867/100000000000000" + ], + "raw_root_interval": [ + "154094748433/50000000000000", + "308189496867/100000000000000" + ], + "relative_gain_percent": "800/308181", + "strictification": { + "alpha": { + "lower": "0.999999995428295380197203339867", + "upper": "0.999999995428295380197203339868" + }, + "cutoff": 17, + "delta": { + "lower": "0.954848282016379823028564479175", + "upper": "0.954848282016379823028564479176" + }, + "floor": 18, + "gamma": { + "lower": "0.967392647519607666245315102667", + "upper": "0.967392647519607666245315102668" + }, + "normalized_paid_upper": "5242880004882813/5242880536870912", + "power": 1024, + "reserve": "1/10000000000", + "tail_offset": "1/5", + "tested": "6163781/2000000000" + }, + "targets": { + "145": 208, + "17": 416, + "25": 416, + "33": 416, + "4": 1494, + "41": 416, + "49": 416, + "5": 90, + "57": 416, + "65": 416, + "73": 208, + "8": 270, + "9": 7632 + }, + "whole_idle_jobs": 3120 + }, + "status": "PASS_P104_EVENT_CONTACT_KAPPA_00308189", + "transpose": { + "arithmetic": "Dense integer rows with binary denominators; reverse chronology", + "coefficients": 552049, + "columns": 743 + } +} diff --git a/research/p104-event-contact-step/SOURCES.json b/research/p104-event-contact-step/SOURCES.json new file mode 100644 index 0000000000..cc8d088329 --- /dev/null +++ b/research/p104-event-contact-step/SOURCES.json @@ -0,0 +1,59 @@ +{ + "schema_version": 1, + "base_commit": "5e0052ca0aa3036a3afa8b0438927377c8d97d53", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "fc3d4ba105e1f097d0d7d051a308281e86ab1446", + "sha256": "66974efdced4083c00025f97d95d83909a226cdf801edb9301c195c6641f6903" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "f126dd2e2dad2b669e75d1d0d0bd05c600725602", + "sha256": "f7a48bfa2659b88378282a8eee7d9fe52cdf505594124c4d1686b58510fffd72" + } + ], + "retained_source": { + "path": "research/p104-event-contact-step/inputs/pr5545-source-closure.tar.gz", + "sha256": "59768da554e11b11fae52d07f520f50684cc7a9ee0bec2873edbcd6b63814837", + "export_manifest_sha256": "0a20358f9c089be1f5606c78077314e30a72998fb3c5123848d921a8d1814e76", + "commit": "18968423711fd902aaee1099979497d55603e1dc", + "files": 33, + "source_url": "https://github.com/CrocSwap/integer-mult-bounds/pull/5545", + "note": "Byte-identical copy of the capsule retained by PR5551/PR5561; used UNMODIFIED (the hand-off word keeps 735 public inputs)." + }, + "external_inputs": [ + { + "local_path": "inputs/pr5569-WORD.json.gz", + "source_repository": "GamingPuzzled/integer-mult-bounds", + "source_commit": "af9f091ac6f30c6eaacb9c27777bfbe2d0e5ffdf", + "source_path": "research/p104-priced-handoff/WORD.json.gz", + "sha256": "12224e9a13a49c830b304338a8d31610fb43da15d1a650537733c27f7864310f", + "git_blob": "3f4eb4be87a2f7a96391c39d960eedeb7bef5d1c" + }, + { + "local_path": "inputs/pr5569-pricing.py", + "source_repository": "GamingPuzzled/integer-mult-bounds", + "source_commit": "af9f091ac6f30c6eaacb9c27777bfbe2d0e5ffdf", + "source_path": "research/p104-priced-handoff/pricing.py", + "sha256": "a4df92b46234bb56a966df30d9c1d43251e1346e9a1ad06cf5ee30a79c7ae591", + "git_blob": "bb135338f1c57c48147cb214d14f542cdfe4e533" + }, + { + "local_path": "common.py", + "source_repository": "GamingPuzzled/integer-mult-bounds", + "source_commit": "af9f091ac6f30c6eaacb9c27777bfbe2d0e5ffdf", + "source_path": "research/p104-priced-handoff/common.py", + "sha256": "e7c1bd9bfc0060d2d55da5c6e61cd3fae756e0fc8facacc2a074061d2f73c800", + "git_blob": "bd244313fc023a737055415f87003f2963c290f6" + } + ], + "retained_source_scope": "The unchanged PR5545 official source export is an executable dependency. All 33 payloads, the inventory and archive hash are checked before import. This source is not new work.", + "discovery_source": { + "pr": 5568, + "commit": "47a347ff70044615e7be6581d275d12f5df38295", + "scope": "The event-level lattice and invoice model informed discovery. The submitted construction is one explicit contact edit and replay needs no solver." + } +} diff --git a/research/p104-event-contact-step/TASK.json b/research/p104-event-contact-step/TASK.json new file mode 100644 index 0000000000..2f8477625e --- /dev/null +++ b/research/p104-event-contact-step/TASK.json @@ -0,0 +1,124 @@ +{ + "schema_version": 1, + "task_id": "scalar-to-moment", + "priority_revision": 7, + "base_commit": "5e0052ca0aa3036a3afa8b0438927377c8d97d53", + "original_card": { + "id": "scalar-to-moment", + "question": "Can a changed frame itinerary remove a paid transition beyond the already covered scalar A2 contractions?", + "starting_points": [ + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "research/staged544-a2-graph-rewrite/README.md", + "research/staged544-separated-a2/README.md", + "research/staged544-a2-composition-audit/README.md", + "research/staged544-a1858-contraction-audit/README.md" + ], + "methods": [ + "Derive the changed legal frame itinerary and exact child histogram.", + "Prove a scoped obstruction showing why that scalar gain cannot change the paid contract." + ], + "acceptance_gate": "An unchanged histogram is not a kappa gain; record any separate runtime or proof benefit explicitly.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the A2 and separated-A2 constructions and their composition/contraction audits. Scalar contractions can preserve the complete recursive histogram; fewer ADDs alone do not justify further scans.", + "scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately." + }, + "first_experiment": "Identify an actual paid transition to remove and construct a legal replacement frame itinerary, charging restoration, source windows and changed helpers. Compare complete before/after histograms. Stop if only scalar count changes; report that benefit honestly, without expanding the same scalar-only census.", + "bottleneck_link": "A legal change to the histogram, not addition count alone, is the bridge to an exponent gain.", + "allowed_variations": [ + "One existing scalar simplification and one proposed frame-path change." + ], + "scope_change_triggers": [ + "Submitting only another scalar count as completion of a paid-profile task." + ], + "overlap_terms": [ + "scalar simplification", + "paid profile", + "R439", + "3998", + "4019", + "4112", + "4152", + "staged544-a2-graph-rewrite", + "staged544-separated-a2", + "staged544-a2-composition-audit", + "staged544-a1858-contraction-audit" + ], + "existing_checks": [ + { + "scope": "PR #3998: consecutive A2 scalar contraction", + "evidence": "research/staged544-a2-graph-rewrite/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "status": "author-checked", + "source_commit": "389268a6b5e0373a3125d5c6fcd6995f4ea324f5", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4019: separated A2 sites with unchanged recursive histogram", + "evidence": "research/staged544-separated-a2/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "status": "author-checked", + "source_commit": "f408e09df300b575235f7f77f81948071397e16d", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4112: composition audit", + "evidence": "research/staged544-a2-composition-audit/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "status": "author-checked", + "source_commit": "205b7380656ba4b6316a8a493b1a3c679b8f7a0e", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4152: A1858 contraction audit", + "evidence": "research/staged544-a1858-contraction-audit/README.md", + "remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.", + "status": "author-checked", + "source_commit": "caaa14cde5962adc372fdca71f63d0f29e73c8b2", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "changed", + "actual_scope": "Move one ADD contact on the PR5569 P104 word from a three-dimensional chart to a four-dimensional chart. Certify the complete conditional kappa step with all endpoints and scalar instructions fixed.", + "scope_change_reason": "The user requires a complete kappa improvement. The released PR5568 event-placement handoff and the PR5569 priced handoff provide a new paid-caller source beyond the old scalar A2 contractions.", + "bottleneck_link": "At every one of 18 forward calls, H2 - 2H3 + H4 is a strict concave-moment gain. The complete bill changes while all productive fields, scalar work and endpoint contracts remain fixed.", + "budget_minutes": null, + "stop_rule": "Publish only after the exact emitted word, all native maps, physical caller, both rational moment engines, compiler and all 58 outer predicates pass. Stop extending this fixed invoice after its crossing is isolated.", + "outcome": "completed", + "evidence": "The exact construction and complete replay pass at kappa .00308189, tested at .0030818905. RESULT.json records the raw interval, full bill and controls; VALIDATION.md records final replay coverage.", + "author": "Ali Romman with substantial OpenAI Codex assistance", + "ai_assistance": "Substantial OpenAI Codex assistance for source analysis, direct contact search, construction, proof, verification and publication. The same assistant performed these checks; no independent reviewer or subagent was used.", + "open_questions": [ + { + "question": "Can an independent reviewer accept the contact identity and inherited free-helper-endpoint contract?", + "why_it_matters": "The new paid-profile step is exact, but author-side replay is not independent scientific acceptance.", + "first_step": "Inspect the four source edit sites, unchanged endpoints and the full paid/target census, then run the registered replay.", + "blocked_by": "No missing technical source. Independent scientific review remains pending." + }, + { + "question": "Can a changed event order improve the paid profile beyond this fixed invoice?", + "why_it_matters": "The current raw moment ceiling leaves less than 4.96867e-9 above the claimed endpoint.", + "first_step": "Check live claims, nominate one legal reordered contact window and derive its complete changed invoice.", + "blocked_by": "A new word and full replay are required; the present result proves no optimality for that larger class." + } + ], + "coordination": { + "claim": "https://github.com/CrocSwap/integer-mult-bounds/discussions/5574", + "base_main": "5e0052ca0aa3036a3afa8b0438927377c8d97d53", + "open_prs_checked": 320, + "discussion_records_checked": 4836, + "remote_pagination_complete": true, + "remote_checked_utc": "2026-10-25T20:04:18.735343+00:00", + "local_coverage": "Sparse; relevant P104 sources read directly. No exhaustive local novelty claim.", + "presubmission_main": "5e0052ca0aa3036a3afa8b0438927377c8d97d53", + "presubmission_checked_utc": "2026-10-25T20:19:42.925159+00:00", + "new_related_pr": "https://github.com/CrocSwap/integer-mult-bounds/pull/5577" + } +} diff --git a/research/p104-event-contact-step/VALIDATION.md b/research/p104-event-contact-step/VALIDATION.md new file mode 100644 index 0000000000..6cc9b93311 --- /dev/null +++ b/research/p104-event-contact-step/VALIDATION.md @@ -0,0 +1,58 @@ +# Verification record + +The source word is PR5569 at +`af9f091ac6f30c6eaacb9c27777bfbe2d0e5ffdf`. The base is canonical main +`5e0052ca0aa3036a3afa8b0438927377c8d97d53`. The selected record is unchanged. + +The development replay passed on macOS arm64 with CPython 3.12.13. +The word and complete bill are recorded in RESULT.json. The registered warning-strict normal and optimized commands both passed. +Each printed `PASS_P104_EVENT_CONTACT_KAPPA_00308189`; the launcher printed +`PASS_REGISTERED_RESEARCH_PACKAGE research/p104-event-contact-step outcome=completed`. No hosted CI or independent scientific pass is asserted here. + +The exact checks include 735 public inputs, all 743 endpoint rows, 552,049 +dense transpose coefficients, all 2,921 signed native pairs, 7,488 physical +contacts, 53,248 central-square columns, 104 ports and 18 full calls. The +complete funding check uses two rational moment engines and all 58 outer +predicates. Four invalid contact words and one unchanged-word control are +rejected. The retained native-phase, BIT and cutoff controls also reject. + +The source export authenticates 33 retained payloads. The PR5569 word, +pricing source and source-loader copy have exact Git blob and SHA256 pins. +The verifier imports no solver. Search output is not verification evidence. + +The full selected-frontier replay, all historical research tests, a complete +rounded multiplier and a formal-kernel theorem proof were not run. The +source framework assumptions and helper-endpoint contract remain explicit +in PROOF.md and README.md. + +The exact command was: + +```sh +/tmp/kappa-step-venv/bin/python -B scripts/research_package.py --package research/p104-event-contact-step +``` + +The temporary environment used CPython 3.12.13. The verification imports only +standard-library modules. The two registered commands use `-W error -B`, +and the second also uses `-O`. Both matched the complete RESULT.json. +The source pins and package metadata passed separately. GitHub returned the +same blob IDs for all three pinned PR5569 input files as SOURCES.json. + +Main was refreshed before submission and remained +`5e0052ca0aa3036a3afa8b0438927377c8d97d53`. The new PR5577 pooled A/B/C +ceiling explicitly excludes the target-changing PR5561/PR5569 line. The +canonical claim received no conflicting reply at this checkpoint. + +The repository is shallow. The publication-base ancestry is checked directly; +no full-history source-preflight claim is made. The committed-byte preflight passed for all 17 package files at +`f42e4d5a8e4574b7a9fb3b780fe85b434e5849d8`. The official export and its +inventory check passed for that commit. + +A separate CPython 3.12.13 run used the exported package, read-only files, +an empty working directory, an empty PATH and an invalid GIT_DIR. The +command used `-I -O -B -W error` and passed in 71.229 seconds. All 18 +exported files, including the export manifest, retained their hashes. +It printed `PASS_P104_EVENT_CONTACT_KAPPA_00308189` and the wrapper printed +`PASS_READ_ONLY_GIT_FREE_REPLAY`. No Git checkout, network or solver was +used. This paragraph is a later documentation-only change; the verifier, +word, price code, pins and complete receipt are the tested bytes. +Hosted CI remains separate. diff --git a/research/p104-event-contact-step/VERIFY.json b/research/p104-event-contact-step/VERIFY.json new file mode 100644 index 0000000000..fdc944a1e8 --- /dev/null +++ b/research/p104-event-contact-step/VERIFY.json @@ -0,0 +1,32 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 540, + "checks": "Authenticate source bytes and all 33 archive payloads; regenerate the exact word; replay both arbitrary-input endpoints, dense transpose, all native maps and the full physical caller; check the complete invoice, two rational moment engines, fixed-invoice derivative, compiler, 58 outer predicates and negative controls; compare the complete receipt." + }, + { + "argv": [ + "{python}", + "-W", + "error", + "-B", + "-O", + "{package}/verify.py" + ], + "timeout_seconds": 540, + "checks": "Authenticate source bytes and all 33 archive payloads; regenerate the exact word; replay both arbitrary-input endpoints, dense transpose, all native maps and the full physical caller; check the complete invoice, two rational moment engines, fixed-invoice derivative, compiler, 58 outer predicates and negative controls; compare the complete receipt." + } + ] +} diff --git a/research/p104-event-contact-step/WORD.json.gz b/research/p104-event-contact-step/WORD.json.gz new file mode 100644 index 0000000000..9434855e7d Binary files /dev/null and b/research/p104-event-contact-step/WORD.json.gz differ diff --git a/research/p104-event-contact-step/common.py b/research/p104-event-contact-step/common.py new file mode 100644 index 0000000000..bd244313fc --- /dev/null +++ b/research/p104-event-contact-step/common.py @@ -0,0 +1,47 @@ +"""Open the byte-pinned PR5545 source closure (same pins as PR5551/PR5561); Apache-2.0. + +Copied from PR5561's research/p104-free-endpoint-retime/common.py (DreamingOfClouds), package path +renamed only. Mechanism and all predecessor credit: see README.md. +""" +from contextlib import contextmanager +from hashlib import sha256 +from io import BytesIO +from pathlib import Path,PurePosixPath +import gzip,importlib.util,json,sys,tarfile,tempfile + +HERE=Path(__file__).resolve().parent +def need(ok,why): + if not ok: + raise ValueError(why) + +def read(path): + raw=Path(path).read_bytes() + return json.loads(gzip.decompress(raw) if str(path).endswith('.gz') else raw) + +def load(path,name): + spec=importlib.util.spec_from_file_location(name,path) + mod=importlib.util.module_from_spec(spec);sys.modules[name]=mod;spec.loader.exec_module(mod);return mod + +@contextmanager +def closure(): + pins=json.loads((HERE/'SOURCES.json').read_bytes())['retained_source'] + raw=(HERE/'inputs'/Path(pins['path']).name).read_bytes() + need(sha256(raw).hexdigest()==pins['sha256'],'Retained PR5545 capsule byte pin') + with tempfile.TemporaryDirectory(prefix='p104-priced-handoff-')as tmp: + root=Path(tmp) + with tarfile.open(fileobj=BytesIO(gzip.decompress(raw)),mode='r:')as archive: + members=archive.getmembers();names=[m.name for m in members] + need(len(names)==len(set(names)),'Unique retained source paths') + for m in members: + n=PurePosixPath(m.name) + need(m.isfile()and not n.is_absolute()and '..'not in n.parts,'Regular retained source path') + t=root/m.name;t.parent.mkdir(parents=True,exist_ok=True);t.write_bytes(archive.extractfile(m).read()) + mraw=(root/'.research-export.json').read_bytes() + need(sha256(mraw).hexdigest()==pins['export_manifest_sha256'],'Exact export inventory') + man=json.loads(mraw) + need(man['commit']==pins['commit']and len(man['files'])==pins['files']==33,'Exact predecessor closure') + need(set(names)=={'.research-export.json'}|{r['path']for r in man['files']},'No omitted or extra file') + for r in man['files']: + b=(root/r['path']).read_bytes() + need(len(b)==r['size']and sha256(b).hexdigest()==r['sha256'],'Source file '+r['path']) + yield root diff --git a/research/p104-event-contact-step/construct.py b/research/p104-event-contact-step/construct.py new file mode 100644 index 0000000000..8ce13980a4 --- /dev/null +++ b/research/p104-event-contact-step/construct.py @@ -0,0 +1,50 @@ +"""Change one contact on the PR5569 P104 word. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +The source word is by GamingPuzzled, DreamingOfClouds, thu-nmrc, +Ali Romman and the retained P104 contributors. See README.md. +""" +from copy import deepcopy + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +def construct(source): + word = deepcopy(source) + old = source['program'] + expected = { + 9575: ['ADD', 228, 225, '1', 262], + 12591: ['ADD', 160, 451, '1/2', 3], + 12657: ['MOVE', 451, 3, 262, False], + 12658: ['ADD', 451, 228, '1', 262], + 12673: ['MOVE', 228, 262, 520, False], + 12674: ['ADD', 497, 228, '1', 520], + 14422: ['MOVE', 451, 262, 737, False], + 14424: ['ADD', 451, 732, '-4', 737], + } + need(len(old) == 25140, 'Exact source event count') + need(all(old[i] == e for i, e in expected.items()), 'Exact source contacts') + for r, start, stop, visits in ( + (228, 9576, 12674, [12658, 12673]), + (451, 12592, 14424, [12657, 12658, 14422])): + actual = [] + for i in range(start, stop): + e = old[i] + used = e[1:3] if e[0] in ('ADD', 'COPY') else e[1:2] + if r in used: + actual.append(i) + need(actual == visits, 'No other contact in the changed interval') + replacement = { + 12657: [['MOVE', 228, 262, 737, False], + ['MOVE', 451, 3, 737, False]], + 12658: [['ADD', 451, 228, '1', 737]], + 12673: [['MOVE', 228, 737, 520, False]], + 14422: [], + } + word['program'] = [e for i, old_event in enumerate(old) + for e in replacement.get(i, [deepcopy(old_event)])] + need(len(word['program']) == len(old), 'Same event count') + return word diff --git a/research/p104-event-contact-step/inputs/pr5545-source-closure.tar.gz b/research/p104-event-contact-step/inputs/pr5545-source-closure.tar.gz new file mode 100644 index 0000000000..3084088544 Binary files /dev/null and b/research/p104-event-contact-step/inputs/pr5545-source-closure.tar.gz differ diff --git a/research/p104-event-contact-step/inputs/pr5569-WORD.json.gz b/research/p104-event-contact-step/inputs/pr5569-WORD.json.gz new file mode 100644 index 0000000000..3f4eb4be87 Binary files /dev/null and b/research/p104-event-contact-step/inputs/pr5569-WORD.json.gz differ diff --git a/research/p104-event-contact-step/inputs/pr5569-pricing.py b/research/p104-event-contact-step/inputs/pr5569-pricing.py new file mode 100644 index 0000000000..bb135338f1 --- /dev/null +++ b/research/p104-event-contact-step/inputs/pr5569-pricing.py @@ -0,0 +1,156 @@ +"""Complete mixed-target price, compiler and outer transfer. + +The interval and compiler bounds follow zxv and Cao Yifan. The productive +recursion is by Jacob Alan Sussman. The controller is by Cinna Davis. +Adapted from Ali Romman's PR5544/5545 for the two coupled contact changes. +Successor choices prepared for thu-nmrc with substantial OpenAI Codex assistance. +Ali Romman's complete caller/price proof and all predecessor credit are retained. +Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as Q +import local as L + +KAPPA, TESTED = Q('.00308181'), Q('.0030818105') +PREVIOUS = Q('.00304117') + + +def encode(x): + if isinstance(x,Q): + return str(x) + if isinstance(x,dict): + return {str(k):encode(v) for k,v in x.items()} + if isinstance(x,(list,tuple)): + return [encode(v) for v in x] + return x + + +def assemble(local, native, word, physical): + paid, targets = Counter(), Counter() + counts = Counter() + L.need(local['helpers'] == native['helpers'], 'Every productive helper has a native target') + for e in word['physical_events']: + counts[e[0]] += 1 + if e[0] == 'LOCAL': + L.need(e[3] is False, 'Every source invocation is forward') + paid.update(local['paid']) + targets.update(local['helpers']) + elif e[0] == 'QUERY_SHEAR': + paid[1] += 104 + elif e[0] == 'IDLE': + paid[8*len(e[2])] += 208 + main = Counter() + idle = Counter({8*len(e[2]):0 for e in word['physical_events'] if e[0] == 'IDLE'}) + for e in word['physical_events']: + if e[0] == 'IDLE': + idle[8*len(e[2])] += 208 + L.need(idle == physical['whole_idle_jobs'], 'Every whole idle has a native Gaussian and full rank') + for term in word['diagonal']: + main[1+8*sum(term[1:])] += 104 + L.need(main == physical['main_targets'], 'Every main target has its full native phase') + targets.update(main) + L.need(counts['LOCAL'] == 18 and counts['QUERY_SHEAR'] == counts['IDLE'] == 15, 'Complete call census') + # Recount by the two path lengths, without using emitted main diagonals. + second_t = Counter({r:18*n for r,n in local['helpers'].items()}) + second_p = Counter({r:18*n for r,n in local['paid'].items()}) + second_t[145] += 208 + second_p[1] += 15*104 + for length in (7,8): + for j in range(1,length+1): + second_t[1+8*(j+1)] += 208 + second_p[8*(j+1)] += 208 + L.need((targets,paid) == (second_t,second_p), 'Independent full invoice') + L.need(max(targets) == 145 and max(paid) == 72, 'Maximum recursive ranks') + L.need(sum(targets.values()) == 12814 and sum(paid.values()) == 66852, 'Complete field and call counts') + L.need(sum(r*n for r,n in targets.items())-sum(r*n for r,n in paid.items()) == 760, 'Complete rank surplus') + return targets,paid,counts + + +def run(local,native,word,physical): + T,P,counts = assemble(local,native,word,physical) + E = L.load(L.ROOT/'research/higher-moment-strictification/verify.py','p104_productive_intervals') + other = L.load(L.ROOT/'research/kappa-rebuild/architecture/mixed_target_probe.py','p104_productive_second_intervals') + def margin(k): + a,b = E.moment(T,1-k), E.moment(P,1-k) + return a[0]-b[1],a[1]-b[0] + lo,hi,grid = 0,10**12,10**14 + while hi-lo > 1: + m=(lo+hi)//2 + if margin(Q(m,grid))[0] > 0: + lo=m + else: + hi=m + lower,upper = Q(lo,grid),Q(hi,grid) + L.need(margin(lower)[0] > 0 and margin(upper)[1] < 0, 'Strict rational crossing enclosure') + L.need(PREVIOUS < KAPPA < TESTED < lower and margin(PREVIOUS)[0] > 0, 'Changed complete bill improves selected kappa') + t,u,v,c,b = 1-TESTED,Q(1,5),1024,17,18 + target,paid = E.moment(T,t),E.moment(P,t) + tl,th = other.moment(T,TESTED) + pl,ph = other.moment(P,TESTED) + L.need(tl > ph and max(tl,target[0]) <= min(th,target[1]) and max(pl,paid[0]) <= min(ph,paid[1]), 'Two exact moment engines') + alpha = E.divide(paid,target) + gamma = E.divide(E.moment(P,t+u),E.mul(E.power(c,u),target)) + delta = E.divide((Q(sum(T.values())*b),)*2,E.mul(E.power(c,TESTED),target)) + reserve,decay = Q(1,10**10),Q(97,100) + L.need(alpha[1] < 1-reserve and gamma[1] < decay and delta[1] < decay, 'All three charged tail ratios') + L.need(decay**128 < Q(1,16), 'Both tail decay blocks') + normalized = 1/(1+v*reserve)+Q(4,2**32) + L.need(normalized < 1 and c**64 < b**63, 'Full completion, splitting and rounding charges') + theta,power = Q(63,64),1000 + eta = E.scale(E.power(145,-v*TESTED),t) + L.need(2*(c**v)**64 <= (145**v)**63 and eta[0] > theta**power, 'Shifted exits and complement capacity') + L.need(E.power(145,v*TESTED)[1] < 2**power, 'Compiler initial range') + gap = (TESTED-KAPPA)/7 + L.need(gap.numerator == 1, 'Exact compiler integer grid') + step = gap.denominator + def wins(j): + return (step*j+1)**power < 2**j + left,right=1,2 + while not wins(right): + left,right=right,2*right + while right-left > 1: + m=(left+right)//2 + if wins(m): + right=m + else: + left=m + H=step*right + L.need(H > 8*v and wins(right) and not wins(right-1), 'Finite uniform threshold with predecessor rejection') + local_routes = (sum(local['paid'].values())+native['helper_normalizers']+native['main_adapters']+4*104+4*local['owned_lifetimes'])*1000 + L.need(local['real_scalar_allowance']+local_routes < 10**7, 'Every local scalar, route and owned operation is funded') + boundary = sum(len(word['boundaries'][side+'_program']) for side in ('left','right')) + raw = 18*10**7 + 15*1664 + 32*104*(len(word['physical_events'])+boundary) + raw += 32*104*(26+1000) + L.need(raw < 10**9, 'Complete nonrecursive raw bound') + bit = L.read(L.ROOT/'research/query-thinned-controllers/RESULT.json')['ordinary_BIT'] + atom = Q(bit['atom']) + ordinary=(1-atom)*Q(bit['after_cover'])+atom*Q('.0000384599') + admitted=Q(bit['admitted']) + L.need(atom > ordinary > admitted > TESTED and atom < 1-ordinary, 'Retained BIT admission and stock') + outer_module=L.load(L.ROOT/'research/pr4359-p7-padding/dependencies/compiler-refill/endpoint.py','p104_productive_outer') + params={'kappa':KAPPA,'tested_saving':TESTED,'complex_uniform_saving':KAPPA+6*gap, + 'b':KAPPA+5*gap,'a':KAPPA+4*gap,'q':KAPPA+3*gap,'bit_saving':admitted, + 'epsilon':1-gap,'beta':1-3*gap,'r0':gap/10,'stop':gap,'layout':gap,'d':gap} + outer=outer_module.ledger(params) + outer['functional_checks']['actual_new_BIT_stock_sublinear']=params['beta']*(1-atom) + L.need(len(outer['strict_checks']) == 54 and len(outer['functional_checks']) == 4, 'Complete outer predicate inventory') + L.need(all(x > 0 for key in ('strict_checks','functional_checks') for x in outer[key].values()), 'All outer inequalities strict') + wrong_cutoff = E.divide((Q(sum(T.values())*21),)*2,E.mul(E.power(20,TESTED),target)) + L.need(wrong_cutoff[0] > 1, 'Old cutoff fails with this helper inventory') + bad=outer_module.ledger(dict(params,bit_saving=Q('.0027'))) + L.need(any(x <= 0 for x in bad['strict_checks'].values()), 'Insufficient BIT contract rejected') + return encode({'kappa':KAPPA,'kappa_decimal':'.00308181','previous_open_pr5545':PREVIOUS,'gain':KAPPA-PREVIOUS, + 'relative_gain_percent':100*(KAPPA/PREVIOUS-1),'raw_root_interval':[lower,upper], + 'raw_headroom':[lower-KAPPA,upper-KAPPA],'margin_at_previous':E.display(margin(PREVIOUS)), + 'targets':T,'paid':P,'productive_fields':sum(T.values()),'paid_calls':sum(P.values()), + 'rank_mass_surplus':760,'full_forward_calls':18,'query_shears':15,'whole_idle_jobs':3120, + 'strictification':{'tested':TESTED,'power':v,'cutoff':c,'floor':b,'tail_offset':u,'reserve':reserve, + 'alpha':E.display(alpha),'gamma':E.display(gamma),'delta':E.display(delta),'normalized_paid_upper':normalized}, + 'compiler':{'theta':theta,'logarithm_power':power,'eta':E.display(eta),'gap':gap,'H':H,'N':'2^'+str(H), + 'integer_test_exponent':right,'uniform_saving':params['complex_uniform_saving'],'word_materialized':False}, + 'nonrecursive':{'local_scalar':local['real_scalar_allowance'],'local_routes':local_routes, + 'raw_scalar_upper':raw,'raw_budget':10**9,'peak_owned_fields':1, + 'fixed_scalar_growth_bound':'At most 2^(16*26000) before native factors; a declared constant, not an attained norm.', + 'tensor_native_growth_bound':'Each rank-r Gaussian has row l1 norm at most 2^(rf); sum of local ranks is 5894.'}, + 'ordinary_BIT':bit,'outer':outer, + 'negative_controls':{'old_cutoff':'Rejected by completion-tail ratio greater than one','old_BIT':'Rejected by outer inequalities'}}) diff --git a/research/p104-event-contact-step/pricing.py b/research/p104-event-contact-step/pricing.py new file mode 100644 index 0000000000..f8f09be7a1 --- /dev/null +++ b/research/p104-event-contact-step/pricing.py @@ -0,0 +1,156 @@ +"""Complete mixed-target price, compiler and outer transfer. + +The interval and compiler bounds follow zxv and Cao Yifan. The productive +recursion is by Jacob Alan Sussman. The controller is by Cinna Davis. +Adapted from Ali Romman's PR5544/5545 for the two coupled contact changes. +Successor choices prepared for thu-nmrc with substantial OpenAI Codex assistance. +Ali Romman's complete caller/price proof and all predecessor credit are retained. +Apache-2.0. +""" +from collections import Counter +from fractions import Fraction as Q +import local as L + +KAPPA, TESTED = Q('.00308189'), Q('.0030818905') +PREVIOUS = Q('.00308181') + + +def encode(x): + if isinstance(x,Q): + return str(x) + if isinstance(x,dict): + return {str(k):encode(v) for k,v in x.items()} + if isinstance(x,(list,tuple)): + return [encode(v) for v in x] + return x + + +def assemble(local, native, word, physical): + paid, targets = Counter(), Counter() + counts = Counter() + L.need(local['helpers'] == native['helpers'], 'Every productive helper has a native target') + for e in word['physical_events']: + counts[e[0]] += 1 + if e[0] == 'LOCAL': + L.need(e[3] is False, 'Every source invocation is forward') + paid.update(local['paid']) + targets.update(local['helpers']) + elif e[0] == 'QUERY_SHEAR': + paid[1] += 104 + elif e[0] == 'IDLE': + paid[8*len(e[2])] += 208 + main = Counter() + idle = Counter({8*len(e[2]):0 for e in word['physical_events'] if e[0] == 'IDLE'}) + for e in word['physical_events']: + if e[0] == 'IDLE': + idle[8*len(e[2])] += 208 + L.need(idle == physical['whole_idle_jobs'], 'Every whole idle has a native Gaussian and full rank') + for term in word['diagonal']: + main[1+8*sum(term[1:])] += 104 + L.need(main == physical['main_targets'], 'Every main target has its full native phase') + targets.update(main) + L.need(counts['LOCAL'] == 18 and counts['QUERY_SHEAR'] == counts['IDLE'] == 15, 'Complete call census') + # Recount by the two path lengths, without using emitted main diagonals. + second_t = Counter({r:18*n for r,n in local['helpers'].items()}) + second_p = Counter({r:18*n for r,n in local['paid'].items()}) + second_t[145] += 208 + second_p[1] += 15*104 + for length in (7,8): + for j in range(1,length+1): + second_t[1+8*(j+1)] += 208 + second_p[8*(j+1)] += 208 + L.need((targets,paid) == (second_t,second_p), 'Independent full invoice') + L.need(max(targets) == 145 and max(paid) == 72, 'Maximum recursive ranks') + L.need(sum(targets.values()) == 12814 and sum(paid.values()) == 66852, 'Complete field and call counts') + L.need(sum(r*n for r,n in targets.items())-sum(r*n for r,n in paid.items()) == 760, 'Complete rank surplus') + return targets,paid,counts + + +def run(local,native,word,physical): + T,P,counts = assemble(local,native,word,physical) + E = L.load(L.ROOT/'research/higher-moment-strictification/verify.py','p104_productive_intervals') + other = L.load(L.ROOT/'research/kappa-rebuild/architecture/mixed_target_probe.py','p104_productive_second_intervals') + def margin(k): + a,b = E.moment(T,1-k), E.moment(P,1-k) + return a[0]-b[1],a[1]-b[0] + lo,hi,grid = 0,10**12,10**14 + while hi-lo > 1: + m=(lo+hi)//2 + if margin(Q(m,grid))[0] > 0: + lo=m + else: + hi=m + lower,upper = Q(lo,grid),Q(hi,grid) + L.need(margin(lower)[0] > 0 and margin(upper)[1] < 0, 'Strict rational crossing enclosure') + L.need(PREVIOUS < KAPPA < TESTED < lower and margin(PREVIOUS)[0] > 0, 'Changed complete bill improves selected kappa') + t,u,v,c,b = 1-TESTED,Q(1,5),1024,17,18 + target,paid = E.moment(T,t),E.moment(P,t) + tl,th = other.moment(T,TESTED) + pl,ph = other.moment(P,TESTED) + L.need(tl > ph and max(tl,target[0]) <= min(th,target[1]) and max(pl,paid[0]) <= min(ph,paid[1]), 'Two exact moment engines') + alpha = E.divide(paid,target) + gamma = E.divide(E.moment(P,t+u),E.mul(E.power(c,u),target)) + delta = E.divide((Q(sum(T.values())*b),)*2,E.mul(E.power(c,TESTED),target)) + reserve,decay = Q(1,10**10),Q(97,100) + L.need(alpha[1] < 1-reserve and gamma[1] < decay and delta[1] < decay, 'All three charged tail ratios') + L.need(decay**128 < Q(1,16), 'Both tail decay blocks') + normalized = 1/(1+v*reserve)+Q(4,2**32) + L.need(normalized < 1 and c**64 < b**63, 'Full completion, splitting and rounding charges') + theta,power = Q(63,64),1000 + eta = E.scale(E.power(145,-v*TESTED),t) + L.need(2*(c**v)**64 <= (145**v)**63 and eta[0] > theta**power, 'Shifted exits and complement capacity') + L.need(E.power(145,v*TESTED)[1] < 2**power, 'Compiler initial range') + gap = (TESTED-KAPPA)/7 + L.need(gap.numerator == 1, 'Exact compiler integer grid') + step = gap.denominator + def wins(j): + return (step*j+1)**power < 2**j + left,right=1,2 + while not wins(right): + left,right=right,2*right + while right-left > 1: + m=(left+right)//2 + if wins(m): + right=m + else: + left=m + H=step*right + L.need(H > 8*v and wins(right) and not wins(right-1), 'Finite uniform threshold with predecessor rejection') + local_routes = (sum(local['paid'].values())+native['helper_normalizers']+native['main_adapters']+4*104+4*local['owned_lifetimes'])*1000 + L.need(local['real_scalar_allowance']+local_routes < 10**7, 'Every local scalar, route and owned operation is funded') + boundary = sum(len(word['boundaries'][side+'_program']) for side in ('left','right')) + raw = 18*10**7 + 15*1664 + 32*104*(len(word['physical_events'])+boundary) + raw += 32*104*(26+1000) + L.need(raw < 10**9, 'Complete nonrecursive raw bound') + bit = L.read(L.ROOT/'research/query-thinned-controllers/RESULT.json')['ordinary_BIT'] + atom = Q(bit['atom']) + ordinary=(1-atom)*Q(bit['after_cover'])+atom*Q('.0000384599') + admitted=Q(bit['admitted']) + L.need(atom > ordinary > admitted > TESTED and atom < 1-ordinary, 'Retained BIT admission and stock') + outer_module=L.load(L.ROOT/'research/pr4359-p7-padding/dependencies/compiler-refill/endpoint.py','p104_productive_outer') + params={'kappa':KAPPA,'tested_saving':TESTED,'complex_uniform_saving':KAPPA+6*gap, + 'b':KAPPA+5*gap,'a':KAPPA+4*gap,'q':KAPPA+3*gap,'bit_saving':admitted, + 'epsilon':1-gap,'beta':1-3*gap,'r0':gap/10,'stop':gap,'layout':gap,'d':gap} + outer=outer_module.ledger(params) + outer['functional_checks']['actual_new_BIT_stock_sublinear']=params['beta']*(1-atom) + L.need(len(outer['strict_checks']) == 54 and len(outer['functional_checks']) == 4, 'Complete outer predicate inventory') + L.need(all(x > 0 for key in ('strict_checks','functional_checks') for x in outer[key].values()), 'All outer inequalities strict') + wrong_cutoff = E.divide((Q(sum(T.values())*21),)*2,E.mul(E.power(20,TESTED),target)) + L.need(wrong_cutoff[0] > 1, 'Old cutoff fails with this helper inventory') + bad=outer_module.ledger(dict(params,bit_saving=Q('.0027'))) + L.need(any(x <= 0 for x in bad['strict_checks'].values()), 'Insufficient BIT contract rejected') + return encode({'kappa':KAPPA,'kappa_decimal':'.00308189','previous_open_pr5569':PREVIOUS,'gain':KAPPA-PREVIOUS, + 'relative_gain_percent':100*(KAPPA/PREVIOUS-1),'raw_root_interval':[lower,upper], + 'raw_headroom':[lower-KAPPA,upper-KAPPA],'margin_at_previous':E.display(margin(PREVIOUS)), + 'targets':T,'paid':P,'productive_fields':sum(T.values()),'paid_calls':sum(P.values()), + 'rank_mass_surplus':760,'full_forward_calls':18,'query_shears':15,'whole_idle_jobs':3120, + 'strictification':{'tested':TESTED,'power':v,'cutoff':c,'floor':b,'tail_offset':u,'reserve':reserve, + 'alpha':E.display(alpha),'gamma':E.display(gamma),'delta':E.display(delta),'normalized_paid_upper':normalized}, + 'compiler':{'theta':theta,'logarithm_power':power,'eta':E.display(eta),'gap':gap,'H':H,'N':'2^'+str(H), + 'integer_test_exponent':right,'uniform_saving':params['complex_uniform_saving'],'word_materialized':False}, + 'nonrecursive':{'local_scalar':local['real_scalar_allowance'],'local_routes':local_routes, + 'raw_scalar_upper':raw,'raw_budget':10**9,'peak_owned_fields':1, + 'fixed_scalar_growth_bound':'At most 2^(16*26000) before native factors; a declared constant, not an attained norm.', + 'tensor_native_growth_bound':f'Each rank-r Gaussian has row l1 norm at most 2^(rf); sum of local ranks is {sum(r*n for r,n in local["paid"].items())}.'}, + 'ordinary_BIT':bit,'outer':outer, + 'negative_controls':{'old_cutoff':'Rejected by completion-tail ratio greater than one','old_BIT':'Rejected by outer inequalities'}}) diff --git a/research/p104-event-contact-step/verify.py b/research/p104-event-contact-step/verify.py new file mode 100644 index 0000000000..0691af0410 --- /dev/null +++ b/research/p104-event-contact-step/verify.py @@ -0,0 +1,174 @@ +"""Check the changed contact, complete caller and conditional kappa. + +Ali Romman with substantial OpenAI Codex assistance. Apache-2.0. +Retained sources and their contributors are listed in SOURCES.json. +""" +from collections import Counter +from copy import deepcopy +from fractions import Fraction as Q +from hashlib import sha256 +from pathlib import Path +import json +import sys + +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +from common import closure, load, need, read +from construct import construct + + +def inventory(base, word): + for key in base: + if key != 'program': + need(word[key] == base[key], 'Unchanged word field: ' + key) + def scalar(program): + return [e[:-1] for e in program if e[0] != 'MOVE'] + need(scalar(word['program']) == scalar(base['program']), + 'Same ordered scalar and owned operations') + old = [e for e in base['program'] if e[0] != 'MOVE'] + new = [e for e in word['program'] if e[0] != 'MOVE'] + changes = [(a, b) for a, b in zip(old, new) if a != b] + need(changes == [(['ADD', 451, 228, '1', 262], + ['ADD', 451, 228, '1', 737])], 'One changed scalar chart') + def bill(w): + return Counter(abs(len(w['frames'][e[2]]) - len(w['frames'][e[3]])) + for e in w['program'] if e[0] == 'MOVE') + before, after = bill(base), bill(word) + delta = {r: after[r] - before[r] for r in before.keys() | after.keys() + if after[r] != before[r]} + need(delta == {2: 1, 3: -2, 4: 1}, 'Exact changed paid profile') + return {'source_events': len(base['program']), 'events': len(word['program']), + 'ordered_scalar_events': len(old), 'changed_contacts': changes, + 'local_paid_delta': delta, 'global_paid_delta': {r: 18*n for r, n in delta.items()}, + 'all_public_endpoints_fixed': True, 'all_productive_targets_fixed': True, + 'owned_lifetimes_fixed': True} + + +def controls(L, base, word): + variants = {} + bad = deepcopy(word) + bad['program'].remove(['MOVE', 228, 262, 737, False]) + variants['missing_source_transport'] = bad + bad = deepcopy(word) + event = next(e for e in bad['program'] if e == ['ADD', 451, 228, '1', 737]) + event[-1] = 262 + variants['old_contact_frame'] = bad + bad = deepcopy(word) + event = next(e for e in bad['program'] if e == ['ADD', 451, 228, '1', 737]) + event[-2] = '2' + variants['wrong_scalar_coefficient'] = bad + bad = deepcopy(word) + event = next(e for e in bad['program'] if e == ['MOVE', 228, 737, 520, False]) + event[3] = 262 + variants['non_nested_return'] = bad + rejected = {} + for name, bad in variants.items(): + try: + L.replay(bad) + except ValueError as error: + rejected[name] = str(error) + else: + raise ValueError('Accepted invalid word: ' + name) + try: + inventory(base, base) + except ValueError as error: + rejected['unchanged_word'] = str(error) + else: + raise ValueError('Accepted unchanged word as a profile improvement') + print('PASS contact controls', rejected, flush=True) + return rejected + + +def ceiling(E, targets, paid): + """Bound the moment derivative on the retained BIT band.""" + cap = Q('0.0034') + lower = upper = Q(0) + for rank in targets.keys() | paid.keys(): + coefficient = paid.get(rank, 0) - targets.get(rank, 0) + power = (E.power(rank, 1-cap)[0], Q(rank)) + term = E.scale(E.mul(power, E.log_bounds(rank)), coefficient) + lower += term[0] + upper += term[1] + need(upper < 0, 'Strictly decreasing complete moment on the retained BIT band') + return {'kappa_interval': [Q(0), cap], 'moment_derivative': [lower, upper], + 'scope': 'This fixed paid and target invoice; the inherited BIT cap is retained.'} + + +def main(): + sources = read(HERE/'SOURCES.json') + for pin in sources['external_inputs']: + raw = (HERE/pin['local_path']).read_bytes() + need(sha256(raw).hexdigest() == pin['sha256'], 'Source bytes: ' + pin['local_path']) + header = ('blob ' + str(len(raw)) + '\0').encode() + from hashlib import sha1 + need(sha1(header + raw).hexdigest() == pin['git_blob'], 'Source Git object: ' + pin['local_path']) + base = read(HERE/'inputs/pr5569-WORD.json.gz') + word = read(HERE/'WORD.json.gz') + need(construct(base) == word, 'Regenerated complete word payload') + inv = inventory(base, word) + source_price = (HERE/'inputs/pr5569-pricing.py').read_text() + for before, after in ( + ("KAPPA, TESTED = Q('.00308181'), Q('.0030818105')", + "KAPPA, TESTED = Q('.00308189'), Q('.0030818905')"), + ("PREVIOUS = Q('.00304117')", "PREVIOUS = Q('.00308181')"), + ("'kappa_decimal':'.00308181'", "'kappa_decimal':'.00308189'"), + ("'previous_open_pr5545':PREVIOUS", "'previous_open_pr5569':PREVIOUS"), + ("'tensor_native_growth_bound':'Each rank-r Gaussian has row l1 norm at most 2^(rf); sum of local ranks is 5894.'", + "'tensor_native_growth_bound':f'Each rank-r Gaussian has row l1 norm at most 2^(rf); sum of local ranks is {sum(r*n for r,n in local[\"paid\"].items())}.'")): + need(source_price.count(before) == 1, 'Unique pricing declaration: ' + before) + source_price = source_price.replace(before, after) + need(source_price == (HERE/'pricing.py').read_text(), 'Only declared pricing constants change') + print('PASS source pins, exact reconstruction and changed invoice', flush=True) + with closure() as root: + L = load(root/'research/p104-productive-controller/local.py', 'local') + L.ROOT = root + parent_local = L.replay(base) + local = L.replay(word) + need(parent_local['helpers'] == local['helpers'], 'Same helper census') + need(parent_local['real_scalar_allowance'] == local['real_scalar_allowance'], 'Same scalar allowance') + rejected = controls(L, base, word) + print('PASS both exact arbitrary-input endpoints', flush=True) + reverse = L.reverse_columns(word) + print('PASS exact transpose', flush=True) + native = L.native(word) + print('PASS exact signed native maps', native['distinct_maps'], flush=True) + C = load(root/'research/p104-productive-controller/caller.py', 'event_contact_caller') + caller = C.construct() + need(caller == read(root/'research/p104-productive-controller/CONTROLLER.json'), 'Exact physical caller') + physical = C.physical(caller, word) + print('PASS full physical caller', flush=True) + P = load(HERE/'pricing.py', 'event_contact_pricing') + result = P.run(local, native, caller, physical) + print('PASS complete pricing', result['raw_root_interval'], flush=True) + E = L.load(root/'research/higher-moment-strictification/verify.py', 'contact_margin') + targets = {int(r): n for r, n in result['targets'].items()} + paid = {int(r): n for r, n in result['paid'].items()} + parent_paid = dict(paid) + for r, n in inv['global_paid_delta'].items(): + parent_paid[r] -= n + parent_interval = [Q('0.00308181851522'), Q('0.00308181851523')] + parent_signs = [] + for k in parent_interval: + t, p = E.moment(targets, 1-k), E.moment(parent_paid, 1-k) + parent_signs.append((t[0]-p[1], t[1]-p[0])) + need(parent_signs[0][0] > 0 > parent_signs[1][1], 'Exact predecessor crossing') + lo, hi = map(Q, result['raw_root_interval']) + gain = [lo-parent_interval[1], hi-parent_interval[0]] + need(gain[0] > 0, 'Strict gain over predecessor raw ceiling') + fixed_ceiling = ceiling(E, targets, paid) + receipt = P.encode({'status': 'PASS_P104_EVENT_CONTACT_KAPPA_00308189', + 'inventory': inv, 'local': local, 'transpose': reverse, + 'native': native, 'physical': physical, 'controls': rejected, + 'parent_raw_interval': parent_interval, 'raw_gain_interval': gain, + 'fixed_invoice_ceiling': fixed_ceiling, + 'result': result}) + if '--write' in sys.argv: + (HERE/'RESULT.json').write_text(json.dumps(receipt, indent=2, sort_keys=True)+'\n') + else: + need(receipt == read(HERE/'RESULT.json'), 'Exact complete committed receipt') + print('PASS_P104_EVENT_CONTACT_KAPPA_00308189', flush=True) + + +if __name__ == '__main__': + main()