ALGHCAtest.nb

Validation of ALGHCA.nb

R.H.Beresford. Sept. 2011 using ALGHCA on MMA8, Dell1525
Updated May 2012.

NotebookFileName[] (*14.34 2/5/2012*)

Exit

Run Package ALGHCA.m from 8.0 ExtraPackages.
Needs  db96.txt to run Section 8.

THESIS.

Negative, real, complex, quaternionic and octonionic numbers, subtraction, and the signs {+, i, -, -i}, constitute a degenerate subset of mathematics that is restricted to even symmetry. Algebraic loops (quasi-groups with 1) are created without using division, negation or subtraction, so they define general multiplication for Natural, Rational, and “Primal” (continuous, absolute, half line) unsigned numbers. They provide Cayley tables for the multiplication of “vecs”, sets of {direction, unsigned coefficient} pairs. Signs can only be defined for loops having Cr (the cyclic group with r elements) as a central subgroup; these can be “folded” to introduce r’th roots of unity as “generalised signs”. Folding converts loops (with one operation, multiply) into algebras with generalised addition/subtraction as a second operation; vecs fold to vectors. Real and complex numbers are the result of 2- & 4-folding.
Frobenius [4] showed that associative loops (i.e. groups) conserve their determinants (up to a sign) on vector multiplication. This symmetry-conserving property is possessed by all associative (group) and a few non-associative (octonionic 𝕆) Moufang loops, and by algebras folded from conservative loops. Vectors in these algebras have multiplicative inverses that split into partial fractions with determinant factors as numerators. 
I propose the name “hoops” for these symmetry-conserving partial-fraction-division algebras. I call the factors “sizes” and the list of conserved sizes the “shape” of a vector. Noether’s theorem (conserved symmetries generate particles and forces) implies that hoops are relevant to physics. Anti-symmetric hoops are the Clifford (Geometric) algebras that generalise many concepts to any number of dimensions. ℝ, ℂ, ℍ, 𝕆, Pauli, and even-order Cliffords are degenerate algebras with a single size.
When two vectors have disparate zero sizes, their product loses any sizes that are only present in one multiplicand - it is “projected” onto a sub-algebra of reduced symmetry. To maintain the key conservation property, lost sizes are “ejected” as (left or right) remainders. Multiplication (and division, which is multiplication by an inverse vector) can create a product and two remainders. This implements “vector-division-by-zero”; the zero is “factored-out” of the determinant.
Different algebras (of the same length) conserve different (but overlapping) sets of conserved properties. The analogies with particle physics, where different forces conserve overlapping sets of properties and where particle interactions generate symmetry-conserving sets of  “product + remainder” particles, have yet to be explored.
These concepts were developed empirically in the mathematica package ALGHCA.m, but have (for groups) a theoretical basis in Representation Theory. Every m’th order group has an irreducible matrix representation (abbreviated to “irrep”) involving the m’th root of unity as a generalised sign. Each size correspomds to one irrep, and hoop properties result from matrix multiplication of irreps (or their inverses) mapped with vectors. Projection corresponds to defining the inverse of a singular irrep as zero.
Several Mathematica Demonstrations develop Loops and Hoops; A compact {<400 lines) Sage program develops the key properties of hoop algebras.

Introduction.

The ALGHCA package [1] develops Algebraic Loops, Groups (associative loops), symmetry-conserving generalized-sign vector-division “Hoop” Algebras & Clifford (anti-commutative hoop) Algebras. Noether’s theorem (conserved symmetries generate particles and forces) implies that hoops are relevant to physics.
	Algebraic Loops (quasigroups with a 1) [2] define closed binary multiplication of pairs of un-signed elements. Each element is a “direction”. Loops also act as Cayley tables for the Cayley multiplication of “vecs”, sets of magnitudes (unsigned coefficients) with associated directions.
	Negation, signs, subtraction and (signed) vectors are all concepts that arise from the unstated “minus 1 exists and is unique” axioms that are implicit in most of the mathematics literature. Generalized signs result from “folding” (equivalencing, collapsing) algebraic loops. Real numbers are equivalence relationships [3] on pairs of magnitudes with positive and negative directions, whilst complex numbers are equivalence relationships on four directions, {+,i, -, -i}. Generalised signs are powers of r’th roots of unity. They are created when a loop is folded over a central subgroup Cr (the r’th cyclic group) and are more general than cyclotomic numbers, which ar projections onto the complex plane.
	Loops are created here as preferred-isomorph “protoloop” Cayley index-tables (shuffling the indices creates isomorphic tables without affecting the invariant properties of the loop). Folding introduces signs and “additive elimination” (generalized subtraction). The r-fold symmetry is then expressed by generalized signs (powers of r’th roots of unity). This second operation converts the loop into an algebra, and collapses a vec of length m to a vector of length m/r. Note that r=2 and 4 give real and complex vectors and algebras. Algebras with more than one cyclic central subgroup can be “multi-folded” to a compact representation with several sets of signs. Subtraction is the r=2 case of “additive elimination”; the sum of all r roots of zero is equivalenced to zero by r-folding. (Note. Mathematica uses Fold for something different, i.e. the last element of FoldList[...].)
	Some loop algebras conserve the determinant of the multiplication table on vector multiplication. Frobenius [4] showed that all associative loops (groups) had this property; it is also possessed by a few octonionic (square associative or alternative) Moufang Loops. I propose the name “hoops” for these conservative loops and the corresponding algebras. The property survives folding. Each determinant factor is a “size” or symmetry that is conserved on hoop multiplication. Writing Det[A] for the determinant of the table mapped with vector A, Det[AB] = ±Det[A]Det[B]. I call the list of factors (discounting multiplicity) the “shape” of the vector.
	Hoops also have a vector-division property. Every vector has a multiplicative inverse in a hoop of the same length. The inverse can be expressed as a partial fraction with each size providing a denominator (Cramer’s method). Implementing this is restricted to small hoops by the difficulty of inverting symbolic tables larger than about 16×16. Fortunately, representation theory shows that, for group tables, the inverse is the sum of the inverses of the “irreducible affording matrix representations” (abbreviated here to “irreps”) [5],[6]. Irreps can been calculated for much larger groups. Over 1000 are are supplied in an external file, as lists of small matrices involving polynomials in s, where (s^mm) = 1 and mm is the hoop length. Abelian hoops are represented by lists of lists of matrices of size 1×1 or 2×2. Non-Abelian hoops have repeated factors that are represented by matrices of sizes equal to their multiplicity. In all cases, the real factors of the determinant can be found (for a real vector) from specified combinations (supplied as smReal) of irreps.
	Clifford (Geometric) [7-14] algebras are the anti-commutative subset of hoops. Their distinctive features are introduced briefly here; several implementations (each with its own jargon) are available in the literature for them. They simplify and unify many aspects of multi-dimensional graphics, mathematics and physics, by splitting vectors into scalars, bivectors, trivectors, pseudoscalars, etc.
	ALGHCA includes data based on the GAP atlas of finite groups, together with procedures to create, manipulate, and identify most groups and hoops with up to 96 elements (a few larger tables are included). The nomenclature is based the GAP system (simplified and freed from many ambiguities), and not that of Mathematica’s FiniteGroupData. (“C1”, “C2”,  “C3” & “C4” are the only names in common.) 
	There are two databases. One, db96, describes 1013 groups as irreducible representation matrices. It is an external file occupying many megabytes. It is accessed by small suite of programmes that relate it to the main package. GAP’s SmallGroup(m,n) file is represented by the (Notebook format) sgm_n.txt file. (This is replaced by a much smaller version, db36, in the development package.) 
	The other database contains over 900 loops, groups, and hoops. It is sufficiently compact to be stored internally as loop[[mm,nn]], where mm is the loop length and nn is an index. Groups are listed first, and SmallGroup(mm,nn) in the GAP Atlas is stored as loop[[mm,nn]]. These groups are followed by various loops, hoops, and Clifford (Geometric) algebras of the same length in arbitrary order.
	Each entry starts with an identification string (examples  “C4”, “C5n”, “gmmnn”,  “A4”, “CL31”), followed by some information that allows the identification of most associative or conservative Cayley tables. The rest of the entry provides “incantations” that create the appropriate Cayley index table. The first effective incantation (some are nulls) provides the “protoloop”. Incantations create Cayley index-tables in many ways, using routines ca, co, cd, cLoop, fold, gd, ge, ma, md, mp, mg, ms, msi, pe, sgroup & ts. (See Usage for details.) All this information can be accessed via gd[] or gd[identifier], where identifier can be mm,nn or an identification string.
	Hoops have extra information stored in sd[identifier]. This first defines el, a list of element names such as {ø, 𝕒, 𝕒2, 𝕓, 𝕒𝕓, 𝕒2𝕓}. Double-struck characters are used for elements, to avoid confusion with ordinary symbols. The first element is always ø, the neutral element; 𝕒, 𝕓 etc. are the generators (roots of unity) for “PC” (polycyclic) groups. The only non-polycyclic group in the package, A5 (which is “simple”), has permutations as element names. The symbolic factors of the hoop determinant are “sizes” (polynomials in terms of element names) that are conserved on multiplication/division. Linear factors are also conserved on addition and splitting. The list of sizes is called the “shape”.
	The two databases usually create different group isomorphs for a given group, with different elements el & gapel corresponding to different generator orderings. Hoops of a given length are arranged so that shared sizes have identical formulations in terms of el whilst gapel is arranged to simplify folding.
	Hoop algebras are implemented via two general procedures, hoopTimes[V1,V2,gg_:gLoop] and hoopInverse[V1] (extended versions gapTimes, gapInverse or cTimes, cInverse etc. handle gap and Clifford data). Here gg_:gLoop is a quasigroup Cayley table, with the “active loop” gLoop as the default case. Every vector V has a multiplicative (left) inverse, so division is always possible via hoopTimes[ hoopInverse[ V1],V2]. If two “disparate” vectors have different sizes that are zero, these sizes are lost from the product or dividend, which is thereby “projected” into an algebra of lower symmetry. This implements “vector-division-by-zero”. Size conservation (the property that defines a hoop ) is maintained by “ejecting” these sizes as left or right remainders. A*B=AB+Rr+Rl. Consequently AiAB+Rl recovers B and ABBi+Rr recovers A. Different algebras (of the same length) conserve different (but overlapping) sets of conserved properties. The analogy with particle physics, where different forces conserve overlapping sets of properties, has yet to be explored.
	Abelian hoops have polar duals; Cartesian coordinate can be interchanged with {offset, radius, angle} coordinates. Linear sizes are offsets (which are zero in small algebras such as ℂ); each quadratic size provides a squared radius and an angle. (Higher-order sizes do not occur in abelian hoops.) If the product of all (non-zero) sizes is constrained to be 1, the result is an “orbit” with a representation as a set of symmetric multi-phase sinusoids. As non-Abelian hoops have repeated non-linear sizes, their shapes have too few degrees of freedom to give revertible polar duals - uncertainty is introduced via a Lie algebra.

These concepts were developed using Mathematica and are demonstrated below. The basic concepts (multiplication, division, size conservation) were translated into GAP and demonstrated in the GAPForum in 2000 [15] and Sci.Physics 2001 [16].  [17] and [18] are Mathematica Demonstrations. These were all ignored, presumably because they lacked a rigorous mathematical derivation. A colleague (Graham Gerrard 2010) developed this derivation (for associative hoops) in terms of group representation theory. He found that “Irreducible Affording Representations” [21] were matrix representations of my “sizes”. Mapping a vector onto them allowed the replication of my operations. Vector inversion could be simplified to the summation of the inverse matrices. This overcomes a major problem with hoopInverse - the need to factorise the symbolic inverse. (Obtaining these factors is tedious for 16x16 tables, and impractible for most larger tables.) Gerrard generated a 25MB Mathematica compatible database for most groups of length up to 96. This is reproduced (with permission) as part of the package, together with (in section 10.16 of the package) routines to access and employ it. It is validated and demonstrated in Sections 5-7 of this notebook. As GAP is restricted to rational and cyclotomic numbers (making no use of real or complex numbers),  Mathematica is needed to handle the full range of hoop algebras.
Gerrard is developing a compact Sage[22] Hoops package using the Python language. This gives access to the GAP [5] system and includes a version of db96. Indices start at 0 (not 1) and multiplication tables are matrices (unit diagonal isomorphs) instead of Cayley quasigroups (with identical first row and column) to allow fast inversion over cyclotomic fields. (Cayley multiplication should be more effective for long real vectors.)

1. Hoop Data Validation.

Summary. A series of tests validate all the data and generation rules in the ALGHCA (short for AlgebraicLoops, Groups, Hoops, Cliffords Algebras) package. Tables with protoloops (preferred isomorphs) are first identified and counted; over 900 protoloops are generated and identified (840 uniquely). Clifford and generalized Cayley-Dickson algebras are tested. Many signed tables (loops “folded” so that a symmetry is represented by generalised signs) are listed. All the generator & matrix generator rules (“incantations” for tables) are tested. No significant errors were found in the current version; if any are found in copies, they must arise from transcription errors. Mathematica users should download (into the ExtraPackages file), run, save and close the ALGHCA package and save file db96.doc, from http://library.wolfram.com/infocenter/MathSource/4894/ and then use <<ALGHCA’.

Tested with Mathematica 8.04 on a Dell Inspiron 1525 using Windows Vista.

