\chapter{Congruence Meet and Join Semidistributivity}\label{congruence_sdj}

In this chapter we will characterize the satisfaction of a
nontrivial congruence identity in several new ways
(Theorems~\ref{main2}, \ref{SD-join/Mod}, \ref{omit_d2_sub},
\ref{typ1condcor_dual}, and~\ref{cong_id2}).  Our goal is to
understand congruence join semidistributivity and its
relationship to the satisfaction of a nontrivial congruence
identity.  Although most of the results of this chapter
concern varieties satisfying congruence identities, we start
the chapter by recalling known results about congruence meet
semidistributivity and we end the chapter with new results
(Theorem~\ref{sdj-thm}) that provide several
characterizations of congruence join semidistributivity for
varieties.  These results generalize Theorems~9.8, 9.10 and
9.11 of \cite{hobby-mckenzie}.

As a byproduct, we solve an old problem of
B.~J\'{o}nsson\index{J\'{o}nsson, B.}  (Problem 2.18 of
\cite{jonsson3}) by showing that the class of congruence
join semidistributive varieties is definable by a Maltsev
condition.

It should be noted that any congruence join semidistributive
variety is also congruence meet semidistributive (see
Exercise 7.14~(10) of \cite{hobby-mckenzie} or
(1)$\mimplies$(6) of Theorem~\ref{sdj-thm} of this chapter).
Therefore {\em congruence join semidistributivity} and {\em
  congruence semidistributivity} are equivalent properties
for varieties.

\section{Congruence Meet Semidistributivity}\label{sdm_sect}

Using straightforward arguments, it follows from a
combination of the statements in
Theorem~\ref{basic_centrality} that if $\alpha$ and $\beta$
are congruences on an algebra $\m a$, then $[\alpha,\beta]
\leq \alpha\wedge\beta$ and
$(\alpha\wedge\beta)/[\alpha,\beta]$ is an abelian
congruence on~$\m a/[\alpha,\beta]$.  Therefore, if $\vr V$
is a variety that omits abelian congruences, it follows that
$[\alpha,\beta] = \alpha\wedge\beta$ for any $\alpha,
\beta\in \Con(\m a)$ for any $\m a\in \vr V$.
Theorem~\ref{basic_centrality}~(5) implies that the
commutator operation is semidistributive in its first
variable i.e.,
\[
[\alpha,\gamma] = \delta
\wrel{\&} 
[\beta,\gamma] = \delta
\wrel{\to}
[\alpha\vee\beta,\gamma] = \delta\,.
\]
Hence if $\vr V$ omits abelian congruences, then the
congruence lattices of members of~$\vr V$ must satisfy the
ordinary meet semidistributive law:
\[
\alpha\wedge\gamma = \delta
\wrel{\&} 
\beta\wedge\gamma = \delta
\wrel{\to}
(\alpha\vee\beta)\wedge\gamma = \delta\,.
\]
The converse of this statement is true, but is much more
difficult to prove.  It was established for locally finite
varieties in Theorem~9.10 of \cite{hobby-mckenzie} using
tame congruence theory, and in full generality in
Corollary~4.7 of \cite{k-szendrei2} using combinatorial
arguments.  This result links many different properties, as
we will show in the next theorem.

Recall the type of meet continuous lattice words defined
before Corollary~\ref{strange-cor}: if $x$, $y$, and $z$ are
variables, then let $y_0 = y$, $z_0 = z$, $y_{n+1} =
y\vee(x\wedge z_n)$, and $z_{n+1} = z\vee(x\wedge y_n)$.
Define $y_{\omega} = \bigvee_{n<\omega} y_n$ and $z_{\omega}
= \bigvee_{n<\omega} z_n$.  When it is necessary to indicate
the variables involved and their order we will write
$y_{\omega}(x,y,z)$ for $y_{\omega}$ and $z_{\omega}(x,y,z)$
for $z_{\omega}$.

\begin{thm}\label{SD-meet-thm}
  Let\/ ${\vr V}$ be a variety.  The following conditions
  are equivalent.
  \begin{enumerate}
  \item[(1)] $\vr V$ is congruence meet semidistributive.
  \item[(2)] There exists a positive integer $n$ such that
    if\/ $\m a\in {\vr V}$ and $\alpha, \beta, \gamma\in
    \Con(\m a)$, then
    \[
    \alpha\cap(\beta\circ\gamma)
    \subseteq \beta_n\,,
    \]
    where $\beta_n := y_n(\alpha,\beta,\gamma)$.
  \item[(3)] $[\alpha,\beta] = \alpha\wedge\beta$ for all
    $\alpha, \beta\in \Con(\m a)$ and all\/ $\m a\in {\vr
      V}$.
  \item[(4)] No member of\/~$\vr V$ has a nontrivial abelian
    congruence.
  \item[(5)] No member of\/~$\vr V$ has a nontrivial abelian
    tolerance.
  \item[(6)] $\C C(\alpha,\beta;\delta)\miff
    \beta\wedge\big(\alpha\vee(\beta\wedge\delta)\big)\leq
    \delta$ for all\/ $\m a\in {\vr V}$ and all $\alpha,
    \beta, \delta\in \Con(\m a)$.
  \item[(7)] $\vr V$ satisfies the meet continuous
    congruence identity
    \[
    x\wedge(y\vee z) \approx x\wedge y_{\omega}\,,
    \]
    where $y_{\omega} = y_{\omega}(x,y,z)$.
  \item[(8)] The meet continuous congruence variety
    of\/~$\vr V$ is meet semidistributive.
  \item[(9)] $\m m_3$ is not embeddable in\/~$\Conb(\m a)$
    for any\/ $\m a\in {\vr V}$.
  \item[(10)] ${\vr V}$ satisfies a family of idempotent
    Maltsev conditions that, considered together, fail in
    any nontrivial variety of modules.  (Equivalently, $\vr
    V$ satisfies a {\em single} idempotent Maltsev condition
    that fails in any nontrivial variety of modules.)
  \end{enumerate}
\end{thm}

\begin{proof}
  The equivalence of items (1), (2) and (3) is Corollary~4.7
  of~\cite{k-szendrei2}.

  If (3) holds, and $\gamma$ is an abelian congruence of an
  algebra $\m a\in {\vr V}$, then $0 = [\gamma,\gamma] =
  \gamma\wedge\gamma = \gamma$.  Hence $\gamma$ is trivial,
  and (4) holds.  Conversely, assume that (4) holds.  It
  follows from Theorem~\ref{basic_centrality}~(8) that $\C
  C(\alpha,\beta;\alpha\wedge\beta)$ holds, so
  $[\alpha,\beta]\leq \alpha\wedge\beta$ holds for any pair
  of congruences on any algebra $\m a$.  Moreover $\C
  C(\alpha,\beta;[\alpha,\beta])$ holds, according to the
  definition of the commutator, and
  \[
  \C C(\alpha,\beta;[\alpha,\beta])\mimplies
  \C C(\alpha\wedge\beta,\alpha\wedge\beta;[\alpha,\beta])
  \]
  by Theorem~\ref{basic_centrality}~(1), so
  $(\alpha\wedge\beta)/[\alpha,\beta]$ is an abelian
  congruence on $\m a/[\alpha,\beta]$ by
  Theorem~\ref{basic_centrality}~(10).  Therefore, from (4)
  we derive (3).

  Assume that (4) holds. Since $\vr V$ omits nontrivial
  abelian congruences, it omits nontrivial strongly abelian
  congruences.  Therefore, by Theorem~\ref{str_ab_thm1},
  $\vr V$ satisfies a nontrivial idempotent Maltsev
  condition.  In this situation,
  Theorem~\ref{abel_tol=abel_cong} guarantees that an
  abelian tolerance generates an abelian congruence. Since
  $\vr V$ omits nontrivial abelian congruences, $\vr V$
  omits nontrivial abelian tolerances.  This shows that
  (4)$\mimplies$(5).  The reverse implication is trivial.

  To connect item (6) with the preceding conditions, assume
  that (3) holds and that
  \begin{enumerate}
  \item[(a)] $\C C(\alpha,\beta;\delta)$ holds.
  \end{enumerate}
  By Theorem~\ref{basic_centrality}~(8),
  \begin{enumerate}
  \item[(b)] $\C C(\alpha,\beta;\beta)$ holds,
  \end{enumerate}
  so by Theorem~\ref{basic_centrality}~(6) we derive from
  (a) and (b) that
  \begin{enumerate}
  \item[(c)] $\C C(\alpha,\beta;\beta\wedge\delta)$ holds.
  \end{enumerate}
  Again by Theorem~\ref{basic_centrality}~(8) we get that
  \begin{enumerate}
  \item[(d)] $\C
    C(\beta\wedge\delta,\beta;\beta\wedge\delta)$ holds,
  \end{enumerate}
  so by Theorem~\ref{basic_centrality}~(5) we get from (c)
  and (d) that
  \begin{enumerate}
  \item[(e)] $\C
    C(\alpha\vee(\beta\wedge\delta),\beta;\beta\wedge\delta)$
    holds.
  \end{enumerate}
  From this and the definition of the commutator we get that
  \begin{enumerate}
  \item[(f)] $\big[\big(\alpha\vee
    (\beta\wedge\delta)\big),\beta\big]\leq
    \beta\wedge\delta$ holds.
  \end{enumerate}
  Now from (f) and item (3) we derive that
  \[
  \beta\wedge\big(\alpha\vee(\beta\wedge\delta)\big) = 
  \big[\big(\alpha\vee(\beta\wedge\delta)\big),\beta\big]
  \leq \beta\wedge\delta\leq\delta\,.
  \]
  Conversely, $\beta\wedge\big(\alpha\vee
  (\beta\wedge\delta)\big) \leq \delta$ implies $\C
  C(\alpha,\beta;\delta)$ for any three congruences on any
  algebra, as Theorem~\ref{basic_centrality}~(8) proves.
  This shows that (3) implies (6).

  On the other hand, to see that (6)$\mimplies$(4), take
  $\alpha = \beta = \gamma$ and $\delta = 0$ in (6). The
  result is the assertion that $\gamma$ is abelian if and
  only if~$\gamma = 0$.

  The equivalence of (1), (7) and (8) follows from
  Theorem~\ref{strange-thm} and the fact that congruence
  lattices are meet continuous.

  Item (8) implies item (9), since $\m m_3$ is not meet
  semidistributive.

  Assume that (9) holds. Then, since $\m m_3$ satisfies
  Whitman's condition~$\W$, it follows from
  Theorem~\ref{czedli-day_thm} that $\vr V$ satisfies a
  nontrivial idempotent Maltsev condition.  In this
  situation, a result from \cite{k-szendrei2} explains how
  to construct from a nontrivial abelian congruence on an
  algebra in~$\vr V$ a copy of~$\m m_3$ in the congruence
  lattice of some other algebra in~$\vr V$.  Namely, suppose
  that $\alpha$ is a nonzero abelian congruence on some $\m
  a\in {\vr V}$, that $\m a\times_{\alpha} \m a$ is the
  subalgebra of~$\m a^2$ whose universe is $\alpha$, that
  $\eta_1, \eta_2\in\Con(\m a\times_{\alpha}\m a)$ are the
  coordinate projection kernels, and that $\Delta$ is the
  congruence on $\m a\times_{\alpha} \m a$ generated by the
  pairs $\lb (a,a), (b,b)\rb$ with $(a,b)\in \alpha$.  It is
  a consequence of Theorem~3.5 of \cite{k-szendrei2} that
  $\eta_1, \eta_2$, and $\Delta$ generate a sublattice
  of~$\Conb(\m a\times_{\alpha}\m a)$ isomorphic to $\m
  m_3$.  Thus, if (9) holds, then (4) must hold.

  The Pixley--Wille algorithm shows that the class of
  varieties satisfying a congruence condition like the one
  in item (2) can be defined by a single idempotent Maltsev
  condition.  Since (2) is equivalent to (4), this Maltsev
  condition cannot be satisfied by any variety with
  nontrivial abelian algebras, hence by any nontrivial
  variety of modules.  Thus (7) implies the stronger of the
  two statements in (10).

  Finally, we show that the weaker of the two statements in
  (10) implies (4).  Assume instead that $\vr V$ satisfies a
  family $\vr F$ of idempotent Maltsev conditions that fail
  in every nontrivial variety of modules, but that some $\m
  a\in {\vr V}$ has a nontrivial abelian congruence
  $\alpha$.  We may assume, without loss of generality, that
  $\vr V$ is an idempotent variety. For if we replace $\vr
  V$ and $\m a$ by their idempotent reducts, then we do not
  affect the idempotent Maltsev conditions satisfied by $\vr
  V$, nor that $\alpha$ is an abelian congruence on~$\m
  a$. Thus, we make this assumption.  We may (and do)
  further assume that $\m a$ itself is abelian, since if it
  is not we may simply replace it by one of its subalgebras
  that is supported by nontrivial $\alpha$-block.

  At least one of the Maltsev conditions in~$\vr F$ is
  nontrivial, since these conditions taken together fail in
  every nontrivial variety of modules.  Corollary~4.5 of
  \cite{k-szendrei2} proves that an abelian algebra $\m a$
  in a variety satisfying some nontrivial idempotent Maltsev
  condition is {\bf quasi-affine},\index{quasi-affine} which
  by definition means that $\m a$ is a subalgebra of a
  reduct of an algebra that has the same universe and
  polynomial operations as some module.  Since $\m a$ is
  both idempotent and quasi-affine, it is a subalgebra of an
  algebra $\m m^*$ that is a reduct of some module $\m m$
  over some ring~$\m r$.  There is no harm in renaming the
  zero element of~$\m m$ so that it lies in~$A$.  If $p$ is
  the module term $x-y+z$, then $p\colon \m m^3\to \m m$ is
  a homomorphism, and therefore $p\colon \m a^3\to \m m^*$
  is also a homomorphism.  The image $\m a':=p(\m a^3)$
  contains $A$, since $p(a,a,a)=a$. Moreover, $\m a'$~is a
  quotient of $\m a^3\in \vr V$, hence $\m a'\in \vr V$.
  This produces a possibly larger subalgebra $\m a\leq \m
  a'\leq \m m^*$. Iterating this, $\m a\leq \m a'\leq \m
  a''\leq \cdots$, and taking a union yields an algebra $\m
  b\in \vr V$ that is a subalgebra of~$\m m^*$ and is closed
  under $p$.  Since $0\in A\subseteq B$, the set $B$ is
  closed under the abelian group operations $x+y =
  p(x,0,y)$, $-x = p(0,x,0)$, and~$0$.  Thus $\widehat{\m
    b}:= \lb \m b; p, 0\rb$ is an additive subgroup of~$\m
  m$ that is also a subalgebra of a reduct of~$\m m$.  This
  implies that $\widehat{\m b}$ is term equivalent to a
  module over the subring of~$\m r$ consisting of all
  elements $r\in R$ such that $rB\subseteq B$.  Clearly
  $\widehat{\m b}$ is nontrivial, since $\m b$ contains $\m
  a$ as a subalgebra.  Moreover, $\widehat{\m b}$ satisfies
  the conditions in~$\vr F$, since its reduct $\m b$ does.
  Therefore the variety generated by $\widehat{\m B}$ is (up
  to term equivalence) a nontrivial variety of modules that
  satisfies the conditions in~$\vr F$, contrary to
  (10). This contradicts our assumption that (4) fails to
  hold, so we are done.
