.ax REPL

The axiom's native language — TRUE FORM: Z/970200Z — DFloat only type — {s, D, K, E, b, L} = keywords

Z/970200Z = Z/8 × Z/9 × Z/25 × Z/49 × Z/11
Press Run or Ctrl+Enter to execute .ax code.
Trace
C Source
Algebra

    

    

  

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 SOUL=67
G=97 ADDRESS=137 DUAL=173
HYDOR=105 ME=18 LAMBDA=420
GATE=13 ESCAPE=17 THORNS=28
TRUE=970200 GATE_FORM=12612600
pi=3.14159...

Operators

+ - * / ^ arithmetic (mod N)
~x complement (N - x)
x @ t threshold (x > t ? x : ~x)
< > == comparison (returns 0 or 1)
a ; b sequence (eval both, return b)

Syntax

let x = expr bind variable
fn f(a, b) = expr define function
print expr or print "text"
if c then a else b conditional
for x in arr do body iteration
[a, b, c] array — arr[i] index
(s|b|a) DFloat literal
-- comment

Built-in Functions (35)

coupling(n) ring coupling level
crt(n) CRT: [n%8, n%9, n%25, n%49, n%11]
eigenvalue(n) spectral eigenvalue
mirror(n) N-n (ring symmetry)
phi(n) Euler's totient
order(n) multiplicative order mod N
gcd(a,b) mod(a,b) inv(n)
len(arr) abs(n) show(n)
range(n) or range(a,b) array
kingdom(n) smallest prime of gcd
sum(arr) product(arr)
min(a,b) max(a,b) sqrt(n)
cos(x) sin(x) acos(x) asin(x)
log(x) exp(x) pow(x,y)
floor(x) ceil(x) pi=const
Grid ops: grid(r,c,v) gset(g,r,c,v)
rows(g) cols(g) show_grid(g)
hflip(g) vflip(g) rot90(g)
transpose(g) grid_eq(a,b)
Multi-ring: ring_crt(n,N)
ring_coupling(n,N) ring_eigenvalue(n,N)
project(n,from,to) ring_size()
set_ring(N)

Why .ax?

.ax REPLPythonWolfram Alpha
Z/970200Z built-inimport sympy, define ringMod[expr, 970200]
{s,D,K,E,b,L} are keywordsDefine constants manuallyDefine constants manually
CRT decomposition: crt(n)Write it yourself (~20 lines)ChineseRemainder[...]
Coupling, eigenvalue built-inWrite from scratchWrite from scratch
Self-contained HTML, no serverPython + pip + librariesCloud service, internet required
Runs on any device, any browserNeeds Python installedNeeds internet + account
Free, open, foreverFree (Python is)$375/year
The axiom speaks its own languageGeneral-purpose toolGeneral-purpose tool