org.uacalc.alg
Class FreeAlgebra

java.lang.Object
  extended by org.uacalc.alg.GeneralAlgebra
      extended by org.uacalc.alg.SubProductAlgebra
          extended by org.uacalc.alg.FreeAlgebra
All Implemented Interfaces:
Algebra, SmallAlgebra

public class FreeAlgebra
extends SubProductAlgebra
implements SmallAlgebra

This class represents a subalgebra of a direct product of SmallAlgebras. It allows one to construct such an algebra even though the direct product may be too big to be a SmallAlgebra.

Version:
$Id: FreeAlgebra.java,v 1.42 2010/07/12 14:16:13 ralphfreese Exp $
Author:
Ralph Freese

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.uacalc.alg.SmallAlgebra
SmallAlgebra.AlgebraType
 
Field Summary
 
Fields inherited from class org.uacalc.alg.SubProductAlgebra
decompose, gens, productAlgebra, termMap, terms, thinGenerators, univ, univHashMap, variables, varsMap
 
Fields inherited from class org.uacalc.alg.GeneralAlgebra
con, description, monitor, name, operations, operationsMap, similarityType, size, sub, universe
 
Fields inherited from interface org.uacalc.alg.Algebra
CARDINALITY_COUNTABLE, CARDINALITY_COUNTABLY_INFINITE, CARDINALITY_FINITE, CARDINALITY_INFINITE, CARDINALITY_UNKNOWN
 
Constructor Summary
FreeAlgebra(SmallAlgebra alg, int numberOfGens)
          Construct a free algebra without giving it a name.
FreeAlgebra(SmallAlgebra alg, int numberOfGens, boolean makeUniverse)
           
FreeAlgebra(SmallAlgebra alg, int numberOfGens, boolean makeUniverse, boolean thinGenerators)
           
FreeAlgebra(SmallAlgebra alg, int numberOfGens, boolean makeUniverse, boolean thinGens, boolean decompose, java.util.List<Equation> relations, ProgressReport report)
           
FreeAlgebra(SmallAlgebra alg, int numberOfGens, boolean makeUniverse, boolean thinGens, ProgressReport report)
           
FreeAlgebra(SmallAlgebra alg, int numberOfGens, java.util.List<Equation> relations, ProgressReport report)
          This constructs a finitely presented algebra and it is only correct if the algebra is in a CD variety.
FreeAlgebra(SmallAlgebra alg, int numberOfGens, ProgressReport report)
          Construct a free algebra without giving it a name.
FreeAlgebra(java.lang.String name, BigProductAlgebra prod, java.util.List<IntArray> gens, java.util.List<IntArray> univList)
          Construct a FreeAlgebra when the gens and univ are already given.
FreeAlgebra(java.lang.String name, SmallAlgebra alg, int numberOfGens)
           
FreeAlgebra(java.lang.String name, SmallAlgebra alg, int numberOfGens, boolean makeUniverse)
          Consturct the free algebra over alg with numberOfGens generators.
FreeAlgebra(java.lang.String name, SmallAlgebra alg, int numberOfGens, boolean makeUniverse, boolean thinGens)
           
FreeAlgebra(java.lang.String name, SmallAlgebra alg, int numberOfGens, boolean makeUniverse, boolean thinGens, boolean decompose, java.util.List<Equation> relations, ProgressReport report)
          Consturct the free algebra over alg with numberOfGens generators.
FreeAlgebra(java.lang.String name, SmallAlgebra alg, int numberOfGens, boolean makeUniverse, boolean thinGens, ProgressReport report)
           
 
Method Summary
 SmallAlgebra.AlgebraType algebraType()
          The type of algebra this is, like a quotient algebra.
static Equation findEquationOfAnotB(SmallAlgebra A, SmallAlgebra B, int[] bGens)
           
static Equation findEquationOfAnotB(SmallAlgebra A, SmallAlgebra B, int[] bGens, ProgressReport report)
          Find an equation holding in A and failing in B under the substitution, or return null if there is no such failure.
static Term findInClone(Operation op, SmallAlgebra A)
          Test if op is in the clone of A and return the term if it is; null otherwise.
 java.util.List<Term> getIdempotentTerms()
           
static void main(java.lang.String[] args)
           
 Operation switchXandYAutomorphism()
          This returns the map which given the index of an element, returns the index of the element obtained from the first by applying the automorphism interchanging the first two generators.
 
Methods inherited from class org.uacalc.alg.SubProductAlgebra
con, convertToDefaultValueOps, elementIndex, generators, getDecompose, getElement, getElementFromTerm, getProductAlgebra, getTerm, getTermMap, getTerms, getThinGenerators, getUniverseList, getUniverseOrder, getVariables, getVariableToGeneratorMap, makeOperations, makeOperationTables, projectionKernel, setDecompose, setThinGenerators, setupGensToVarsMap, sub, superAlgebra, thinGenerators, transpose
 
Methods inherited from class org.uacalc.alg.GeneralAlgebra
cardinality, constantOperations, getDescription, getMonitor, getName, getOperation, getOperationsMap, inputSize, isIdempotent, isSimilarTo, isTotal, isUnary, iterator, monitoring, operations, parent, parents, resetConAndSub, setDescription, setMonitor, setName, setOperations, setUniverse, similarityType, universe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.uacalc.alg.SmallAlgebra
con, convertToDefaultValueOps, elementIndex, getElement, getUniverseList, getUniverseOrder, parent, parents, resetConAndSub, sub
 
