Obs(4) is a 16 dimensional Frobenius Algrebra fricas )set output abbreviate on
Type: TYPEfricas M := FreeMonoid V
Type: TYPEfricas gens:List M := enumerate()$V
Type: LIST(FMONOID(OVAR([p,fricas divisible := Record(lm: M,
Type: TYPEfricas leftDiv(k:Union(divisible, Type: VOIDfricas rightDiv(k:Union(divisible, Type: VOIDfricas K := FRAC POLY INT
Type: TYPEfricas MK := FreeModule(K,
Type: TYPEfricas coeff(x:MK):K == leadingCoefficient(x) Type: VOIDfricas monomial(x:MK):M == leadingMonomial(x) Type: VOIDfricas m(x:M):K == subscript('m, Type: VOIDfricas γ(x:M, Type: VOIDBasis fricas basis := concat(gens,
Type: LIST(FMONOID(OVAR([p,Idempotent fricas rule1(ij:MK):MK == for k in gens repeat kk := divide(monomial(ij), Type: VOIDReduction 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(leadingMonomial(ij), Type: VOIDModulo 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) Type: VOIDMatrix Multiplication is monoidal concatenation modulo the fixed point fricas MT := [[mod(i*j) for j in basis] for i in basis] fricas Compiling function monomial with type FM(FRAC(POLY(INT)), fricas Compiling function coeff with type FM(FRAC(POLY(INT)), fricas Compiling function m with type FMONOID(OVAR([p, fricas Compiling function γ with type (FMONOID(OVAR([p, fricas Compiling function leftDiv with type Union(Record(lm: FMONOID(OVAR([ p, fricas Compiling function rightDiv with type Union(Record(lm: FMONOID(OVAR( [p, fricas Compiling function rule1 with type FM(FRAC(POLY(INT)), fricas Compiling function rule2 with type FM(FRAC(POLY(INT)), fricas Compiling function mod with type FM(FRAC(POLY(INT)), Structure Constants fricas R:=FRAC DMP(concat [[m(i) for i in gens],
Type: TYPEfricas mat3(y:M):List List R == map(z+->map(x+->coefficient(x, Type: VOIDfricas ss:=map(mat3, fricas Compiling function mat3 with type FMONOID(OVAR([p, Algebra fricas cats(m:M):Symbol==concat(map(x+->string(x.gen::Symbol), Type: VOIDfricas A:=AlgebraGivenByStructuralConstants(R, fricas Compiling function cats with type FMONOID(OVAR([p, Check Multiplication fricas AB := entries basis()$A Trace fricas [rightTrace(i)$A for i in AB] Center fricas C:=basisOfCenter()$AlgebraPackage(R, Unit fricas rightTrace(c) fricas test(n=unit()$A) Antisymmetric γ fricas eqAnti:List Equation EXPR INT := concat [[(i>j => γ(i,
Type: LIST(EQ(EXPR(INT)))fricas anti(x:R):R == subst(x::EXPR INT, Type: VOIDfricas (anti(f)*map(anti , fricas Compiling function anti with type FRAC(DMP([m[p], Scalar Product fricas S := matrix [[trace(x*y) for y in AB] for x in AB] |