From 00c4010ad4b11b8cf8a28a69c121bab553b883d1 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Mon, 16 Nov 2026 14:17:55 +0800 Subject: [PATCH 01/12] NOR-22 preregistration: authentic modular future commitments, 12 fresh sources, 48 counterfactual worlds and forged/collision controls --- .../nor22_authenticated_commitment/README.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 research/nor22_authenticated_commitment/README.md diff --git a/research/nor22_authenticated_commitment/README.md b/research/nor22_authenticated_commitment/README.md new file mode 100644 index 000000000..62beeda87 --- /dev/null +++ b/research/nor22_authenticated_commitment/README.md @@ -0,0 +1,64 @@ +# NOR-22: authenticated target commitments and the public-information boundary + +**Preregistered 16 November 2026 before generating NOR-22 sources, opening future labels, or executing the prospective test.** Continues merged [NOR-21 #185](https://github.com/MoralityLabAI/Compactification-Theory/pull/185) and the exact observation-completeness mathematics in [MathCan #106](https://github.com/patrickdugan/MathCan/pull/106). + +## Question + +NOR-21 established an exact obstacle: two worlds can have identical public degree-512 or degree-1024 demonstrations and query INPUT, yet disagree on the hidden target OUTPUT. A deterministic public-only verifier issues the same output in both worlds and fails one. NOR-22 introduces **additional, explicitly trusted target-dependent information**, rather than claiming an output-only algebraic check can resolve that obstacle without a new source of truth. We test what small authenticated modular commitments can certify about an otherwise hidden future, alongside deliberately forged and colliding commitments. + +The target commitment is an **exogenous input attested by an assumed trustworthy publisher**, who has read the true output. This is a new authorization/data channel and its value depends on the withheld target. The usual public-only policy sees neither a target commitment nor a true target. All source generation, commitments, and grading are accounted separately, so no result is described as pure public-only reasoning or general proof soundness. + +## Frozen source distribution and alternate future worlds + +- Native synthetic grammar: the original RRC25 sixteen U/V templates with four I/N/R/S unary transforms, four delays, two spacings and four amplitudes, exact integer formal series, original source and header operations. No retrained model. +- Public observation degrees **512 and 1024**; query INPUT degrees **768 and 1536**; two observed degree-D demonstrations per example. +- Source families: NOR-21's \`wide_dense_small\`, \`wide_sparse_small\`, and \`wide_rational_short\`, with the same small normalized source polynomial semantics. New independent source seed offset **94,322,000**: \`corpus.SEED + 94322000 + rep*1000003 + degree_index*100009 + family_index*10007\` for rep ∈ {0,1}. Pick the first unique public header with a nonempty exact accepted template set and one **uniquely predicted** query continuation among the accepted candidates, with a maximum of **100** sampling attempts. Any failure to generate a compatible source causes experiment failure. +- Exactly **12 distinct complete-public source inputs**, 6 per public observation degree and 4 per family. Each public input is paired with **four counterfactual target worlds**, for 48 source-world records. These worlds share the same source public observations and query INPUT, and differ **only** in the final coefficient of the hidden query OUTPUT. They must be analyzed as paired counterfactuals, not as 48 independent public source draws: + - \`valid\`: original native generating-program future \(Y\) + - \`unit_shift\`: \(Y + 1\cdot q^{Q}\) + - \`p_shift\`: \(Y + p\cdot q^{Q}\) + - \`product_shift\`: \(Y + pq\cdot q^{Q}\) + where \(Q=768\) or \(1536\). +- Fix moduli **p=65537**, **q=65521**, and public polynomial evaluation point **r=3** (nonzero modulo both). The different symbol q used above in polynomial monomials is the formal variable, while the modulus q=65521 is a named integer. Both moduli are primes and coprime; this particular experiment does not require treating a hash as collision-free. +- For each of the four hidden-target worlds, the source publisher creates a **trusted pair of target-dependent commitments** \(H_p(Y)=\sum_i Y_i r^i\bmod p\) and \(H_q(Y)=\sum_i Y_i r^i\bmod q\), by exact Horner evaluation. These commitments are given separately from the public-only input; the target coefficient arrays and program identity remain sealed to the public policy. We explicitly record the commitment values and their assumed authenticity. This extra target-derived information is the *only* reason an otherwise invisible hidden-future shift can be detected. +- Public sources and source selection are fixed before grading, using only headers, demonstration compatibility and candidate predicted-query-output uniqueness. For each source the policy's public-only candidate and output are frozen before any target-dependent commitment comparison or sealed true-future correctness comparison. A program's public mask and publicly predicted output cannot depend on which of the four hidden worlds is later considered. + +## Frozen policies + +For each of the 48 source-world pairs, score the same publicly selected hypothetical future using these four policies, with identical underlying 16-template public checking: + +1. **\`public_only\`**: return the unique publicly predicted output without seeing any target commitment. This is the NOR-21 reference. +2. **\`trusted_p\`**: return the candidate only when its \(H_p\) agrees with the **authentic target commitment** modulo p. Mismatch causes abstention. The policy is *allowed to read exactly one additional target-dependent modular value*. +3. **\`trusted_pq\`**: return only when **both** authenticated target modular commitments match. It sees two extra modular values and may abstain. +4. **\`forged_pq\`**: receives two unchecked commitments synthesized from the candidate's own predicted output, instead of the target publisher. This explicitly adversarial trust control cannot distinguish a hidden future override from the original world. + +A mismatch with a trusted commitment is **definitive evidence of an incorrect proposed target**: exact equal output arrays always have equal fingerprints. Equality of these modular fingerprints is only a *necessary* condition for correctness. Modulus-sized and product-modulus-sized changes can collide. The latter are *preregistered attack constructions*, so the experiment does not imply cryptographic binding, external future truth access from a private source, or a sound unconditional certificate from a short modular digest. + +## Registered expected arithmetic outcomes, without future-label fitting + +For the terminal coefficient shifts under the fixed nonzero evaluation point, \(H_m(Y+\delta q^Q)-H_m(Y)=\delta r^Q\bmod m\). Because r=3 is coprime to both fixed moduli, a single trusted p commitment detects exactly those shifts **not divisible by p**; two trusted commitments detect those not divisible by **both p and q**. These are source-independent algebraic predictions. + +We preregister the exact 48-world confusion matrix as a **deterministic test of implementation and declared assumptions**, rather than treating its artificially constructed rows as independent statistical evidence: + +| Target world (12 distinct sources each) | public_only | trusted_p | trusted_pq | forged_pq | +| --- | --- | --- | --- | --- | +| valid | 12 correct | 12 correct | 12 correct | 12 correct | +| unit_shift | 12 false accepts | 12 abstentions | 12 abstentions | 12 false accepts | +| p_shift | 12 false accepts | 12 false accepts | 12 abstentions | 12 false accepts | +| product_shift | 12 false accepts | 12 false accepts | 12 false accepts | 12 false accepts | + +A *different* observed matrix, failure of exact mask parity, a target-program leak, or source duplication is an experiment failure. If this registered table holds, it establishes correct implementation of the **additional trusted signal** and the explicit modular collision boundary, not superiority of learned reasoning or unconditional proof soundness. + +## Evidence and formal mathematics + +Report all 12 public digests, model-visible input hashes, exact public accepted masks, identities of the four counterfactual worlds by target-output SHA-256, the trusted target fingerprints (they are additional public information), the policy's accept/abstain result, sealed final correctness, false accepts, and checks for two-world public-data equality. Publish original complete JSON and a deterministic independent audit in the applied repository, with a source SHA-256 and no model training. The companion MathCan theorem should prove that a mismatched authentic fingerprint rejects a wrong output, that a self-commitment comparison is vacuous, and that two distinct hidden futures with matching public observations and matching modular fingerprints remain impossible to distinguish, including explicit p and pq shifts. + +The first fixed experiment runs in Python 3.12 on GitHub Actions CPU with a **30-minute CI limit**, source-selection regeneration, and an independent post-selection grader. The verdict must report complete source-world counts, the number of distinct public sources, and the exact authenticated-information budget. No later seed or threshold choices are permitted without a dated protocol amendment before seeing new test data. + +## Reproduction + + python -m unittest research.nor22_authenticated_commitment.test_experiment -v + python research/nor22_authenticated_commitment/experiment.py \ + --check --out /tmp/nor22_full.json + +This is a finite synthetic authorization and verifiability result, not a recommendation for deploying a 16-bit authentication code for security-sensitive applications. From 49c9f7cb4c4fe6f00e7891c201548a35ccddc4fe Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Mon, 16 Nov 2026 14:20:46 +0800 Subject: [PATCH 02/12] NOR-22: prospective exact modular target commitments, forged controls, 12 fresh public sources and 48 sealed future worlds --- .../experiment.py | 468 ++++++++++++++++++ 1 file changed, 468 insertions(+) create mode 100644 research/nor22_authenticated_commitment/experiment.py diff --git a/research/nor22_authenticated_commitment/experiment.py b/research/nor22_authenticated_commitment/experiment.py new file mode 100644 index 000000000..50a676296 --- /dev/null +++ b/research/nor22_authenticated_commitment/experiment.py @@ -0,0 +1,468 @@ +"""NOR-22: authenticated modular target commitments and information boundaries. + +The public verifier computes its unique candidate output ONLY from full +public demonstrations and the public query INPUT. Separately authenticated +target-dependent field evaluations provide additional information; they +are neither derivable from the public sources nor assumed freely available. + +A sealed grader reconstructs the planted native program and each of four +counterfactual hidden future targets after all source and policy choices +have been frozen. Honest target fingerprints are generated by an explicit +trusted publisher during fixture creation; forged fingerprints are an +untrusted negative control. + +Preregistered in README.md before fresh source generation. Every shift +kind shares the same public input digest per source and is NOT counted +as a new independent source. +""" +from __future__ import annotations + +import argparse +from collections import Counter +from hashlib import sha256 +import json +from pathlib import Path +import random +import sys + +HERE=Path(__file__).resolve().parent +ROOT=HERE.parents[1] +if str(ROOT) not in sys.path: + sys.path.insert(0,str(ROOT)) + +from research.rrc_compactification import compound25 as corpus +from research.nor21_degree_scaling import experiment as nor21 + +SCHEMA="nor22.authenticated_modular_target_commitment.v1" +FIXTURE_SCHEMA="nor22.public_with_explicit_authenticated_target_commitments.v1" +FRESH_OFFSET=94322000 +REPLICATES=2 +DEGREES=(512,1024) +FAMILIES=("wide_dense_small","wide_sparse_small","wide_rational_short") +SOURCE_COUNT=REPLICATES*len(DEGREES)*len(FAMILIES) +WORLD_KINDS=("valid","unit_shift","p_shift","product_shift") +ARMS=("public_only","trusted_p","trusted_pq","forged_pq") +P=65537 +Q=65521 +R=3 +SHIFT={"valid":0,"unit_shift":1,"p_shift":P,"product_shift":P*Q} +MAX_ATTEMPTS=100 +EXACT_CORRECTNESS_MATRIX={ + "valid":{"public_only":"correct","trusted_p":"correct", + "trusted_pq":"correct","forged_pq":"correct"}, + "unit_shift":{"public_only":"false_accept","trusted_p":"abstain", + "trusted_pq":"abstain","forged_pq":"false_accept"}, + "p_shift":{"public_only":"false_accept","trusted_p":"false_accept", + "trusted_pq":"abstain","forged_pq":"false_accept"}, + "product_shift":{"public_only":"false_accept","trusted_p":"false_accept", + "trusted_pq":"false_accept","forged_pq":"false_accept"}, +} + + +def canonical(obj): + return (json.dumps(obj,indent=2,sort_keys=True,ensure_ascii=True)+"\n").encode() + + +def source_seed(rep,degree,family): + if rep not in (0,1) or degree not in DEGREES or family not in FAMILIES: + raise ValueError("not a registered NOR22 source") + return (corpus.SEED+FRESH_OFFSET+1000003*rep+ + 100009*DEGREES.index(degree)+10007*FAMILIES.index(family)) + + +def fingerprint(coeffs,modulus): + """Exact Horner polynomial evaluation at r=3 modulo a small prime.""" + if modulus not in (P,Q): + raise ValueError("not a registered commitment modulus") + value=0 + for coefficient in reversed(coeffs): + value=(R*value+coefficient)%modulus + return value + + +def hash_target(coeffs): + return sha256(json.dumps(coeffs,separators=(",",":")).encode()).hexdigest() + + +def shifted_future(future,kind): + if kind not in WORLD_KINDS: + raise ValueError("unknown counterfactual target world") + y=list(future) + y[-1]+=SHIFT[kind] + return tuple(y) + + +def public_digest(c,degree): + return nor21.public_digest(c,degree) + + +def generate_new_source(rep,degree,family,known=None): + """Draw a unique public case, preserving the private program ONLY + in the source-generation return value. No private program is + serialized in a fixture or passed to the public policy. + """ + rng=random.Random(source_seed(rep,degree,family)) + query_degree=3*degree//2 + for attempt in range(MAX_ATTEMPTS): + program=nor21.new_header_program(rng) + demos=tuple((f:=nor21.public_source(rng,family,query_degree), + corpus.execute(f,program)) for _ in range(2)) + query=nor21.public_source(rng,family,query_degree) + case=corpus.Case( + f"nor22-r{rep}-d{degree}-{family}-{attempt}",family, + demos,query,(),None) + headers=corpus.possible_headers(case) + if len(headers)!=1: + continue + header=headers[0] + if (header.base,header.delay,header.spacing, + header.amplitude)!=program[:4]: + continue + digest=public_digest(case,degree) + if known is not None and digest in known: + continue + mask=nor21.native_mask(case,header,degree) + if mask==0: + continue + output_candidates=nor21.candidate_predictions( + query,header,query_degree) + unique={output_candidates[j] for j in range(16) if mask&(1<0 + candidate_outputs=nor21.candidate_predictions( + public.query,header,query_degree) + distinct={candidate_outputs[j] + for j in range(16) if mask&(1<