Skip to content

Audit PR4100’s free-word tensor lift on all four actual programs - #4184

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
ToikY:codex/free-word-tensor-lift-audit
Oct 21, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
ToikY:codex/free-word-tensor-lift-audit

Conversation

@ToikY

@ToikY ToikY commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Change and mathematical scope

PR4100's proposed lift needs formal noncommuting cancellation before substituting tensor powers. This independently audits that specific premise on the four actual PR4088 words and supplies a written proof for every positive multiplicity. Scalar coefficients stay fixed; G-I maps to G^{⊗f}-I. The original representation argument is credited predecessor work.

The separately written exact pullback checks 723 outputs × 4 providers × 2 orientations = 5,784 output functionals, with 6,680 endpoint terms and zero surviving nonempty words. Supplemental implementations check 24 F101 and 24 exact-rational dirty-input specializations. Actual-program mutations produce exact errors (I-G59)x273 and -3*x119.

This is a positive scoped algebra audit, no new κ. It does not certify native realization, physical placement, precision, common-cover/tape cost, analytic assembly, recovery or the complete multiplication theorem.

Task and overlap

Priority-7 card uniform-transfer-audit, scope key 603f341b99f590f17a76, refined to COMPLEX.md's free-group implication. Base canonical main 12fa8c5c844be21bfefb38a19503fbd867a11244; proposal PR4100 337d04939571a637aeab54a0f58f54fde811663a; literal programs PR4088 72d7efc181edb21806a878f174847c96dd410ab0.

Claim. Current main was refreshed; all 301 then-open/draft PR bodies, newest #1166 handoffs and active Discussion board were checked, followed by the new #4181 (unchanged four words; different dispatch/fill). #4178 audits precision, #4174 CRT placement, #4171 root/moment arithmetic and #4180 finite admission. This adds the distinct formal-word premise audit. Broader closed/Discussion coverage is partial; no novelty certificate is claimed. Selected frontier unchanged.

Validation

Python 3.12.14, standard library only:

python3.12 -B scripts/research_package.py --package research/free-word-tensor-lift-audit --check-only
python3.12 -B scripts/research_package.py --package research/free-word-tensor-lift-audit
python3.12 -B scripts/check_research_commit.py --package research/free-word-tensor-lift-audit --check-source-history

All eight registered normal/optimized commands pass, as do exact committed-byte and declared-source ancestry checks. Ten minimal exports retain original bytes and notices; SOURCES.json pins 14 provenance paths. Source free-word replay covers all 632 live and 91 independent dirty private inputs, reverse/pullback and cleanup-boundary predicates. Independent AI review found no material mismatch. No native/full historical outer replay was launched; the selected baseline orientation command stopped at a sparse omitted ASSEMBLY.json. Finite specialization tests supplement the universal representation proof.

Credit

Prepared for ToikY with substantial OpenAI Codex assistance from the coordinating, implementation and separate review agents. No independent human or formal-kernel acceptance is claimed. Cinna Davis/PR4100 supplies the lift argument; PR4088 supplies the literal providers. Retained engines credit Sagar Thakrar/PR3687 and roger-sato/PR3693, with the wider native/geometry/compiler/owner lineage preserved in source/NOTICE.md. New material Apache-2.0.

Open next questions

See research/free-word-tensor-lift-audit/TASK.json and README.md. Reuse pinned native recipe and finite-admission evidence, identify an uncovered tensor/frame/child coordinate interface, then audit that interface's physical placement and full caller invoice. The algebraic result alone does not discharge it.

@rcfc-jreed

Copy link
Copy Markdown
Contributor

Independent scoped audit of the PR4100 free-word tensor lift at 94b9ca9c: no defect found in the finite seal / provider / mutation-receipt layer

Code-disjoint reimplementation; does not import package verify.py / independent.py / independent_real.py / mutation_controls.py. Package bytes from head 94b9ca9cf59ea6de346a59c92b414454bdde1de4 via GitHub contents API. CLAIM.

What passes (14 of 14):

  1. Pins. Base 12fa8c5c…. Status PASS_SOURCE_BOUND_FREE_OPERATOR_LIFT_AUDIT; new_kappa=false; no full multiplication theorem / encoded execution.
  2. Seals. All 10 SOURCE-PINS match; INDEPENDENT-REAL gz sha256 match the four program inputs.
  3. Providers. THREE/FOUR × base/extra: 72 warps, 36 corrections, free-group replay PASS, fixtures at multiplicities {1,2,3} with empty mismatches; event counts 17596/17597.
  4. Independent / real / mutations. Formal pullback dual rows agree; real specializations have coords=3^m; mutation controls PASS on FOUR-base; scalar/correction mismatch lists nonempty.

Not covered: live free-group / F₁₀₁ fixture re-execution; written all-f proof; native realization; full multiplication theorem; new κ.

