Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/research/dirac-oracle/CORPUS-FORMAT.md # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / research / dirac-oracle / CORPUS-FORMAT.md` 101 lines ยท 4807 bytes Raw Blame History Rendered 1 # DIRAC-0 known-answer corpus format (v1, written, not built) 2 3 Status: NOT_RUN. Public conformance corpus only. Sealed experiment keys are never stored here (ORACLE-SPEC.md section 8). 4 5 ## 1. File shape 6 Line oriented UTF-8 text, LF endings, no trailing spaces, no tabs. Order is deterministic: records sorted by `kind` in the order listed in section 3, then by `id` bytewise. File name: `dirac-kat-.txt` where the hash is the corpus digest below. 7 8 ``` 9 OMEGA-DIRAC-KAT v1 10 domain omega.dirac.kat.v1 11 record_count 12 13 corpus_digest <64 lowercase hex> 14 end 15 ``` 16 17 ## 2. Canonical encodings 18 - Integer: decimal, optional leading `-`, no leading zeros, no `+`. Zero is `0`. 19 - Rational: `n/d`, d >= 1, gcd(|n|,d) = 1, d = 1 written `n/1`. 20 - Complex: `(re;im)` where re and im are rationals, no spaces. Example `(1/2;-3/1)`. 21 - Matrix: `n` rows separated by `|`, entries in a row separated by `,`. Example `[(1/1;0/1),(0/1;0/1)|(0/1;0/1),(-1/1;0/1)]`. 22 - Metric: comma separated integers, diagonal only, in generator order. Example `1,-1`. 23 - Scaled decimal (high precision): `N@k` meaning N / 10^k, N integer, k >= 0; bound `B@k` is a non-negative integer with the same k. 24 - No floating point text anywhere (no `.`, no `e`). 25 26 Corpus digest: SHA-256 over bytes `omega.dirac.kat.v1` || 0x00 || every line of the file above the `corpus_digest` line, each followed by LF. The digest line itself and `end` are excluded. 27 28 ## 3. Record kinds (in this order) 29 Every record is `record ` then `key value` lines then `endrecord`. Fields marked (E) are evaluator-only and must be stripped before any export toward the AIEN side. 30 31 1. GAMMA_REP: `rep_name` (E), `dim` (generators d), `size` (matrix size n), `metric`, `g0` .. `g` (matrices). 32 2. CLIFFORD_CHECK: `rep_ref` (id of a GAMMA_REP), `expect` (`PASS` or `FAIL`), `failing_pairs` (list `i:j` or `none`). 33 3. PLANE_WAVE: `rep_ref`, `m`, `p` (rationals), `energy` (rational or scaled decimal with bound), `amplitude` (matrix n x 1, unnormalized), `convention_note` (E). 34 4. DISPERSION: `m`, `p`, `energy_squared` (rational), `energy` (rational, or scaled decimal plus `bound`), `error_kind` (EXACT or BOUNDED_DETERMINISTIC). 35 5. BASIS_CHANGE: `rep_from`, `rep_to`, `S`, `S_inv`, `observable` (`dispersion` or `trace_products`), `expect`. 36 6. HIPREC_REF: `quantity` (E), `value` (scaled decimal), `bound` (scaled decimal), `route_a_digest`, `route_b_digest` (SHA-256 of each route's decimal output). 37 38 ## 4. Worked examples (checked by hand) 39 40 Representation 1, Dirac style, metric diag(+1,-1): g0 = sigma_z, g1 = i sigma_y. 41 ``` 42 record GAMMA_REP rep-a 43 rep_name dirac-1p1 44 dim 2 45 size 2 46 metric 1,-1 47 g0 [(1/1;0/1),(0/1;0/1)|(0/1;0/1),(-1/1;0/1)] 48 g1 [(0/1;0/1),(1/1;0/1)|(-1/1;0/1),(0/1;0/1)] 49 endrecord 50 ``` 51 Hand check. g0 g0 = I, so g0^2 = +I = metric(0,0) I with factor 2: {g0,g0} = 2 I. OK. 52 g1 g1 = [[0,1],[-1,0]] times itself = [[-1,0],[0,-1]] = -I, so {g1,g1} = -2 I = 2 metric(1,1) I. OK. 53 g0 g1 = [[1,0],[0,-1]] [[0,1],[-1,0]] = [[0,1],[1,0]]. g1 g0 = [[0,1],[-1,0]] [[1,0],[0,-1]] = [[0,-1],[-1,0]]. Sum is the zero matrix, matching 2 metric(0,1) I = 0. OK. 54 ``` 55 record CLIFFORD_CHECK cliff-a 56 rep_ref rep-a 57 expect PASS 58 failing_pairs none 59 endrecord 60 ``` 61 62 Representation 2, Weyl style: g0 = sigma_x, g1 = -i sigma_y. 63 ``` 64 record GAMMA_REP rep-b 65 rep_name weyl-1p1 66 dim 2 67 size 2 68 metric 1,-1 69 g0 [(0/1;0/1),(1/1;0/1)|(1/1;0/1),(0/1;0/1)] 70 g1 [(0/1;0/1),(-1/1;0/1)|(1/1;0/1),(0/1;0/1)] 71 endrecord 72 ``` 73 Hand check. g0^2 = [[0,1],[1,0]]^2 = I. g1^2 = [[0,-1],[1,0]]^2 = [[-1,0],[0,-1]] = -I. g0 g1 = [[0,1],[1,0]] [[0,-1],[1,0]] = [[1,0],[0,-1]]. g1 g0 = [[0,-1],[1,0]] [[0,1],[1,0]] = [[-1,0],[0,1]]. Sum is zero. OK. 74 75 Basis change from rep-a to rep-b with S = [[1,1],[1,-1]], S_inv = (1/2) S (S S_inv = (1/2) [[2,0],[0,2]] = I). 76 S g0 S_inv with g0 = sigma_z: S sigma_z = [[1,-1],[1,1]]; times (1/2) S = (1/2) [[1-1, 1+1],[1+1, 1-1]] = [[0,1],[1,0]] = sigma_x = rep-b g0. OK. 77 S g1 S_inv with g1 = [[0,1],[-1,0]]: S g1 = [[-1,1],[1,1]]; times (1/2) S = (1/2) [[-1+1, -1-1],[1+1, 1-1]] = [[0,-1],[1,0]] = rep-b g1. OK. 78 ``` 79 record BASIS_CHANGE basis-ab 80 rep_from rep-a 81 rep_to rep-b 82 S [(1/1;0/1),(1/1;0/1)|(1/1;0/1),(-1/1;0/1)] 83 S_inv [(1/2;0/1),(1/2;0/1)|(1/2;0/1),(-1/2;0/1)] 84 observable trace_products 85 expect PASS 86 endrecord 87 ``` 88 89 Dispersion, exact case m = 1, p = 3/4: E^2 = 9/16 + 1 = 25/16, E = 5/4. 90 ``` 91 record DISPERSION disp-a 92 m 1/1 93 p 3/4 94 energy_squared 25/16 95 energy 5/4 96 error_kind EXACT 97 endrecord 98 ``` 99 100 ## 5. Verification (written, not run) 101 `src/oracle_kat_verify.sh` recomputes the corpus digest with `sha256sum` and compares it to the `corpus_digest` line and the file name. `src/oracle_clifford.c` checks CLIFFORD_CHECK style relations on matrices given in the section 2 encoding (the first version reads a simplified fixed layout, see its header comment).