Methods inherited from interface org.uacalc.alg.Algebra
cardinality, constantOperations, getDescription, getMonitor, getName, getOperation, getOperationsMap, inputSize, isIdempotent, isSimilarTo, isTotal, isUnary, iterator, makeOperationTables, monitoring, operations, setDescription, setMonitor, setName, similarityType, universe
 

Constructor Detail

FreeAlgebra

public FreeAlgebra(SmallAlgebra alg,
                   int numberOfGens,
                   java.util.List<Equation> relations,
                   ProgressReport report)
This constructs a finitely presented algebra and it is only correct if the algebra is in a CD variety. Use with caution.


FreeAlgebra

public FreeAlgebra(SmallAlgebra alg,
                   int numberOfGens)
Construct a free algebra without giving it a name.


FreeAlgebra

public FreeAlgebra(SmallAlgebra alg,
                   int numberOfGens,
                   ProgressReport report)
Construct a free algebra without giving it a name.


FreeAlgebra

public FreeAlgebra(SmallAlgebra alg,
                   int numberOfGens,
                   boolean makeUniverse)

FreeAlgebra

public FreeAlgebra(SmallAlgebra alg,
                   int numberOfGens,
                   boolean makeUniverse,
                   boolean thinGenerators)

FreeAlgebra

public FreeAlgebra(java.lang.String name,
                   SmallAlgebra alg,
                   int numberOfGens)

FreeAlgebra

public FreeAlgebra(java.lang.String name,
                   SmallAlgebra alg,
                   int numberOfGens,
                   boolean makeUniverse)
Consturct the free algebra over alg with numberOfGens generators.


FreeAlgebra

public FreeAlgebra(java.lang.String name,
                   SmallAlgebra alg,
                   int numberOfGens,
                   boolean makeUniverse,
                   boolean thinGens)

FreeAlgebra

public FreeAlgebra(SmallAlgebra alg,
                   int numberOfGens,
                   boolean makeUniverse,
                   boolean thinGens,
                   ProgressReport report)

FreeAlgebra

public FreeAlgebra(java.lang.String name,
                   SmallAlgebra alg,
                   int numberOfGens,
                   boolean makeUniverse,
                   boolean thinGens,
                   ProgressReport report)

FreeAlgebra

public FreeAlgebra(SmallAlgebra alg,
                   int numberOfGens,
                   boolean makeUniverse,
                   boolean thinGens,
                   boolean decompose,
                   java.util.List<Equation> relations,
                   ProgressReport report)

FreeAlgebra

public FreeAlgebra(java.lang.String name,
                   SmallAlgebra alg,
                   int numberOfGens,
                   boolean makeUniverse,
                   boolean thinGens,
                   boolean decompose,
                   java.util.List<Equation> relations,
                   ProgressReport report)
Consturct the free algebra over alg with numberOfGens generators.

Parameters:
name -
alg -
numberOfGens -
makeUniverse - if true, make the universe
thinGens - if true, try to thin out the number of projections
decompose - if true, reduce to SI algebras
report - keeps the state of the progress

FreeAlgebra

public FreeAlgebra(java.lang.String name,
                   BigProductAlgebra prod,
                   java.util.List<IntArray> gens,
                   java.util.List<IntArray> univList)
Construct a FreeAlgebra when the gens and univ are already given. Useful for reading back from a file without calculating the universe again.

Method Detail

findEquationOfAnotB

public static Equation findEquationOfAnotB(SmallAlgebra A,
                                           SmallAlgebra B,
                                           int[] bGens)

findEquationOfAnotB

public static Equation findEquationOfAnotB(SmallAlgebra A,
                                           SmallAlgebra B,
                                           int[] bGens,
                                           ProgressReport report)
Find an equation holding in A and failing in B under the substitution, or return null if there is no such failure. If there is no such failure and bGens generate B, them B is in the variety generated by A.

Parameters:
A -
B -
bGens -
Returns:
a list of two terms witnessing the failure, or null

findInClone

public static Term findInClone(Operation op,
                               SmallAlgebra A)
Test if op is in the clone of A and return the term if it is; null otherwise.

Parameters:
op - an operation of the set of A
A - an algebra
Returns:
the corresponding term or null

getIdempotentTerms

public java.util.List<Term> getIdempotentTerms()

algebraType

public SmallAlgebra.AlgebraType algebraType()
Description copied from interface: SmallAlgebra
The type of algebra this is, like a quotient algebra.

Specified by:
algebraType in interface SmallAlgebra
Overrides:
algebraType in class SubProductAlgebra
Returns:

switchXandYAutomorphism

public Operation switchXandYAutomorphism()
This returns the map which given the index of an element, returns the index of the element obtained from the first by applying the automorphism interchanging the first two generators.

Returns:

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException,
                        BadAlgebraFileException
Throws:
java.io.IOException
BadAlgebraFileException


Copyright 2003 Ralph Freese. All Rights Reserved.