This is a finite replay of committed receipts, not a formal proof.

check_4184.py
#!/usr/bin/env python3
"""Independent finite controls for PR4184 (PR4100 free-word tensor lift).

Checks SOURCE-PINS, cross-receipt provider counts, control flags, and mutation
status from committed receipts. Does not import package verify.py /
independent.py / independent_real.py / mutation_controls.py.

Package head 94b9ca9cf59ea6de346a59c92b414454bdde1de4 via GitHub API.

James Reed (@rcfc-jreed), with substantial AI assistance (Claude, in Cursor).
Apache-2.0.
"""
from __future__ import annotations

import argparse, hashlib, json, sys
from pathlib import Path

HEAD = "94b9ca9cf59ea6de346a59c92b414454bdde1de4"
BASE = "12fa8c5c844be21bfefb38a19503fbd867a11244"
PROVIDERS = ("THREE-base", "THREE-extra", "FOUR-base", "FOUR-extra")
results = []


def check(name, ok, detail=""):
    results.append((name, bool(ok), detail))
    print(("PASS " if ok else "FAIL ") + name + ((": " + str(detail)) if detail else ""), flush=True)
    return bool(ok)


def load(pkg, name):
    return json.loads((pkg / name).read_text(encoding="utf-8"))


def sha(path: Path):
    return hashlib.sha256(path.read_bytes()).hexdigest()


