repthy
Class Group

Object
  extended byAbstractCollection
      extended byAbstractSet
          extended byImmutableSet
              extended byGroup
All Implemented Interfaces:
Collection, Set
Direct Known Subclasses:
C_n, HashGroup, PSL3b

public abstract class Group
extends ImmutableSet

A Group is a Set of GroupElts satisfying the group axioms--existence of an identity element and closure under GroupElt.mult(repthy.GroupElt) and GroupElt.inverse(). The groups in this package are finite.

In this implementation, a Group is an ImmutableSet--elements can't be added or removed once the group is instantiated. The class implements the Set interface, but the modify methods from that interface will throw a java.lang.UnsupportedOperationException. Subclasses inherit this immutability.

A subclass of Group only needs to implement the following methods.

For efficiency, it should probably override AbstractCollection.contains(Object).

Author:
Mark McConnell

Field Summary
protected  CharTable charTable
          Should be accessed by getCharTable(), not directly, because the method makes sure to fill in the table the first time.
 
Constructor Summary
Group()
           
 
Method Summary
 Enumeration cyclicSubgpsUpToConj()
          Returns an Enumeration of the cyclic subgroups of this group, up to conjugacy.
 String describeOrder8()
          If this group has order 8, returns a String describing it, like "D_2*4" or "C_8".
 Enumeration elementarySubgps()
          Returns an Enumeration of all of this group's maximal elementary subgroups, up to conjugacy.
protected  void fillInCharTable()
          Fills in the character table.
 Subgroup getCenter()
          Returns the center of this group.
 Subgroup getCentralizer(GroupElt g)
          Returns the centralizer of g in this group.
protected  Comparator getCharComparator()
          Returns a Comparator that sorts GpCharacters by the degree.
 CharTable getCharTable()
          Returns the character table, filling it in automatically the first time.
 Subgroup getCommutatorSubgroup()
          Returns (G, [G,G]).
 List getCompositionSeries()
          Returns a composition series for this group G as a descending list of normal subgroups.
abstract  Set getConjClass(int i)
          Returns (a copy of) the i-th conjugacy class.
abstract  int getConjClassIndex(GroupElt g)
          Returns i such that g is in the i-th conjugacy class.
abstract  int getConjClassNum()
          Returns the number of conjugacy classes.
 GroupElt getConjClassRep(int i)
          Returns some element of the i-th conjugacy class.
static int getEltOrder(GroupElt g, Group G)
          Finds the order of the element g.
static int getEltOrder(GroupElt g, int N, int[][] fac)
          Finds the order of the element g.
 GroupElt getIdentity()
          Returns a GroupElt that is the identity for this group, up to GroupElt.equals(java.lang.Object).
 int getOrder()
          The order of this group, that is, the number of its elements.
 Subgroup getProperNormalSubgroup()
          Returns a normal subgroup properly containing {1} and properly contained in this group, or return nulls if such a normal subgroup doesn't exist.
 Subgroup getSylow(int p)
          Returns one of the Sylow p-subgroups of this group, as a Subgroup in which the underlying subgroup is a PGroup.
 boolean isAbelian()
           
 boolean isCentral(GroupElt g)
          Whether the argument is in the center of this group.
 boolean isSimple()
          Whether this group is simple.
 boolean isSubgroupOf(Group G1)
          Whether this is a subgroup of G1.
 int order()
          The order of the group, that is, the number of its elements.
static GroupElt power(GroupElt g, int i)
          Returns the i-th power of g.
static void printTest(Group G)
          Prints all (yes, all) the elements and conjugacy classes to standard output.
static void tableTest(Group G, String nameG)
          For testing; displays the character table in a window and decomposes some sample representations.
 
Methods inherited from class ImmutableSet
add, addAll, clear, remove, removeAll, retainAll
 
Methods inherited from class AbstractSet
equals, hashCode
 
Methods inherited from class AbstractCollection
contains, containsAll, isEmpty, iterator, size, toArray, toArray, toString
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface Set
contains, containsAll, isEmpty, iterator, size, toArray, toArray
 

Field Detail

charTable

protected CharTable charTable
Should be accessed by getCharTable(), not directly, because the method makes sure to fill in the table the first time.

Constructor Detail

Group

public Group()
Method Detail

getConjClassNum

public abstract int getConjClassNum()
Returns the number of conjugacy classes.


getConjClass

public abstract Set getConjClass(int i)
Returns (a copy of) the i-th conjugacy class. The inverse operation is getConjClassIndex(repthy.GroupElt).

Implementations may choose to return a SortedSet. If they do, code that needs to pick one element out of the conjugacy class will always pick the first. See getConjClassRep(int).

It's recommended that the Set returned be unmodifiable.


getConjClassIndex

public abstract int getConjClassIndex(GroupElt g)
Returns i such that g is in the i-th conjugacy class. The inverse operation is getConjClass(int). May throw an exception if the argument is not in the group.


getConjClassRep

public GroupElt getConjClassRep(int i)
Returns some element of the i-th conjugacy class. If the conjugacy class is a SortedSet, the first element is always returned. Otherwise, an unspecified element is returned. The argument must satisfy 0 ≤ i < the value of getConjClassNum().