\end{proof}


\section{More on Congruence Identities}\label{8.2}

\begin{thm}\label{transfer2}
  Let\/ $\vr V$ be a variety with a Hobby--McKenzie term.
  Assume that\/ $\m a\in {\vr V}$, and that\/ $\Conb(\m a)$
  has a sublattice of congruences labeled as in
  Figure~\ref{fig34}.
\begin{figure}[ht]
\begin{center}
\setlength{\unitlength}{1mm}
\begin{picture}(20,35)
\put(0,15){\circle*{1.2}}
\put(10,0){\circle*{1.2}}
\put(10,30){\circle*{1.2}}
\put(20,10){\circle*{1.2}}
\put(20,20){\circle*{1.2}}
\put(0,15){\line(2,3){10}}
\put(0,15){\line(2,-3){10}}
\put(10,0){\line(1,1){10}}
\bezier{200}(20,10)(16,15)(20,20)
\bezier{200}(20,10)(24,15)(20,20)
\bezier{200}(20,20)(12,22)(10,30)
\bezier{200}(20,20)(18,28)(10,30)
\put(22,9){$\beta$}
\put(22,19){$\alpha$}
\put(-5,14){$\gamma$}
\put(9,32){$\tau$}
\end{picture}
\end{center}
\caption{ \ }\label{fig34}
\end{figure}
If $J_T$ is a separated solvability obstruction in
$I[\beta,\alpha]$, then there is a separated solvability
obstruction~$I_S$ contained in~$I[\alpha,\tau]$ and a
$\leadsto$\,-sequence from $I_S$ to $J_T$.
\end{thm}

