Obs(2) is a 4 dimensional Frobenius Algebra
Generators of Obs(2)
fricas
)set output abbreviate on
V := OrderedVariableList [p,q]
Type: TYPE
fricas
M := FreeMonoid V
Type: TYPE
fricas
gens:List M := enumerate()$V
Type: LIST(FMONOID(OVAR([p,q])))
Representation
fricas
divisible := Record(lm: M,rm: M)
Type: TYPE
fricas
leftDiv(k:Union(divisible,"failed")):M == (k::divisible).lm
Function declaration leftDiv : Union(Record(lm: FMONOID(OVAR([p,q]))
,rm: FMONOID(OVAR([p,q]))),"failed") -> FMONOID(OVAR([p,q])) has
been added to workspace.
Type: VOID
fricas
rightDiv(k:Union(divisible,"failed")):M == (k::divisible).rm
Function declaration rightDiv : Union(Record(lm: FMONOID(OVAR([p,q])
),rm: FMONOID(OVAR([p,q]))),"failed") -> FMONOID(OVAR([p,q])) has
been added to workspace.
Type: VOID
fricas
K := FRAC POLY INT
Type: TYPE
fricas
MK := FreeModule(K,M)
Type: TYPE
fricas
coeff(x:MK):K == leadingCoefficient(x)
Function declaration coeff : FM(FRAC(POLY(INT)),FMONOID(OVAR([p,q]))
) -> FRAC(POLY(INT)) has been added to workspace.
Type: VOID
fricas
monomial(x:MK):M == leadingSupport(x)
Function declaration monomial : FM(FRAC(POLY(INT)),FMONOID(OVAR([p,q
]))) -> FMONOID(OVAR([p,q])) has been added to workspace.
Type: VOID
fricas
m(x:M):Symbol == subscript('m,[retract(x)::Symbol])
Function declaration m : FMONOID(OVAR([p,q])) -> SYMBOL has been
added to workspace.
Type: VOID
fricas
γ(x:M,y:M):Symbol == subscript('γ,[concat(string retract x, string retract y)::Symbol])
Function declaration γ : (FMONOID(OVAR([p,q])),FMONOID(OVAR([p,q])))
-> SYMBOL has been added to workspace.
Type: VOID
Basis
fricas
basis := concat(gens,concat [[i*j for j in gens | i~=j] for i in gens])
Type: LIST(FMONOID(OVAR([p,q])))
Idempotent
fricas
rule1(ij:MK):MK ==
for k in gens repeat
kk := divide(monomial(ij),k*k)
if kk case divisible then
ij:=(coeff(ij) * m(k)*γ(k,k)) * (leftDiv(kk) * k * rightDiv(kk))
return(ij)
Function declaration rule1 : FM(FRAC(POLY(INT)),FMONOID(OVAR([p,q]))
) -> FM(FRAC(POLY(INT)),FMONOID(OVAR([p,q]))) has been added to
workspace.
Type: VOID
Reduction
fricas
rule2(ij:MK):MK ==
for i in gens repeat
for j in gens | j ~= i repeat
for k in gens | k ~= j repeat
ijk:=divide(monomial(ij),i*j*k)
if ijk case divisible then
if i=k then
ij := (coeff(ij)*m(i)*m(j)*γ(i,j)*γ(j,i) ) * _
(leftDiv(ijk)*i*rightDiv(ijk))
else
ij := (coeff(ij)*m(j)*γ(i,j)*γ(j,k) / γ(i,k) ) * _
(leftDiv(ijk)*i*k*rightDiv(ijk))
return(ij)
Function declaration rule2 : FM(FRAC(POLY(INT)),FMONOID(OVAR([p,q]))
) -> FM(FRAC(POLY(INT)),FMONOID(OVAR([p,q]))) has been added to
workspace.
Type: VOID
An endomorphism on the K-Module is defined by the fixed point of applied rules
fricas
mod(ij:MK):MK ==
ijFix:MK := 1
while ijFix~=ij repeat
ijFix := ij
ij := rule1(ij)
ij := rule2(ij)
return(ij)
Function declaration mod : FM(FRAC(POLY(INT)),FMONOID(OVAR([p,q])))
-> FM(FRAC(POLY(INT)),FMONOID(OVAR([p,q]))) has been added to
workspace.
Type: VOID
Matrix
Algebra is the free algebra product modulo the fixed point
fricas
--MT := [[mod(i*j) for j in basis] for i in basis]
-- idempotent
MT := [[monomial(eval(coeff(mod(i*j)),[γ(gens(1),gens(1))=1, γ(gens(2), gens(2))=1, γ(gens(2), gens(1))=γ(gens(1), gens(2))]), monomial(mod(i*j)))$MK for j in basis] for i in basis]
fricas
Compiling function monomial with type FM(FRAC(POLY(INT)),FMONOID(
OVAR([p,q]))) -> FMONOID(OVAR([p,q]))
fricas
Compiling function coeff with type FM(FRAC(POLY(INT)),FMONOID(OVAR([
p,q]))) -> FRAC(POLY(INT))
fricas
Compiling function m with type FMONOID(OVAR([p,q])) -> SYMBOL
fricas
Compiling function γ with type (FMONOID(OVAR([p,q])),FMONOID(OVAR([p
,q]))) -> SYMBOL
fricas
Compiling function leftDiv with type Union(Record(lm: FMONOID(OVAR([
p,q])),rm: FMONOID(OVAR([p,q]))),"failed") -> FMONOID(OVAR([p,q])
)
fricas
Compiling function rightDiv with type Union(Record(lm: FMONOID(OVAR(
[p,q])),rm: FMONOID(OVAR([p,q]))),"failed") -> FMONOID(OVAR([p,q]
))
fricas
Compiling function rule1 with type FM(FRAC(POLY(INT)),FMONOID(OVAR([
p,q]))) -> FM(FRAC(POLY(INT)),FMONOID(OVAR([p,q])))
fricas
Compiling function rule2 with type FM(FRAC(POLY(INT)),FMONOID(OVAR([
p,q]))) -> FM(FRAC(POLY(INT)),FMONOID(OVAR([p,q])))
fricas
Compiling function mod with type FM(FRAC(POLY(INT)),FMONOID(OVAR([p,
q]))) -> FM(FRAC(POLY(INT)),FMONOID(OVAR([p,q])))
Type: LIST(LIST(FM(FRAC(POLY(INT)),FMONOID(OVAR([p,q])))))
Structure Constants
fricas
R:=FRAC DMP(concat [[m(i) for i in gens],concat [[γ(j,i) for i in gens] for j in gens]], INT)
Type: TYPE
fricas
mat3(y:M):List List R == map(z+->map(x+->coefficient(x,y)::FRAC POLY INT,z),MT)
Function declaration mat3 : FMONOID(OVAR([p,q])) -> LIST(LIST(FRAC(
DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)))) has been added to
workspace.
Type: VOID
fricas
ss:=map(mat3, basis)
fricas
Compiling function mat3 with type FMONOID(OVAR([p,q])) -> LIST(LIST(
FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT))))
Type: LIST(LIST(LIST(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)))))
Algebra
fricas
cats(m:M):Symbol==concat(map(x+->string(x.gen::Symbol),factors m))::Symbol
Function declaration cats : FMONOID(OVAR([p,q])) -> SYMBOL has been
added to workspace.
Type: VOID
fricas
A:=AlgebraGivenByStructuralConstants(R,#(basis)::PI,map(cats,basis),ss::Vector(Matrix R))
fricas
Compiling function cats with type FMONOID(OVAR([p,q])) -> SYMBOL
Type: TYPE
fricas
alternative?()$A
algebra satisfies 2*associator(a,b,b) = 0 = 2*associator(a,a,b) = 0
Type: BOOLEAN
fricas
antiAssociative?()$A
algebra is not anti-associative
Type: BOOLEAN
fricas
antiCommutative?()$A
algebra is not anti-commutative
Type: BOOLEAN
fricas
associative?()$A
algebra is associative
Type: BOOLEAN
fricas
commutative?()$A
algebra is not commutative
Type: BOOLEAN
fricas
flexible?()$A
algebra is flexible
Type: BOOLEAN
fricas
jacobiIdentity?()$A
Jacobi identity does not hold
Type: BOOLEAN
fricas
jordanAdmissible?()$A
algebra is not Jordan admissible
Type: BOOLEAN
fricas
jordanAlgebra?()$A
algebra is not commutative
this is not a Jordan algebra
Type: BOOLEAN
fricas
leftAlternative?()$A
algebra is left alternative
Type: BOOLEAN
fricas
lieAdmissible?()$A
algebra is Lie admissible
Type: BOOLEAN
fricas
lieAlgebra?()$A
algebra is not anti-commutative
this is not a Lie algebra
Type: BOOLEAN
fricas
--powerAssociative?()$A
rightAlternative?()$A
algebra is right alternative
Type: BOOLEAN
Check Multiplication
fricas
AB := entries basis()$A
Type: LIST(ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]]))
fricas
A2MK(z:A):MK==reduce(+,map((x:R,y:M):MK+->(x::K)*y,coordinates(z),basis))
Function declaration A2MK : ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[
qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,
0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0
,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]
^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m
[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p]
,0,0,m[p]*m[q]*γ[pq]^2]]]) -> FM(FRAC(POLY(INT)),FMONOID(OVAR([p,
q]))) has been added to workspace.
Type: VOID
fricas
test(MT=map(x+->map(A2MK,x),[[i*j for j in AB] for i in AB]))
fricas
Compiling function A2MK with type ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[
pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^
2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0
]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]
*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],
m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0]
,[m[p],0,0,m[p]*m[q]*γ[pq]^2]]]) -> FM(FRAC(POLY(INT)),FMONOID(
OVAR([p,q])))
Type: BOOLEAN
Trace
fricas
[rightTrace(i)$A for i in AB]
Type: LIST(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)))
fricas
[leftTrace(i)$A for i in AB]
Type: LIST(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)))
fricas
trace(i)==rightTrace(i) / #gens
Type: VOID
fricas
[trace(i) for i in AB]
fricas
Compiling function trace with type ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ
[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]
^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,
0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q
]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q]
,m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0
],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]]) -> FRAC(DMP([m[p],m[q],γ[pp],γ[
pq],γ[qp],γ[qq]],INT))
Type: LIST(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)))
Center
fricas
C:=basisOfCenter()$AlgebraPackage(R,A); # C
Type: PI
fricas
c:=C(1)
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
[c*i-i*c for i in AB]
Type: LIST(ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]]))
fricas
test(c*c=c)
Type: BOOLEAN
Unit
fricas
rightTrace(c)
Type: FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT))
fricas
n := #basis / rightTrace(c) * c
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
trace(n)
Type: FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT))
fricas
test(n*n=n)
Type: BOOLEAN
fricas
test(n=unit()$A)
Type: BOOLEAN
fricas
f:=gcd map(x+->denom x,coordinates(n))
Type: DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)
fricas
--ff:= matrix [[γ(i,j)::R for j in gens] for i in gens]
ff:= matrix [[eval(γ(i,j)::R,[γ(gens(1),gens(1))=1,γ(gens(2),gens(2))=1,γ(gens(2),gens(1))=γ(gens(1),gens(2))]) for j in gens] for i in gens]
Type: MATRIX(FRAC(POLY(INT)))
fricas
--ff:= matrix [[eval(γ(i,j)::R,[γ(gens(1),gens(1))=0,γ(gens(2),gens(2))=0,γ(gens(2),gens(1))=γ(gens(1),gens(2))]) for j in gens] for i in gens]
-determinant(ff)
Type: FRAC(POLY(INT))
fricas
test(f = %)
Type: BOOLEAN
fricas
(f*n)::OutputForm / f::OutputForm
Type: OUTFORM
Lie bracket
fricas
p:=AB(1)
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
trace(p)
Type: FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT))
fricas
p*p-trace(p)*p
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
q:=AB(2)
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
trace(q)
Type: FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT))
fricas
q*q-trace(q)*q
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
p*q
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
pq:=p*q-q*p
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
trace(pq)
Type: FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT))
Orthogonal Observers
fricas
p' := trace(p)*n-p
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
trace(p')
Type: FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT))
fricas
p' * p' - trace(p')*p'
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
p * p'
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
p' * p
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
q' := trace(q)*n-q
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
trace(q')
Type: FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT))
fricas
q' * q' - trace(q')*q'
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
q * q'
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
q' * q
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
--
p' * q'
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
p * q'
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
p' * q
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
--
q' * p'
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
q * p'
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
q' * p
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
Orthogonal Observers are Derivations
fricas
p'*(p*q) = (p'*p)*q + p*(p'*q)
Type: EQ(ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]]))
fricas
test %
Type: BOOLEAN
fricas
q'*(p*q) = (q'*p)*q + p*(q'*q)
Type: EQ(ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]]))
fricas
test %
Type: BOOLEAN
Antisymmetric γ
fricas
eqAnti:List Equation EXPR INT := concat [[(i>j => γ(i,j)=γ(i,j);i=j =>γ(i,j)=0;γ(i,j)=-γ(j,i)) for j in gens] for i in gens]
Type: LIST(EQ(EXPR(INT)))
fricas
anti(x:R):R == subst(x::EXPR INT, eqAnti)::FRAC POLY INT
Function declaration anti : FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[
qq]],INT)) -> FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT))
has been added to workspace.
Type: VOID
fricas
(anti(f)*map(anti ,coordinates(n))::A)::OutputForm / anti(f)::OutputForm
fricas
Compiling function anti with type FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[
qp],γ[qq]],INT)) -> FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],
INT))
Type: OUTFORM
Momentum
fricas
P:=reduce(+,concat [[(1/γ(basis(i),basis(j)))::R*AB(i)*AB(j) for j in 1..size()$V] for i in 1..size()$V])
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
trace(P)
Type: FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT))
fricas
c:=1/trace(P)*P
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
c*c-c
Type: ALGSC(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)),4,[p,q,pq,qp],[[[m[p],0,0,m[p]*m[q]*γ[pq]^2],[0,0,0,0],[m[p]*m[q]*γ[pq]^2,0,0,m[p]*m[q]^2*γ[pq]^2],[0,0,0,0]],[[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0],[0,m[p]*m[q]*γ[pq]^2,m[p]^2*m[q]*γ[pq]^2,0]],[[0,1,m[p],0],[0,0,0,0],[0,m[q],m[p]*m[q]*γ[pq]^2,0],[0,0,0,0]],[[0,0,0,0],[1,0,0,m[q]],[0,0,0,0],[m[p],0,0,m[p]*m[q]*γ[pq]^2]]])
fricas
trace(c)
Type: FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT))
Scalar Product
fricas
S := matrix [[trace(x*y) for y in AB] for x in AB]
Type: MATRIX(FRAC(DMP([m[p],m[q],γ[pp],γ[pq],γ[qp],γ[qq]],INT)))
fricas
)sh ALGSC
ALGSC(R: FIELD,n: PI,ls: LIST(SYMBOL),gamma: VECTOR(MATRIX(R))) is a domain constructor
Abbreviation for AlgebraGivenByStructuralConstants is ALGSC
This constructor is exposed in this frame.
------------------------------- Operations --------------------------------
?*? : (SQMATRIX(n,R),%) -> % ?*? : (R,%) -> %
?*? : (%,R) -> % ?*? : (NNI,%) -> %
?*? : (INT,%) -> % ?*? : (%,%) -> %
?*? : (PI,%) -> % ?+? : (%,%) -> %
-? : % -> % ?-? : (%,%) -> %
?=? : (%,%) -> BOOLEAN 0 : () -> %
?^? : (%,PI) -> % alternative? : () -> BOOLEAN
antiAssociative? : () -> BOOLEAN antiCommutative? : () -> BOOLEAN
antiCommutator : (%,%) -> % apply : (MATRIX(R),%) -> %
associative? : () -> BOOLEAN associator : (%,%,%) -> %
basis : () -> VECTOR(%) coerce : VECTOR(R) -> %
coerce : % -> OUTFORM commutative? : () -> BOOLEAN
commutator : (%,%) -> % convert : % -> VECTOR(R)
convert : VECTOR(R) -> % coordinates : % -> VECTOR(R)
?.? : (%,INT) -> R flexible? : () -> BOOLEAN
hash : % -> SINT jacobiIdentity? : () -> BOOLEAN
jordanAdmissible? : () -> BOOLEAN jordanAlgebra? : () -> BOOLEAN
latex : % -> STRING leftAlternative? : () -> BOOLEAN
leftDiscriminant : () -> R leftDiscriminant : VECTOR(%) -> R
leftNorm : % -> R leftPower : (%,PI) -> %
leftTrace : % -> R leftTraceMatrix : () -> MATRIX(R)
lieAdmissible? : () -> BOOLEAN lieAlgebra? : () -> BOOLEAN
opposite? : (%,%) -> BOOLEAN plenaryPower : (%,PI) -> %
powerAssociative? : () -> BOOLEAN rank : () -> PI
represents : VECTOR(R) -> % rightAlternative? : () -> BOOLEAN
rightDiscriminant : () -> R rightNorm : % -> R
rightPower : (%,PI) -> % rightTrace : % -> R
rightTraceMatrix : () -> MATRIX(R) sample : () -> %
someBasis : () -> VECTOR(%) zero? : % -> BOOLEAN
?~=? : (%,%) -> BOOLEAN
associatorDependence : () -> LIST(VECTOR(R)) if R has INTDOM
conditionsForIdempotents : () -> LIST(POLY(R))
conditionsForIdempotents : VECTOR(%) -> LIST(POLY(R))
convert : % -> INFORM if R has FINITE
coordinates : VECTOR(%) -> MATRIX(R)
coordinates : (VECTOR(%),VECTOR(%)) -> MATRIX(R)
coordinates : (%,VECTOR(%)) -> VECTOR(R)
enumerate : () -> LIST(%) if R has FINITE
hashUpdate! : (HASHSTAT,%) -> HASHSTAT
index : PI -> % if R has FINITE
leftCharacteristicPolynomial : % -> SUP(R)
leftMinimalPolynomial : % -> SUP(R) if R has INTDOM
leftRankPolynomial : () -> SUP(POLY(R)) if R has FIELD
leftRecip : % -> Union(%,"failed") if R has INTDOM
leftRegularRepresentation : % -> MATRIX(R)
leftRegularRepresentation : (%,VECTOR(%)) -> MATRIX(R)
leftTraceMatrix : VECTOR(%) -> MATRIX(R)
leftUnit : () -> Union(%,"failed") if R has INTDOM
leftUnits : () -> Union(Record(particular: %,basis: LIST(%)),"failed") if R has INTDOM
lookup : % -> PI if R has FINITE
noncommutativeJordanAlgebra? : () -> BOOLEAN
random : () -> % if R has FINITE
recip : % -> Union(%,"failed") if R has INTDOM
represents : (VECTOR(R),VECTOR(%)) -> %
rightCharacteristicPolynomial : % -> SUP(R)
rightDiscriminant : VECTOR(%) -> R
rightMinimalPolynomial : % -> SUP(R) if R has INTDOM
rightRankPolynomial : () -> SUP(POLY(R)) if R has FIELD
rightRecip : % -> Union(%,"failed") if R has INTDOM
rightRegularRepresentation : % -> MATRIX(R)
rightRegularRepresentation : (%,VECTOR(%)) -> MATRIX(R)
rightTraceMatrix : VECTOR(%) -> MATRIX(R)
rightUnit : () -> Union(%,"failed") if R has INTDOM
rightUnits : () -> Union(Record(particular: %,basis: LIST(%)),"failed") if R has INTDOM
size : () -> NNI if R has FINITE
smaller? : (%,%) -> BOOLEAN if R has FINITE
structuralConstants : () -> VECTOR(MATRIX(R))
structuralConstants : VECTOR(%) -> VECTOR(MATRIX(R))
subtractIfCan : (%,%) -> Union(%,"failed")
unit : () -> Union(%,"failed") if R has INTDOM