interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / research / atemporal / at0 / oracle / README.md

210 lines · 13174 bytes Raw Blame History Source

AT-0 reference oracle (Rust, standard library only)

Independent cross-check for the AT-0 Page-Wootters qualification. Given an AT0_CASE_V1 file it rebuilds the finite model from scratch, conditions the stationary state on each clock outcome by direct complex linear algebra, computes X/Y/Z probabilities two more ways without any clock matrix, judges every check in exact arithmetic, and writes an AT0_RESULT_V2 record. Reproducing the known mathematics here is a calibration result, not a discovery.

Owner: Agent 2 (charter aien-dev/aien-architecture ADR-0038, omega#358). Everything lives in this directory. Nothing here is the candidate engine and nothing here is used by it: research/atemporal/at0/model/ (Agent 3, C11, merged in omega#360) and this directory share no source, no parser, no arithmetic and no build step.

Rulings this code follows

Contracts: AT0_CASE_V1 frozen at aien-architecture 044c9d1 (CASE_CONTRACT_COMMIT), AT0_RESULT_V2 added at c7a7181 and recorded in AT0_FREEZE at fe86e43aae63370b3084f78e971a33b81ce75a9d, which is the contract_commit every record writes (CONTRACT_COMMIT; Agent 5 finding D7, evaluator allowlist). The hand-table tests and the spec-* fixtures target the mathematical contract AT0_SPEC.md, merged as 68f47e26764a9f0b46d91194bf073824d04333bb (SPEC_COMMIT in src/at0/mod.rs; Agent 5 finding D8). Re-verified against that commit on 2026-10-09: section 13.2 P1 and P1c, and 13.3 N1 to N5 agree with the fixtures below, and 13.2 P2 was added as a fixture.

Layout

build.sh            exact rustc invocation (build | test | lib)
isolation.sh        symbol-isolation gate for the compute crate (source rule + nm -u + mutant)
rust-toolchain.toml rustc 1.98.1 pin (informational; build.sh records the real version)
src/main.rs         the only file that touches files, git, the process table or the wall clock;
                    CLI (emit | fixtures | check) and the test suite
src/at0/mod.rs      compute crate root; SPEC_COMMIT
src/at0/rational.rs i128 rationals (exact spectrum, kernel pairs, identities)
src/at0/sha256.rs   own SHA-256 (case_id, acceptance_id, verdict_id, evidence_digest)
src/at0/exact.rs    fixed-point big integers: exact comparison of f64 tokens with scaled decimals
src/at0/complex.rs  complex numbers and dense complex matrices (Vec<Vec<C>>)
src/at0/case.rs     AT0_CASE_V1 parser/validator in contract order, case builder for tests
src/at0/matrix_path.rs  H_C, H_S, H_total, kernel projector, Psi, POVM, conditioning, rho_k, Pauli
src/at0/reference.rs    analytic paths: Schrodinger closed form and Bloch/Rodrigues rotation
src/at0/result.rs   values block, exact judge, verdict block, AT0_RESULT_V2 writer and values parser
src/at0/fixtures.rs the 22 calibration fixtures and their hand-derived expectations
fixtures/           <name>.case, <name>.values, CALIBRATION.md (all generated, deterministic)
NUMERICAL_ERROR.md  stated bounds, measured errors, limitations

Build

Exact command (./build.sh build):

rustc --edition 2021 -C opt-level=2 -C codegen-units=1 -C debuginfo=0 -C panic=abort -D warnings \
      --crate-name at0_oracle src/main.rs -o target/at0-oracle

build.sh exports the compiler's own rustc --version line, host triple and the flag string into the binary (option_env!), which is where build_cc and build_flags in the provenance block come from. The test build uses the same flags minus -C panic=abort (the test harness needs unwinding) plus --test. ./build.sh lib builds the compute crate alone as an rlib for the isolation gate.

Toolchain the fixtures and numbers in this directory were produced with:

rustc 1.98.1 (48a229cea 2026-09-01)
binary: rustc
commit-hash: 48a229ceaefd4985c50990b14116b6d856af0985
commit-date: 2026-09-01
host: aarch64-unknown-linux-gnu
release: 1.98.1
LLVM version: 22.1.8

No Cargo, no crates, no build.rs, no network, no C library beyond what Rust's standard library links itself.

Use

./build.sh                         # target/at0-oracle
./build.sh test                    # 14 tests (4 unit, 10 contract/physics)
./isolation.sh                     # ISOLATION PASS expected
target/at0-oracle check   <case>   # validate; prints case_id, acceptance_id, file sha256
target/at0-oracle emit    <case> [--dephased] [-o out]   # AT0_RESULT_V2 record
target/at0-oracle fixtures <dir>   # regenerate fixtures/ (45 files)

A refused case prints exactly AT0_CASE_REFUSED <code> on stderr, writes nothing and exits

  1. --dephased replaces the pure physical state by its kernel-branch dephasing (negative control) and marks build_cc with (dephased control); such a record is a control, never a qualification result.

Provenance: source_commit/source_tree_clean come from git run in this directory. Every record is marked as oracle output so it can never be cited as the candidate engine's result (Agent 0 condition on the omega#359 approval): build_cc begins with the literal oracle and engine_sha256 equals oracle_sha256, both the SHA-256 of the running oracle executable (the matrix path and the analytic path are two modules of one binary). The writer refuses to produce a record that violates either rule (tested). verdict_id depends only on the case and the values; evidence_digest covers the timestamps too, so two runs agree on verdict_id and differ in evidence_digest (tested).

What is independent, and how that is enforced

Tests (./build.sh test)

known_answer_digests_and_kernel, refusals_in_contract_order (version, parse, canonical form, duplicate keys, CRLF, invalid parameters, irrational spectrum, identity mismatch, acceptance rules, size limit), case_name_outside_identity_and_tokens, reference_model_hand_table (exact constraint, POVM completeness, uniform 1/N, the X/Y/Z table), density_matrix_properties_and_routes (Hermitian, unit trace, eigenvalues in [0,1], probabilities in [0,1], vector route = density route), multiple_n_offsets_phases_tilts (N in 3,4,5,6,8,12; reference label t1..t3; tilted and h0-shifted fields; global phases i, -1, 2, -3i), negative_controls (dephased mixture, uncovered and half-covered spectra, wrong weight, broken clock, rigorous demand), spec_draft_reference_model (draft theorems, T4 eigenstate, T5 relational phase, N3, N4), record_shape_and_wall_clock_independence, fixtures_render_and_meet_expectations, plus unit tests for SHA-256 (FIPS vectors), rationals, complex algebra and exact comparison.

Fixtures and how their expectations were derived

fixtures/ holds 22 cases, their .values (values block, verdict block, verdict_id) and CALIBRATION.md. All of it is written by target/at0-oracle fixtures fixtures/ with no wall clock, so re-running it reproduces the files byte for byte. The .case files are identical to the ones first published on this branch (checked with cmp).

Expectations are hand-derived exact rationals, not numbers copied from a run:

CALIBRATION.md lists per fixture the number of exact values checked and the largest deviation seen; the worst is 2.2e-16 (one unit in the last place of 1/2).

Findings worth knowing (calibration, not discovery)

  1. A broken clock (tau = 1/3 with N = 4) and the correct weight w = N/M fails only povm_normalization; the clock probabilities still sum to one. A wrong weight fails both povm_normalization and probability_sum.
  2. In the draft spec's convention the sign of the Y row depends on the sign of hz; the closed form and the matrix path agree, so any disagreement with another implementation is a convention error, not numerics.
  3. The relational phase (1, i) shifts the pattern one label backwards, not forwards.
  4. On a trivial kernel (fixture n1-uncovered) V2 section 4 fixes check 3 FAIL and checks 4, 6, 7, 8, 9, 10 NOT_EVALUATED even though the reference lines are still written; the first release of this oracle evaluated check 7 on those lines (Agent 5 finding D4), fixed and tested since.
  5. Dephasing the kernel branches keeps p(k) = 1/N and Hermitian unit-trace rho_k but flattens every X and Y probability to 1/2: the clock correlation survives, the interference pattern does not. This is the nc-dephased-control fixture.

What this is not

Not the candidate engine, not a verifier of Agent 3's internals, not a RIGOROUS bound (see NUMERICAL_ERROR.md), and not a statement about any physical experiment. It never reads evaluator-private held-out data or hidden qualification parameters; every input is a public .case file in this directory or one handed to it on the command line.