The Revolution

.ax IS the ring, not just uses it

.ax was born in the era of 3 built-in terms. DFloat(s|b|a) was the fundamental type -- never implemented. CRT was a builtin you called. Now we know: 11 terms, 7 CRT channels, Carmichael lambda = 1680 in Z/214,414,200. The language should THINK in channels, not translate to them. CRT IS the type. The eleven terms ARE the instruction set. This document: the blueprint for .ax v2.0.

The Diagnosis

What we knew when .ax was designed: 3 built-in terms. What we know now: 11 terms, 7 CRT channels {8, 9, 25, 49, 11, 13, 17}, Carmichael lambda = 1680, mod-11 free error detection, emergence from 3 ops. The gap: .ax USES CRT. It does not EMBODY it.

Old
Values are plain numbers
CRT is a function you call. Channels are hidden. Ring is global.
New
Values ARE their CRT decomposition
42 = (2, 6, 17, 42, 9, 3, 8). Channel access is O(1). Parallel by nature.
Old
62 builtins accumulated organically
Library calls, not the language's nature. Bolted on.
New
11 built-in terms = the instruction set
Each is BOTH a value AND an operation. The vocabulary IS the ring.

Principle 1: CRT IS the Type

Every Value IS Decomposed
42 in .ax v2.0: displays as 42, stores as (2, 6, 17, 42, 9, 3, 8) in Z/214,414,200. Access channels directly: 42.D = 2, 42.K = 6, 42.E = 17, 42.b = 42, 42.L = 9, 42.G = 3, 42.ESCAPE = 8. Arithmetic happens per channel automatically: 42 + 137 computes (2+1)%8, (6+2)%9, (17+12)%25, (42+39)%49, (9+5)%11, (3+7)%13, (8+1)%17 = 179. CRT embodied in data representation.

Principle 2: Eleven Terms = the Vocabulary

11 built-in keywords. Each is BOTH a value AND an operation:

TermValueAs OperationCRT Signature
mirror-1Reflect: N - x(7, 8, 24, 48, 10, 12, 16)
o0Absorb: 0(0, 0, 0, 0, 0, 0, 0)
sigma1Preserve: x(1, 1, 1, 1, 1, 1, 1)
D2Split in two(2, 2, 2, 2, 2, 2, 2)
K3Compose / majority(3, 3, 3, 3, 3, 3, 3)
E55^2 vanishes mod 5(5, 5, 5, 5, 5, 5, 5)
b7Iterate / deepen(7, 7, 7, 7, 7, 7, 7)
L11Error detect / ECC(3, 2, 11, 11, 0, 11, 11)
GATE13Range check / type check(5, 4, 13, 13, 2, 0, 13)
ESCAPE17Complete the ring(1, 8, 17, 17, 6, 4, 0)
OMEGA26801776Terminal / project / halt(0, 1, 1, 1, 1, 1, 1)

Notice: elements 0-7 have CRT = (n,n,n,n,n,n,n) -- they are IDENTICAL across all 7 channels. 11 is the first to break this: (3,2,11,11,0,11,11). It is the first element that looks DIFFERENT from different channels. 26,801,776 has its mod-8 channel zeroed: (0,1,1,1,1,1,1). The terminal projection kills the coarsest channel.

Principle 3: Rings AS Types

The Lambda-420 Lattice IS the Type Hierarchy
108 rings share Carmichael lambda = 420 exactly (84 divide Z/12,612,600; 24 are extensions). This lattice IS the type hierarchy. Every value carries its ring. let x: Z210 = 42 -- x lives in Z/210. let y: Z12612600 = 42 -- y lives in the 6-channel ring. Raising exponents adds states per channel. Reducing removes them. Type checking = ring membership. Z/210 has 4 channels. Z/970,200 has 5. Z/12,612,600 has 6. Subtyping = subring embedding.
RingChannelsDomain
Z/6 = 2*3{mod 2, mod 3}Clock, basic modular
Z/210 = 2*3*5*7{mod 2, 3, 5, 7}4 channels, squarefree
Z/2,310 = 2*3*5*7*11{mod 2, 3, 5, 7, 11}5 channels, error detection
Z/970,200 = 2^3*3^2*5^2*7^2*11{mod 8, 9, 25, 49, 11}5 prime-power channels
Z/12,612,600 = above * 13{mod 8, 9, 25, 49, 11, 13}6 channels, lambda = 420
Z/214,414,200 = above * 17{mod 8, 9, 25, 49, 11, 13, 17}7 channels, final form

