Basic constructions in the categories of sets, sets with a binary relation on them, preorders, and posets

Abstract: The purpose of this note is to work out the details of the concrete incarnation of a few categorical constructions (products, coproducts, pullbacks, pushouts, equalizers, coequalizers, and exponentials) in some useful and basic categories: the categories of sets, sets endowed with a binary relation, preorders, and posets.

\section{Introduction}

This note came out of my need to work our some details I could not find in the textbooks on category theory. They are probably too trivial to be addressed there, but I still felt that they may prove useful for someone. I am not giving the definitions of categories, limits or functors for they can easily be found elsewhere. In what follows I have tried to be as clear as possible. One tool for doing so is the notation. Sometimes I am maybe too explicit, in order to remind of the nature of the objects we deal with. One example of this, is an attempt of distinguishing an element $a$ in a set $A$ from its inclusion $\pair{a,0}$ in a set $A+B$, but I think that at some point this fastidiousness pays off.

Another thread through this note is to try to find an explanation why the proposed constructions turn out to be the ones described by the categorical definitions: why does a product have the number of elements it has and no other? Could a different binary relation fulfill the requirements to be part of the coproduct?

If you find these notes useful, have questions about them, or find errors to correct, please let me know.

We consider in this note the categories:
\begin{itemize}
	\item ${\sf Set}$, the category of sets and functions.
	\item  ${\sf EndoRel}$, the category of sets endowed with a binary relation on them (an \textit{endorelation}), with morphisms the set functions that preserve the binary relation. This is, $f:\pair{A,R}\to \pair{B,S}$ is a morphism in ${\sf EndoRel}$ if for every $a,a'\in A$, if $\pair{a,a'}\in R$ then $\pair{f(a),f(a')}\in S$.

	Note that while this category is named $\sf Rel$  in \cite{adamek06joy}. This category is also known as {\sf Bin}. Many other authors use $\sf Rel$ to denote the category of sets in which the morphisms are relations between sets.
\item  ${\sf PreOrd}
, which has as objects pre-ordered sets, and monotonic functions as morphisms. This category is called $\sf Prost$ in \cite{adamek06joy}.
\item $\sf Pos$ which has as objects posets, and as morphisms, monotonic functions among them.
\end{itemize}

Just to be clear, a \textit{pre-order relation} over a set $A$ is a binary, reflexive and transitive relation. A preorder is a set with a pre-order relation over it, this is a pair $\pair{A, \preceq_A}$. Whenever there is no chance on confusion (and sometimes, even when there is), we will omit the subindex in the preorder relation, or simply  write that $A$ is a Preorder. A \textit{monotonic} (for preorders) function $f:\pair{A,\preceq_A}\to\pair{B,\preceq_B}$ is a set function $f:A\to B$ such that for every $a, b\in A$, if $a\preceq_Ab$ then $f(a)\preceq_Bf(b)$.

 Similarly, a \textit{poset} is a set $P$, endowed with a binary relation $\le_P$, which is an \textit{order} (also known as partial order): it is reflexive, transitive,  and antisymmetric. A function $f:\pair{P,\le_P}\to\pair{Q,\le_Q}$ is \textit{monotonic} if for every $x,y\in P$, $x\le_P y$ implies $f(x)\le_Q f(y)$.  As with preorders, we will often write the order relation as $\le$, leaving out the subindex that indicates which poset we are working on.

\section{${\sf Set}$}

\subsection{Products in ${\sf Set}$}

We will not repeat in this note the definitions of category or product in a category.  One of the basic properties of the products is that they are uniquely determined \textit{up to isomorphism}. Isomorphisms in ${\sf Set}$ are just bijective functions, so we might think that the important feature in a product of sets is the quantity of its elements. We usually realize the product of two sets $A$ and $B$ as their cartesian product:
\[A\times B=\set{\pair{a,b}: a\in A \text{ and } b\in B}.\]
So consider a simple example in which we have the finite sets $A=\set{a,b,c}$ and $B=\set{1,2}$. The six element set $A\times B=$ $\set{\pair{a,1},$ $\pair{a,2},$ $\pair{b,1},$ $\pair{b,2},\pair{c,1},\pair{c,2}}$, together with the implicit projection functions $\pi_A, \pi_B$ is \textit{a} product, but so is any other set with six elements, for example $A'=\set{\text{Black Widow, Captain America,Iron Man, Hawkeye, Hulk, Thor}}$, with adequate projection functions.

What in the definition of products makes it so that it has exactly six elements? Suppose that a set $F$ with five elements is a product of $A$ and $B$ with projection functions $p_A:F\to A$ and $p_B:F\to B$ respectively. Now consider the set $A\times B$ with the usual projections $\pi_A$ and $\pi_B$. Since $F$ is a product, there must exist a function $u:A\times B\to F$ such that the following diagram commutes:
\[\xymatrix{
	&A\times B\ar[dl]_{\pi_A}\ar[dr]^{\pi_B}\ar@{-->}[d]^{u}& \\
	A&F\ar[l]^{p_A}\ar[r]_{p_B}&B
}\]
Since $A\times B$ has six elements and $F$ five, there must exist pairs $\pair{x,y}\neq\pair{z,t}\in A\times B$ such that $u(\pair{x,y})=u(\pair{z,t})$. We must then have that either $x\neq z$ or $y\neq t$, while on the other hand $x=\pi_A\pair{x,y}=p_Au\pair{x,y}=p_Au\pair{z,t}=\pi_A\pair{z,t}=z$ and similarly we can prove that $y=t$.

Could a product  have \textit{more} than six elements? Assume now that a set $S$ with seven elements, with projections $p_A$ and $p_B$ is a product. We then have as above, a \textit{unique} function $u:A\times B\to S$. Since $S$ has seven elements there is at least two elements $s, s'$ with $p_A(s)=p_A(s')$ and $p_B(s)=p_B(s')$. The element $r=u\pair{p_A(s),p_B(s)}\in S$ is one of such elements,  and let $r'\neq r$ be another one. We can now define $u':A\times B\to S$ by
 \[ u'(x)=\begin{cases}
 r'& \text{if } x=\pair{p_A(s),p_B(s)},\\
 u(x)& \text{otherwise}.
 \end{cases} \] In this way, we have a function $u'\neq u$ that makes the diagram commute, contradicting the uniqueness of $u$.

\subsection{Coproducts in ${\sf Set}$}

If $A$ and $B$ are sets, consider the \textit{disjoint union} of $A$ and $B$, which we will denote with $A+B$ and can be realized as $A\times\set{0}\cup B\times\set{1}$. Let $i_A:A\to A+B$ be the inclusion function $i_A(a)=\pair{a,0}$ for each $a\in A$, and similarly, $i_B:B\to A+B$ be the function $i_B(b)=\pair{b,1}$ for each $b\in B$.

We can take the same two sets from the example for products and ask again, why does $A+B$ have exactly five elements?  Suppose we had another set $C$ with functions $inc_A:A\to C$ and $inc_B:B\to C$ such that $C$ is a coproduct. Then we have in particular a unique function $[i_A,i_B]$:

\[\xymatrix{
	A\ar[r]^{inc_A}\ar[dr]_{i_A}	&C\ar@{-->}[d]^{[i_A,i_B]}	&B\ar[l]_{inc_B}\ar[dl]^{i_B}\\
	& A+ B					 	& \\
}
\]

If $C$ has more than five elements, then there are elements in $C$ that are not in the image of $A$ or $B$, so it doesn't matter where do we send them in $A+B$, so we can construct different functions making the diagram commute, and we lose the uniqueness of $[i_A,i_B]$. If $C$ has less than five elements, then we have that either for some  $a\in A$ and $b\in B$, $inc_A(a)=inc_B(b)$, or for some $a, a'\in A, a\neq a'$, $inc_A(a)=inc_A(a')$ (or we have a similar situation for $B$). In the first  case,
 we must also have $\pair{a,0}=i_A(a)=[i_A,i_B]inc_A(a)=[i_A,i_B]inc_B(b)=i_B(b)=\pair{b,1}$, which is an impossibility.  In the second case we get $\pair{a,0}=\pair{a',0}$, which is an impossibility as well.\footnote{We have used here the fact that $i_A=\pair{\cdot,0}$ is an injective function. This is apparent from the definition we have given for the inclusion maps.  More generally, one can prove that the coproduct inclusions are monic morphisms if in the category the product is distributive with respect to the coproduct. See \cite{trimbleInjective}.}

\subsection{Pullbacks in $\sf Set$}

If $f:{A}\to {D}$ and $g:{B}\to {D}$ are functions with common codomain, let $P=\set{\pair{a,b}\in A\times B: f(a)=g(b)}$.  The set ${P}$, together with the projections $\pi_A$ and $\pi_B$, is a pullback in ${\sf Set}$.

It is clear that the projections make the square commute:

\[\xymatrix{
	P\ar[r]^{\pi_A}\ar[d]_{\pi_B}	&A\ar[d]^{f}	\\
	B\ar[r]_{g}& D
}
\]

Now let $X$ be a set  and consider functions  $h:{X}\to{A}$ and $j:X\to B$ such that
\[\xymatrix{
	X\ar[rrd]^{h}\ar[rdd]_{j} &  &  \\
	&	&A\ar[d]^{f}	\\
	&	B\ar[r]_{g}& D
}
\]
commutes. For each $x\in X$, since $f\circ h(x)=g\circ j(x)$, the pair $\pair{h(x),j(x)}$ is in $P$. Define then $u:X\to P$ by $u(x)=\pair{h(x),j(x)}$ for every $x\in X$.

\[\xymatrix{
	X\ar[rrd]^{h}\ar[rdd]_{j} 	\ar@{-->}[dr]^{u}&  &  \\
	&	P\ar[r]_{\pi_A}\ar[d]^{\pi_B}&A\ar[d]^{f}	\\
	&	B\ar[r]_{g}& D
}
\]
For the uniqueness of $u$, consider a function $v$ that makes the diagram commute as well. Then $\pi_Av(x)=h(x)$ and $\pi_Bv(x)=j(x)$, so $v(x)=\pair{h(x),j(x)}=u(x)$.

\subsection{Pushouts in $\sf Set$}

Now let $C$ be a set, with morphisms (that is, functions) $f:C\to A$ and $g:C\to B$. We want to build the pushout of this diagram. To do this, first consider the coproduct set $A+B$.

On the set $A+B$ we now consider the least equivalence relation that contains  the pairs $\pair{f(c),g(c)}$ for all the elements $c\in C$.

An explicit way of characterizing the least equivalence relation $R^e$ containing a binary relation $R$ is as follows:

\begin{lemma} \label{ler}
	The least equivalence relation  containing a binary relation $R$ on a set $A$ consists of the pairs $\pair{a,b}\in A\times A$ such that there exist $n\ge 0$ and $a_0, a_1, \ldots a_n\in A$ such that $a=a_0, b=a_n$, and for each $i=1, \ldots , n$, either $\pair{a_{i-1}, a_{i}}\in R$ or $\pair{ a_{i}, a_{i-1}}\in R$.
\end{lemma}
\begin{proof}
	Let $R^e$ be the relation defined in the statement. We need to prove that $R^e$ is an equivalence relation, that it contains $R$ and that it is the least such relation.

	Taking $n=0$, we see that all the pairs $\pair{a,a}$ for $a\in A$ are in $R^e$, so $R^e$ is reflexive.

	If $\pair{a,b}\in R^e$ then there exist $n\ge 0$ and $a_0, a_1, \ldots a_n\in A$ such that $a=a_0, b=a_n$, and for each $i=1, \ldots , n$, either $\pair{a_{i-1}, a_{i}}\in R$ or $\pair{ a_{i}, a_{i-1}}\in R$. Taking the sequence $b_0=a_n, b_1=a_{n-1},\ldots, b_n=a_0$ we readily see that $\pair{b,a}\in R^e$.

	If $\pair{a,b}\in R^e$  and $\pair{b,c}\in R^e$, then there exist $n\ge 0$ and $a_0, a_1, \ldots a_n\in A$ such that $a=a_0, b=a_n$, such that for each $i=1, \ldots , n$, either $\pair{a_{i-1}, a_{i}}\in R$ or $\pair{ a_{i}, a_{i-1}}\in R$ and  there exist $m\ge 0$ and $b_0, b_1, \ldots b_m\in A$ such that $b=b_0, c=b_m$ such that for each $j=1, \ldots , m$, either $\pair{b_{j-1}, b_{j}}\in R$ or $\pair{ b_{j}, b_{j-1}}\in R$. Taking the sequence $c_0=a, c_1=a_1,\ldots, c_n=a_n=b=b_0,c_{n+1}=b_1,\ldots, c_{n+m}=b_m=c$ we readily see that $\pair{a,c}\in R^e$.

	For each pair $\pair{a,b}\in R$ the sequence $a_0=a,a_1=b$ proves that $\pair{a,b}\in R^e$, so $R\subseteq R^e$.

	Finally, if $E$ is an equivalence relation that contains $R$ and $\pair{a,b}\in R^e$ then there exist $n\ge 0$ and $a_0, a_1, \ldots a_n\in A$ such that $a=a_0, b=a_n$, and for each $i=1, \ldots , n$, either $\pair{a_{i-1}, a_{i}}\in R$ or $\pair{ a_{i}, a_{i-1}}\in R$.  Since $E$ is symmetric and transitive, it turns out that all the pairs $\pair{a_{i-1}, a_{i}}$ are in $E$ and so is $\pair{a,b}$.

\end{proof}

So our next step is to apply the definition of $R^e$ above to the case of the relation on $A+B$ consisting of the pairs $\pair{f(c),g(c)}$ for all the elements $c\in C$. It is the set $E$ of the pairs $\pair{x,y}\in (A+B)\times (A+B)$ such that there exist $n\ge 0$ and $x_0, x_1, \ldots x_n\in A+B$ such that $x=x_0, y=x_n$, and for each $i=1, \ldots , n$, either $\pair{x_{i-1}, x_{i}}=\pair{f(c),g(c)}$ for some $c\in C$ or $\pair{ x_{i-1}, x_{i}}=\pair{g(c),f(c)}$ for some $c\in C$. Let $Q$ be the quotient set $A+B$ over the equivalence relation $R^e$, and let $[\cdot]:A+B\to Q$ be the canonical quotient map.

\begin{lemma}\label{pushoutSet}
	The diagram
	\[\xymatrix{
		C\ar[r]^{f}\ar[d]_{g}	&A\ar[d]^{[\pair{\cdot,0}]}	\\
		B\ar[r]_{[\pair{\cdot,1}]}& Q
	}
	\]

	is a pushout square.
\end{lemma}

\begin{proof}

	We first observe that since for each $c\in C$, $f(c)$ and $g(c)$ are in the same equivalence class of $R^e$, $[\pair{f(c),0}]=[\pair{g(c),1}]$ so the square commutes.

	The elements of $Q$ are of the form $[\pair{f(c),0}]=[\pair{g(c),1}]$ for some $c\in C$ or they are singletons $[\pair{a,0}]=\set{\pair{a,0}}$, or $[\pair{b,1}]=\set{\pair{b,1}}$ if they come from elements in $A+B$ that are not in the image of $f$ or $g$.

	If there is a set $Y$ with functions $k:A\to Y$ and $l:B\to Y$ such that $k\circ f=l\circ g$, then we can define $v:Q\to Y$ by

	\[ v(q)=\begin{cases}
	{k(f(c))}=l(g(c))& \text{if } q=[\pair{f(c),0}]=[\pair{g(c),1}] \text{ for some }c\in C,\\
	k(a)& \text{if } q=[\pair{a,0}] \text{ for some } a\notin f(C), \\
	l(b)& \text{if } q=[\pair{b,1}] \text{ for some } b\notin g(C).
	\end{cases} \]

	\[\xymatrix{
		C\ar[r]^{f}\ar[d]_{g}	&A\ar[d]_{[\pair{\cdot,0}]}\ar[ddr]^k	\\
		B\ar[r]^{[\pair{\cdot,1}]}\ar[drr]_l& Q\ar@{-->}[dr]^v				\\
		&&Y
	}
	\]

	Here we need to check that $v$ is well-defined. If for example, $[\pair{f(c),0}]=[\pair{f(c'),0}]$, then there exist $n\ge 0$ and $x_0, x_1, \ldots x_n\in A+B$ such that $x_0=\pair{f(c),0}, x_n=\pair{f(c'),0}$, and for each $i=1, \ldots , n$, either $\pair{x_{i-1}, x_{i}}=\pair{\pair{f(d_i),0},\pair{g(d_i),1}}$ or $\pair{x_{i-1}, x_{i}}=\pair{\pair{g(d_i),1},\pair{f(d_i),0}}$ for some $d_i\in C$. Thus we get a sequence \[x_0=\pair{f(c),0}=\pair{f(d_0),0}.\]
	\[ x_1=\pair{g(d_0),1}=\pair{g(d_1),1},\]
	\[x_2=\pair{f(d_1),0}=\pair{f(d_2),0},\]
	\[\vdots\]
	\[x_n=\pair{f(d_{n-1}),0}=\pair{f(c'),0}.\]
	That is, for $i=1,\ldots,n$,
	\[ x_i=\pair{g(d_{i-1}),1}=\pair{g(d_i),1}, \text{ if $i$ is odd, and }\]
	\[x_i=\pair{f(d_{i-1}),0}=\pair{f(d_i),0} \text{ if  $i$ is even. }\]
	Since the inclusions are injective, we get in particular that $g(d_{i-1})=g(d_i)$  if $i$ is odd and $f(d_{i-1})=f(d_i)$ if $i$ is even.

	But then  $k(f(c))=k(f(d_0))=l(g(d_0))=l(g(d_1))=k(f(d_1))=\ldots=k(f(c'))$.

	Notice that in the case above, $n$ must be even. If we had started assuming that $[\pair{f(c),0}]=[\pair{g(c'),1}]$, $n$ would have turned out to be odd.

	It is straightforward to check that $v\circ [\pair{\cdot,0}]=k$ and $v\circ [\pair{\cdot,1}]=l$. If $j:Q\to Y$ is such that $j\circ [\pair{\cdot,0}]=k$ and $j\circ [\pair{\cdot,1}]=l$, then $j$ must agree with the definition of $v$, so $v$ is the only function satisfying these two equations.

\end{proof}

\subsection{Equalizers and Coequalizers in $\sf Set$}

\begin{definition}
	Given two morphisms $f,g:X\to Y$, the equalizer is an object $E$ with a morphism $e:E\to X$ such that $f\circ e=g\circ e$ and if any morphism $m:Q\to X$ is such that $f\circ m=g\circ m$ then there exists a unique morphism $u:Q\to E$ such that $e\circ u=m$.

	\[\xymatrix{
		E\ar[r]^{e}&X \ar@<-.5ex>[r]_g \ar@<.5ex>[r]^f & Y	\\
		Q\ar@{-->}[u]_{u}\ar[ur]_m
	}
	\]

\end{definition}

In the case of sets, the equalizer of two functions $f,g:X\to Y$ can easily be described as the subset of $X$ in which the functions $f$ and $g$ agree. Let $E=\set{x\in X: f(x)=g(x)}$. Let $e:E\to X$ be the inclusion map. If there is a function $m:Q\to X$ such that $f\circ m=g\circ m$ then observe that for every $q\in Q$, $f(m(q))=g(m(q))$ so $m(q)\in E$, and we can put $u(q)=m(q)$. If $v:Q\to X$ is such that $e\circ v=m$, since $e$ is the identity for elements in $E$, we conclude that $v=m=u$.

\begin{definition}
	Given two morphisms $f,g:X\to Y$, the co-equalizer is an object $C$ with a morphism $c:Y\to C$ such that $c\circ f=c\circ g$ and if any morphism $m:Y\to P$ is such that $m\circ f=m\circ g$ then there exists a unique morphism $u:C\to P$ such that $u\circ c=m$.
	\[\xymatrix{
		X \ar@<-.5ex>[r]_g \ar@<.5ex>[r]^f & Y\ar[r]^c\ar[dr]_m&C\ar@{-->}[d]_{u}\\
		&&P
	}
	\]
\end{definition}

\begin{lemma}
	In the category of sets, consider the equivalence relation induced on $Y$ by the pairs $\pair{f(x),g(x)}$ for every $x\in X$. By Lemma \ref{ler} this relation consists of all pairs $\pair{y,y'}\in Y\times Y$ such that there exist $n\ge 0$ and $y_0, y_1, \ldots y_n\in Y$ such that $y=y_0, y'=y_n$, and for each $i=1, \ldots , n$, either $\pair{y_{i-1}, y_{i}}=\pair{f(x),g(x)}$ or $\pair{ y_{i-1}, y_{i}}=\pair{g(x),f(x)}$ for some $x\in X$. Taking $C$ to be the quotient of $Y$ by this relation and the canonical map from $Y$ to $C$ which we denote with $[\cdot]$, we obtain a co-equalizer of $f$ and $g$.
\end{lemma}

\begin{proof}
	It is immediate that for every $x\in X$, $[f(x)]=[g(x)]$.

	Given $P$ and $m:Y\to P$ such that  $m\circ f=m\circ g$, we put for each $[y]\in C$, $u([y])=m(y)$. We need to check that $u:C\to P$ is a well defined function. If $[y]=[y']$ then there exist $n\ge 0$ and $y_0, y_1, \ldots y_n\in Y$ such that $y=y_0, y'=y_n$, and for each $i=1, \ldots , n$, either $\pair{y_{i-1}, y_{i}}=\pair{f(x),g(x)}$ or $\pair{ y_{i-1}, y_{i}}=\pair{g(x),f(x)}$ for some $x\in X$. For $n=0$, we have that $y=y'$, so $m(y)=m(y')$. If $n\ge 1$, then for each $i=1,\ldots,n$ we have that $[y_{i-1}]=[y_i]$. If the pair $\pair{ y_{i-1}, y_{i}}$ is $\pair{f(x),g(x)}$ or $\pair{g(x),f(x)}$ for some $x\in X$, then $m(f(x))=m(g(x))$,  so $m(y_{i-1})=m(y_i)$. It follows that $m(y)=m(y')$.

	If for some function $v:C\to P$, $v\circ[\cdot]=m$, then for each $[y]\in C$, $v([y])=m(y)$, so $v=u$.
\end{proof}

\subsection{Equalizers and Pullbacks}\label{sectequa}

In this section we work in arbitrary categories, and we see from general principles, that we have spent some unnecessary effort working out either the equalizer or pullback constructions in ${\sf Set}$. On the other hand, one of our goals is to have a concrete description of these constructions in particular categories.

There is a close relation between  equalizers  and pullbacks in categories in which binary products exist:

\begin{lemma}
	In a category with binary products and pullbacks, equalizers exist.
\end{lemma}

\begin{proof}
	Given $f,g:A\to B$, consider the diagram:

	\[\xymatrix{
		&B\ar[d]^{\Delta}	\\
		A\ar[r]_{\pair{f,g}}& B\times B
	}
	\] where $\Delta=\pair{1_B,1_B}$. Take the pullback of this diagram. It will be an object $E$ and morphisms $e:E\to A$ and $h:E\to B$.
	The object $E$ and the morphism $e$ form a equalizer of $f$ and $g$.
	\[\xymatrix{
		E\ar[r]^h\ar[d]_e	&B\ar[d]^{\Delta}	\\
		A\ar[r]_{\pair{f,g}}& B\times B
	}
	\]
	First we check that $f\circ e=g\circ e$. Let $\pi_1, \pi_2$ be the projections from $B\times B$ to $B$. Then we have $\pi_1\pair{f,g}e=fe=\pi_1\pair{1_b,1_b}h=h$. On the other hand, $\pi_2\pair{f,g}e=ge=\pi_2\pair{1_b,1_b}h=h$, so $fe=h=ge$.

	Now let $m:Q\to A$ be such that $fm=gm$. Then the square
	\[\xymatrix{
		Q\ar[r]^{fm}\ar[d]_m	&B\ar[d]^{\Delta}	\\
		A\ar[r]_{\pair{f,g}}& B\times B
	}
	\] commutes. By the definition of the pullback, there exists a unique $u:Q\to E$ such that $eu=m$, which is is the condition required to prove that $E$ and $e$ form an equalizer.
\end{proof}

\begin{lemma}
	In a category with binary products and equalizers, pullbacks exist.
\end{lemma}

\begin{proof}
	Consider the diagram:
	\[\xymatrix{
		&B\ar[d]^{g}	\\
		A\ar[r]_{f}&C
	}
	\] We can construct the product $A\times B$ and then take the equalizer $E$ of the parallel arrows from $A\times B$ to $C$ $f\pi_A$ and $g\pi_B$.

	\[\xymatrix{
		E\ar[r]^{e}&A\times B \ar@<-.5ex>[r]_{g\pi_B} \ar@<.5ex>[r]^{f\pi_A} & C
	}
	\] We now check that the square
	\[\xymatrix{
		E\ar[r]^{\pi_Be}\ar[d]_{\pi_Ae}&B\ar[d]^{g}	\\
		A\ar[r]_{f}&C
	}\] is a pullback. It is clear that the square commutes because of the equalizer equation $f\pi_Ae=g\pi_Be$.

	Now if $X$ is such that there are morphisms $k:X\to A$ and $l:X\to B$ such that $fk=gl$, then we have that $f\pi_A\pair{k,l}=g\pi_B\pair{k,l}$, so by the definition of equalizers, there exists a unique $u:X\to E$ such that $eu=\pair{k,l}$.
	\[\xymatrix{
		E\ar[r]^{e}&A\times B \ar@<-.5ex>[r]_{g\pi_B} \ar@<.5ex>[r]^{f\pi_A} & C	\\
		X\ar@{-->}[u]_{u}\ar[ur]_{\pair{k,l}}
	}\ \ \ \ \ \ \xymatrix{
		X\ar[rrd]^{k}\ar[rdd]_{l} 	\ar@{-->}[dr]^{u}&  &  \\
		&	E\ar[r]_{\pi_Ae}\ar[d]^{\pi_Be}&A\ar[d]^{f}	\\
		&	B\ar[r]_{g}& C
	}
	\]
	Therefore, $\pi_A eu=\pi_A\pair{k,l}=k$ and $\pi_B eu=\pi_B\pair{k,l}=l$.
\end{proof}

Furthermore, there is a connection between pullbacks and products. A terminal object \textbf{1} in a category can be seen as an empty product. If there is a terminal object in a category, then the pullback of any diagram of the form
\[\xymatrix{
	&B\ar[d]^{!_B}	\\
	A\ar[r]_{!_A}&\textbf{1}
}
\] is a product of $A$ and $B$.

Dually, if co-products exist in a category, pushouts can be constructed from coequalizers and coequalizers can be constructed from pushouts.

\subsection{Exponentials}

We just briefly review the usual construction of exponentials in ${\sf Set}$. Given sets $A$ and $B$, let $B^A=\set{f:A\to B}$ that is, the set of all the functions from $A$ to $B$.

The set $B^A$ can also be denoted as $A\Rightarrow B$, a notation that is perhaps more suggestive of the set of functions going from $A$ to $B$, and also agrees with the intuitionistic implication in Heyting algebras of sets.

The function $eval: B^A\times A\to B$ is defined by $eval(f,a)=f(a)$ for every $a\in A$ and $f:A\to B$. Now we can check the defining universal property of exponentials, namely that for every function $f:X\times A\to B$, there is a unique function $\tilde{f}:X\to B^A$ such that the following diagram commutes:

\[\xymatrix{
B^A&B^A\times A\ar[r]^{eval}&B\\
X\ar[u]^{\tilde{f}}&X\times A\ar[u]^{\tilde{f}\times 1_A}\ar[ur]_f&
}\]

For each $x\in X$, $\tilde{f}(x)$ is a function from $A$ to $B$ defined by $\tilde{f}(x)(a)=f(x,a)$ for all $x\in X$  and $a\in A$. Furthermore, for any function $g:X\to B^A$ such that $eval\circ g\times 1_A=f$ and all $x\in X, a\in A$  we have that $g(x)(a)=eval(g(x),a)=f(x,a)=\tilde{f}(x)(a)$.

We are interested as before in seeing why the defined set of all functions from $A$ to $B$ fits exactly with the definition of the exponential object. It is helpful to think in terms of the \textit{adjunction} of the functors $\cdot\times A$ and $\cdot^A$. The adjunction is an isomorphism (so, in ${\sf Set}$, a bijection) between the sets of all the functions from $X\times A$  $B$ and the set of all functions from $X$ to $B^A$. This isomorphism is usually written as:
\[\frac{X\times A\to B}{X\to B^A}\]

Now consider the special case in which $X$ is a singleton set $1=\set{*}$. Now we have:
\[\frac{1\times A\to B}{1\to B^A}\]
This is, we have a bijection between the elements in $B^A$ and the functions from $A$ to $B$.

\section{${\sf EndoRel}$}

\subsection{Products in ${\sf EndoRel}$}

If $\pair{A,R}$ and $\pair{B,S}$ are sets with binary relations, we take the set $A\times B$ (the cartesian product), together with the relation $T$ defined by:
\[\pair{a,b}T\pair{a',b'}\text{ iff } aRa'\text{ and }bSb'\]
Clearly $T$ is a binary relation on $A\times B$. The projections $\pi_A:A\times B\to A$ and $\pi_B:A\times B\to B$ preserve the relations: if $\pair{a,b}T\pair{a',b'}$ then by the definition of $T$, $aRa'$ and $bSb'$.

Given a set $C$ with a relation $U$ on $C$, and morphisms $f:C\to A$, and $g:C\to B$, define $\pair{f,g}:C\to A\times B$ by:
\[\pair{f,g}(c)=\pair{f(c),g(c)}\]
for every $c\in C$.  Is $\pair{f,g}$ a morphism in ${\sf EndoRel}$? If $cUc'$ for $c,c'\in C$, then $f(c)Rf(c')$ and $g(c)Sg(c')$. Therefore,
$\pair{f(c),g(c)}T\pair {f(c'),g(c')}$ this is $\pair{f,g}(c)T\pair{f,g}(c')$.

 From the definitions,  $\pi_A\circ \pair{f,g}=f$ and $\pi_B\circ \pair{f,g}=g$. Furthermore, if $k:C\to A\times B$ is a morphism such that $\pi_A\circ k=f$ and $\pi_B\circ k=g$, then for every $c\in C$, $k(c)=\pair{f(c),g(c)}$ so $k=\pair{f,g}$.

\[\xymatrix{
	&\pair{C,U}\ar[dl]_f\ar[dr]^g\ar@{-->}[d]^{\pair{f,g}}& \\
	\pair{A,R}&\pair{A\times B,T}\ar[l]^{\pi_A}\ar[r]_{\pi_B}&\pair{B,S}
}\]

The same reasoning is valid for building all \textit{small} products, that is, products over arbitrary sets.

Could a different relation $T'$ on $A\times B$ also be a product in ${\sf EndoRel}$?
All the pairs in $T$ must be in $T'$: if $a,a'\in A$ and $b,b'\in B$ are such that  $\pair{a,a'}\in R$ and $\pair{b,b'}\in S$,  consider a set $C=\set{c,c'}$ with the relation $U=\set{\pair{c,c'}}$. We set $f:C\to A$ by $f(c)=a$ and $f(c')=a'$. In the same manner, $g:C\to B$ is given by $g(c)=b$ and $g(c')=b'$. Then the function $\pair{f,g}:C\to A\times B$ must preserve the relation $U$, so $\pair{f,g}(c)=\pair{a,b}$ should be related by $T'$ with $\pair{f,g}(c')=\pair{a',b'}$.

 If there was an excess of pairs in $T'$, there would exist  a pair $\pair{\pair{a,b},\pair{a',b'}}$ in $T'$, but not in $T$. Then we would have that $\pair{a,a'}\notin R$ or $\pair{b,b'}\notin S$. Say that $\pair{a,a'}\notin R$, then the projection $\pi_A$ would not preserve the relation $T'$. This is, assuming that the relations $R$ and $S$ are not empty! What happens when $S$ is empty?

 We may call the relation $T$ defined above $R\times S$.

\subsection{Coproducts in ${\sf EndoRel}$}

If $\pair{A,R}$ and $\pair{B,S}$ are sets with binary relations, we take the coproduct of their underlying sets  $A+B$  as we did in ${\sf Set}$.  We endow this set with the relation $V$:
\[\pair{x,y}V\pair{x',y'}\text{ iff } xRx' \text{ and } y=y'=0, \text{ or }xSx' \text{ and } y=y'=1.\]

Alternatively, if we identify the elements $a\in A$ with the pairs $\pair{a,0}$ and the elements $b\in B$ with the pairs $\pair{b,1}$, we can write:
\[xVy\text{ iff } (x, y\in A \land  xRy) \lor  (x, y \in B \land  xSy).\]

 Both $i_A$ and $i_B$ are readily seen to preserve the binary relation: if $aRa'$ for $a, a'\in A$ then $\pair{a,0}V\pair{a',0}$. We may also indicate the relation $V$ by $R+S$.

Given morphisms $f:\pair{A,R}\to \pair{D,W}$ and $g:\pair{B, S}\to \pair{D,W}$, we can use the function   $[f,g]:A+B\to D$ defined for the category ${\sf Set}$.

\begin{exercise}
	Check that $[f,g]$ is a morphism in ${\sf EndoRel}$.
\end{exercise}

We now argue that the given relation $R+S$ is the only one that make the set $A+B$ the coproduct in ${\sf EndoRel}$. Suppose $V'$ is a relation on $A+B$ such that $\pair{A+B,V'}$ is a coproduct, with inclusions $inc_A$ and $inc_b$. All the pairs from $R+S$ must be in $V'$: Take $A\neq\emptyset$ and $a,a'\in A$ such that $\pair{a,a'}\in R$. Since $i_A$ is a morphism in ${\sf EndoRel}$, $\pair{i_A(a),i_A(a')}\in V'$.

  Now assume that for some $a,a'\in A$ we have that $\pair{\pair{a,0},\pair{a',0}}\in V$ but $\pair{a,a'}\notin R$. Then, the following diagram must commute:
\[\xymatrix{
	\pair{A,R}\ar[r]^{inc_A}\ar[dr]_{i_A}	&\pair{A+B,V'}\ar@{-->}[d]^{[i_A,i_B]}	&\pair{R,S}\ar[l]_{inc_B}\ar[dl]^{i_B}\\
	& \pair{A+ B,R+S}					 	& \\
}
\] Then, we have that $\pair{[i_A,i_B]\pair{a,0},[i_A,i_B]\pair{a',0}}\in R+S$, that is $\pair{i_A(a),i_A,(a')}\in R+S$, so by the definition of $R+S$, we get that $\pair{a,a'}\in R$, a contradiction.

\subsection{Pullbacks in ${\sf EndoRel}$}

If $f:\pair{A,R}\to \pair{D,W}$ and $g:\pair{B,S}\to \pair{D,W}$ are morphisms in ${\sf EndoRel}$ with common codomain, let $P=\set{\pair{a,b}\in A\times B: f(a)=g(b)}$, and define the relation $T$ by
\[\pair{a,b}T\pair{a',b'}\text{ iff } aRa'\text{ and }bSb'.\]
This is the same relation as in the construction of the product. We claim that $\pair{P,T}$, together with the projections $\pi_A$ and $\pi_B$, is a pullback in ${\sf EndoRel}$.

It is clear that the projections preserve the binary relations, and  the square
\[\xymatrix{
	\pair{P,T}\ar[r]^{\pi_A}\ar[d]_{\pi_B}	&\pair{A,R}\ar[d]^{f}	\\
	\pair{B,S}\ar[r]_{g}& \pair{D,W}
}
\]
commutes.

Now let $\pair{X,V}$ be a set with a binary relation and  morphisms $h:\pair{X,V}\to\pair{A,R}$ and $j:\pair{X,V}\to \pair{B,S}$ such that
\[\xymatrix{
	\pair{X,V}\ar[rrd]^{h}\ar[rdd]_{j} &  &  \\
	&	&\pair{A,R}\ar[d]^{f}	\\
	&	\pair{B,S}\ar[r]_{g}& \pair{D,W}
}
\]
commutes. As we did in ${\sf Set}$, define then $u:X\to P$ by $u(x)=\pair{h(x),j(x)}$ for every $x\in X$. To check that $u$ is preserves the relation, assume $xVy$ for some $x, y \in X$. Since $h$ and $j$ preserve the relation, $h(x)Rh(y)$ and $j(x)Sj(y)$, so $\pair{h(x),j(x)}T\pair{h(y),j(y)}$, that is,  $u(x)Tu(y)$.

\[\xymatrix{
	\pair{X,V}\ar[rrd]^{h}\ar[rdd]_{j} 	\ar@{-->}[dr]^{u}&  &  \\
	&	\pair{P,T}\ar[r]_{\pi_A}\ar[d]^{\pi_B}&\pair{A,R}\ar[d]^{f}	\\
	&	\pair{B,S}\ar[r]_{g}& \pair{D,W}
}
\]
The uniqueness of $u$ follows easily as in the product.

\subsection{Pushouts and Coequalizers in ${\sf EndoRel}$} \label{pushoutRel}

In order to construct pushouts in ${\sf EndoRel}$, we define the quotient by an equivalence relation $E$ of an endorelation $R$ on a set $A$ by:
\[R/E=\set{\pair{[a], [b]}:\pair{a,b}\in R}\]
This means that a pair $\pair{[a], [b]}$ is in $R/E$ if and only if there exist $a'\in A$ and $b'\in B$ such that $a'\in [a], b'\in[b]$ and $\pair{a',b'}\in R$. Notice that this is the \textit{least} endorelation on $A/E$ that makes the function $[\cdot]$ a morphism in ${\sf EndoRel}$: with this definition, we ensure that every time that  we have that $\pair{a,b}\in R$,  $\pair{[a], [b]}\in R/E$, and at the same time, no extra pair of elements appears in $R/E$.

To check that the construction of the pushout we gave for sets works here, we need to see that the function $v$ defined in Lemma \ref{pushoutSet} preserves the endorelation. For this, assume that we have a pair $\pair{[a],[b]]}\in R+S/E$. Then, there exist $a',b'$ such that $a'\in[a]$, $b'\in[b]$, and $\pair{a',b'}\in R+S$. Assuming $a'=\pair{c,1},b'=\pair{d,1}$ for some $c,d\in B$ such that $\pair{c,d}\in S$, it follows that $\pair{l(c),l(d)}\in U$, and this means that $\pair{v([a]),v([b])}\in U$, since $v([a])=v([a'])=v([\pair{c,1}])$ and $v([b])=v([b'])=v([\pair{d,1}])$.  Needless to say, the situation is similar if $a'$ and $b'$ come from elements in $A$.

	\[\xymatrix{
	\pair{C, U}\ar[rr]^{f}\ar[d]_{g}&	&\pair{A,R}\ar[d]_{[\pair{\cdot,0}]}\ar[ddrr]^k	\\
	\pair{B,S}\ar[rr]^{[\pair{\cdot,1}]}\ar[drrrr]_l&& \pair{A+B/E,R+S/E}\ar@{-->}[drr]^v				\\
	&&&&\pair{Y,U}
}
\]

The coequalizers can be constructed from co-products and pushouts as shown in section \ref{sectequa}.

\subsection{Terminal object}

There is a terminal object in the category ${\sf EndoRel}$: take a singleton $\set{*}$ with the identity relation $\set{\pair{*,*}}$. Then, for every $\pair{A,R}$ the map $!_A$ that sends every element in $A$ to $*$ is a morphism in ${\sf EndoRel}$.

\subsection{Exponentials in ${\sf EndoRel}$}

We have seen that the exponential in ${\sf Set}$ of sets $A$ and $B$ can be constructed the set of all functions from  $A$ to $B$. In ${\sf EndoRel}$, both $A$ and $B$ are endowed with a binary relation, so we consider instead of all functions from $A$ to $B$, just the ones that preserve the relation on $A$. Then we need to put a binary relation on this set accordingly. We will first give the relation, then we check that $eval$ and $\tilde{f}$ are morphisms in ${\sf EndoRel}$ for every morphism $f:X\times A\to B$, and finally we will justify why the relation defined is the only one that could work.

We write with $\pair{B,S}^{\pair{A,R}}$ or simply $B^A$ (at the risk of forgetting that we are \textit{not} considering \textit{all} the functions from $A$ to $B$) the set of all relation preserving functions from $A$ to $B$, that is, the morphisms in ${\sf EndoRel}$\footnote{Other common names for this are ${\sf EndoRel}(\pair{A,R},\pair{B,S})$ or $Hom_{{\sf EndoRel}}(\pair{A,R},\pair{B,S})$. }. Given $\alpha, \beta\in \pair{B,S}^{\pair{A,R}}$, we define:
\[\pair{\alpha,\beta}\in W \text{ iff }\pair{a,a'}\in R\text{ implies } \pair{\alpha(a),\beta(a')}\in S.\]

$eval: \pair{B^A,W}\times\pair{A,R}\to\pair{B,S}$ is a morphism in ${\sf EndoRel}$: Assume $\pair{\pair{\alpha,a},\pair{\beta,a'}}\in W\times R$, so $\pair{\alpha,\beta}\in W$ and $\pair{a,a'}\in R$. Then, by the definition of $W$,  $\pair{\alpha(a),\beta(a')}\in S$, just as we needed.

Now assume that $f:\pair{X,V}\times \pair{A,R}\to\pair{B,S}$ is a morphism, and $\tilde{f}:X\to B^A$ is defined as before by $\tilde{f}(x)(a)=f(x,a)$ for every $x\in X, a\in A$. Let $\pair{x,x'}\in V$. Then to prove that $\pair{\tilde{f}(x),\tilde{f}(x')}\in W$, we need to take a pair $\pair{a,a'}\in R$ and prove that $\pair{\tilde{f}(x)(a),\tilde{f}(x')(a')}\in S$. But this is straightforward because from the hypothesis $\pair{\pair{x,a},\pair{x',a'}}\in V\times R$, so $\pair{f({x,a}),f({x',a'})}\in S$ which is $\pair{\tilde{f}(x)(a),\tilde{f}(x')(a')}\in S$.

To analize the relation $W$ we will use again the adjunction, now with $2=\set{0,1}$ with the relation $V=\set{\pair{0,1}}$. The product $\pair{2,V}\times\pair{A,R}$ can be interpreted as a pair of copies of $A$: $\set{0}\times A$ and $\set{1}\times A$, and the relation $V\times R$, for each pair $\pair{a,a'}\in R$, has exactly one pair joining $\pair{0,a}$ with $\pair{1,a'}$.

At the same time, a morphism $p$ from $\pair{2,V}$ to any $\pair{A,R}$ has the effect of picking one element of the relation $R$: $p(0)$ is the first component, and $p(1)$ the second, while $p$ is a morphism in ${\sf EndoRel}$ only if $\pair{p(0),p(1)}\in R$.
\[\frac{\pair{2\times A,V\times R}\to \pair{B,S}}{\pair{2,V}\to \pair{B^A,W}}\]
So, there is a bijection between the morphisms from $\pair{2,V}$ to $\pair{B^A,W}$, and morphisms from $\pair{2\times A,V\times R}$ to $\pair{B,S}$. The former correspond to pairs in $W$, while there are as many in the latter as morphisms from $\pair{ A, R}$ to $\pair{B,S}$.

\subsection{${\sf EndoRel}$ is unbalanced}

Consider a set with two different endorelations on it. To be more concrete, take the set $A=\set{a,b}$ and the objects $\pair{A,\emptyset}$ and $\pair{A,\set{\pair{a,b}}}$. Then the identity is a ${\sf EndoRel}$-morphism from the first to the second, which is monic and epic but has no inverse. Categories in which this can happen are called \textit{unbalanced}.

\section{Preordered sets}

${\sf PreOrd}$ is a full subcategory of ${\sf EndoRel}$. This means that all the morphisms in ${\sf EndoRel}$ that go from a preordered set to another are also monotonic functions and therefore morphisms in ${\sf EndoRel}$. Because of this, we don't need to check that the functions used with the constructions in ${\sf EndoRel}$ are monotonic.

\subsection{Products in ${\sf PreOrd}$}

If $\pair{A,\preceq_A}$ and $\pair{B,\preceq_B}$ are preoders, we take the set $A\times B$ (the cartesian product), together with the relation $\preceq_{A\times B}$ defined by:
\[\pair{a,b}\preceq_{A\times B}\pair{a',b'}\text{ iff } a\preceq_Aa'\text{ and }b\preceq_Bb'\]

This is a particular case of the one for ${\sf EndoRel}$. We should check that $\preceq_{A\times B}$ is a  preorder relation, but this is straightforward. It also follows from the work in ${\sf EndoRel}$ that the projections $\pi_A:A\times B\to A$ and $\pi_B:A\times B\to B$ are monotonic, and that given a preordered set $C$, and morphisms $f:C\to A$, and $g:C\to B$, the function $\pair{f,g}:C\to A\times B$  defined by $\pair{f,g}(c)=\pair{f(c),g(c)}$ for every $c\in C$ is the unique morphism such that $\pi_A\pair{f,g}=f$ and $\pi_B\pair{f,g}=g$

\subsection{Coproducts in ${\sf PreOrd}$}
If $\pair{A,\preceq_A}$ and $\pair{B,\preceq_B}$ are preorders, consider the construction $\pair{A+B, \preceq_A+\preceq_B}$. We may write $\preceq_A+\preceq_B$ as $\preceq_{A+B}$.
\[\pair{x,y}\preceq_{A+B} \pair{x',y'}\text{ iff } x\preceq_Ax' \text{ and } y=y'=0, \text{ or }x\preceq_Bx' \text{ and } y=y'=1.\]
The functions $i_A:A\to A+B$  and $i_B:B\to A+B$ work as in ${\sf EndoRel}$ and checking the universality of the construction requires no new considerations.

\subsection{Pullbacks in ${\sf PreOrd}$}

If $f:A\to D$ and $g:B\to D$ are morphisms in $\sf Ord$ with common codomain, the pullback of this diagram can be constructed as in ${\sf EndoRel}$, after checking that the restriction of the preorder relation on the product to the subset $P=\set{\pair{a,b}\in A\times B: f(a)=g(b)}$ is still a preorder.
\[\xymatrix{
	P\ar[r]^{\pi_A}\ar[d]_{\pi_B}	&A\ar[d]^{f}	\\
	B\ar[r]_{g}& D
}
\]

\subsection{Pushouts in $\sf Ord$}

To construct a pushout or co-equalizer in ${\sf PreOrd}$, we face a problem: the quotient of a preordered set by an arbitrary equivalence relation may not be preordered. In particular, transitivity fails. Consider the example on the following figure:

	\includegraphics{posquot.png}

We have a preordered set and an equivalence relation with classes $\set{a}, \set{b,c}$, and $\set{d}$. The quotient set would have $[b]\preceq[a]$ and $[d]\preceq[c]=[b]$ but no relation between $[a]$ and $[d]$.

When we constructed a quotient in ${\sf EndoRel}$, we endowed the quotient set with the least relation that made the canonical map a morphism. Now we must find the least relation on the quotient set that makes it a preorder, while still keeps the quotient map a morphism. For this, we will use the  \textit{transitive closure} of a binary relation.

\begin{lemma}
	Given a binary relation $R$ on a set $A$,  the least transitive relation $R^t$ containing $R$ is the set of pairs $\pair{a,b}\in A\times A$ such that there exist $a_1, a_2, \ldots a_n$ such that $a=a_1, b=a_n$, and for each $i=1, \ldots , n-1$,  $\pair{a_i, a_{i+1}}\in R$.
\end{lemma}

The proof of the lemma above is similar to the one of Lemma \ref{ler}.

Now let $\pair{A,\preceq_A}, \pair{B,\preceq_B}, \pair{C,\preceq_C}$ be preordered sets, with morphisms $f:C\to A$ and $g:C\to B$. We want to build the pushout of this diagram. To do this, first consider the coproduct preorder $\pair{A+B, \preceq_A+\preceq_B}$. As we did in ${\sf EndoRel}$, we  consider  on $A+B$ the equivalence relation $R^e$ where
\[R=\set{\pair{f(c),g(c)}:c\in C}  \]
 Then we take the quotient set with the corresponding relation $\pair{A+B/_{R^e},\preceq_{A+B}/_{R^e} }$ and finally we take the transitive closure of this relation, to obtain the preordered set $\pair{A+B/_{R^e},(\preceq_{A+B}/_{R^e})^t }$.

\begin{exercise}
	If $R$ is a  reflexive relation on a set $A$, then its transitive closure, $\preceq$ is a preorder relation on $A$.
\end{exercise}

We will write  $\preceq$ for $(\preceq_{A+B}/_{R^e})^t$. Since $\preceq_{A+B}$ is reflexive,  so is $\preceq_{A+B}/_{R^e}$ and therefore $\preceq$ is a preorder on $A+B/_{R^e}$. We will also write $(A+B/_{R^e})^t$ for the pair $\pair{A+B/_{R^e},\preceq}$.

\begin{lemma}
$(A+B/_{R^e})^t$, together with the functions $[\cdot]i_A$ and $[\cdot]i_B$, is a pushout in ${\sf PreOrd}$.
\end{lemma}

\begin{proof}
\[\xymatrix{
	C\ar[r]^{f}\ar[d]_{g}	&A\ar[d]_{[\cdot]i_A}\ar[ddr]^k	\\
	B\ar[r]^{[\cdot]i_B\ \ }\ar[drr]_l& (A+B/_{R^e})^t\ar@{-->}[dr]^v\\
	&&Y
}
\]
We use the same functions that we used for ${\sf EndoRel}$ in the subsection \ref{pushoutRel}. The point that remains to be checked is that the function $v$ defined is a morphism when considered from the preordered set $(A+B/_{R^e})^t$ to $Y$.

If we consider $[x]\preceq[y]$, then there exist $[x_1]=[x], [x_2], \ldots,[x_n]\in A+B/_{R^e}$ such that for each $i=2,\ldots,n$, $\pair{[x_{i-1}],[x_i]}\in \preceq_{A+B}/_{R^e}$. This means that for each $i=2,\ldots,n$, there exist $y_{i-1}\in[x_{i-1}], y_i\in[x_i]$ such that $y_{i-1}, y_i\in A$ and $y_{i-1}\preceq_A y_i$ or $y_{i-1}, y_i\in B$ and $y_{i-1}\preceq_B y_i$. In the first case, we get that $v([x_{i-1}])=k(y_{i-1})\preceq_Yk(y_i)=v([x_i])$ and in the second, $v([x_{i-1}])=l(y_{i-1})\preceq_Yl(y_i)=v([x_i])$. Using the transitivity of $\preceq_Y$, we obtain $v([x])\preceq_Yv([y])$. Notice that each $[x_i]$ may have representatives in the set $A$ and $B$ simultaneously.
\end{proof}

\section{The category  $\sf Pos$ of posets}

\subsection{${\sf Pos}$ is a reflective subcategory of ${\sf PreOrd}$}

Given a preorder relation $\preceq$ on a set $A$, one can define an equivalence relation $\approx$ on $A$ by $a\approx b$ if and only if $a\preceq b$ and $b\preceq a$. If we denote with $[a]$ the equivalence class, then the relation on $A/\approx$ defined by $[a]\le[b]$ if and only if there exist $a'\in [a]$ and $b'\in[b]$ such that $a'\preceq b'$ is a partial order, so $\pair{A/\approx,\le}$ is a poset.

First note that ${\sf Pos}$ is a full subcategory of ${\sf PreOrd}$. We will prove that ${\sf Pos}$ is a also a \textit{reflective} subcategory of ${\sf PreOrd}$. The definition is taken from \cite{adamek06joy}:

\begin{definition}
	Let {\sf A} 	be a subcategory 	of {\sf B}, and 	let $B$ 	be a {\sf B}-object.
	\begin{enumerate}
		\item  	An {\sf A}-\textit{reflection} (or {\sf A}-\textit{reflection 	arrow}) for $B$ 	is a {\sf B}-morphism	$r:B\to A$ from 	$B$ to an {\sf A}-object $A$ with the following universal property:

	for any {\sf B}-morphism $f:B\to A'$ from 	$B$ into some {\sf A}-object $A'$, there exists a unique 	{\sf A}-morphism 	$f': A \to  A'$ such that the triangle
	\[\xymatrix{
		B\ar[r]^{r}\ar[dr]_{f}	&A\ar@{-->}[d]^{f'}	\\
		& A'
	}
	\]
	commutes. By an ``abuse of language'' an object $A$ is called an 	{\sf A}-reflection 	for $B$ provided that there exists an {\sf	A}-reflection
$r:B\to  A$ for $B$ with 	codomain 	$A$.
	\item 	{\sf A} 	is 	called 	a \textit{reflective 	subcategory} 	of {\sf B} 	provided 	that each 	{\sf B}-object 	has an {\sf A}-reflection.

\end{enumerate}
\end{definition}

\begin{theorem}
	${\sf Pos}$ is a reflective subcategory of ${\sf PreOrd}$.
\end{theorem}
\begin{proof}
	Given a preordered set $\pair{P,\preceq_P}$, define the relation $\equiv$ by
	\[p\equiv p' \text{ iff } p\preceq_P p'\text{ and }p'\preceq_Pp.\]
	$\equiv$ is an equivalence relation and $\pair{P/_\equiv,\preceq/_\equiv}$ is a poset. The canonical map $[\cdot]:P\to P/_\equiv$ is a {\sf Pos}-reflection.

	Let $\pair{A,\leq_A}$ be a poset and $f:P\to A$ a morphism in {\sf Ord}. Define $f':P/_\equiv\to A$ by $f'([p])=f(p)$ for each $[p]\in P/_\equiv$.

		\[\xymatrix{
		P\ar[r]^{[\cdot]}\ar[dr]_{f}	&P/_\equiv\ar@{-->}[d]^{f'}	\\
		& A
	}
	\]

	$f'$ is well-defined: If $[p]=[p']$ then $p\preceq_P p'\text{ and }p'\preceq_Pp$. Then $f(p)\le_A f(p')$ and $f(p')\le_A f(p)$, so $f(p)=f(p')$.

	$f'$ is a morphism in ${\sf PreOrd}$: if $[p]\preceq/_\equiv[q]$, then there exist $p'\in[p]$ and $q'\in[q]$ such that $p'\preceq_Pq'$ so $f'([p])=f(p')\le_Af(q')=f'([q])$.

	Finally $f'$ is unique: if $g:P/\equiv\to A$ is such that $g\circ[\cdot]=f$, then for each $p\in P$, $g([p])=f(p)=f'([p])$.
\end{proof}

\begin{exercise} Prove that in the Theorem above, $\equiv$ is an equivalence relation and $\pair{P/_\equiv,\preceq/_\equiv}$ is a poset.
\end{exercise}

Some general results from reflective subcategories apply then, so we have:

\begin{lemma}
	There is a unique functor ${\sf Q:Ord\to Pos}$ such that for every preordered set $\pair{A,\preceq_A}$, ${\sf Q}(A)=\pair{A/_\equiv,\preceq_A/_\equiv}$ and for each morphism $f:\pair{A,\preceq_A}\to\pair{B, \preceq_B}$ in ${\sf PreOrd}$, the diagram
		\[\xymatrix{
		A\ar[d]^{f}\ar[r]^{q_A}	&{\sf Q}(A)\ar[d]^{{\sf Q}(f)}	\\
		B\ar[r]_{q_B}& {\sf Q}(B)
	}
	\] commutes, where $q_A:A\to{\sf Q}(A)$ is the canonical quotient map (or the ${\sf Pos}$-reflection arrow).
\end{lemma}

The proof can be seen as a particular case of 4.22 in \cite{adamek06joy}, or proved as an exercise.

\subsection{Products, coproducts and pullbacks}
The constructions of products, coproducts and pullbacks in ${\sf PreOrd}$, when applied to posets, yield posets, so these can be constructed in ${\sf Pos}$ just as in ${\sf PreOrd}$ and in ${\sf EndoRel}$, and their universal properties are preserved.

\subsection{Coequalizers in $\sf Pos$}

\begin{lemma} \cite{adamek06joy} 7.69, p. 119. In ${\sf Pos}$ coequalizers are formed by first forming the coequalizers in ${\sf PreOrd}$ and then taking the ${\sf Pos}$-reflection of the resulting preordered set.
\end{lemma}

\begin{proof}
	Let $f,g:X\to Y$ be ${\sf Pos}$-morphisms. We can consider them in the bigger category ${\sf PreOrd}$ and their coequalizer there, $c:Y\to C$.

	Now let $Z$ be a poset with a ${\sf Pos}$-morphism $m:Y\to Z$ such that $mf=mg$, and let $q:C\to Q={\sf Q}(C)$ be the ${\sf Pos}$ reflection of $C$.
	\[\xymatrix{
	X \ar@<-.5ex>[r]_g \ar@<.5ex>[r]^f & Y\ar[r]^c\ar[drr]_m&C\ar@{-->}[dr]^{u}\ar[r]^q&Q \ar@{-->}[d]^{v}\\
	&&&Z
}
\]
By the definition of coequalizer, there exists a unique ${\sf PreOrd}$-morphism $u:C\to Z$ such that $uc=m$, and by the definition of ${\sf Pos}$-reflection, there exists a unique ${\sf Pos}$-morphism $v:Q\to Z$ such that $vq=u$. It follows that $vqc=uc=m$, and if $g$ is a ${\sf Pos}$ morphism such that $gqc=m$, then since $vqc=m$, from the definition of reflection it turns out that $v=g$.
\end{proof}

\subsection*{Acknowledgment}
Thanks to Fernando Tohm\'e for the discussions and reaing this manuscript.

\bibliographystyle{alpha}


Linear Stability of Ring Systems

Abstract: We give a self-contained modern linear stability analysis of a system of n equal mass bodies in circular orbit about a single more massive body. Starting with the mathematical description of the dynamics of the system, we form the linear approximation, compute all of the eigenvalues of the linear stability matrix, and finally derive inequalities that guarantee that none of these eigenvalues have positive real part. In the end, we rederive the result that J.C. Maxwell found for large n in his seminal paper on the nature and stability of Saturn's rings, which was published 150 years ago. In addition, we identify the exact matrix that defines the linearized system even when n is not large. This matrix is then investigated numerically (by computer) to find stability inequalities. Furthermore, using properties of circulant matrices, the eigenvalues of the large 4nx4n matrix can be computed by solving n quartic equations, which further facilitates the investigation of stability. Finally, we have implemented an n-body simulator and we verify that the threshold mass ratios that we derived mathematically or numerically do indeed identify the threshold between stability and instability. Throughout the paper we consider only the planar n-body problem so that the analysis can be carried out purely in complex notation, which makes the equations and derivations more compact, more elegant and therefore, we hope, more transparent. The result is a fresh analysis that shows that these systems are always unstable for 2<=n<=6 and for n > 6 they are stable provided that the central mass is massive enough. We give an explicit formula for this mass-ratio threshold.

\section{Introduction}

One hundred and fifty years ago, \citet{Max59} was awarded the
prestigious Adam's prize for a seminal
paper on the stability of Saturn's rings.  At that time, neither the structure
nor the composition of the rings was known.  Hence, Maxwell considered various
scenarios such as the possibility that the rings were solid or liquid annuli
or a myriad of small boulders.  As a key part of this last
possibility, Maxwell studied the case of $n$ equal-mass bodies orbiting
Saturn at a common radius and uniformly distributed about a circle of this
radius.  He concluded that, for large $n$, the ring ought to be stable
provided that the following inequality is satisfied:
\[
    \mbox{mass(Rings)} \le 2.298 \mbox{mass(Saturn)}/n^2 .
\]
The mathematical analysis that leads to this result has been scrutenized,
validated, and generalized by a number of mathematicians over the years.

We summarize briefly some of the key historical developments.
\citet{1889Tisserand} derived the same stability criterion using an analysis
where he assumed that the ring has no effect on Saturn and that the highest
vibration mode of the system controls stability.  More recently,
\citet{1986A&A...161..403W} used the theory of density waves to show that
Maxwell's results are correct in the limit as $n$ goes to infinity.
\citet{1935RSPTA.234..145P} reformulated the stability problem so that it
takes into account the effect of the rings on the central body.  He proved
that, for $n \le 6$, the system is unconditionally unstable.  Inspired by this
work, \citet{1988A&A...205..309S} studied coorbital formations of $n$
satellites for small values of $n$ where the satellites are not distributed
uniformly around the central body.  They showed that there are some stable
asymmetric formations (such as the well-known case of a pair of ring bodies in
L4/L5 position relative to each other---i.e., one leading the other by
$60\deg$).  Finally, \citet{1991CeMDA..51...83S} extended the analysis of
Pendse to find the stability criterion as a function of the number of
satellites when $n$ is small.   The resulting threshold depends on $n$ but for
$n \ge 7$, it deviates only a small amount from the asymptotically derived
value.

In this paper, we give a self-contained
modern linear stability analysis of a system of equal
mass bodies in circular orbit about a single more massive body.  We start with
the mathematical description of
the dynamics of the system. We then form the linear approximation, compute all
of the eigenvalues of the matrix defining the linear approximation, and
finally we derive inequalities that guarantee that none of these eigenvalues
have positive real part.  In the end, we get exactly the same result that
Maxwell found for large $n$.
But, in addition, we identify the exact matrix that defines the
linearized system even when $n$ is not large.  This matrix can then be
investigated numerically to find stability inequalities even in
cases where $n$ is not large.  Furthermore, using properties of circulant
matrices, the eigenvalues of the large $4n \times 4n$ matrix can be computed
by solving $n$ quartic equations, which further facilitates the investigation.
Finally, we have implemented an $n$-body
simulator based on a leap-frog integrator (see \cite{ST94,HMM94})
and we verify that the
threshold mass ratios that we derived mathematically or numerically do indeed
identify the threshold between stability and instability.

Throughout the paper we consider only the planar $n$-body problem.  That is,
we ignore any instabilities that might arise due to out-of-plane
perturbations.  Maxwell claimed, and others have confirmed, that these
out-of-plane perturbations are less destabilizing than in-plane ones and hence
our analysis, while not fully general, does get to the right answer.  Our main
reason for wishing to restrict to the planar case is that we can then work
in the complex plane and our entire analysis can be carried out
purely in complex notation, which makes the equations and derivations more
compact, more elegant and therefore, we hope, more transparent.

\section{Equally-Spaced, Equal-Mass Bodies in a Circular
Ring About a Massive Body}
Consider the multibody problem consisting of one large central body, say
Saturn, having mass $M$ and $n$ small bodies, such as boulders, each of
mass $m$ orbiting the large body in circular orbits uniformly spaced in a ring
of radius $r$.  Indices $0$ to $n-1$ will be used to denote the ring masses
and index $n$ will be used for Saturn.  Throughout the paper we assume that
$n \ge 2$.  For the case $n=1$, Lagrange proved that the system
is stable for all mass ratios $m/M$.

The purpose of this section is to show that such a ring exists as a solution
to Newton's law of gravitation.  In particular, we derive the relationship
between the angular velocity $\omega$ of the ring particles and their radius
$r$ from the central mass.
We assume all bodies lie in a plane and therefore complex-variable notation is
convenient.
So, with $i = \sqrt{-1}$ and $z = x + iy$, we can write the equilibrium
solution for $j=0,1,\ldots,n-1$, as
\begin{equation} \label{1}
    z_j = r e^{i(\omega t + 2 \pi j/n)}
\end{equation}
and
\begin{equation} \label{2}
    z_n = 0.
\end{equation}
By symmetry (and exploiting our assumption that $n \ge 2$), force is balanced on Saturn itself.
Now consider the ring bodies.
Differentiating \eqref{1}, we see that
\begin{equation} \label{6}
    \ddot{z}_j = - \omega^2 z_j .
\end{equation}
From Newton's law of gravity we have that
\begin{equation} \label{3}
    \ddot{z}_j = - GM \frac{z_j-z_n}{|z_j-z_n|^3}
               + {\sum_{k \ne j,n}} Gm \frac{z_k - z_j}{|z_k - z_j|^3}.
\end{equation}
Equations \eqref{6} and \eqref{3} allow us to determine $\omega$, which is our
first order of business.
By symmetry it suffices to consider $j=0$.
It is easy to check that
\begin{equation} \label{4}
    z_k - z_0 = re^{i \omega t} e^{\pi i k/n} 2 i \sin(\pi k/n)
\end{equation}
and hence that
\begin{equation} \label{5}
    |z_k - z_0| = 2 r \sin(\pi k/n) .
\end{equation}
Substituting \eqref{4} and \eqref{5} into \eqref{3} and equating this with
\eqref{6}, we see that
\begin{eqnarray} \label{7}
    -\omega^2 & = & -\frac{GM}{r^3}
                + \sum_{k=1}^{n-1} \frac{Gm}{4r^3}
            \frac{i e^{\pi i k/n}}{\sin^2(\pi k/n)} \\
              & = & -\frac{GM}{r^3}
                    - \frac{Gm}{4r^3}
              \sum_{k=1}^{n-1}
            \frac{1}{\sin(\pi k/n)}
                    +i\frac{Gm}{4r^3}
              \sum_{k=1}^{n-1}
            \frac{\cos(\pi k/n)}{\sin^2(\pi k/n)} .
            \label{8}
\end{eqnarray}
It is easy to check that the summation in the imaginary part on the right
vanishes.  Hence,
\begin{equation} \label{9}
    \omega^2 = \frac{GM}{r^3} + \frac{Gm}{r^3} {I_{n}}
\end{equation}
where
\begin{equation} \label{10}
    {I_{n}} = \frac{1}{4} \sum_{k=1}^{n-1} \frac{1}{\sin(\pi k/n)} .
\end{equation}
With this choice of $\omega$, the trajectories given by \eqref{1} and \eqref{2}
satisfy Newton's law of gravitation.

\section{First-Order Stability}

In order to carry out a stability analysis, we need to counter-rotate the
system so that all bodies remain at rest.  We then perturb the system slightly
and analyze the result.

A counter-rotated system would be given by
\[
    e^{- i \omega t} z_j(t) = r e^{2 \pi i j/n} = z_j(0).
\]
In such a rotating frame of reference, each body remains fixed at its initial
point.  It turns out to be better to rotate the different bodies different
amounts so that every ring body is repositioned to lie on the $x$-axis.  In
other words, for $j=0,\ldots,n-1,n$, we define
\begin{equation} \label{11}
    w_j
    = u_j + i v_j
    = e^{- i (\omega t + 2 \pi j/n)} z_j
    .
\end{equation}
The advantage of repositioning every ring body to the positive real axis
is that
perturbations in the real part for any ring body represent radial perturbations
whereas perturbations in the imaginary part represent azimuthal perturbations.
A simple counter-rotation does not provide such a clear distinction
between the two types of perturbations (and the associated stability matrix
fails to have the circulant property that is crucial to all later analysis).

Differentiating \eqref{11} twice, we get
\begin{equation} \label{12}
    \ddot{w}_j = \omega^2 w_j
               - 2 i \omega \dot{w}_j
               + e^{- i (\omega t + 2 \pi j/n)} \ddot{z}_j
           .
\end{equation}
From Newton's law of gravity, we see that
\begin{equation} \label{13}
    \ddot{w}_j = \omega^2 w_j
               - 2 i \omega \dot{w}_j
               + {\sum_{\stackrel{\mbox{\scriptsize $k=0$}}{k \ne j}}^{n-1}} Gm_k \frac{{\xi_{k,j}}}{|{\xi_{k,j}}|^3}
           ,
\end{equation}
where
\begin{equation} \label{202}
    m_k = \cases{
                 m, & for $ k = 0,1,\ldots,n-1$, \cr
                 M, & for $ k = n$, \cr
          }
\end{equation}
\begin{equation} \label{200}
    {\xi_{k,j}} = e^{i {\theta_{k-j}}} w_k - w_j
\end{equation}
and
\begin{equation} \label{201}
    \theta_k = 2 \pi k / n .
\end{equation}

Let $\delta w_j(t)$ denote variations
about the fixed point given by
\begin{equation} \label{211}
    w_j \equiv \cases{
                   r, & for $j = 0,1,\ldots,n-1$, \cr
                   0, & for $j = n$. \cr
               }
\end{equation}
We compute a linear
approximation to the differential equation describing the evolution of such a
perturbation.  Applying the quotient, chain, and product rules as
needed, we get
\begin{eqnarray}
    \ddot{\delta w}_j & = &
                 \omega^2 {\delta w}_j
           - 2 i \omega \dot{\delta w}_j
                   + {\sum_{\stackrel{\mbox{\scriptsize $k=0$}}{k \ne j}}^{n-1}} Gm_k
            \frac{|{\xi_{k,j}}|^3 {\delta \xi_{k,j}} - {\xi_{k,j}} \frac{3}{2}|{\xi_{k,j}}|
                 ({\xi_{k,j}} {\delta \zbarkj} + {\bar{\xi}_{k,j}} {\delta \xi_{k,j}})}{
              |{\xi_{k,j}}|^6
                 }
             \nonumber \\
                      & = &
                 \omega^2 {\delta w}_j
           - 2 i \omega \dot{\delta w}_j
                   - \frac{1}{2} {\sum_{\stackrel{\mbox{\scriptsize $k=0$}}{k \ne j}}^{n-1}} Gm_k
            \frac{|{\xi_{k,j}}|^2 {\delta \xi_{k,j}} + 3 {\xi_{k,j}^2} {\delta \zbarkj}}{
              |{\xi_{k,j}}|^5
                 } , \label{210}
\end{eqnarray}
where
\begin{eqnarray*}
    {\delta \xi_{k,j}}    &=& e^{i {\theta_{k-j}}} \delta w_k - \delta w_j \\[0.2in]
    {\delta \zbarkj} &=& e^{-i {\theta_{k-j}}} \delta \bar{w}_k - \delta \bar{w}_j .
\end{eqnarray*}

The next step is to use \eqref{200} to re-express the ${\xi_{k,j}}$'s in terms of the
$w_k$'s and the $w_j$'s and then to substitute in
the particular solution given by \eqref{211}.
Consider the case where $j < n$.  In this case we have
\[
    {\xi_{k,j}} = \cases{
               r (e^{i {\theta_{k-j}}} - 1), & for $k < n$, \cr
              -r,                  & for $k = n$ \cr
           }
\]
and therefore
\[
    |{\xi_{k,j}}| = \cases{
                2r \sin (|{\theta_{k-j}}|/2), & for $ k < n$, \cr
                 r,                 & for $ k = n$. \cr
             }
\]
Substituting these into \eqref{210} and simplifying, we get
\begin{eqnarray}
    \ddot{\delta w}_j &=&
                 \omega^2 {\delta w}_j
           - 2 i \omega \dot{\delta w}_j
           - \frac{GM}{2r^3}
              (e^{-i\theta_j} \delta w_n
              + 3 e^{i\theta_j} \delta \bar{w}_n)
           + \frac{GM}{2r^3}
              (\delta w_j + 3 \delta \bar{w}_j)
           \nonumber \\[0.2in]
        && \quad - \frac{Gm}{2r^3} \; \frac{1}{8}
           {\sum_{k \ne j,n}}
           \frac{e^{i{\theta_{k-j}}}\delta w_k - \delta w_j
             -3e^{i{\theta_{k-j}}}(e^{-i{\theta_{k-j}}}\delta\bar{w}_k - \delta\bar{w}_j)}{
              \sin^3 (|{\theta_{k-j}}|/2)
              }
           . \label{215}
\end{eqnarray}

\section{Choice of Coordinate System}
Without loss of generality, we can choose our coordinate system so that the
center of mass remains fixed at the origin.  Having done that,
the perturbations $\delta w_n$ and $\delta \bar{w}_n$ can be computed
explicitly in terms of the other perturbations.  Indeed, conservation of
momentum implies that
\[
    m {\sum_{k \ne n}} \delta z_k + M \delta z_n = 0.
\]
Hence,
\[
    \delta z_n = - \frac{m}{M} {\sum_{k \ne n}} \delta z_k .
\]
From the definition \eqref{11} of the $w_k$'s in terms of the $z_k$'s, it then
follows that
\[
    e^{-i \theta_j} \delta w_n = - \frac{m}{M} {\sum_{k \ne n}} e^{i {\theta_{k-j}}} \delta w_k .
\]
Making this substitution for $e^{-i \theta_j} \delta w_n$
and an analogous substitution for $e^{i \theta_j} \delta \bar{w}_n$
in \eqref{215}, we see that
\begin{eqnarray}
    \ddot{\delta w}_j &=&
                 \omega^2 {\delta w}_j
           - 2 i \omega \dot{\delta w}_j
           + \frac{Gm}{2r^3} {\sum_{k \ne n}}
              \left(e^{i\theta_{k-j}} \delta w_k
              + 3 e^{-i\theta_{k-j}} \delta \bar{w}_k \right)
           + \frac{GM}{2r^3}
              (\delta w_j + 3 \delta \bar{w}_j)
           \nonumber \\[0.2in]
        && \quad - \frac{Gm}{2r^3} \; \frac{1}{8}
           {\sum_{k \ne j,n}}
           \frac{e^{i{\theta_{k-j}}}\delta w_k - \delta w_j
             -3e^{i{\theta_{k-j}}}(e^{-i{\theta_{k-j}}}\delta\bar{w}_k - \delta\bar{w}_j)}{
              \sin^3 (|{\theta_{k-j}}|/2)
              } .
            \label{216}
\end{eqnarray}

\section{Circulant Matrix}

Switching to matrix notation,
let $W_j$ denote a shorthand for the column vector
$\left[\begin{array}{cc} w_j & \bar{w}_j \end{array}\right]'$.
In this notation, we see that \eqref{216} together with its conjugates
can be written as
\begin{equation} \label{42}
    \frac{d}{dt}
    \left[ \begin{array}{c}
        {\delta W}_0 \\
        {\delta W}_1 \\
        \vdots       \\
        {\delta W}_{n-1} \\
        \dot{\delta W}_0 \\
        \dot{\delta W}_1 \\
        \vdots           \\
        \dot{\delta W}_{n-1}
    \end{array} \right]
    \approx
    \left[ \begin{array}{cccc|cccc}
      &   &   &   &   I &   &        &    \\
      &   &   &   &     & I &        &    \\
      &   &   &   &     &   & \ddots &    \\
      &   &   &   &     &   &        & I  \\
    \hline
    D       & N_1  &\cdots&N_{n-1}&  \Omega &         &      &   \\
    N_{n-1} & D    &\cdots&N_{n-2}&         & \Omega  &      &   \\
    \vdots  &\vdots&      &\vdots &         &         &\ddots&   \\
    N_1     & N_2  &\cdots& D     &         &         &      & \Omega
    \end{array} \right]
    \left[ \begin{array}{c}
        {\delta W}_0 \\
        {\delta W}_1 \\
        \vdots       \\
        {\delta W}_{n-1} \\
        \dot{\delta W}_0 \\
        \dot{\delta W}_1 \\
        \vdots           \\
        \dot{\delta W}_{n-1}
    \end{array} \right] ,
\end{equation}
where $D$, $\Omega$, and the $N_k$'s are $2 \times 2$ complex matrices given by
\begin{eqnarray*}
    D &=&
    \frac{3}{2} \omega^2
    \left[ \begin{array}{cc}
        1 & 1 \\ 1 & 1
    \end{array} \right]
    +
    \frac{Gm}{2 r^3}
    \left[ \begin{array}{cc}
        \displaystyle 1 - {I_{n}} + {J_{n}}/2 & \displaystyle 3 - 3{J_{n}}/2 \\
    \displaystyle 3 - 3{J_{n}}/2     & \displaystyle 1 - {I_{n}} + {J_{n}}/2
    \end{array} \right]
    \\[0.2in]
    N_k &=&
    \frac{Gm}{2r^3}
    \left[ \begin{array}{cc}
        \displaystyle e^{i \theta_k} \left( 1 - {J_{k,n}}/2 \right)
    &
        \displaystyle 3 e^{-i \theta_k} + 3{J_{k,n}}/2
    \\
        \displaystyle 3 e^{i \theta_k} + 3{J_{k,n}}/2
    &
        \displaystyle e^{-i \theta_k} \left( 1 - {J_{k,n}}/2 \right)
    \end{array} \right]
    \\[0.2in]
    \Omega &=&
    2 i \omega
    \left[ \begin{array}{cc}
        -1 & 0 \\ 0 & 1
    \end{array} \right]
    ,
\end{eqnarray*}
and where
\begin{eqnarray*}
    {I_{k,n}} &=& \frac{1}{4 \sin\left(\pi |k|/n\right)} \\
    {J_{k,n}} &=& \frac{1}{4 \sin^3\left(\pi |k|/n\right)}
\end{eqnarray*}
and
\begin{eqnarray}
    {I_{n}} &=& {\sum_{k=1}^{n-1}} {I_{k,n}}
            \; \approx \; \frac{1}{2 \pi} \; n \sum_{k=1}^{(n-1)/2} \frac{1}{k}
            \; \approx \; \frac{1}{2 \pi} \; n \log (n/2) \label{310} \\[0.2in]
    {J_{n}} &=& {\sum_{k=1}^{n-1}} {J_{k,n}} \; \approx \; \frac{1}{2 \pi^3} n^3
                                         \sum_{k=1}^{\infty} \frac{1}{k^3}
                     \; =  \frac{n^3}{2 \pi^3} \;  \zeta(3) = 0.01938 \; n^3.
                     \label{311}
\end{eqnarray}
Here, the symbol $\approx$ is used to indicate asymptotic agreement.  That
is, $a_n \approx b_n$ means that $a_n/b_n \rightarrow 1$ as $n \rightarrow
\infty$ and $\zeta(3)$ denotes the value of the Riemann zeta function at $3$.
This constant is known as {\em Ap\'{e}ry's constant}
(see, e.g., \cite{Arf85}).

Finally, note that in deriving \eqref{42} from \eqref{216} we
have made repeated use of the following identity
\[
    \sum_{k=1}^{n-1} \frac{e^{i \theta_k}}{\sin^3 |\theta_k|/2}
    = 4 {J_{n}} - 8 {I_{n}} .
\]

Let $A$ denote the matrix in \eqref{42}.
We need to find the eigenvalues of $A$ and derive necessary and sufficient
conditions under which none of them have a positive real part.
At this point we could resort to numerical computation to bracket a threshold
for stability by doing a binary search to find the largest value of $m/M$ for
which none of the eigenvalues have positive real part.  We did such a search
for some values of $n$.  The results are shown in Table \ref{tab1}.

The eigenvalues are complex numbers for which there are nontrivial solutions
to
\begin{equation} \label{101}
    \left[ \begin{array}{cccc|cccc}
      &   &   &   & I &   &   &   \\
      &   &   &   &   & I &   &   \\
      &   &   &   &   &   & \ddots &   \\
      &   &   &   &   &   &   & I \\
    \hline
    D       & N_1  &\cdots&N_{n-1}& \Omega &         &      &   \\
    N_{n-1} & D    &\cdots&N_{n-2}&        & \Omega  &      &   \\
    \vdots  &\vdots&      &\vdots &        &         &\ddots&   \\
    N_1     & N_2  &\cdots& D     &        &         &      & \Omega
    \end{array} \right]
    \left[ \begin{array}{c}
        {\delta W}_0 \\
        {\delta W}_1 \\
        \vdots       \\
        {\delta W}_{n-1} \\
        \dot{\delta W}_0 \\
        \dot{\delta W}_1 \\
        \vdots           \\
        \dot{\delta W}_{n-1}
    \end{array} \right]
    =
    \lambda
    \left[ \begin{array}{c}
        {\delta W}_0 \\
        {\delta W}_1 \\
        \vdots       \\
        {\delta W}_{n-1} \\
        \dot{\delta W}_0 \\
        \dot{\delta W}_1 \\
        \vdots           \\
        \dot{\delta W}_{n-1}
    \end{array} \right] .
\end{equation}
The first group of equations (above the line) can be used to eliminate the
``derivative'' variables from the second set.  That is,
\[
    \left[ \begin{array}{c}
        \dot{\delta W}_0 \\
        \dot{\delta W}_1 \\
        \vdots           \\
        \dot{\delta W}_{n-1}
    \end{array} \right]
    =
    \lambda
    \left[ \begin{array}{c}
        {\delta W}_0 \\
        {\delta W}_1 \\
        \vdots       \\
        {\delta W}_{n-1} \\
    \end{array} \right]
\]
and therefore
\begin{equation} \label{100}
    \left[ \begin{array}{cccc}
    D       & N_1  &\cdots&N_{n-1} \\
    N_{n-1} & D    &\cdots&N_{n-2} \\
    \vdots  &\vdots&      &\vdots  \\
    N_1     & N_2  &\cdots& D      \\
    \end{array} \right]
    \left[ \begin{array}{c}
        {\delta W}_0 \\
        {\delta W}_1 \\
        \vdots       \\
        {\delta W}_{n-1} \\
    \end{array} \right]
    +
    \lambda
    \left[ \begin{array}{cccc}
    \Omega &         &      &   \\
           & \Omega  &      &   \\
           &         &\ddots&   \\
           &         &      & \Omega
    \end{array} \right]
    \left[ \begin{array}{c}
        {\delta W}_0 \\
        {\delta W}_1 \\
        \vdots       \\
        {\delta W}_{n-1} \\
    \end{array} \right]
    =
    \lambda^2
    \left[ \begin{array}{c}
        {\delta W}_0 \\
        {\delta W}_1 \\
        \vdots       \\
        {\delta W}_{n-1} \\
    \end{array} \right] .
\end{equation}
The matrix on the left-hand side is called a {\em block circulant matrix}.
Much is known about such matrices.  In particular, it is easy to find the
eigenvectors of such matrices.  For general properties of block
circulant matrices, see \cite{Tee05}.

Let $\rho$ denote an $n$-th root
of unity (i.e., $\rho = e^{2 \pi i j/n}$ for some
$j=0,1,\ldots,n-1$) and let $\xi$ be an arbitrary complex
$2$-vector. We look for solutions of the form
\[
    \left[ \begin{array}{c}
        {\delta W}_0 \\
        {\delta W}_1 \\
        \vdots       \\
        {\delta W}_{n-1} \\
    \end{array} \right]
    =
    \left[ \begin{array}{c}
        \xi \\
        \rho \xi \\
        \vdots       \\
        \rho^{n-1} \xi
    \end{array} \right] .
\]
Substituting such a guess into \eqref{100}, we see that each of the $n$ rows
reduce to one and the same thing
\[
    \left( D + \rho N_1 + \dots + \rho^{n-1} N_{n-1} \right) \xi
    + \lambda \Omega \xi = \lambda^2 \xi .
\]
There are nontrivial solutions to this $2 \times 2$ system if and only if
\[
    \det( D + \rho N_1 + \dots + \rho^{n-1} N_{n-1}
         + \lambda \Omega - \lambda^2 I)
     = 0.
\]
For each root of unity, $\rho$, there are four values of $\lambda$ that
solve this equation (counting multiplicites).
That makes a total of $4 n$ eigenvalues and therefore provides all eigenvalues
for the full system \eqref{101}.

\section{Explicit Expression for ${\sum_{k=1}^{n-1}} \rho^k N_k$}

In order to compute the eigenvalues, it is essential that we compute ${\sum_{k=1}^{n-1}}
\rho^k N_k$ as explicitly as possible.  To this end, we note the following
reduction and new definition:
\begin{eqnarray}
    {\sum_{k=1}^{n-1}} \rho^k {J_{k,n}}
    & = & \frac{1}{4} {\sum_{k=1}^{n-1}} \frac{e^{2\pi ijk/n}}{\sin^3 ({\theta_{k}}/2)}
    \nonumber \\
    & = & \frac{1}{4} {\sum_{k=1}^{n-1}} \frac{\cos(j{\theta_{k}})}{\sin^3 ({\theta_{k}}/2)} \nonumber \\
    & =: & {\tilde{J}_{j,n}} . \label{300}
\end{eqnarray}
Similarly,
\begin{equation}
    {\sum_{k=1}^{n-1}} \rho^k e^{i {\theta_{k}}} {J_{k,n}} = {\tilde{J}_{j+1,n}} \label{301}
\end{equation}
and
\begin{equation}
    {\sum_{k=1}^{n-1}} \rho^k e^{-i {\theta_{k}}} {J_{k,n}} = {\tilde{J}_{j-1,n}} . \label{302}
\end{equation}
Also we compute
\begin{equation}
    {\sum_{k=1}^{n-1}} \rho^k e^{i {\theta_{k}}}
    = {\sum_{k=1}^{n-1}} e^{ij{\theta_{k}}} {e^{i{\theta_{k}}}}
    = {\sum_{k=1}^{n-1}} {e^{i(j+1){\theta_{k}}}}
    = \cases{
            n-1 & for $j = n-1$ \cr
             -1 & otherwise  \cr
      } \label{303}
\end{equation}
and
\begin{equation}
    {\sum_{k=1}^{n-1}} \rho^k e^{-i {\theta_{k}}}
        = \cases{
            n-1 & for $ j = 1$ \cr
             -1 & otherwise . \cr
          } \label{304}
\end{equation}
Substituting the definition of $N_k$ into
${\sum_{k=1}^{n-1}} \rho^k N_k$ and making use of \eqref{300}-\eqref{304}, we get
\begin{equation}
    {\sum_{k=1}^{n-1}} \rho^k N_k
    =
    \frac{Gm}{2r^3}
    \left[\begin{array}{cc}
        -1 + n\delta_{j=n-1} - \frac{1}{2} {\tilde{J}_{j+1,n}} &
    -3 + 3n\delta_{j=1} + \frac{3}{2} {\tilde{J}_{j,n}} \\
    -3 + 3n\delta_{j=n-1} + \frac{3}{2} {\tilde{J}_{j,n}} &
        -1 + n\delta_{j=1} - \frac{1}{2} {\tilde{J}_{j-1,n}}
    \end{array}\right],
    \label{305}
\end{equation}
where $\delta_{j=k}$ denotes the Kronecker delta (i.e., one when $j=k$
and zero otherwise).

\section{Solving
$\det\left( D+{\sum_{k=1}^{n-1}} \rho^k N_k + \lambda \Omega - \lambda^2 I \right) = 0.$}

Assembling the results from the previous sections, we see that
\begin{eqnarray}
    &&
    D + \sum_{k=1}^{n-1} \rho^k N_k
              + \lambda \Omega - \lambda^2 I
    \nonumber \\[0.2in]
    && \qquad
    =
    \left[\begin{array}{cc}
        \frac{3}{2}\omega^2 + \frac{1}{2}\alpha_{j+1}^2 - \beta^2 -
        2i\omega\lambda -\lambda^2
    &
        \frac{3}{2}\omega^2 - \frac{3}{2}\alpha_j^2
    \\
        \frac{3}{2}\omega^2 - \frac{3}{2}\alpha_j^2
    &
        \frac{3}{2}\omega^2 + \frac{1}{2}\alpha_{j-1}^2 - \beta^2 +
        2i\omega\lambda -\lambda^2
    \end{array}\right]
    \nonumber \\[0.2in]
    && \qquad \qquad \qquad \qquad
    +\frac{Gm}{2r^3}
    \left[\begin{array}{cc}
        n\delta_{j=n-1} & 3n\delta_{j=1} \\
    3n\delta_{j=n-1} & n\delta_{j=1}
    \end{array}\right],
    \label{306}
\end{eqnarray}
where $\alpha_j^2$ and $\beta^2$ are shorthands for the expressions
\[
    \alpha_j^2 = \frac{Gm}{2r^3} ({J_{n}} - {\tilde{J}_{j,n}}) \ge 0,
\]
and
\[
    \beta^2 = \frac{Gm}{2r^3} {I_{n}} \ge 0 .
\]
and, as a reminder, ${I_{n}}$ and ${J_{n}}$ are defined by \eqref{310} and \eqref{311},
respectively, whereas ${\tilde{J}_{j,n}}$ is defined by \eqref{300}.

It turns out in our subsequent analysis that the root of unity given by
$j = n/2$ is the most critical one for stability, at least for $n \ge 7$.
For $n=2,\ldots,6$ the instability stems from the eigenvectors associated with
$j=1$ and $j=n-1$.
We will analyze the key cases.
But first, we note that the critical $j=n/2$ case corresponds to perturbations
in which every other body is perturbed in the opposite direction.  And, more
importantly, it doesn't matter what the direction of the perturbation is.
That is, if body $0$ is advanced azimuthally, then all of the even-numbered
bodies are advanced azimuthally and all
of the odd-numbered bodies are retarded by the same
amount.  Similarly, if body $0$ is pushed outward radially, then all of the
even-numbered bodies are also pushed outward whereas the odd-numbered bodies
are pull inward.  Azimuthal and radial perturbations contribute equally to
instability.

\subsection{The Case Where $n$ Is Arbitrary And $j$ Is Neither $1$ Nor $n-1$.}

Assuming that $j$ is neither $1$ nor $n-1$, we see that
\begin{eqnarray}
    \det\left( D+{\sum_{k=1}^{n-1}} \rho^k N_k + \lambda \Omega - \lambda^2 I \right)
    & = &
    \left( \frac{3}{2} \omega^2 + \frac{1}{2}\alpha_{j+1}^2 - \beta^2
        - 2i\omega\lambda - \lambda^2 \right) \nonumber \\
    && \qquad \times
    \left( \frac{3}{2} \omega^2 + \frac{1}{2}\alpha_{j-1}^2 - \beta^2
        + 2i\omega\lambda - \lambda^2 \right) \nonumber \\
    && -
    \left( \frac{3}{2} \omega^2 - \frac{3}{2} \alpha_j^2 \right)^2 .
    \label{400}
\end{eqnarray}
Expanding out the products on the right-hand side in \eqref{400},
we get that
\begin{equation}
    \det\left( D+{\sum_{k=1}^{n-1}} \rho^k N_k + \lambda \Omega - \lambda^2 I \right)
    =
    \lambda^4 + A_j \lambda^2 + iB_j \lambda + C_j = 0,
    \label{410}
\end{equation}
where
\begin{eqnarray}
    A_j & = & \omega^2
             - \frac{1}{2} \left( \alpha_{j-1}^2 + \alpha_{j+1}^2 \right)
         + 2 \beta^2 \label{411} \\
    B_j & = & - \omega \left( \alpha_{j-1}^2 - \alpha_{j+1}^2 \right)
            \label{412} \\
    C_j & = & 3 \omega^2 \left( \frac{1}{4} (\alpha_{j-1}^2+\alpha_{j+1}^2)
                  + \frac{3}{2} \alpha_j^2 - \beta^2
                         \right)
           + \left( \frac{1}{4} (\alpha_{j-1}^2 + \alpha_{j+1}^2)
                - \beta^2 \right)^2
    \nonumber \\ &   & \quad
            - \frac{1}{16} (\alpha_{j-1}^2-\alpha_{j+1}^2)^2
                    - \frac{9}{4} \alpha_j^4 . \label{413}
\end{eqnarray}

\subsubsection{The Subcase Where $n$ Is Even And $j = n/2$.}

In the subcase where $n$ is even and $j=n/2$, it is easy to see by symmetry that
$\alpha_{n/2+1} = \alpha_{n/2-1}$.  To emphasize the equality, we will denote
this common value by $\alpha_{n/2 \pm 1}$.  Equations \eqref{411} to \eqref{413}
simplify significantly.  The result is
\begin{eqnarray}
    \det\left( D+{\sum_{k=1}^{n-1}} \rho^k N_k + \lambda \Omega - \lambda^2 I \right)
    & = &
    \lambda^4 + (\omega^2 - \alpha_{n/2 \pm 1}^2 + 2 \beta^2) \lambda^2
    \nonumber \\
    && \quad + 3 \omega^2 \left( \frac{1}{2} \alpha_{n/2 \pm 1} + \frac{3}{2}
                \alpha_{n/2}^2 - \beta^2 \right)
    \nonumber \\
    && \quad
             + \left( \frac{1}{2} \alpha_{n/2 \pm 1}^2 - \beta^2 \right)^2
         - \frac{9}{4} \alpha_{n/2}^4 .
    \label{401}
\end{eqnarray}
For a moment, let us write this biquadratic polynomial (in $\lambda$)
in a simple generic form and equate it to zero
\[
    \lambda^4 + A \lambda^2 + C = 0.
\]
The quadratic formula then tells us that
\[
    \lambda^2 = \frac{-A \pm \sqrt{A^2 - 4C}}{2} .
\]
To get the eigenvalues, we need to take square roots one more time.  The only
way for the resulting eigenvalues not to have
positive real part is for $\lambda^2$ to
be real and nonpositive.  Necessary and sufficient conditions for this are
that
\begin{eqnarray}
    A & \ge & 0 \label{1111} \\
    C & \ge & 0 \label{1112} \\
    A^2 - 4C & \ge & 0. \label{1113}
\end{eqnarray}
It turns out that the third condition implies the first two
(we leave verification of this fact to the reader).
In terms
of computable quantities, this third condition can be written,
after simplification, as
\[
    \omega^4
    + (-8 \alpha_{n/2 \pm 1}^2 - 18 \alpha_{n/2}^2 + 16 \beta^2) \omega^2
    + 9 \alpha_{n/2}^4 \ge 0 .
\]
Again we use the quadratic formula to find that
\[
    \omega^2 \ge
    4 \alpha_{n/2 \pm 1}^2 + 9 \alpha_{n/2}^2 - 8 \beta^2
    + \sqrt{
        (4 \alpha_{n/2 \pm 1}^2 + 9 \alpha_{n/2}^2 - 8 \beta^2)^2 - 9 \alpha_{n/2}^4
    }.
\]
or
\[
    \omega^2 \le
    4 \alpha_{n/2 \pm 1}^2 + 9 \alpha_{n/2}^2 - 8 \beta^2
    - \sqrt{
        (4 \alpha_{n/2 \pm 1}^2 + 9 \alpha_{n/2}^2 - 8 \beta^2)^2 - 9 \alpha_{n/2}^4
    }.
\]
It is the greater-than constraint that is relevant and so we take
the positive root. Finally, we recall that
\begin{eqnarray*}
    \omega^2 &=& \frac{GM}{r^3} + \frac{Gm}{r^3} {I_{n}} \\
    \alpha_{n/2}^2 &=& \frac{Gm}{2r^3}({J_{n}} - {\tilde{J}_{n/2,n}}) \\
    \beta^2 &=& \frac{Gm}{2r^3} {I_{n}}
\end{eqnarray*}
and so the inequality on $\omega^2$ reduces to
\begin{eqnarray}
    \frac{M}{m}
    &\ge&
    2({J_{n}}-{\tilde{J}_{n/2 \pm 1,n}}) + \frac{9}{2}({J_{n}} - {\tilde{J}_{n/2,n}}) - 5 {I_{n}}
    \nonumber \\
    && \quad + \sqrt{
        \left(2({J_{n}}-{\tilde{J}_{n/2 \pm 1,n}}) + \frac{9}{2}({J_{n}} - {\tilde{J}_{n/2,n}}) - 4 {I_{n}}\right)^2
    - \frac{9}{4} \left( {J_{n}} - {\tilde{J}_{n/2,n}} \right)^2
    } .
    \label{402}
\end{eqnarray}

The second column in Table \ref{tab1} shows thresholds computed
using this inequality.  It is clear that for even values of $n$ greater than
$7$, this threshold matches the numerically derived threshold shown in the
first column in the table. This suggests that inequalities
analogous to \eqref{402} derived for $j \ne n/2$ are less
restrictive than \eqref{402}.
The proof of this statement is obviously more complicated than the $j = n/2$
case because the general case includes a linear term
($B_j \ne 0$) which vanishes in the $j = n/2$ case.  The linear
term makes it impossible simply to use the quadratic formula and
therefore any analysis involves a more general analysis of a
quartic equation.
\citet{1991CeMDA..51...83S} analyzed the general case.
Although their notations are different, the fundamental
quantities are the same and so their analysis is valid here as well.
Rather than repeating their complete analysis, we simply outline the basic
steps in the next subsection.

\subsubsection{The Subcase Where $j \ne n/2$.}

Let $\alpha_{j \pm 1}$ denote the average of $\alpha_{j+1}$ and
$\alpha_{j-1}$:
\[
    \alpha_{j \pm 1} = (\alpha_{j+1} + \alpha_{j-1})/2 .
\]
If we were to assume, incorrectly, for the moment that terms involving the
difference $\alpha_{j+1} - \alpha_{j-1}$ were not present in
\eqref{411}--\eqref{413}, then an analysis analogous to that given in the
previous subsection would give us the following inequality:
\[
    \omega^2 \ge
    4 \alpha_{j \pm 1}^2 + 9 \alpha_{j}^2 - 8 \beta^2
    + \sqrt{
        (4 \alpha_{j \pm 1}^2 + 9 \alpha_{j}^2 - 8 \beta^2)^2 - 9 \alpha_{j}^4
    }.
\]
Next, one uses the fact that $\alpha_{j \pm 1}^2$ is unimodal as a function of
$j$ taking its maximum value at $j=n/2$.  Hence, the inequality associated
with $j = n/2$ is the strictest of these inequalities.
Finally, the difference terms are treated as small perturbations to this
simple case and a homotopy analysis shows that the $j=n/2$ case remains the
strictest case even as the difference terms are fed in.

\subsubsection{Large $n$}

When $n$ is large, ${\tilde{J}_{n/2 \pm 1,n}} \approx {\tilde{J}_{n/2,n}}$ and ${J_{n}} \gg {I_{n}}$.
Furthermore,
\begin{eqnarray*}
    {\tilde{J}_{n/2,n}}
    \approx
    \frac{1}{2} \sum_{k=1}^{n/2} \frac{(-1)^k}{\sin^3(k\pi/n)}
    & \approx &
    \frac{n^3}{2\pi^3} \sum_{k=1}^{\infty} \frac{(-1)^k}{k^3} \\
    & = &
    \frac{3}{4} \frac{n^3}{2\pi^3} \sum_{k=1}^{\infty} \frac{1}{k^3}
    \approx
    \frac{3}{4} \; \frac{1}{2} \sum_{k=1}^{n/2} \frac{1}{\sin^3(k\pi/n)}
    \approx
    \frac{3}{4} {J_{n}} .
\end{eqnarray*}
Hence, \eqref{402} reduces to
\[
    \frac{M}{m} \ge \frac{7}{8} (13+2\sqrt{10}) {J_{n}},
\]
or, equivalently,
\begin{equation} \label{500}
    m \le \frac{M}{ \frac{7}{8} (13+2\sqrt{10}) J_n} \approx 2.299 M/n^3 ,
\end{equation}
which is precisely the answer Maxwell obtained 150
years ago. Of course, we have assumed here that $n$ is even.
For the odd case, as
$n\rightarrow \infty$, $|\alpha_{j-1}-\alpha_{j+1}|\rightarrow 0$
so that the odd quartic equation for $j=(n-1)/2$  reduces to the
the even equation for $j=n/2$ giving the same stability criteria
as the even particle case. This can be seen in our simultions as
well. The case $n=100$ and $n=101$ give the same threshold to
several significant figures.

\subsection{The Case Where $j = 1$ Or $j = n-1$.} \label{subsec1}

By symmetry, these two cases are the same.  Hence, we consider only $j=1$.
Again after some manipulation in which we exploit the fact that
$\alpha_0^2 = 0$, we arrive at
\begin{equation}
    \det\left( D+{\sum_{k=1}^{n-1}} \rho^k N_k + \lambda \Omega - \lambda^2 I \right)
    =
    \lambda^4 + A_j \lambda^2 + iB_j \lambda + C_j = 0,
    \label{414}
\end{equation}
where
\begin{eqnarray}
    A_1 & = & \omega^2
             - \frac{1}{2} \left( n\gamma + \alpha_{2}^2 \right)
         + 2 \beta^2 \label{415} \\
    B_1 & = & - \omega \left( n\gamma - \alpha_{2}^2 \right)
            \label{416} \\
    C_1 & = & 3 \omega^2 \left( \frac{1}{4} \alpha_2^2
                  + \frac{3}{2} \alpha_1^2 - \beta^2
                  - \frac{1}{2} n\gamma
                         \right)
           + \left( \frac{1}{4} ( n\gamma + \alpha_{2}^2 )
                - \beta^2 \right)^2
    \nonumber \\ &   & \quad
            - \frac{1}{16} (n\gamma-\alpha_{2}^2)^2
                    - \frac{9}{4} \alpha_1^2 (\alpha_1^2-n\gamma)
           , \label{417}
\end{eqnarray}
and
\begin{equation} \label{418}
    \gamma = \frac{Gm}{r^3} .
\end{equation}

Note that the coefficient $B_1$ is imaginary whereas the other three
coefficients are real.  This suggests making the substitution $\mu = i
\lambda$.  In terms of $\mu$, \eqref{414} becomes a quartic equation with all
real coefficients:
\begin{equation} \label{602}
    \mu^4 - A_1 \mu^2 + B_1 \mu + C_1 = 0.
\end{equation}
This equation either has four real roots or not.  If it does, then the
corresponding values for $\lambda$ are purely imaginary and the system could
be stable.  If, on the other hand, there are two or fewer real roots,
then at least one pair of roots to \eqref{602}
form a conjugate pair and therefore
the corresponding pair of values for $\lambda$ will
be such that one has positive real part and the other negative real part.
Hence, in that case, the system is demonstrably unstable.
Simple numerical investigation reveals that this is precisely what happens
when $2 \le n \le 6$ regardless of the mass ratio $M/m$.
\\%
To see why, let us consider just the case when $M/m$ is very large and hence
the ratio
\[
    r = m/M
\]
is very close to zero.  In this asymptotic regime,
\begin{eqnarray*}
    A_1 & = & a M \\
    B_1 & = & b \sqrt{M} m \\
    C_1 & = & c M m ,
\end{eqnarray*}
where $a > 0$ and the sign of $c$ is the same as the sign of
$ \frac{1}{4} \alpha_2^2 + \frac{3}{2} \alpha_1^2 - \beta^2 - \frac{1}{2} n\gamma $.
Substituting $rM$ for $m$ and making the change of variables defined by
$\nu = \mu/\sqrt{M}$, we get
\[
    \nu^4 - a\nu^2 + br \nu + cr = 0 .
\]
For $r=0$, this equation reduces to $\nu^4 - a \nu^2 = 0$ which has three real
roots, a positive one, a negative one, and a root of multiplicity two at
$\nu = 0$.  By continuity, for $r$ small but nonzero, the quartic still has
a positive root and a negative root but the double root at $\nu = 0$ can
either disappear or split into a pair of real roots.  Since this bifurcation
takes place in a neighborhood of the origin, the quartic term can be ignored
and the equation in a tiny neighborhood of zero reduces to a quadratic
equation:
\[
    - a\nu^2 + br \nu + cr = 0 .
\]
This equation has two real roots if and only if its discriminant is
nonnegative:
\[
    r (r b^2 + 4  a c) \ge 0 .
\]
Hence, if $c$ is negative there will not be a full set of real roots for $r$
very small and hence the ring system will be unstable in that case.  In other
words, the system will be unstable if
\[
    \frac{1}{4} \alpha_2^2 + \frac{3}{2} \alpha_1^2 - \beta^2 - \frac{1}{2} n\gamma < 0.
\]
This equation reduces to
\begin{equation} \label{1504}
     \sum_{k=1}^{n-1}\frac{1}{\sin\left(\frac{\pi k}{n}\right)}
	    -n-\frac{1}{2}\cot\left(\frac{\pi}{2 n}\right)
                         < 0 .
\end{equation}
It is easy to check that the expression is negative for $n=2,\ldots,6$ and
positive for $n \ge 7$.  Therefore, we have proved that ring systems are
unstable for $n=2,\ldots,6$ at least when $m$ is very small relative to $M$.
We have not proved the result for larger values of $m$ but it seems that such
a case should be even more unstable, which is certainly verified by our
simulator.

\section{Ring Density}
Suppose that the linear density of the boulders is $\lambda$.  That is,
$\lambda$ is the ratio of the diameter of one boulder to the separation
between the centers of two adjacent boulders.  Then the diameter of a single
boulder is $\lambda (2 \pi r/n)$.  Hence, the volume of a single boulder is
$(4 \pi/3)(\lambda \pi r / n)^3$.  Let $\delta$ denote the density of a
boulder.  Then the mass of a single boulder is
$(4 \pi/3)(\lambda \pi r / n)^3 \delta$.
If we assume that the density of Earth is about $8$
times that of a boulder (Earth's density is $5.5$ and Saturn's
moons have a density of about $0.7$ being composed of porous
water-ice), then we have
\[
    \delta = \frac{1}{8} \frac{m_E}{(4 \pi/3) r_E^3} ,
\]
where $m_E$ denotes the mass of Earth and $r_E$ denotes its radius.
Combining all of these factors and assuming the central mass is equal to
Saturn's mass and the ring's radius is about the radius of the Cassini
division ($120,000$km), we see that the upper bound on the linear
density of boulders is
\[
    \lambda \le \left( 8 \frac{M/m_E}{(25.65)(0.01938)} \right)^{1/3}
            \frac{r_E}{r} = 0.219.
\]
In other words, the linear density cannot exceed $22\%$ otherwise the ring
will be unstable.  Of course, this is for a one dimensional circular ring of
ice boulders.
Analysis of a two dimensional annulus or the full three dimensional
case is naturally more complicated.  Nonetheless the $22\%$ linear density
figure matches surprisingly well with the measured optical density which
hovers around $0.05$ to $2.5$.

\section{Numerical Results}

We have computed stability thresholds three different ways for various
finite $n$.

First, we numerically solved for all eigenvalues of the $4x \times 4n$ matrix
in \eqref{101} and did a binary search to locate the smallest mass ratio $M/m$
for which no eigenvalue has positive real part.  We then tranlated this
threshold into a value of $\gamma$ for the threshold expressed as
\[
    m \le \gamma M/n^3
\]
and tabulated those results in the column labeled {\em Numerical} in Table
\ref{tab1}.

Secondly, for even values of $n$ we used equation \eqref{402} to
derive $\gamma$ threshold values.  These values are reported in the second
column of thresholds in Table \ref{tab1}.  Note that for even values of $n$
larger than $7$, these
results agree with those obtained numerically.

Lastly, and perhaps most interestingly, the third column of results in
the table are stability thresholds that were estimated using a
simulator (\cite{VanRingsApplet})
based on a leap-frog integrator (\cite{ST94,HMM94}).
In this column, two values are given.
For the larger value instability has been decisively observed.
However, verifying stability is more challenging since one should in principle
run the simulator forever.  Rather than waiting that long, we use the rule of
thumb that if the system appears intact for a period of time ten times greater
than the time it took to demonstrate instability, then we deem the system
stable at that mass.  This is how the lower bounds in the table were obtained.
It is our belief that a good (simplectic) simulator provides the most
convincing method to discriminate between stable and unstable orbits at least
when the number of bodies remains relatively small, say up to a few hundred.
Unstable orbits reveal themselves quickly as the initial inaccuracy of double
precision arithmetic quickly cascades into something dramatic if the system is
unstable.  If, on the other hand, the system is stable then the initial
imprecisions simply result in an orbit that it close to but not identical to
the intended orbit.  The situation does not decay.  Any reader who has never
experimented with a good simplectic integrator is strongly encouraged to
experiment with the Java applet posted at
\begin{quote}
\url{http://www.princeton.edu/~rvdb/JAVA/astro/galaxy/StableRings.html}
\end{quote}
as hands on experience can be very convincing.

Of course, the amazing thing about the simulator results is that they match
the numerical results in the first column.  The thresholds determined by
linear stability analysis only tell us definitively that for $m$ larger than
the threshold, the system is necessarily unstable.  But, for $m$ smaller than
the threshold, the mathematical/numerical analysis says nothing since in
those cases, the eigenvalues are all purely imaginary.  Yet, simulation
confirms that the thresholds we have derived are truely necessary and
sufficient conditions for stability.

As shown in Section \ref{subsec1} for $2 \le n \le 6$, the system is unstable.
The simulator verifies this.
In these cases, there is lots of room to roam before one body
catches up to another.  Even the tiniest masses are unstable.
The case $n=2$ is especially interesting.  For this
case, the two small bodies are at opposite sides of a common orbit.
Essentially they are in L3 position with respect to each other.  For the
restricted 3-body problem (where one body has mass zero) it is well-known that
L3 is unstable no matter what the mass ratio.  Our results bear
this out.

\begin{table}
\begin{center}
\begin{tabular}{r|lll}
      & \multicolumn{3}{|c}{Threshold Value for $\gamma$} \\[0.1in]
  $n$ & Numerical & Eq. \eqref{402} & Simulator \\
      &           & (even $n$ only)      &           \\\hline
   2 & 0.000 & 4     & [0.0, 0.007] \\
   6 & 0.000 & 2.487 & [0.0, 0.025] \\
   7 & 2.452 & -     & [2.45, 2.46] \\
   8 & 2.412 & 2.4121 & [2.41, 2.42] \\
  10 & 2.375 & 2.3753 & [2.37, 2.38] \\
  36 & 2.306 & 2.3066 & [2.30, 2.35] \\
 100 & 2.300 & 2.2999 & [2.30, 2.31] \\
 101 & 2.300 & -      & [2.30, 2.31]
\end{tabular}
\caption{Estimates of the stability threshold (i.e., $\gamma$ in an inequality
of the type $m \le \gamma M/n^3$).  The first column contains numerically
derived obtained by a brute-force
computation of the eigenvalues together with a
simple binary search to find the first point is at which an
eigenvalue takes on a positive real part.
The second column gives thresholds computed using \eqref{402}.
The column of {\em simulator}
values corresponds to results from running a leap-frog integrator and noting
the smallest value of $\gamma$ for which instability is clearly demonstrated.
This is the larger of the pair of values shown.  The smaller value is a nearby
value for which the simulator was run ten times longer with no overt
indication of instability.}
\label{tab1}
\end{center}
\end{table}

Linear Stability of Ring Systems