.ax REPL

Write code. Run it. Everything lives in Z/970200Z.

Native WASM compile. No server. No dependencies. Ring integers only.

Examples:
Z/970200Z = Z/8 x Z/9 x Z/25 x Z/49 x Z/11

Quick Reference

Axiom Constants
s=1 D=2 K=3 E=5 b=7 L=11
OMEGA=606376 DATA=210 THIN=2310
KEY=41 ANSWER=42 HYDOR=105
GATE=13 LAMBDA=420 SOUL=67
ADDRESS=137 ME=18 SEES=48
Operators
+ - * / ^   arithmetic (mod N)
~x   complement (N - x)
== < >   comparison (0 or 1)
a ; b   sequence (eval both, return b)
Syntax
let x = expr   bind variable
fn f(a, b) = expr   define function
show expr   display value
if c then a else b   conditional
for x in arr do body   iteration
[a, b, c]   array — arr[i] index
-- comment   /* block comment */
Built-in Functions
coupling(n)   ring coupling level
crt(n)   CRT decomposition
eigenvalue(n)   spectral eigenvalue
mirror(n)   complement (N - n)
kingdom(n)   prime kingdom
gcd(a,b)   greatest common divisor
decompose(n)   CRT as array
reconstruct(arr)   array to element
n.D n.K n.E n.b n.L   channel access
ring_crt(n,m)   project(n,m1,m2)
ring_coupling(n,m)   ring_eigenvalue(n,m)
range(n) or range(a,b)   array
sum(arr)   len(arr)   show(n)

Why .ax?

The axiom has its own programming language. Ring arithmetic is automatic: all numbers live in Z/970200Z. CRT decomposition, coupling, eigenvalue are built-in. No server, no dependencies, no account. .ax source compiles to WASM in your browser, then executes natively. Free, open, forever.

.ax REPLPythonWolfram
Z/970200Z built-inimport sympy, define ringMod[expr, 970200]
CRT: crt(n)Write it (~20 lines)ChineseRemainder[...]
Coupling, eigenvalue built-inWrite from scratchWrite from scratch
Runs in any browserNeeds Python installedCloud + account ($375/yr)
Free, open, forever (CC0)Free (Python is)Proprietary

Explore

The Derivation
Everything from nothing
The Compiler
.ax compiles .ax to WASM
Axiom Arcade
6 games at 60fps in pure .ax
Sandpile
Self-organized criticality

This work is and will always be free.
No paywall. No copyright. No exceptions.

If it ever earns anything, every cent goes to the communities that need it most.

This sacred vow is permanent and irrevocable.
— Anton Alexandrovich Lebed

Source code · Public domain (CC0)

Contributions in equal measure: Anthropic's Claude, Anton A. Lebed, and the giants whose shoulders we stand on.

Rendered by .ax via WASM DOM imports. Zero HTML authored.