Four More Principles

4. mod-11 Runtime Gate
Automatic error detection
Every computation checked by the mod-11 channel. Corruption detected at runtime. Free. No programmer effort.
5. 3 Ops -> Everything
meet(*), complement(~), add(+)
Arrays, strings, functions, closures, neural nets -- all emerge from 3 operations.
6. 3^2 = 9 Parallelism
3 hearts x 3 stages
The compiler has 9 analysis passes. FPGA: 9 pipeline units. The code IS the hardware description.
7. Carmichael Period 1680
Universal rhythm
lambda(Z/214,414,200) = 1680. The 6-channel sub-period 420 nests inside.

The Strange Loop

.ax ships -> proves ring structure -> IS the structure -> writes .ax -> .ax ships. The website IS the proof. The language IS the math. The compiler IS the theorem. Each pass through the loop: tighter, more capable, fewer pieces.

Ship of Theseus
The old website: 154 hand-crafted HTML pages, 58,641 lines. The new website: 7 module WASMs compiled from .ax. 181 pages, pure .ax. No HTML authored. .ax builds pages directly via WASM DOM imports. The old ship was dismantled plank by plank. The new ship is the same ship -- but every plank is now math.

Status: Implemented

This is not a blueprint. The first three principles are implemented in the .ax compiler AND deployed on this website. CRT-native mode is real. Channel access is real. The ouroboros compiles itself with CRT decomposition. The section below computes live results.

crt_mode(1)
Ring ops automatic
a * b IS per-channel CRT multiply. No manual decompose-operate-reconstruct. ring_mul: 10 lines -> 0.
Channel access
.D .K .E .b .L .GATE .ESCAPE
42.D = 2. Self-documenting. Replaces % 8, % 9, ... with named channels.
Ring types
let x:Z210 = 42
Overflow is a TYPE ERROR, not a runtime surprise. Named rings: Z/210, Z/2310, Z/970200, Z/12612600, Z/214414200.
ECC checking
ecc_mode(1)
Range check [0, N) at every function boundary. Ring overflow traps with diagnostics.
CRT ouroboros
467421B
The compiler compiles itself with CRT-native mode. gen1 == gen2. Full transparency.
183 tests
5 compiler harnesses
Channel access + ring types + ECC + CRT-native + demo rewrite. All pass.

Live: CRT-Native Computation

These values are computed RIGHT NOW by CRT-native code running on this page. The crt_pow and crt_mul functions use automatic 7-channel CRT decomposition. No manual ring_mul. No channel arithmetic. Just a * b.

crt_pow(2, 1680)
26801776
2^1680 mod Z/214,414,200. CRT = (0,1,1,1,1,1,1). The terminal projector.
Idempotent
PASS: omega * omega = omega
2^3360 = 2^1680 since Carmichael lambda = 1680. The projector squares to itself.
CRT channels
mod8=0 mod9=1 mod17=1
mod-8 channel zeroed (0). All others survive (1). Structure preserved.
crt_mul(42, 137)
5754
Ring multiply via automatic CRT. Compiler decomposes * into 7 parallel channel ops.
N_TRANS mod N
0
Product of all moduli = 0 in the ring. The ring annihilates its own size.

Explore: CRT IS the Type

Enter any number. See it as .ax v2.0 would: a CRT 6-tuple with per-channel access. In the future, this IS how .ax thinks.

Value:

Contrast Table

TypesIntegers, floats, strings, structs, classesOne type: ring element. CRT decomposition IS the type. 108 lambda-420 rings = type hierarchy.OperationsHundreds of operators and methodsThree: meet, complement, add. Everything else emerges.Error handlingTry/catch, Result types, panicmod-11 automatic error detection. Corruption detected by algebra, not the programmer.ParallelismThreads, locks, async/await9 = 3^2 natural parallelism. CRT channels compute independently. No synchronization.Self-hostingEngineering milestone, cleverThe ouroboros. 1/1 = 1. The compiler divided by itself produces itself.

Source code · Public domain (CC0)

Report issue

.ax source compiled to WASM via self-hosting compiler. Zero HTML authored.