Almost all groups with up to 81 elements (plus a few larger examples) are incorporated in the loop[[m,n]] database, though some may not be uniquely identified. The db96 database already includes all groups (but nothing else) up to size 90, plus size many of order 96. Different isomorphs are usually created by the two databases. (The much shorter db36 is used during development.)

(* These results are for Dell 1525, ALGHCA.m, M8.04 1/May/2012*)

1.1 Validation of all 911 Protoloops.

Test 1 counts the loops in the database, finding that all are created as a protoloop.

Test 1. Report  Loops with (910) & without (0) Protoloops.

np=0;noc=0;lp=Length[loop]-1;Do[Do[noc++;If[loop[[m,n,4]]==="ca[]"&&loop[[m,n,5]]==={}&&loop[[m,n,7]]==={}&&loop[[m,n,8]]==={}&&loop[[m,n,9]]==={}&&Length[loop[[m,n]]]<10,Print[{gd[m,n][[3,1]]," has no protoloop"}],np++],{n,Length[loop[[m]]]}],{m,lp}];{noc,"loops ",np,"with protoloops"}

Test 2 Loops without simple prescriptions (i.e. ca, co, cd, cLoop, or sLoop).

unp={};noc=0;lp=Length[loop]-1;Do[If[loop[[m]]≠{},Do[noc++;If[loop[[m,n,4]]==="ca[]",AppendTo[unp,{{m,n},loop[[m,n,1]]}]],{n,Length[loop[[m]]]}]],{m,1,lp}];Print[{Length[unp]," tables without simple prescriptions"}];

Print["Small Loops without simple prescriptions:-"];tbl=Table[{unp[[i]],unp[[i+24]]},{i,24}];tbl//tf

1.2 Validation of first available prescription Rules. SLOW, 20 mins.

Test 3. Correctness of first available prescriptions.

mp uses the first available prescription to create a table. The id test calculates a generalized table signature dico (diagonal count), which is unique for about 75% of hoops. Additional tests then separate most of the remaining cases. An error is reported if the correct id is not found. Cases with "?"  or "CL" in the name are not reported as they are either loops for which I have not found a discriminating test or Clifford isotopes. Set pr=1 to track progress.

pr=0(* set to 1 for diagnostics *);presco=0;lp=Length[loop]-1;unc=0;Timing[
Do[lm=Length[loop[[m1]]];
Do[m2={m1,n1};If[pr>0,Print[m2]];
res=id[test=mp[m2]];tst=gd[];
If[{mm,nn}==m2,presco++,
(*error or non-unique?*)
If[StringFreeQ[gd[m1,n1][[3,1]] ,"?"],Print[{"Test=",tst,"should be ",gd[m1,n1],res,{mm,nn},m1}],unc++]],
{n1,lm}],
{m1,1,lp}]]
Print[{presco," correct prescriptions.\nLast mm,nn=",m2,"non-unique identifications",unc}]

1.3 Validation of 553 ma (Matrix generator) Rules. SLOW 7 mins.

ALGHCA includes an arbitrary collection of 2x2, 3x3, & 4x4 “unitary monomial matrices”, u2, u3, & u4, that were developed to allow the creation of groups with matrices as element using procedures ma, ms, msi, mg. Many of these matrices use “roots of unity” (rofu) as elements. I define 𝕁 & 𝕐 as cube roots, 𝕜 & 𝕞 as negations, and 𝕏 as another fourth root (i.e. “-“ and “i are not unique.) “findROU[M,1]” is used to set rofu to reduce these roots to their main range. The databank loop[[mm,nn]] includes lists of indices that create the loop from sets of u2, u3, or u4 matrices, as items loop[[m,n, {7, 8, & 9}]], . These were built some years ago, and are in ad-hoc order. Such incantations have not been found for all hoops.

Test 3. Known matrix generators for hoops of a given length.

Set up a test for matrix generators of length mm1 by first finding the number of loops of that length:-

mm1=3;(*Initialise to mm-1*)

{mm1++,nn1=1;Length[loop[[mm1]]]}

Repeated use of the next cell tests all available matrix incantations for hoops of size mm1. It automatically increments nn1 and mm1.

nn1++;If[nn1>Length[loop[[mm1]]],mm1++;nn1=1];gd[mm1,nn1]
If[loop[[mm1,nn1,7]]!={}||loop[[mm1,nn1,8]]!={}||loop[[mm1,nn1,9]]!={},
{id[tst2=mp[{mm1,nn1},2]],
id[tst3=mp[{mm1,nn1},3]],id[tst4=mp[{mm1,nn1},4]]}]

Test 3a. u2 Matrix ma validation & listing.

{id[mg[{1},u2]],id[mg[{2},u2]],id[mg[{3},u2]],id[mg[{4},u2]],id[mg[{5},u2]],id[mg[{6},u2]],id[mg[{7},u2]],id[mg[{8},u2]],id[mg[{9},u2]],id[mg[{10},u2]],
"\n11",id[mg[{11},u2]],id[mg[{12},u2]],id[mg[{13},u2]],id[mg[{14},u2]],id[mg[{15},u2]],id[mg[{16},u2]],id[mg[{17},u2]],id[mg[{18},u2]],id[mg[{19},u2]],id[mg[{20},u2]],
"\n21",id[mg[{21},u2]],id[mg[{22},u2]],id[mg[{23},u2]],id[mg[{24},u2]],id[mg[{25},u2]],id[mg[{26},u2]],id[mg[{27},u2]],id[mg[{28},u2]],id[mg[{29},u2]],id[mg[{32},u2]],id[mg[{33},u2]],id[mg[{34},u2]],id[mg[{35},u2]]}

pr=1;maco=0;macn=0;u2e={};toty=0;totn=0;lp=Length[loop]-1;
Do[
Do[
If[(tst=gd[m,n][[3,7]])≠{},test=mp[m,n,2];
id[test];m0=mm;n0=nn;
If[{mm,nn}==={m,n},maco++,
If[StringFreeQ[gd[m,n][[3,1]] ,"?"],macn++;u2e={tst,u2e};
If[pr>0,Print[{gd[m,n],"\n",gd[m0,n0]}]
]
]
]
],{n,Length[loop[[m]]]}]
,{m,2,lp}];
totn+=macn;toty+=maco;Print[maco," correct ",macn," wrong ",Tally[Flatten[u2e]]]

Test 3b. u3 Matrix ma validation & listing.

{id[ma[{u3[[1]]}]],id[ms[{2},u3]],id[ms[{3},u3]],id[ms[{4},u3]],id[ms[{5},u3]],id[ms[{6},u3]],id[ms[{7},u3]],id[ms[{8},u3]],id[ms[{9},u3]],id[ms[{10},u3]],"\n11",id[ms[{11},u3]],id[ms[{12},u3]],id[ms[{13},u3]],id[ms[{14},u3]],id[ms[{15},u3]],id[ms[{16},u3]],id[ms[{17},u3]],id[ms[{18},u3]],id[ma[{u3[[19]]}]],id[ms[{20},u3]],
"\n21",id[ms[{21},u3]],id[ma[{u3[[22]]}]],id[ms[{23},u3]],id[ms[{24},u3]],id[ms[{25},u3]],id[ms[{26},u3]],id[ms[{27},u3]],id[ms[{28},u3]],id[ms[{29},u3]],id[ms[{30},u3]],
"\n31",id[ms[{31},u3]],id[ms[{32},u3]],id[ms[{33},u3]],id[ms[{34},u3]],id[ms[{35},u3]],id[ms[{36},u3]],id[ma[{u3[[37]]}]],id[ms[{38},u3]],id[ms[{39},u3]],id[ms[{40},u3]],
"\n41",id[ms[{41},u3]],id[ms[{42},u3]],id[ms[{43},u3]],id[ms[{44},u3]],id[ms[{45},u3]],id[ms[{46},u3]]}

pr=1;maco=0;macn=0;u3e={};
Do[
Do[
If[(tst=gd[m,n][[3,8]])≠{},test=mp[m,n,3];
id[test];m0=mm;n0=nn;
If[{mm,nn}=={m,n},maco++,
If[StringFreeQ[gd[m,n][[3,1]] ,"?"],macn++;u3e={tst,u3e};If[pr>0,Print[{gd[m,n],"\n",gd[m0,n0]}]
]]]],
{n,Length[loop[[m]]]}],
{m,2,77}];totn+=macn;toty+=maco;Print[maco," correct ",macn," wrong ",Tally[Flatten[u3e]]]

Test 3c. u4 Matrix ma validation & listing.

{id[ms[{1},u4]],id[ms[{2},u4]],id[ms[{3},u4]],id[ms[{4},u4]],id[ms[{5},u4]],id[ms[{6},u4]],id[ms[{7},u4]],id[ms[{8},u4]],id[ms[{9},u4]],id[ms[{10},u4]],"\n",id[ms[{11},u4]],id[ms[{12},u4]],id[ms[{13},u4]],id[ms[{14},u4]],id[ms[{15},u4]],id[ms[{16},u4]],id[ms[{17},u4]],id[ms[{18},u4]],id[ms[{19},u4]],id[ms[{20},u4]],"\n",id[ms[{21},u4]],id[ms[{22},u4]],id[ms[{23},u4]],id[ms[{24},u4]],id[ms[{25},u4]],id[ms[{26},u4]],id[ms[{27},u4]],id[ms[{28},u4]],id[ms[{29},u4]],id[ms[{30},u4]],"\n",id[ms[{31},u4]],id[ms[{32},u4]],id[ms[{33},u4]],id[ms[{34},u4]],id[ms[{35},u4]],id[ms[{36},u4]],id[ms[{37},u4]],id[ms[{38},u4]],id[ms[{39},u4]],id[ms[{40},u4]],
"\n",id[ms[{41},u4]],id[ms[{42},u4]],id[ms[{43},u4]],id[ms[{44},u4]],id[ms[{45},u4]],id[ms[{46},u4]],id[ms[{47},u4]],id[ms[{48},u4]],id[ms[{49},u4]],id[ms[{50},u4]]}

pr=1(* u4*);maco=0;macn=0;u4e={};
Do[Do[
If[(tst=gd[m,n][[3,9]])≠{},If[pr>1,Print[{m,n,tst}]];
(*If signed, use ms*)mt=If[gd[m,n][[3,2,1]]>0,mg,ms];test=mt[tst,u4];id[test];m0=mm;n0=nn;
If[{mm,nn}=={m,n},maco++,
If[StringFreeQ[gd[m1,n1][[3,1]] ,"?"],macn++;If[pr>0,Print[{gd[m,n],"\n",gd[m0,n0]}]]]]],
{n,Length[loop[[m]]]}],
{m,2,77}];totn+=macn;toty+=maco;Print[{maco," correct ",macn," wrong",Tally[Flatten[u4e]],"Totals ",toty,totn}]

1.4 Validation 31 of Generalised Cayley-Dickson Doubling procedures.

Test 4a. Cayley-Dickson validation & listing.

The Cayley-Dickson doubling procedure creates non-commutative Quaternions from complex numbers (folded C4), and non-associative Octonions from Quaternions. Further doubling produces uninteresting Sedenions etc. The original procedure involved gammas (generators) that square to -1. Here, they are generalized to allow gammas that square to +1. Starting with the matrix {{1}} (unsigned “primal” numbers) gives reals (with subtraction but with loss of unique roots), complex (with polynomial solutions but with loss of order), quaternion (with loss of commutativity), octonion (with loss of associativity). Further generalizations start from other matrices, and create a few more non-trivial algebras.

cdcases=0;cdd={};Do[Do[If[Take[Characters[loop[[m,n,4]]],2]=={"c","d"},cdcases++;AppendTo[cdd,{loop[[m,n,1]],loop[[m,n,4]]}]];If[idc[]≠loop[[m,n,1]],Print[{m,n}]],{n,Length[loop[[m]]]}],{m,33}];{cdcases," have valid cd prescriptions"}

AppendTo[cdd,{}];AppendTo[cdd,{}];AppendTo[cdd,{}];AppendTo[cdd,{}];AppendTo[cdd,{}];tbl=Table[{cdd[[i]],cdd[[i+11]],cdd[[i+22]]},{i,11}];tbl//tf

Alt12n is retained as an example of the non-conservative loops that can be created by CD doubling. Candidates for inclusion in the database should be checked by the following routine. The example is not conservative, associative, or Moufang, though it is shown to have the same dico as Q8C2M:-

id[tst=co[cd[{1,-1,-1,1}],C2]];
If[indexTableQ[tst],{idc[tst],associativeQ[tst],alternativeQ[tst],MoufangQ[tst],dico[tst]}]

id[tst=mp["Q8C2M"]];
If[indexTableQ[tst],{idc[tst],associativeQ[tst],alternativeQ[tst],MoufangQ[tst],dico[tst]}]

1.5 Validation of 11 Moufang Doubling procedures.

The Loops section of the GAP guide describes a procedure that generates non-associative Moufang Loops. This is used here in 11 cases.  All are found and correctly identified. Loops with names ending in n are not conservative.

mdcases=0;mdd={};Do[Do[If[Characters[loop[[m,n,4]]][[1]]=="m",mdcases++;AppendTo[mdd,{m,n,loop[[m,n,1]],M=loop[[m,n,4]]}];If[(Mi=id[ToExpression[M]])≠loop[[m,n,1]],Print[{m,n,Mi,gd[m,n]}]]],
{n,Length[loop[[m]]]}],
{m,2,128}];
{mdcases," have valid md prescriptions"}
Column[mdd]

The unresolved pair have the same dico, but different trico:-

{trico[md[ca[18,17]]],trico[md[co[C3,ca[6,5],2]]]}

