%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  An easy test for congruence modularity.
%  January 2011
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt]{amsart}
\usepackage{amsmath,amsthm,amsfonts,latexsym,amssymb,amscd,color}
\usepackage{chemarr}
\usepackage{color}
\pagestyle{headings}
%
\setlength{\textwidth}{36true pc}
\setlength{\headheight}{8true pt} % needed for 12pt documents
\setlength{\oddsidemargin}{0 truept}
\setlength{\evensidemargin}{0 truept}
\setlength{\textheight}{572true pt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%   ENVIRONMENTS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% \theoremstyle{plain} %% This is the default
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lm}[thm]{Lemma}
\newtheorem{prp}[thm]{Proposition}
\newtheorem{clm}[thm]{Claim}
\newtheorem*{clm*}{Claim}
%
\theoremstyle{definition}
\newtheorem{df}[thm]{Definition}
\newtheorem{dfs}[thm]{Definitions}
\newtheorem{exmp}[thm]{Example}
\newtheorem{prb}[thm]{Problem}
\newtheorem{quest}[thm]{Question}
%
\theoremstyle{remark}
\newtheorem{rem}[thm]{Remark}
%
\numberwithin{equation}{section}
%
\newcommand{\thref}[1]{Theorem~\ref{#1}}
\newcommand{\secref}[1]{\S\ref{#1}}
\newcommand{\lmref}[1]{Lemma~\ref{#1}}
%
\newcommand{\sprf}{\noindent{\it Proof.}} %used in spf environment
\newcommand{\sqed}{\hfill\rule{1.3mm}{3mm}\medskip}
\newenvironment{spf}{\sprf }{\sqed}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Logical symbols
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareMathOperator{\satf}{\models}
\DeclareMathOperator{\miff}{\Longleftrightarrow} 
                                           % math `if and only if'
\DeclareMathOperator{\mimplies}{\Longrightarrow} 
                                           % math `implies'
\DeclareMathOperator{\mimplied}{\Longleftarrow}  
                                           % math `implied by'
\newcommand{\set}[2]{\{#1\mid\nobreak\text{#2}\}} % { x | ... }
\DeclareMathOperator{\id}{\textsl{id}}     % The identity map
\DeclareMathOperator{\miffdef}{\stackrel{def}{\miff}}
                                           % defining iff
\DeclareMathOperator{\eqdef}{\stackrel{def}{=}}
                                           % defining equation

\DeclareMathOperator{\neareq}{\stackrel{\ae}{=}}
\DeclareMathOperator{\aeqv}{\stackrel{ae}{\equiv}}
\DeclareMathOperator{\aeq}{\stackrel{ae}{=}}
\newcommand{\labelledarrow}[1]{%
\stackrel{#1}{\longrightarrow}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Classical math
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareMathOperator{\BN}{\mathbb{N}} % nonnegative integers
\DeclareMathOperator{\BZ}{\mathbb{Z}} % integers
\DeclareMathOperator{\BQ}{\mathbb{Q}} % rationals
\DeclareMathOperator{\BR}{\mathbb{R}} % reals
\DeclareMathOperator{\BC}{\mathbb{C}} % complex numbers
\DeclareMathOperator{\re}{Re}         % real part
\DeclareMathOperator{\im}{im}         % imaginary part
%\DeclareMathOperator{\im}{Im}         % imaginary part
\DeclareMathOperator{\Ker}{Ker}
%
\DeclareMathOperator{\meet}{\wedge}
\DeclareMathOperator{\join}{\vee}
\DeclareMathOperator{\persu}{\nearrow}
\DeclareMathOperator{\persd}{\searrow}
\DeclareMathOperator{\union}{\cup}
\DeclareMathOperator{\inter}{\cap}  % intersection
\DeclareMathOperator{\iso}{\cong}   % isomorphic
\DeclareMathOperator{\piso}{\simeq} % polynomially isomorphic
\newcommand{\Star}{^ *}
\DeclareMathOperator{\compose}{{\scriptstyle \circ}} % f o g
%
\newcommand{\wec}[1]{{\mathbf{#1}}}  % notation for vectors in algebras
%\newcommand{\wec}[1]{{\bar{#1}}} % which one do you prefer?
\newcommand{\wrel}[1]{\;#1\;}     % a\wrel{\alpha}b = a \alpha b
%              % this provides a flexible way to change the spacing
%
%\newcommand{\wrel}[1]{{\def\wrelarg{\qopname\relax{no}{#1}}\wrelarg}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Operators on algebras
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  \m is used to produce models (algebras) as follows:
%  typing `\m a'  produces in bold face, A.
%  \vr does the same for varieties
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\m}[1]{{\mathbf{\uppercase{#1}}}}
\newcommand{\vr}[1]{{\mathcal{\uppercase {#1}}}}
%
\DeclareMathOperator{\Var}{\mathsf{V}}
\DeclareMathOperator{\Ho}{\mathsf{H}}
\DeclareMathOperator{\Su}{\mathsf{S}}
\DeclareMathOperator{\Sub}{\mathsf{S}}
\DeclareMathOperator{\Pd}{\mathsf{P}}
\DeclareMathOperator{\Iso}{\mathsf{I}}
\DeclareMathOperator{\Ps}{\Pd_s}
\DeclareMathOperator{\Kluk}{\mathsf{K}}
\DeclareMathOperator{\twin}{Tw}
\newcommand{\fin}[1]{{\mathsf{#1}}_{\text{\upshape fin}}}
%
\DeclareMathOperator{\Pol}{Pol}
\DeclareMathOperator{\Clo}{Clo}
\DeclareMathOperator{\Con}{Con}
\DeclareMathOperator{\Conb}{\mathbf{Con}} % Con(A) as a lattice
\DeclareMathOperator{\cg}{Cg}
\DeclareMathOperator{\sg}{Sg}
\DeclareMathOperator{\cs}{\#} % Congruence size
\DeclareMathOperator{\chs}{c} % Chief factor size
\newcommand{\Cg}[1]{{\cg}^{\m{#1}}}
\newcommand{\Sg}[1]{{\sg}^{\m{#1}}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  macros for tame congruence theory.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\M}[3]{\text{\upshape M}_{\m{#1}} (#2, #3)}
\newcommand{\minl}[1]{\text{\upshape Min}_{\m{#1}}}
%
\DeclareMathOperator{\typ}{typ}
\DeclareMathOperator{\ann}{ann}
\DeclareMathOperator{\Sep}{Sep}
\DeclareMathOperator{\ssb}{ssb}
\DeclareMathOperator{\sst}{sst}
%
\DeclareMathOperator{\utyp}{\mathbf{1}}% unary      
\DeclareMathOperator{\atyp}{\mathbf{2}}% affine     
\DeclareMathOperator{\btyp}{\mathbf{3}}% boolean    
\DeclareMathOperator{\ltyp}{\mathbf{4}}% lattice    
\DeclareMathOperator{\styp}{\mathbf{5}}% semilattice
\DeclareMathOperator{\ityp}{\mathbf{i}}
\DeclareMathOperator{\jtyp}{\mathbf{j}}
%
\DeclareMathOperator{\solv}{\stackrel{s}{\sim}}
\DeclareMathOperator{\ssolv}{\stackrel{ss}{\sim}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  Abbreviations
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand{\bd}{\begin{description}}
\newcommand{\ed}{\end{description}}
%
\newcommand{\lb}{\langle} % <...>
\newcommand{\rb}{\rangle}
\newcommand{\lv}{{[\![}}  % [[...]]
\newcommand{\rv}{{]\!]}}
%
\newcommand{\ul}{\underline}
\newcommand{\ol}{\overline}
%
\newcommand{\vep}{\varepsilon}
\newcommand{\di}{\diamond}
\newcommand{\mult}{\diamond}
\newcommand{\N}[1]{{\m n}_{#1}}


\newcommand{\dd}{{\bf d}}
\newcommand{\Aut}{\textrm{Aut}}
\newcommand{\transpose}{{\sf T}}
\newcommand{\F}{{F}}
%\newcommand{\F}{{\sf P}}
\newcommand{\C}{{\mathsf C}}
\newcommand{\U}{{\mathsf U}}

\newcommand{\crit}{{\rm crit}}
\newcommand{\supp}{{\rm supp}}

%\newcommand{\var}[1]{{\mathbf{\uppercase{#1}}}}
\newcommand{\var}[1]{{\mathsf{\uppercase{#1}}}}

\begin{document}

\title{An Easy Test For Congruence Modularity}

\thanks{This material is based upon work supported by
the Hungarian National Foundation for Scientific Research (OTKA)
grant no.\ K77409.
}

\author{Topaz Dent}
\address[Topaz Dent]{Department of Mathematics\\
University of Colorado\\
Boulder, CO 80309-0395\\
USA}
\email{Topaz.Dent@Colorado.EDU}

\author{Keith A. Kearnes}
\address[Keith Kearnes]{Department of Mathematics\\
University of Colorado\\
Boulder, CO 80309-0395\\
USA}
\email{Keith.Kearnes@Colorado.EDU}

\author{\'Agnes Szendrei}
\address[\'Agnes Szendrei]{Department of Mathematics\\
University of Colorado\\
Boulder, CO 80309-0395\\
USA}
\email{Agnes.Szendrei@Colorado.EDU}
\subjclass{}
\keywords{}

\begin{abstract}
We describe an easy way to determine whether the realization
of a set of idempotent identities guarantees congruence
modularity or the satisfaction of a nontrivial congruence
identity. Our results yield slight strengthenings of Day's
Theorem and Gumm's Theorem, which each characterize congruence modularity.
\end{abstract}

\maketitle

\section{Introduction}\label{intro_sec}
Given a set $\Sigma$ of identities,
how does one determine whether the variety axiomatized
by $\Sigma$ is congruence modular?
One natural approach is to look for Day terms
(see \cite{day} or Theorem~\ref{day_thm} below).
In this paper we will exhibit an easier method,
which works when $\Sigma$ is a set
of \emph{idempotent} identities. 
By this, we mean that for every function symbol
$F$ appearing in $\Sigma$, it is the case that 
$
\Sigma\models F(x,\ldots,x)\approx x.
$

For a set $\Sigma$ of idempotent identities we shall define 
the notion of a \emph{derivative}, $\Sigma^\prime$,
which is a superset of idempotent identities in the same language.
One of our main theorems is that 
$\Sigma$ axiomatizes a congruence modular variety
if and only if 
the derivative of $\Sigma$ is inconsistent.
Our other main theorem is that 
$\Sigma$ axiomatizes a variety that satisfies some
nontrivial congruence identity 
if and only if 
its $n$-th derivative is inconsistent
for some $n$. 
(In fact, we prove our results
not only for the
variety $\mathcal V$ axiomatized by $\Sigma$, but also
any variety that ``interprets $\mathcal V$''.)

\section{Definitions}

Let $\Sigma$ be a set of identities. 
$\Sigma$ is \emph{inconsistent} if 
$\Sigma\models x\approx y$, otherwise
$\Sigma$ is \emph{consistent}.
$\Sigma$ is \emph{idempotent} if 
for every function symbol $F$ appearing in $\Sigma$
it is the case that 
$
\Sigma\models F(x,x,\ldots,x)\approx x.
$
$F$ is \emph{weakly independent
of its first variable} if 
$\Sigma\models F(y,\wec{w})\approx x$ for variables
$x\neq y$ and some sequence of 
not necessarily distinct variables $\wec{w}$.
$F$ is 
\emph{independent of its first variable}
if 
$\Sigma\models F(x,\wec{z})\approx F(y,\wec{z})$,
where $x$, $y$, and all variables in the sequence $\wec{z}$
are distinct.
Define independence and weak independence
of each of the other variables in the same way.
(If $\Sigma$ is idempotent and $F$ is 
independent of its first variable, then 
$F$ is weakly
independent of its first variable.
This is because the assumptions that 
$\Sigma$ is idempotent and some $F$ is 
independent of its first variable yield
$\Sigma\models F(y,x,x,\ldots,x)\approx F(x,x,x,\ldots,x)\approx x$,
which suffices to show that $F$ is weakly independent of its first variable.)
The concepts of weak independence and ordinary independence
are defined relative to $\Sigma$, so when it is not obvious
we will specify explicitly which set $\Sigma$ is involved.

$\Sigma$ is \emph{realized}
by an algebra $\m a$ (or variety $\mathcal V$)
if it is possible to 
interpret each function symbol appearing in $\Sigma$
as a term of $\m a$ (respectively $\mathcal V$) such that all identities
in $\Sigma$ are satisfied by $\m a$ (respectively $\mathcal V$).

Let $\Sigma$ be a set of idempotent identities, 
and let $\mathcal P$ be the set of pairs $(F,i)$
where $F$ is a function symbol
appearing in $\Sigma$ that is weakly independent 
of its $i$-th variable. The
\emph{derivative} $\Sigma^{\prime}$
of $\Sigma$ is the set of identities
obtained by adding to $\Sigma$ all identities
asserting that $F$ is independent of its $i$-th variable
for all pairs $(F,i)\in \mathcal P$.
(I.e., $\Sigma^{\prime}$ strengthens each 
instance of weak independence
to an instance of independence.)
The $n$-th derivative of $\Sigma$ is denoted
$\Sigma^{(n)}$.

For example, if $\Sigma$ is the set
consisting of the two identities
(i) $F(y,y,x)\approx x$ and (ii) $F(x,y,y)\approx x$,
then from (i) we derive that 
$F$ is weakly independent of its first and second variable,
while from (ii) we derive that 
$F$ is weakly independent of its second and third variable.
Hence $\Sigma^{\prime}$ will contain identities
(iii) $F(x,z_2,z_3)\approx F(y,z_2,z_3)$, 
(iv) $F(z_1,x,z_3)\approx F(z_1,y,z_3)$ and 
(v) $F(z_1,z_2,x)\approx F(z_1,z_2,y)$,
which assert that $F$ is independent of all of its variables.
In this example, $\Sigma^{\prime}$ is inconsistent, since
$\Sigma^{\prime}\models 
x\approx
F(x,y,y)\approx F(y,y,y) \approx y$,
where the first instance of $\approx$ is from $\Sigma$,
the second follows from (iii) by variable replacement,
and the third follows from (i) by variable replacement.

\section{Testing for congruence modularity}

In the introduction we raised the question
of how to determine whether
the variety axiomatized by a set of identities 
$\Sigma$ is congruence modular. Rather than consider 
the variety axiomatized by $\Sigma$ we shall 
consider varieties that realize $\Sigma$, since this is more general.
(The variety axiomatized by $\Sigma$ also realizes $\Sigma$,
since we may interpret each function symbol 
appearing in $\Sigma$ as itself.) This generalization
is important, because it offsets our requirement that
$\Sigma$ be idempotent. Namely, if we state our results
for varieties \emph{axiomatized} by idempotent $\Sigma$,
then we only characterize congruence modularity for 
idempotent varieties; but if we state our results
for varieties that \emph{realize} idempotent $\Sigma$, then we characterize
all congruence modular varieties. 

We start with Alan Day's characterization of congruence modularity.

\begin{thm}\label{day_thm}
{\rm \cite{day}}
The following are equivalent for a variety $\mathcal V$.
\begin{enumerate}
\item
$\mathcal V$ is congruence modular.
\item
There exist $4$-variable terms $m_0,\ldots,m_n$ such that the 
following identities hold in $\mathcal V$:
\begin{enumerate}
\item
$m_0(x,u,v,y)\approx x$ and $m_n(x,u,v,y)\approx y$,
\item
$m_i(x,y,y,x)\approx x$,
\item
$m_i(x,u,u,y)\approx m_{i+1}(x,u,u,y)$ for $i$ odd, and
\item
$m_i(x,x,y,y)\approx m_{i+1}(x,x,y,y)$  for $i$ even.
\end{enumerate}
\end{enumerate}
\end{thm}

From this we derive our first main result.

\begin{thm}\label{main1}
$\mathcal V$ is congruence modular
if and only if $\mathcal V$ realizes 
some set
$\Sigma$ of idempotent identities whose derivative
is inconsistent.
\end{thm}

\begin{proof}

[$\Rightarrow$]
Assume that $\mathcal V$ is congruence modular, and
that $\Sigma$ is the set of identities
guaranteed by Theorem~\ref{day_thm}.
The identities in part (2)(b) suffice to guarantee that this is a set
of idempotent identities. Moreover, the identities of type (2)(b)
suffice to guarantee that $\Sigma^{\prime}$ will contain identities
expressing that each $m_i(x,u,v,y)$ is independent
of its middle two variables. In light of this,
the identities of type (2)(c) and (2)(d) together assert
that 
$\Sigma^{\prime}\models m_i(x,\ast,\ast,y)\approx m_{i+1}(x,\ast,\ast,y)$
for all $i$,
where the asterisks indicate that the identity
holds for any middle values. This and (2)(a) yield
\[
\Sigma^{\prime}\models 
x\approx 
m_0(x,\ast,\ast,y)\approx 
m_1(x,\ast,\ast,y)\approx \cdots\approx
m_n(x,\ast,\ast,y)\approx y,
\] 
so
$\Sigma^{\prime}$ is inconsistent.

[$\Leftarrow$]
Conversely, assume that there is a variety 
$\mathcal V$ realizing $\Sigma$
that is not congruence modular.
We need to prove that $\Sigma^{\prime}$ is consistent.
Without loss of generality we may assume that $\mathcal V$
is the 
variety axiomatized by $\Sigma$.
For, if 
$\mathcal V$ contains an algebra $\m a$ whose congruence
lattice is nonmodular, then the reduct of $\m a$
to the symbols in $\Sigma$ is an algebra in the variety
axiomatized by $\Sigma$ whose congruence
lattice is nonmodular.

Now we follow Day's proof of Theorem~\ref{day_thm},
and show how to extract a nontrivial model of $\Sigma^{\prime}$
from a failure of congruence modularity.
Let $\m f = \m f_{\mathcal V}(a,b,c,d)$ be a $4$-generated
$\mathcal V$-free algebra. Define congruences
\[
\alpha = \theta((a,b),(c,d)),\,
\beta = \theta((a,d),(b,c)),\, \text{\rm and }
\gamma = \theta(b,c).
\]
Day's theorem
proves that $\mathcal V$ is congruence modular
if and only if 
\begin{equation}\label{mod}
\beta = (\alpha\wedge\beta)\vee\gamma.
\end{equation}

Since $\mathcal V$ is idempotent, we can simplify the situation.
Let $\m t = \m f_{\mathcal V}(r, s)$ be a $2$-generated 
$\mathcal V$-free algebra. The congruences 
$\alpha$ and $\beta$ are the kernels of the homomorphisms
$A, B\colon \m f\to \m t$ defined by 
$A\colon a, b\mapsto r; c, d\mapsto s$
and $B\colon a, d\mapsto r; b, c\mapsto s$.
Hence $\alpha\wedge\beta$ is the kernel of the 
homomorphism 
\[A\times B\colon \m f\to \m t^2\colon 
a\mapsto (r,r);\,
b\mapsto (r,s);\, 
c\mapsto (s,s);\, 
d\mapsto (s,r). 
\]
$A\times B$ is surjective, since if 
$p = p(r,s)$ and $q=q(r,s)\in T$ are arbitrarily chosen, then
$m = p(q(a,b),q(d,c))\in F$ is an element such that 
$(A\times B)(m)=(p,q)$. The kernel of 
$A\times B$
is $\alpha\wedge \beta$, so 
\begin{equation}\label{isom}
\m f/(\alpha\wedge \beta)\cong \m t^2.
\end{equation}
Since both sides of (\ref{mod}) contain
$\alpha\wedge \beta$, we can express Day's conclusion
in terms of the algebra $\m t^2$. If $\eta_1$ and $\eta_2$ are 
the coordinate projection kernels of $\m t^2$, then 
$\eta_1$ corresponds to $\alpha/(\alpha\wedge\beta)$
and $\eta_2$ corresponds to $\beta/(\alpha\wedge\beta)$
under the isomorphism (\ref{isom}), 
and $\delta = \theta((r,s),(s,s))$ 
corresponds to $\gamma/(\alpha\wedge\beta)$.
Day's conclusion is that $\mathcal V$ is congruence
modular if and only if $\eta_2 = \delta$.
Since we are assuming that $\mathcal V$
is not congruence modular, and since 
$\eta_2$ contains $\delta$ by definition, 
it follows that
$((r,r),(s,r))\in\eta_2\setminus\delta$.


Since $\mathcal V$ is idempotent, each congruence class
is a subuniverse of $\m t^2$.
Let $\m g\leq \m t^2$ be the subalgebra whose universe
is the $\eta_2$-class of $(r,r)$. 
We argue that the nontrivial algebra 
$\overline{\m g}=\m g/{\delta|_G}$ 
is a model of $\Sigma^{\prime}$.

Let $F$ be an $n$-place 
function symbol appearing in $\Sigma$ and suppose that
\begin{equation}\label{weak}
\Sigma\models F(y,\wec{w})\approx x
\end{equation}
where $x\neq y$ and 
$\wec{w}$ is a sequence of not necessarily distinct 
variables. 
Let $U\subseteq \{1,\ldots,n\}$ be the set
of places of $F$ where
$x$ occurs in this identity.

\begin{clm}\label{prime_clm}
Choose any $(g_1,r),\ldots, (g_n,r)\in G$.
Define 
\[
r_i = \begin{cases}
r & \text{\rm if $i\in U$};\\
s & \text{\rm else.}
\end{cases}
\]
Then 
\begin{equation}\label{switch}
F^{\m t^2}((g_1,r),\ldots, (g_n,r)) =
F^{\m t^2}((g_1,r_1),\ldots, (g_n,r_n)).
\end{equation}
\end{clm}

That both sides of (\ref{switch}) are equal 
in the first coordinate is trivial. In the second
coordinate we must establish that the value on the left-hand side,
which is 
$F^{\m t}(r,\ldots, r) = r$, is the same as the value 
$F^{\m t}(r_1,\ldots, r_n)$
on the right-hand side, which is
obtained
by evaluating $F^{\m t}$ on an $\{r,s\}$-tuple with $r$'s
substituted in position $i$ for each $i\in U$\and $s$'s substituted in all other
positions. This follows from (\ref{weak}).

\begin{clm}\label{congruent}
For any $w\in T$, $((w,s),(s,s))\in\delta$.
\end{clm}

If $w(x,y)$ is a binary term such that 
$w = w(r,s)$, then 
\[
(w,s) = (w(r,s),w(s,s)) = w((r,s),(s,s))
\equiv_{\delta} w((s,s),(s,s)) = (s,s).
\]

\medskip


Now we prove that $F$ is independent of its first variable
modulo $\delta$ on $\m g$.
Choose $(g_1,r), \ldots, (g_n,r), (h,r)\in G$ arbitrarily.
By Claim~\ref{prime_clm}, 
\[
F^{\m t^2}((g_1,r), (g_2,r), \ldots, (g_n,r)) = 
F^{\m t^2}((g_1,r_1), (g_2,r_2), \ldots, (g_n,r_n)),
\]
and similarly
\[F^{\m t^2}((h,r), (g_2,r), \ldots, (g_n,r)) = 
F^{\m t^2}((h,r_1), (g_2,r_2), \ldots, (g_n,r_n)).
\]
Now $r_1=s$,
since $1\notin U$ according to (\ref{weak}),
so by Claim~\ref{congruent}
we have $(g_1,s)\equiv_{\delta} (h,s)$.
Therefore 
\[
\begin{array}{rl}
F^{\m t^2}((g_1,r), (g_2,r), \ldots, (g_n,r)) &=
F^{\m t^2}((g_1,s), (g_2,r_2), \ldots, (g_n,r_n))\\
&\equiv_{\delta} 
F^{\m t^2}((h,s), (g_2,r_2), \ldots, (g_n,r_2))\\
&=F^{\m t^2}((h,r), (g_2,r), \ldots, (g_n,r)).
\end{array}
\]
This proves that $F$ is independent of its first variable 
modulo $\delta$ on $G$, so 
\[
\m g/{\delta|_{\m g}}\models F(x,\wec{z})\approx F(y,\wec{z})
\]
where $x$, $y$, and all variables in the sequence $\wec{z}$
are distinct.
\end{proof}

\begin{cor}
Day's Theorem (Theorem~\ref{day_thm}) remains true 
if one weakens 
\begin{enumerate}
\item[(c)\hphantom{${}''$}]
$m_i(x,u,u,y)\approx m_{i+1}(x,u,u,y)$ for $i$ odd,
\end{enumerate}
to either
\begin{enumerate}
\item[(c)$'$\hphantom{${}'$}]
$m_i(x,x,x,y)\approx m_{i+1}(x,x,x,y)$ for $i$ odd, or
\item[(c)$''$]
$m_i(x,y,y,y)\approx m_{i+1}(x,y,y,y)$ for $i$ odd.
\end{enumerate}
In particular, congruence modularity can be characterized 
by identities involving only the variables $x$ and $y$.
\end{cor}

\begin{proof}
We can obtain (c)$'$ and (c)$''$ from (c) by replacing
the variable $u$ by either $x$ or $y$, 
so (c)$'$ and (c)$''$ are formally weaker than (c).
If you take $\Sigma$ to be the set of identities 
of Theorem~\ref{day_thm} with (c) replaced by either 
(c)$'$ or (c)$''$, then $\Sigma^{\prime}$ is inconsistent
by the same argument used in the proof of direction [$\Rightarrow$] 
of Theorem~\ref{main1}.
Thus, the weakened identities still imply congruence modularity.

For the last statement of the corollary, we can delete the terms
$m_0$ and $m_n$ from the list of Day terms and just use $x$
and $y$ in their place. Then, with (c) replaced by either
(c)$'$ or (c)$''$, the identities involve only $x$ and $y$.
\end{proof}

We believe that the first 
published proof that congruence 
modularity can be characterized by 2-variable identities
appears in \cite{nation} by J.~B.~Nation (see the corollary
on page 85 of that paper). Nation's 2-variable
identities use $5$-variable terms. 


\begin{exmp}
A lattice is \emph{$p$-modular} if it satisfies the identity
\begin{equation}\label{eg}
(x\vee (y\wedge z))\wedge (z\vee (y\wedge x)) = 
(z\wedge (x\vee (y\wedge z)))\vee
(x\wedge (z\vee (y\wedge x))).
\end{equation}
This identity is satisfied by all modular lattices
and some nonmodular lattices. (It is the conjugate 
identity for a 10-element splitting lattice.)

Eva Gedeonov\'a characterized the satisfaction
of (\ref{eg}) as a congruence identity with the following theorem.

\begin{thm}\label{evaG}
{\rm \cite{eva}}
The following are equivalent for a variety $\mathcal V$.
\begin{enumerate}
\item
$\mathcal V$ satisfies (\ref{eg}) as a congruence identity.
\item
There exist 6-variable terms $g_0,\ldots,g_n$ such that the 
following identities hold in $\mathcal V$:
\begin{enumerate}
\item
$g_0(x,s,t,u,v,y)\approx x$ and $g_n(x,s,t,u,v,y)\approx y$,
\item
$g_i(x,x,y,y,x,x)\approx g_{i}(x,y,x,x,y,x)\approx x$ for all $i$,
\item
$g_i(x,s,x,y,s,y)\approx g_{i+1}(x,s,x,y,s,y)$ for $i$ odd, and
\item
$g_i(x,x,s,s,y,y)\approx g_{i+1}(x,x,s,s,y,y)$ for $i$ even.
\end{enumerate}
\end{enumerate}
\end{thm}

Although the $p$-modular law is strictly weaker than the modular
law as a lattice identity, Day was 
able to show in \cite{day-p}
that any variety realizing the set 
$\Sigma$ of identities
of Theorem~\ref{evaG}~(2) is congruence modular.
His argument involved nonobvious calculations
with the congruences of the 4-generated free algebra
in a variety realizing these identities.

We will derive Day's result from our Theorem~\ref{main1}.
Gedeonov\'a's identity (b)
implies that $\Sigma$ is idempotent, hence our theorem applies.
Identity  (b) also implies that each $g_i$ is weakly 
independent of its middle four variables relative to $\Sigma$.
Hence
\[
\Sigma^{\prime}\models x
\stackrel{{\rm (a)}}{\approx} 
g_0(x,\ast,\ast,\ast,\ast,y)
\stackrel{{\rm (d)}}{\approx} 
g_1(x,\ast,\ast,\ast,\ast,y)
\stackrel{{\rm (c)}}{\approx} 
\cdots
\approx
g_n(x,\ast,\ast,\ast,\ast,y)
\stackrel{{\rm (a)}}{\approx} 
y.
\]
$\Sigma^{\prime}$ is inconsistent, so
any congruence $p$-modular variety is congruence
modular.
\end{exmp}

\begin{exmp}
The paper \cite{bimmvw} introduces the concept of a 
``cube term'', which 
is a common generalization of a Maltsev term and 
a near unanimity term.
A cube term is a term $F(x_1,\ldots,x_n)$,
for some $n\geq 3$, satisfying an idempotent set of identities
$\Sigma$ which expresses exactly that $F$ is weakly
independent of each of its variables.

It is proved in \cite{bimmvw} that a variety with
a cube term (i.e., a variety realizing $\Sigma$) 
is congruence modular. The method of proof is to show first
that a variety with a cube term has an ``edge term'', 
and then that a variety with an edge term has Day terms.
The first step of the proof is long ($\approx 5$ journal pages)
and highly nontrivial. The second step is short and easy to verify, 
but it is easy to imagine that it required ingenuity to discover.

We can prove the combination of both steps with no ingenuity.
Since $\Sigma$ asserts that $F$ is weakly independent
of all variables, $\Sigma^{\prime}$ expresses that $F$ is constant.
At the same time, $\Sigma^{\prime}$ expresses that $F$ is idempotent
(since $\Sigma^{\prime}\supseteq \Sigma$). 
Thus $\Sigma^{\prime}$ proves that $F(x,x,\ldots,x)$ 
interprets simultaneously as a constant function and as the identity
function on any algebra realizing $\Sigma$. It follows
that $\Sigma^{\prime}$ has no models of size greater than one.
Hence Theorem~\ref{main1} applies,
showing that any variety realizing $\Sigma$ is congruence modular.
\end{exmp}

\begin{exmp}
A variety is congruence $n$-permutable if,
for any two congruences $\alpha$ and $\beta$
on any algebra $\m a\in {\mathcal V}$, it is the case
that the $(n-1)$-fold relational product
$\alpha\circ_{n-1}\beta$  equals $\beta\circ_{n-1}\alpha$.
This property was characterized by J.~Hagemann and A.~Mitschke
in the following way.

\begin{thm}\label{hag-mit}
{\rm \cite{hagemann-mitschke}}
The following are equivalent for a variety $\mathcal V$.
\begin{enumerate}
\item
$\mathcal V$ is congruence $n$-permutable.
\item
There exist $3$-variable terms $p_0,\ldots,p_n$ such that the 
following identities hold in $\mathcal V$:
\begin{enumerate}
\item
$p_0(x,u,y)\approx x$ and $p_n(x,u,y)\approx y$,
\item
$p_i(x,x,y)\approx p_{i+1}(x,y,y)$ for all $i$. 
\end{enumerate}
\end{enumerate}
\end{thm}

Bjarni J\'onsson proved in \cite{jonsson0} 
that any congruence 3-permutable variety is
congruence modular. On the other hand, there exist congruence
4-permutable varieties that are not congruence modular.
The first of these statements can be proved by a computation,
but we derive it from Theorem~\ref{main1}.

A congruence 3-permutable variety realizes 
\[\Sigma = \{x\approx p_1(x,y,y),\ 
p_1(x,x,y)\approx p_2(x,y,y),\ 
p_2(x,x,y)\approx y\}.\] 
$\Sigma^{\prime}$ contains $\Sigma$
along with (i)~identities asserting
that $p_1$ is independent of its second and third variables
(from the first identity of $\Sigma$)
and (ii)~identities asserting
that $p_2$ is independent of its first and second variables
(from the third identity of $\Sigma$).
Hence
\[
\Sigma^{\prime}\models x
\stackrel{\Sigma}{\approx} p_1(x,y,y)
\stackrel{\rm (i)}{\approx} p_1(x,x,y)
\stackrel{\Sigma}{\approx} p_2(x,y,y)
\stackrel{\rm (ii)}{\approx} p_2(x,x,y)
\stackrel{\Sigma}{\approx} y,
\]
showing that $\Sigma^{\prime}$ is inconsistent.

It can also be proved from Theorem~\ref{main1} that 
congruence 4-permutability does \emph{not} imply congruence
modularity. For this one must show that if
\begin{align*}
\Sigma = \{x\approx p_1(x,y,y),\ {} 
&p_1(x,x,y)\approx p_2(x,y,y),\\
&p_2(x,x,y)\approx p_3(x,y,y),\ {}
p_3(x,x,y)\approx y\},
\end{align*}
then $\Sigma^{\prime}$ is consistent. 
For this it is necessary that we identify \emph{all}
instances of weak independence in order to 
construct $\Sigma^{\prime}$, and then 
to show that $\Sigma^{\prime}\not\models x\approx y$.
Both of these can be accomplished in a mechanical way
with the help of David Kelly's Completeness Theorem, described in 
\cite{kelly,kearnes-kiss-szendrei}. We do not include the details here.
\end{exmp}

\begin{exmp}\label{bentz_ex}
In \cite{bentz}, Wolfram Bentz investigated varieties
$\mathcal V$ whose $T_0$ topological algebras are Hausdorff.
It is conjectured that these varieties are exactly
the congruence modular varieties that are congruence
$n$-permutable for some $n$. (This conjecture,
called ``the congruence modularity conjecture'', is still open.)

Let $\Sigma_1$ be the set consisting of the following identities
involving the 3-variable terms $q_1, q_2, p$:
\begin{enumerate}
\item
$x\approx q_1(x,y,y)$,
\item
$q_1(x,x,y)\approx q_2(x,x,y)$,
\item
$q_2(x,y,x)\approx x$ and
$q_2(x,y,y)\approx p(x,y,y)$,
\item
$p(x,x,y)\approx y$.
\end{enumerate}
(These are the Gumm identities for congruence
modularity, from \cite{gumm}, for $n=2$
\emph{minus}
the Gumm identity $q_1(x,y,x)\approx x$.)
Now let ${\mathcal P}_n$ be the set of identities
listed in Theorem~\ref{hag-mit}~(2).
Bentz proved that any variety realizing 
$\Sigma_1\cup {\mathcal P}_n$, for any given $n$, has the property
that its $T_0$ topological algebras are Hausdorff.
In light of the congruence modularity conjecture, 
this led him to raise the question of whether
varieties realizing $\Sigma_1\cup {\mathcal P}_n$ 
must be congruence modular.

The question raised by Bentz was answered in \cite{kearnes-sequeira},
where it was shown that any variety realizing $\Sigma_1$ must already
be congruence modular. The proof was accomplished by defining
\begin{align*}
m_0(x, u, v, y) &:= x,\\
m_1(x, u, v, y) &:= x,\\
m_2(x, u, v, y) &:= q_1(x, q_2(x, v, u), p(x, u, v)),\\
m_3(x, u, v, y) &:= q_2(x, u, y),\\
m_4(x, u, v, y) &:= q_2(x, v, y),\\
m_5(x, u, v, y) &:= p(u, v, y),\\
m_6(x, u, v, y) &:= y,
\end{align*}
and showing that it is provable from $\Sigma_1$ that
the Day identities of Theorem~\ref{day_thm}
hold for these new terms.

Here we give a different proof that any variety 
realizing $\Sigma_1$ is congruence modular, based
on Theorem~\ref{main1}. Identities (1), (3) and (4) 
from the definition of $\Sigma_1$ 
suffice to prove that $\Sigma_1$ is idempotent,
so the theorem applies. Identity (1) shows that 
$q_1$ is weakly independent of its last two variables
relative to $\Sigma_1$; 
identity (3) shows that 
$q_2$ is weakly independent of its middle variable
relative to $\Sigma_1$; 
identity (4) shows that 
$p$ is weakly independent of its first two variables
relative to $\Sigma_1$. Therefore, 
relative to $\Sigma_1^{\prime}$ we get
that (5)~$q_1(x,u,y)\approx q_1(x,x,x) \approx x$, 
(6)~$p(x,u,y)\approx p(y,y,y) \approx y$, and 
(7)~$q_2$ is independent of its middle variable.
Hence
\[
\Sigma_1^{\prime}\models x
\stackrel{(5)}{\approx}
q_1(x,x,y)
\stackrel{(2)}{\approx}
q_2(x,x,y)
\stackrel{(7)}{\approx}
q_2(x,y,y)
\stackrel{(3)}{\approx}
p(x,y,y)
\stackrel{(6)}{\approx}
y,
\]
showing that $\Sigma_1^{\prime}$ is inconsistent.
\end{exmp}

The argument from Example~\ref{bentz_ex} actually
establishes the following theorem, a slight strengthening
of H.~P.~Gumm's Theorem from \cite{gumm}.

\begin{thm}\label{gumm_plus}
The following are equivalent for a variety $\mathcal V$.
\begin{enumerate}
\item
$\mathcal V$ is congruence modular.
\item
There exist $3$-variable terms $q_0,\ldots,q_n,p$ such that the 
following identities hold in $\mathcal V$:
\begin{enumerate}
\item
$q_0(x,u,y)\approx x$,
\item
$q_i(x,y,x)\approx x$ for $i$ in the interval $[2,n]$,
\item
$q_i(x,y,y)\approx q_{i+1}(x,y,y)$ for $i$ even,
\item
$q_i(x,x,y)\approx q_{i+1}(x,x,y)$  for $i$ odd,
\item
$q_n(x,y,y)\approx p(x,y,y)$, and
\item
$p(x,x,y)\approx y$.
\end{enumerate}
\end{enumerate}
\end{thm}

If $\Sigma$ is the set of identities
in Theorem~\ref{gumm_plus}, then these are exactly
Gumm's identities from \cite{gumm} \emph{minus} 
the identity $\varepsilon: q_1(x,y,x)\approx x$.
The theorem asserts that we can delete this single
identity from Gumm's set and still have a set
of identities forcing congruence modularity.
The `reason' for this is that 
the only role played by this identity $\varepsilon$ in our
method is to prove that $q_1$ is weakly independent of its middle
variable relative to the Gumm identities 
$\Sigma\cup \{\varepsilon\}$.
But this can be deduced
another way, directly from $\Sigma$, using 
$
\Sigma\models 
x\stackrel{{\rm (a)}}{\approx} q_0(x,y,y)
\stackrel{{\rm (c)}}{\approx} q_1(x,y,y).
$


\section{Testing for a nontrivial congruence identity}

Our result about congruence modular varieties has an 
analogue for varieties that satisfy a nontrivial
congruence identity. First we recall one
Maltsev characterization for this class of varieties.

\begin{thm}\label{k-k_thm}
{\rm \cite{kearnes-kiss}}
The following are equivalent for a variety $\mathcal V$.
\begin{enumerate}
\item
$\mathcal V$ satisfies a nontrivial congruence identity.
\item
There exist $4$-variable terms $M_0,\ldots,M_n$ such that the 
following identities hold in $\mathcal V$:
\begin{enumerate}
\item
$M_0(x,u,v,y)\approx x$ and $M_n(x,u,v,y)\approx y$,
\item
$M_i(x,x,y,y)\approx M_{i+1}(x,x,y,y)$ and
$M_i(x,y,x,y)\approx M_{i+1}(x,y,x,y)$ for $i$ odd, and
\item
$M_i(x,y,y,y)\approx M_{i+1}(x,y,y,y)$  for $i$ even.
\end{enumerate}
\end{enumerate}
\end{thm}
There are other Maltsev characterizations of 
the class of varieties satisfying nontrivial
congruence identities given in Definition 2.17,
Theorem~5.23 and Theorem 8.13 of \cite{kearnes-kiss},
which could be used just as easily in this paper.
We chose the one above, which is part of Theorem~5.28
of \cite{kearnes-kiss}, since it is the characterization
that most resembles the characterization of congruence
modularity in Theorem~\ref{day_thm}.


\begin{thm}\label{main2}
$\mathcal V$ satisfies a nontrivial congruence identity
if and only if $\mathcal V$ realizes 
some set
$\Sigma$ of idempotent identities whose 
$n$-th derivative is inconsistent for some $n$.
\end{thm}

\begin{proof}

[$\Rightarrow$]
Assume that $\mathcal V$ satisfies
a nontrivial congruence identity, and
that $\Sigma$ is the set of identities
guaranteed by Theorem~\ref{k-k_thm}.
The consequence of these identities that 
results from replacing all variables with $x$ 
is
\[
\Sigma\models x\approx M_0(x,x,x,x)\approx M_1(x,x,x,x)\approx \cdots
\approx M_n(x,x,x,x),
\]
showing that $\Sigma$ is idempotent.

\begin{clm}
$\Sigma^{(i)}\models M_i(x,u,v,y)\approx x$ for all $i$.
\end{clm}

The claim holds for
$i=0$ by identity (2)(a) of Theorem~\ref{k-k_thm}.
Let's assume that the claim holds for some 
$k\geq 0$, and prove it for $k+1$.
If $k$ is odd, then from (2)(b) of Theorem~\ref{k-k_thm}
we derive 
\[
\begin{array}{rl}
\Sigma^{(k)}\models& x\approx M_k(x,x,y,y)\approx 
M_{k+1}(x,x,y,y)
\qquad
\text{\rm and}\qquad\\
\Sigma^{(k)}\models& x\approx 
M_k(x,y,x,y)\approx M_{k+1}(x,y,x,y),
\end{array}
\]
from which we conclude that $M_{k+1}(x,u,v,y)$ is weakly
independent of its second, third and fourth variables
relative to $\Sigma^{(k)}$.
Hence 
\begin{equation}\label{eq1}
\Sigma^{(k+1)}\models M_{k+1}(x,u,v,y)\approx M_{k+1}(x,x,x,x)\approx x,
\end{equation}
as claimed. If $k$ is even, then from (c) we derive 
\[
\begin{array}{rl}
\Sigma^{(k)}\models& x\approx M_k(x,y,y,y)\approx 
M_{k+1}(x,y,y,y),
\end{array}
\]
from which we conclude that $M_{k+1}(x,u,v,y)$ is weakly
independent of its second, third and fourth variables
relative to $\Sigma^{(k)}$.
Just as in (\ref{eq1}), this finishes the claim in the 
case where $k$ is even.

\medskip

It follows from the claim and identity (2)(a) 
of Theorem~\ref{k-k_thm} that 
$\Sigma^{(n)}\models x\approx M_n(x,u,v,y)\approx y$,
so $\Sigma^{(n)}$ is inconsistent. This concludes the proof of 
[$\Rightarrow$].\footnote{In fact, it is possible
to show that $\Sigma^{(\lceil n/2 \rceil)}$ is inconsistent by working inward
from both ends of the sequence $M_0,\ldots,M_n$ at the same time,
but this does not add anything useful to this proof.}

[$\Leftarrow$]
We will argue that if $\Sigma$ is idempotent and 
the realization of $\Sigma$ by $\mathcal V$
does not force $\mathcal V$ to satisfy a nontrivial congruence
identity, then the same properties are true for $\Sigma^{\prime}$.

If $\Sigma$ is idempotent, then so is $\Sigma^{\prime}$,
since it extends $\Sigma$ and it involves
no new function symbols.

If the realization of $\Sigma$ by $\mathcal V$ does
not force a nontrivial congruence identity, then the variety 
$\mathcal V_{\Sigma}$ axiomatized by $\Sigma$ does not satisfy
a nontrivial congruence identity.
The combination of 
Theorems 2.16 
and 7.15~(1)$\Leftrightarrow$(2) of \cite{kearnes-kiss}
implies that $\mathcal V_{\Sigma}$ has no ``Hobby-McKenzie term''.
In this situation, the contrapositive
of Lemma~2.5 of \cite{idem} proves 
that $\mathcal V_{\Sigma}$ 
has a subvariety term equivalent
to the variety of sets or the variety of semilattices.
In either case, this means that $\Sigma$ can be realized
by a 2-element meet semilattice, $\m s = \lb \{0,1\};\wedge\rb$.
If $F$ is weakly independent of its first variable
relative to $\Sigma$, then $\Sigma\models F(y,\wec{w})\approx x$
for $y\neq x$ and some sequence of not necessarily
distinct variables $\wec{w}$. By setting $x=1, y=0$
and $\wec{w}=\wec{s}$ we obtain $F^{\m s}(0,\wec{s})=1$,
where $F^{\m s}$ is a semilattice term (equivalent to a meet of variables).
Necessarily $F^{\m s}$ does not depend on its first variable.
Thus $\m s\models F(x,\wec{z})\approx F(y,\wec{z})$
where $x$, $y$, and all variables in the sequence $\wec{z}$
are distinct. This shows that $\m s$ is a model of
$\Sigma^{\prime}$. This is enough to prove that 
the realization of $\Sigma^{\prime}$ also does not force 
the satisfaction of a nontrivial congruence identity (since 
the variety of semilattices does not satisfy a nontrivial congruence
identity, \cite{FN}).

We have shown that if $\Sigma$ is idempotent and the realization
of $\Sigma$ does not force the satisfaction of a 
nontrivial congruence identity,
then both properties hold for $\Sigma^{\prime}$, hence
for $\Sigma^{(n)}$ for any $n$. In particular,
$\Sigma^{(n)}$ is consistent for any $n$.
This is the contrapositive of [$\Leftarrow$].
\end{proof}




\begin{exmp}
Lemma~3.10 of \cite{jonsson}, which is credited to 
Day, proves that a congruence $n$-permutable variety
with a semilattice operation satisfies a nontrivial
congruence identity. In other words, if 
$\Sigma_1$ is the 
set of identities from Theorem~\ref{hag-mit}~(2)
and $\Sigma_2$ is the set of identities expressing
that some binary term $s(x,y)$ is a semilattice operation,
then any variety realizing the (idempotent)
set of identities $\Sigma_1\cup \Sigma_2$
satisfies a nontrivial congruence identity.

Later, in Theorem~9.19 of \cite{hobby-mckenzie},
D.~Hobby and R.~McKenzie proved that any locally finite
congruence $n$-permutable variety satisfies a nontrivial 
congruence identity. (No assumption is made
about the existence of a semilattice
term.)

The full result, that any congruence $n$-permutable
variety satisfies a nontrivial congruence identity,
was established by P.~Lipparini in \cite{lip2}.
He went on to publish alternative proofs of this
theorem in \cite{lip1} and \cite{lip3}.

Another proof that any congruence $n$-permutable variety 
satisfies a nontrivial congruence identity
was found by K.~A.~Kearnes and J.~B.~Nation in \cite{kearnes-nation}.

Here we show how to derive this theorem from 
Theorem~\ref{main2}.
Let $\Sigma$ denote the set of identities in 
Theorem~\ref{hag-mit}~(2).
\begin{clm}
$\Sigma^{(i)}\models p_i(x,u,y)\approx x$ for all $i$.
\end{clm}

The claim holds for
$i=0$ by identity (2)(a) of Theorem~\ref{hag-mit}.
Assume that the claim holds for some 
$k\geq 0$. From this, by identity (2)(b) of Theorem~\ref{hag-mit},
we derive that
$\Sigma^{(k)}\models x\approx p_k(x,x,y)\approx p_{k+1}(x,y,y)$,
so $p_{k+1}$ is weakly independent of its last two
variables relative to $\Sigma^{(k)}$. 
Thus $p_{k+1}$ is fully independent of its last two
variables relative to $\Sigma^{(k+1)}$, and this means that
$\Sigma^{(k+1)}\models p_{k+1}(x,u,y)\approx p_{k+1}(x,x,x)\approx x$.
This proves the claim.

\medskip

Combining the claim with Theorem~\ref{hag-mit}~(2)(a),
we get that 
$\Sigma^{(n)}\models x\approx p_n(x,u,y)\approx y$,
hence $\Sigma^{(n)}$ is inconsistent. Now apply Theorem~\ref{main2}.
\end{exmp}


\bibliographystyle{plain}
\begin{thebibliography}{10}

\bibitem{bentz}
%Bentz, Wolfram, 
Bentz, W., 
{\it Topological implications in varieties.} 
Algebra Universalis {\bf 42} (1999), 9--16.

\bibitem{bimmvw}
%Berman, Joel, Idziak, Pawe{\l}, Markovi\'c, Petar, McKenzie, Ralph, 
%Valeriote, Matthew, Willard, Ross, 
Berman, J., Idziak, P., Markovi\'c, P., McKenzie, R., 
Valeriote, M., Willard, R., 
{\it Varieties with few subalgebras of powers.}
Trans.\ Amer.\ Math.\ Soc.\  {\bf 362}  (2010),  no. 3, 1445--1473.

\bibitem{day}
%Day, Alan,
Day, A.,
{\it A characterization of modularity for congruence lattices of algebras.}
Canad.\ Math.\ Bull.\ {\bf 12} (1969), 167--173. 

\bibitem{day-p}
Day, A., 
{\it $p$-modularity implies modularity in equational classes.}
Algebra Universalis {\bf 3} (1973), 398--399. 

\bibitem{FN}
%Freese, Ralph and Nation, J.~B.,
Freese, R. and Nation, J.~B.,
{\it Congruence lattices of semilattices.}
Pacific J.\ Math.\ {\bf 49} (1973), 51--58.

\bibitem{garcia-taylor}
Garc\'ia, O. C. and Taylor, W., 
{\sl The lattice of interpretability types of varieties.}
Mem.\ Amer.\ Math.\ Soc.\ {\bf 50} (1984), no. 305.

\bibitem{eva}
%Gedeonov\'a, Eva,
Gedeonov\'a, E.,
{\it A characterization of $p$-modularity for congruence lattices of algebras.}
Acta Fac.\ Rerum Natur.\ Univ.\ Comenian.\ Math.\ Publ.\ 
{\bf 28} (1972), 99--106. 

\bibitem{gumm}
%Gumm, H.-Peter, 
Gumm, H.-P., 
{\it Congruence modularity is permutability composed with distributivity.}
 Arch.\ Math.\ (Basel) {\bf 36} (1981), 569--576.

\bibitem{hagemann-mitschke}
%Hagemann, Joachim; Mitschke, Aleit,
Hagemann, J.; Mitschke, A.,
{\it On $n$-permutable congruences.}
Algebra Universalis {\bf 3} (1973), 8--12.

%\bibitem{hinman}
%Hinman, Peter G.,
%{\sl Fundamentals of mathematical logic.} 
%A K Peters, Ltd., Wellesley, MA, 2005.

\bibitem{hobby-mckenzie}
%Hobby, David, McKenzie, Ralph, 
Hobby, D., McKenzie, R., 
{\sl The structure of finite algebras. }
Contemporary Mathematics, {\bf 76}. 
American Mathematical Society, Providence, RI, 1988.

\bibitem{jonsson0}
%J\'onsson, Bjarni, 
J\'onsson, B., 
{\it On the representation of lattices.}
Math.\ Scand.\ {\bf 1}, (1953), 193--206. 

\bibitem{jonsson}
%J\'onsson, Bjarni, 
J\'onsson, B., 
{\it Congruence varieties.} 
Algebra Universalis {\bf 10} (1980), 355--394.

%\bibitem{sdj}
%Kearnes, Keith~A.,
%{\it Congruence join semidistributivity is 
%equivalent to a congruence identity.}
%Algebra Universalis {\bf 46} (2001), 373--387.

\bibitem{idem}
%Kearnes, Keith A.,
Kearnes, K.~A.,
{\it Almost all minimal idempotent varieties are congruence modular.} 
Algebra Universalis {\bf 44} (2000), 39--45.

\bibitem{kearnes-kiss}
Kearnes, K.~A. and Kiss, E.~W.,
{\sl The Shape of Congruence Lattices.}\\
http://spot.colorado.edu/~kearnes/Papers/cong.pdf

\bibitem{kearnes-kiss-szendrei}
Kearnes, K.~A., Kiss, E.~W., and Szendrei,~\'A.,
{\it Growth rates of finite algebras.}
manuscript.

\bibitem{kearnes-nation}
%Kearnes, Keith A. and Nation, J.~B.,
Kearnes, K. A. and Nation, J.~B.,
{\it Axiomatizable and nonaxiomatizable congruence prevarieties.}
Algebra Universalis {\bf 59} (2008), 323--335.

\bibitem{kearnes-sequeira}
%Kearnes, Keith A. and Sequeira, Lu\'is,
Kearnes, K. A. and Sequeira, L.,
{\it Hausdorff properties of topological algebras.} 
Algebra Universalis {\bf 47} (2002), 343--366.

\bibitem{kelly}
%Kelly, David,
Kelly, D.,
{\it Basic equations: word problems and Mal'cev conditions.} 
Abstract 701-08-4, Notices
Amer. Math. Soc. {\bf 20} (1973), A-54.

\bibitem{lip1}
%Lipparini, Paolo,
Lipparini, P.,
{\it Congruence identities satisfied in $n$-permutable varieties.}
Boll.\ Un.\ Mat.\ Ital.\ B (7) {\bf 8} (1994), no. 4, 851--868. 

\bibitem{lip2}
%Lipparini, Paolo,
Lipparini, P.,
{\it $n$-permutable varieties satisfy nontrivial congruence identities.}
Algebra Universalis {\bf 33} (1995), 159--168. 

\bibitem{lip3}
%Lipparini, Paolo,
Lipparini, P.,
{\it Every $m$-permutable variety satisfies the congruence identity 
$\alpha\beta_h=\alpha\gamma_h$.}
Proc.\ Amer.\ Math.\ Soc.\ {\bf 136} (2008), no. 4, 1137--1144. 

\bibitem{nation}
Nation, J. B.,
{\it Varieties whose congruences satisfy certain lattice identities.}
Algebra Universalis {\bf 4} (1974), 78--88. 

\end{thebibliography}
\end{document}