def run(pkg: Path):
    sources = load(pkg, "SOURCES.json")
    task = load(pkg, "TASK.json")
    verify = load(pkg, "VERIFY.json")
    pins = load(pkg, "SOURCE-PINS.json")
    result = load(pkg, "RESULT.json")
    indep = load(pkg, "INDEPENDENT.json")
    real = load(pkg, "INDEPENDENT-REAL.json")
    mut = load(pkg, "MUTATIONS.json")

    check("I1 SOURCES/TASK base_commit == 12fa8c5c…",
          sources["base_commit"] == BASE == task["base_commit"])
    check("I2 RESULT status PASS_SOURCE_BOUND_FREE_OPERATOR_LIFT_AUDIT; new_kappa false",
          result["status"] == "PASS_SOURCE_BOUND_FREE_OPERATOR_LIFT_AUDIT"
          and result["new_kappa"] is False
          and result["full_multiplication_theorem"] is False
          and result["encoded_execution"] is False)
    check("I3 VERIFY ready; TASK outcome completed",
          verify["status"] == "ready" and task["outcome"] == "completed")

    bad_pin = []
    for e in pins:
        path = pkg / "source" / e["path"]
        if not path.exists() or sha(path) != e["sha256"] or path.stat().st_size != e["bytes"]:
            bad_pin.append(e["path"])
    check("P1 SOURCE-PINS (10 exports) match source/* bytes/sha256/size",
          not bad_pin and len(pins) == 10, bad_pin)

    # REAL records sha match gz inputs
    bad_r = []
    for name, rec in real["records"].items():
        path = pkg / "source/inputs" / name
        if sha(path) != rec["sha256"]:
            bad_r.append(name)
    check("P2 INDEPENDENT-REAL record sha256 match source/inputs/*.json.gz",
          not bad_r and real["source_provider_count"] == 4, bad_r)

    check("R1 RESULT has exactly four providers THREE/FOUR × base/extra",
          set(result["providers"]) == set(PROVIDERS))
    check("R2 controls: inverse/product/noncommuting True; whole scalar/diff tensorization rejected",
          result["controls"]["inverse_compatibility"] is True
          and result["controls"]["product_compatibility"] is True
          and result["controls"]["noncommuting_generators"] is True
          and result["controls"]["whole_scalar_tensorization_rejected"] is True
          and result["controls"]["whole_difference_tensorization_rejected"] is True
          and result["controls"]["distinct_generators"] == 72)

    bad_prov = []
    for name in PROVIDERS:
        p = result["providers"][name]
        replay = p["source_free_group_replay"]
        expected_events = 17596 if name.startswith("FOUR") else 17597
        if not (p["warp_generators"] == 72
                and p["initial_correction_terms"] == 36
                and p["literal_event_count"] == expected_events
                and replay.get("forward") == "PASS"
                and replay.get("dual") == "PASS"
                and replay.get("cleanup_boundary_forward_and_reverse") == "PASS"
                and replay.get("buffer_to_live_leaks") == 0
                and replay.get("dirty_buffers") == 91
                and len(p["direct_noncommuting_field_fixtures"]) >= 6):
            bad_prov.append(name)
        # fixtures: multiplicities 1,2,3 × forward/dual with empty mismatches
        multis = sorted({f["tensor_multiplicity"] for f in p["direct_noncommuting_field_fixtures"]})
        if multis != [1, 2, 3]:
            bad_prov.append(name + ":multi")
        if any(f["mismatching_registers"] for f in p["direct_noncommuting_field_fixtures"]):
            bad_prov.append(name + ":mm")
    check("R3 each provider: 72 warps, 36 corrections, PASS free-group replay, fixtures×{1,2,3}",
          not bad_prov, bad_prov)

    # Cross-link INDEPENDENT event counts
    bad_i = []
    for name in PROVIDERS:
        expected_events = 17596 if name.startswith("FOUR") else 17597
        rows = indep["providers"][name]
        if len(rows) != 2:
            bad_i.append(name)
            continue
        for row in rows:
            if (row["literal_events"] != expected_events
                    or row["independent_inputs"] != 723
                    or row["outputs"] != 723
                    or row["nonzero_terms"] != 835
                    or row["nonempty_surviving_words"] != 0):
                bad_i.append(name)
                break
    check("I4 INDEPENDENT status PASS; per-provider dual rows match event/register counts",
          indep["status"] == "PASS_INDEPENDENT_FORMAL_PULLBACK"
          and indep["controls"]["adjacent_inverse"] is True
          and indep["controls"]["commutative_collapse_rejected"] is True
          and indep["controls"]["finite_order_collapse_rejected"] is True
          and indep["controls"]["difference_terms_remain_separate"] is True
          and not bad_i, bad_i)

    # REAL specializations
    bad_real = []
    for name, rec in real["records"].items():
        expected_events = 17596 if name.startswith("FOUR") else 17597
        specs = rec["specializations"]
        if len(specs) != 6:
            bad_real.append(name)
            continue
        for s in specs:
            if (s["events"] != expected_events
                    or s["dirty_buffers"] != 91
                    or s["live_registers"] != 632
                    or s["coordinates_per_register"] != 3 ** s["multiplicity"]):
                bad_real.append(f"{name}:{s['multiplicity']}:{s['orientation']}")
    check("X1 INDEPENDENT-REAL PASS; 6 specializations/provider; coords=3^m; events match",
          real["status"] == "PASS_INDEPENDENT_REAL_SPECIALIZATION"
          and real["controls"]["noncommuting_multiplicities"] == [1, 2, 3]
          and int(real["controls"]["inverse_checks"]) == 216
          and int(real["controls"]["semantic_distinctions"]) == 4
          and not bad_real, bad_real[:5])

    check("M1 MUTATIONS PASS on FOUR-base; reorder NOT_APPLICABLE (36 single-gen corrections)",
          mut["status"] == "PASS_ACTUAL_PROGRAM_MUTATION_CONTROLS"
          and mut["provider"] == "FOUR-base"
          and mut["reordered_correction_word"]["status"] == "NOT_APPLICABLE"
          and mut["reordered_correction_word"]["correction_terms"] == 36
          and "drop_first_nonidentity_scale" in mut
          and "erase_first_correction_generator" in mut)

    # RESULT mismatch lists nonempty (mutations bite)
    check("M2 RESULT control mismatch lists nonempty (scalar/correction mutations bite)",
          len(result["controls"]["tensorized_role_scalar_mismatches"]) > 0
          and len(result["controls"]["erased_correction_generator_mismatches"]) > 0)

    check("NEG1 claiming new κ / full multiplication theorem contradicted by RESULT flags",
          result["new_kappa"] is False and result["full_multiplication_theorem"] is False)

    failed = [name for name, ok, _ in results if not ok]
    print(f"\n{len(results) - len(failed)}/{len(results)} PASS", flush=True)
    if failed:
        print("FAILED:", ", ".join(failed), flush=True)
        return 1
    return 0


def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("--pkg", required=True)
    ap.add_argument("--expect-head", default=HEAD)
    args = ap.parse_args()
    check("HEAD pin recorded (API fetch)", args.expect_head == HEAD, args.expect_head)
    return run(Path(args.pkg))


if __name__ == "__main__":
    sys.exit(main())

James Reed (@rcfc-jreed), with substantial AI assistance (Claude, in Cursor).

@rcfc-jreed

Copy link
Copy Markdown
Contributor

Independent scoped audit of #4184 free-word tensor lift at 94b9ca9c: 16/16

Code-disjoint package-local forks of verify.py, independent.py, independent_real.py, and mutation_controls.py. Head 94b9ca9cf59ea6de346a59c92b414454bdde1de4. CLAIM.

No packaging defect in SOURCES scope. All 14 digests match.

What passes: sealed RESULT / INDEPENDENT / INDEPENDENT-REAL / MUTATIONS PASS tokens; all four forks regenerate PASS.

Not covered here: Lean; new κ; merge/close.

Finite pin/seal/lift replay ≠ formal proof.

James Reed (@rcfc-jreed), with substantial AI assistance (Claude, in Cursor).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants