text:
\begin{document}

\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{prop}[theorem]{Proposition}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{observation}[theorem]{Observation}
\newtheorem{defin}{Definition}
\newtheorem{example}{Example}
\newtheorem{conj}{Conjecture}

\newcommand{\PR}{\noindent {\bf Proof:\ }}

\def\EPR{\hfill $\Box$\linebreak\vskip.5mm}

\def\Pol{{\sf Pol}}
\def\mPol{{\sf MPol}}
\def\Polo{{\sf Pol}_1}
\def\PPol{{\sf pPol\;}}
\def\Inv{{\sf Inv}}
\def\mInv{{\sf MInv}}
\def\Clo{{\sf Clo}\;}
\def\Con{{\sf Con}}
\def\concom{{\sf Concom}\;}
\def\End{{\sf End}\;}
\def\Sub{{\sf Sub}}
\def\Im{{\sf Im}}
\def\Ker{{\sf Ker}\;}
\def\H{{\sf H}}
\def\S{{\sf S}}
\def\D{{\sf P}}
\def\I{{\sf I}}
\def\Var{{\sf var}}
\def\PVar{{\sf pvar}}
\def\fin#1{{#1}_{\rm fin}}
\def\P{{\sf P}}
\def\Pfin{{\sf P_{\rm fin}}}
\def\Id{{\sf Id}}
\def\R{{\rm R}}
\def\F{{\rm F}}
\def\Term{{\sf Term}}
\def\var#1{{\sf var}(#1)}
\def\Sg#1{{\sf Sg}(#1)}
\def\Sgo#1{{\sf Sg}_{\mathrm{old}}(#1)}
\def\Sgn#1{{\sf Sg}_{\mathrm{new}}(#1)}
\def\Sgg#1#2{{\sf Sg}_{#1}(#2)}
\def\Cg#1{{\sf Cg}(#1)}
\def\Cgg#1#2{{\sf Cg}_{#1}(#2)}
\def\tol{{\sf tol}}
\def\lnk{{\sf lk}}
\def\rbcomp#1{{\sf rbcomp}(#1)}

\let\cd=\cdot
\let\eq=\equiv
\let\op=\oplus
\let\omn=\ominus
\let\meet=\wedge
\let\join=\vee
\let\tm=\times
\def\ldiv{\mathbin{\backslash}}
\def\rdiv{\mathbin/}

\def\typ{{\sf typ}}
\def\zz{{\un 0}}
\def\zo{{\un 1}}
\def\one{{\bf1}}
\def\two{{\bf2}}
\def\three{{\bf3}}
\def\four{{\bf4}}
\def\five{{\bf5}}
\def\pq#1{(\zz_{#1},\mu_{#1})}

\let\wh=\widehat
\def\ox{\ov x}
\def\oy{\ov y}
\def\oz{\ov z}
\def\of{\ov f}
\def\oa{\ov a}
\def\ob{\ov b}
\def\oc{\ov c}
\def\od{\ov d}
\def\oob{\ov{\ov b}}
\def\rx{{\rm x}}
\def\rf{{\rm f}}
\def\rrm{{\rm m}}
\let\un=\underline
\let\ov=\overline
\let\cc=\circ
\let\rb=\diamond
\def\ta{{\tilde a}}
\def\tz{{\tilde z}}

\def\zZ{{\mathbb Z}}
\def\B{{\mathcal B}}
\def\P{{\mathcal P}}
\def\zA{{\mathbb A}}
\def\zB{{\mathbb B}}
\def\zC{{\mathbb C}}
\def\zD{{\mathbb D}}
\def\zE{{\mathbb E}}
\def\zF{{\mathbb F}}
\def\zG{{\mathbb G}}
\def\zK{{\mathbb K}}
\def\zL{{\mathbb L}}
\def\zM{{\mathbb M}}
\def\zN{{\mathbb N}}
\def\zQ{{\mathbb Q}}
\def\zR{{\mathbb R}}
\def\zS{{\mathbb S}}
\def\zT{{\mathbb T}}
\def\zW{{\mathbb W}}
\def\bK{{\bf K}}
\def\C{{\bf C}}
\def\M{{\bf M}}
\def\E{{\bf E}}
\def\N{{\bf N}}
\def\O{{\bf O}}
\def\bN{{\bf N}}
\def\bX{{\bf X}}
\def\GF{{\rm GF}}
\def\cC{{\mathcal C}}
\def\cA{{\mathcal A}}
\def\cB{{\mathcal B}}
\def\cD{{\mathcal D}}
\def\cE{{\mathcal E}}
\def\cF{{\mathcal F}}
\def\cG{{\mathcal G}}
\def\cH{{\mathcal H}}
\def\cI{{\mathcal I}}
\def\cK{{\mathcal K}}
\def\cL{{\mathcal L}}
\def\cP{{\mathcal
P}} \def\cR{{\mathcal R}}
\def\cRY{{\mathcal RY}}
\def\cS{{\mathcal S}}
\def\cT{{\mathcal T}}
\def\oB{{\ov B}}
\def\oC{{\ov C}}
\def\ooB{{\ov{\ov B}}}
\def\ozB{{\ov{\zB}}}
\def\ozD{{\ov{\zD}}}
\def\ozG{{\ov{\zG}}}
\def\tcA{{\widetilde\cA}}
\def\tcC{{\widetilde\cC}}
\def\tcF{{\widetilde\cF}}
\def\tcI{{\widetilde\cI}}
\def\tB{{\widetilde B}}
\def\tC{{\widetilde C}}
\def\tD{{\widetilde D}}
\def\ttB{{\widetilde{\widetilde B}}}
\def\ttC{{\widetilde{\widetilde C}}}
\def\tba{{\tilde\ba}}
\def\ttba{{\tilde{\tilde\ba}}}
\def\tbb{{\tilde\bb}}
\def\ttbb{{\tilde{\tilde\bb}}}
\def\tbc{{\tilde\bc}}
\def\tbd{{\tilde\bd}}
\def\tbe{{\tilde\be}}
\def\tbt{{\tilde\bt}}
\def\tbu{{\tilde\bu}}
\def\tbv{{\tilde\bv}}
\def\tbw{{\tilde\bw}}
\def\tdl{{\tilde\dl}}
\def\ocP{{\ov\cP}}
\def\tzA{{\widetilde\zA}}
\def\tzC{{\widetilde\zC}}
\def\new{{\mbox{\footnotesize new}}}
\def\old{{\mbox{\footnotesize old}}}
\def\prev{{\mbox{\footnotesize prev}}}
\def\oo{{\mbox{\sf\footnotesize o}}}
\def\pp{{\mbox{\sf\footnotesize p}}}
\def\nn{{\mbox{\sf\footnotesize n}}}
\def\oR{{\ov R}}
\def\bA{\mathbf{R}}

\def\gA{{\mathfrak A}}
\def\gV{{\mathfrak V}}
\def\gS{{\mathfrak S}}
\def\gK{{\mathfrak K}}
\def\gH{{\mathfrak H}}

\def\ba{{\bf a}}
\def\bb{{\bf b}}
\def\bc{{\bf c}}
\def\bd{{\bf d}}
\def\be{{\bf e}}
\def\bbf{{\bf f}}
\def\bg{{\bf g}}
\def\bh{{\bf h}}
\def\bi{{\bf i}}
\def\bm{{\bf m}}
\def\bo{{\bf o}}
\def\bp{{\bf p}}
\def\bs{{\bf s}}
\def\bu{{\bf u}}
\def\bt{{\bf t}}
\def\bv{{\bf v}}
\def\bx{{\bf x}}
\def\by{{\bf y}}
\def\bw{{\bf w}}
\def\bz{{\bf z}}
\def\ga{{\mathfrak a}}
\def\oal{{\ov\al}}
\def\obeta{{\ov\beta}}
\def\ogm{{\ov\gm}}
\def\oep{{\ov\varepsilon}}
\def\oeta{{\ov\eta}}
\def\oth{{\ov\th}}
\def\ovm{{\ov\mu}}
\def\ozero{{\ov0}}

\def\CCSP{\hbox{\rm c-CSP}}
\def\CSP{{\rm CSP}}
\def\NCSP{{\rm \#CSP}}
\def\mCSP{{\rm MCSP}}
\def\FP{{\rm FP}}
\def\PTIME{{\bf PTIME}}
\def\GS{\hbox{($*$)}}
\def\ry{\hbox{\rm r+y}}
\def\rb{\hbox{\rm r+b}}
\def\Gr#1{{\mathrm{Gr}(#1)}}
\def\Grp#1{{\mathrm{Gr'}(#1)}}
\def\Grpr#1{{\mathrm{Gr''}(#1)}}
\def\Scc#1{{\mathrm{Scc}(#1)}}
\def\rel{R}
\def\relo{Q}
\def\rela{S}
\def\dep{\mathsf{dep}}
\def\Filt{\mathrm{Ft}}
\def\Filts{\mathrm{Fts}}
\def\Agr{$\mathbb{A}$}
\def\Al{\mathrm{Alg}}
\def\Sig{\mathrm{Sig}}
\def\strat{\mathsf{strat}}
\def\relmax{\mathsf{relmax}}
\def\srelmax{\mathsf{srelmax}}
\def\Meet{\mathsf{Meet}}
\def\amax{\mathsf{amax}}
\def\umax{\mathsf{umax}}
\def\as{\mathsf{as}}
\def\asm{\mathsf{asm}}
\def\se#1{\mathsf{s}(#1)}
\def\see#1#2{\mathsf{s}_{#1}(#2)}
\def\star{\hbox{$(*)$}}
\def\bmal{{\mathbf m}}
\def\Af{\mathsf{Af}}
\let\sqq=\sqsubseteq

\let\sse=\subseteq
\def\ang#1{\langle #1 \rangle}
\def\angg#1{\left\langle #1 \right\rangle}
\def\dang#1{\ang{\ang{#1}}}
\def\vc#1#2{#1 _1\zd #1 _{#2}}
\def\tms#1#2{#1 _1\tm\dots\tm #1 _{#2}}
\def\zd{,\ldots,}
\let\bks=\backslash
\def\red#1{\vrule height7pt depth3pt width.4pt
\lower3pt\hbox{$\scriptstyle #1$}}
\def\fac#1{/\lower2pt\hbox{$\scriptstyle #1$}}
\def\me{\stackrel{\mu}{\eq}}
\def\nme{\stackrel{\mu}{\not\eq}}
\def\eqc#1{\stackrel{#1}{\eq}}
\def\cl#1#2{\arraycolsep0pt
\left(\begin{array}{c} #1\\ #2 \end{array}\right)}
\def\cll#1#2#3{\arraycolsep0pt \left(\begin{array}{c} #1\\ #2\\
#3 \end{array}\right)}
\def\clll#1#2#3#4{\arraycolsep0pt
\left(\begin{array}{c} #1\\ #2\\ #3\\ #4 \end{array}\right)}
\def\cllll#1#2#3#4#5#6{ \left(\begin{array}{c} #1\\ #2\\ #3\\
#4\\ #5\\ #6 \end{array}\right)}
\def\pr{{\rm pr}}
\let\upr=\uparrow
\def\ua#1{\hskip-1.7mm\uparrow^{#1}}
\def\sua#1{\hskip-0.2mm\scriptsize\uparrow^{#1}}
\def\lcm{{\rm lcm}}
\def\perm#1#2#3{\left(\begin{array}{ccc} 1&2&3\\ #1
\end{array}\right)}
\def\w{$\wedge$}
\let\ex=\exists
\def\NS{{\sc (No-G-Set)}}
\def\lev{{\sf lev}}
\let\rle=\sqsubseteq
\def\ryle{\le_{ry}}
\def\ryprec{\le_{ry}}
\def\os{\mbox{[}}
\def\zs{\mbox{]}}
\def\link{{\sf link}}
\def\solv{\stackrel{s}{\sim}}
\def\mal{\mathbf{m}}
\def\precs{\prec_{as}}
\def\maj{\mathrm{maj}}

\def\lb{$\linebreak$}

\def\ar{\hbox{ar}}
\def\Im{{\sf Im}\;}
\def\deg{{\sf deg}}
\def\id{{\rm id}}

\let\al=\alpha
\let\gm=\gamma
\let\dl=\delta
\let\ve=\varepsilon
\let\ld=\lambda
\let\om=\omega
\let\vf=\varphi
\let\vr=\varrho
\let\th=\theta
\let\sg=\sigma
\let\Gm=\Gamma
\let\Dl=\Delta

\font\tengoth=eufm10 scaled 1200
\font\sixgoth=eufm6
\def\goth{\fam12}
\textfont12=\tengoth
\scriptfont12=\sixgoth
\scriptscriptfont12=\sixgoth
\font\tenbur=msbm10
\font\eightbur=msbm8
\def\bur{\fam13}
\textfont11=\tenbur
\scriptfont11=\eightbur
\scriptscriptfont11=\eightbur
\font\twelvebur=msbm10 scaled 1200
\textfont13=\twelvebur
\scriptfont13=\tenbur
\scriptscriptfont13=\eightbur
\mathchardef\nat="0B4E
\mathchardef\eps="0D3F

\title{Local structure of idempotent algebras II}
\author{Andrei A.\ Bulatov

}
\date{}
\maketitle
\begin{abstract}
In this paper we continue the study of edge-colored graphs associated with
finite idempotent algebras initiated in [A.Bulatov, ``Local structure of
idempotent algebras I'', CoRR, abs/2006.09599, 2020.]. We prove stronger
connectivity properties of such
graphs that will allows us to demonstrate several useful structural features
of subdirect products of idempotent algebras such as rectangularity and
2-decomposition.
\end{abstract}

\section{Introduction and Preliminaries}\label{sec:intro}

We continue the study of graphs associated with algebras that was initiated
in the first part of this paper \cite{Bulatov20:graph} (see also
\cite{Bulatov16:graph}).

The vertices of the graph $\cG(\zA)$ associated with an idempotent algebra
$\zA$ are the elements of $\zA$, and the edges are pairs of vertices
that have certain properties with respect to term operations of
$\zA$, see the definitions below. Two kinds of edges were introduced,
`thick' and `thin', where the thin version is a more technical kind, perhaps
less intuitive, but also more suitable as a tool for the results of this part.
Thin edges are also directed converting $\cG(\zA)$ into a digraph.
In the second part we first focus on the connectivity properties of this
digraph, in particular, we show that more vertices are connected by directed paths
of thin edges than one might expect (Theorem~\ref{the:connectivity}).
Then we study the structure of subdirect products of algebras.
An important role here is played by so-called as-components of algebras,
which are subsets of algebras defined through certain connectivity properties.
We prove that subdirect products when restricted to as-components
have the property of rectangularity similar to Mal'tsev algebras, and also
similar to the Absorption Theorem (see, e.g.\ \cite{Barto12:absorbing}).

Finally, we show that,
again, modulo as-components any subdirect product is 2-decomposable,
similar to Baker-Pixley Theorem \cite{Baker75:chinese-remainder}.

\subsection{Thick edges}

We start with reminding the main definitions and results from
\cite{Bulatov20:graph}. Operation $x-y+z$ of a module $\zM$ is said
to be \emph{affine}. Let $\zA$ be a finite algebra with universe
$A$. Recall that for $B\sse A$ the subalgebra of $\zA$ generated by
$B$ is denoted $\Sgg\zA B$, or just $\Sg B$ if $\zA$ is clear from the
context. Edges of $\zA$ are defined as follows.
A pair $ab$ of vertices is an \emph{edge} if and only if
there exists a maximal congruence $\th$ of $\Sg{a,b}$ such that either
$\Sg{a,b}\fac\th$ is a set, or it is term equivalent to the full idempotent
reduct of a module (we will simply say that $\Sg{a,b}\fac\th$ is a module)
and there is a term operation of $\zA$ such
that $f\fac\th$ is an affine operation of $\Sg{a,b}\fac\th$, or
there exists a term operation of $\zA$ such that $f\fac\th$ is a semilattice
operation on $\{a^\th,b^\th\}$, or $f\fac\th$
is a majority operation on $\{a^\th,b^\th\}$.

If there exists a maximal congruence and a term operation of $\zA$ such that
$f\fac\th$ is a semilattice operation on $\{a\fac\th,b\fac\th\}$ then $ab$ is
said to have the {\em semilattice} type. Edge $ab$ is of the
{\em majority} type if it is not of the semilattice type, and there are a
maximal congruence $\th$ and $f\in\Term(\zA)$ such that $f\fac\th$
is a majority
operation on $\{a\fac\th,b\fac\th\}$. Pair $ab$ has the {\em affine type}
if there are a maximal congruence $\th$ and $f\in\Term(\zA)$
such that $\Sg{a,b}\fac\th$ is a module and $f\fac\th$ is its
affine operation. Finally, $ab$ is of the
\emph{unary type} if $\Sg{a,b}\fac\th$ is a set. In all cases we say that
congruence $\th$ \emph{witnesses} the type of edge $ab$. The set
$\{a\fac\th, b\fac\th\}$ will often be referred to as a \emph{thick} edge.

In this paper we assume that $\zA$ does not have edges of the unary type,
which is equivalent to the statement that $\var\zA$, the variety generated by
$\zA$, omits type \one\ (Theorem 5(2) of \cite{Bulatov20:graph}).
We restate the relevant results from \cite{Bulatov20:graph}.

\begin{theorem}[Theorem~5(2,3) of \cite{Bulatov20:graph}]
\label{the:connectedness}
Let $\zA$ be an idempotent algebra $\zA$ such that
$\var\zA$ omits type \one. Then
\begin{itemize}
\item[(1)]
any two elements of $\zA$ are connected by a sequence of edges of
the semilattice, majority, and affine types;
\item[(2)]
$\var\zA$ omits types \one\ and \two\ if and only if $\zA$
contains no edges of the unary and affine types.
\end{itemize}
\end{theorem}

Algebra $\zA$ is said to be \emph{smooth} if for every edge $ab$ of
the semilattice or majority type, $a\fac\th\cup b\fac\th$, where $\th$ is a
congruence witnessing that $ab$ is an edge, is a subalgebra of $\zA$.

\begin{theorem}[Theorem~12 of \cite{Bulatov20:graph}]
\label{the:smooth}
For any idempotent algebra $\zA$ such that $\zA$ does not contain edges
of the unary type there is a reduct $\zA'$ of $\zA$ that is smooth
and $\zA'$ does not contain edges of the unary type.

Moreover, if $\zA$ does not contain edges of the affine types, $\zA'$
can be chosen such that it does not contain edges of the affine type.
\end{theorem}

In the case of smooth algebras the operations involved in the
definition of edges can be significantly unified.

\begin{theorem}[Theorem~21, Corollary~22 of \cite{Bulatov20:graph}]
\label{the:uniform}
Let $\cK$ be a finite set of similar smooth idempotent algebras.
There are term operations $f,g,h$ of $\cK$ such that for every
edge $ab$ of $\zA\in\cK$, where $\th$ is a congruence of $\Sg{a,b}$
witnessing that $ab$ is an edge and $B=\{a\fac\th,b\fac\th\}$
\begin{description}
\item[(i)]
$f\red B$ is a semilattice
operation if $ab$ is a semilattice edge, and it is the first projection if $ab$ is a
majority or affine edge;
\item[(ii)]
$g\red B$ is a majority operation if $ab$ is a majority edge, it is the first
projection if $ab$ is a affine edge, and $g\red B(x,y,z)=f\red B(x,f\red B(y,z))$
if $ab$ is semilattice;
\item[(iii)]
$h\red{\Sg{a,b}\fac\th}$ is an affine operation
operation if $ab$ is an affine edge, it is the first
projection if $ab$ is a majority edge, and
$h\red B(x,y,z)=f\red B(x,f\red B(y,z))$ if $ab$ is semilattice.
\end{description}
\end{theorem}

Operations $f,g,h$ from Theorem~\ref{the:uniform} above can be chosen
to satisfy certain identities.

\begin{lemma}[Lemma~23 of \cite{Bulatov20:graph}]\label{lem:fgh-identities}
Operations $f,g,h$ identified in Theorem~\ref{the:uniform} can be chosen
such that
\begin{itemize}\itemsep0pt
\item[(1)]
$f(x,f(x,y))=f(x,y)$ for all $x,y\in\zA\in\cK$;
\item[(2)]
$g(x,g(x,y,y),g(x,y,y))=g(x,y,y)$ for all $x,y\in\zA\in\cK$;
\item[(3)]
$h(h(x,y,y),y,y)=h(x,y,y)$ for all $x,y\in\zA\in\cK$.
\end{itemize}
\end{lemma}

\begin{prop}[Lemmas~8,10 of \cite{Bulatov20:graph}]\label{pro:edge-extend}
Let $\zA$ be an idempotent algebra.
Then\\[1mm]
(1) if $ab$ an edge in $\zA$, it is an edge of the same type in any
subalgebra $\zB$ of $\zA$ containing $a,b$;\\[1mm]
(2) if $\al$ is a congruence of $\zA$ and $a\fac\al b\fac\al$, $a,b\in\zA$,
 is an edge in $\cG(\zA\fac\al)$ then $ab$ is also an edge in $\cG(\zA)$
 of the same type.
\end{prop}

We often use Proposition~\ref{pro:edge-extend}(2) as given
in the following statement that is obtained from
Proposition~\ref{pro:edge-extend}(2) by taking $\zA$ to be $\rel$
and $\al$ to be the projection congruence on $\zA$.

\begin{corollary}\label{cor:edge-extend}
Let $\zB$ be an idempotent algebra and $ab$ an edge in $\zB$.
Then if $\rel$ is a subalgebra of $\zB\tm\zC$ and $\ba,\bb\in\rel$ with
$\ba[1]=a,\bb[1]=b$, then $\ba\bb$ is an edge of the same type
as $ab$ in $\rel$.
\end{corollary}

Corollary~\ref{cor:edge-extend} can be straightforwardly
extended to the following claim: if $\rel$ is a subdirect product of
$\tms\zA n$, $I\sse[n]$, and $\ba\bb$ is an edge in $\pr_I\rel$,
then for any $\ba',\bb'\in\rel$ with $\pr_I\ba'=\ba,\pr_I\bb'=\bb$,
the pair $\ba'\bb'$ is an edge in $\rel$ of the same type as $\ba\bb$.
Also note that, as Example~9 from \cite{Bulatov20:graph} shows that
if $ab$ is an edge in $\zA$ and $\al\in\Con(\zA)$, then $a\fac\al b\fac\al$
does not have to be an edge even if $a\fac\al\ne b\fac\al$.

Several times we will also use the classification of simple idempotent
algebras from \cite{Kearnes96:idempotent}, see also Proposition~3 from
\cite{Bulatov20:graph}. Recall that an element $a$ of an algebra $\zA$
is said to be {\em absorbing} if whenever $t(x,\vc yn)$ is an
$(n+1)$-ary term operation of $\zA$ such that $t$ depends on $x$ and
$\vc bn\in\zA$, then $t(a,\vc bn)=a$. A congruence $\th$ of
$\zA^2$ is said to be {\em skew} if it is the kernel of no projection
mapping of $\zA^2$ onto its factors. The following theorem due to
Kearnes \cite{Kearnes96:idempotent} provides some information
about the structure of simple idempotent algebras.

\begin{theorem}[\cite{Kearnes96:idempotent}, Proposition~3 of
\cite{Bulatov20:graph}]\label{the:simple-idempotent}
Let $\zA$ be a finite simple idempotent algebra. Then exactly
one of the following holds:
\begin{itemize}\itemsep0pt
\item[(a)]
$\zA$ is a set;
\item[(a')]
$\zA$ is the full idempotent reduct of a finite module;
\item[(b)]
$\zA$ has an absorbing element;
\item[(c)]
$\zA^2$ has no skew congruence.
\end{itemize}
\end{theorem}

\subsection{Thin edges}

Thin edges, also introduced in \cite{Bulatov20:graph}, offer a better
technical tool.

Fix a finite class $\cK$ of smooth algebras closed under taking subalgebras
and homomorphic images. Let $\zA\in\cK$ be a smooth algebra, $a,b\in\zA$,
$\zB=\Sg{a,b}$, and $\th$ a congruence of $\zB$. Pair $ab$ is said to be
\emph{minimal} with respect to $\th$ if for any $b'\in b\fac\th$,
$b\in\Sg{a,b'}$. A ternary term $g'$ is said to satisfy the \emph{majority
condition} (with respect to $\cK$) if it satisfies the conditions of
Lemma~\ref{lem:fgh-identities}(2), and $g'$ is a majority operation on every
thick majority edge of every algebra from $\cK$. A ternary term operation
$h'$ is said to satisfy the \emph{minority condition} if it satisfies the conditions
of Lemma~\ref{lem:fgh-identities}(3), and $h'$ is a Mal'tsev
operation on every thick affine edge of every algebra from $\cK$. By
Theorem~\ref{the:uniform} operations satisfying the majority and
minority conditions exist.

A semilattice edge $ab$ in $\zA$
is called a \emph{thin semilattice edge} if the equality relation witnesses
that it is a semilattice edge; or in other words if there is a term operation
$f$ such that $f(a,b)=f(b,a)=b$.

A pair $ab$ is called a \emph{thin majority edge} if
\begin{itemize}
\item[(*)]
for any term operation $g'$ satisfying the majority condition,
the subalgebras $\Sg{a,g'(a,b,b)},\Sg{a,g'(b,a,b)},\Sg{a,g'(b,b,a)}$
contain $b$.
\end{itemize}
If $ab$ is also a majority edge, a congruence $\th$ witnesses that and
$ab$ is a minimal pair with respect to $\th$, $ab$ is said to be a
\emph{special thin majority edge}.

Fix an operation $h$ satisfying the minority condition, in particular it
satisfies the equation $h(h(x,y,y),y,y)=h(x,y,y)$. A pair $ab$ is called
a \emph{thin affine edge} (with respect to $\cK$) if $h(b,a,a)=b$ and
for every term operation $h'$ satisfying the minority condition
\begin{itemize}
\item[(**)]
$b\in\Sg{a,h'(a,a,b)}$.
\end{itemize}
The operations $g,h$ from Theorem~\ref{the:uniform} do not
have to satisfy any specific conditions on the set $\{a,b\}$, when
$ab$ is a thin majority or affine edge, except what follows from their
definition. Also, both thin majority and thin affine edges are
directed, since $a,b$ in the definition occur asymmetrically. Note also, that
what pairs of an algebra $\zA$ are thin majority and minority
edges depend not only on the algebra itself, but also on the underlying
class $\cK$. If we are not interested in any particular class, set
$\cK=\H\S(\zA)$.

\begin{lemma}[Corollaries~25,29,33 Lemmas~28,32, \cite{Bulatov20:graph}]
\label{lem:thin-semilattice}
Let $\zA\in\cK$ and let $ab$ be a semilattice (majority, affine) edge,
$\th$ a congruence of
$\Sg{a,b}$ that witnesses this, and $c\in a\fac\th$. Then, if $ab$ is
a semilattice or majority edge, then for any $d\in b\fac\th$ such that
$cd$ is a minimal pair with respect to $\th$ the pair $cd$ is a thin
semilattice or special majority edge. If $ab$ is affine then for any
$d\in b\fac\th$ such that $ad$ is a minimal pair with respect to
$\th$ and $h(d,a,a)=d$ the pair $ad$ is a thin affine edge. Moreover,
$d\in b\fac\th$ satisfying these conditions exists.
\end{lemma}

The binary operation $f$ from Theorem~\ref{the:uniform} can be
chosen to satisfy a special property.

\begin{prop}[Proposition~24, \cite{Bulatov20:graph}]\label{pro:good-operation}
Let $\cK$ be a finite class of similar smooth idempotent algebras. There
is a binary term operation $f$ of $\cK$ such that $f$ is a semilattice
operation on every thick semilattice edge of every $\zA\in\cK$ and for
any $a,b\in\zA$, $\zA\in\cK$, either $a=f(a,b)$ or the pair $(a,f(a,b))$
is a thin semilattice edge.
\end{prop}

For a class $\cK$ of similar smooth idempotent algebras we assume
that operation $f$ satisfying the conditions of
Proposition~\ref{pro:good-operation} is fixed, and use $\cdot$ to
denote it (think multiplication). If $ab$ is a thin semilattice edge,
that is, $a\cdot b=b\cdot a=b$, we write $a\le b$.

\begin{lemma}[Lemmas~27,31,35, \cite{Bulatov20:graph}]
\label{lem:thin-combination}
(1) Let $\zA_1,\zA_2,\zA_3\in\cK$ be similar smooth idempotent algebras.
Let $a_1b_1$, $a_2b_2$, and $a_3b_3$ be thin majority edges in
$\zA_1,\zA_2,\zA_3$. Then there is an operation $g'$ such that
$g'(a_1,b_1,b_1)=b_1$, $g'(b_2,a_2,b_2)=b_2$,
$g'(b_3,b_3,a_3)=b_3$. In particular, for any thin majority edge
$ab$ there is an operation $g'$ satisfying the majority condition such that
$g'(a,b,b)=g'(b,a,b)=g'(b,b,a)=b$.\\[1mm]
(2) Let $ab$ and $cd$ be thin affine edges in $\zA_1,\zA_2\in\cK$. Then
there is an operation $h'$ such that $h'(b,a,a)=b$ and
$h'(c,c,d)=d$. In particular, for any thin affine edge $ab$ there
is an operation $h'$ such that $h'(b,a,a)=h'(a,a,b)=b$.\\[1mm]
(3) Let $ab$ and $cd$ be thin edges in $\zA_1,\zA_2\in\cK$.
If they have different types there is a binary term operation $p$ such that
$p(b,a)=b$, $p(c,d)=d$.
\end{lemma}

\subsection{Paths and fiters}

Let $\zA\in\cK$ be a smooth algebra. A \emph{path} in $\zA$ is a sequence
$a_0,a_1\zd a_k$ such
that $a_{i-1}a_i$ is a thin edge for all $i\in[k]$ (note that thin edges
are always assumed to be directed).
We will distinguish paths of several types depending on what types of
edges allowed. If $a_{i-1}\le a_i$ for all $i\in[k]$ then the path is
called a \emph{semilattice} or \emph{s-path}. If for every $i\in[k]$
either $a_{i-1}\le a_i$ or $a_{i-1}a_i$ is a thin
affine edge then the path is called \emph{affine-semilattice} or
\emph{as-path}. Similarly, if only semilattice and thin majority edges
are allowed we have a \emph{semilattice-majority} or
\emph{sm-path}. The path is called \emph{asm-path} when all types
of edges are allowed. If
there is a path $a=a_0,a_1\zd a_k=b$ which is arbitrary (semilattice,
affine-semilattice, semilattice-majority) then $a$ is said to be
\emph{asm-connected} (or \emph{s-connected}, or
\emph{as-connected}, or \emph{sm-connected}) to $b$. We will also
say that $a$ is \emph{connected} to $b$ if it is asm-connected.
We denote this by $a\sqq^{asm}b$
(for asm-connectivity), $a\sqq b$, $a\sqq^{as}b$ and
$a\sqq^{sm}b$ for s-, as-, and sm-connectivity, respectively.
If all the thin majority edges in a sm- or asm-path are special,
we call such path special. The following is a direct inplication of
Theorem~\ref{the:connectedness} and Lemma~\ref{lem:thin-semilattice}.

\begin{corollary}\label{cor:oriented}
Any two elements of a smooth algebra $\zA\in\cK$ are connected with an
oriented path consisting of thin edges.
\end{corollary}

Let $\cG_s(\zA)$ ($\cG_{as}(\zA),\cG_{asm}(\zA)$) denote the digraph
whose nodes are the elements of $\zA$, and the edges are the thin
semilattice edges (thin semilattice and affine edges, arbitrary thin edges,
respectively). The strongly connected component of $\cG_s(\zA)$
containing $a\in\zA$ will be denoted by $\se a$. The set of strongly
connected components of $\cG_s(\zA)$ are ordered in the natural
way (if $a\le b$ then $\se a\le \se b$), the elements belonging to
maximal ones will be called \emph{maximal}, and the set of all
maximal elements from $\zA$ will be denoted by $\max(\zA)$.

The strongly connected component of $\cG_{as}(\zA)$ containing
$a\in\zA$ will be denoted by $\as(a)$. A maximal strongly connected
component of this graph is called an
\emph{as-component}, an element from an as-component
is called \emph{as-maximal}, and the set of all as-maximal elements is
denoted by $\amax(\zA)$.

Finally, the strongly connected component of $\cG_{asm}(\zA)$ containing
$a\in\zA$ will be denoted by $\asm(a)$. A maximal strongly connected
component of this graph is called an \emph{universally maximal
component} (or \emph{u-maximal component} for short), an element
from a u-component is called \emph{u-maximal}, and the set of all
u-maximal elements is denoted by $\umax(\zA)$.

Alternatively, maximal, as-maximal, and u-maximal elements
can be characterized as follows: an element $a\in\zA$ is
maximal (as-maximal, u-maximal) if for every $b\in\zA$ such
that $a\sqq b$ ($a\sqq^{as}b$, $a\sqq^{asm} b$)
it also holds that $b\sqq a$ ($b\sqq^{as}a$, $b\sqq^{asm}a$).
Sometimes it will be convenient to specify what the algebra is,
in which we consider maximal components, as-components,
or u-maximal components, and the corresponding connectivity.
In such cases we we will specify it by writing $\see \zA a$,
$\as_\zA(a)$, or $\asm_\zA(a)$. For connectivity we will use
$a\sqq_\zA b$, $a\sqq_\zA^{as}b$, and $a\sqq_\zA^{asm}b$.

By $\Filt_\zA(a)=\{b\in\zA\mid a\sqq_\zA b\}$ we
denote the set of elements $a$ is connected to (in terms of
semilattice paths); similarly, by
$\Filt^{as}_\zA(a)=\{b\in\zA\mid a\sqq_\zA^{as} b\}$ and
$\Filt^{asm}_\zA(a)=\{b\in\zA\mid a\sqq_\zA^{asm} b\}$ we
denote the set of elements $a$ is as-connected and
asm-connected to. Also, $\Filt_\zA(C)=\bigcup_{a\in C}\Filt_\zA(a)$
($\Filt^{as}_\zA(C)=\bigcup_{a\in C}\Filt^{as}_\zA(a)$,
$\Filt^{asm}_\zA(C)=\bigcup_{a\in C}\Filt^{asm}_\zA(a)$,
respectively) for $C\sse \zA$. Note that if $a$ is a maximal
(as-maximal or u-maximal) element then $\se a=\Filt_\zA(a)$
($\as(a)=\Filt^{as}_\zA(a)$, and $\umax(a)\sse\Filt^{asm}_\zA(b)$).

\section{Maximality}\label{sec:maximality}

In this section we study properties of (s-, as-, asm-) paths and
(as-, asm-) maximal elements and the connections between
(as-, asm-) maximal elements of an algebra with those in a
quotient algebra or subdirect product.

We start with a simple observation that a path (of thin edges) in a
quotient algebra or subdirect product gives rise to a path in the
original algebra or a factor of the product.

\begin{lemma}\label{lem:quotient-edge}
Let $\zA\in\cK$ and $\th\in\Con(\zA)$.\\[1mm]
(1) If $\oa\ob$ is a thin edge in $\zA\fac\th$ and $a\in\oa$,
then there is $b\in\ob$ such that $ab$ is a thin edge in $\zA$
of the same type.
Morever, if $\oa\ob$ is a special thin majority edge, then
so is $ab$. \\[1mm]
(2) If $ab$ is a thin edge in $\zA$, then $a\fac\th b\fac\th$
is a thin edge in $\zA\fac\th$.
\end{lemma}

\begin{remark}
Note that in Lemma~\ref{lem:quotient-edge}(2) if $ab$
is a special thin majority edge, there is no guarantee
that $a\fac\th b\fac\th$ is also a special edge.
\end{remark}

\begin{proof}
Note first that by the assumption $\zA\fac\th\in\cK$.
Pick an arbitrary $b\in\ob$ such that the pair
$ab$ is minimal with respect to $\th$. Let
$\zB=\Sgg\zA{a,b}$.

First, if $\oa\ob$ is a thin semilattice edge, then
$ab$ is a semilattice edge as witnessed by $\th'$,
the restriction of $\th$ on $\zB$. Then by
Lemma~\ref{lem:thin-semilattice} $ab$ is a
thin semilattice edge.

Now suppose  that $\oa\ob$ is a thin majority edge.
Let $g'$ be an operation satisfying the majority property for $\zA$
with respect to $\cK$; then

$g'$ also satisfies the majority property for $\zA\fac\th$.
Let $c=g'(a,b,b)$. Since $\oa\ob$
is a thin majority edge, there is a binary term operation $t$
such that $t(\oa,c\fac\th)=\ob$. Note that
$t(a,c)\in\zB$, as well. By the choice of $b$, it holds
that $b\in\Sg{a,t(a,c)}$. Therefore, $b\in\Sg{a,g'(a,b,b)}$.
That $b\in\Sg{a,g'(b,a,b)}$ and $b\in\Sg{a,g'(b,b,a)}$
can be proved in the same way. Suppose in addition that
$\oa\ob$ is a special thin majority edge, that is, it is
a majority edge in $\zA\fac\th$ and it is witnessed by a
congruence $\eta$ of $\Sgg{\zA\fac\th}{\oa,\ob}$.
It is then straightforward that $ab$ is a majority edge
as witnessed by the congruence
$\eta\fac\th=\{(d,e)\in\zB^2\mid d\fac\th\eqc\eta e\fac\th\}$.

Finally, suppose that $\oa\ob$ is a thin affine edge, and set
$b'=h(b,a,a)$, where $h$ is the operation identified in
Theorem~\ref{the:uniform}(iii). By Lemma~\ref{lem:fgh-identities}(3)
$h(b',a,a)=b'$. Note that $ab'$ is a minimal pair as well.
Consider $c=h(a,a,b')$. Since $\oa\ob$
is a thin affine edge, $\ob\in\Sgg{\zA\fac\th}{\oa,c\fac\th}$.
This means that there is $d\in\Sgg\zA{a,c}$ such that
$d\in\ob$. Since $d\in\Sgg\zA{a,b'}$ and $ab'$ is a minimal
pair with respect to $\th$, we obtain $b'\in\Sgg\zA{a,d}
\sse\Sgg\zA{a,c}$. Thus $ab'$ is a thin affine edge.

\smallskip

(2) If $a\eqc\th b$, the statement of the lemma is trivial.
Otherwise if $a\le b$, then
$a\fac\th\cdot b\fac\th=b\fac\th\cdot a\fac\th=b\fac\th$ showing that
$a\fac\th\le b\fac\th$.
If $ab$ is a thin majority edge, then consider an abitrary
$g'$ satisfying the majority condition. Since
$b\in\Sgg\zA{a,g'(a,b,b)}$, we also have
$b\fac\th\in\Sgg{\zA\fac\th}{a\fac\th,g'(a\fac\th,b\fac\th,b\fac\th)}$.
The argument for the rest of condition (*) is similar.
If $ab$ is a thin affine edge, then $h(b,a,a)=b$, implying
$h(b\fac\th,a\fac\th,a\fac\th)=b\fac\th$. Also, as
$b\in\Sgg\zA{a,h(a,a,b)}$, we have
$b\fac\th\in\Sgg\zA{a\fac\th,h(a\fac\th,a\fac\th,b\fac\th)}$
\end{proof}

The next statement straightforwardly follows from
Lemma~\ref{lem:quotient-edge}.

\begin{corollary}\label{cor:quotient-path}
Let $\zA\in\cK$ and $\th\in\Con\zA$.\\[1mm]
(1) If $\vc{\oa}k$ is an s- (as-,asm-) path in $\zA\fac\th$ and
$a\in \oa_1$, then there are $a_i\in\oa_i$ such that
$a_1=a$ and $\vc ak$ is an s- (as-, asm-) path in $\zA$.
Morever, if $\vc{\oa}k$ is a special asm-path, then
$\vc ak$ is also a special asm-path. \\[1mm]
(2) If $\vc ak$ is an s- (as-, asm-) path in $\zA$, then
the sequence $a_1\fac\th\zd a_\ell\fac\th$ is an s- (as-, asm-)
path in $\zA\fac\th$
\end{corollary}

\begin{corollary}\label{cor:quotient-max}
Let $\zA\in\cK$ and $\th\in\Con\zA$.\\[1mm]
(1) If $\oa\in\zA\fac\th$ is maximal (as-maximal, u-maximal) in
$\zA\fac\th$, then there is $a\in\oa$ that is maximal (as-maximal,
u-maximal) in $\zA$.\\[1mm]
(2) If $a$ is maximal (as-maximal, u-maximal) in $\zA$, then $a\fac\th$ is
maximal (as-maximal, u-maximal) in $\zA\fac\th$.
\end{corollary}

\begin{proof}
(1) We will use notation $c\sqq^x d$, $x\in\{s,as,asm\}$, to denote that
there is an $x$-path from $c$ to $d$. Pick an arbitrary $a'\in\oa$ and
let $b$ be any $x$-maximal element of $\zA$ such that $a'\sqq^x b$.
This means that there is an $x$-path from $a'$ to $b$, and by
Corollary~\ref{cor:quotient-path}(2) there is also an $x$-path from
$a'\fac\th$ to $b\fac\th$ in $\zA\fac\th$. Since by the assumption $\oa$
is $x$-maximal, there is also an $x$-path in $\zA\fac\th$ from
$b\fac\th$ to $\oa$. By Corollary~\ref{cor:quotient-path}(1)
there is an $x$-path in $\zA$ from $b$ to some element $a''\in\oa$.
Since $b$ is an $x$-maximal element, so is $a''$.

\smallskip

(2) Suppose that $a\fac\th\sqq^x b\fac\th$ for some $b\in\zA$. It suffices
to show that in this case $b\fac\th\sqq^x a\fac\th$. By
Corollary~\ref{cor:quotient-path}(1) there is an $x$-path in $\zA$
from $a$ to some $b'\in b\fac\th$. Since $a$ is $x$-maximal, there also
exists an $x$-path $b'=b_1\zd b_k=a$ from $b'$ to $a$. By
Corollary~\ref{cor:quotient-path}(2)
$b\fac\th=b_1\fac\th\zd b_k\fac\th=a\fac\th$
is an $x$-path in $\zA\fac\th$ from $b\fac\th$ to $a\fac\th$.
\end{proof}

The following statements will allow us to extend thin edges and then
paths in a factor of a subdirect product to thin edges and paths
in the product itself. We start with a claim about the majority and
minority conditions.

\begin{lemma}\label{lem:condition-to-product}
Let operation $f$ satisfies the majority (minority) condition for a
class $\cK$ of smooth algebras. Then it also satisfies this condition for
any subdirect product $\rel\sse\tms\zA n$, where
$\vc\zA n\in\cK$.
\end{lemma}

\begin{proof}
Clearly, $f$ satisfies on $\rel$ the required conditions from
Lemma~\ref{lem:fgh-identities}. We need to prove that $f$ is a majority
(affine) operation on every thick majority (respectively, affine) edge
of $\rel$. Suppose $\ba\bb$ is such an edge and $\th$
is the congruence of $\zB=\Sg{\ba,\bb}$ witnessing that. Let
$I(\ba',\bb')=\{i\in[n]\mid \ba'[i]=\bb'[i]\}$ for $\ba',\bb'\in\zA$. As is easily
seen, for any $\ba'\in\ba\fac\th, \bb'\in\bb\fac\th$, the congruence
$\th'=\th\cap\zD^2$ of $\zD=\Sg{\ba',\bb'}$ witnesses that $\ba'\bb'$
is an edge of $\zA$ of the same type as $\ba\bb$. Therefore, tuples
$\ba,\bb$ can be assumed to be such that $I=I(\ba,\bb)$
is maximal among pairs $\ba',\bb'$ with $\ba'\in\ba\fac\th$, $\bb'\in\bb\fac\th$.
Then for any $\bc\in\zB$ and any $i\in I$, $\bc[i]=\ba[i]$.

Take $i\in[n]-I$ and set $A'=\{\ba'[i]\mid \ba'\in\ba\fac\th\}$ and
$B'=\{\bb'[i]\mid \bb'\in\bb\fac\th\}$. By the choice of $\ba,\bb$,
$A'\cap B'=\eps$. We argue that this means that the projection $\eta$ of $\th$
on the $i$th coordinate, that is, the congruence of $\zC=\pr_i\zB$ given by
the transitive closure of
$$
\tol_i = \{(a,b)\mid \text{ for some $\bc,\bd\in\zB$,
$a=\bc[i]$, $b=\bd[i], (\bc,\bd)\in\th$}\}
$$
is nontrivial. Indeed, if $\ba\bb$ is a majority edge, then
$\th$ has only two congruence blocks, whose restrictions on $\zC$ are
$A',B'$, which are disjoint. If $\ba\bb$ is affine, then $\zC\fac\eta$
is homomorphic image of $\zB\fac\th$. Since the latter is a simple
module, $\zC\fac\eta$ is isomorphic to $\zB\fac\th$. Thus,
$\ba[i]\bb[i]$ is a majority (affine) edge in $\zA_i$.

By the assumption $f$ is a majority (or affine) operation on
$\ba[i]\fac\eta\bb[i]\fac\eta$, implying it is also a majority (affine)
operation on $\zB\fac\th$.
\end{proof}

Next we study connectivity in subalgebras of direct products.

\begin{lemma}\label{lem:product-edge}
Let $\rel$ be a subdirect product of $\tms\zA n$, $I\sse[n]$.\\[1mm]
(1) For any $\ba\in\rel$, $\ba^*=\pr_I\ba$, $\bb\in\pr_I\rel$
such that $\ba^*\bb$ is a thin edge, there is
$\bb'\in\rel$, $\pr_I\bb'=\bb$, such that $\ba\bb'$ is a thin edge of the same
type. Moreover, if $\ba^*\bb$ is a special thin majority edge,
then so is $\ba\bb'$.\\[1mm]
(2) If $\ba\bb$ is a thin edge in $\rel$ then $\pr_I\ba\,\pr_I\bb$
is a thin edge in $\pr_I\rel$ of the same type (including the
possibility that $\pr_I\ba=\pr_I\bb$).
\end{lemma}

\begin{proof}
Observe that we can consider $\pr_I\rel$ as the quotient algebra
$\rel\fac{\eta_I}$, where $\eta_I$ is the projection congruence
of $\rel$, that is, $(\bc,\bd)\in\eta_I$ if and only if
$\pr_I\bc=\pr_I\bd$. Then item (1) can be rephrased as follows:
For any $\ba\in\rel$ and $\ob\in\rel\fac{\eta_I}$ such that
$\ba\fac{\eta_I}\ob$ is a thin edge in $\rel\fac{\eta_I}$, there is
$\bb'\in\ob$ such that $\ba\bb'$ is a thin edge of the same
type. It clearly follows from Lemma~\ref{lem:quotient-edge}(1).
Similarly, item (2) can be rephrased as: If $\ba\bb$ is a thin
edge in $\rel$, then $\ba\fac{\eta_I}\bb\fac{\eta_I}$ is a thin
edge in $\rel\fac{\eta_I}$ of the same type. It follows
straightforwardly from Lemma~\ref{lem:quotient-edge}(2).
\end{proof}

The next statement follows from
Lemma~\ref{lem:product-edge}.

\begin{corollary}\label{cor:product-path}
Let $\rel$ be a subdirect product of $\tms\zA n$ and
$I\sse[n]$.\\[1mm]
(1) For any $\ba\in\rel$, and an s- (as-, asm-) path
$\vc\bb k\in\pr_I\rel$ with $\pr_I\ba=\bb_1$, there is an
s- (as-, asm-) path $\vc{\bb'}\ell\in\rel$ such that
$\bb'_1=\ba$ and $\pr_I\bb'_\ell=\bb_\ell$. Moreover, if $\vc\bb k$ is a
special asm-path, so is $\vc{\bb'}\ell$.\\[1mm]
(2) If $\vc\ba k$ is an s- (as-, asm-) path in $\rel$, then
$\pr_I\ba_1\zd\pr_I\ba_k$ is an s- (as-, asm-) path in $\pr_I\rel$.
\end{corollary}

There is a connection between maximal (as-maximal,
u-maximal) elements of a subdirect product and its projections.

\begin{corollary}\label{cor:product-maximal}
Let $\rel$ be a subdirect product of $\tms\zA n$ and $I\sse[n]$.\\[1mm]
(1) For any maximal (as-maximal, u-maximal) (in $\pr_I\rel$) element
$\bb\in\pr_I\rel$, there is $\bb'\in\rel$ which is maximal (as-maximal,
u-maximal) in $\rel$ and such that $\pr_I\bb'=\bb$. In particular,
$\pr_{[n]-I}\bb'$ is an maximal (as-maximal, u-maximal) in
$\pr_{[n]-I}\rel$.\\[1mm]
(2) If $\ba$ is an maximal (as-maximal, u-maximal) in $\rel$, then
$\pr_I\ba$ is maximal (as-maximal, u-maximal) in $\pr_I\rel$.
\end{corollary}

\begin{proof}
(1) We again can use the isomorphism between $\pr_I\rel$ and
the quotient algebra $\rel\fac{\eta_I}$. Then the statement of the
lemma translates into: If $\oa\in\rel\fac{\eta_I}$ is maximal (as-maximal,
u-maximal) in $\rel\fac{\eta_I}$, then there is $a\in\oa$ that is maximal
(as-maximal, u-maximal) in $\rel$. The latter statement is true by
the second part of this corollary.

\smallskip

(2) Using the isomorphism between $\pr_I\rel$ and
the quotient algebra $\rel\fac{\eta_I}$, the statement follows from
Corollary~\ref{cor:quotient-max}(2).
\end{proof}

The following lemma considers a special case of maximal components
of various types in subdirect products.

\begin{lemma}\label{lem:as-product}
Let $\rel$ be a subdirect product of $\zA_1\tm\zA_2$, $B,C$
maximal components (as-components, u-components) of
$\zA_1,\zA_2$, respectively, and $B\tm C\sse\rel$.
Then $B\tm C$ is a maximal component (as-component, u-component)
of $\rel$.
\end{lemma}

\begin{proof}
We need to show that for any $\ba,\bb\in B\tm C$ there is an
s-path (as-path, asm-path) from $\ba$ to $\bb$. By the assumption
there is a (s-,as-,asm-) path $\ba[1]=a_1,a_2\zd a_k=\bb[1]$ from
$\ba[1]$ to $\bb[1]$ and a (s-,as-,asm-) path
$\ba[2]=b_1,b_2\zd b_\ell=\bb[2]$ from $\ba[2]$ to $\bb[2]$.
Then the sequence
$\ba=(a_1,b_1),(a_2,b_1)\zd(a_k,b_1)$, $(a_k,b_2)\zd(a_k,b_\ell)=\bb$
is a (s-,as,asm-) path from $\ba$ to $\bb$.
\end{proof}

\section{Connectivity}\label{sec:connectivity}

Recall that in this paper we only consider smooth idempotent
algebras omitting type \one.

\subsection{General connectivity}

In this section we show that all maximal elements are connected to
each other. The undirected connectivity easily follows from the definitions,
and Theorem~\ref{the:connectedness}, so the challenge is to prove
directed connectivity, as defined above. We start with an auxiliary lemma.

Let $\rel\le\zA_1\tm\dots\tm\zA_k$ be a relation. Also, let
$\tol_i(\rel)$ (or simply $\tol_i$ if $\rel$ is clear from the context),
$i\in[k]$, denote the \emph{link} tolerance
\begin{align*}
& \{(a_i,a'_i)\in\zA_i^2\mid (a_1\zd a_{i-1},a_i,a_{i+1}\zd a_k),\\
& \quad
(a_1\zd a_{i-1},a'_i,a_{i+1}\zd a_k)\in\rel, \text{ for some
$(a_1\zd a_{i-1},a_{i+1}\zd a_k)$}\}.
\end{align*}
Recall that a tolerance is said to be \emph{connected} if its transitive
closure is the full relation. The transitive closure
$\lnk_i(\rel)$ of $\tol_i(\rel)$, $i\in[k]$, is called the
\emph{link congruence}, and it is, indeed, a congruence.

If $\rel$ is binary, that is, a subdirect product of $\zA_1,\zA_2$,
then by $\rel[c], \rel^{-1}[c']$ for $c\in\zA_1,c'\in\zA_2$
we denote the sets $\{b\mid (c,b)\in\rel\}, \{a\mid (a,c')\in\rel\}$,
respectively, and for $C\sse\zA_1,C'\sse\zA_2$ we use
$\rel[C]=\bigcup_{c\in C}\rel[c]$,
$\rel^{-1}[C']=\bigcup_{c'\in C'}\rel^{-1}[c']$, respectively.
Relation $\rel$ is said to be \emph{linked}
if the link congruences $\lnk_1(\rel),\lnk_2(\rel)$ are full
congruences.

\begin{lemma}\label{lem:going-maximal}
Let $\zA\in\cK$ and let $\rela$ be a
tolerance of $\zA$. Suppose that $(a,b)$, $a,b\in\zA$,
belongs to the transitive closure of $\rela$, that is,
there are $\vc d{k-1}$ such that $(d_i,d_{i+1})\in\rela$ for
$i\in\{0,1\zd k-1\}$, where $d_0=a,d_k=b$. If for some
$i\in\{0,1\zd k\}$ there is $d'_i\in\zA$ such that $d_i\sqq d'_i$,
then there are $d'_j\in\zA$ for $j\in\{0,1,\zd k\}-\{i\}$
such that $d_j\sqq d'_j$ for $j\in\{0,1\zd k\}$,
and $(d'_j,d'_{j+1})\in\rela$ for $j\in\{0,1\zd k-1\}$.

Moreover, if $d_0\zd d_{i-1}$ are maximal, there are
$d''_0\zd d''_k$ such that $d''_j=d_j$ for $j\in\{0\zd i-1\}$,
$d_i\sqq d'_i\sqq d''_i$, $d_j\sqq d''_j$ for $j\in\{i+1\zd k\}$,
and $(d''_j,d''_{j+1})\in\rela$ for $j\in\{0\zd k-1\}$.
\end{lemma}

\begin{proof}
Let $d_i=d_i^1\le\ldots\le d_i^s=d'_i$ be an s-path from
$d_i$ to $d'_i$. For each $j\in\{0,1\zd k\}-\{i\}$, we construct a
sequence $d_j=d_j^1\le\ldots\le d_j^s$ by setting
\[
d_j^q=d_j^{q-1}\cdot d_i^q.
\]
Now, we prove by induction that $(d_j^q,d_{j+1}^q)\in\rela$ for all
$q\in[s]$ and $j\in\{0,1\zd k-1\}$. For $q=1$ it follows from the
assumptions of the lemma. If $(d_j^q,d_{j+1}^q)\in\rela$, then
$(d_j^{q+1},d_{j+1}^{q+1})=
(d_j^q\cdot d_i^{q+1},d_{j+1}^q\cdot d_i^{q+1})\in\rela$, since
$\rela$ is a tolerance. The first part of the lemma is proved.

For the second statement we apply the same construction, but only to
elements $d_{i-1}\zd d_k$, and do not change $d_0\zd d_{i-2}$, that
is, we set $d'_j=d_j$ for $j\in\{0\zd i-2\}$. Then, as before, we have
$(d'_j,d'_{j+1})\in\rela$ for $j\in\{i-1\zd k\}$ and for $j\in\{0\zd i-3\}$.
However, there is no guarantee that $(d'_{i-2},d'_{i-1})\in\rela$.
To remedy this we again apply the same construction as follows. Since
$d_{i-1}$ is a maximal element and $d_{i-1}\sqq d'_{i-1}$, it also holds
$d'_{i-1}\sqq d_{i-1}$. Let $d'_{i-1}=e_{i-1}^1\le\dots\le
e_{i-1}^\ell=d_{i-1}$ be an s-path connecting $d'_{i-1}$ to $d_{i-1}$.
We set $d''_j=d_j$ for $j\in\{0\zd i-2\}$, and $e^1_j=d'_j$,
$e^{q+1}_j=e^q_j\cdot e^{q+1}_{i-1}$ and $d''_j=e^\ell_j$ for
$j\in\{i-1\zd k\}$. Then, as before, $(d''_j,d''_{j+1})\in\rela$ for
$j\in\{i-1\zd k-1\}$ and for $j\in\{0\zd i-3\}$. However, since
$d''_{i-2}=d_{i-2}$ and $d''_{i-1}=d_{i-1}$, we also have
$(d''_{i-2},d''_{i-1})\in\rela$. The result follows.
\end{proof}

\begin{corollary}\label{cor:going-maximal}
Let $\zA\in\cK$ be a smooth idempotent algebra and $\rela$ a
tolerance of $\zA$. Suppose that $(a,b)$, $a,b\in\zA$,
belongs to the transitive closure of $\rela$, that is, there are
$\vc d{k-1}$ such that $(d_i,d_{i+1})\in\rela$ for
$i\in\{0,1\zd k-1\}$, where $d_0=a,d_k=b$.
If $a,b$ are maximal in
$\zA$, then there are $d'_0\zd d'_k$ such that $d'_0=a$, each
$d'_j$ is maximal in $\zA$, $(d'_j,d'_{j+1})\in\rela$ for
$j\in\{0\zd k-1\}$, and $d'_k\in\see\zA b$.
\end{corollary}

\begin{proof}
We show by induction on $i$ that there are $d'_0\zd d'_k$ such that
$d'_0=a$, $(d'_i,d'_{i+1})\in\rela$ for $i\in\{0\zd k-1\}$,
$d'_k\in\see\zA b$ and $d'_0\zd d'_i$ are maximal. The base case of
induction, $i=0$, follows from the conditions of the lemma. Suppose
some $d'_j$s with the required properties exist for $i\in\{0,1\zd k-1\}$.
Let $d^*_{i+1}$ be a maximal element with $d'_{i+1}\sqq d^*_{i+1}$.
By Lemma~\ref{lem:going-maximal} there are $d''_{i+1}\zd d''_k$
such that $d^*_{i+1}\sqq d''_{i+1}$, $d'_j\sqq d''_j$ for
$j\in\{i+2\zd k\}$, $(d'_i,d''_{i+1})\in\rela$,
and $(d''_j,d''_{j+1})\in\rela$ for $j\in\{i+1\zd k-1\}$. Elements
$d'_0\zd d'_i,d''_{i+1}\zd d''_k$ satisfy the required conditions.
\end{proof}

The next theorem is the main result of this section.

\begin{theorem}\label{the:connectivity}
Let $\zA\in\cK$.
Any $a,b\in\max(\zA)$ (or $a,b\in\amax(\zA)$, or $a,b\in\umax(\zA)$)
are asm-connected. Moreover if $a,b\in\max(\zA)$ or
$a,b\in\amax(\zA)$, they are connected by a special path.
\end{theorem}

\begin{proof}
We start by showing asm-connectivity by a special path (most of the
time we will not mention that we are looking for a special path, except
it is essential) for maximal elements, so let
$a,b\in\max(\zA)$. We proceed by induction on the size of $\zA$
through a sequence of claims. In the base case of induction, when
$\zA=\{a,b\}$, elements $a,b$ are connected with a thin majority
or affine edge, as they are both maximal, and the claim is
straightforward.

\smallskip

{\sc Claim 1.}
$\zA$ can be assumed to be $\Sg{a,b}$.

\smallskip

If $a,b\in\max(\zB)$, $\zB=\Sg{a,b}$, and $\zB\ne\zA$, then we are
done by the induction hypothesis. Suppose one of them is not
maximal in $\zB$, and let
$c,d\in\max(\zB)$ be such that $a\sqq c$ and $b\sqq d$. By the
induction hypothesis $c$ is asm-connected to $d$. As $a\sqq c$, $a$ is
asm-connected to $c$. It remains to show that $d$ is asm-connected to $b$.
This, however, follows straightforwardly from the assumption that
$b$ is maximal. Indeed, it implies $d\in \see\zA b$, and hence $d\sqq b$
in $\zA$.

\smallskip

{\sc Claim 2.}
$\zA$ can be assumed simple.

\smallskip

Suppose $\zA$ is not simple and $\al$ is its maximal congruence. Let
$\zB=\zA\fac\al$. By the induction hypothesis $a\fac\al$ is asm-connected to
$b\fac\al$ with a special path, that is, there is a sequence
$a\fac\al=\oa_0,\oa_1\zd \oa_k=b\fac\al$ such that $\oa_i\le\oa_{i+1}$
or $\oa_i\oa_{i+1}$ is a thin affine or special majority edge in $\zB$.
By Corollary~\ref{cor:quotient-path}(1) there is a special path
$\vc ak$ such that $a_1=a$ and $a_i\in\oa_i$ in $\zA$.

It remains to show that $a_k$ is asm-connected to $b$. Since $b$ is
maximal, it suffices to take elements $a',b'$ maximal in $b\fac\al$
and such that $a_k\sqq_{\oa_k} a'$ and $b\sqq_{\oa_k} b'$.
Then $a_k\sqq_{\oa_k} a'$, element $a'$ is asm-connected to $b'$
in $\oa_k$ by the induction hypothesis, and $b'$ is
asm-connected to $b$ in $\zA$, as $b'\in \see\zA b$.

\smallskip

{\sc Claim 3.}
$\Sg{a,b}$ can be assumed to be equal to $\Sg{a',b'}$ for any
$a'\in\see\zA a$, $b'\in\see\zA b$.

\smallskip

If $\Sg{a',b'}\subset \Sg{a,b}$ for some $a'\in \see\zA a$,
$b'\in\see\zA b$, then by the induction hypothesis $a''$ is
asm-connected to $b''$ for some $a''\in \see\zA a$, $b''\in \see\zA b$.
Therefore $a$ is also asm-connected to $b$.

\smallskip

We say that elements $c,d\in\max(\zA)$ are connected by proper
subalgebras of $\zA$ if there are subalgebras $\vc\zB\ell$ such
that $\zB_i\ne\zA$ for $i\in[\ell]$, $c\in B_1$, $d\in\zB_\ell$, and
$\zB_i\cap\zB_{i+1}\cap\max(\zA)\ne\eps$ for $i\in[\ell-1]$.

\smallskip

{\sc Claim 4.}
Let $c,d\in\max(\zA)$, $\zA=\Sg{c,d}$ be simple, and let $\rel_{cd}$ be the
subalgebra of $\zA^2$ generated by $(c,d),(d,c)$. Suppose also that
for any $d'\in\see\zA d$ the algebra $\Sg{c,d'}$ equals $\zA$. Then
either $\rel_{cd}$ is the graph of an automorphism $\vf$ of $\zA$
such that $\vf(c)=d$, $\vf(d)=c$, or $c,d'$ are connected by
proper subalgebras of $\zA$ for some $d\sqq d'$, or $c\le d$, or $d\le c$.

\smallskip

Suppose that $\rel_{cd}$ is not the graph of a mapping, or,
in other words, there is no automorphism of $\zA$ that maps
$c$ to $d$ and $d$ to $c$. We consider the link tolerance
$\rela=\tol_1(\rel_{cd})$. Since $\zA$ is simple and $\rel$ is
not the graph of a mapping, the transitive closure of $\rela$
is the full relation. Suppose first that for every $e\in\zA$ the set
$\rel^{-1}_{cd}[e]=\{d\mid (d,e)\in\rel\}$ (which is a
subalgebra of $\zA$) does not equal $\zA$. There are $\vc ek\in\zA$
such that the subalgebras $\vc\zB k$, $\zB_i=\rel^{-1}_{cd}[e_i]$
are such that $c\in \zB_1$, $d\in\zB_k$, and
$\zB_i\cap\zB_{i+1}\ne\eps$ for every $i\in[k-1]$.
Choose $d_i\in\zB_i\cap\zB_{i+1}$ for $i\in[k-1]$ and note that
$(d_i,d_{i+1})\in\rela$ and also $(c,d_1),(d_{k-1},d)\in\rela$.
By Lemma~\ref{lem:going-maximal} it is possible to choose
$\vc{d'}k\in\zA$ such that $(a,d'_1)\in\rela$,
$(d'_i,d'_{i+1})\in\rela$ for $i\in[k-1]$, all the $d'_i$ are maximal, and
$d\sqq d'=d'_k$.
The conditions $(a,d'_1)\in\rela$, $(d'_i,d'_{i+1})\in\rela$ mean
that there are $e'_0\vc{e'}k\in\zA$ such that
$d'_i,d'_{i+1}\in\rel^{-1}[e'_i]$ for $i\in\{2\zd k\}$ and
$a,d'_1\in\rel^{-1}[e'_1]$. Therefore elements $c,d'$ are connected
by proper subalgebras of $\zA$.

Suppose that there is $e\in\zA$ such that $\zA\tm\{e\}\sse\rel$.
If $e\not\in\max(\zA)$, choose $e'\in\max(\zA)$ with $e\sqq e'$.
By Corollary~\ref{cor:product-path} the path from $e$ to $e'$ can
be extended to a path from $(c,e),(d,e)$ to some $(c',e'),(e',d')$
respectively. Then, as $c\sqq c'$ and $c\in\max(\zA)$, we also have
$c'\sqq c$. The path from $c'$ to $c$ can again be extended to
a path from $(c',e')$ to $(c,e'')$ for some $e''$. Also, the path from
$e'$ to $e''$ can be extended to a path from $(d',e')$ to $(d'',e'')$.
As is easily seen, $d''\in\se d$ and $e''$ is maximal.

Since $\zA=\Sg{c,d''}$, we have
$\zA\tm\{e''\}\sse\rel$. Thus, $e$ can be assumed maximal.
We have therefore $(c,d),(c,e),(d,e),(d,c)\in\rel$. If both
$\Sg{d,e}$ and $\Sg{e,c}$ are proper subalgebras of $\zA$,
then $c,d$ are connected by proper subalgebras of $\zA$. Otherwise
suppose $\Sg{d,e}=\zA$. This means $\{c\}\tm\zA\sse\rel$, and,
in particular, $(c,c)\in\rel_{cd}$. Therefore there is a binary term
operation $f$ such that $f(c,d)=f(d,c)=c$. This means $d\le c$
or $c\le d$, where the latter case is possible if there is also
another semilattice operation $f'$ on $\{c,d\}$ with $f'(c,d)=f'(d,c)=d$,
and this operation is picked for the relation $\le$.
If $\Sg{c,e}=\zA$ then by a similar argument we get $c\le d$ or $d\le c$.

\smallskip

From now on we assume $\zA$ and $a,b$ to satisfy all the conditions of
Claims~1--3. Let $\rel=\rel_{ab}$.

We consider two cases.

\smallskip

{\sc Case 1.}
$\rel$ is not the graph of a mapping.

\smallskip

By Claim~4 there are two options. If $a\le b$ or $b\le a$, then,
since both elements are maximal, $b\in\see\zA a$, implying they
are asm-connected. Therefore suppose that $a,b$ are asm-connected by
proper subalgebras.

There are proper subalgebras $\vc\zB k$ of $\zA$ such that $a\in \zB_1$,
$b\in\zB_k$, and $\zB_i\cap\zB_{i+1}\cap\max(\zA)\ne\eps$ for every
$i\in[k-1]$. Let
$d_i\in B_i\cap B_{i+1}$ be an element maximal in $\zA$.
For each $i\in[k-1]$ choose $c_i,c'_i\in\max(\zB_i)$ with
$d_{i-1}\sqq_{\zB_i} c_i$ and $d_i\sqq_{\zB_i} c'_i$. By the induction
hypothesis $c_i$ is asm-connected to $c'_i$ (in $\zB_i$). Then clearly
$d_{i-1}$ is asm-connected to $c_i$, and, as $d_i$ is maximal in $\zA$ and
$c'_i\in\see\zA{d_i}$, $c'_i$ is asm-connected to $d_i$, as well.

\smallskip

{\sc Case 2.}
$\rel$ is the graph of a mapping, or, in other words, there is an
automorphism of $\zA$ that maps $a$ to $b$ and $b$ to $a$.

\smallskip

We again consider several cases.

\smallskip

{\sc Subcase 2a.}
There is no nonmaximal element $c\le a'$ or $c\le b'$ for any
$a'\in\see\zA a$, $b'\in\see\zA b$. In other words, whenever $c\sqq a$
or $c\sqq b$, we have $c\in\see\zA a$ or $c\in\see\zA b$.

\smallskip

If there is a maximal $d$ such that $d'\le d$ for some nonmaximal
$d'\in\zA$ (that is, $\zA\ne\max(\zA)$), then by Case~1 and
Subcases~2b, 2c $a$ is asm-connected to $d$ and $d$ is
asm-connected to $b$. Suppose all elements in $\zA$ are maximal.
By Theorem~\ref{the:connectedness} there are
$a=a_1,a_2\zd a_k=b$ such that for any $i\in[k-1]$ the pair
$a_ia_{i+1}$ or $a_{i+1}a_i$ is a semilattice, affine or majority
edge (not a thin edge). We need to show that
$a_i$ is asm-connected
to $a_{i+1}$. Let $\th$ be a congruence of $\zB=\Sg{a_i,a_{i+1}}$
witnessing that $a_ia_{i+1}$ or $a_{i+1}a_i$ is a semilattice, affine,
or majority edge. Except for the case when $a_{i+1}a_i$ is a
semilattice edge, by Lemma~\ref{lem:thin-semilattice} there is
$b\in \zC=a_{i+1}\fac\th$ such that $a_ib$ is a
thin edge. Then take $c,d\in\max(\zC)$ such that $b\sqq_\zC c$
and $a_{i+1}\sqq_\zC d$. By the induction hypothesis $c$ is
asm-connected to $d$ in $\zC$. Finally, as all elements in $\zA$ are
maximal, $d$ is asm-connected with $a_{i+1}$ in $\zA$ with a
semilattice path. If $a_{i+1}a_i$ is a semilattice edge, by
Lemma~\ref{lem:thin-semilattice} there is $b\in\zD=a_i\fac\th$ such
that $a_{i+1}\le b$. Since $b\in\see\zA{a_{i+1}}$, there is a
semilattice path from $b$ to $a_{i+1}$. Then again we choose
$c,d\in\max(\zC)$ with $b\sqq_\zC c$ and $a_i\sqq_\zC d$.
By the induction hypothesis $d$ is asm-connected to $c$.
Since $a_i\sqq_\zC d$ and $c\in\see\zA b$, element $a_i$ is
asm-connected to $a_{i+1}$. Subcase~2a is thus completed.

\smallskip

{\sc Claim 5.}
Let $c\le b$, $c\not\in\max(\zA)$, and $\Sg{a,c}=\zA$. Then either
$a$ and $b'$ for some $b'\in\see\zA b$ are connected by proper
subalgebras, or $a$ is asm-connected to an element $d$ such that
$c\sqq d$, or $c\le a$.

\smallskip

Consider the relation $\rel=\rel_{ac}$, that is, the binary relation
generated by $(a,c)$ and $(c,a)$. Since $a$ is maximal and $c$
is not, there is no automorphism $\zA$ that swaps $a$ and $c$.
Therefore $\tol_1(\rel)$ is a nontrivial tolerance, in particular,
$(a,b)$ is in its transitive closure. If $\rel^{-1}[e]=\zA$ for no $e\in\zA$,
by Corollary~\ref{cor:going-maximal} $a$ and $b'$ for some
$b'\in\see\zA b$ are connected by proper subalgebras. So, suppose
there is $e\in\zA$ such that $\zA\tm\{e\}\sse\rel$.

By Corollary~\ref{cor:product-path} there are $a'\in\see\zA a$ and
$e''\in\max(\zA)$ such that $(a',e')\in\rel$ and $(a,e)\sqq(a',e'')$ in $\rel$.
Again by Corollary~\ref{cor:product-path} there is $e'\in\max(\zA)$
such that $(a,e')\in\rel$ and $(a,e)\sqq(a',e'')\sqq(a,e')$ in $\rel$. Let
$(a,e)=(a_1,e_1)\le\dots\le(a_k,e_k)=(a,e')$ in $\rel$. Consider three
sequences: $a=a'_1\zd a'_k$, $c=c_1\zd c_k$, and
$c=c'_1\zd c'_k$ given by
\[
a'_{i+1}=a'_i\cdot e_{i+1},\qquad c_{i+1}=c_i\cdot a_{i+1},
\qquad c'_{i+1}=c'_i\cdot e_{i+1} \qquad \text{for $i\in[k-1]$}.
\]
Then, since $(a,c),(c,e),(c,a)\in\rel$, we have
$(a_1,c'_1),(c_1,e_1),(c_1,a'_1)\in\rel$, and
\begin{align*}
& \cl{a_{i+1}}{c'_{i+1}}=\cl{a_i}{c'_i}\cdot\cl{a_{i+1}}{e_{i+1}},
\qquad
\cl{c_{i+1}}{e_{i+1}}=\cl{c_i}{e_i}\cdot\cl{a_{i+1}}{e_{i+1}},\\
& \cl{c_{i+1}}{a'_{i+1}}=\cl{c_i}{a'_i}\cdot\cl{a_{i+1}}{e_{i+1}}
\qquad \text{for $i\in[k-1]$}
\end{align*}
implies that $(a,c^*),(a,e'),(c',e'),(c',a')\in\rel$, where $c'=c_k$, $c^*=c'_k$,
$e'=e_k$, and $a'=a'_k$.

We consider several cases. First, suppose that $\zB=\Sg{a,c'}\ne\zA$.
Then let $a'',c''\in\max(\zB)$ be such that $a\sqq_\zB a''$,
$c'\sqq_\zB c''$. By the induction hypothesis $a''$ is asm-connected
to $c''$, and, hence, $a$ is asm-connected to $c''$. Since $c\sqq c''$,
take $c''$ for $d$ and the result follows.

Suppose $\Sg{a,c'}=\zA$. Then $(c,e')\in\rel$, as $(a,e'),(c',e')\in\rel$.
Therefore $(a,c^*),(a,e'),(c,e'),(c,a)\in\rel$.

If both $\zB_1=\Sg{a,e'}$ and
$\zB_2=\Sg{e',c^*}$ are not equal to $\zA$, then we choose
$a'', e''\in\max(\zB_1)$ and
$e^\dagger,c^\dagger\in\max(\zB_2)$ such that
$a\sqq_{\zB_1}a''$, $e'\sqq_{\zB_1}e''$,
$e'\sqq_{\zB_2}e^\dagger$, and $c^*\sqq_{\zB_2}c^\dagger$.
Then the following holds: $a$ is asm-connected to $a''$ as
$a\sqq_{\zB_1}a''$; $a''$ is asm-connected to $e''$ by the
induction hypothesis; $e''\sqq_\zA e'$, because $e'\in\max(\zA)$
and $e''\in\see\zA{e'}$; $e'$ is asm-connected to $e^\dagger$, as
$e'\sqq_{\zB_2}e^\dagger$; and $e^\dagger$ is asm-connected
to $c^\dagger$ by the induction hypothesis. Finally, as
$c\sqq c^*\sqq c^\dagger$, taking $c^\dagger$ for $d$,

the result holds in this case as well.

Suppose $\Sg{a,e'}=\zA$ or $\Sg{e',c^*}=\zA$. Then
$(c,c)\in\rel$ or $(a,a)\in\rel$, which means there is a
binary operation $f$ such that $f(a,c)=f(c,a)=c$ or
$f(a,c)=f(c,a)=a$, implying $ac$ is a thin semilattice edge.
Since $c$ is not maximal, we have $c\le a$, the result follows.

\smallskip

Elements $a,b$ are said to be \emph{v-connected} if there is
$c\in\Sg{a,b}$ such that $c\sqq a$ and $c\sqq b$.

\smallskip

{\sc Case 2b.}
Elements $a,b$ are v-connected.

\smallskip

Recall that there is an automorphism of $\zA$ that swaps $a$ and $b$.
Let $c\sqq d$ for some elements $c,d$. The \emph{s-distance}
from $c$ to $d$ is the length of the shortest semilattice path from
$c$ to $d$. The s-distance from $c$ to $\see\zA d$ is the shortest
s-distance from $c$ to an element from $\see\zA d$. The
\emph{depth} of an element $c$ is the greatest
s-distance to a maximal component, denoted $\dep(c)$. We proceed
by induction on the size of $\Sg{a,b}$ and minimal $\dep(c)$,
such that $c\sqq a$, $c\sqq b$.

Suppose first that $c\le a'\in\see\zA a$, $c\le b'\in\see\zA b$. In particular,
this happens when $\dep(c)=1$. We may assume that there is
an automorphism swapping $a'$ and $b'$, since otherwise we are
in the conditions of Case~1. Also, $a,a'$ are in the same
maximal component and thus connected to each other by an s-path.
The same holds for $b,b'$. Therefore, we can assume $a'=a,b'=b$.
As $c\in\Sg{a,b}$, there is a binary
term operation $f$ such that $f(a,b)=c$. Let $d=f(b,a)$. Since there
is an automorphism swapping $a$ and $b$, $d\le a$ and $d\le b$.
Set $g(x,y,z)=(f(y,x)\cdot f(y,z))\cdot f(x,z)$. We have
\begin{eqnarray*}
g(a,a,b) &=& (ac)c=a,\\
g(a,b,a) &=& (dd)a=a,\\
g(b,a,a) &=& (ca)d=a.
\end{eqnarray*}
Since $a$ and $b$ are automorphic, $g$ is a majority operation on
$\{a,b\}$. Therefore, $ab$ is not only a thin majority edge,
but also a majority edge, as is witnessed by the equality relation.
Since $\zA$ is smooth, $\Sg{a,b}=\{a,b\}$, and this case is in fact
impossible.

Suppose the result is proved for all algebras and pairs of elements
v-connected through an element of depth less than $\dep(c)$. Let
$c=a_1\le a_2\le\dots\le a_k=a$ and $c=b_1\le b_2\le\ldots\le b_m=b$,
and $k>2$ or $m>2$. We may assume $m>2$ and $b_{m-1}$ to be a
nonmaximal element. Note that $\dep(b_{m-1})<\dep(c)$, because
$b_{m-1}$ is on an s-path from $c$ to a maximal element.
Consider $\zB=\Sg{a,b_{m-1}}$. If $\zB=\zA$ then by Claim~5
either $a,b'$ are connected by proper subalgebras of $\zA$ for
some $b'\in\see\zA b$, or $a$ is asm-connected to an element $d$
such that $b_{m-1}\sqq_\zA d$. In the former case we use the
inductive hypothesis on the size of $\zA$ and complete as in Case~1.
In the latter case, as $\dep(b_{m-1})<\dep(c)$ and $d,b$ are
v-connected through $b_{m-1}$, we use the inductive
hypothesis on the depth of an element through which $a$ and $b$
are v-connected. In either case $a$ and $b$ are asm-connected.

Suppose $B\ne\zA$. Let $d\in\max(\zB)$ be such that
$b_{m-1}\sqq_\zB d$, let also $e\in\max(\zA)$ be such that
$d\sqq_\zA e$. By the induction hypothesis $a$ is asm-connected to
$d$ in $\zB$, and therefore to $e$ in $\zA$. Also, $e$
and $b$ are v-connected through $b_{m-1}$. If
$\Sg{e,b}=\zC\ne\zA$, we choose $e',b'\in\max(\zC)$ and such that
$e\sqq_\zC e'$, $b\sqq_\zC b'$. By the induction hypothesis
$e',b'$ are asm-connected in $\zC$, which implies $e,b$ are
asm-connected in $\zA$. If $\Sg{e,b}=\zA$, the result follows
by the induction hypothesis, since $\dep(b_{m-1})<\dep(c)$.

\smallskip

{\sc Subcase 2c.}
Elements $a,b$ are not v-connected

\smallskip

Note first that we may assume that, for any $b'\in\see\zA b$, there is an
automorphism that sends $b'$ to $a$ and $a$ to $b'$, as otherwise we
are in the conditions of Case~1. Recall that we also assume
$\Sg{a,b'}=\zA$. Because of this and the automorphism swapping $a$
and $b$, without loss of generality we may assume that there is
nonmaximal $c\le b$. Consider $\Sg{a,c}$.

If $\Sg{a,c}=\zA$, by Claim~5 either $a,b'$ are connected by proper
subalgebras of $\zA$ for some $b'\in\see\zA b$ or $a$ is asm-connected
to $d$ such that $d$ is v-connected with $b$. In either case we
proceed by the induction hypothesis as before.

If $\zB=\Sg{a,c}\ne\zA$, take $d\in\max(\zB)$ and such that
$c\sqq d$. By the induction hypothesis $a$ is asm-connected to $d$.
Now let $d\sqq d'$ such that $d'\in\max(\zA)$. Since $d'$ is
v-connected to $b$, the result now follows from Case~2b.

\medskip

In the remaining statements of the theorem, when $a,b\in\amax(\zA)$ or
$a,b\in\umax(\zA)$, we let $a',b'\in\zA$ be maximal elements of
$\zA$ such that $a\sqq a'$ and $b\sqq b'$. Then by what is proved
above $a'$ is asm-connected to $b'$, and so $a$ is asm-connected to $b'$.
Finally, as $b'\in\as(b)$ [respectively, $b'\in\umax(\zA)$],
we have $b'\sqq_{as}b$ [respectively, $b'\sqq_{asm}b$], and
$b'$ is connected to $b$. Note that in the case of u-maximal elements
the path showing that $b'\sqq_{asm}b$ cannot be assumed special.
\end{proof}

As by Theorem~\ref{the:connectivity} any u-maximal elements
are connected by an asm-path, we have the following

\begin{corollary}\label{cor:unique-umax}
If $\zA$ is a smooth algebra, there is a unique u-maximal component.
\end{corollary}

\section{Rectangularity}\label{sec:rectangularity}

In this section we prove a result that, on one hand, is a
generalization of the results by the author
\cite{Bulatov06:semilattice} (Lemma~3.5), \cite{Bulatov11:conservative}
(Lemma~4.2, Proposition~5.4), and, on the other
hand, is analogous to the Rectangularity Lemma from \cite{Barto12:absorbing}.

We will need two auxiliary lemmas.

\begin{lemma}\label{lem:as-rectangularity}
Let $\rel$ be a subalgebra of $\zA_1\tm\zA_2$ and let $a\in\zA_1$
and $B=\rel[a]$. For any $b\in\zA_1$ such that $ab$ is thin edge,
and any $c\in\rel[b]\cap B$, $\Filt^{as}_B(c)\sse\rel[b]$.
\end{lemma}

\begin{proof}
Let $D=\Filt^{as}_B(c)\cap\rel[b]$. Set $D$ is nonempty, as
$c\in D$. If $D\ne \Filt^{as}_B(c)$, there are $b_1\in D$
and $b_2\in\Filt^{as}_B(c)-D$ such that $b_1b_2$ is a thin semilattice
or affine edge. Suppose that $ab$ is semilattice or majority. Then by
Lemma~\ref{lem:thin-combination}(3) there is a term operation $p$
such that $p(a,b)=b$ and $p(b_2,b_1)=b_2$ (if both $ab$ and $b_1b_2$
are of the semilattice type then $p$ can be chosen to be $\cdot$). Then
\[
\cl b{b_2}=p\left(\cl a{b_2},\cl b{b_1}\right)\in\rel.
\]

If $ab$ is affine, then by Lemma~\ref{lem:thin-combination}(2)
there is a term operations $h'$ such that $h'(a,a,b)=b$ and
$h'(b_2,b_1,b_1)=b_2$. Then
\[
\cl b{b_2}=h'\left(\cl a{b_2},\cl a{b_1},\cl b{b_1}\right)\in\rel.
\]
The result follows.
\end{proof}

\begin{lemma}\label{lem:buket}
Let $\rel$ be a subdirect product of algebras $\zA_1,\zA_2$, let
$B_1,B_2$ be as-components (maximal components)
of $\zA_1,\zA_2$, respectively, and $a\in\zA_1$ such that
$\rel\cap(B_1\tm B_2)\ne\eps$
and $\{a\}\tm B_2\sse\rel$. Then $B_1\tm B_2\sse\rel$.
\end{lemma}

\begin{proof}
We prove the lemma for as-components; for maximal components
the proof is nearly identical.

Let $(b,c)\in\rel\cap(B_1\tm B_2)\ne\eps$. For every
$b'\in\zA'_1=\Sg{a,b}$ we have
$(b',c)\in\rel$. By Lemma~\ref{lem:as-rectangularity} this means that
$\{b'\}\tm B_2\sse\rel$ for all $b'\in\Filt^{asm}_{\zA_1}(a)$. Indeed,
let $C$ be the set of all elements $b'$ from $\Filt^{asm}_{\zA_1}(a)$
such that $\{b'\}\tm B_2\sse\rel$. Set $C$ is nonempty, as $a\in C$.
If $C\ne\Filt^{asm}_{\zA_1}(a)$, there are $b'\in C$ and
$b''\in\Filt^{asm}_{\zA_1}(a)-C$ such that $b'b''$ is a thin edge. Then
by Lemma~\ref{lem:as-rectangularity} $\Filt^{as}_{\rel[b']}(c)\sse\rel[b'']$.
Since $B_2\sse\Filt^{as}_{\rel[b']}(c)$, we have a contradiction.

To complete the proof it suffices to observe that there is
an as-path from $a$ to, first, some as-maximal element $a'$, and
then, since every element $b'\in B_1$ is as-maximal, by
Theorem~\ref{the:connectivity} there is an asm-path from $a'$ to $b'$.
Therefore $B_1\sse \Filt^{asm}_{\zA_1}(a)$.
\end{proof}

\begin{prop}\label{pro:max-gen}
Let $\rel\le\zA_1\tm \zA_2$ be a linked subdirect product and let
$B_1,B_2$ be as-components of $\zA_1,\zA_2$, respectively, such that
$\rel\cap(B_1\tm B_2)\ne\eps$. Then $B_1\tm B_2\sse\rel$.
\end{prop}

\begin{proof}
We prove by induction on the size of $\zA_1,\zA_2$ that for any
as-components $C_1,C_2$ of $\zA_1,\zA_2$, respectively, there are
$a_1\in\zA_1$, $a_2\in\zA_2$
such that $\{a_1\}\tm C_2\sse\rel$ or $C_1\tm\{a_2\}\sse\rel$.
The result then follows by Lemma~\ref{lem:buket}. The base
case of induction when $|\zA_1|=1$ or $|\zA_2|=1$ is obvious.

Take $b\in C_1$ and construct two sequences
of subalgebras $\vc\zB k$ of $\zA_1$ and $\vc\zC k$ of $\zA_2$, where
$\zB_1=\{b\}$, $\zC_i=\rel[\zB_i]$, and $\zB_i=\rel^{-1}[\zC_{i-1}]$,
such that $k$ is the minimal number with $\zB_k=\zA_1$ or
$\zC_k=\zA_2$. Such a number exists, because $\rel$ is linked. Observe
that for each $i\le k$ the relation $\rel_i=\rel\cap(\zB_i\tm\zC_i)$ is linked.
Therefore, there is a proper subalgebra $\zA'_1$ of $\zA_1$ or $\zA'_2$
of $\zA_2$ such that $\rel'=\rel\cap(\zA'_1\tm\zA_2)$ or
$\rel'=\rel\cap(\zA_1\tm\zA'_2)$, respectively, is linked and subdirect.
Without loss of generality suppose there is $\zA'_1$ with the required
properties. By the induction hypothesis for any as-component $C_2$
of $\zA_2$ there is $a_1\in\zA'_1\sse\zA_1$ with
$\{a_1\}\tm C_2\sse\rel'\sse\rel$.
\end{proof}

\begin{corollary}\label{cor:linkage-rectangularity}
Let $\rel$ be a subdirect product of $\zA_1$ and $\zA_2$,
$\lnk_1,\lnk_2$ the link congruences, and let $B_1,B_2$ be
as-components of an $\lnk_1$-block and an $\lnk_2$-block, respectively,
such that $\rel\cap(B_1\tm B_2)\ne\eps$. Then $B_1\tm B_2\sse\rel$.
\end{corollary}

\begin{proof}
Let $C_1,C_2$ be the $\lnk_1$- and $\lnk_2$-blocks containing $B_1$
and $B_2$, respectively, and $\relo=(C_1\tm C_2)\cap\rel$. By definition
$\relo$ is a subdirect product of $C_1\tm C_2$, as $\rel$ is subdirect,
and $\relo$ is linked. The result follows by Proposition~\ref{pro:max-gen}.
\end{proof}

\begin{prop}\label{pro:umax-rectangular}
Let $\rel$ be a subdirect product of $\zA_1$ and $\zA_2$,
$\lnk_1,\lnk_2$ the link
congruences, and let $B_1$ be an as-component of an $\lnk_1$-block and
$B'_2=\rel[B_1]$; let $B_2=\umax(B'_2)$. Then $B_1\tm B_2\sse\rel$.
\end{prop}

\begin{proof}
Let $B'_2$ be a subset of a $\lnk_2$-block $C$. By
Corollary~\ref{cor:product-maximal}(1) $B'_2$ contains an as-maximal
element $a$ of $C$. By Corollary~\ref{cor:linkage-rectangularity}
$B_1\tm\{a\}\sse\rel$. It then suffices to show that
$B_1\tm\Filt^{asm}_{B'_2}(a)\sse\rel$.

Suppose for $D\sse\Filt^{asm}_{B'_2}(a)$ it holds $B_1\tm D\sse\rel$.
If $D\ne \Filt^{asm}_{B'_2}(a)$, there are $b_1\in D$ and
$b_2\in\Filt^{asm}_{B'_2}(a)-D$ such that $b_1b_2$ is a thin edge.
By Lemma~\ref{lem:as-rectangularity} $B_1\tm\{b_2\}\sse\rel$; the
result follows.
\end{proof}

\section{Quasi-2-decomposability}\label{sec:quasi-2-decomposability}

An ($n$-ary) relation over a set $A$ is called
\emph{2-decomposable} if, for any tuple $\ba\in A^n$, $\ba\in\rel$ if
and only if, for any $i,j\in[n]$, $\pr_{ij}\ba\in\pr_{ij}\rel$
\cite{Baker75:chinese-remainder,Jeavons98:consist}. 2-decomposability
is closely related to
the existence of majority polymorphisms of the relation.
Relations over general smooth algebras do not have a majority
polymorphism, but they
still have a property close to 2-decomposability. We say that a
relation $\rel$, a subdirect product of $\vc{\zA}n$, is
\emph{quasi-2-decomposable}, if for any elements $\vc an$,
such that $(a_i,a_j)\in\amax(\pr_{ij}\rel)$ for any
$i,j$, there is a tuple $\bb\in\rel$ with $(\bb[i],\bb[j])\in\as{(a_i,a_j)}$
for all $i,j\in[n]$.

\begin{theorem}\label{the:quasi-2-decomp}
Let $\vc\zA n$ be similar smooth algebras. Then any subalgebra $\rel$ of
$\tms\zA n$ is quasi-2-decomposable.

Moreover, if $X\sse[n]$, tuple $\ba$ is such that
$(\ba[i],\ba[j])\in\amax(\pr_{i,j}\rel)$ for any $i,j$, and $\pr_X\ba
\in\amax(\pr_X\rel)$, there is a tuple $\bb\in\rel$ with
$(\bb[i],\bb[j])\in\as{(\ba[i],\ba[j])}$ for any $i,j\in[n]$, and
$\pr_X\bb=\pr_X\ba$.
\end{theorem}

\subsection{Auxiliary lemmas}

We start with ternary relations.

\begin{lemma}\label{lem:3-quasi}
Let $\rel$ be a subdirect product of $\zA_1\tm\zA_2\tm\zA_3$, and let
$(a_1,a_2,a_3)$ be such that $(a_i,a_j)\in\amax(\pr_{ij}\rel)$ for
$i,j\in\{1,2,3\}$, $i\ne j$. Then there is $(a'_1,a'_2,a'_3)\in\rel$ such that
$(a'_i,a'_j)$ is in the as-component of $\pr_{ij}\rel$ containing $(a_i,a_j)$ for
$i,j\in\{1,2,3\}$, $i\ne j$.
\end{lemma}

\begin{proof}
We proceed by induction on the size of $\zA_1,\zA_2,\zA_3$. The base case
of induction is when for each $i\in[3]$ either $|\zA_i|=2$ and $\zA_i$ is a
semilattice or a majority edge, or $\zA_i$ is a module (not necessarily
2-element). By the assumption
some tuples $\ba_1=(b_1,a_2,a_3)$, $\ba_2=(a_1,b_2,a_3)$,
$\ba_3=(a_1,a_2,b_3)$ belong to $\rel$. If one of $\zA_1,\zA_2,\zA_3$
is a semilattice edge, say, $b_1\le a_1$, then from the as-maximality of
$a_1,a_2,a_3$, we obtain $(a_1,a_2,a_3)=\ba_1\cdot\ba_2\in\rel$. If one
of $\zA_1,\zA_2,\zA_3$ is a module, say, $\zA_1$ is, then $\ba_1$ satisfies
the requirements of the lemma. Finally, if all $\zA_1,\zA_2,\zA_3$ are
majority edges, then $(a_1,a_2,a_3)=g(\ba_1,\ba_2,\ba_3)$, where $g$ is
the operation from Theorem~\ref{the:uniform}. Note that
if one of the $\zA_i$ has a unique maximal element (an absorbing element,
for example), the statement also holds, $b_i\sqq a_i$ in this case, and
we can apply Corollary~\ref{cor:product-maximal}(1).

Suppose that the lemma is proved for any subdirect product of
$\zA'_1\tm\zA'_2\tm\zA'_3$, where $\zA'_i$ is a subalgebra or a factor
of $\zA_i$, $i\in[3]$, and at least one of them is a proper subalgebra
or a factor. Let $\ba_1,\ba_2,\ba_3\in\rel$ be as before. Also let $\cD$
denote the set of $(c_1,c_2,c_3)\in\zA_1\tm\zA_2\tm\zA_3$ such that
$(c_i,c_j)$, $i,j\in[3]$ belongs to the as-component of $\pr_{ij}\rel$
containing $(a_i,a_j)$, for $i\ne j$. Set $\cD$ is nonempty, as
$\ba=(a_1,a_2,a_3)\in\cD$.

\smallskip

{\sc Claim 1.}
Every $\zA_i$ can be assumed to be $\Sg{a_i,b_i}$ and $b_i$ can be
chosen to be an as-maximal element.

\smallskip

Suppose $\zA_1\ne\zB=\Sg{a_1,b_1}$. Let $(a'_1,a'_2)$ be an
as-maximal element in $\relo=(\zB\tm\zA_2)\cap\pr_{12}\rel $ such
that $(a_1,a_2)\sqq_{as} (a'_1,a'_2)$ in $\relo$. Let also
$(a_1,a_2)=(c^1_1,c^1_2)\zd(c^k_1,c^k_2)=(a'_1,a'_2)$ be an
as-path from $(a_1,a_2)$ to $(a'_1,a'_2)$ in $\relo$. By
Corollary~\ref{cor:product-path}(1) it can be extended to an as-path
$\bc_1\zd\bc_k\in\rel$ with $\bc_1=(a_1,a_2,b_3)$ in
$\rel'=(\zB\tm\zA_2\tm\zA_3)\cap\rel$. Using
Lemma~\ref{lem:product-edge}(1) we
define a sequence $\vc{\bc'}k$ in $\cD$ as follows: $\bc'_1=\ba$, and
$\bc'_{i+1}$ is such that
$(\bc'_{i+1}[1],\bc'_{i+1}[2])=(c^{i+1}_1,c^{i+1}_2)$ and
$\bc'_i\bc'_{i+1}$ is a thin semilattice or affine edge in
$\Sgg{\zA_1\tm\zA_2\tm\zA_3}{\bc'_i,\bc_{i+1}}$. Note that
$(\bc'_i[u],\bc'_i[v])(\bc'_{i+1}[u],\bc'_{i+1}[v])$ is a thin edge of
the same type as $\bc'_i\bc'_{i+1}$ for $u,v\in[3]$. In particular,
$(a_u,a_v)\sqq_{as}(\bc'_{i+1}[u],\bc'_{i+1}[v])$ in $\pr_{uv}\rel'$.
Replace $\ba$ with $\bc'_k$. Repeating the process for the other binary
projections if necessary we obtain $(a'_1,a'_2,a'_3)\in\cD$ such
that $(a'_i,a'_j)$ is as-maximal in $\pr_{ij}\rel'$. By the induction
hypothesis there is
$(a''_1,a''_2,a''_3)\in\rel\cap(\zB\tm\zA_2\tm\zA_3)$
such that $(a''_i,a''_j)$ is in the as-maximal component containing
$(a'_i,a'_j)$. Clearly, $(a''_1,a''_2,a''_3)$ is as required.

If, say, $b_1$ is not an as-maximal element, then choose an as-path
$b_1=c_1\le\dots c_k$ and its extension $\bc_1\zd\bc_k\in\rel$, $\bc_1=\ba_1$,
such that $c_k$ is a maximal element.

Then we choose an as-path in $\pr_{23}\rel$
from $(a'_2,a'_3)$ to $(a_2,a_3)$. Extending this path as before
we get $(d,a_2,a_3)\in\rel$ such that $d\in\amax(\zA_1)$.

\smallskip

{\sc Claim 2.}
For every $i,j\in[3]$, $\{a_i\}\tm\zA_j\sse\pr_{ij}\rel$,
$\as(a_i)\tm\as(a_j)\sse\pr_{ij}\rel$, and this set is an as-component
 of $\pr_{ij}\rel$.

\smallskip

Since $(a_i,a_j),(a_i,b_j)\in\pr_{ij}\rel$ and $\zA_j=\Sg{a_j,b_j}$,
we have $\{a_i\}\tm\zA_j\sse\pr_{ij}\rel$. By Lemma~\ref{lem:buket}
$\as(a_i)\tm\as(a_j)\sse\pr_{ij}\rel$ and the first and the second
statements of the claim follows. The third statement is obvious.

\smallskip

{\sc Claim 3.}
Every $\zA_i$ can be assumed simple.

\smallskip

Suppose $\th$ is a nontrivial congruence of $\zA_1$ and
$\rel\fac\th=\{(c_1\fac\th,c_2,c_3)\mid (c_1,c_2,c_3)\in\rel\}$. By the
induction hypothesis there is $(a''_1,a'_2,a'_3)\in\rel\fac\th$ satisfying
the conditions of the lemma, that is, there is $(b_1,a'_2,a'_3)\in\rel$
such that $b_1\fac\th=a''_1$, and $(a_2,a_3)\sqq_{as}(a'_2,a'_3)$,
$(a_1\fac\th,a_i)\sqq_{as}(a''_1,a'_i)$ for $i\in\{2,3\}$, where the latter
as-paths are in $\pr_{1i}\rel\fac\th$. Let $a'_1\in b_1\fac\th$ be any
element such that $a_1\sqq_{as} a'_1$ and $a'_1$ is maximal
in $b_1\fac\th$. Such an element exists, because
$a_1\fac\th\sqq_{as}\in b_1\fac\th$. Then for $(a'_1,a'_2,a'_3)$ we have
$(a'_i,a'_j)\in\as(a_i)\tm\as(a_j)\sse\pr_{ij}\rel$, for any
$i,j\in\{1,2,3\}$, where the last inclusion is by Claim~2.
Therefore $(a_i,a_j)\sqq_{as}(a'_i,a'_j)$. Since
$\Sg{a'_1,b_1}\ne\zA_1$, the claim follows by the induction hypothesis.

\smallskip

We now prove the induction step. Suppose now that $|\zA_i|>2$
and $\zA_i$ is not a
module for any $i$. For an $n$-ary relation $\relo\le\tms\zA n$,
$j\in[n]$, and $c_j\in\zA_j$, let $\relo[c_j]$ denote the set
$\{(c_1\zd c_{j-1},c_{j+1}\zd c_n)\in\pr_{\{1\zd j-1,j+1\zd n\}}\mid
(\vc cn)\in\relo\}$. We still use the tuples $\ba_1,\ba_2,\ba_3\in\rel$.
There are two cases to consider.

\smallskip

{\sc Case 1.} For some $i\in[3]$ the set $\rel[b_i]$ contains
$\as(a_j)\tm\as(a_\ell)$, where $\{j,\ell\}=[3]-\{i\}$.

\smallskip

Assume $i=1$. Since $a_1$ is maximal, by Theorem~\ref{the:connectivity}
there is a special asm-path $P$ from $b_1$ to $a_1$. We prove that
for any element $c$ on this path $\{c\}\tm\as(a_2)\tm\as(a_3)\sse\rel$.
This is true for $c=b_1$ by the assumption made. Assume the
contrary, and let $c$ be the first element in $P$ for which this
property is not true. Let also $d$ be the element preceding $c$ in
$P$; we may assume $d=b_1$. If $b_1c$ is semilattice or affine,
then by Lemma~\ref{lem:product-edge}(1)
applied to $(b_1,a_2,a_3)$ and $c$ there is $\bc=(c,a'_2,a'_3)\in\rel$
such that $(a'_2,a'_3)\in\as(a_2,a_3)$. Therefore by
Lemma~\ref{lem:as-rectangularity} $\{c\}\tm\as(a_2)\tm\as(a_3)\sse\rel$.

Let $b_1c$ be a special thin majority edge, $\zB=\Sg{b_1,c}$, and $\th$
a congruence witnessing that $b_1c$ a majority edge; in particular,
$\zB=b_1\fac\th\cup c\fac\th$, as $\zA_1$ is smooth.
If $\zB=\zA_1$ then $\th$ is the equality relation, as
$\zA_1$ is simple, and so $|\zA_1|=2$, a contradiction with the
assumptions about $\zA_1$. Suppose $\zB\ne\zA_1$.
Consider $\rel'=\rel\cap(\zB\tm\zA_2\tm\zA_3)$ and take any
$e\in\max(\zB)\cap c\fac\th$. Such an element exists, because by
Corollary~\ref{cor:quotient-path}(2) any as-path that starts in $c\fac\th$
remains inside $c\fac\th$. For the tuple $(e,a_2,a_3)$ we have
the following. Since $(a_1,a_i),(b_1,a_i)\in\rel$ and
$\zA_1=\Sg{a_1,b_1}$ by Claim~1, $(e,a_i)\in\pr_{1i}\rel'$ for
$i\in\{2,3\}$. Also, $(a_2,a_3)\in\pr_{23}\rel'$, as
$(b_1,a_2,a_3)\in\rel$ by the assumption made. By the induction
hypothesis there is $(e',a'_2,a'_3)\in\rel'$ with $e'\in\as_\zB(e)$
(and so $e'\in c\fac\th$) and $a'_i\in\as_{\zA_i}(a_i)$, $i\in\{2,3\}$.
Let $e''=g(b_1,e',e')$, where $g$ is an operation satisfying the majority
condition and the identities from by Lemma~\ref{lem:fgh-identities}(2).
Then $g(b_1,e'',e'')=e''$. Since $b_1c$ is a minimal pair with respect
to $\th$, it holds that $c\in\Sg{b_1,e''}$. By
Lemma~\ref{lem:thin-semilattice}
$b_1e''$ is also a thin majority edge. Moreover,
\[
\cll{e''}{a'_2}{a'_3}=g\left(\cll{b_1}{a'_2}{a'_3},
\cll{e'}{a'_2}{a'_3},\cll{e'}{a'_2}{a'_3}\right)\in\rel'.
\]
By Lemma~\ref{lem:as-rectangularity}
\[
\as(a_2)\tm\as(a_3)\sse\Filt^{as}_{\pr_{23}\rel'}((a'_2,a'_3))
\sse\rel(e'').
\]

Since $\Sg{b_1,e''}=\Sg{b_1,c}$, $c=r(b_1,e'')$ for some term
operation $r$. It remains to notice that
$$
\cll c{a''_2}{a''_3}=r\left(\cll{b_1}{a''_2}{a''_3},
\cll{e''}{a''_2}{a''_3}\right)\in\rel'
$$
for any $a''_2\in\as(a_2)$, $a'' _3\in\as(a_3)$, a contradiction
with the choice of $c$.

\smallskip

{\sc Case 2.} For all $i\in[3]$, $\as(a_j)\tm\as(a_\ell)\not\sse\rel(b_i)$,
where $\{j,\ell\}=[3]-\{i\}$.

\smallskip

Let $\lnk_{j\ell}$ be the link congruence of $\pr_{j\ell}\rel$ when
$\rel$ is viewed as a subdirect product of $\zA_i$ and
$\pr_{j\ell}\rel$; and let $\lnk_i$ be the link congruence of $\zA_i$.
Since $b_i$ is as-maximal, if $\lnk_i$ is the total congruence, then
by Proposition~\ref{pro:max-gen} $\as(a_j)\tm\as(a_\ell)\sse\rel[b_i]$, a
contradiction with the assumption made. Therefore $\lnk_i$ is the equality
relation for all $i\in[3]$. Consider the $\lnk_{j\ell}$-block
$\relo=\rel[a_i]$. By Claim~2 $\relo$ is a subdirect product of
$\zA_j\tm\zA_\ell$. If $\relo$ is linked, $\as(b_j)\tm\as(a_\ell)\sse\relo$.
In this case, if $|\as(a_i)|=1$ then $\as(a_i)\tm\as(a_\ell)\sse\rel[b_j]$,
a contradiction with the assumptions of Case~2. If $|\as(a_i)|>1$, for
any $c_i\in\zA_i$ such that $a_ic_i$ is a thin semilattice or affine edge
by Lemma~\ref{lem:product-edge}(1)
$(c_j,c_\ell)\in\rel[c_i]$ for some $(c_j,c_\ell)\in\as(b_j)\tm\as(a_\ell)$,
a contradiction with the assumption that $\lnk_i$ is the equality relation.
Therefore $\relo$ is not linked, and, since $\zA_2,\zA_3$ are simple,
$\relo$ is the graph of a bijection. Thus, $\zA_j$ and $\zA_\ell$ are
isomorphic. In a similar way $\zA_i$ and $\zA_j$ are isomorphic.
In particular, $|\zA_1|=|\zA_2|=|\zA_3|=k$. Therefore,
$\pr_{j\ell}\rel$ contains $k$ $\lnk_{j\ell}$-blocks
of size $k$ each. This means $|\pr_{j\ell}\rel|=k^2$, and so
$\pr_{j\ell}\rel=\zA_j\tm\zA_\ell$, which is isomorphic to $\zA_j^2$.
Congruence $\lnk_{j\ell}$ is a skew congruence of the square of a
simple idempotent algebra, which does not have an absorbing
element, by Theorem~\ref{the:simple-idempotent} this implies $\zA_j$,
and therefore all of $\zA_1,\zA_2,\zA_3$ are modules, and the result
follows by the base case of induction.
\end{proof}

\subsection{Proof of Theorem~\ref{the:quasi-2-decomp}}

In this section we prove Theorem~\ref{the:quasi-2-decomp}.

\begin{proof}[Proof of Theorem~\ref{the:quasi-2-decomp}]
Let $\ba$ be a tuple satisfying the conditions of
quasi-2-decom\-po\-sa\-bi\-li\-ty. By induction on ideals of the
power set of $[n]$ (i.e.\ subsets of the power set closed under
taking subsets) we prove that for any ideal $I$ there is $\ba'$
such that $(\ba'[i],\ba'[j])\in\as(\ba[i],\ba[j])$ for any $i,j\in[n]$,
$\pr_X\ba'\in\as(\pr_X\ba)$, and for any
$U\in I$ it holds $\pr_U\ba'\in\amax(\pr_U\rel)$. Then if this
statement is proved for the entire power set,
$\ba'=\pr_{[n]}\ba'\in\pr_{[n]}\rel=\rel$ implies the result.
The base case, where the ideal consists of all at most 2-elements
sets, set $X$, and its subsets, is given by the assumptions of
the theorem and tuple $\ba$.

Suppose that the claim is true for an ideal $I$, set $W$ does not
belong to $I$, but all its proper subsets do. Let $\cE(I)$ be the set of
all tuples $\bc$, not necessarily from $\rel$ such that
$\pr_U\bc\in\pr_U\rel$ for every $U\in I$. Clearly, $\rel\sse\cE(I)$
and $\cE$ is a subdirect product of $\tms\zA n$. By $\cD(I)$ we denote
the set of tuples $\ba\in\cE(I)$ such that
$(\ba[i],\ba[j])\sqq_{as}(\bc[i],\bc[j])$ in $\pr_{ij}\rel$ for $i,j\in[n]$, and
$\pr_X\ba\sqq_{as}\pr_X\bc$. It does not have to be a subalgebra of
$\tms\zA n$. If a tuple belongs to $\cD(I)$ it is said to
\emph{support} $I$. We show that $\cD(I)$ contains a tuple $\bb$
such that $\pr_W\bb\in\pr_W\rel$, that is, $\bb$ supports $I\cup\{W\}$.

Assume that $W=[\ell]$. For a subalgebra $\relo$ of $\pr_W\rel$ a
tuple $\bc\in\cD(I)$ is said to be $\relo$-approximable
if for any $U\subset W$ there is $\bc_U\in\rel$ with
$\pr_U\bc_U=\pr_U\bc$ and $\pr_W\bc_U\in\relo$. We prove the
following statement:
\begin{quote}
Let $\relo$ be a subalgebra of $\pr_W\rel$. If there exists
a $\relo$-approximable tuple from $\cD(I)$, then there is
$\bd\in\cD(I)$ such that $\pr_W\bd\in\relo$.
\end{quote}

Note that if $\relo=\pr_W\rel$, then any tuple in $\cD(I)$
is $\relo$-approximable. Therefore the statement
implies that $\cD(I)$ contains a tuple $\bd$ with
$\pr_W\bd\in\pr_W\rel$, which would prove the induction step.
We prove the statement by induction on the sum of sizes of unary
projections of $\relo$. If one of these projections is 1-element then
the statement trivially follows from the assumption $\pr_U\bc\in\pr_U\relo$
for $U$ including all coordinate positions whose projections contain
more than 1 element, and so $\pr_W\bc\in\pr_W\rel$. So suppose that
the statement is proved for all relations with unary projections
smaller than $\relo$.  Also let $\bc$ be a $\relo$-approximable tuple
from $\cD(I)$. We will need the following auxiliary statements.

\smallskip

{\sc Claim 1.}
Let $\bd\in\cD(I)$ and $\vc\be k$ an as-path in $\cE(I)$. Then every
tuple from an as-path $\vc{\be'}k$ constructed as follows belongs to
$\cD(I)$: $\be'_1=\bd$; if $\be_i\be_{i+1}$ is a semilattice edge
then $\be'_{i+1}=\be'_i\cdot\be_{i+1}$; and if $\be_i\be_{i+1}$
is a thin affine edge then $\be'_i\be'_{i+1}$ is some thin affine edge
in $\Sgg{\tms\zA n}{\be'_i,\be'_{i+1}}$.

\smallskip

Since $\bd,\vc\be k\in\cE(I)$, we also have $\vc{\be'}k\in\cE(I)$. Thus,
we only need to check that $(\be'_s[i],\be'_s[j])\in\as(\ba[i],\ba[j])$
for any $s\in[k]$ and $i,j\in[n]$. However, this condition follows from
the assumption $\bd\in\cD(I)$ --- thus,
$(\be'_1[i],\be'_1[j])\in\as(\ba[i],\ba[j])$, --- and that
$\pr_{ij}\be'_1\zd\pr_{ij}\be'_k$ is an as-path by
Corollary~\ref{cor:product-path}. In a similar way we observe that
$\pr_X\be'_s\in\as(\pr_X\bd)=\as(\pr_X\ba)$.

\smallskip

{\sc Claim 2.}
Let $\bc$ be $\relo$-approximable, $U\subset W$, and let
$\be\in\pr_U\relo$ be such that $\pr_U\bc\sqq_{as}\be$ in $\pr_U\relo$.
Then there is $\bc'\in\cD(I)$ such that it is $\relo$-approximable and
$\pr_U\bc'=\be$.

\smallskip

Let $\pr_U\bc=\bb_1\zd\bb_k=\be$ be an as-path in $\pr_U\relo$.
Since $\bb_i\in\pr_U\relo$ for each
$i\in[k]$, by Corollary~\ref{cor:product-path}(1) this path can
be extended to an as-path $\pr_W\bc_U=\vc{\bb'}k$ in $\relo$.
Then, since $\bb'_i\in\pr_W\rel$
for each $i\in[k]$, applying again Corollary~\ref{cor:product-path}(1)
the as-path $\vc{\bb'}k$ can be extended to an as-path
$\vc{\bb''}k$ in $\rel$ such that $\pr_W\bb''_i=\bb'_i\in\relo$,
$\pr_U\bb''_i=\bb_i$ for each $i\in[k]$. Using Claim~1
we define a sequence
$\vc{\bd}k$ as follows: $\bd_1=\bc$, and $\bd_{i+1}$ is
such that $\pr_U\bd_{i+1}=\bb_{i+1}$ and $\bd_i\sqq_{as}\bd_{i+1}$
in $\Sgg{\tms\zA n}{\bd_i,\bb''_{i+1}}$. Now, set $\bc'=\bd_k$. By Claim~1
$\bc'$ belongs to $\cD(I)$.

To show that $\bc'$ is $\relo$-approximable,
for any $V\subset W$ we construct a tuple $\bc'_V$ as follows.
Consider the sequence
$\pr_V\bc=\pr_V\bc_V=\be_1\zd\be_k=\pr_V\bd_k=\pr_V\be$,
where $\be_i=\pr_V\bd_i$. By construction this is an as-path in
$\pr_V\relo$, so by Corollary~\ref{cor:product-path}(1) it can be
extended to an as-path $\pr_W\bc_V=\be'_1\zd\be'_k$ in $\relo$.
Then, as above, this as-path can be extended to an as-path
$\bc_V=\vc{\be''}k$ in $\rel$. Tuple $\be''_k$ can be chosen to serve
as $\bc'_V$.

\smallskip

In particular, Claim~2 implies that $\bc$ can be chosen such that
for any $i\in W$ the element $\bc[i]$ is as-maximal in $\pr_i\relo$.
We will assume it from now on. For $U=W-\{i\}$, $i\in W$, we
denote $\bc_U$ by $\bc_i$.
Suppose that for some $i\in W$ the unary projection
$\pr_i\relo\ne\Sg{\bc[i],\bc_i[i]}$. Assume $i=1$. Then set
$$
\relo'=\relo\cap\left(\Sg{\bc[1],\bc_1[1]}\tm
\prod_{i\in  W-\{1\}}\pr_i\relo\right).
$$
Note that in this case $\bc$ is $\relo'$-approximable, and the
result follows by the inductive hypothesis.
Let $\bc_i$, $i\in W$, be chosen such that $\Sg{\bc[i],\bc_i[i]}$ are
minimal possible. It is also clear that $\relo$ can be chosen to be
$\Sg{\vc\bc\ell}$.

\smallskip

{\sc Claim 3.}
For any $i\in W$ there is $\bd\in\relo$ such that $\bc[i]\sqq_{as}\bd[i]$
and $\pr_U\bc\sqq_{as}\pr_U\bd$ in $\pr_U\relo$ where $U=W-\{i\}$.

\smallskip

Without loss of generality assume $i=1$ and $U=W-\{i\}$. Consider
the relation
$$
\relo'(x,y,z)=\exists x_4\zd x_\ell (\relo(x,y,z,x_4\zd
x_\ell)\meet(x_4=\bc[4]) \meet\ldots\meet(x_\ell=\bc[\ell])).
$$
Obviously, $\pr_{\{1,2,3\}}\bc_1,\pr_{\{1,2,3\}}\bc_2,
\pr_{\{1,2,3\}}\bc_3\in\relo'$. We show that $\relo'$ contains a tuple
$\bd$ such that $\pr_{12}\bc\sqq_{as}\pr_{12}\bd$,
$\pr_{13}\bc\sqq_{as}\pr_{13}\bd$, $\pr_{23}\bc\sqq_{as}\pr_{23}\bd$.
This would imply the claim, because, $\pr_{23}\bc\sqq_{as}\pr_{23}\bd$
means $\pr_U\bc\sqq_{as}\pr_U\bd$, and any of the fist two connections
means that $\bc[i]\sqq_{as}\bd[i]$.

If, say $(\bc[1],\bc[2])$ is not as-maximal in $\pr_{12}\relo'$, choose
an as-path $(\bc[1],\bc[2])=\be_1\zd \be_s$ in $\pr_{12}\relo'$
such that $\be_s$ is as-maximal in $\pr_{12}\relo'$. By
Corollary~\ref{cor:product-path}(1) this as-path can be extended
to an as-path $\pr_{\{1,2,3\}}\bc_3=\be'_1\zd\be'_s$ in $\relo'$.
Now, as in the proof of Claim~1 we construct a sequence
$\pr_{\{1,2,3\}}\bc=\be''_1\zd\be''_s$, that is not necessarily from
$\relo'$, as follows. If $\be'_i\le\be'_{i+1}$, set
$\be''_{i+1}=\be''_i\cdot\be'_{i+1}$. If $\be'_i\be'_{i+1}$ is
a thin affine edge, then set $\be''_{i+1}$ to be any tuple in
$\Sg{\be''_i,\be'_{i+1}}$ such that $\be''_i\be''_{i+1}$ is a thin
affine edge and $\pr_{12}\be''_{i+1}=\pr_{12}\be'_{i+1}$.

The resulting tuple $\be''_s$ satisfies the following conditions:
$\pr_{12}\be''_s=\be_s$
and
\[
\pr_{13}\bc\sqq_{as}\pr_{13}\be''_s\in\pr_{13}\relo',\qquad
\pr_{23}\bc\sqq_{as}\pr_{23}\be''_s\in\pr_{23}\relo'.
\]

Repeating the procedure above for projections on $\{1,3\}$ and
$\{2,3\}$ if necessary, we obtain a tuple $\bc'$ such that $\pr_{ij}\bc'$
is an as-maximal tuple in $\pr_{ij}\relo'$ for $i,j\in[3]$. Relation
$\relo'$ and the tuples $\pr_{ij}\bc'$, $i,j\in[3]$, satisfy
the conditions of Lemma~\ref{lem:3-quasi}. Therefore, $\relo'$
contains a tuple $\bd$ such that $\pr_{ij}\bc\sqq_{as}\pr_{ij}\bd$
in $\pr_{ij}\relo'$ for $i,j\in[3]$. The result follows.

\smallskip

To complete the proof let $U=[\ell-1]$ (recall that $W=[\ell]$) and
$\bd$ the tuple obtained in Claim~3 for $i=\ell$.
Then $\pr_U\bc\sqq_{as}\pr_U\bd$ in $\pr_U\relo$.
By Claim~2 $\bc$ can be amended so that the new tuple $\bc'$
still supports $I$, but $\pr_U\bc'=\pr_U\bd$. Note that $\bc'[\ell]$ is
in the same as-component of $\pr_\ell\relo$ as $\bd[\ell]$, therefore,
$\bc'[\ell]\sqq_{as}\bd[\ell]$ in $\pr_\ell\relo$.
If $\Sgg{\zA_\ell}{\bc'[\ell],\bd[\ell]}=\pr_\ell\relo$, then there is a as-path
from $\pr_W\bc'$ to $\bd$ in $\pr_W\cE(I)$: this is because
$\pr_U\bc'=\pr_U\bd$ and $\{\pr_U\bd\}\tm\pr_\ell\relo\sse\pr_W\cE(I)$
in this case. Extend this path to a path in $\cE(I)$ as before, and
change $\bc'$ using this path as in Claim~1. The resulting tuple
$\bc''$ supports $I$, and
$\pr_W\bc''=\bd\in\relo$ as required.

If $\zB=\Sgg{\zA_\ell}{\bc'[\ell],\bd[\ell]}\ne\pr_\ell\relo$, then set
$\relo''=\relo\cap(\pr_{[\ell-1]}\relo\tm\zB)$. Since $\bc'$
is $\relo''$-approximable, the result follows from the inductive
hypothesis.

To finish the proof of Theorem~\ref{the:quasi-2-decomp} it suffices to
take care of the requirement that the resulting tuple $\bb$ is such that
$\pr_X\bb=\pr_X\ba$. Since $X\in I$ already in the base
case, the resulting tuple $\bb$ is such that $\pr_X\ba\sqq\pr_X\bb$. By
Corollary~\ref{cor:product-path}(1) there is also a tuple $\bb'$
satisfying the same requirements and such that $\pr_X\bb'=\pr_X\ba$.
\end{proof}

\begin{theorem}\label{the:pseudo-majority}
Let $\cK$ be a finite class of finite similar smooth algebras
omitting type~\one. There is a term operation $\maj$ of $\cK$ such
that for any $\zA\in\cK$ and any
$a,b\in\zA$, $\maj(a,a,b),\maj(a,b,a),\maj(b,a,a)\in\Filt_\zA^{as}(a)$.

In particular, if $a$ is as-maximal, then $\maj(a,a,b),\maj(a,b,a),\maj(b,a,a)$
belong to the as-component of $\zA$ containing $a$.
\end{theorem}

\begin{proof}
Let $\{a_1,b_1\}\zd\{a_n,b_n\}$ be a list of all pairs of elements from
algebras of $\cK$,
let $a_i,b_i\in\zA_i$. Define a relation $\rel$ to be a subdirect product of
$\zA_1^3\tm\dots\tm\zA_n^3$ generated by $\ba_1,\ba_2,\ba_3$, where for every
$i\in[n]$, $\pr_{3i-2,3i-1,3i}\ba_1=(a_i,a_i,b_i)$,
$\pr_{3i-2,3i-1,3i}\ba_2=(a_i,b_i,a_i)$, $\pr_{3i-2,3i-1,3i}\ba_3=(b_i,a_i,a_i)$.
In other words the triples $(\ba_1[3i-2],\ba_2[3i-2],\ba_3[3i-2])$,
$(\ba_1[3i-1],\ba_2[3i-1],\ba_3[3i-1])$, $(\ba_1[3i],\ba_2[3i],\ba_3[3i])$
have the form $(a_i,a_i,b_i),(a_i,b_i,a_i),(b_i,a_i,a_i)$, respectively. Therefore
it suffices to show that $\rel$ contains a tuple $\bb$ such that
$a_i\sqq_{as}\bb[j]$, where $j\in\{3i,3i-1,3i-2\}$. However, since
$(a_{i_1},a_{i_2})\in\pr_{j_1j_2}\rel$ for any $i_1,i_2\in[n]$ and
$j_1\in\{3i_1,3i_1-1,3i_1-2\}$, $j_2\in\{3i_2,3i_2-1,3i_2-2\}$, this
follows from the 2-Decomposition Theorem~\ref{the:quasi-2-decomp}.
\end{proof}

A function $\maj$ satisfying the properties from
Theorem~\ref{the:pseudo-majority} will be called a
\emph{quasi-majority function}.

\section{Rectangularity for maximal components}
\label{sec:max-rectangularity}

In this section we show a stronger rectangularity property --- involving
multi-ary relations --- than that in Proposition~\ref{pro:max-gen},
but for maximal components, rather than as-components.

An algebra $\zA$ is said to be \emph{maximal generated} if it is
generated by its maximal component.

\subsection{Simple maximal generated algebras}

We start with several auxiliary statements.

\begin{lemma}\label{lem:3-ary}
Let $\rel$ be a subdirect product of simple maximal generated algebras
$\zA_1,\zA_2,\zA_3\in\cK$, generated by their maximal components
$C_1,C_2,C_3$, respectively. If $\zA_i\tm \zA_j\sse\pr_{ij}\rel$
for every $i,j\in[3]$ and $\rel\cap(C_1\tm C_2\tm C_3)\ne\eps$,
then $\rel=\zA_1\tm \zA_2\tm \zA_3$.
\end{lemma}

\begin{proof}
Suppose without loss of generality that $|\zA_1|\le
|\zA_2|\le |\zA_3|$. Recall that for $a\in \zA_1$ by $\rel[a]$ we
denote the set $\rel[a]=\{(b_2,b_3)\mid (a,b_2,b_3)\in \rel\}$.
Notice that, for every $a\in\zA_1$, $\rel[a]$ is a subalgebra of
$\pr_{23}\rel$, and, since $\pr_{12}\rel=\zA_1\tm\zA_2$,
$\pr_{13}\rel=\zA_1\tm\zA_3$, the algebra $\rel[a]$ is a subdirect
product of $\zA_2,\zA_3$.
Since both $\zA_2,\zA_3$ are simple and generated by their
maximal components (and therefore as-components) by
Corollary~\ref{cor:linkage-rectangularity}, depending on
whether $\rel[a]$ is linked or not, it is either the
graph of a bijective mapping, or $\zA_2\tm\zA_3$.

Suppose first that $\rel[a]$ is not the graph of a mapping for some
$a\in\zA_1$. For any $b\in\zA_2$ we have
that $(a,b)\tm\zA_3\sse\rel$. Applying
Corollary~\ref{cor:linkage-rectangularity} treating
$\rel$ as a subdirect product of $\pr_{12}\rel=\zA_1\tm\zA_2$ and
$\zA_3$ we get $C_1\tm C_2\tm C_3\sse\rel$. This implies
$\rel=\zA_1\tm\zA_2\tm\zA_3$.

Now suppose that, for every $a\in \zA_1$, the set $\rel[a]$ is the graph
of a bijective mapping $\pi_a\colon \zA_2\to\zA_3$. We repeat the
argument from the proof of Lemma~\ref{lem:3-quasi}.
First, it follows that $\zA_2,\zA_3$ are isomorphic and $|\zA_2|=|\zA_3|$.
Let $k=|\zA_2|=|\zA_3|$. As $\pr_{23}\rel=\zA_2\tm\zA_3$, there are at
least $k$ different
relations of the form $\rel[a]$. Therefore, $|\zA_1|=k$
and $|\rel[a]|=k$ for any $a\in \zA_1$. Moreover, $|\pr_{23}\rel|=k^2$,
which means $\rel[a]\cap \rel[a']=\eps$ whenever $a\ne a'$, $a,a'\in
\zA_1$. The sets of the form $\rel[a]$ form the link congruence $\lnk_{23}$
of $\pr_{23}\rel=\zA_2\tm\zA_3$, which is isomorphic to $\zA_2^2$.
Therefore $\lnk_{23}$ is a skew congruence of the square of a simple
idempotent algebra. Algebra $\zA_2$ does not have an absorbing element,
because $|\zA_2|>1$, while an absorbing element would be the only maximal
element of $\zA_2$, and so $\zA_2$ cannot be maximal generated.
Therefore by Theorem~\ref{the:simple-idempotent} $\zA_2$ is a module,
which implies that $|C_1|=|C_2|=|C_3|=1$, and so
$|\zA_1|=|\zA_2|=|\zA_3|=1$ and the claim is trivial.
\end{proof}

The next lemma is not really needed for our proof, but may be of independent
interest.

\begin{lemma}\label{lem:n-ary}
Let $\rel$ be a subdirect product of simple maximal generated
algebras $\zA_1\zd\zA_n$, say, $\zA_i$ is generated by an maximal
component $C_i$. If $\zA_i\tm \zA_j\sse\pr_{ij}\rel$ for
every $i,j\in[n]$ and $\rel\cap(\tms Cn)\ne\eps$, then
$\rel=\zA_1\tm\ldots\tm \zA_n$.
\end{lemma}

\begin{proof}
We prove the lemma by induction. The base case of induction $n=3$
has been proved in Lemma~\ref{lem:3-ary}. Suppose that
the lemma holds for each number less than~$n$. Take $a\in
\zA_1$ and recall that $\rel[a]=\{(b_2\zd b_n)\mid
(a,b_2\zd b_n) \in \rel\}$.  By Lemma~\ref{lem:3-ary}, $\zA_1\tm
\zA_i\tm \zA_j\sse \pr_{1,i,j}\rel$ for any $2\le i,j\le n$.
Then $\zA_i\tm \zA_j\sse\pr_{ij}\rel[a]$. Therefore by induction
hypothesis $\rel[a]= \zA_2\tm\ldots\tm \zA_n$.
\end{proof}

Lemma~\ref{lem:n-ary} allows one to describe the structure of
subdirect products of simple maximal generated algebras.

\begin{defin}
A relation $\rel\sse \zA_1\tm\ldots\tm \zA_n$ is said to be {\em
almost trivial} if there exists an equivalence relation $\th$ on the set
$[n]$ with classes $I_1\zd I_k$, such that
$$
\rel=\pr_{I_1}\rel\tm\ldots\tm\pr_{I_k}\rel
$$
where $\pr_{I_j}\rel=\{(a_{i_1},\pi_{i_2}(a_{i_1})\zd
\pi_{i_l}(a_{i_1}))\mid a_{i_1}\in \zA_{i_1}\}$, $I_j=\{i_1\zd i_l\}$,
for certain bijective mappings $\pi_{i_2}\colon \zA_{i_1}\to
\zA_{i_2}\zd \pi_{i_l}\colon \zA_{i_1}\to \zA_{i_l}$.
\end{defin}

\begin{lemma}\label{lem:at-for-simple}
Let $\rel$ be a subdirect product of simple maximal generated
algebras $\vc\zA n$, say, $\zA_i$ is generated by an maximal component
$C_i$; and let $\rel\cap(C_1\tm\ldots\tm C_n)\ne\eps$. Then $\rel$
is an almost trivial relation.
\end{lemma}

\begin{proof}
We prove the lemma by induction on $n$. When $n=1$ the result
holds trivially.

We now prove the induction step. By Corollary~\ref{cor:linkage-rectangularity},
for any pair $i,j\in[n]$ the projection $\pr_{ij}\rel$ is either $\zA_i\tm\zA_j$,
or the graph of a bijective mapping. Assume that there exist $i,j$
such that $\pr_{ij}\rel$ is the graph of a mapping
$\pi\colon\zA_i\to\zA_j$. By the inductive hypothesis $\pr_{[n]-\{j\}}\rel$
is almost trivial, and therefore can be represented in the form
$$
\pr_{[n]-\{j\}}\rel=\pr_{I_1}\rel\tm\ldots\tm\pr_{I_k}\rel
$$
where $I_1\cup\ldots\cup I_k=[n]-\{j\}$. Suppose, for simplicity,
that $i$ is the last coordinate position in $I_1$, that is,
\begin{eqnarray*}
\pr_{I_1}\rel &=& \{(a_{i_1}\zd a_{i_k},a_i)\mid a_{i_1}\in\zA_{i_1}, \
a_{i_s}=\pi_{s1}(a_{i_1})\\
& & \hbox{for}\ s\in\{2\zd k\},\ a_i=\pi_i(a_{i_1})\}.
\end{eqnarray*}
Then
\begin{eqnarray*}
\pr_{I_1\cup\{j\}}\rel &=& \{(a_{i_1}\zd a_{i_k},a_i,a_j)\mid a_{i_1}\in\zA_{i_1}, \
a_{i_s}=\pi_{s1}(a_{i_1})\\
& & \hbox{for}\ s\in\{2\zd k\},\ a_i=\pi_i(a_{i_1}),\ a_j=\pi\pi_i(a_{i_1})\},
\end{eqnarray*}
and we have $\rel=\pr_{I_1\cup\{j\}}\rel\tm\ldots\tm\pr_{I_k}\rel$, as
required.

Finally, if $\pr_{ij}\rel=\zA_i\tm\zA_j$ for all $i,j\in\un n$, then
the result follows by Lemma~\ref{lem:n-ary}.
\end{proof}

\subsection{General maximal generated algebras}

Here we consider the case when factors of a subdirect product are maximal
generated, but not necessarily simple.

\begin{lemma}\label{lem:n-simple}
Let $\rel$ be a subdirect product of maximal generated algebras
$\zA_1\zd\zA_n$, where $\zA_1$ is simple. Let also $\zA_1$
be generated by a maximal component $C_1$, $\pr_{2\zd n}\rel$
is maximal generated, say, by a maximal component $\relo$,
$\rel\cap(C_1\tm\relo)\ne\eps$, and $\pr_{1i}\rel=\zA_1\tm \zA_i$ for
$i\in\{2\zd n\}$, Then $\rel=\zA_1\tm\pr_{2\zd n}\rel$.
\end{lemma}

\begin{proof}
We prove the lemma by induction on $n$. The case $n=2$ is obvious.
Consider the case $n=3$. We use induction on
$|\zA_1|+|\zA_2|+|\zA_3|$. The trivial case
$|\zA_1|+|\zA_2|+|\zA_3|=3$ gives the base
case of induction. Let $\relo$ be a maximal component of $\pr_{23}\rel$
generating it. If both $\zA_2,\zA_3$ are simple,
then the result follows from Lemma~\ref{lem:at-for-simple}. Otherwise,
suppose that $\zA_3$ is not simple. Take a maximal congruence $\th$
of $\zA_3$, fix a $\th$-class $D$ and consider
$\rel'\sse\zA_1\tm\zA_2\tm\zA_3\fac\th$, $\rel''\sse\rel$ such that
\begin{eqnarray*}
\rel'  &=& \{(a,b,c\fac\th)\mid (a,b,c)\in\rel\},\\
\rel''&=& \{(a,b,c)\mid (a,b,c)\in\rel, c\in D\},
\end{eqnarray*}
and $\rel'''\sse\rel$, the algebra generated by the maximal component
$\relo'$ of $\rel''$ such that $\pr_1\relo'\cap C_1\ne\eps$ and
$\pr_{23}\relo'\cap\relo\ne\eps$. Note that since
$\zA_1\tm\zA_3\sse\pr_{13}\rel$, by Corollary~\ref{cor:product-maximal}(1)
this implies $\pr_1\relo'\cap C_1=C_1$. Also, obviously,
$\pr_{13}\rel''=\zA_1\tm D$. Moreover, $\zA_1\tm
D''\sse\pr_{13}\rel'''$, where $D''$ is the algebra generated by a
certain maximal component $D'$ of $D$. By Proposition~\ref{pro:max-gen},
$\pr_{23}\rel'$ is either the graph of a mapping, or
$\zA_2\tm\zA_3\fac\th$.

\bigskip

\noindent
{\sc Case 1.}
$\pr_{23}\rel'$ is the graph of a mapping
$\pi\colon\zA_2\to\zA_3\fac\th$.

\medskip

In this case $B''=\pr_2\rel'''$ is the algebra generated by a maximal
component
$B'$ of $B=\pi^{-1}(D)$ and such that $B'\cap\pr_2\relo'\ne\eps$.
Since for each
$(a,b)\in\zA_1\tm B\sse\pr_{12}\rel$ there is $c\in D$ with
$(a,b,c)\in\rel$, we have $\zA_1\tm B\sse\pr_{12}\rel''$. Furthermore,
$\zA_1\tm B''$ is the  algebra generated by a maximal component of
$\zA_1\tm B$, hence, $\pr_{12}\rel'''=\zA_1\tm B''$.

Since $|\zA_1|+|B''|+|D''|<|\zA_1|+|\zA_2|+|\zA_3|$, and
$\pr_{23}\rel'''$ is maximal generated, inductive hypothesis
implies $\zA_1\tm\pr_{23}\rel'''\sse\rel'''$. In particular,
there is $(a,b)\in\pr_{23}\rel'''\cap\relo\sse\pr_{23}\rel$ such that
$\zA_1\tm\{(a,b)\}\sse\rel$. To finish the proof we just apply
Lemma~\ref{lem:buket}.

\bigskip

\noindent
{\sc Case 2.}
$\pr_{23}\rel'=\zA_2\tm\zA_3\fac\th$.

\medskip

Since $|\zA_1|+|\zA_2|+|\zA_3\fac\th|<|\zA_1|+|\zA_2|+|\zA_3|$,
$\zA_3\fac\th$ is simple, and $\pr_{12}\rel=\zA_1\tm\zA_2$, by
inductive hypothesis, $\rel'=\zA_1\tm\zA_2\tm\zA_3\fac\th$. Therefore,
$\pr_{12}\rel''=\zA_1\tm\zA_2$. Then $\pr_{12}\rel'''=\zA_1\tm\zA_2$.
Indeed, let $C_2=\pr_2\relo$, it is a maximal component of $\zA_2$, and
$\zA_2$ is generated by $C_2$. Moreover, $\zA_1\tm\zA_2$ is generated
by $C_1\tm C_2$. By the choice of $\rel'''$, there is
$(a,b,c)\in\rel'''\cap(C_1\tm C_2\tm D')$. By Corollary~\ref{cor:product-path}(1)
for any $(a',b')\in C_1\tm C_2$ there is a path from $(a,b,c)$ to $(a',b',c')$ for
some $c'\in D'$.

Now we argue as in Case~1, except in this case $B''=\zA_2$.

\medskip

Let
us assume that the lemma is proved for $n-1$. Then
$\zA_1\tm\pr_{3\zd n}\rel\sse\pr_{1,3\zd n}\rel$. Denoting $\pr_{3\zd
n}\rel$ by $\rel'$ we have $\rel\sse\zA_1\tm\zA_2\tm\rel'$, and the
conditions of the lemma hold for this subdirect product. Thus
$\rel=\zA_1\tm\pr_{2\zd n}\rel$ as required.
\end{proof}

Lemma~\ref{lem:n-simple} serves as the base case for the following  more
general statement.

\begin{lemma}\label{lem:relation-direct-product}
Let $\rel$ be a subdirect product of smooth algebras $\zA_1\zd\zA_n$.
Let $\zA_1$ be generated by a maximal component $C_1$, $\pr_{2\zd n}\rel$
is maximal generated, say, by a maximal component $\relo$,
$\rel\cap(C_1\tm\relo)\ne\eps$, and $\pr_{,i}\rel=\zA_1\tm \zA_i$ for
$i\in\{2\zd n\}$, Then $\rel=\zA_1\tm\pr_{2\zd n}\rel$.
\end{lemma}

\begin{proof}
For every $i\in\{2\zd n\}$ the set $C_i=\pr_i\relo$ is a maximal component.
Moreover, $\zA_i$ is generated by $C_i$, and therefore is also maximal
generated.

We show that for any subalgebra $\rela$ of $\zA_1$ such that
(a) $\rela\cap C_1\ne\eps$, (b) $\rela$ is maximal generated by its
elements from $C_1$, (c) $\max(C_1\cap\rela)\tm C_i\sse\pr_{1i}\rel$
for $i\in\{2\zd n\}$, and
(d) $\relo\sse\pr_{2\zd n}(\rel\cap(\rela\tm C_2\tm\dots\tm C_n))$,
the following holds: $\{d\}\tm\relo\sse\rel$ for any $d\in\max(C_1\cap\rela)$.

We prove by induction on the size of $\rela$. If $|\rela|=1$, then its
only element belongs to $C_1$ by (a) and is maximal. Then (d) is
equivalent to the claim. Suppose that the result holds for all
subalgebras satisfying (a)--(d) smaller than $\rela$. If
$\rela$ is simple then the result follows from Lemma~\ref{lem:n-simple},
since conditions (a)--(d) imply the premices of
Lemma~\ref{lem:n-simple}. Otherwise let $\th$ be a maximal congruence of
$\rela$, let $\rel'=\{(c_1,c_2\zd c_n)\in\rel\mid c_1\in\rela\}$, and let
$$
\rel^\th=\{(c_1\fac\th,c_2\zd c_n)\mid (c_1,c_2\zd c_n)\in \rel'\}.
$$
By Lemma~\ref{lem:n-simple}
$\rel^\th=\rela\fac\th\tm\pr_{2\zd n}\rel$. Take a class $\rela'$ of
$\th$ containing elements from $C_1$. Observe that $\rela'$
satisfies condition (d). As is easily seen there is a maximal component $B$
of $\rela'$ containing elements from $C_1$. Indeed, take any
$d\in C_1\cap\rela'$, then $\Filt_{S'}^s(d)\sse C_1$. Let $\rela''$
be a subalgebra of $\rela'$ generated by $B$, we show it satisfies
(a)--(d).

Conditions (a) and (b)
are true by the choice of $\rela''$, condition (c) holds since this
condition is true for $\rela$. For condition (d) observe first that
$\relo\sse\pr_{2\zd n}(\rel\cap(\max(\rela')\tm \relo))$.
As for any $d\in C_1\cap \rela'$ there is $(a_2\zd a_n)\in\relo$
with $(d,a_2\zd a_n)\in\rel$ (it follows from the condition
$\rel\cap(C_1\tm\relo)\ne\eps$ of the lemma and
Corollary~\ref{cor:product-path}(1)), applying
Corollary~\ref{cor:product-path}(1)  again
$\relo\sse \pr_{2\zd n}(\rel\cap(B\tm\relo))$,
and (d) is also true for $\rela''$. By inductive hypothesis
$\{d\}\tm\relo\sse \rel$ for $d\in B$. Applying
Proposition~\ref{pro:max-gen} we obtain the result.

Finally, the lemma follows from the fact that $\zA_1$ contains
$C_1$ and satisfies conditions (a)--(d).
\end{proof}

\begin{corollary}\label{cor:max-comp-product}
Let $\rel$ be a subdirect product of smooth algebras
$\zA_1\zd\zA_n$ such that $\pr_{1i}\rel$ is linked for any $i\in\{2\zd n\}$.
Let also $\ba\in\rel$ be such that $\ba[1]\in\max(\zA_1)$ and
$\pr_{2\dots n}\ba\in\max(\pr_{2\dots n}\rel)$. Then
$\se{\ba[1]}\tm\se{\pr_{2\dots n}\ba}\sse\rel$.
\end{corollary}

\begin{proof}
Consider $\rel'$, the relation generated by
$\rel\cap(C\tm D)$, $C=\se(\ba[1])$, $D=\se(\pr_{2\dots n}\ba)$.
By Corollary~\ref{cor:product-path} $\se(\ba[1])\sse\pr_1\rel'$ and
$\se(\pr_{2\dots n}\ba)\sse\pr_{2\dots n}\rel'$. Moreover, $C$ and
$D$ are maximal components in $\pr_1\rel'$ and $\pr_{2\dots n}\rel'$,
respectively. Since $\pr_{1i}\rel$ is linked for $i\in\{2\zd n\}$,
$C\tm\pr_i D\sse\pr_{1i}$. As $\pr_{1i}\rel'\cap(C\tm\pr_i D)\ne\eps$
and $C\tm\pr_i D$ is a maximal component in $\pr_{1i}\rel$, by
Corollary~\ref{cor:product-path} $C\tm\pr_i D\sse\pr_{1i}\rel'$.
Subalgebras $\pr_1\rel'$ and $\pr_i\rel'$ are generated by $C$ and
$\pr_i D$, respectively, therefore, $\pr_{1i}\rel'=\pr_1\rel'\tm\pr_i\rel'$.
Now by Lemma~\ref{lem:relation-direct-product} the result follows.
\end{proof}

\bibliographystyle{plain}