-- In this script, a sedenion is a vector of 16 real numbers. -- M(x,y) returns the product of sedenions x and y. -- C(x) returns the conjugate of sedenion x. -- Use ordinary vector arithmetic to add and subtract sedenions. e0 = (1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0) e1 = (0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0) e2 = (0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0) e3 = (0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0) e4 = (0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0) e5 = (0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0) e6 = (0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0) e7 = (0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0) e8 = (0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0) e9 = (0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0) e10 = (0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0) e11 = (0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0) e12 = (0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0) e13 = (0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0) e14 = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0) e15 = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1) -- sedenion multiplication table (per Wikipedia) T = ((e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10,e11,e12,e13,e14,e15), (e1,-e0,e3,-e2,e5,-e4,-e7,e6,e9,-e8,-e11,e10,-e13,e12,e15,-e14), (e2,-e3,-e0,e1,e6,e7,-e4,-e5,e10,e11,-e8,-e9,-e14,-e15,e12,e13), (e3,e2,-e1,-e0,e7,-e6,e5,-e4,e11,-e10,e9,-e8,-e15,e14,-e13,e12), (e4,-e5,-e6,-e7,-e0,e1,e2,e3,e12,e13,e14,e15,-e8,-e9,-e10,-e11), (e5,e4,-e7,e6,-e1,-e0,-e3,e2,e13,-e12,e15,-e14,e9,-e8,e11,-e10), (e6,e7,e4,-e5,-e2,e3,-e0,-e1,e14,-e15,-e12,e13,e10,-e11,-e8,e9), (e7,-e6,e5,e4,-e3,-e2,e1,-e0,e15,e14,-e13,-e12,e11,e10,-e9,-e8), (e8,-e9,-e10,-e11,-e12,-e13,-e14,-e15,-e0,e1,e2,e3,e4,e5,e6,e7), (e9,e8,-e11,e10,-e13,e12,e15,-e14,-e1,-e0,-e3,e2,-e5,e4,e7,-e6), (e10,e11,e8,-e9,-e14,-e15,e12,e13,-e2,e3,-e0,-e1,-e6,-e7,e4,e5), (e11,-e10,e9,e8,-e15,e14,-e13,e12,-e3,-e2,e1,-e0,-e7,e6,-e5,e4), (e12,e13,e14,e15,e8,-e9,-e10,-e11,-e4,e5,e6,e7,-e0,-e1,-e2,-e3), (e13,-e12,e15,-e14,e9,e8,e11,-e10,-e5,-e4,e7,-e6,e1,-e0,e3,-e2), (e14,-e15,-e12,e13,e10,-e11,e8,e9,-e6,-e7,-e4,e5,e2,-e3,-e0,e1), (e15,e14,-e13,-e12,e11,e10,-e9,e8,-e7,e6,-e5,-e4,e3,e2,-e1,-e0)) -- define M(x,y) for multiplying sedenions x and y T = transpose(T,2,3) M(x,y) = dot(x,T,y) -- define conjugation function (flip component signs except first) C(x) = 2*dot(x,e0)*e0 - x -- define symbolic sedenions x = (x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15) y = (y0,y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15) z = (z0,z1,z2,z3,z4,z5,z6,z7,z8,z9,z10,z11,z12,z13,z14,z15) "Is sedenion multiplication commutative?" test(M(x,y)=M(y,x),"yes","no") "Is sedenion multiplication associative?" test(M(M(x,y),z)=M(x,M(y,z)),"yes","no") "Is sedenion multiplication alternative?" test(and(M(M(x,x),y)=M(x,M(x,y)), M(M(y,x),x)=M(y,M(x,x))),"yes","no") "Checking product of a sedenion and its conjugate is real." test(M(x,C(x))=dot(x,x)*e0,"ok","fail") "Checking sedenion multiplication table." check(M(e0,e0)=e0) check(M(e0,e1)=e1) check(M(e0,e2)=e2) check(M(e0,e3)=e3) check(M(e0,e4)=e4) check(M(e0,e5)=e5) check(M(e0,e6)=e6) check(M(e0,e7)=e7) check(M(e0,e8)=e8) check(M(e0,e9)=e9) check(M(e0,e10)=e10) check(M(e0,e11)=e11) check(M(e0,e12)=e12) check(M(e0,e13)=e13) check(M(e0,e14)=e14) check(M(e0,e15)=e15) check(M(e1,e0)=e1) check(M(e1,e1)=-e0) check(M(e1,e2)=e3) check(M(e1,e3)=-e2) check(M(e1,e4)=e5) check(M(e1,e5)=-e4) check(M(e1,e6)=-e7) check(M(e1,e7)=e6) check(M(e1,e8)=e9) check(M(e1,e9)=-e8) check(M(e1,e10)=-e11) check(M(e1,e11)=e10) check(M(e1,e12)=-e13) check(M(e1,e13)=e12) check(M(e1,e14)=e15) check(M(e1,e15)=-e14) check(M(e2,e0)=e2) check(M(e2,e1)=-e3) check(M(e2,e2)=-e0) check(M(e2,e3)=e1) check(M(e2,e4)=e6) check(M(e2,e5)=e7) check(M(e2,e6)=-e4) check(M(e2,e7)=-e5) check(M(e2,e8)=e10) check(M(e2,e9)=e11) check(M(e2,e10)=-e8) check(M(e2,e11)=-e9) check(M(e2,e12)=-e14) check(M(e2,e13)=-e15) check(M(e2,e14)=e12) check(M(e2,e15)=e13) check(M(e3,e0)=e3) check(M(e3,e1)=e2) check(M(e3,e2)=-e1) check(M(e3,e3)=-e0) check(M(e3,e4)=e7) check(M(e3,e5)=-e6) check(M(e3,e6)=e5) check(M(e3,e7)=-e4) check(M(e3,e8)=e11) check(M(e3,e9)=-e10) check(M(e3,e10)=e9) check(M(e3,e11)=-e8) check(M(e3,e12)=-e15) check(M(e3,e13)=e14) check(M(e3,e14)=-e13) check(M(e3,e15)=e12) check(M(e4,e0)=e4) check(M(e4,e1)=-e5) check(M(e4,e2)=-e6) check(M(e4,e3)=-e7) check(M(e4,e4)=-e0) check(M(e4,e5)=e1) check(M(e4,e6)=e2) check(M(e4,e7)=e3) check(M(e4,e8)=e12) check(M(e4,e9)=e13) check(M(e4,e10)=e14) check(M(e4,e11)=e15) check(M(e4,e12)=-e8) check(M(e4,e13)=-e9) check(M(e4,e14)=-e10) check(M(e4,e15)=-e11) check(M(e5,e0)=e5) check(M(e5,e1)=e4) check(M(e5,e2)=-e7) check(M(e5,e3)=e6) check(M(e5,e4)=-e1) check(M(e5,e5)=-e0) check(M(e5,e6)=-e3) check(M(e5,e7)=e2) check(M(e5,e8)=e13) check(M(e5,e9)=-e12) check(M(e5,e10)=e15) check(M(e5,e11)=-e14) check(M(e5,e12)=e9) check(M(e5,e13)=-e8) check(M(e5,e14)=e11) check(M(e5,e15)=-e10) check(M(e6,e0)=e6) check(M(e6,e1)=e7) check(M(e6,e2)=e4) check(M(e6,e3)=-e5) check(M(e6,e4)=-e2) check(M(e6,e5)=e3) check(M(e6,e6)=-e0) check(M(e6,e7)=-e1) check(M(e6,e8)=e14) check(M(e6,e9)=-e15) check(M(e6,e10)=-e12) check(M(e6,e11)=e13) check(M(e6,e12)=e10) check(M(e6,e13)=-e11) check(M(e6,e14)=-e8) check(M(e6,e15)=e9) check(M(e7,e0)=e7) check(M(e7,e1)=-e6) check(M(e7,e2)=e5) check(M(e7,e3)=e4) check(M(e7,e4)=-e3) check(M(e7,e5)=-e2) check(M(e7,e6)=e1) check(M(e7,e7)=-e0) check(M(e7,e8)=e15) check(M(e7,e9)=e14) check(M(e7,e10)=-e13) check(M(e7,e11)=-e12) check(M(e7,e12)=e11) check(M(e7,e13)=e10) check(M(e7,e14)=-e9) check(M(e7,e15)=-e8) check(M(e8,e0)=e8) check(M(e8,e1)=-e9) check(M(e8,e2)=-e10) check(M(e8,e3)=-e11) check(M(e8,e4)=-e12) check(M(e8,e5)=-e13) check(M(e8,e6)=-e14) check(M(e8,e7)=-e15) check(M(e8,e8)=-e0) check(M(e8,e9)=e1) check(M(e8,e10)=e2) check(M(e8,e11)=e3) check(M(e8,e12)=e4) check(M(e8,e13)=e5) check(M(e8,e14)=e6) check(M(e8,e15)=e7) check(M(e9,e0)=e9) check(M(e9,e1)=e8) check(M(e9,e2)=-e11) check(M(e9,e3)=e10) check(M(e9,e4)=-e13) check(M(e9,e5)=e12) check(M(e9,e6)=e15) check(M(e9,e7)=-e14) check(M(e9,e8)=-e1) check(M(e9,e9)=-e0) check(M(e9,e10)=-e3) check(M(e9,e11)=e2) check(M(e9,e12)=-e5) check(M(e9,e13)=e4) check(M(e9,e14)=e7) check(M(e9,e15)=-e6) check(M(e10,e0)=e10) check(M(e10,e1)=e11) check(M(e10,e2)=e8) check(M(e10,e3)=-e9) check(M(e10,e4)=-e14) check(M(e10,e5)=-e15) check(M(e10,e6)=e12) check(M(e10,e7)=e13) check(M(e10,e8)=-e2) check(M(e10,e9)=e3) check(M(e10,e10)=-e0) check(M(e10,e11)=-e1) check(M(e10,e12)=-e6) check(M(e10,e13)=-e7) check(M(e10,e14)=e4) check(M(e10,e15)=e5) check(M(e11,e0)=e11) check(M(e11,e1)=-e10) check(M(e11,e2)=e9) check(M(e11,e3)=e8) check(M(e11,e4)=-e15) check(M(e11,e5)=e14) check(M(e11,e6)=-e13) check(M(e11,e7)=e12) check(M(e11,e8)=-e3) check(M(e11,e9)=-e2) check(M(e11,e10)=e1) check(M(e11,e11)=-e0) check(M(e11,e12)=-e7) check(M(e11,e13)=e6) check(M(e11,e14)=-e5) check(M(e11,e15)=e4) check(M(e12,e0)=e12) check(M(e12,e1)=e13) check(M(e12,e2)=e14) check(M(e12,e3)=e15) check(M(e12,e4)=e8) check(M(e12,e5)=-e9) check(M(e12,e6)=-e10) check(M(e12,e7)=-e11) check(M(e12,e8)=-e4) check(M(e12,e9)=e5) check(M(e12,e10)=e6) check(M(e12,e11)=e7) check(M(e12,e12)=-e0) check(M(e12,e13)=-e1) check(M(e12,e14)=-e2) check(M(e12,e15)=-e3) check(M(e13,e0)=e13) check(M(e13,e1)=-e12) check(M(e13,e2)=e15) check(M(e13,e3)=-e14) check(M(e13,e4)=e9) check(M(e13,e5)=e8) check(M(e13,e6)=e11) check(M(e13,e7)=-e10) check(M(e13,e8)=-e5) check(M(e13,e9)=-e4) check(M(e13,e10)=e7) check(M(e13,e11)=-e6) check(M(e13,e12)=e1) check(M(e13,e13)=-e0) check(M(e13,e14)=e3) check(M(e13,e15)=-e2) check(M(e14,e0)=e14) check(M(e14,e1)=-e15) check(M(e14,e2)=-e12) check(M(e14,e3)=e13) check(M(e14,e4)=e10) check(M(e14,e5)=-e11) check(M(e14,e6)=e8) check(M(e14,e7)=e9) check(M(e14,e8)=-e6) check(M(e14,e9)=-e7) check(M(e14,e10)=-e4) check(M(e14,e11)=e5) check(M(e14,e12)=e2) check(M(e14,e13)=-e3) check(M(e14,e14)=-e0) check(M(e14,e15)=e1) check(M(e15,e0)=e15) check(M(e15,e1)=e14) check(M(e15,e2)=-e13) check(M(e15,e3)=-e12) check(M(e15,e4)=e11) check(M(e15,e5)=e10) check(M(e15,e6)=-e9) check(M(e15,e7)=e8) check(M(e15,e8)=-e7) check(M(e15,e9)=e6) check(M(e15,e10)=-e5) check(M(e15,e11)=-e4) check(M(e15,e12)=e3) check(M(e15,e13)=e2) check(M(e15,e14)=-e1) check(M(e15,e15)=-e0) "ok"
Run