\begin{proof}
  We will show first that if $J_T$ is a separated
  solvability obstruction in~$I[\beta,\alpha]$, then there
  is a separated solvability obstruction~$I'_{S'}$ contained
  in either $I[\beta,\alpha]$ or $I[\alpha,\tau]$ and a
  $\leadsto$\,-sequence of length $1$ or~$2$ from
  ${I'}_{S'}$ to $J_T$.  If it happens that $I'_{S'}$ is
  contained in~$I[\alpha,\tau]$, then we are done.  If
  instead $I'_{S'}$ is contained in~$I[\beta,\alpha]$, then
  we can repeat the argument to find $I''_{S''}$ contained
  in either $I[\beta,\alpha]$ or $I[\alpha,\tau]$ and a
  \hbox{$\leadsto$\,-sequence} from $I''_{S''}$ to
  $I'_{S'}$.  This argument cannot be repeated indefinitely
  since concatenating $\leadsto$\,-sequences forms longer
  $\leadsto$\,-sequences and there is a bound on the length
  of~$\leadsto$\,-sequences. Therefore the argument will
  produce a separated solvability obstruction in
  $I[\alpha,\tau]$ that initiates a $\leadsto$\,-sequence
  terminating at $J_T$.

  Recall from the proof of Theorem~\ref{transfer1}, applied
  to the setting of Corollary~\ref{transfer1_cor}, that if
  $\mu:=\gamma \cap (\delta:T)$, then
  $I[\mu,\gamma]_{\gamma}\leadsto I[\delta,\theta]_T$.
  Since $\mu\leq (\delta:T)$ and $\delta\leq (\delta:T)$, we
  have
  \[
  \gamma\cap (\delta\vee\mu)\leq
  \gamma\cap (\delta:T) = \mu\,,
  \]
  and therefore $\gamma\wedge\big(\delta\vee(\gamma\wedge
  \mu)\big)\leq \mu$.  By Theorem~\ref{basic_centrality}~(8)
  we get that $\C C(\delta,\gamma;\mu)$ holds, or
  equivalently $\delta\leq (\mu:\gamma)$.  If
  $\alpha\not\leq (\mu:\gamma)$, then for
  $\lambda:=\alpha\wedge (\mu:\gamma)$ (${}\geq \delta\geq
  \beta$) we have that $I[\lambda,\alpha]$ is a nontrivial
  subinterval of~$I[\beta,\alpha]$.  According to the second
  paragraph of Lemma~\ref{new_mu}, the interval
  $I[\lambda,\alpha]$ is a solvability obstruction.  That
  paragraph further guarantees that, since $\alpha\cap \Cg
  a(\gamma)\leq \lambda$, we have
  $I[\lambda,\alpha]_{\alpha}\leadsto
  I[\mu,\gamma]_{\gamma}$.  Therefore, in the case where
  $\alpha\not\leq (\mu:\gamma)$ we have located a separated
  solvability obstruction $I[\lambda,\alpha]_{\alpha}$
  in~$I[\beta,\alpha]$ and a $\leadsto$\,-sequence
  \[
  I[\lambda,\alpha]_{\alpha}\leadsto I[\mu,\gamma]_{\gamma}
  \leadsto I[\delta,\theta]_T = J_T
  \]
  of length two.

  Now consider the case where $\alpha\leq (\mu:\gamma)$.
  Since $\gamma\not\leq (\mu:\gamma)$ and $\gamma\leq \tau$
  we have $\tau\not\leq (\mu:\gamma)$, so $\kappa:=\tau\cap
  (\mu:\gamma)$ satisfies $\alpha \leq \kappa < \tau$ in
  this case.  According to the second paragraph of
  Lemma~\ref{new_mu}, the interval $I[\kappa,\tau]$ is a
  solvability obstruction. Since $\gamma\not\leq \kappa$,\,
  $I[\kappa,\tau]_{\gamma}$ is a separated solvability
  obstruction. We prove that
  $I[\kappa,\tau]_{\gamma}\leadsto I[\delta,\tau]_T$ by
  verifying criteria (d)' and (g) from Lemma~\ref{new_mu}.
  In our setting these statements are
  \begin{enumerate}
  \item[(d)'] $\gamma\cap \Cg a(T) \subseteq 
    \big(\gamma\wedge(\delta:T)\big)
    \vee\big(\Cg a(T)\wedge(\delta:T)\big)$ and
  \item[(g)\hphantom{'}] $\gamma\cap \kappa = \gamma\cap
    (\delta:T)$.
  \end{enumerate}
  Item (d)' follows from the observation that
  \[
  \gamma\cap \Cg a(T)\subseteq \gamma\cap \alpha
  \subseteq \mu := \gamma\cap (\delta:T)\,,
  \]
  since $\gamma\cap (\delta:T)$ is the first joinand in the
  right hand side of (d)'.  For item (g), observe that
  \[
  \gamma\cap \kappa = \gamma\cap \tau \cap (\mu:\gamma)
  = \gamma\cap (\mu:\gamma)
  = \mu =\gamma\cap (\delta:T)\,.
  \]
  This proves that $I[\kappa,\tau]_{\gamma}\leadsto
  I[\delta,\tau]_T$.
\end{proof}

Let $\m l$ be a lattice.  A {\bf
  herringbone}\index{herringbone} in~$\m l$ is the union of
three descending chains $\{\alpha^i\}\cup \{\beta^{2i}\}\cup
\{\gamma^{2i+1}\}$ in $\m l$ where $\{\alpha^i\}\cup
\{\beta^{2i}\}$ and $\{\alpha^i\}\cup \{\gamma^{2i+1}\}$ are
sublattices of~$\m l$ ordered as in Figure~\ref{fig35}.
\begin{figure}[ht]
\begin{center}
\setlength{\unitlength}{1mm}
\begin{picture}(30,42)
\put(0,0){\circle*{1.2}}
\put(0,10){\circle*{1.2}}
\put(0,20){\circle*{1.2}}
\put(0,30){\circle*{1.2}}
\put(15,5){\circle*{1.2}}
\put(15,10){\circle*{1.2}}
\put(15,15){\circle*{1.2}}
\put(15,20){\circle*{1.2}}
\put(15,25){\circle*{1.2}}
\put(15,30){\circle*{1.2}}
\put(15,35){\circle*{1.2}}
\put(30,5){\circle*{1.2}}
\put(30,15){\circle*{1.2}}
\put(30,25){\circle*{1.2}}
\put(0,-2){\line(0,1){32}}
\put(15,0){\line(0,1){35}}
\put(30,-2){\line(0,1){27}}
\put(0,0){\line(3,1){15}}
\put(0,10){\line(3,1){15}}
\put(0,20){\line(3,1){15}}
\put(0,30){\line(3,1){15}}
\put(30,5){\line(-3,1){15}}
\put(30,15){\line(-3,1){15}}
\put(30,25){\line(-3,1){15}}
\put(16,35){$\alpha^{0}$}
\put(10,29){$\alpha^{1}$}
\put(16,24){$\alpha^{2}$}
\put(10,19){$\alpha^{3}$}
\put(16,14){$\alpha^{4}$}
\put(10,9){$\alpha^{5}$}
\put(16,4){$\alpha^{6}$}
\put(-5,29){$\beta^{0}$}
\put(-5,19){$\beta^{2}$}
\put(-5,9){$\beta^{4}$}
\put(-5,-1){$\beta^{6}$}
\put(31,24){$\gamma^{1}$}
\put(31,14){$\gamma^{3}$}
\put(31,4){$\gamma^{5}$}
\end{picture}
\end{center}
\caption{A herringbone}\label{fig35}
\end{figure}
In other words, a herringbone is a partial sublattice of~$\m
l$, ordered as in Figure~\ref{fig35}, with
\begin{enumerate}
\item[$(\beta)$] $\alpha^{2i+1}\wedge \beta^{2i} = \beta^{2i+2}$,\,
$\alpha^{2i+2}\vee \beta^{2i} = \alpha^{2i}$, and
\item[$(\gamma)$] $\alpha^{2i+2}\wedge \gamma^{2i+1} = \gamma^{2i+3}$,\;
$\alpha^{2i+3}\vee \gamma^{2i+1} = \alpha^{2i+1}$\,.
\end{enumerate}
The {\bf length}\index{herringbone!length}\index{length!of a herringbone} 
of the herringbone is ${\infty}$ if there are
infinitely many distinct $\alpha$'s.  Otherwise, the {\bf
  length} of the herringbone is the supremum of the
superscripts $k$ such that $\alpha^0 > \alpha^1 > \cdots >
\alpha^{k}$.  (It is easy to see from $(\beta)$ and
$(\gamma)$ that if some $\alpha^k = \alpha^{k+1}$ then
$\alpha^k = \alpha^{k+1} = \alpha^{k+2} = \cdots$.)  Our
first goal is to prove that if a variety $\vr V$ satisfies a
nontrivial congruence identity, then there is a fixed bound
on the length of any herringbone that appears in the
congruence lattice of a member of~$\vr V$.

Let $x$, $y$ and $z$ be lattice variables.  Define lattice
words by $y^0 = y$, $z^0 = z$, $y^{n+1} = y\wedge(x\vee
z^n)$, and $z^{n+1} = z\wedge(x\vee y^n)$.  The construction
of these words is dual to the words $y_n$ and $z_n$, which
preceded the statement of Theorem~\ref{SD-meet-thm}.  As
there, we will write $y^n(x,y,z)$ and $z^n(x,y,z)$ when it
is necessary to indicate the order of the variables.

\begin{thm}\label{main2}
  Let\/ ${\vr V}$ be a variety.  The following conditions
  are equivalent.
  \begin{enumerate}
  \item[(1)] $\vr V$ satisfies a nontrivial congruence
    identity.
  \item[(2)] There is a positive integer $N$ such that no
    algebra in~$\vr V$ has a herringbone of length greater
    than $N$ in its congruence lattice.
  \item[(3)] $\vr V$ satisfies the congruence identity
    \[
    z^M\approx z^{M+1}
    \]
    for some $M$.
  \end{enumerate}
\end{thm}

\begin{proof}
  If $\vr V$ satisfies a nontrivial congruence identity,
  then by Theorems~\ref{main1} and \ref{rect_Malt_cond2} the
  variety $\vr V$ has a Hobby--McKenzie term of arity~$n$
  for some $n < \omega$.  We argue that no algebra in~$\vr
  V$ has a herringbone of length greater than $2n-3$ in its
  congruence lattice.  If this is not the case, then some
  $\m a\in {\vr V}$ has a herringbone
  $\{\alpha^i\}\cup\{\beta^{2i}\}\cup \{\gamma^{2i+1}\}$
  with $\alpha^0 > \alpha^1 > \cdots > \alpha^{2n-3} >
  \alpha^{2n-2}$.  Figure~\ref{fig36} isolates five
  congruences near the bottom of the herringbone that form a
  sublattice of~$\Conb(\m a)$ isomorphic to $\m n_5$.
\begin{figure}[ht]
\begin{center}
\setlength{\unitlength}{1mm}
\begin{picture}(20,37)
\put(0,0){\circle*{1.2}}
\put(0,20){\circle*{1.2}}
\put(20,10){\circle*{1.2}}
\put(20,20){\circle*{1.2}}
\put(20,30){\circle*{1.2}}
\put(0,0){\line(2,1){20}}
\put(0,20){\line(2,1){20}}
\put(0,0){\line(0,1){20}}
\put(20,10){\line(0,1){20}}
\put(-12.5,-1){$\beta^{2n-2}$}
\put(-12.5,19){$\beta^{2n-4}$}
\put(22,29){$\alpha^{2n-4}$}
\put(22,19){$\alpha^{2n-3}$}
\put(22,9){$\alpha^{2n-2}$}
\end{picture}
\end{center}
\caption{A piece near the bottom of the herringbone}\label{fig36}
\end{figure}
For the congruences in this figure, if $\alpha^{2n-3}\lhdlhd
\alpha^{2n-4}$, then by Lemma~\ref{meet+join}~(2) we derive
that
\[
\beta^{2n-2} = \beta^{2n-4}\wedge\alpha^{2n-3}
\lhdlhd  \beta^{2n-4}\wedge\alpha^{2n-4} = 
\beta^{2n-4}\,.
\]
But this was proved to be impossible in
Theorem~\ref{weak_omit}~(1).  Therefore we cannot have
$\alpha^{2n-3}\lhdlhd \alpha^{2n-4}$.  By
Theorem~\ref{solv=omit_obst} there is a solvability
obstruction~$I[\mu_{2n-4},\nu_{2n-4}]$ contained in the
interval $I[\alpha^{2n-3},\alpha^{2n-4}]$.  This obstruction
is separated by $S_{2n-4}:=\nu_{2n-4}$. We are now in a
position to apply Theorem~\ref{transfer2} to a copy of~$\m
n_5$ that is slightly higher~up in this herringbone
(Figure~\ref{fig37}).
\begin{figure}[ht]
\begin{center}
\setlength{\unitlength}{1mm}
\begin{picture}(20,34)
\put(20,0){\circle*{1.2}}
\put(20,20){\circle*{1.2}}
\put(0,10){\circle*{1.2}}
\put(0,20){\circle*{1.2}}
\put(0,30){\circle*{1.2}}
\put(20,0){\line(-2,1){20}}
\put(20,20){\line(-2,1){20}}
\put(20,0){\line(0,1){20}}
\put(0,10){\line(0,1){20}}
\put(22,-1){$\gamma^{2n-3}$}
\put(22,19){$\gamma^{2n-5}$}
\put(-12.5,29){$\alpha^{2n-5}$}
\put(-12.5,19){$\alpha^{2n-4}$}
\put(-12.5,9){$\alpha^{2n-3}$}
\end{picture}
\end{center}
\caption{A piece higher up}\label{fig37}
\end{figure}
The separated solvability obstruction
$I[\mu_{2n-4},\nu_{2n-4}]_{S_{2n-4}}$ that is contained
in~$I[\alpha^{2n-3},\alpha^{2n-4}]$ plays the role of~$J_T$
of that theorem.  The theorem guarantees the existence of a
separated solvability obstruction
$I[\mu_{2n-5},\nu_{2n-5}]_{S_{2n-5}}$
in~$I[\alpha^{2n-4},\alpha^{2n-5}]$ and a
$\leadsto$\,-sequence
\[
I[\mu_{2n-5},\nu_{2n-5}]_{S_{2n-5}}
\leadsto\cdots\leadsto
I[\mu_{2n-4},\nu_{2n-4}]_{S_{2n-4}}\,.
\]
We can work our way up the herringbone, alternately using
copies of~$\m n_5$ on the right and left and using
Theorem~\ref{transfer2} at each step, to derive that for
each $i = 4, 5, \ldots, 2n-1$, if
$I[\alpha^{2n-i+1},\alpha^{2n-i}]$ contains a separated
solvability obstruction
$I[\mu_{2n-i},\nu_{2n-i}]_{S_{2n-i}}$, then
$I[\alpha^{2n-i},\alpha^{2n-i-1}]$ contains a separated
solvability obstruction
$I[\mu_{2n-i-1},\nu_{2n-i-1}]_{S_{2n-i-1}}$ for which there
exists a $\leadsto$\,-sequence
\[
I[\mu_{2n-i-1},\nu_{2n-i-1}]_{S_{2n-i-1}}
\leadsto\cdots\leadsto
I[\mu_{2n-i},\nu_{2n-i}]_{S_{2n-i}}\,.
\]
When we reach the top of this herringbone we will have
located a \hbox{$\leadsto$\,-sequence}
\[
I[\mu_{0},\nu_{0}]_{S_{0}}
\leadsto\cdots\leadsto
I[\mu_{1},\nu_{1}]_{S_{1}}
\leadsto\cdots\cdots\leadsto
I[\mu_{2n-4},\nu_{2n-4}]_{S_{2n-4}}
\]
of length at least $2n-4$.  But we proved in
Theorem~\ref{leadsto_sequence} that there is no
$\leadsto$\,-sequence of this length.  This contradiction
proves that there is no herringbone of length greater than
$2n-3$ in~$\Conb(\m a)$.

Now we prove that $(2)\mimplies(3)$.  Start with three
congruences $\alpha$,~$\beta$ and $\gamma$, and define
$\beta^n := y^n(\alpha,\beta,\gamma)$ and $\gamma^n :=
z^n(\alpha,\beta,\gamma)$ where $y^n(x,y,z)$ and
$z^n(x,y,z)$ are the terms defined before the statement of
this theorem.  Let $\alpha^n := \alpha\vee \beta^n$ if $n$
is even, and $\alpha^n := \alpha\vee \gamma^n$ if $n$ is
odd.  Since $\beta^0 = \beta\geq
\beta\wedge(\alpha\vee\gamma^0) = \beta^1$, and
$\gamma^0\geq \gamma^1$, it is easy to see inductively that
\[
\beta^{n+1} = \beta\wedge (\alpha\vee\gamma^{n})\geq
\beta\wedge (\alpha\vee\gamma^{n+1}) = \beta^{n+2}\,,
\]
and $\gamma^{n+1}\geq \gamma^{n+2}$.  Thus the $\beta$ and
$\gamma$\,-sequences are descending chains, which forces the
$\alpha$\,-sequence to be a descending chain.  We claim that
\[
\{\alpha^n\mid \mbox{\rm all $n$}\}
\cup\{\beta^n\mid \mbox{\rm even $n$}\}\cup
\{\gamma^n\mid \mbox{\rm odd $n$}\}
\]
is a herringbone.  To see this, we must verify conditions
$(\beta)$ and $(\gamma)$ from the definition of a
herringbone:
\begin{enumerate}
\item[$(\beta)$] $\alpha^{2i+1}\wedge \beta^{2i} =
  \beta^{2i+2}$, $\alpha^{2i+2}\vee \beta^{2i} =
  \alpha^{2i}$\,,
\item[$(\gamma)$] $\alpha^{2i+2}\wedge \gamma^{2i+1} =
  \gamma^{2i+3}$, $\alpha^{2i+3}\vee \gamma^{2i+1} =
  \alpha^{2i+1}$\,.
\end{enumerate}
To show that $\alpha^{2i+1}\wedge \beta^{2i} =
\beta^{2i+2}$, observe that
\[
\beta^{2i+2} = \beta\wedge (\alpha\vee\gamma^{2i+1})
 = \beta\wedge \alpha^{2i+1}\leq \alpha^{2i+1}\,,
\]
and (as observed earlier) $\beta^{2i+2}\leq \beta^{2i}$.
Thus $\beta^{2i+2}\leq \alpha^{2i+1}\wedge \beta^{2i}$.
Conversely,
\[
\alpha^{2i+1}\wedge \beta^{2i} =
(\alpha\vee\gamma^{2i+1})\wedge\beta^{2i} \leq
(\alpha\vee\gamma^{2i+1})\wedge\beta
= \beta^{2i+2}\,.
\]
To show that $\alpha^{2i+2}\vee \beta^{2i} = \alpha^{2i}$,
observe that
\[
\alpha^{2i+2}\vee \beta^{2i} \geq \alpha\vee\beta^{2i}
= \alpha^{2i}\,,
\]
while $\alpha^{2i+2}\leq \alpha^{2i}$ and $\beta^{2i}\leq
\alpha\vee\beta^{2i} = \alpha^{2i}$, so
$\alpha^{2i+2}\vee\beta^{2i}\leq \alpha^{2i}$.  This
establishes $(\beta)$, and $(\gamma)$ can be established the
same way.

It follows that if $N$ bounds the length of any herringbone
in any congruence lattice of a member of~$\vr V$, then
however we choose our original three congruences $\alpha$,
$\beta$ and $\gamma$, the sequences defined above must
satisfy $\alpha^N = \alpha^{N+1} = \alpha^{N+2} = \cdots$,
and therefore $\gamma^M = \gamma^{M+2}$ holds for each
$M\geq N$. Since the $\gamma$'s form a descending chain, we
conclude that $\gamma^M = \gamma^{M+1}$ holds for each
$M\geq N$. Therefore $z^M\approx z^{M+1}$ holds in all
congruence lattices of members of~$\vr V$.

Item (1) follows from (3) and the fact that the identity
$z^M\approx z^{M+1}$ is nontrivial. To see that it fails in
some lattice, take any lattice containing a herringbone of
length at least $M+1$. Let $\alpha:=\alpha^{M+1}$,
$\beta:=\beta^0$ and $\gamma:=\gamma^1$. It is easy to see
that $z^M(\alpha,\beta,\gamma)\neq
z^{M+1}(\alpha,\beta,\gamma)$.
\end{proof}

This argument shows that if $\vr V$ has a Hobby--McKenzie
term of arity~$n$, then $\vr V$ satisfies the congruence
identity $z^{2n-3}\approx z^{2n-2}$.  These exponents are
not optimal, since if $n=3$ then our proof shows that ${\vr
  V}$ satisfies the congruence identity $z^3\approx z^4$.
But it can be argued (by considering all Hobby--Mckenzie
terms of arity $3$) that when $n=3$ the variety $\vr V$ is
congruence modular, and consequently satisfies $z^1\approx
z^2$ as a congruence identity.

Recall from Section~\ref{lattice_theory} that the
$\sdj$-configuration is the pair
\[
\big(\m p(\sdj),p\approx j\big)
\] 
where $\m p(\sdj)$ is the partial lattice given by the
presentation $\lb G \mid R\rb$ where $G = \{p,q,r,j,m\}$ and
$R$ consists of the relations $p\vee q = j = p\vee r$ and
$q\wedge r=m\leq p$.

\begin{lm}\label{sdj_projective}
  $\m p(\sdj)$ is projective relative to any variety of
  lattices satisfying an identity of the form $z^M\approx
  z^{M+1}$.

  In fact, if $\sigma\colon \m l\to \m k$ is a surjective
  homomorphism in this variety and $\varphi\colon \m
  p(\sdj)\to \m k$ is a partial lattice homomorphism, then
  for any function $f\colon \{p,q,r,s\}\to \m l$ satisfying
  $\sigma\circ f = \varphi$ on the domain of~$f$ there is a
  homomorphism of partial lattices $\overline{\varphi}\colon
  \m p(\sdj)\to \m l$ such that
  $\sigma\circ\overline{\varphi} =\varphi$ and
  $\overline{\varphi}(p)\geq f(p)$,
  $\overline{\varphi}(q)\leq f(q)$, and
  $\overline{\varphi}(r)\leq f(r)$.
\end{lm}

\begin{proof}
  Define $\m p:=\m p(\sdj)$, and suppose that $\varphi\colon
  \m p\to \m k$ is a homomorphism of partial lattices and
  $f\colon \{p,q,r,s\}\to \m l$ is a function satisfying
  $\sigma\circ f = \varphi$ on the domain of~$f$. Let $a =
  f(p)$, $b = f(q)$ and $c = f(r)$.  Recursively define $b^0
  := b$, $c^0 := c$, $b^{n+1} := b\wedge (a\vee c^{n})$, and
  $c^{n+1} := c\wedge (a\vee b^{n})$, so that $b^n =
  y^n(a,b,c)$ and $c^n := z^n(a,b,c)$ where $y^n(x,y,z)$ and
  $z^n(x,y,z)$ are the terms defined for the proof of
  Theorem~\ref{main2}.  As we showed in the proof of
  Theorem~\ref{main2} (1)$\mimplies$(2), $b=b^0\geq
  b^1\geq\cdots$ and $c =c^0\geq c^1\geq\cdots$.  From the
  identity $z^M\approx z^{M+1}$ we get that these chains
  terminate, in which case
  \[
  b^{M}= b^{M+1}= b\wedge(a\vee c^M)\leq a\vee c^M
  \]
  and similarly $c^M\leq a\vee b^M$.  Thus $b^M\leq b$,\,
  $c^M\leq c$ and $a\vee b^M = a\vee c^M$.  Define
  $\overline{\varphi}\colon \m p\to \m l$ by
  $\overline{\varphi}(p) = a\vee (b^M\wedge c^M)$ ($\geq
  f(p)$),\, $\overline{\varphi}(q) = b^M$ ($\leq f(q)$),\,
  $\overline{\varphi}(r) = c^M$ ($\leq f(r)$),\,
  $\overline{\varphi}(j) = a\vee b^M$, and
  $\overline{\varphi}(m) = b^M\wedge c^M$.  It is clear that
  \[
  \overline{\varphi}(j) = a\vee b^M =
  \overline{\varphi}(p)\vee \overline{\varphi}(q) =
  \overline{\varphi}(p)\vee \overline{\varphi}(r)
  \]
  and that
  \[
  \overline{\varphi}(m) = b^M\wedge c^M =
  \overline{\varphi}(q)\wedge \overline{\varphi}(r) \leq
  \overline{\varphi}(p)\,.
  \]
  Therefore $\overline{\varphi}\colon \m p\to \m l$ is a
  homomorphism of partial lattices. To finish the proof we
  must show that $\sigma\circ\overline{\varphi} = \varphi$.
  It suffices to prove that $\sigma\circ
  \overline{\varphi}(x) =\sigma\circ f(x)$ ($ = \varphi(x)$)
  when $x\in \{p, q, r\}$ is a generator of~$\m p$.

  By simultaneous induction, $\sigma(b^n) = \sigma(b)$ and
  $\sigma(c^n) = \sigma(c)$ for all~$n$, where one of the
  induction steps is proved by
  \[
  \begin{array}{r@{}l}
    \sigma(b^{n+1}) 
    &{} = \sigma(b)\wedge 
    \big(\sigma(a)\vee\sigma(c^n)\big)\\
    &{} = 
    \sigma(b)\wedge
    \big(\sigma(a)\vee \sigma(c)\big)\\
    &{} =
    \sigma(b)\wedge
    \big(\sigma(a)\vee \sigma(b)\big) 
    = \sigma(b)\,.
  \end{array}
  \]
  Thus we have $\sigma\circ f(q) = \sigma(b) = \sigma(b^M) =
  \sigma\circ \overline{\varphi}(q)$, and similarly
  $\sigma\circ f(r) = \sigma(c) = \sigma(c^M) = \sigma\circ
  \overline{\varphi}(r)$.  Since $q\wedge r\leq p$ and
  $\varphi$ is a homomorphism we have $\varphi(q)\wedge
  \varphi(r)\leq \varphi(p)$.  This yields the second
  equality in
  \[
  \begin{array}{r@{}l}
    \sigma\circ f(p) &{} = \sigma(a) \\
    &{} = \sigma(a)\vee
    \big(\sigma(b)\wedge\sigma(c)\big)\\
    &{} = \sigma(a)\vee
    \big(\sigma(b^M)\wedge\sigma(c^M)\big)\\
    &{} =\sigma\circ \overline{\varphi}(p)\,.
  \end{array}
  \]
  The lemma is proved.
\end{proof}

Our first use of Lemma~\ref{sdj_projective} will require the
following consequence of Theorem~\ref{main2}, which seems to
be new even for locally finite varieties.

\begin{thm}\label{sdj_failure=solv}
  Assume that\/ $\vr V$ satisfies a nontrivial congruence
  identity.  If\/ $I$ is an\/ $\sdj$-failure in\/ $\Conb(\m
  a)$ for some\/ $\m a\in {\vr V}$, then $I$ is abelian.
\end{thm}

\begin{proof}
  We proved in Corollary~\ref{sdj_failure=abel} that if $\vr
  V$ has a weak difference term, then $\XXX$-solvable
  $\sdj$-failures are abelian.  Since the assumption that
  $\vr V$ satisfies a nontrivial congruence identity implies
  that $\vr V$ has a Hobby--McKenzie term, and therefore a
  weak difference term (Corollary~\ref{justify_weak_cor}),
  to prove the present theorem it will suffice to show that
  all $\sdj$-failures are $\XXX$-solvable.  To set up
  notation for this, assume that $\m a\in {\vr V}$ has
  congruences $\alpha$, $\beta$ and $\gamma$ satisfying
  $\alpha\vee\beta = \alpha\vee\gamma$ and
  $\beta\wedge\gamma\leq\alpha$.  Our goal is to prove that
  $\alpha\lhdlhd \alpha\vee\beta$.  Factoring by
  $\beta\wedge\gamma$ if necessary, we also assume that
  $\beta\wedge\gamma = 0$.

  Our strategy will be to show that if it is not true that
  $\alpha\lhdlhd \alpha\vee\beta$, then $\Conb(\m a)$
  contains an infinite $\leadsto$\,-sequence. This will
  suffice to prove the theorem, since
  Theorem~\ref{leadsto_sequence} provides a finite bound on
  the length of $\leadsto$\,-sequences.  Therefore, assume
  that $\alpha$ is {\em not} $\XXX$-solvably related to
  $\alpha\vee\beta=\alpha\vee\gamma$.  Define new
  congruences as follows:\goodbreak
  \begin{itemize}
  \item $\beta^0 := \beta\wedge\rad(\alpha)$, and $\gamma^0
    := \gamma\wedge\rad(\alpha)$.
  \item $\beta^{k+1}:= \beta\wedge(\gamma^k:\gamma)$ and
    $\gamma^{k+1}:= \gamma\wedge(\beta^k:\beta)$.
  \end{itemize}
  Our first goal will be to prove that $\beta^k\obst \beta$
  and $\gamma^k\obst \gamma$ for all $k$.

\begin{clm} 
  $\beta^0\obst \beta$ and $\gamma^0\obst \gamma$.
\end{clm}

We have assumed that $\alpha$ is not $\XXX$-solvably related
to $\alpha\vee\beta$, so $\alpha\vee\beta\not\leq
\rad(\alpha)$.  Since $\alpha\leq \rad(\alpha)$, we conclude
that $\beta\not\leq \rad(\alpha)$. Since $\rad(\alpha)$ is a
radical congruence, Lemma~\ref{pseudocomplement}~(3)
guarantees that $\beta^0:= \beta\wedge \rad(\alpha)\obst
\beta$ and similarly $\gamma^0\obst \gamma$.

\begin{clm}\label{alpha_leq}
  $\alpha\leq (\beta^k:\beta)$ and $\alpha\leq
  (\gamma^k:\gamma)$ for all $k$.
\end{clm}

From $\beta^0 := \beta\wedge\rad(\alpha)$ we derive $\C
C(\rad(\alpha),\beta;\beta^0)$ using
Theorem~\ref{basic_centrality}~(8).  Hence $\alpha\leq
\rad(\alpha)\leq (\beta^0:\beta)$.  An identical argument
proves that $\alpha\leq (\gamma^0:\gamma)$.

Now assume that $\alpha\leq (\beta^k:\beta)$ for some
$k$. Since $\gamma^{k+1} = \gamma\wedge(\beta^k:\beta)$ we
compute that
\[
\gamma^{k+1}\leq \gamma\wedge(\alpha\vee\gamma^{k+1})
\leq \gamma\wedge\big((\beta^k:\beta)\vee\gamma^{k+1}\big)
=\gamma\wedge(\beta^k:\beta) = \gamma^{k+1}\,,
\]
so $\gamma^{k+1} = \gamma\wedge(\alpha\vee\gamma^{k+1})$.
By Theorem~\ref{basic_centrality}~(8) we conclude that $\C
c(\alpha,\gamma;\gamma^{k+1})$ holds, hence $\alpha\leq
(\gamma^{k+1}:\gamma)$.  This proof that $\alpha\leq
(\beta^k:\beta)$ implies $\alpha\leq (\gamma^{k+1}:\gamma)$
works for every $k$, and for $\beta$ and $\gamma$
interchanged, so the claim follows by induction.

\begin{clm}\label{obst_clm}
  If\/ $\beta^k\obst \beta$, then we have\/ $\gamma^{k+1}
  \obst \gamma$. Similarly, if\/ $\gamma^k\obst \gamma$,
  then\/ $\beta^{k+1} \obst \beta$.
\end{clm}

If $\beta^k\obst \beta$, then $I[\beta^k,\beta]_{\beta}$ is
a separated solvability obstruction, so according to
Lemma~\ref{pseudocomplement}~(2) the pseudocomplement
$(\beta^k:\beta)$ is a radical congruence.  We proved in
Claim~\ref{alpha_leq} that $\alpha\leq (\beta^k:\beta)$.  If
it is also the case that $\gamma\leq (\beta^k:\beta)$, then
\[
\beta\leq \alpha\vee\beta = \alpha\vee\gamma\leq
(\beta^k:\beta)\,,
\]
forcing $\C C(\beta,\beta;\beta^k)$, or equivalently
$\beta^k\lhd \beta$.  This is contrary to $\beta^k\obst
\beta$, so it must be that $\gamma\not\leq (\beta^k:\beta)$.
Now Lemma~\ref{pseudocomplement}~(3) guarantees that
\[
\gamma^{k+1}:= \gamma\wedge (\beta^k:\beta) 
\obst \gamma\,.
\]
The proof that $\gamma^k\obst \gamma$ implies $\beta^{k+1}
\obst \beta$ is the same.

\begin{clm}
  $I[\gamma^{k+1},\gamma]_{\gamma} \leadsto
  I[\beta^{k},\beta]_{\beta}$ and
  $I[\beta^{k+1},\beta]_{\beta}\leadsto
  I[\gamma^{k},\gamma]_{\gamma}$ for all $k$.
\end{clm}

The second paragraph of Lemma~\ref{new_mu} describes a
method to produce $\leadsto$\,-related intervals, which we
employ now.  Since $I[\beta^k,\beta]_{\beta}$ is a separated
solvability obstruction and $\gamma \not\leq
(\beta^k:\beta)$, then for the congruence
$\gamma^{k+1}:=\gamma\wedge (\beta^k:\beta)$ we have that
$I[\gamma^{k+1},\gamma]_{\gamma}$ is also a separated
solvability obstruction.  Moreover, as is shown in
Lemma~\ref{new_mu}, to establish that
$I[\gamma^{k+1},\gamma]_{\gamma} \leadsto
I[\beta^{k},\beta]_{\beta}$ it is sufficient to verify that
$\gamma\cap \Cg a(\beta)\subseteq \gamma^{k+1}$.  But
$\gamma\cap \Cg a(\beta) = \gamma\cap \beta = 0$, so this
certainly holds.

\medskip

Under the assumption that $\alpha$ is not $\XXX$-solvably
related to $\alpha\vee\beta$ we have produced an infinite
$\leadsto$\,-sequence
\[
\cdots\cdots
\leadsto I[\beta^{4},\beta]_{\beta}
\leadsto I[\gamma^{3},\gamma]_{\gamma}
\leadsto I[\beta^{2},\beta]_{\beta}
\leadsto I[\gamma^{1},\gamma]_{\gamma}
\leadsto I[\beta^{0},\beta]_{\beta}\;.
\]
This completes the proof of the theorem, as we explained in
the second paragraph of this proof.
\end{proof}

Let $\vr V$ be a variety satisfying a nontrivial congruence
identity.  Theorem~\ref{sdj_failure=solv} shows that if $\m
a\in {\vr V}$, then the $\sdj$-failures in~$\Conb(\m a)$ are
abelian.  Since $\vr V$ has a weak difference term, these
abelian intervals consist of permuting equivalence
relations, hence these intervals are modular.  It turns out
that this property characterizes the class of varieties
satisfying nontrivial congruence identities.

\begin{thm}\label{SD-join/Mod}
  The following are equivalent for a variety $\vr V$.
  \begin{enumerate}
  \item[(1)] ${\vr V}$ satisfies a nontrivial congruence
    identity.
  \item[(2)] For every\/ $\m a\in {\vr V}$,\, $\Conb(\m a)$
    has an\/ $\sdj/\Mod$ factorization in the category of
    meet continuous lattices.
  \item[(3)] For every\/ $\m a\in {\vr V}$,\, $\Conb(\m a)$
    has an\/ $\sdj/\Mod$ factorization in the category of
    ordinary lattices.
  \item[(4)] For every\/ $\m a\in {\vr V}$, each\/
    $\sdj$-failure in\/~$\Conb(\m a)$ is modular.
  \item[(5)] If\/ $\m l$ belongs to\/ $\CON({\vr V})$, then
    each\/ $\sdj$-failure in\/~$\m l$ is modular.
  \end{enumerate}
\end{thm}

\begin{proof}
  If (1) holds, then from Theorem~\ref{main1}
  (1)$\mimplies$(2), Theorem~\ref{rect_Malt_cond2}
  (2)$\mimplies$(3), and Corollary~\ref{justify_weak_cor} it
  can be deduced that $\vr V$ has a weak difference term.
  Therefore the natural homomorphism
  \[
  \nu\colon \Conb(\m a)\to \Conb(\m a)/{\solv}
  \]
  provides a factorization of~$\Conb(\m a)$ of the form
  $\sdm/\Mod$ in the category of meet continuous
  lattices. We need to argue that the quotient $\Conb(\m
  a)/{\solv}$ is not only meet semidistributive, but is also
  join semidistributive.

  Each $\sdj$-failure in~$\Conb(\m a)/{\solv}$ is of the
  form $I = I[\varphi(p),\varphi(j)]$ for some homomorphism
  of partial lattices $\varphi\colon \m p\to \Conb(\m
  a)/{\solv}$ from the partial lattice $\m p := \m p(\sdj)$
  of the $\sdj$-configuration. By the projectivity of~$\m
  p$, proved in Lemma~\ref{sdj_projective}, to each such
  homomorphism there is a homomorphism
  $\overline{\varphi}\colon \m p\to \Conb(\m a)$ such that
  $\nu\circ \overline{\varphi}=\varphi$ where $\nu\colon
  \Conb(\m a)\to \Conb(\m a)/{\solv}$ is the natural map.
  The homomorphism $\overline{\varphi}$ identifies an
  $\sdj$-failure $I[\overline{\varphi}(p),
  \overline{\varphi}(j)]$ in~$\Conb(\m a)$, which by
  Theorem~\ref{sdj_failure=solv} must be abelian. But then
  $\overline{\varphi}(p)\solv \overline{\varphi}(j)$, so
  since $\solv$ is contained in~$\ker(\nu)$ we derive that
  \[
  \varphi(p) = \nu\circ \overline{\varphi}(p) = \nu\circ
  \overline{\varphi}(j) = \varphi(j)\,.
  \]
  This shows that our original $\sdj$-failure
  $I[\varphi(p),\varphi(j)]$ in~$\Conb(\m a)/{\solv}$
  is~trivial. Since it was chosen arbitrarily, $\Conb(\m
  a)/{\solv}$ is join semidistributive.

  As noted when proving the dual result (Theorem~\ref{HMa})
  the implications (2)$\mimplies$(3)$\mimplies$(4) are
  straightforward.

  We prove the contrapositive of (4)$\mimplies$(5). Suppose
  that there is an $\m l\in \CON({\vr V})$ that has a
  nonmodular $\sdj$-failure. Then since $\CON({\vr V})$
  consists of the homomorphic images of lattices in the
  congruence prevariety of~$\vr V$ there is an algebra $\m
  a\in {\vr V}$, a sublattice $\m k\leq \Conb(\m a)$, and a
  surjective homomorphism $\sigma\colon \m k\to \m l$.  The
  nonmodular $\sdj$-failure~$I$ in~$\m l$ can be lifted to
  an $\sdj$-failure $\overline{I}$ in~$\m k$ using the
  projectivity of the $\sdj$-configuration. The fact that
  $I$ is nonmodular means that it contains a sublattice
  isomorphic to the pentagon, $\m n_5$. The pentagon is a
  projective lattice, so it can be lifted to a pentagon
  in~$\overline{I}$, establishing that $\overline{I}$ is a
  nonmodular $\sdj$-failure in~$\m k$, hence the interval
  in~$\Conb(\m a)$ generated by $\overline{I}$ is also a
  nonmodular $\sdj$-failure.  This proves that
  (4)$\mimplies$(5).

  The implication (5)$\mimplies$(4) is trivial, so we
  complete the proof by showing that (4)$\mimplies$(1).
  Assume that (4) holds.  This fact can be expressed by a
  quasi-identity valid in congruence lattices of~$\vr V$.
  We have already discussed how to write down a
  quasi-identity for the dual property that $\sdm$-failures
  are modular in Remark~\ref{sdm_rem}, so it is easy to
  write down the one we need now. Namely, set
  $t:=p\vee(q\wedge r)$, and for each $i$ set
  $x_i^*:=(x_i\wedge s)\vee t$.  A quasi-identity expressing
  the fact that $\sdj$-failures are modular is
  \begin{equation}\label{sdm_mod_q}
    \big((p\vee q) \approx s\big) \wrel{\&}
    \big((p\vee r)\approx s\big)\to
    u(x_1^*,x_2^*,x_3^*)\approx v(x_1^*,x_2^*,x_3^*)
  \end{equation}
  where $u\approx v$ is the modular law.  As explained in
  the paragraph after Definition~\ref{quasi_sat_W}, the fact
  that the premises of (\ref{sdm_mod_q}) are meet-free
  implies that (\ref{sdm_mod_q}) satisfies $\W$.  By
  Theorem~\ref{czedli-day-W} this means that the class of
  varieties for which item (4) is true is definable by a set
  of idempotent Maltsev conditions.  At least one of these
  must fail in the variety of semilattices, since, as we now
  prove, the variety of semilattices does not satisfy item
  (4).  Let $\m 2 = \lb \{0,1\}; +\rb$ be the $2$-element
  join semilattice, and let $\m b = \m 2^2$.  We claim that
  $\Conb(\m b^2)$ has a nonmodular $\sdj$-failure. To see
  this, let $\theta$ be the kernel of the homomorphism
  $+\colon \m b^2\to \m b$.  That is, $\theta = \{\lb (a,b),
  (c,d)\rb\mid a+b=c+d\}$.  Let $\eta_1 = \{\lb (a,b),
  (c,d)\rb\mid a=c\}$ and $\eta_2 = \{\lb (a,b),
  (c,d)\rb\mid b=d\}$ be the coordinate projection kernels.
  For any two pairs $(p,q), (r,s)\in B^2$ it is the case
  that
  \[
  (p,q)\;\eta_1\;
  (p,p+q+r+s) \;\theta\;
  (p+q+r+s,p+q+r+s)\,, 
  \]
  and similarly
  $(p+q+r+s,p+q+r+s)\;\theta\circ\eta_1\;(r,s)$, so $(p,q)$
  is related to $(r,s)$ by $\theta\vee \eta_1$.  The pairs
  were arbitrary, so $\theta\vee\eta_1 = 1$; similarly
  $\theta\vee\eta_2 = 1$.  This proves that
  $I[\theta\vee(\eta_1\wedge\eta_2),1] = I[\theta,1]$ is an
  $\sdj$-failure. But $\m b^2/\theta$ is isomorphic to $\m
  b$, since $+$ is a surjective homomorphism, so
  $I[\theta,1]\cong \Conb(\m b)=\Conb(\m 2^2)\cong \m d_2$,
  which is a nonmodular lattice.  This proves that any set
  of idempotent Maltsev conditions defining the class of
  varieties satisfying item (4) includes one that fails in
  the variety of semilattices, hence from
  Theorem~\ref{main1} we get that any variety satisfying~(4)
  must satisfy (1).
\end{proof}

The next result is an analogue of the $\m d_1$-version of
Theorem~\ref{omit_d1_sub}.

\begin{thm}\label{omit_d2_sub}
  Let\/ ${\vr V}$ be a variety.  The following conditions
  are equivalent.
  \begin{enumerate}
  \item[(1)] $\vr V$ satisfies an idempotent Maltsev
    condition that fails in the variety of semilattices.
  \item[(2)] $\vr V$ satisfies a nontrivial congruence
    identity.
  \item[(3)] $\m d_2$ does not appear as a sublattice
    of\/~$\Conb(\m a)$ for any\/ $\m a\in {\vr V}$.
  \item[(4)] $\m d_2\notin \CON(\vr V)$.
  \end{enumerate}
\end{thm}

\begin{proof}
  We proved the equivalence of (1) and (2) in
  Theorem~\ref{main1}.

  If item (3) holds, then $\vr V$ omits special $\m
  d_2$'s. According to Theorem~\ref{equiv}, this implies
  that $\vr V$ satisfies an idempotent Maltsev condition
  that fails in the variety of semilattices, so
  (3)$\mimplies$(1).

  Now suppose that item (2) holds and that item (3) fails to
  hold. The failure of (3) implies that some $\m a\in {\vr
    V}$ has a copy of~$\m d_2$ in its congruence lattice.
  Choose a copy and label it as in Figure~\ref{fig38}.
\begin{figure}[ht]
\begin{center}
\setlength{\unitlength}{1mm}
\begin{picture}(30,30)
\put(0,10){\circle*{1.2}}
\put(0,20){\circle*{1.2}}
\put(15,0){\circle*{1.2}}
\put(15,20){\circle*{1.2}}
\put(15,30){\circle*{1.2}}
\put(30,10){\circle*{1.2}}
\put(30,20){\circle*{1.2}}
%
\put(0,10){\line(3,-2){15}}
\put(0,10){\line(3,2){15}}
\put(0,10){\line(0,1){10}}
\put(15,30){\line(-3,-2){15}}
\put(15,30){\line(0,-1){10}}
\put(15,30){\line(3,-2){15}}
\put(30,10){\line(-3,-2){15}}
\put(30,10){\line(-3,2){15}}
\put(30,10){\line(0,1){10}}
%
\put(14,15){$\alpha$}
\put(-4.5,19){$\beta$}
\put(32,19){$\gamma$}
\end{picture}
\end{center}
\caption{ \ }\label{fig38}
\end{figure}
Then $\alpha\vee\beta = \alpha\vee\gamma$, and
$\alpha\vee(\beta\wedge\gamma) = \alpha$.  Therefore, since
item (2) holds, Theorem~\ref{sdj_failure=solv} guarantees
that $\alpha\lhd\alpha\vee\beta$.  But this is forbidden by
Theorem~\ref{taylor_forbidden}~(2).  Thus (1), (2) and (3)
are equivalent.

Both implications (4)$\mimplies$(2) and (4)$\mimplies$(3)
are trivial, so to complete the proof we will show that
items (2) and (3) jointly imply~(4).  Assume that items (2)
and (3) are true for $\vr V$.  From (2) and
Theorem~\ref{main2} we obtain that there is some positive
integer $M$ such that the identity $z^M\approx z^{M+1}$
holds in $\CON({\vr V})$.  Let ${\vr Z}^M$ denote the
variety of lattices axiomatized by $z^M\approx z^{M+1}$.  It
is proved in Theorem~2.4 (5)$\mimplies$(6) of \cite{sdj}
that $\m d_2$ is projective in any ${\vr Z}^M$ that contains
$\m d_2$.  Since $\m d_2$ is projective and subdirectly
irreducible in~${\vr Z}^M$, the subclass ${\vr U}\subseteq
{\vr Z}^M$ of lattices that have no sublattice isomorphic to
$\m d_2$ is a variety. By item (3), $\vr U$ contains the
congruence lattices of members of~$\vr V$, hence ${\vr U}$
contains the variety generated by these lattices. Since
$\CON(\vr V)\subseteq {\vr U}$ and $\m d_2\notin {\vr U}$,
(4) holds.
\end{proof}

The statement of the next theorem, which characterizes the
class of varieties satisfying congruence identities in yet
another way, should be compared to the statement of
Theorem~\ref{typ1condcor}, which characterizes the class of
varieties satisfying meet continuous congruence identities.

\begin{thm}\label{typ1condcor_dual}
  The following conditions on a variety\/ $\vr V$ are
  equivalent.
  \begin{enumerate}
  \item[(1)] $\vr V$ satisfies an idempotent Maltsev
    condition that fails in the variety of semilattices.
  \item[(2)] The quasi-identity
    \begin{equation}\label{weak_W_dual}
      \big((p\vee q)\approx s\big) 
      \wrel{\&}
      \big((p\vee r)\approx s\big) 
      \wrel{\&}
      \big(p^{[2]}\approx s\big) 
      \to
      \big((p\vee (q\wedge r))\approx s\big)
    \end{equation}
    holds in the congruence lattices of algebras in~$\vr v$.
  \item[(3)] Quasi-identity (\ref{weak_W_dual}) holds
    in\/~$\CON({\vr V})$.
  \item[(4)] $\vr V$ satisfies a nontrivial congruence
    identity.
  \end{enumerate}
\end{thm}

Quasi-identity (\ref{weak_W_dual}) in item (2) is the dual
of quasi-identity (\ref{weak_W}) of
Theorem~\ref{typ1condcor}~(2).

\begin{proof}
  We proved the equivalence of (1) and (4) in
  Theorem~\ref{main1}.  The implication (3)$\mimplies$(2) is
  obvious.  We have previously noted that $\m d_1$ fails
  quasi-identity (\ref{weak_W}) of
  Theorem~\ref{typ1condcor}~(2), so of course $\m d_2$ fails
  the dual quasi-identity of the present theorem. So, if the
  congruence lattices of algebras in~$\vr V$ satisfy
  quasi-identity (\ref{weak_W_dual}), then $\m d_2$ is not
  embeddable in the congruence lattice of any algebra
  in~$\vr V$.  From Theorem~\ref{omit_d2_sub} it follows
  that $\vr V$ satisfies a nontrivial congruence
  identity. This shows that (2)$\mimplies$(4).  In summary,
  these observations show that
  (3)$\mimplies$(2)$\mimplies$(4)$\miff$(1).  The rest of
  the proof will be devoted to showing that
  (4)$\mimplies$(3).  We argue by contradiction, so assume
  that $\vr V$ satisfies a nontrivial congruence identity,
  but $\CON({\vr V})$ fails to satisfy quasi-identity
  (\ref{weak_W_dual}).

  Quasi-identity (\ref{weak_W_dual}) is equivalent modulo
  the axioms of lattice theory to the following
  quasi-identity:
  \begin{equation}\label{weak_W_dual_equiv}
    \big((p\vee q)\approx s\big) 
    \&
    \big((p\vee r)\approx s\big) 
    \&
    \big(p^{[2]}\approx s\big) 
    \&
    \big((q\wedge r)\leq p\big)
    \to
    (p\approx s)\,.
  \end{equation}
  This is because any assignment of variables in some
  lattice that fails (\ref{weak_W_dual_equiv}) also fails
  (\ref{weak_W_dual}), while, if $p\mapsto a$, $q\mapsto b$,
  $r\mapsto c$, $s\mapsto d$ is an assignment that fails
  (\ref{weak_W_dual}), then the reassignment $p\mapsto
  a':=a\vee(b\wedge c)$, $q\mapsto b$, $r\mapsto c$,
  $s\mapsto d$ clearly satisfies the first, second and
  fourth premise of (\ref{weak_W_dual_equiv}) and fails the
  conclusion.  To see that this reassignment also satisfies
  the third premise of (\ref{weak_W_dual_equiv}) we must
  verify that ${(a')^{[2]}(a',b,c) = d}$.  The fact that the
  first two premises are satisfied implies that $d$ is the
  largest element of the sublattice generated by $\{a, b,
  c\}$.  This shows that $(a')^{[2]}(a',b,c)\leq d$. But
  since the lattice operations are monotone, and $a\leq a'$,
  we get $d = a^{[2]}(a,b,c)\leq (a')^{[2]}(a',b,c)$.  Thus
  $(a')^{[2]}(a',b,c) = d$, and the third premise is
  satisfied.

  Let $Q$ denote quasi-identity (\ref{weak_W_dual_equiv}),
  and let $\big(\m p(Q),p\approx s\big)$ be the
  $Q$-configuration.  We have assumed that some $\m k\in
  \CON({\vr V})$ fails~$Q$, so there is a lattice $\m k\in
  \CON({\vr V})$ and a homomorphism of partial lattices
  $\varphi\colon \m p(Q)\to \m k$ such that $\varphi(p) <
  \varphi(s)$.  For concreteness, let $a:=\varphi(p)$,
  $b:=\varphi(q)$, $c:=\varphi(r)$ and $d:=\varphi(s)$.
  Since $\m k\in \CON({\vr V})$ there is an algebra $\m a\in
  {\vr V}$, a sublattice $\m l\leq \Conb(\m a)$ and a
  surjective homomorphism $\sigma\colon \m l\to\m k$. Choose
  a function $f\colon \{p,q,r,s\}\to \m l$ such that
  $\sigma\circ f = \varphi$ on the domain of~$f$.  Since
  $\varphi$ is a homomorphism of partial lattices and
  $q\wedge r\leq p, q, r, s$ in~$\m p(Q)$, the element
  $\varphi(q)\wedge \varphi(r)=b\wedge c$ is the smallest
  element of the sublattice generated by $\{a, b, c,
  d\}$. Thus, we may assume that $f$ is chosen so that
  $f(q)\wedge f(r)\leq f(p), f(q), f(r), f(s)$.

  The function~$f$ is an assignment of the variables of~$Q$
  in~$\m l$. We wish to modify this assignment to a better
  one.  Since $\m p(Q)$ may be obtained (up to isomorphism)
  from $\m p(\sdj)$ by adding more relations, there is a
  (surjective) homomorphism $\psi\colon \m p(\sdj)\to \m
  p(Q)$ that is the identity on the generators. Applying
  Lemma~\ref{sdj_projective} to the assignment $f\circ
  \psi\colon \{p,q,r,s\}\to \m l$ we obtain a homomorphism
  of partial lattices $\overline{\psi}\colon \m p(\sdj)\to
  \m l$ such that $\sigma\circ \overline{\psi} =
  \varphi\circ \psi$ (Figure~\ref{fig39}).
\begin{figure}[ht]
\[
\xymatrix{
&\ar@{-->}@/_/[ddl]_*+{\overline{\psi}}\ar[d]^*+{\psi} {\m p}(\sdj)\\
& {\m p}(Q)\ar[d]^*+{\varphi}\ar[ld]|*+{f}\\
  {\m L} \ar@{->>}[r]_*+{\sigma}   & {\m K}
}
\]
\caption{ \ }\label{fig39}
\end{figure}
The second clause of Lemma~\ref{sdj_projective} guarantees
that
\begin{equation}\label{weird_stuff}
\begin{array}{r@{}l}
\overline{\psi}(q)\wedge 
\overline{\psi}(r)&{} \leq 
\big(f\circ \psi(q)\big)\wedge
\big(f\circ \psi(r)\big)\\
&{} = f(q)\wedge f(r)\leq f(p)\\
&{} = f\circ \psi(p)\\
&{} \leq \overline{\psi}(p)\,,
\end{array}
\end{equation}
so if $\overline{\psi}$ is taken to define an assignment of
the variables of~$Q$ in~$\m l$, $p\mapsto \alpha$, $q\mapsto
\beta$, $r\mapsto \gamma$, $s\mapsto \delta$, then
\begin{enumerate}
\item[(i)] $\alpha\vee \beta = \delta$ and $\alpha\vee
  \gamma = \delta$ (by the projectivity of~$\m p(\sdj)$),
\item[(ii)] $\beta\wedge \gamma\leq \alpha$ (by
  (\ref{weird_stuff})), and
\item[(iii)] $\sigma(\alpha) = a < d = \sigma(\delta)$ (by
  the projectivity of~$\m p(\sdj)$).
\end{enumerate}
This assignment is not necessarily a failure of~$Q$ in~$\m
l$, since the third premise $\alpha^{[2]}=\delta$ of~$Q$ may
not be satisfied. But since the third premise was satisfied
by $\varphi\colon \m p(Q)\to \m k$ we at least have
\begin{enumerate}
\item[(iv)] $\sigma(\alpha^{[2]}) =
  a^{[2]}=d=\sigma(\delta)$.
\end{enumerate}

The rest of the argument produces a contradiction from
properties (i)--(iv).  From items (i) and (ii) we derive
that $I[\alpha,\alpha\vee\beta]$ is an $\sdj$-failure, hence
is an abelian interval according to
Theorem~\ref{sdj_failure=solv}.  By this and item (i) we get
$\alpha\vee \beta\solv \alpha\solv \alpha\vee\gamma$, which
is hypothesis~(1) of Lemma~\ref{sdj_failure_cent_lm}.  Item
(ii) above is the same as hypothesis (2) of
Lemma~\ref{sdj_failure_cent_lm}, and our current assumption
that $\vr V$ satisfies a congruence identity is strong
enough to guarantee that $\vr V$ has a weak difference
term. Since all the hypotheses of
Lemma~\ref{sdj_failure_cent_lm} currently hold, its
conclusion also holds, which is the equality
\[
\big(\beta\vee(\alpha\wedge \gamma)\big)\wedge
\big(\gamma\vee(\alpha\wedge \beta)\big)=
(\alpha\wedge\beta)\vee(\alpha\wedge\gamma)\,.
\]
Using this to move from the first line to the second in
\[
\begin{array}{r@{}l}
\alpha^{[2]}(\alpha,\beta,\gamma) 
&{} := \alpha\vee 
\big((\beta\vee(\alpha\wedge \gamma))\wedge
(\gamma\vee(\alpha\wedge \beta))\big)\\
&{} = \alpha\vee \big((\alpha\wedge \beta)\vee
(\alpha\wedge \gamma)\big)\\
&{} = \alpha\,,
\end{array}
\]
we derive that $\alpha^{[2]} = \alpha$.  But from item (iii)
we have $\sigma(\alpha) < \sigma(\delta)$, while from item
(iv) we have $\sigma(\alpha^{[2]}) = \sigma(\delta)$, which
together conflict with $\alpha^{[2]} = \alpha$.  This
contradiction completes the proof.
\end{proof}

The following result defines the class of varieties
satisfying a nontrivial congruence identity by a 3-variable
Maltsev condition.

\begin{thm}\label{cong_id2}
  Let\/ ${\vr V}$ be a variety.  The following conditions
  are equivalent.
  \begin{enumerate}
  \item[(1)] $\vr V$ satisfies a nontrivial congruence
    identity.
  \item[(2)] ${\vr V}\models_{con}
    \alpha\cap(\beta\circ\gamma) \subseteq
    \big(\gamma\vee(\alpha\wedge\beta)\big)\circ
    \big(\beta\vee(\alpha\wedge\gamma)\big)$.
  \item[(3)] There is a positive integer $k$ and ternary
    terms $d_0,\ldots, d_{2k+1}$, $e_0,\ldots, e_{2k+1}$,
    $p$ such that $\mathcal V$ satisfies the following
    equations:
    \begin{enumerate}
    \item[(i)] $d_0(x,y,z)\approx p(x,y,z) \approx
      e_0(x,y,z)$;
    \item[(ii)] $d_{i}(x,y,y)\approx d_{i+1}(x,y,y)$ and
      $e_{i}(x,x,y)\approx e_{i+1}(x,x,y)$ for even $i$;
    \item[(iii)] $d_{i}(x,x,y)\approx d_{i+1}(x,x,y)$,
      $d_{i}(x,y,x)\approx
      d_{i+1}(x,y,x)$,
    \item[] $e_{i}(x,y,y)\approx e_{i+1}(x,y,y)$ and
      $e_{i}(x,y,x)\approx e_{i+1}(x,y,x)$ for odd~$i$;
    \item[(iv)] $d_{2k+1}(x,y,z)\approx x$ and
      $e_{2k+1}(x,y,z)\approx z$.
    \end{enumerate}
  \end{enumerate}
\end{thm}

\begin{proof}
  For locally finite varieties, this result is part of
  Theorem~9.8 of \cite{hobby-mckenzie}.  The proof given
  there shows that items (2) and (3) are equivalent for any
  variety, and that the idempotent Maltsev condition in item
  (3) fails in the variety of semilattices.  Therefore
  (3)$\mimplies$(1), according to Theorem~\ref{main1}.

  What remains to show is that (1)$\mimplies$(2).  Let $\m f
  = \m f_{\vr V}(x,y,z)$ and set $\alpha := \Cg f(x,z)$,
  $\beta:=\Cg f(x,y)$, and $\gamma:=\Cg f (y,z)$.  Since
  $(x,z)$ is a generic element of
  $\alpha\cap(\beta\circ\gamma)$ it will suffice to prove
  that $(x,z)\in
  \big(\gamma\vee(\alpha\wedge\beta)\big)\circ
  \big(\beta\vee(\alpha\wedge\gamma)\big)$.
  Since $\alpha\vee \beta = \alpha\vee\gamma =
  \beta\vee\gamma =: \delta$, the intervals
  $I[\beta\vee(\alpha\wedge\gamma),\delta]$ and
  $I[\gamma\vee(\alpha\wedge\beta),\delta]$ are
  $\sdj$-failures, and therefore $\beta\vee(\alpha\wedge
  \gamma)\solv \delta\solv \gamma\vee(\alpha\wedge\beta)$
  (Theorem~\ref{sdj_failure=solv}).  Since these congruences
  are solvably related, they permute
  (Theorem~\ref{sim_cong}).  From $(x,y)\in
  \beta\vee(\alpha\wedge \gamma)$ and $(y,z)\in
  \gamma\vee(\alpha\wedge\beta)$ we get that
  \[
  (x,z)\in 
  \big(\beta\vee(\alpha\wedge \gamma)\big)\circ
  \big(\gamma\vee(\alpha\wedge\beta)\big)=
  \big(\gamma\vee(\alpha\wedge\beta)\big)\circ
  \big(\beta\vee(\alpha\wedge\gamma)\big)\,.
  \]
\end{proof}


\section{Congruence Join Semidistributivity}\label{8.3}

The main purpose of this section is to prove that a variety
is congruence join semidistributive if and only if it is
both congruence meet semidistributive and satisfies a
nontrivial congruence identity.  Thus, congruence join
semidistributive varieties are exactly those varieties whose
members have no congruences that are `abelian' in any of the
senses that have been introduced.

\begin{thm}\label{sdj-thm}
  Let\/ ${\vr V}$ be a variety.  The following conditions
  are equivalent.
  \begin{enumerate}
  \item[(1)] $\vr V$ is congruence join semidistributive.
  \item[(2)] If\/ $\m a\in {\vr V}$ and $\alpha, \beta,
    \gamma\in \Con(\m a)$, then
    \[
    \alpha\cap(\beta\circ\gamma) \subseteq
    \beta\vee(\alpha\wedge\gamma)\,.
    \]
  \item[(3)] There is a positive integer $k$ and ternary
    terms $d_0,\ldots, d_{k}$ such that $\mathcal V$
    satisfies the following equations:
    \begin{enumerate}
    \item[(i)] $d_0(x,y,z)\approx x$;
    \item[(ii)] $d_{i}(x,y,y)\approx d_{i+1}(x,y,y)$ and
      $d_{i}(x,y,x)\approx d_{i+1}(x,y,x)$ for even $i<k$;
    \item[(iii)] $d_{i}(x,x,y)\approx d_{i+1}(x,x,y)$ for
      odd~$i<k$;
    \item[(iv)] $d_{k}(x,y,z)\approx z$.
    \end{enumerate}
  \item[(4)] ${\vr V}$ satisfies an idempotent Maltsev
    condition that fails in any nontrivial variety of
    modules and in the variety of semilattices.
  \item[(5)] No member of~$\vr V$ has a nontrivial abelian
    or rectangular congruence.
  \item[(6)] ${\vr V}$ is congruence meet semidistributive
    and satisfies a nontrivial congruence identity.
  \item[(7)] There is a positive integer $N$ such that for
    every\/ $\m a\in {\vr V}$ and $\alpha, \beta, \gamma\in
    \Con(\m a)$,
    \[
    \alpha\vee(\beta\wedge\gamma)\approx
    (\alpha\vee\beta^N)\wedge (\alpha\vee\gamma^N)\,.
    \]
    (The lattice terms $\beta^N$ and $\gamma^N$ are defined
    in the paragraph preceeding Theorem~\ref{main2}.)
  \item[(8)] ${\rm CON}({\vr V})$ is a join semidistributive
    variety of lattices.
  \item[(9)] $\m m_3, \m d_2\notin {\rm CON}({\vr V})$.
  \item[(10)] $\m m_3$ and $\m d_2$ are not embeddable
    in\/~$\Conb(\m a)$ for any $\m a\in {\vr V}$.
  \end{enumerate}
\end{thm}

\begin{proof}
  We prove (1)--(6) cyclically, and then show the
  implications ${((1)\wrel{\&}(6))\mimplies(7)
    \mimplies(8)\mimplies(9)\mimplies(10)\mimplies(6)}$.

  Assume that $(1)$ holds and that $\m a\in {\vr V}$ has
  congruences $\alpha$, $\beta$ and~$\gamma$.  Choose any
  $(a,c)\in \alpha\cap(\beta\circ\gamma)$. Then
  $a\equiv_{\beta} b\equiv_{\gamma} c$ for some $b\in A$.
  Let $\alpha' = \Cg a(a,c)$, $\beta' = \Cg a(a,b)$ and
  $\gamma' = \Cg a(b,c)$. Since the generating pairs are
  related by $\alpha$, $\beta$ and $\gamma$ respectively, we
  get that $\alpha'\leq \alpha$, $\beta'\leq \beta$ and
  $\gamma'\leq \gamma$.  The congruence $\beta'\vee\alpha'$
  is generated by $(a,c)$ and $(a,b)$, so it is the
  congruence on~$\m a$ generated by $X\times X$ where $X =
  \{a, b, c\}$.  Similarly $\beta'\vee\gamma'$ is the
  congruence generated by $X\times X$, so $\beta'\vee\alpha'
  = \beta'\vee\gamma'$.  By $(1)$, we get that this
  congruence is also $\beta'\vee
  (\alpha'\wedge\gamma')$. Since this congruence contains
  $(a,c)$, we get that
  \[
  (a,c)\in \beta'\vee(\alpha'\wedge\gamma')\leq
  \beta\vee(\alpha\wedge\gamma)\,,
  \]
  where the inequality follows from the monotonicity of the
  lattice operations.  This argument shows that
  $
  (a,c)\in \beta\vee(\alpha\wedge\gamma)
  $
  for every $(a,c)\in \alpha\cap(\beta\circ\gamma)$, so
  $\alpha\cap(\beta\circ\gamma) \subseteq
  \beta\vee(\alpha\wedge\gamma)$ and $(2)$ holds.

  For $(2)\mimplies(3)$, let $p =
  \alpha\cap(\beta\circ\gamma)$, $r =
  \beta\vee(\alpha\wedge\gamma)$, and let $r_i$ be the
  $\{\circ,\wedge\}$-word obtained from $r$ by replacing
  $\vee$ with $i$-fold relational product. Then the
  congruence inclusion of (2) has the form $p\subseteq
  \bigcup_{i\in \omega} r_i$ with the $r_i$'s increasing. By
  the remark after Theorem~\ref{pixley-wille_extension},
  such a congruence inclusion is associated to a Maltsev
  condition. The method described in the proof of
  Theorem~\ref{pixley-wille_extension} for producing the
  Maltsev condition yields the one in item (3).

  To prove that $(3)\mimplies (4)$, we will show that the
  idempotent Maltsev condition in~$(3)$ fails in every
  nontrivial variety of modules and in the variety of
  semilattices.  Assume that $\vr M$ is the variety of all
  modules over the ring $\m r$, and that $\vr M$ satisfies
  the Maltsev condition in item (3). Each $d_i$ is a module
  term, so $d_i(x,y,z) = a_ix+b_iy+c_iz$ for some $a_i, b_i,
  c_i\in R$. Since $d_i(x,x,x)\approx x$, we get that
  $a_ix+b_ix+c_ix \approx (a_i+b_i+c_i)x\approx x$ holds in
  any $\m m\in \vr M$, hence $a_i+b_i+c_i=1$ in~$\m r$.  The
  first equation in (3)(ii) implies that $a_i=a_{i+1}$ for
  even $i$, the second equation in (3)(ii) implies that
  $b_i=b_{i+1}$ for even $i$, and using the equations of the
  type $a_i+b_i+c_i=1$ we see that $c_i=c_{i+1}$ holds for
  all even $i$. The equation from (3)(iii) implies that
  $c_i=c_{i+1}$ holds for odd $i$, so $c_i=c_{i+1}$ for all
  $i$.  But the equation from (3)(i) implies that $c_0=0$,
  while the equation from (3)(iv) implies that $c_k=1$.
  Altogether we derive that $0=1$ in~$\m r$, so $\vr M$ is a
  trivial variety of modules.

  Now suppose that $\vr S$ is the variety of semilattices,
  and that $\vr S$ satisfies the Maltsev condition in (3).
  Choose $k$ minimal for the condition in (3) to be
  satisfied in~$\vr S$. By equations (3)(i) and (3)(iv),
  it must be that $k>0$. If $k>0$ is even, then by equation
  (3)(iii) we find that $d_{k-1}(x,x,y)\approx
  d_k(x,x,y)\approx y$, which for semilattices implies that
  $d_{k-1}(x,y,z)\approx z$.  Thus we can delete the term
  $d_k$ and have a shorter sequence of terms satisfying the
  conditions in (3). If $k>0$ is odd, then the equations in
  (3)(ii) imply that $d_{k-1}$ does not depend on its first
  variable (since $d_{k-1}(x,y,y)\approx d_{k}(x,y,y)\approx
  y$), and does not depend on its second variable (since
  $d_{k-1}(x,y,x)\approx d_{k}(x,y,x)\approx x$).  Therefore
  $d_{k-1}(x,y,z)\approx d_{k-1}(z,z,z)\approx z$, and we
  can again shorten the sequence.  Hence the equations in
  (3) cannot be satisfied by semilattice terms. Thus
  (3)$\mimplies$(4).

  It follows from Theorem~\ref{SD-meet-thm}
  (10)$\mimplies$(4) that if $\vr V$ satisfies an idempotent
  Maltsev condition that fails in every nontrivial variety
  of modules, then $\vr V$ omits abelian congruences.  It
  follows from Theorem~\ref{rect_Malt_cond2} that if $\vr V$
  satisfies an idempotent Maltsev condition that fails in
  the variety of semilattices, then $\vr V$ omits
  rectangular tolerances (hence $\vr V$ omits rectangular
  congruences by Theorem~\ref{rect_cong}).  Thus
  (4)$\mimplies$(5).

  If (5) holds, then $\vr V$ has no abelian congruence, so
  from (4)$\mimplies$(1) of Theorem~\ref{SD-meet-thm} we
  derive that $\vr V$ is congruence meet semidistributive.
  The variety $\vr V$ also has no rectangular congruence, or
  tolerance, so by Theorems~\ref{rect_Malt_cond2} and
  \ref{main1} we have that $\vr V$ satisfies a nontrivial
  congruence identity. Hence (6) holds.

  Now suppose that $\vr V$ is congruence meet
  semidistributive and satisfies a nontrivial congruence
  identity.  The latter supposition implies that the
  $\sdj$-failures in congruence lattices of members of~$\vr
  V$ are all abelian, according to
  Theorem~\ref{sdj_failure=solv}.  But the former
  supposition implies that there are no abelian intervals in
  congruence lattices of members of~$\vr V$, according to
  (1)$\mimplies$(4) of Theorem~\ref{SD-meet-thm}.  This
  shows that there are no $\sdj$-failures at all, which
  means of course that $\vr V$ is congruence join
  semidistributive.

  Now that the first six items of the theorem have been
  shown to be equivalent, we turn to the seventh. Assume
  that (1) and (the equivalent property) (6) hold.  From (6)
  and Theorem~\ref{main2} we know that there is a positive
  integer $M$ such that the identity
  \[
  z^M(x,y,z)\approx z^{M+1}(x,y,z)
  \]
  holds in all congruence lattices of members of~$\vr V$.
  Thus, if $\alpha$, $\beta$ and $\gamma$ satisfy the
  conditions in the statement of item (7), and $\beta^k:=
  y^k(\alpha,\beta,\gamma)$ and $\gamma^k:=
  z^k(\alpha,\beta,\gamma)$, then $\beta^{M} = \beta^{M+1}$
  and $\gamma^{M} = \gamma^{M+1}$.  This implies that
  $\alpha\vee \beta^M \geq \alpha\vee\gamma^{M+1} =
  \alpha\vee\gamma^M$, and similarly that
  $\alpha\vee\gamma^M\geq \alpha\vee \beta^M$, so
  $\alpha\vee \beta^M = \alpha\vee\gamma^M$.  Since (1)
  holds, we have
  \[
  \alpha\vee(\beta^M\wedge \gamma^M) =
  \alpha\vee \beta^M\,.
  \]
  But $\beta\wedge\gamma \leq \beta^M\wedge \gamma^M \leq
  \beta^M\leq \beta$ and $\beta\wedge\gamma \leq
  \beta^M\wedge \gamma^M \leq \gamma^M\leq \gamma$, so
  $\beta^M\wedge \gamma^M = \beta\wedge \gamma$.  Therefore
  \[
  \alpha\vee(\beta\wedge \gamma) = 
  \alpha\vee \beta^M\,,
  \]
  and similarly
  \[
  \alpha\vee(\beta\wedge \gamma) = 
  \alpha\vee \gamma^M\,.
  \]
  This proves that $\alpha\vee(\beta\wedge \gamma) =
  (\alpha\vee \beta^M) \wedge (\alpha\vee \gamma^M)$ for the
  fixed value of~$M$ provided by Theorem~\ref{main2}.

  If item (7) holds, then ${\rm CON}({\vr V})$ satisfies the
  weakened distributive law $x\vee(y\wedge z)\approx (x\vee
  y^N)\wedge (x\vee z^N)$ for some $N$. We claim that any
  lattice satisfying this law is join semidistributive.
  Indeed, if $\m l$ is a lattice, $a, b, c\in L$, and $b^k:=
  y^k(a,b,c)$ and $c^k:= z^k(a,b,c)$, then it may be shown
  by induction that if $a\vee b = a\vee c$, then $b^k = b$
  and $c^k = c$ for all $k$.  Thus, if $d:= a\vee b = a\vee
  c$, the identity in (7) implies that
  \[
  a\vee (b\wedge c) = (a\vee b^N)\wedge (a\vee c^N) 
  = (a\vee b)\wedge (a\vee c) = d\,.
  \]
  Since $a, b, c\in L$ were chosen arbitrarily, $\m l$ is
  join semidistributive.

  Item (8) implies item (9) because $\m m_3$ and $\m d_2$
  are not join semidistributive.

  Item (9) implies item (10) because sublattices
  of~$\Conb(\m a)$ belong to ${\rm CON}({\vr V})$.

  Assume that item (10) holds. Since $\m m_3$ is not
  embeddable in the congruence lattice of any member of~$\vr
  V$, it follows from Theorem~\ref{SD-meet-thm} that $\vr V$
  is congruence meet semidistributive.  Since $\m d_2$ is
  not embeddable in the congruence lattice of any member
  of~$\vr V$, it follows from Theorem~\ref{omit_d2_sub} that
  $\vr V$ satisfies a nontrivial congruence identity.  Thus
  item (6) holds.  The proof is complete.
\end{proof}

This theorem provides a positive solution to Problem~2.18 of
\cite{jonsson3} from this theorem, which we extract as the
following corollary.

\begin{cor}
  The class of congruence join semidistributive varieties is
  definable by a(n idempotent) Maltsev condition.
\end{cor}

\begin{proof}
  By Theorem~\ref{sdj-thm}~(1)$\miff$(3).
\end{proof}

