A Tour of AbstractAlgebra

The Basic Structures

There are three basic Mathematica data structures used in AbstractAlgebra: the Groupoid, Ringoid, and Morphoid. These are generalizations of groups, rings and morphisms. We will use groupoid, ringoid and function when we refer to the mathematical counterparts to the corresponding Mathematica data structures.

Groupoids

A Groupoid consists of a set of elements and a "binary" operation (two inputs from the space whose images do not need to belong to this space). One means of creating one of these is with the FormGroupoid option.

G = FormGroupoid[{0, 2, 1, 4, 6}, Times, GroupoidName -> "ex.1"]

We can easily extract the operation and elements of any groupoid.

Operation[G]
Elements[G]

We are often interested in whether a groupoid has an identity element or not.

HasIdentityQ[G]

Many functions can take on additional Modes, such as Textual or Visual.

HasIdentityQ[G, Mode -> Textual]

HasIdentityQ[G, Mode -> Visual]

ClosedQ[G, Mode-> Visual]

The Cayley table is a tool that can reveal a number of interesting properties regarding a group.

CayleyTable[G, Mode -> Visual]

Ringoids

Since we now wish to consider rings, we switch our structure.

SwitchStructureTo[Ring]

FormRingoid works in a fashion analogous to FormGroupoid. The required parameters are the list of elements, the addition operation and the multiplication operation. Options can be added afterwards.

R = FormRingoid[{0, 2, 1, 4, 6}, Plus, Times, FormatOperator -> False, FormatElements -> True]

Since there are two operations, we need to view the Cayley tables of both operations.

CayleyTables[R, Mode -> Visual]

Here we form the extension ring of polynomials over the Boolean ring on {1, 2, 3} and choose a random polynomial of degree 2 that is monic (leading coefficient is the unity).

RandomElement[PolynomialsOver[BooleanRing[3]],2,Monic->True]

Next we consider a random 3 by 3 matrix whose elements come from the lattice ring on the divisors of 12 (with operation LCM/GCD for the addition and GCD for the multiplication.

RandomElement[MatricesOver[LatticeRing[12],3]]//MatrixForm

The third type of ring extension is the ring of functions over a ring; here we use (Subscript[ℤ, 12]).

RandomElement[FunctionsOver[ZR[12]]]

As a last example here, we form the Galois field of order 9.

GF[9]

Morphoids

To form a Morphoid, the parameters are a (pure) function and then either two groupoids or two ringoids. (The function has the first structure as the domain and the second as the codomain.)

f = FormMorphoid[Mod[#, 6]&, Z[12], Z[6]]

The MorphismQ function determines if this is a (ring) homomorphism.

MorphismQ[f]

To see visually why the operation is preserved for the pair (3, 5), try the following.

PreservesQ[f, {3,5}, Mode -> Visual]

We now switch back to groups.

SwitchStructureTo[Group]

At this point, we now build a group homomorphism.

g = FormMorphoid[Mod[#, 6]&, Z[12], Z[6]]

We see different results now that we are working with groups.

PreservesQ[g, {3,5}, Mode -> Visual]

Sometimes morphisms are more easily set up by matching how we want the elements to line up.

FormMorphoidSetup[D[4], Z[8]];

We want to send the first element in the domain to the first element in the codomain, the second element in the domain to the third element in the codomain, the third to the fifth etc.

h =FormMorphoid[{1,3,5,7,2,4,6,8},D[4], Z[8]]

Here we see that this is not a homomorphism on the whole group, but note that we can see a homormorphism from the rotational subgroup to the set {0, 2, 4, 6}.

MorphismQ[h, Mode -> Visual]

More Groupoids

We form a list of some groups, to be used below.

someGroups = {Z[5], Dihedral[4], Symmetric[3], U[15]}

Most functions can take a list of arguments, as shown here with CayleyTable.

CayleyTable[someGroups, Mode -> Visual];

Here is a visualization of why the following groups are or are not cyclic.

CyclicQ[someGroups, Mode -> Visual]

Here is a animation indicating the subgroup generated by 6 in the group (Subscript[ℤ, 8]).

SubgroupGenerated[Z[8], 6, Mode -> Visual]

This illustrates how an operation makes sense on the following right cosets. This also shows a quotient group.

gr1 = RightCosets[Z[8], {0, 4}, Mode -> Visual, Output -> Graphics];

By specifying Output -> Graphics, we indicate that we want the graphic as the output, not the actual Cayley table.

gr2 = CayleyTable[Z[4], Mode -> Visual, Output -> Graphics];

Putting the two side-by-side makes it clear to what group this quotient group (Subscript[ℤ, 8])/{0,4} is isomorphic.

Show[GraphicsArray[{gr1, gr2}]];

The following indicates that ⟨{3,2,1}⟩ in (Subscript[S, 3]) is not normal.

NormalQ[H = SubgroupGenerated[Symmetric[3], {3, 2, 1}],Symmetric[3]]

Because of this lack of normality, the product of cosets is not a well-defined operation, as illustrated here by the failure of having square blocks for products.

LeftCosets[Symmetric[3],  H, Mode -> Visual];