1.6 Validation of 766 Relator Rules. SLOW, 24 mins.

Prime-length groups are Cyclic, and their elements can be created as powers of the appropriate prime root of unity. All but one (A5) of the non-prime groups in this database are polycyclic (“PC”); they can be created by direct or indirect composition of a set of generators (cyclic groups). I use {𝕒,𝕓,..,𝕘) as generators, being the roots of unity whose powers are specified in loop[[mm,nn,5]]. Direct compositions are Abelian, so each element (apart from the neutral element, which I label ø) can be given a lex-ordered label. Indirect compositions are non-Abelian, and require the specification of some relationships in loop[[mm,nn,6]]. Thus loop[[12,3]] (A4) includes {3,2,2},{𝕓𝕒->𝕒𝕓𝕔,𝕔𝕒->𝕒𝕓}; 𝕒 is a cube root whilst 𝕓 and 𝕔 are square roots of unity.
These incantations do not give unique Cayley tables. The database order can be described as “combined reducing prime factors” ; this ensures that sizes that are common to several hoops will be identical. One convention uses a different order, “prime factors only”. db96 (or db36 initially) puts central subgroups at the end; the order can be found by fromdb[mm,nn]; {gapName, gapGens ,gapRels}. GAP creates canonical Cayley tables for loops - the smallest when the Cayley table is expressed as a flattened list. The next cell shows the GAP and loop incantations for the 5 12-element groups.

{"gapName dbGens   dbRelators   HoopName HoopGens HoopRelators"}
Grid[Table[fromdb[12,i];{gapName,gapGens,gapRels,loop[[12,i,1]],loop[[12,i,5]],loop[[12,i,6]]},{i,5}]]

Warning - gapName has redundant x elements and can be ambiguous. It does not distinguish between different indirect compositions - as shown by three occurences of C8:C4 and two of (C8xC2):C2 in the first 14 32-element groups:-

Grid[Table[fromdb[32,i];{gapName,gapGens,gapRels},{i,14}]]

Test 7. Relator rules validation.

ung={};totl=1;relco=0;lp=Length[loop]-1;
Do[Do[totl++;If[loop[[m,n,5]]==={},AppendTo[ung,{{m,n},loop[[m,n,1]]}],relco++],{n,Length[loop[[m]]]}],{m,2,lp}];Print[totl," loops, ", relco," with relators."];Print[Length[ung] " tables without generation rules."];
Print[Length[unpg=Intersection[unp,ung]] " tables without prescription or generation rules."]

The unprescribed tables have matrix or permutation incantations.

pr=0;genco=0;tt=AbsoluteTime[];(* Checks all ge[] cases. *)
Do[Do[If[pr==1,Print[gd[m,n]]];
If[Position[ung,{m,n}]==={},
If[(gi=id[mp[{m,n},1]])≠(gj=gd[{m,n}][[3,1]])&&StringFreeQ[gd[m,n][[3,1]] ,"?"],
Print[{gi,gj,m,n}],
genco++;latest={m,n}]],
{n,Length[loop[[m]]]}],
{m,2,lp}]//Timing
{genco," Loops correctly generated and uniquely identified"}
Print[{AbsoluteTime[]-tt,"actual seconds.\nLast correct mm,nn=",latest}]

Occasionally, my computer reports a valid incantation as “Unrecognized”; retesting confirms that the incantation is correct. Many mm-element Clifford algebras are isotopes (different foldings of the same 2mm-element group) so they are not distinguished by id  and are not reported. loop[[64]] includes all 251 groups, but 14 are not uniquely identified. Many sets of groups with over 64 elements have the same dico, and only a few are distinguished by the current set of tests. loop[[80]] omits 52 groups, loop[[96]] omits 160. (Section 5 accesses all of them via db96.)

1.7. Signed Table Generation, fold.

The toSignedTable (or ts) procedure folds loops to signed Cayley multiplication tables heuristically. The elements must be correctly ordered. The fold procedure (G. Gerrard 2012) is general; it finds all possible folds for any quasigroup table. The loop[[]] data includes many examples. There should be a way to create folded tables from irrep & gapGens (which shows the foldable factors as real, rather than integer, entries). This needs further work

The second fold argument lists the factors of the order that are to be tested if the table has a center. Some cases are signed. Cases with no center, or no signed folds, are omitted.

