public class Malcev
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
congruenceModularForIdempotent(SmallAlgebra alg,
ProgressReport report)
Use the polynomial time algorithm from Freese-Valeriote to
test if
alg generates a CM variety. |
static boolean |
congruenceModularVariety(SmallAlgebra alg)
Test if alg generates a CM variety by looking for
a Day quadruple in the square of the free algebra
on 2 generators.
|
static boolean |
congruenceModularVariety(SmallAlgebra alg,
ProgressReport report)
Test if alg generates a CM variety by looking for
a Day quadruple in the square of the free algebra
on 2 generators.
|
static IntArray |
cpIdempotent(SmallAlgebra alg,
ProgressReport report)
This uses Theorem 5.1 of Freese-Valeriote to test if the
algebra the algebra generates a CP variety.
|
static int |
cubeTermBlockerIdempotent(Operation op,
BasicSet C,
BasicSet D)
Returns the j so that C, D is a cube term blocker at position j
or -1 if C, D is not a cube term blocker.
|
static boolean |
cubeTermBlockerIdempotent(Operation op,
int j,
BasicSet C,
BasicSet D)
Tests if op(D,...,D,C,D,...D) is a subset of C (where the
C is in the jth coordinate).
|
static boolean |
cubeTermBlockerIdempotent(SmallAlgebra alg,
BasicSet C,
BasicSet D) |
static java.util.List<BasicSet> |
cubeTermBlockerIdempotent(SmallAlgebra alg,
ProgressReport report)
Find a cube term blocker for V(A) if there is one; null otherwise.
|
static boolean |
cyclicTermIdempotent(SmallAlgebra alg,
int arity)
This implements an algorithm of Valeriote and Willard for testing if
the algebra has a cyclic term of a given arity.
|
static boolean |
cyclicTermIdempotent(SmallAlgebra alg,
int arity,
ProgressReport report)
This implements an algorithm of Valeriote and Willard for testing if
the idempotent algebra has a cyclic term of a given arity.
|
static boolean |
dayQuadruple(int a,
int b,
int c,
int d,
SmallAlgebra alg)
Check if a, b, c, d form a Day Quadruple in alg.
|
static Term |
differenceTerm(SmallAlgebra alg)
Find a difference term for the algebra, if one exists.
|
static Term |
differenceTerm(SmallAlgebra alg,
ProgressReport report)
Find a difference term for the algebra, if one exists.
|
static IntArray |
findDayQuadrupleInSquare(SmallAlgebra alg,
ProgressReport report)
Find a Day quadruple of the form a = (x0, x1), b = (x0, y1),
c = y0, x1), d = (y0, y1).
|
static Term |
findWeakNUTerm(SmallAlgebra alg,
int arity,
ProgressReport report)
This will find a near unanimity term of the given arity
if one exits; otherwise it return null.
|
static boolean |
fixedKEdgeIdempotent(SmallAlgebra testalg,
int level,
ProgressReport report) |
static Term |
fixedKEdgeTerm(SmallAlgebra alg,
int k,
ProgressReport report)
This will find a k-edge term if one exits; otherwise it return
null.
|
static boolean |
fixedKPermIdempotent(SmallAlgebra alg,
int level,
ProgressReport report) |
static java.util.List<IntArray> |
gummLevelPath(java.util.List<IntArray> middleZero,
java.util.List<IntArray> firstOne,
IntArray g0,
IntArray g2)
Change this a little:
This finds a path from g0 to u, then v.
|
static java.util.List<Term> |
gummTerms(SmallAlgebra alg)
This returns a list of Gumm terms witnessing modularity, or null if
the algebra does generate a congruence modular variety.
|
static java.util.List<Term> |
gummTerms(SmallAlgebra alg,
FreeAlgebra free2,
ProgressReport report)
This returns a list of Gumm terms witnessing modularity, or null if
the algebra does generate a congruence modular variety.
|
static java.util.List<Term> |
gummTerms(SmallAlgebra alg,
ProgressReport report)
This returns a list of Gumm terms witnessing modularity, or null if
the algebra does generate a congruence modular variety.
|
static java.util.List |
hagemannMitschkeLevelPath(java.util.List sub,
IntArray g0,
IntArray g2)
This finds a path from g0 to g2 in middleZero, a list
of triples, where two triples are connected by an edge if either
their first or third coordinates agree.
|
static java.util.List<Term> |
hagemannMitschkeTerms(SmallAlgebra alg) |
static java.util.List<Term> |
hagemannMitschkeTerms(SmallAlgebra alg,
ProgressReport report)
This returns a list of Hagemann Mitschke Terms terms witnessing
k -permutability, or
null if the algebra does generate a congruence
k -permutable variety. |
static boolean |
isCongruenceDistIdempotent(SmallAlgebra alg,
ProgressReport report)
The polynomial time test if the idempotent algebra
alg
generates a CD variety from Freese-Valeriote. |
static boolean |
isCongruenceModularIdempotent(SmallAlgebra alg,
ProgressReport report) |
static Term |
joinTerm(SmallAlgebra alg)
Gives a Kearnes-Kiss join term.
|
static Term |
joinTerm(SmallAlgebra alg,
ProgressReport report)
Gives a Kearnes-Kiss join term.
|
static int |
jonssonLevel(SmallAlgebra alg)
If this algebra generates a distributive variety, this returns
the minimal number of Jonsson terms minus 1; otherwise it returns -1,
but it is probably better to use jonssonTerms and get
get the actual terms.
|
static int |
jonssonLevelAux(java.util.List<IntArray> middleZero,
IntArray g0,
IntArray g2) |
static java.util.List<IntArray> |
jonssonLevelPath(java.util.List<IntArray> middleZero,
IntArray g0,
IntArray g2,
boolean alvinVariant)
This finds a path from g0 to g2 in middleZero, a list
of triples, where two triples are connected by an edge if either
their first or third coordinates agree.
|
static java.util.List<Term> |
jonssonTerms(SmallAlgebra alg)
This returns a list of Jonsson terms witnessing distributivity, or
null if the algebra does generate a congruence distributive variety.
|
static java.util.List<Term> |
jonssonTerms(SmallAlgebra alg,
boolean alvinVariant) |
static java.util.List<Term> |
jonssonTerms(SmallAlgebra alg,
boolean alvinVariant,
ProgressReport report)
This returns a list of Jonsson terms witnessing distributivity, or
null if the algebra does generate a congruence distributive variety.
|
static int |
localDistributivityLevel(int a,
int b,
int c,
SmallAlgebra alg)
If \alpha = Cg(a,c) \meet Cg(a,b)
and \beta = Cg(a,c) \meet Cg(b,c) this gives number of alteration
of \alpha and \beta to get from a to c in the join of \alpha and
\beta.
|
static int |
localDistributivityLevel(SmallAlgebra alg)
Find the max level over all triples a, b, c, where,
if \alpha = Cg(a,c) \meet Cg(a,b)
and \beta = Cg(a,c) \meet Cg(b,c) the level is the number of alteration
of \alpha and \beta to get from a to c in the join of \alpha and
\beta.
|
static void |
main(java.lang.String[] args) |
static Term |
majorityTerm(SmallAlgebra alg) |
static Term |
majorityTerm(SmallAlgebra alg,
ProgressReport report) |
static java.util.List<IntArray> |
makeCyclicGens(int[] v) |
static Term |
malcevTerm(SmallAlgebra alg) |
static Term |
malcevTerm(SmallAlgebra alg,
ProgressReport report)
Find a Mal'cev term for (the variety generated by) this algebra or
null if the variety it generates is not permutable.
|
static Term |
markovicMcKenzieSiggersTaylorTerm(SmallAlgebra alg)
Gives a term t(x,y,z,u) satisfying t(y,x,x,x) = t(x,x,y,y) and
t(x,x,y,x) = t(x,y,x,x).
|
static Term |
markovicMcKenzieSiggersTaylorTerm(SmallAlgebra alg,
ProgressReport report)
Gives a term t(x,y,z,u) satisfying t(y,x,x,x) = t(x,x,y,y) and
t(x,x,y,x) = t(x,y,x,x).
|
static Term |
minorityTerm(SmallAlgebra alg) |
static Term |
minorityTerm(SmallAlgebra alg,
ProgressReport report) |
static Term |
nuTerm(SmallAlgebra alg,
int arity)
This will find a near unamimity term of the given arity
if one exits; otherwise it return null.
|
static Term |
nuTerm(SmallAlgebra alg,
int arity,
ProgressReport report)
This will find a near unanimity term of the given arity
if one exits; otherwise it return null.
|
static boolean |
nuTermIdempotent_Bad(SmallAlgebra testalg,
int arity,
ProgressReport report)
Matt Valeriote's implementation of Jonah Horowitz's polynomial
time algorithm to test if an idempotent algebra has an NU term
of
arity variables. |
static boolean |
nuTermIdempotent(SmallAlgebra testalg,
int arity,
ProgressReport report)
Matt Valeriote's implementation of Jonah Horowitz's polynomial
time algorithm to test if an idempotent algebra has an NU term
of
arity variables. |
static java.util.Set<java.lang.Integer> |
omittedIdealIdempotent(SmallAlgebra alg,
ProgressReport report)
The largest order ideal of the poset of TCT types omitted by the
variety generated by
alg . |
static java.util.Set<java.lang.Integer> |
omittedIdealIdempotent(SmallAlgebra alg,
java.util.Set<java.lang.Integer> typesFound,
ProgressReport report)
The largest order ideal of the poset of TCT types omitted by the
variety generated by
alg . |
static int |
permLevelIdempotent(SmallAlgebra alg,
ProgressReport report)
The variety generated by the algebra must be k-permutable for
some k or this won't ever stop.
|
static Term |
pixleyTerm(SmallAlgebra alg)
Find a Pixley term for (the variety generated by) this algebra or
null if there is it is not arithmetical.
|
static Term |
pixleyTerm(SmallAlgebra alg,
ProgressReport report)
Find a Pixley term for (the variety generated by) this algebra or
null if there is it is not arithmetical.
|
static java.util.List<Term> |
primalityTerms(SmallAlgebra alg,
ProgressReport report)
This gives unary terms evaluating to the characteristic
functions of the one element subsets of alg; a term which
applied to these unit vectors gives the identity function; and
a binary term giving a semilattice operation on {0, 1}.
|
static IntArray |
sdIdempotent(SmallAlgebra alg,
ProgressReport report)
This uses Theorem 4.2 of Freese-Valeriote to test if the
algebra omits type 1, 2 and 5; that is, is congruence SD.
|
static IntArray |
sdMeetIdempotent(SmallAlgebra alg,
ProgressReport report)
This uses Theorem 4.3 of Freese-Valeriote to test if the
algebra omits type 1 and 2; that is, is congruence SDmeet.
|
static java.util.List<Term> |
sdmeetTerms(SmallAlgebra alg)
If the variety generated by alg is congruence SD-meet, this returns
a list of either one or three 3-place terms.
|
static java.util.List<Term> |
sdmeetTerms(SmallAlgebra alg,
ProgressReport report)
If the variety generated by alg is congruence SD-meet, this returns
a list of either one or three 3-place terms.
|
static java.util.List<IntArray> |
sdPath(java.util.List<IntArray> subalg,
IntArray g0,
IntArray g2)
This finds a path from g0 to g2 in middleZero, a list
of triples, where two triples are connected by an edge if either
their first or third coordinates agree.
|
static java.util.List<Term> |
sdTerms(SmallAlgebra alg,
ProgressReport report) |
static java.util.List<java.util.Set<java.lang.Integer>> |
typeSetIdempotent(SmallAlgebra alg,
ProgressReport report)
This finds two subsets of the set of types, lower and upper; lower is
the types found in strictly simple algebras in HS(A) union the type set
of A (so the types must contain this).
|
static java.util.Set<java.lang.Integer> |
typesInSofAIdempotent(SmallAlgebra alg,
java.util.Set typesFound,
ProgressReport report)
Find all TCT types occurring in strictly simple algebras in HS(alg).
|
static java.util.Set<java.lang.Integer> |
typesInSofAIRobustDecompdempotent(SmallAlgebra alg,
java.util.Set typesFound,
ProgressReport report)
Find all TCT types occurring in subalgebras of
alg . |
static java.util.Set<java.lang.Integer> |
typesInSofAStrictlySimpleIdempotent(SmallAlgebra alg,
java.util.Set typesFound,
ProgressReport report)
Find all TCT types occurring in strictly simple algebras in HS(
alg ). |
static Term |
weak3EdgeTerm(SmallAlgebra alg,
ProgressReport report)
A finitely generated variety has a Taylor term if and
only if it has a weak 3-edge term.
|
static Term |
weakMajorityTerm(SmallAlgebra alg)
Find a weak majority term for (the variety generated by) this
algebra or null if there is none.
|
static Term |
weakMajorityTerm(SmallAlgebra alg,
boolean isIdempotent)
Find a weak majority term for (the variety generated by) this
algebra or null if there is none using a faster algorithm
if the algebra is idempotent.
|
static Term |
weakNUTerm(SmallAlgebra alg,
int arity)
This will find a near unamimity term of the given arity
if one exits; otherwise it return null.
|
public static Term joinTerm(SmallAlgebra alg)
public static Term joinTerm(SmallAlgebra alg, ProgressReport report)
public static java.util.List<Term> sdmeetTerms(SmallAlgebra alg)
alg
- public static java.util.List<Term> sdmeetTerms(SmallAlgebra alg, ProgressReport report)
public static IntArray sdMeetIdempotent(SmallAlgebra alg, ProgressReport report)
alg
- the algebra, assumed to be idempotentreport
- public static Term markovicMcKenzieSiggersTaylorTerm(SmallAlgebra alg)
public static Term markovicMcKenzieSiggersTaylorTerm(SmallAlgebra alg, ProgressReport report)
public static Term weak3EdgeTerm(SmallAlgebra alg, ProgressReport report)
alg
- report
- public static Term nuTerm(SmallAlgebra alg, int arity)
public static Term nuTerm(SmallAlgebra alg, int arity, ProgressReport report)
public static boolean nuTermIdempotent_Bad(SmallAlgebra testalg, int arity, ProgressReport report)
arity
variables.testalg
- an idempotent algebraarity
- public static boolean nuTermIdempotent(SmallAlgebra testalg, int arity, ProgressReport report)
arity
variables.testalg
- an idempotent algebraarity
- public static Term fixedKEdgeTerm(SmallAlgebra alg, int k, ProgressReport report)
public static boolean fixedKEdgeIdempotent(SmallAlgebra testalg, int level, ProgressReport report)
public static boolean cyclicTermIdempotent(SmallAlgebra alg, int arity)
public static boolean cyclicTermIdempotent(SmallAlgebra alg, int arity, ProgressReport report)
public static java.util.List<IntArray> makeCyclicGens(int[] v)
public static Term weakNUTerm(SmallAlgebra alg, int arity)
public static Term findWeakNUTerm(SmallAlgebra alg, int arity, ProgressReport report)
public static int localDistributivityLevel(int a, int b, int c, SmallAlgebra alg)
public static int localDistributivityLevel(SmallAlgebra alg)
public static Term weakMajorityTerm(SmallAlgebra alg)
public static Term weakMajorityTerm(SmallAlgebra alg, boolean isIdempotent)
public static java.util.List<Term> jonssonTerms(SmallAlgebra alg)
public static java.util.List<Term> jonssonTerms(SmallAlgebra alg, boolean alvinVariant)
public static java.util.List<Term> jonssonTerms(SmallAlgebra alg, boolean alvinVariant, ProgressReport report)
alvinVariant
- interchange even and odd in Jonsson's equationspublic static boolean isCongruenceDistIdempotent(SmallAlgebra alg, ProgressReport report)
alg
generates a CD variety from Freese-Valeriote. It first tests if
there is a Day quadrangle then if there is a failure of SD-meet.alg
- report
- public static boolean isCongruenceModularIdempotent(SmallAlgebra alg, ProgressReport report)
public static java.util.List<Term> sdTerms(SmallAlgebra alg, ProgressReport report)
public static IntArray sdIdempotent(SmallAlgebra alg, ProgressReport report)
alg
- the algebra, assumed to be idempotentreport
- public static java.util.List<IntArray> sdPath(java.util.List<IntArray> subalg, IntArray g0, IntArray g2)
public static java.util.List<IntArray> jonssonLevelPath(java.util.List<IntArray> middleZero, IntArray g0, IntArray g2, boolean alvinVariant)
public static int jonssonLevel(SmallAlgebra alg)
public static int jonssonLevelAux(java.util.List<IntArray> middleZero, IntArray g0, IntArray g2)
public static IntArray findDayQuadrupleInSquare(SmallAlgebra alg, ProgressReport report)
public static boolean dayQuadruple(int a, int b, int c, int d, SmallAlgebra alg)
a
- b
- c
- d
- alg
- public static boolean congruenceModularVariety(SmallAlgebra alg)
alg
- report
- public static boolean congruenceModularVariety(SmallAlgebra alg, ProgressReport report)
alg
- report
- public static boolean congruenceModularForIdempotent(SmallAlgebra alg, ProgressReport report)
alg
generates a CM variety. This seaches
for a Day quadruple in the square of alg
.alg
- report
- public static java.util.List<Term> gummTerms(SmallAlgebra alg)
public static java.util.List<Term> gummTerms(SmallAlgebra alg, ProgressReport report)
public static java.util.List<Term> gummTerms(SmallAlgebra alg, FreeAlgebra free2, ProgressReport report)
public static java.util.List<IntArray> gummLevelPath(java.util.List<IntArray> middleZero, java.util.List<IntArray> firstOne, IntArray g0, IntArray g2)
public static IntArray cpIdempotent(SmallAlgebra alg, ProgressReport report)
alg
- the algebra, assumed to be idempotentreport
- public static boolean fixedKPermIdempotent(SmallAlgebra alg, int level, ProgressReport report)
public static int permLevelIdempotent(SmallAlgebra alg, ProgressReport report)
alg
- report
- public static Term malcevTerm(SmallAlgebra alg)
public static Term malcevTerm(SmallAlgebra alg, ProgressReport report)
public static Term differenceTerm(SmallAlgebra alg)
alg
- public static Term differenceTerm(SmallAlgebra alg, ProgressReport report)
alg
- report
- public static Term majorityTerm(SmallAlgebra alg)
public static Term majorityTerm(SmallAlgebra alg, ProgressReport report)
public static Term minorityTerm(SmallAlgebra alg)
public static Term minorityTerm(SmallAlgebra alg, ProgressReport report)
public static Term pixleyTerm(SmallAlgebra alg)
public static Term pixleyTerm(SmallAlgebra alg, ProgressReport report)
public static java.util.List<Term> hagemannMitschkeTerms(SmallAlgebra alg)
public static java.util.List<Term> hagemannMitschkeTerms(SmallAlgebra alg, ProgressReport report)
k
-permutability, or
null if the algebra does generate a congruence
k
-permutable variety.
It is guarenteed to be the least number of terms possible.public static java.util.List hagemannMitschkeLevelPath(java.util.List sub, IntArray g0, IntArray g2)
public static java.util.List<Term> primalityTerms(SmallAlgebra alg, ProgressReport report)
public static java.util.Set<java.lang.Integer> typesInSofAIdempotent(SmallAlgebra alg, java.util.Set typesFound, ProgressReport report)
alg
- Assumed to be idempotent and nontrivialreport
- public static java.util.Set<java.lang.Integer> typesInSofAIRobustDecompdempotent(SmallAlgebra alg, java.util.Set typesFound, ProgressReport report)
alg
.alg
- Assumed to be idempotent and nontrivialreport
- public static java.util.Set<java.lang.Integer> typesInSofAStrictlySimpleIdempotent(SmallAlgebra alg, java.util.Set typesFound, ProgressReport report)
alg
).alg
- Assumed to be idempotentreport
- public static java.util.List<java.util.Set<java.lang.Integer>> typeSetIdempotent(SmallAlgebra alg, ProgressReport report)
public static java.util.Set<java.lang.Integer> omittedIdealIdempotent(SmallAlgebra alg, java.util.Set<java.lang.Integer> typesFound, ProgressReport report)
alg
.alg
- typesFound
- the types found in subalgebras of alg
.report
- public static java.util.Set<java.lang.Integer> omittedIdealIdempotent(SmallAlgebra alg, ProgressReport report)
alg
.public static java.util.List<BasicSet> cubeTermBlockerIdempotent(SmallAlgebra alg, ProgressReport report)
alg
- report
- public static boolean cubeTermBlockerIdempotent(SmallAlgebra alg, BasicSet C, BasicSet D)
public static int cubeTermBlockerIdempotent(Operation op, BasicSet C, BasicSet D)
op
- C
- D
- public static boolean cubeTermBlockerIdempotent(Operation op, int j, BasicSet C, BasicSet D)
op
- the operation to testj
- the coord to testC
- the smaller subuniverseD
- the large subuniversepublic static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
Copyright 2003 Ralph Freese. All Rights Reserved.