getIdentity

public GroupElt getIdentity()
Returns a GroupElt that is the identity for this group, up to GroupElt.equals(java.lang.Object).


order

public int order()
The order of the group, that is, the number of its elements.


getOrder

public int getOrder()
The order of this group, that is, the number of its elements. It's the same as order().


getEltOrder

public static int getEltOrder(GroupElt g,
                              Group G)
Finds the order of the element g.

If code needs to compute the order for many elements of a fixed group, getEltOrder(GroupElt, int, int[][]) may be more efficient.

Parameters:
G - Should be a group containing g, or null if such a G isn't available. In the first case, we use an efficient algorithm from one of the early sections of Cohen. Otherwise we use a simple linear search.

getEltOrder

public static int getEltOrder(GroupElt g,
                              int N,
                              int[][] fac)
Finds the order of the element g.

This method is recommended when N and fac (described below) are fixed for many different g's. getEltOrder(GroupElt, Group) is the basic version.

Parameters:
N - A number that's known to be a positive factor of the order of g. Typically N is the order of a group containing g.
fac - Must be the prime factorization of N, as computed by NumThy.factor(int).

power

public static GroupElt power(GroupElt g,
                             int i)
Returns the i-th power of g. Uses a squaring algorithm.


getCentralizer

public Subgroup getCentralizer(GroupElt g)
Returns the centralizer of g in this group. The subgroup will be a HashGroup.


isAbelian

public boolean isAbelian()

getCenter

public Subgroup getCenter()
Returns the center of this group. The underlying subgroup will be an AbelianGroup.


isCentral

public boolean isCentral(GroupElt g)
Whether the argument is in the center of this group. It's an error if the argument is not an element of this group.


getCommutatorSubgroup

public Subgroup getCommutatorSubgroup()
Returns (G, [G,G]). The latter is a HashGroup.


isSubgroupOf

public boolean isSubgroupOf(Group G1)
Whether this is a subgroup of G1.


getSylow

public Subgroup getSylow(int p)
Returns one of the Sylow p-subgroups of this group, as a Subgroup in which the underlying subgroup is a PGroup.

Throws:
IllegalArgumentException - If p is not prime.

getCharTable

public CharTable getCharTable()
Returns the character table, filling it in automatically the first time.


fillInCharTable

protected void fillInCharTable()
                        throws OrthonormalityException,
                               PariNotFoundException
Fills in the character table. The user should not call this method directly, since it's called automatically by getCharTable() the first time it's needed.

The algorithm here fills out the table completely, through subclasses may want to override it. Implementors may assume charTable is not null and initially contains no characters, because getCharTable() takes care of that before the present method is called. They should feel free to throw OrthonormalityExceptions, because getCharTable() will catch them and print the error messages.

Throws:
OrthonormalityException - If the table isn't full at the end, or if anything goes wrong in the middle.
PariNotFoundException

cyclicSubgpsUpToConj

public Enumeration cyclicSubgpsUpToConj()
Returns an Enumeration of the cyclic subgroups of this group, up to conjugacy. Each element returned is a Subgroup whose underlying subgroup is a C_n.


elementarySubgps

public Enumeration elementarySubgps()
Returns an Enumeration of all of this group's maximal elementary subgroups, up to conjugacy. Specifically, for each prime p dividing the order of the group, we take one Sylow p-subgroup Pmax, run through all the subgroups P of Pmax, take all the cyclic subgroups C of order prime to p in the centralizer CP of P (up to conjugacy in CP), and return P × C. The classes of P and C are always PGroup and C_n, respectively, and the product is of class ProductGroupInternal. Only the maximal P × C are returned.

(We do not return a Subgroup (this, P × C), because the elements p × c don't belong to this; only pc belong to this.)


getCharComparator

protected Comparator getCharComparator()
Returns a Comparator that sorts GpCharacters by the degree. Subclasses may choose to override this, or to return null if they don't want sorting.


getProperNormalSubgroup

public Subgroup getProperNormalSubgroup()
Returns a normal subgroup properly containing {1} and properly contained in this group, or return nulls if such a normal subgroup doesn't exist.


isSimple

public boolean isSimple()
Whether this group is simple.


getCompositionSeries

public List getCompositionSeries()
Returns a composition series for this group G as a descending list of normal subgroups. The return value is a List of Subgroups

((Gk, Gk-1), (Gk-1, Gk-2), ..., (G1, G0))

where Gk = G, G0 = {1}, and Gi-1 is a normal subgroup of Gi with simple quotient.


describeOrder8

public String describeOrder8()
If this group has order 8, returns a String describing it, like "D_2*4" or "C_8".


printTest

public static void printTest(Group G)
Prints all (yes, all) the elements and conjugacy classes to standard output.


tableTest

public static void tableTest(Group G,
                             String nameG)
                      throws OrthonormalityException
For testing; displays the character table in a window and decomposes some sample representations. Closing the window closes the Java session.

Parameters:
G - The group.
nameG - A name for G in the title of the character table.
Throws:
OrthonormalityException