tst=fold[mp[{24,2}],{2}];g2=tst[[1]];{id[g2],g2//tf}
tst=fold[mp[{24,2}],{3}];g3=tst[[1]];{id[g3],g3//tf}
tst=fold[mp[{24,2}],{4}];g4=tst[[1]];{id[g4],g4//tf}
tst=fold[mp[{24,2}],{6}];g6=tst[[1]];{id[g6],g6//tf}

Brute-force determinant factorisation fails for tables of order 12 or greater, but is demonstrated for the smaller folded tables:-

m=8;A=Table[RandomReal[{-2,2}],{i,m}];Expand[Det[gmap[g4,A]]/.findROU[g4]]

Factor[Det[gmap[g4,{ø,a,b,c,d,e}]]/.findROU[g4]]

Factor[Det[gmap[g6,{ø,a,b,c}]]/.findROU[g6]]

2. Hoop Multiplication, Size Conservation, Division, Remainders.

Summary. Hoops are defined as algebras that conserve the conjugate factors of their symbolic multiplication table as “sizes” or “symmetries” when multiplying vectors. Most hoops have more than one real size. (Degenerate monosized hoops include ℝ, ℂ, ℍ, 𝕆, Pauli algebra, and even-order Clifford algebras). The essential feature of a hoop algebra is that the sizes are conserved on both multiplication and division even when some sizes are zero. Multiplication (and division) using hoops with disparate zero sizes introduces some new mathematics. Hoop operations are made conservative by “ejecting” the appropriate sizes of the multiplicands as “remainders” - the product is "projected" onto a sub-algebra (of lower symmetry) with zeroed sizes. Different hoops (of the same size) conserve different (overlapping) sets of sizes. This may correspond to particle-particle interactions, where different forces conserve different (overlapping) sets of properties.
	For consistency, division by zero in a monosize algebra is defined as projecting the result onto zero and ejecting the unchanged vector as a remainder. 
	 If the sizes are known for the hoop the multiplicative inverse of V can be calculated by hoopInverse[V] (or cInverse[V] for Cliffords). This sums the derivates of each size (wrt a chosen element) divided by the size (Cramer’s method). Symbolic sizes were not easy to find for groups with over 16 elements. This limitation was overcome when G. Gerrard developed inversion via the Irreducible Matrix representations, using GAP. The inverse is the sum of the inverses of the non-zero matrices. This is implemented via db96 and the gapShape (etc) routines and is tested in Section 5.
	Size Conservation and Remainders are tested by the following procedure, which identifies the hoop, takes two random vectors of the required length, multiplies them, saves the result as Rl, AB, Rr, shows the results and their shapes, shows that sA sB=sAB, and confirms that AB/B+Rl=A & AB/A+Rr=B.

Clear[muldiv];muldiv[Ao_,Bo_,H_]:=Module[{},gName=H;gLoop=mp[H];sd[gName];m=Length[gLoop];A=Take[Ao,m];B=Take[Bo,m];Print[{Flatten[Append[{"A  ="},A]],Flatten[Append[{"B  ="},B]],
Flatten[Append[{"AB ="},AB=hoopTimes[A,B]]],
Flatten[Append[{"Rl ="},R1=Rl]],
Flatten[Append[{"Rr ="},R2=Rr]]}//tf];
Print[Chop[{Flatten[Append[{"shape A  ="},sA=shape[A]]],Flatten[Append[{"shape B  = "},sB=shape[B]]],Flatten[Append[{"shape AB = "},sAB=shape[AB]]],Flatten[Append[{"sA sB - sAB"},Chop[sA sB -sAB,.0001]]],
Flatten[Append[{"shape Rl = "},shape[Rl]]],Flatten[Append[{"shape Rr = "},shape[Rr]]]}]//tf];Print[Chop[{"AB/B+Rl",hoopTimes[AB,hoopInverse[B]]+R1,"\n A      ",A,"\n AB/A+Rr",hoopTimes[hoopInverse[A],AB]+R2,"\n B      ",B}]]];

Division has been checked for all the members of hoopList.
Examples, chosen to have some zero sizes, are:-

Clear[muldiv];muldiv[Ao_,Bo_,m_,n_]:=Module[{},gLoop=mp[m,n];id[gLoop];sd[gName];A=Take[Ao,m];B=Take[Bo,m];Print[gName];Print[{Flatten[Append[{"A  ="},A]],Flatten[Append[{"B  ="},B]],
Flatten[Append[{"AB ="},AB=hoopTimes[A,B]]],
Flatten[Append[{"Rl ="},R1=Rl]],
Flatten[Append[{"Rr ="},R2=Rr]]}//tf];
Print[Chop[{Flatten[Append[{"shape A  ="},sA=shape[A]]],Flatten[Append[{"shape B  = "},sB=shape[B]]],Flatten[Append[{"shape AB = "},sAB=shape[AB]]],Flatten[Append[{"sA sB - sAB"},Chop[sA sB -sAB,.0001]]],
Flatten[Append[{"shape Rl = "},shape[Rl]]],Flatten[Append[{"shape Rr = "},shape[Rr]]]}]//tf];Print[Chop[{"AB/B+Rl",hoopTimes[AB,hoopInverse[B]]+R1,"\n A      ",A,"\n AB/A+Rr",hoopTimes[hoopInverse[A],AB]+R2,"\n B      ",B}]]];

muldiv[{3,4,1,0,1,1,2,-2}//N,{2,1,2,-4,4,2,-1,2}//N,
8,18];

muldiv[{3,4,1,0,1,1,2,-2,3,4,-2,-15},{2,1,2,-4,3,-4,3,1,0,-3,-3,2},
12,3];(*The same size is zero in both vectors so there are no remainders*)

muldiv[{3,4,1,0,1,1,2,-2,3,4,-2,3,-1,0,3,0}//N,{2,1,2,-4,3,-4,3,1,0,0,-3,2,2,4,1,-2}//N,
16,8];(*A quadratic size is factorised into complex conjugates*)

Hoop & Matrix multiplication.
Hoop multiplication multiplies each element of A by each element of B and adds the result to the (initially zero) element of AB specified in the quasi-group Cayley Table; it involves (mm^2) multiplications for a table of order mm..
The Matrix multiplication procedure maps one vector onto an Lmatrix (with ones on the diagonal) and then multiplies this matrix by the other vector; it involves (mm^3) multiplications. This exponent can be reduced slightly (Strassen’s algorithm etc.), but the extra complexity means that there is no benefit until the matrix order approaches 100. 
In practice, efficient internal algorithms make the matrix multiplication faster than the uncompiled hTimes algorithm (below); hoopTimes is slower because it includes a remainders test.

id[mp[96,3]];A=Take[Aa,mm];B=Take[Bb,mm];gd[]

hTimes[A_,B_]:=Module[{res=Table[0,{i,mm}]},Do[Do[res[[gLoop[[i,j]]]]+=A[[i]] B[[j]],{i,mm}],{j,mm}];res]

hoopTimes[A,B]//Timing

hTimes[A,B]//Timing

Am=gmap[lmatrix[gLoop],A];Am.B
Do[Am.B;,{i,100}]//Timing

3. Double-inverses, Non-Abelian Hubs & Spokes.

Summary. The inverse of a hoop vector inverse usually recovers the vector. The inverse of a vector in a non-Abelian hoop algebra is anomalous if the vector has any non-linear zero-sizes.

Abelian double-inverses recover the original even though some sizes are zero:-

id[C6];sd[gName];{"Ai=",Ai=hoopInverse[A={1,2,3,4,5,6}],"\nAii = ",Aii=hoopInverse[Ai],"\nshapes = ",shape[A],shape[Aii]}

id[C6];sd[gName];{Ai=hoopInverse[A={1,2,3,4,5,-15}],"\nAii = ",Aii=hoopInverse[Ai],"\nshapes = ",shape[A],shape[Aii]}

Non-Abelian algebras have repeated sizes. This has some interesting effects, allowing annihilators and introducing uncertainty. Demonstration vectors are set up to have different zero sizes in S3 (aka D6), the smallest non-Abelian group algebra. A0 is an annihilator of size {0,0,0}; any vector multipled by an annihilator gives another annihilator. Adding an annihilator leaves linear sizes unchanged. Vectors with different zero-sizes are created:-

id[S3];sd[gName];{"Vector   S3 Sizes",
"\n Aaaa=",Aaaa={1,2,3,4,5,7},shape[Aaaa],
"\n Aaa0=",Aaa0={1,2,3,4,5,6},shape[Aaa0],
"\n Aa0a=",Aa0a={1,2,3,4,6,4},shape[Aa0a],
"\n A0aa=",A0aa={1,2,3,5,-6,-5},shape[A0aa],
"\n P   =",shape[P={3,1,4,1,5,9}],
"\n B0aa=",shape[B0aa={2,1,-5,-6,0,8}],
"\n Ba0a=",shape[Ba0a={2,-1,0,6,0,-3}],
"\n Baa0=",shape[Baa0={2,1,-5,-2,-1,-6}],
"\n Ba00=",shape[Ba00={2,1,-5,2,1,-5}],
"\n Aa0= ",shape[A0={a,b,-a-b,a,b,-a-b}],
"\n 2A0 P=",shape[hoopTimes[2A0,P]],
"\n 2A0+P=",shape[2A0+P]}

A0 is an annihilator, and so are its products:-

{"A0*A0 = ",AA0=Simplify[hoopTimes[A0,A0]],"\n It is an annihilator with zero sizes and inverse",shape[AA0],hoopInverse[A0],"\n So is Baoa*A0 = ",BA0=Simplify[hoopTimes[Ba0a,A0]],"\n",shape[BA0],hoopInverse[BA0]}

The double-inverse Ai of a vector A in a non-Abelian algebra is correct if the vector has no zero-sizes. Inverting the inverse recovers the original vector, Aii == A, and Ai acts correctly as a left inverse, Ai (AP) == P. (As the inverse is real, the final result is also real) :-

{"A = ",A=Aaaa," sh[A] = ",shape[A],"\n Ai = ",Ai=hoopInverse[A],"\nAii = ",Aii=hoopInverse[Ai]," sh[Aii] = ",shape[Aii],
"\nAP = ",AP=hoopTimes[A,P]," AiAP = ",hoopTimes[Ai,AP]}

This is still true even if the right-hand multiplier (and hence the product) has one or more zero-size:-

{"A = ",A=Aaaa," sh[A] = ",shape[A],"\n Ai = ",Ai=hoopInverse[A],"\nAii = ",Aii=hoopInverse[Ai]," sh[Aii] = ",shape[Aii],"\nB = ",B=B0aa,
"\nAB = ",AB=hoopTimes[A,B0aa],"\nAiAB= ",hoopTimes[Ai,AB]}

Aa0a and B0aa have disparate zeroes:-

{"A, sh[A] = ",A=Aa0a,shape[A],Ai=hoopInverse[A],"Aii,sh[Aii] = ",Aii=hoopInverse[Ai],Chop[shape[Aii]],"\nB, sh B = ",B=B0aa,shape[B],"\nAB, AiAB = ",AB=hoopTimes[A,B],AiAB=Chop[hoopTimes[Ai,AB]],Chop[shape[AiAB]],"\n This has lost a size."}

Aa0a and Ba0a have the same zero-size so Ba0a is recovered:-

{"A, sh[A] = ",A=Aa0a,shape[A],"\n Ai = ",Ai=hoopInverse[A],"\n B, sh B = ",B=Ba0a,shape[B],"\n AB = ",AB=hoopTimes[A,B],"\n AiAB = B ",Chop[hoopTimes[Ai,AB]]}

But when a non-linear size is zero, the shape does not contain enough information to recover the doubly inverted vector. This corresponds to the calculation of A*B=AB  + Rr, where a right remainder carries the lost size. AiAB returns a vector that differs from B by a vector having the missing size. Equivalently, Q=AiV only gives a restricted sample of the vectors that would give V when pre-multiplied by A. Uncertainty is introduced on dividing by a vector with a repeated zero-size. The result is a “hub” having the same shape as the original vector but differing from it by a zero-sized “spoke”. Division by a vector with a zero-sized quadratic size introduces uncertainty. It “puts a spoke in the wheel”. This is shown for the vectors with zero quadratic sizes:-

Grid[{{"Vector","Double Inverse DI","DI S3 shape OK", "Zero-sized Spoke"},{"Aaa0",Aaa0ii=hoopInverse[hoopInverse[Aaa0]],shape[Aaa0ii],Chop[Aaa0-Aaa0ii]},
{"Baa0",Baa0ii =hoopInverse[hoopInverse[Baa0]],shape[Baa0ii],Chop[Baa0-Baa0ii]},
{"Ba00",Ba00ii =hoopInverse[hoopInverse[Ba00]],shape[Ba00ii],Chop[Ba00-Ba00ii]}
}]

Following the same procedure for the five 12-element groups of  “Dozal Algebra”, creating vectors with zeroes in succesive positions:-

Ad={1,2,3,4,-5,6,7,-8,-9,0,-2,1};Bd={1,-2,3,-4,5,-6,7,-8,9,10,1,4};Cd={1,2,2,4,0,3,-2,4,3,6,0,1};Dd={1,2,3,-1,-2,-3,1,2,2,-1,-2,-2};Ed={2,2,-1,0,4,1,2,0,1,6,0,1};Fd={3,1,4,1,5,9,2,6,5,3,5,9};
id[C12];sd[gName];Grid[{{a,b,c,d,e,f,g},Chop[shape[Ad]],Chop[shape[Bd]],Chop[shape[Cd]],Chop[shape[Dd]],Chop[shape[Ed]],Chop[shape[Fd]]}]
{"Ed has a zero quadratic shape. Abelian Remainder =",Ei=hoopInverse[Ed];Eii=hoopInverse[Ei];Chop[Ed-Eii]}

id[C3C2C2];sd[gName];Grid[{{a,b,c,d,e,f,g,h},
Chop[shape[Ad]],
Chop[shape[Bd]],
Chop[shape[Cd]],Chop[shape[Db={1,2,3,3,-11,2,3,4,5,3,-1,-2}]],Chop[shape[Eb={1,2,3,0,1,2,3,0,1,2,3,0}]],Chop[shape[Fb={1,2,3,-1,-2,-2,-1,-2,-2,1,2,3}]],Chop[shape[Gb={1,2,1,1,2,0,1,2,1,1,2,0}]],Chop[shape[Hb={1,2,2,1,-2,0,0,2,2,0,-2,0}]]}]
Fi=hoopInverse[Fb];Fii=hoopInverse[Fi];Chop[Fb-Fii]

id[Q12];sd[gName];Grid[{{a,b,c,d,e,f,g,h},Chop[shape[Ad]],Chop[shape[Bd]],Chop[shape[Cd]],Chop[shape[Db]],Chop[shape[Dd]],Chop[shape[Fb]],Chop[shape[Gb]],Chop[shape[Hb]]}]
Gi=hoopInverse[Gb];Gii=hoopInverse[Gi];{GmGii=Chop[Gb-Gii],Chop[shape[GmGii]]}
Hi=hoopInverse[Hb];Hii=hoopInverse[Hi];{HmHii=Chop[Hb-Hii],Chop[shape[HmHii]]}

id[ca[12,11]];sd[gName];
Grid[{{a,b,c,d,e,f},Chop[shape[Ad]],Chop[shape[Bd]],Chop[shape[Cd]],Chop[shape[Db]],Chop[shape[Eb]],Chop[shape[Fb]]}]
Ei=hoopInverse[Ed];Eii=hoopInverse[Ei];Chop[Ed-Eii]

New vectors are needed to give zero-sizes in A4.

Chop[shape[A4c={1,2,3,0,1,2,3,0,1,2,3,0}]]

id[A4];sd[gName];Grid[{{a,b,c},Chop[shape[A4a=Ad]],Chop[shape[A4b={1,2,3,0,1,2,3,0,1,2,3,0}]],Chop[shape[A4c={1,2,3,1,2,3,2,3,4,4,5,6}]]}]
{A4ai=hoopInverse[A4a];
A4aii=hoopInverse[A4ai];Chop[A4a-A4aii],
A4bi=hoopInverse[A4b];
A4bii=hoopInverse[A4bi];Chop[A4b-A4bii],
A4ci=hoopInverse[A4c];
A4cii=hoopInverse[A4ci];Chop[A4c-A4cii]}

Summary. Multiplication by a vector with repeated (and hence in a non-abelian algebra) zero-sizes creates remainders unless both multiplicands have the same zero-sizes.

4. Octonion  conservation.

Summary. Conservation is investigated for (non-associative) algebras composed from octonion and split-octonion tables. Compositions with Abelian groups appear to be the only ones that are conservative.

3.1 Conservation of Octonion Compositions.

The following procedure creates large tables that may not be in the databank. The table is conservative if one error result is 0. (Conservation is Det[A] Det[B]=± Det[AB] i.e. the symmetric difference). If the product has a zero size, both errors are zero and the test must be repeated.

{{"C2 ",dico[tst=co[Oct,C2]],Length[tst],conservativeQ[tst]},
{"\nC3   ",dico[tst=co[Oct,C3]],Length[tst],conservativeQ[tst]},
{"\nC4   ",dico[tst=co[Oct,C4]],Length[tst],conservativeQ[tst]},
{"\nC2C2 ",dico[tst=co[Oct,C2C2]],Length[tst],conservativeQ[tst]},
{"\nC5   ",dico[tst=co[Oct,C5]],Length[tst],conservativeQ[tst]},
{"\nC6   ",dico[tst=co[Oct,C6]],Length[tst],conservativeQ[tst]},
{"\nC8   ",dico[tst=co[Oct,C8]],Length[tst],conservativeQ[tst]},
{"\nC4C2 ",dico[tst=co[Oct,C4C2]],Length[tst],conservativeQ[tst]},
{"\n\nS3   ",dico[tst=co[Oct,S3]],Length[tst],conservativeQ[tst]},
{"\nQ8   ",dico[tst=co[Oct,Q8]],Length[tst],conservativeQ[tst]},
{"\nD8   ",dico[tst=co[Oct,ca[8,7]]],Length[tst],conservativeQ[tst]},
{"\nA4   ",dico[tst=co[Oct,A4]],Length[tst],conservativeQ[tst]},
{"\nD12  ",dico[tst=co[Oct,ca[12,11]]],Length[tst],conservativeQ[tst]},
{"\nQ12  ",dico[tst=co[Oct,ca[12,5]]],Length[tst],conservativeQ[tst]}
}

Direct compositions of Oct and the following tables gave the following results:-
Conservative.					Non-conservative.
C2,C3,C4,K,C5,C3C2,C8,C4C2,	C5n,D3,C6n,D4,Q8,D5,Q12,A4,
KC2,C9,C3C3,C10,C11,C3C4,C3K,	D3C2,Alt12n,KiC4,C4iC4,C8pC2,
C16,C4C4,C8C2,C4K,KK		D8,Q8iC2,Q16,D4C2,Q8C2,P16,Oct
In this test, all abelian groups, and no non-abelian tables, give conservative octonions on direct composition with Oct.

There are three 16-element Moufang loops, but only two are conservative and fold to conservative signed tables (octonion algebra and split-octonion algebra).

{{"C2 ",dico[tst=co[Oct,C2]],Length[tst],conservativeQ[tst]},
{"\nC3   ",dico[tst=co[Oct,C3]],Length[tst],conservativeQ[tst]},
{"\nC4   ",dico[tst=co[Oct,C4]],Length[tst],conservativeQ[tst]},
{"\nC2C2 ",dico[tst=co[Oct,C2C2]],Length[tst],conservativeQ[tst]},
{"\nC5   ",dico[tst=co[Oct,C5]],Length[tst],conservativeQ[tst]},
{"\nC6   ",dico[tst=co[Oct,C6]],Length[tst],conservativeQ[tst]},
{"\nC8   ",dico[tst=co[Oct,C8]],Length[tst],conservativeQ[tst]},
{"\nC4C2 ",dico[tst=co[Oct,C4C2]],Length[tst],conservativeQ[tst]},
{"\n\nS3   ",dico[tst=co[Oct,S3]],Length[tst],conservativeQ[tst]},
{"\nQ8   ",dico[tst=co[Oct,Q8]],Length[tst],conservativeQ[tst]},
{"\nD8   ",dico[tst=co[Oct,ca[8,7]]],Length[tst],conservativeQ[tst]},
{"\nA4   ",dico[tst=co[Oct,A4]],Length[tst],conservativeQ[tst]},
{"\nD12  ",dico[tst=co[Oct,ca[12,11]]],Length[tst],conservativeQ[tst]},
{"\nQ12  ",dico[tst=co[Oct,ca[12,5]]],Length[tst],conservativeQ[tst]}
}

3.2 Conservation of Split-Octonion (Q8M) Compositions.

Octs=cd[{1,-1,-1,{2}}];id[Octs]

{{"C2 ",dico[tst=co[Octs,C2]],Length[tst],conservativeQ[tst]},
{"\nC3   ",dico[tst=co[Octs,C3]],Length[tst],conservativeQ[tst]},
{"\nC4   ",dico[tst=co[Octs,C4]],Length[tst],conservativeQ[tst]},
{"\nC2C2 ",dico[tst=co[Octs,C2C2]],Length[tst],conservativeQ[tst]},
{"\nC5   ",dico[tst=co[Octs,C5]],Length[tst],conservativeQ[tst]},
{"\nC6   ",dico[tst=co[Octs,C6]],Length[tst],conservativeQ[tst]},
{"\nC8   ",dico[tst=co[Octs,C8]],Length[tst],conservativeQ[tst]},
{"\nC4C2 ",dico[tst=co[Octs,C4C2]],Length[tst],conservativeQ[tst]},
{"\n\nS3   ",dico[tst=co[Octs,S3]],Length[tst],conservativeQ[tst]},
{"\nQ8   ",dico[tst=co[Octs,Q8]],Length[tst],conservativeQ[tst]},
{"\nD8   ",dico[tst=co[Octs,ca[8,7]]],Length[tst],conservativeQ[tst]},
{"\nA4   ",dico[tst=co[Octs,A4]],Length[tst],conservativeQ[tst]},
{"\nD12  ",dico[tst=co[Octs,ca[12,11]]],Length[tst],conservativeQ[tst]},
{"\nQ12  ",dico[tst=co[Octs,ca[12,5]]],Length[tst],conservativeQ[tst]}
}

5. Clifford Algebras.

Summary. Clifford-like (Geometric, anti-commutative) algebras CLpqr provide an elegant, compact, and efficient representation of many aspects of mathematics and physics, overcoming the limitations of Gibbs' vector algebra to three dimensions, and extending geometry and analysis to any number of dimensions.

Author-specific nomenclature obfuscates the Clifford-algebra literature. CL00, CL10, & CL01 are the commutative real, Study (Cayley-Klein, Hyperbolic), & complex numbers; CL20, CL02, CL30, CL13, CLp+1,q+1 are (anti-commutative) 2D geometry, Quaternions, 3D geometry, 1+3 space-time and conformal (p,q) geometry respectively. In this package, CL001, CL002, & CL003 are defined as Clifford-like extensions to non-associative Octonions and Split-octonions and to ternary symmetry.The inclusion of Minkowski (spacetime), Pauli-matrix (quantum theory) and ternary (quark-like, 3, 4, & 6 phase wave) algebras suggests that Clifford algebras may provide the language for a future "theory of everything".
	Whilst Clifford algebras are defined by mathematicians in terms of quadratic forms, they can be fully described by vector multiplication tables generated by orthogonal anti-commuting "monovectors" (my neologism for gammas, group generators, relators or, in the confusing Geometric algebra literature, "vectors") such as {(Subscript[e, 1]),(Subscript[e, 1]),...} , with (Subscript[e, i])(Subscript[e, i])= ±1 & (Subscript[e, i])(Subscript[e, j])=-(Subscript[e, j])(Subscript[e, i]) . A more compact labeling, {ø,𝕒,𝕓...}, is used in ALGHCA. The "scalar" that commutes with everything is (Subscript[e, 0]) (I use ø). In CLpq, the first p monovectors are square roots of unity and the last q are fourth roots of unity (i.e. the signature is p ones followed by q minus ones. Note that “signature” is generalized to “dico” for hoops); other signatures can be ignored as they only generate isomeric tables. Cliffords are folded groups, and so they are hoops; the symbolic table determinant is conserved (Det[AB]  =  ± Det[A] * Det[B]). If p+q is odd and the arguments are real, the determinant splits into a pair of (repeated) real factors; if p+q is even there is only one (repeated) real factor. These factors provide the quadratic forms of the mathematician’s description.
	All non-commutative algebras split into (commutative, Jordan, inner or dot) products A.B and (non-commutative, Lie, Lie bracket, outer or wedge) products A⋀B, so AB=A.B+A⋀B or Cl=Jo+Li. This split is sometimes wrongly used to define Clifford algebras. The Lie products satisfy the Jacobi identity, and so are Lie algebras. Neither Jo nor Li are, by themselves, conservative. 
	"Bivectors" (directed areas), "Trivectors" (directed volumes), etc. are products of 2, 3, etc. distinct monovectors and have corresponding "grades" or directionality. These are sub-spaces but are called "blades" (so named by Hestenes because they are flat). Scalars are grade zero, directions are grade 1, directed areas are grade 2, etc. A "multivector" may include several grades and I define a "univector" as a grade 1 vector of unit length. Different concepts (points, lines, areas, rotations, derivatives, operators etc.) are combined in a single multivector object. Until this has been digested (and the word “vector” has been retricted to mean an indexed but unstructured set) the subject is utterly confusing. The ability to handle composite structures as “multivectors” is one of the strengths of Clifford Algebras - multivectors have structure. (The element names show this structure - the grade is the length of the name). They also indicate Clifford Duality; 𝕒𝕔 is dual to 𝕓𝕕𝕖 when ø is dual to 𝕒𝕓𝕔𝕕𝕖 (the pseudivector). Another strength is that many concepts, including geometry and complex analysis, extrapolate to any number of dimensions.
	The individual elements of a multivector can be conveniently ordered in "BitXor" order (e.g. ordinal 6 ~ (Subscript[110, 2]) ~  (Subscript[e, 2]) (Subscript[e, 3]) ~ 𝕓𝕔); they can also be partitioned into grades, creating "graded vectors" with a different ordering. Many applications involve multivectors with many zero elements, so a sparse form (a list of {index, coefficient} pairs) is often useful. Mathematica uses indices (ordinals+1) because zeroth elements are pre-empted as "Heads". The ALGHCA package has automatic interconversion between the three formats - indexed (flat) lists, sparse lists and graded lists. Clifford Algebras are implemented as a Cayley multiplication table created by cl[p,q,r], with a multiplication procedure cTimes[A,B,o]; the parameter o determines the output. All three products {Cl, Jo, Li} are calculated unless o=1, which gives AB and the reversed product BA.
	Clifford vector multiplication AB is invertible; Ai (created by cInverse[A]) is the left-multiplicative inverse of multivector (vector to the non specialist) A, so AiAB=B. Cliffords with odd p+q split into (SuperPlus[CL]) & (SuperMinus[CL]) because they have two real distinct determinant factors (or sizes) if their elements are real. These provide denominators for a partial-fraction formulation of the inverse. Vector division-by-zero is eliminated - if a size become zero, the result is "projected" into a sub-algebra of reduced symmetry whilst a symmetry-conserving remainder is "ejected". The zero is "factored out" by this calculation. Minkowski space-time is split into space-like and time-like regions by the light-like null-vector cone.
	D. Hestenes has claimed that "Properly applied, Clifford's system was nothing less than a universal language for mathematics, physics, and engineering".

5.1 Validation of Clifford procedures.

Test 5. Generalized Clifford Algebra validation & listing.

Large Clifford algebras (p+q>4) are handled via sparse routines, so their Cayley table (gLoop) is not usually created. It can be generated (for use in tests, compositions, etc.) by making p a real number in cLoop[p,q].

clcases=0;cld={};Do[Do[If[Take[Characters[loop[[m,n,4]]],2]=={"c","L"},clcases++;If[idc[]≠loop[[m,n,1]],Print[{m,n}]];AppendTo[cld,{loop[[m,n,1]],loop[[m,n,4]]}]],{n,Length[loop[[m]]]}],{m,128}];{clcases," have valid cl prescriptions"}

cld

Test 5a. Clifford Algebra Inverses, Division, Shape Conservation.

Pairs of vectors are multiplied and the sizes are shown to be conserved (i.e. the error, sA sB-sAB, is the zero vector.)

{cLoop[3];sd[gName];gName,
"\nA inverse",Ai=hoopInverse[A={3,1,4,1,5,9,2,6}],
"\nAB       ",AB=hoopTimes[A,B={2,7,1,8,2,8,1,8}],
"\nAi AB = B",Simplify[hoopTimes[Ai,AB]],
"\nsA,      ", sA=shape[A],
"\nerror    ",sA shape[B]-shape[AB]}

{cLoop[2,1];sd[gName];gName,
"\nA inverse",Ai=hoopInverse[A={3,1,4,1,5,9,2,6}],
"\nAB       ",AB=hoopTimes[A,B={2,7,1,8,2,8,1,8}],
"\nAi AB = B",Simplify[hoopTimes[Ai,AB]],
"\nsA,      ", sA=shape[A],
"\nerror    ",sA shape[B]-shape[AB]}

{cLoop[1,2];sd[gName];gName,
"\nA inverse",Ai=hoopInverse[A={3,1,4,1,5,9,2,6}],
"\nAB       ",AB=hoopTimes[A,B={2,7,1,8,2,8,1,8}],
"\nAi AB = B",Simplify[hoopTimes[Ai,AB]],
"\nsA,      ", sA=shape[A],
"\nerror    ",sA shape[B]-shape[AB]}

{cLoop[0,3];sd[gName];gName,
"\nA inverse",Ai=hoopInverse[A={3,1,4,1,5,9,2,6}],
"\nAB       ",AB=hoopTimes[A,B={2,7,1,8,2,8,1,8}],
"\nAi AB = B",Simplify[hoopTimes[Ai,AB]],
"\nsA,      ", sA=shape[A],
"\nerror    ",sA shape[B]-shape[AB]}

{cLoop[0,0,1];sd[gName];gName,
"\nA inverse",Ai=hoopInverse[A={3,1,4,1,5,9,2,6}],
"\nAB       ",AB=hoopTimes[A,B={2,7,1,8,2,8,1,8}],
"\nAi AB = B",Simplify[hoopTimes[Ai,AB]],
"\nsA,      ",sA=shape[A],
"\nerror    ",sA shape[B]-shape[AB]}

{cLoop[0,0,2];sd[gName];gName,
"\nA inverse",Ai=hoopInverse[A={3,1,4,1,5,9,2,6}],
"\nAB       ",AB=hoopTimes[A,B={2,7,1,8,2,8,1,8}],
"\nAi AB = B",Simplify[hoopTimes[Ai,AB]],
"\nsA, error", sA=shape[A],sA shape[B]-shape[AB]}

{cLoop[0,0,-3];sd[gName];gName,
"\nA inverse",Ai=hoopInverse[A={3,1,4,1,5,9,2,6,5,3,5,0}],
"\nAB       ",AB=hoopTimes[A,B={2,7,1,8,2,8,1,8,2,8,0,7}],
"\nAi AB = B",Simplify[hoopTimes[Ai,AB]],
"\nsA, error", sA=shape[A],sA shape[B]-shape[AB]}

{cLoop[4];sd[gName];
Ai=hoopInverse[A={3,1,4,1,5,9,2,6,5,3,5,8,9,7,9,3}],
AB=hoopTimes[A,B={2,7,1,8,2,8,1,8,2,8,4,5,9,0,4,5}],
Simplify[hoopTimes[Ai,AB]],sA=cShape[A],
sA shape[B]-cShape[AB]}

{cLoop[1,3];sd[gName];
Ai=hoopInverse[A],AB=hoopTimes[A,B],
Simplify[hoopTimes[Ai,AB]],sA=cShape[A],
sA shape[B]-cShape[AB]}

{cLoop[3,1];sd[gName];
Ai=hoopInverse[A],AB=hoopTimes[A,B],
Simplify[hoopTimes[Ai,AB]],sA=cShape[A],
sA cShape[B]-cShape[AB]}

{cLoop[0,4];sd[gName];
Ai=hoopInverse[A],AB=hoopTimes[A,B],
Simplify[hoopTimes[Ai,AB]],sA=cShape[A],
sA cShape[B]-cShape[AB]}

Shapes for larger Clifford algebras are now available via “irreps”. They all have one (or two if p+q is odd) n’th-order factors, each repeated n times. Note that a real number is used for p, so that the Cayley tables are generated in the following tests.

Factor[Det[gmap[cLoop[5.],pow2]]]

Factor[Det[gmap[cLoop[1.,4],pow2]]]

Factor[Det[gmap[cLoop[2.,3],pow2]],GaussianIntegers->True]

Factor[Det[gmap[cLoop[3.,2],pow2]]]

Factor[Det[gmap[cLoop[4.,1],pow2]],GaussianIntegers->True]

Factor[Det[gmap[cLoop[0.,5],pow2]],GaussianIntegers->True]

Factor[Det[gmap[cLoop[6.],pow2]]]

5.2 Clifford Reflection, Rotation.

Reflection is the “sandwich product” u*M*ui, multiplying and dividing a multivector M by a unit vector u. As it is widely used in graphics, it is built in to cTimes as cTimes[M,u,-1]. Reflection is often applied to a collection of multivectors. This is implemented by the fast routines cRefS[uS,AoS] and cRef[u,Ao], where u is a unit vector and a trailing S indicates a sparse format. Tests are omitted, for speed, and so correctly formulated arguments are essential.
Rotation by θ in a plane a^b (not about an axis, which is only defined in 3D) is effected by pre- and post-rotations by θ/2.

reflect tests, 4 elements.

Set up some sparse vectors {A1s,A2s,A3s,ms,ns}, monoblades {ms,ns}, unit vectors {o1,a1,b1} and an array of sparse vectors A0s

cLoop[1,1];A0={{-1,2,0,3},{4,-1,0,0},{1,0,3,4}};
A1S=SparseArray[A0[[1]]];A2S=SparseArray[A0[[2]]];A3S=SparseArray[A0[[3]]];A0S={A1S,A2S,A3S};
mS=SparseArray[m={0,3,4,0}];nS=SparseArray[n={0,5,12,0}];b1S=SparseArray[b1={0,0,1,0}];
a1S=SparseArray[a1={0,1,0,0}];o1S=SparseArray[o1={1,0,0,0}];ab1S=SparseArray[ab1={0,0,0,1}];{"A2 as a Flat vector  ",A0[[2]],"\n A2 as a Sparse vector",A2S,"\n A2 as a Graded vector",A2g=tocGr[A0[[2]]]}

a2g is used to show that graded vectors can be handled as well as flat or sparse vectors.
Clifford routines generate SparseArray results, which are expanded by Normal[].

cLoop[0,2];{gName,sd[gName];"\nshape of n",cShape[u=nS],
A0Srp=cRefS[uu=u/13,A0S];"\nRotate A0S with sparse unit u",Normal[A0Srp],
A0Srrp=cRefS[uu,A0Srp];
"\ncRefs recovers A0",Normal[A0Srrp],
A0rp=cRef[un=Normal[u/13],A0];"\nRotate A0 with flat unit u",Normal[A0rp],
A0rrp=cRef[un,A0rp];
"\ncRef recovers A0",Normal[A0rrp]}

cLoop[2];{gName,sd[gName];"\nshape of n",cShape[u=nS],
A0Srp=cRefS[uu=u/13,A0S];"\nRotate A0S with sparse unit u",Normal[A0Srp],
A0Srrp=cRefS[uu,A0Srp];
"\ncRefs recovers A0",Normal[A0Srrp],
A0rp=cRef[un=Normal[u/13],A0];"\nRotate A0 with flat unit u",Normal[A0rp],
A0rrp=cRef[un,A0rp];
"\ncRef recovers A0",Normal[A0rrp]}

cLoop[1,1];{gName,sd[gName];"\nn shape",cShape[u=nS],
A0Srp=cRefS[uu=u/Sqrt[119],A0S];"\nRotate A0S with sparse unit u",Normal[A0Srp],
A0Srrp=cRefS[uu,A0Srp];
"\ncRefs recovers A0",Normal[A0Srrp],
A0rp=cRef[un=Normal[uu],A0];"\nRotate A0 with flat u",Normal[A0rp],
A0rrp=cRef[un,A0rp];
"\ncRef recovers A0",Normal[A0rrp]}

cLoop[0,2];{gName,sd[gName];"\nn shape",cShape[nS],
A0Srp=cRefS[uu=nS/13,A0S];"\nRotate A0S with sparse unit u",Normal[A0Srp],
A0Srrp=cRefS[uu,A0Srp];
"\ncRefs recovers A0",Normal[A0Srrp],
A0rp=cRef[un=Normal[u/13],A0];"\nRotate A0 with flat u",Normal[A0rp],
A0rrp=cRef[un,A0rp];
"\ncRef recovers A0",Normal[A0rrp]}

reflect tests. 8 elements.

cLoop[3];A0={{-1,2,0,3,0,4,3,2},{4,-1,0,0,3,0,0,3},{1,0,3,4,2,3,0,0}};
A1S=SparseArray[A0[[1]]];A2S=SparseArray[A0[[2]]];A3S=SparseArray[A0[[3]]];A0S={A1S,A2S,A3S};
mS=SparseArray[m={0,3,0,0,4,0,0,0}];nS=SparseArray[n={0,5,12,0,0,0,0,0}];
{"Grades A1",A2g=tocGr[A0[[1]]],"\n        A2",A2g=tocGr[A0[[2]]],"\n        A3",A2g=tocGr[A0[[3]]]}

The sizes (and their multiplicities) of the multivectors m, n  have to be found (from sd) so that unit vectors can be created by dividing by dd:-

{cLoop[3];sd[gName="CL30"];tst=m;FactorInteger[cShape[tst]],"\ngi[[-1]]=",gi[[-1]],(Times@@cShape[tst]),dd=(Times@@cShape[tst]),cShape[tst]/dd,Plus@@(tst tst)}

The shapes are signed sums of squared elements, in this case they are all positive.

{gName,cShape[tSt=mS/5],
A0Srp=cRefS[tSt,A0S];Normal[A0Srp],
A0Srrp=cRefS[tSt,A0Srp],
"cRefs recovers A0",Normal[A0Srrp],
A0rp=cRef[tSt,A0S];Normal[A0rp];
A0rrp=cRef[tSt,A0rp];
"\ncRef recovers A0",Normal[A0rrp]}

{cLoop[3];sd[gName="CL30"];tst=n;FactorInteger[cShape[tst]],"\ngi[[-1]]=",gi[[-1]],(Times@@cShape[tst]),dd=(Times@@cShape[tst]),cShape[tst]/dd,Plus@@(tst tst)}

{gName,cShape[tSt=nS/13],
A0Srp=cRefS[tSt,A0S];Normal[A0Srp],
A0Srrp=cRefS[tSt,A0Srp],
"cRefs recovers A0",Normal[A0Srrp],
A0rp=cRef[tSt,A0S];Normal[A0rp];
A0rrp=cRef[tSt,A0rp];
"\ncRef recovers A0",Normal[A0rrp]}

reflect tests. 16 elements.

cLoop[2,2];A0={{-1,2,0,3,0,4,3,2,0,3,4,0,0,0,1,0},{4,-1,0,0,3,0,0,3,4,0,0,0,0,0,0,2},{1,0,3,4,2,3,0,0,0,3,5,0,0,0,0,0}};
A1S=SparseArray[A0[[1]]];A2S=SparseArray[A0[[2]]];A3S=SparseArray[A0[[3]]];A0S={A1S,A2S,A3S};
mS=SparseArray[m={0,3,0,0,4,0,0,0,12,0,0,0,0,0,0,0}];nS=SparseArray[n={0,5,12,0,0,0,0,0,4,0,0,0,0,0,0,0}];pS=SparseArray[p={0,3,12,0,0,0,0,0,4,0,0,0,0,0,0,0}];
{A2g=tocGr[A0[[1]]],A2g=tocGr[A0[[2]]],A2g=tocGr[A0[[3]]]}

{cLoop[1,2];tst=n;FactorInteger[cShape[tst]],"\ngi[[-1]]=",gi[[-1]],(Times@@cShape[tst]),dd=(Times@@cShape[tst]),cShape[tst]/dd,Plus@@(tst tst)}

cLoop[2,2];{gName,cShape[tSt=nS/23409^.25],
A0Srp=cRefS[tSt,A0S];Normal[A0Srp],
A0Srrp=cRefS[tSt,A0Srp],
"cRefs recovers A0",Normal[A0Srrp],
A0rp=cRef[tSt,A0S];Normal[A0rp];
A0rrp=cRef[tSt,A0rp];
"\ncRef recovers A0",Normal[A0rrp]}

cLoop[4];{gName,cShape[tSt=nS/34225^.25],
A0Srp=cRefS[tSt,A0S];Normal[A0Srp],
A0Srrp=cRefS[tSt,A0Srp],
"cRefs recovers A0",Normal[A0Srrp],
A0rp=cRef[tSt,A0S];Normal[A0rp];
A0rrp=cRef[tSt,A0rp];
"\ncRef recovers A0",Normal[A0rrp]}

cLoop[3,1];{gName,cShape[tSt=nS/23409^.25],
A0Srp=cRefS[tSt,A0S];Normal[A0Srp],
A0Srrp=cRefS[tSt,A0Srp],
"cRefs recovers A0",Normal[A0Srrp],
A0rp=cRef[tSt,A0S];Normal[A0rp];
A0rrp=cRef[tSt,A0rp];
"\ncRef recovers A0",Normal[A0rrp]}

cLoop[1,3];{gName,cShape[tSt=nS/18225^.25],
A0Srp=cRefS[tSt,A0S];Normal[A0Srp],
A0Srrp=cRefS[tSt,A0Srp],
"cRefs recovers A0",Normal[A0Srrp],
A0rp=cRef[tSt,A0S];Normal[A0rp];
A0rrp=cRef[tSt,A0rp];
"\ncRef recovers A0",Normal[A0rrp]}

cLoop[0,4];{gName,cShape[tSt=nS/34225^.25],
A0Srp=cRefS[tSt,A0S];Normal[A0Srp],
A0Srrp=cRefS[tSt,A0Srp],
"cRefs recovers A0",Normal[A0Srrp],
A0rp=cRef[tSt,A0S];Normal[A0rp];
A0rrp=cRef[tSt,A0rp];
"\ncRef recovers A0",Normal[A0rrp]}

sh["CL12"]

cRot  tests. 4 elements.

cLoop[1,1];A0={{-1,2,0,3},{4,-1,0,0},{1,0,3,4}};
A1S=SparseArray[A0[[1]]];A2S=SparseArray[A0[[2]]];A3S=SparseArray[A0[[3]]];A0S={A1S,A2S,A3S};
mS=SparseArray[m={0,3,4,0}];nS=SparseArray[n={0,5,12,0}];b1S=SparseArray[b1={0,0,1,0}];
a1S=SparseArray[a1={0,1,0,0}];o1S=SparseArray[o1={1,0,0,0}];ab1S=SparseArray[ab1={0,0,0,1}];A2g=tocGr[A0[[2]]]

{cLoop[2];cShape[mS],cShape[nS],mnAS=cRot[tSt1=mS/5,tSt2=nS/13,A0S];Normal[mnAS],mnArS=cRot[tSt2,tSt1,mnAS];Normal[mnArS]}

{cLoop[1,1];cShape[mS],cShape[nS],mnAS=cRot[tSt1=mS/Sqrt[7],tSt2=nS/Sqrt[119],A0S];Normal[mnAS],mnArS=cRot[tSt2,tSt1,mnAS];Normal[mnArS]}

{cLoop[0,2];cShape[mS],cShape[nS],mnAS=cRot[tSt1=mS/5,tSt2=nS/13,A0S];Normal[mnAS],mnArS=cRot[tSt2,tSt1,mnAS];Normal[mnArS]}

cRot tests. 8 elements.

A0={{-1,2,0,3,0,4,3,2},{4,-1,0,0,3,0,0,2},{1,0,3,4,2,3,0,0}};
A1S=SparseArray[A1f={-1,2,0,3,0,4,3,2}];A2S=SparseArray[A2f={4,-1,0,0,3,0,0,2}];A3S=SparseArray[A3f={1,0,3,4,2,3,0,0}];

cLoop[1,2];A1S=SparseArray[A0[[1]]];A2S=SparseArray[A0[[2]]];A3S=SparseArray[A0[[3]]];A0S={A1S,A2S,A3S};
mS=SparseArray[m={0,3,4,0,0,0,0,0}];nS=SparseArray[n={0,5,12,0,0,0,0,0}];pS=SparseArray[p={0,0,12,0,5,0,0,0}];
a1S=SparseArray[a1={0,1,0,0,0,0,0,0}];
b1S=SparseArray[b1={0,0,1,0,0,0,0,0}];o1S=SparseArray[o1={1,0,0,0,0,0,0,0}];i1S=SparseArray[i1={0,0,0,1,0,0,0,0}];I1S=SparseArray[I1={0,0,0,0,0,0,0,1}];

{cLoop[0,3];gi[[-1]],cShape[m],cShape[n],mnAS=cRot[tSt1=mS/5,tSt2=nS/13,A0S],Normal[mnAS],mnArS=cRot[tSt2,tSt1,mnAS];Normal[mnArS]}

{cLoop[2,1];cShape[mS],cShape[nS],mnAS=cRot[tSt1=mS/5,tSt2=nS/13,A0S];Normal[mnAS],mnArS=cRot[tSt2,tSt1,mnAS];Normal[mnArS]}

{cLoop[1,2];cShape[mS],cShape[nS],mnAS=cRot[tSt1=mS/Sqrt[7],tSt2=nS/Sqrt[119],A0S];Normal[mnAS],mnArS=cRot[tSt2,tSt1,mnAS];Normal[mnArS]}

{cLoop[0,3];cShape[mS],cShape[nS],mnAS=cRot[tSt1=mS/5,tSt2=nS/13,A0S];Normal[mnAS],mnArS=cRot[tSt2,tSt1,mnAS];Normal[mnArS]}

cRot tests 16 elements.

cLoop[2,2];A0={{-1,2,0,3,0,4,3,2,0,3,4,0,0,0,1,0},{4,-1,0,0,3,0,0,3,4,0,0,0,0,0,0,2},{1,0,3,4,2,3,0,0,0,3,5,0,0,0,0,0}};
A1S=SparseArray[A0[[1]]];A2S=SparseArray[A0[[2]]];A3S=SparseArray[A0[[3]]];A0S={A1S,A2S,A3S};
mS=SparseArray[m={0,3,0,0,4,0,0,0,12,0,0,0,0,0,0,0}];nS=SparseArray[n={0,5,12,0,0,0,0,0,4,0,0,0,0,0,0,0}];pS=SparseArray[p={0,3,12,0,0,0,0,0,4,0,0,0,0,0,0,0}];
{A2g=tocGr[A0[[1]]],A2g=tocGr[A0[[2]]],A2g=tocGr[A0[[3]]]}

{cLoop[4];sd["CL40"];"sizes",szm=cShape[mS],sm=Sqrt[Sqrt[szm[[1]]]];szn=cShape[nS],sn=Sqrt[Sqrt[szn[[1]]]];mnAS=cRot[tSt1=mS/sm,tSt2=nS/sn,A0S];"\nRotated to",Normal[mnAS],mnArS=cRot[tSt2,tSt1,mnAS];"\nRestored",Normal[mnArS]}

{cLoop[3,1];sd["CL31"];cShape[mS],szm=Sqrt[Sqrt[14161]],cShape[nS],szn=Sqrt[Sqrt[23409]],mnAS=cRot[tSt1=mS/szm,tSt2=nS/szn,A0S];Normal[mnAS],mnArS=cRot[tSt2,tSt1,mnAS];Normal[mnArS]}

{cLoop[2,2];sd["CL22"];szm=cShape[mS],sm=Sqrt[Sqrt[szm[[1]]]],szn=cShape[nS],sn=Sqrt[Sqrt[szn[[1]]]],mnAS=cRot[tSt1=mS/sm,tSt2=nS/sn,A0S];Normal[mnAS],mnArS=cRot[tSt2,tSt1,mnAS];Normal[mnArS]}

{cLoop[1,3];sd["CL13"];szm=cShape[mS],sm=Sqrt[Sqrt[szm[[1]]]],szn=cShape[nS],sn=Sqrt[Sqrt[szn[[1]]]],mnAS=cRot[tSt1=mS/sm,tSt2=nS/sn,A0S];Normal[mnAS],mnArS=cRot[tSt2,tSt1,mnAS];Normal[mnArS]}

{cLoop[0,4];sd["CL04"];szm=cShape[mS],sm=Sqrt[Sqrt[szm[[1]]]],szn=cShape[nS],sn=Sqrt[Sqrt[szn[[1]]]],mnAS=cRot[tSt1=mS/sm,tSt2=nS/sn,A0S];Normal[mnAS],mnArS=cRot[tSt2,tSt1,mnAS];Normal[mnArS]}

5.3 Clifford-like Folded Terplex algebras.

sg64_264 2-folds to CL32; sg64_265 to CL5; sg64_266 to CL41. I hope to find Clifford-like algebras with ternary symmetry by folding 24, 48, 72 & 96 order groups. More work is needed here. A few folds are demonstrated:-

{tst2404=mp[24,4];id[tst2404],id[t2404=fold[tst2404,{2}][[1]]],
dico[t2404]}

{tst2405=mp[24,5];id[tst2405],id[t2405=fold[tst2405,{2}][[1]]],
dico[t2405]}

{tst2410=ge[{4,2,3},{𝕓𝕒->𝕒3𝕓}];id[tst2410],id[t2410=fold[tst2410,{2}][[1]]],
dico[t2410]}

{tst2411=mp[24,11];id[tst2411],id[t2411=fold[tst2411,{2}][[1]]],
dico[t2411]}

{tst2406=mp[24,6];id[tst2406],id[t2406=fold[tst2406,{2}][[1]]],
dico[t2406]}

{tst4845=ge[{12,2,2},{𝕓𝕒->𝕒7𝕓}];id[tst4845],id[t4845=fold[tst4845,{3}][[1]]],
dico[t4845]}

{tst4846=mp[48,46];id[tst4846],
id[t4846=fold[tst4846,{2}][[1]]],
dico[t4846]}

{tst72=mp[72,35];id[tst72],id[t72=fold[tst72,{2}][[1]]],
dico[t72]}

id[tst96]

{tst96=fromdb[96,225,1];tst96=gapLoop;t96=fold[tst96,{2}][[1]];gapName,id[t96],dico[t96]}

dico[co[C3,co[C2,Q8]]]

6. GAP data, irreps.

Summary. GAP is a large programming system devoted to (mathematical) Groups.
I tried to introduce Hoop theory to the GAP Forum in 2001, but was rebuffed. I have only used GAP as a data source since then. As GAP abjures real and complex numbers, it cannot demonstrate many aspects of hoop algebras. I had developed hoops by mainly empirical methods. Graham Gerrard looked for a Representation Theory basis for Hoops. In Dec 2010, (personal communication) he found “Irreducible Affording Matrix Representations” (abbreviated here to “irreps”) in GAP [4], and showed that the properties that I had found for hoops could be established (for groups) by representing their elements as irreps, sets of matrices involving roots of unity. Irreps solve the problem of finding sizes and inverses for groups with more than 16 elements.
We realised that irreps:-
(1) were sets (which we stored as smat, later irreps) of matrices equivalent to my “sizes” (or their conjugate factors), because their product was the determinant. The real factors of the determinant could be found from specific sets (stored as smReal).
(2) provided a mechanism to calculate vector inverses (without calculating the symbolic hoop determinant factors) by summing the inverses of the irreps mapped with the vector,
(3) facilitated the creation of compact folded algebras,
(4) justified the “projection” of products and dividends onto homomorphic (lower-symmetry) algebras.
(5) led to a “free Hoops” generalization (April 2012).

We decided to create a database for all groups (omitting a few with large prime components) up to length 96. (96 because we were particularly interested in Clifford-like algebras with 3-fold symmetry.) db96 contains sgm_n.txt files describing the GAP SmallGroup(m,n) entries as {smReal, gapName, element names gapel, gapGens, gapRels, smat}. smReal lists the indices of sets that multiply to a real size; gapShape uses them to calculate the real shape of any vector. The element names use lex-ordered lower-case latin letters in the database, but these are converted to the doublestruck letters used in ALGHACA. Polynomials in s are simplified by prs[p_]:=PolynomialRemainder[p,Cyclotomic[𝕣,s],s], where (s^𝕣) is the 𝕣’th root of unity. (GAP uses E[3]  etc. which upsets Mathematica). Vector inverses are calculated as the sum of the inverted size matrices. Group determinant factorisation via irreps implements high-dimensional group Algebras, which can often be folded to smaller signed algebras.

G. Gerrard has created a database [2] (based on the GAP system) of almost all groups of size up to 96. This is in .txt (Notebook) format, with the polynomials in s, where s^(table_ length) = 1. I have implemented Mathematica routines to access and use this as part of my Mathematica package ALGHCA.nb.

7. Routines handling data from GAP

Summary. The procedures are demonstrated.

The files sgm_n.txt need to be unzipped into an accessible folder from db36.zip or db96.zip. (The latter needs 9MB free space). They can be inspected using Notepad, but are accessed via fromdb[m,n].

?fromdb

irrep  is supplied for each group. This is a list of sets of m small square matrices (often involving polynomials in s, the m’th root of unity) that are factors of the determinant of the Cayley table gapLoop. Non-abelian groups have k-repeated factors that appear as matrices of size k, and so have relatively compact representations. The shape of a vector is the product of smat and the vector. Hoop shapes are another description of these factors, but are often expressed in a more informative way, and for a different table isomorph.

?gapShape

The Cayley table gapLoop can be created from gapGens & gapRels by the same ge procedure that is used for gLoop. This allows the creation of folded tables, provided that the loop has one or more central cyclic subgroup. These are indicated in gapGens by real (instead of integer) indices; a final parameter in ge is an optional list of indices to be used for folding.

Every vector V has a multiplicative inverse Vi in every hoop of matching length. My original hoopInverse procedure was based on Cramer’s method, and involved the calculation of the inverse of the full m×m Cayley table. Gerrard developed a faster procedure based on summing the inverses of the matrices (rarely larger than 4×4) in smat. This is implemented as gapInverse:-

?gapInverse

Abelian hoops have polar duals, generalisations of the Argand-Wessel diagram, but with {offset, radius, angle} parameters. The offsets are linear sizes and the radii are square roots of the real quadratic sizes. As these duals have the same number of parameters as the Cartesian form, the forms are inter-convertible. The dual information is contained in irrep, so the Cartesian form of a vector can be recovered from a set of sizes by fromSizeList[S]

?fromSizeList

8. Validating data from GAP db.

Summary. The loop and db96 data are cross checked.

Create some test vectors of length 96:-

Aa;Bb;F=Flatten[RealDigits[Pi,10,95]]

Repeated use of the following cells creates each group (of the specified size j) in turn. Two vectors A & B are taken from predefined random vectors Aa & Bb. The product AB and the inverse Ai are calculated. The product of the vector sizes is shown to be the size of the product, validating  fromdb, gapLoop & gapShape. Then AiAB is shown to recover B or, if some  sizes are zero, gives the lost sizes (gapTimes does not calculate remainders) validating gapInverse. Finally, folding is attempted and the result identified if it is in “loop”. 
The size j is incremented and i is set to 1 when Check detects a read error at the end of data for size j..
All groups in db36 have been tested. A few errors were corrected (12/2/11) in loop[[m,n]]. 
(The fold test cannot handle C25, but this is a very low priority problem.)
Delete the voluminous output before saving!

j=11;i=1;mm=11;(*Initialise*)

Quiet[Check[fromdb[j,i,1],(*Increment j on read failure*)
(j++;i=1;fromdb[j,i,1];If[j>36,Abort[]])];Print[{gapName,j,i,gapGens,gapRels,"\nA,B,AB",A=Take[Aa,j],B=Take[Bb,j],AB=gapTimes[A,B],"\nsA, sB, sAB",sA=gapShape[A],sB=gapShape[B],sAB=gapShape[AB],
"\nSize error=",sA sB-sAB,"\nAinverse, Ai",Ai=prs[gapInverse[A]];Short[Ai,4],"\nRemainder B-Ai AB",AiAB=B-gapTimes[Ai,AB,gapLoop]," Shape of remainder ",gapShape[AiAB]}];i++(*Next group*)];

9. Primals, Symmetric difference, Folding, Generalised Det.

Hamilton showed that quaternion and octonion algebras were related to tables of twice their size. Frobenius showed that groups, when used as Cayley multiplication tables for vectors, conserved their determinants “up to a sign”. van der Waerden (and only two other authors that I can find) pointed out that real numbers were equivalence relationships on pairs of unsigned numbers. I deduced from these pointers that mathematics had deeper foundations, in the form of unsigned numbers, and discovered Hoop algebras as equivalence relations on some Moufang loops. “Primal” (unsigned, absolute, half-line) continuous numbers have trichotomous order, addition, multiplication, division, powers, unique roots, and transcendental solutions to equations. Primal sets have a well-defined minimum and maximum. Subtraction and negation are undefined, but the symmetric difference |a,b| can be defined by Min[a,b]+|a,b|=Max[a,b]. (This often appears in traditional mathematics as a function of (((a-b))^2).)  On 8/7/92 I made a note “The negative sign in the ordinary determinant is due to cancellation of (ad-bc) with (bc-ad)”
“Folding” is the process that creates (and generalizes) signs. It converts a loop (of length mr and with the r’th cyclic group Cr, as a central subgroup) into an algebra for vectors of length m and with powers of  𝕤 (the r’th root of unity) as “generalised signs”. Unique roots are lost, and “additive elimination” (∑_(i=1)^(i=r))(𝕤^i)=0 provides a “generalised subtraction”.
The concepts of the Permanent (the determinant with the minus signs replaced by summation), the Moore-Penrose pseudo-inverse (for non-square and singular matrices), generalised signs, and determinants “up to a sign” led to the development of a generalised determinant function. This creates an r-determinant consisting of r elements, each having a distinct sign (𝕤^i), calculated a la Moore-Penrose sum of square matrices. The permanent “has uses in graph theory and in bosonic quantum field theory” (Wikipedia). A zero determinant corresponds to a diterminant with two equal components. No applications have been found for r-determinants with r>2.

?det

PseudoInverse[M={{-1,2,3},{4,-5,6},{7,-8,9}}]
{Det[M],det[M,1],det[M],det[M,3],det[M,4],det[M,5],det[M,1,Plus],det[M,2,Plus],det[M,3,Plus],det[M,4,Plus],det[M,5,Plus],Tr[M]}

M={{a,b,c,d},{f,0,7,i},{j,k,l,m}};M//tf

{"Permanent  ",det[M,1],"\nDiterminant  ",det[M],"\nTriterminant ",det[M,3],"\nDit+ ",det[M,1,Plus],"\nDet+ ",det[M,2,Plus],"\nTet+ ",det[M,3,Plus]}

10. Polar Duals, Polar orbits, Dozal.

Summary. Abelian hoops posses a Cartesian/Polar duality that generalises the Argand-Wessel diagram (where {x,y} is dual to {r, θ} with r=(Sqrt[(x^2)+(y^2)]), θ=ArcTan[x,y] ). The polar-dual includes multiple radius-angle parameters together with displacements of the center from zero. “Polar orbits” are algebras with the product of all non-zero radii equal to 1. Different hoops (of a given order) conserve different sets of orbits, just as different forces conserve different sets of particle properties.

The 16 known toPol/toVec formulae have been tested.

Clear[dualTest];gName=.;dualTest[Ao_,G_]:=Module[{gL=mp[G],gN,A,Ar,m,P},
If[!abelianQ[gL],"Not Abelian",m=Length[gL];A=1.Take[Ao,m];
P=toPol[A,gName];Ar=toVec[P,gName];err=Chop[A-Ar];{gName,m,A,"\nError",err,"\nShapes of A & error",shape[A],Chop[shape[err]]}]]

Many polynomials have been found to be conserved by one or more 12’th order algebra. The following list is far from complete.

sh12[{a_,b_,c_,d_,e_,f_,g_,h_,i_,j_,k_,l_}]:=Module[{ab=a-b-g+h,ag=a-b+g-h,bc=b-c-h+i,bh=b-c+h-i,
ca=a-c-g+i,ci=a-c+g-i,de=d-e-j+k,dj=d-e+j-k,
ef=e-f-k+l,ek=e-f+k-l,fd=d-f-j+l,fl=d-f+j-l,f1=a-b-g+h+(d+e-2 f-j-k+2l)/(Sqrt[3]),
f2=(a+b-2c-g-h+2i)/(Sqrt[3])-d+e+j-k,
f3=a-b-g+h-(d+e-2 f-j-k+2l)/(Sqrt[3]),
f4=(a+b-2c-g-h+2i)/(Sqrt[3])+d-e-j+k,abef,agek},
abef=3(((ab ef-bc de))^2);agek=3(((ag ek-bh dj))^2);
{o1=a+b+c+d+e+f+g+h+i+j+k+l,o2=a+b+c-d-e-f+g+h+i-j-k-l,
o3=a+b+c+d+e+f-g-h-i-j-k-l,o4=a+b+c-d-e-f-g-h-i+j+k+l,
(*5*)l22a=3((f1^2)+(f2^2))/4,(*6*)l22b=3((f3^2)+(f4^2))/4,
(*7*)p22=(((a+b+c+g+h+i))^2)+(((d+e+f+j+k+l))^2),(*8*)q22=(((a+b+c-g-h-i))^2)+(((d+e+f-j-k-l))^2),(*9*)r22=(((a+b+c+g+h+i))^2)-(((d+e+f+j+k+l))^2),(*10*)s22=(((a+b+c-g-h-i))^2)-(((d+e+f-j-k-l))^2),
(*11*)p23=((((ag+dj))^2)+(((bh+ek))^2)+(((ci+fl))^2))/2,(*12*)q23=((((ag-dj))^2)+(((bh-ek))^2)+(((ci-fl))^2))/2,
(*13*)r23=((((ab+de))^2)+(((bc+ef))^2)+(((ca+fd))^2))/2,(*14*)s23=((((ab-de))^2)+(((bc-ef))^2)+(((ca-fd))^2))/2,
(*15*)q24=(((a+b+c))^2)+(((d+e+f))^2)+(((g+h+i))^2)+(((j+k+l))^2),
(*16*)s24=(((a+b+c))^2)-(((d+e+f))^2)-(((g+h+i))^2)-(((j+k+l))^2),
(*17*)p26=((ag^2)+(bh^2)+(ci^2)-(dj^2)-(fl^2)-(ek^2))/2,(*18*)q26=((ab^2)+(bc^2)+(ca^2)-(de^2)-(ef^2)-(fd^2))/2,
(*19*)r26=((ag^2)+(bh^2)+(ci^2)+(dj^2)+(fl^2)+(ek^2))/2,(*20*)s26=((ab^2)+(bc^2)+(ca^2)+(de^2)+(ef^2)+(fd^2))/2,
        (*21*) l3=(a+d-g-j) (a-d+g-j) (a-d-g+j)+(b+e-h-k) (b-e+h-k) (b-e-h+k)+
(c+f- i -l) (c-f+ i -l) (c-f- i +l)-(a-d+g-j) (b-e-h+k) (c+f- i -l)-
(a-d-g+j) (b+e-h-k) (c-f+i-l)-(a+d-g-j) (b-e+h-k) (c-f- i +l),
(*22*)l4p=(p26^2)+agek,
(*23*)l4q=(q26^2)+abef,
(*24*)l4r=(r26^2)-3agek,
(*25*)l4s=l22a l22b(*(s26^2)-abef*),(*26*)L4Q=((((a-b))^2)+(((b-c))^2)+(((a-c))^2)+(((d-e))^2)+(((e-f))^2)+(((d-f))^2)+(((g-h))^2)+
(((h-i))^2)+(((g-i))^2)+(((j-k))^2)+(((k-l))^2)+(((j-l))^2))^2/4-3 ((((a (f-e)+b (d-f)+c (e-d)))^2)+(((a (i-h)+b (g-i)+c (h-g)))^2)+(((d (h-i)+e (i-g)+f (g-h)))^2)+(((g (k-l)+h (l-j)+i (j-k)))^2)+
((((b-c))^2)+(((e-f))^2)) (j^2)+((((a-c))^2)+(((d-f))^2)) (k^2)+((((a-b))^2)+(((d-e))^2)) (l^2))+
6 (((c-a) (c-b)+(f-d) (f-e)) j k+((b-a) (b-c)+(e-d) (e-f)) j l+
((a-b) (a-c)+(d-e) (d-f)) k l),
(*27*)L4σ= ((((a-b))^2)+(((b-c))^2)+(((c-a))^2)-(((d-e))^2)-(((e-f))^2)-(((f-d))^2)-(((g-h))^2)-(((h-i))^2)-(((i-g))^2)-(((j-k))^2)-(((k-l))^2)-(((l-j))^2))^2/4+3 ((((b d-c d-a e+c e+a f-b f))^2)+(((b g-c g-a h+c h+a i-b i))^2)-(((e g-f g-d h+f h+d i-e i))^2)+(((b j-c j-a k+c k+a l-b l))^2)-(((-e j+f j+d k-f k-d l+e l))^2)-(((h j-i j-g k+i k+g l-h l))^2)),
(*28*)L4a3=((((((ag+dj))^2)+(((bh+ek))^2)+(((ci+fl))^2)))^2)/4+agek,(*29*)L4b3=((((((ag-dj))^2)+(((bh-ek))^2)+(((ci-fl))^2)))^2)/4+agek,(*30*)L4c3=((((((ab+de))^2)+(((bc+ef))^2)+(((ca+fd))^2)))^2)/4-abef,(*31*)L4d3=((((((ab-de))^2)+(((bc-ef))^2)+(((ca-fd))^2)))^2)/4-abef,(*32*)L4a6=((((ag^2)+(bh^2)+(ci^2)-(dj^2)-(fl^2)-(ek^2)))^2)/4+agek,(*33*)L4b6=((((ab^2)+(bc^2)+(ca^2)-(de^2)-(ef^2)-(fd^2)))^2)/4+abef,(*34*)L4c6=((((ab^2)+(bc^2)+(ca^2)-(de^2)-(ef^2)-(fd^2)))^2)/4-abef,
	(*35*)L4d6= ((((ag^2)+(bh^2)+(ci^2)+(dj^2)+(fl^2)+(ek^2)))^2)/4-agek,
(*36*)L49=(((((ab^2)-(de^2)))^2)+((((ab^2)-(ef^2)))^2)+((((ab^2)-(fd^2)))^2)+((((bc^2)-(de^2)))^2)+((((bc^2)-(ef^2)))^2)+((((bc^2)-(fd^2)))^2)+((((ca^2)-(de^2)))^2)+((((ca^2)-(ef^2)))^2)+((((ca^2)-(fd^2)))^2)),
(*37*)L49a=(((((ag^2)-(dj^2)))^2)+((((ag^2)-(ek^2)))^2)+((((ag^2)-(fl^2)))^2)+((((bh^2)-(dj^2)))^2)+((((bh^2)-(ek^2)))^2)+((((bh^2)-(fl^2)))^2)+((((ci^2)-(dj^2)))^2)+((((ci^2)-(ek^2)))^2)+((((ci^2)-(fl^2)))^2)),
(*38*)L49b=(((((ab^2)-(dj^2)))^2)+((((ab^2)-(ek^2)))^2)+((((ab^2)-(fl^2)))^2)+((((bc^2)-(dj^2)))^2)+((((bc^2)-(ek^2)))^2)+((((bc^2)-(fl^2)))^2)+((((ca^2)-(dj^2)))^2)+((((ca^2)-(ek^2)))^2)+((((ca^2)-(fl^2)))^2)),
(*39*)L49c=(((((ag^2)-(de^2)))^2)+((((ag^2)-(ef^2)))^2)+((((ag^2)-(fd^2)))^2)+((((bh^2)-(de^2)))^2)+((((bh^2)-(ef^2)))^2)+((((bh^2)-(fd^2)))^2)+((((ci^2)-(de^2)))^2)+((((ci^2)-(ef^2)))^2)+((((ci^2)-(fd^2)))^2))}];

If the non-zero radii multiply to 1, the resultis a Dozal Orbit. Note that {ϵ,σ} defines 4-phases, {ζ,τ} 3 phases, {λ,ϕ} 6 phases and both {η,χ} and {κ,ψ} 12 phases. The {η,χ} and {κ,ψ} systems are shown by the following plots:-

vv:=toVec[{0,0,0,0,0,0,0,0,36,χ,0,0},"C12"];
Plot[{vv[[1]],vv[[2]],vv[[3]],vv[[4]],vv[[5]],vv[[6]],vv[[7]],vv[[8]],vv[[9]],vv[[10]],vv[[11]],vv[[12]]},{χ,0,2 π}]
vv:=toVec[{0,0,0,0,0,0,0,0,0,0,36,ψ},"C12"];
Plot[{vv[[1]],vv[[2]],vv[[3]],vv[[4]],vv[[5]],vv[[6]],vv[[7]],vv[[8]],vv[[9]],vv[[10]],vv[[11]],vv[[12]]},{ψ,0,2 π}]

Six of the 12 phases cancel if {η,χ} = {κ,ψ} (displacement introduced to separate phases):-

vv:=toVec[{0,0,0,0,0,0,0,0,1,χ,1,χ},"C12"];
Plot[{vv[[1]],vv[[2]]+0.01`,vv[[3]]+0.02`,vv[[4]]+0.03`,vv[[5]]+0.04`,vv[[6]]+0.05`,vv[[7]]+0.06`,vv[[8]]+0.07`,vv[[9]]+0.08`,vv[[10]]+0.09`,vv[[11]]+0.1`,vv[[12]]+0.11`},{χ,0,2 π}]

Note that in C6C2,  {ζ,τ} defines 3 phases, {λ,ϕ} {η,χ} and {κ,ψ} 6 phases in different sequences. 12 equal phases arise if {η,χ} = {κ,ψ+π/2}. These systems are shown by the following plots:-

vv:=toVec[{0,0,0,0,1,τ,0,0,0,0,0,0},"C6C2"];
Plot[{vv[[1]],vv[[2]],vv[[3]],vv[[4]],vv[[5]],vv[[6]],vv[[7]],vv[[8]],vv[[9]],vv[[10]],vv[[11]],vv[[12]]},{τ,0,2 π}]
vv:=toVec[{0,0,0,0,0,0,1,ϕ,0,0,0,0},"C6C2"];
Plot[{vv[[1]],vv[[2]],vv[[3]],vv[[4]],vv[[5]],vv[[6]],vv[[7]],vv[[8]],vv[[9]],vv[[10]],vv[[11]],vv[[12]]},{ϕ,0,2 π}]
vv:=toVec[{0,0,0,0,0,0,0,0,1,η,0,0},"C6C2"];
Plot[{vv[[1]],vv[[2]],vv[[3]],vv[[4]],vv[[5]],vv[[6]],vv[[7]],vv[[8]],vv[[9]],vv[[10]],vv[[11]],vv[[12]]},{η,0,2 π}]
vv:=toVec[{0,0,0,0,0,0,0,0,1,ψ,1,ψ+(π/2)},"C6C2"];
Plot[{vv[[1]],vv[[2]],vv[[3]],vv[[4]],vv[[5]],vv[[6]],vv[[7]],vv[[8]],vv[[9]],vv[[10]],vv[[11]],vv[[12]]},{ψ,0,2 π}]

The following test finds the sizes thate conserved in any Dozal algebra, More work needed!

ds={"o1","o2","o3","o4","l22a","l22b","p22","q22","r22","s22","p23","q23","r23","s23","q24","s24","p26","q26","r26","s26","l3","l4p","l4q","l4r","l4s","L4Q","L4σ","L4a3","L4b3","L4c3","L4d3","L4a6","L4b6","L4c6","L4d6","L49","L49a","L49b","L49c"};

A=1.Take[Aa,12];B=1.Take[Aa,12];

m=12;n=1;con={};

mp[m,n];res={id[mp[m,n]]};sA=sh12[A];sB=sh12[B];er=Chop[sA sB-sh12[hoopTimes[A,B]]];c=1;Do[If[sA[[j]]≠0&&er[[j]]==0,c++;AppendTo[res,ds[[j]]]],{j,39}];If[c>1,AppendTo[con,res]];n++;res

con

{{"C3iC4","o1","q22","s26"},{"C12","o1","l22a","l22b","q22","p23","l4s","L4a3"},{"A4","o1","p23","L4a3"},{"D12","o1"},{"C6C2","o1","o3","o4","s22","p23","r23","s23","l4q","L4a3","L4b6"},{"S3Mn","o1","o3"},{"Alt12n","o1"},{"C3P4","s24","L4σ"},{"SL23r","q22"},{"C3r8","l22a","l22b","p22","q22","r26","l4r","l4s","L4d6"},{"C6C2C2c","s23"},{"C6C2C2r","s23"}}

11. References.

[1] http://library.wolfram.com/infocenter/MathSource/4894/  R.H.Beresford.  First published 8/5.2003.
[2] J.D.H. Smith, A.B. Romanowska, Post-Modern Algebra, Wiley Interscience 1999.
[3] B. L. van der Waerden, A History of Algebra, Chapter 12. Springer 1985.
[4] G. Frobenius, Uber die Primfactoren der Gruppendeterminante, Sitzungsber.Preuss. Akad. Wiss. Berlin Phys. Math,KL. 1896,(985-1021) (not seen, but quoted from Ref[** p236].)
[5] [GAP99] The Gap Group.GAP---Groups,Algorithms,and Programming,Version 4.2;Aachen, St Andrews,1999. (http://www-gap.dcs.st-and.ac.uk/~gap).
[6] Vahid Dabbaghian-Abdoly. An algorithm for constructing representations of finite groups.
 J. Symbolic Comput., 39:671– 688, 2005. 4, 5 (IrreducibleAffordingRepresentations in GAP)
[7] Hestenes, D. & Sobczyk, G. Clifford Algebra to Geometric Calculus. D. Reidel, 1984. 512.57
[8] Chris Doran, Anthony Lasenby, Geometric algebra for Physicists, CUP, Cambridge England 2003 516.35
[9] G. Sommer (Ed), Geometric Computing with Clifford Algebras, Springer, 2001 512.57.
[10] C. Perwass, Clucalc, http://www.clucalc.info/
[11] Ian C. G. Bell, http://www.iancgbell.clara.net/maths/geoalg1.htm.
[12] Jaap Suter, http://web.archive.org/web/20040610223908/home.student.utwente.nl/j.suter/ga_primer.pdf
[13] Terje Vold, http://library.wolfram.com/infocenter/Conferences/6951/
[14] P. Lounesto, Clifford Algebras & Spinors 2nd ed., Cambridge University Press 2001.
[15] GAP Forum/ Determinant Factor Conservation, and Division by zero (renormalisation). R.H.Beresford. Sept 2000.
[16] Sci.Maths. Group Algebras and Physical Mathematics. Roger Beresford. 12th. June 2001
[17] http://demonstrations.wolfram.com/AlgebraicLoops2SymmetryConservingVectorDivisionHoopAlgebras/
[18] http://demonstrations.wolfram.com/AlgebraicLoops1Properties/
[19] E.G. Landau. Foundations of Analysis. Chelsea 1960. 512.7
[20] Wiki Algebraic Structures.
[21] Section on Loops, in [5].