When is the opposite of the category of algebras of a Lawvere theory extensive? When is the opposite of the category of algebras of a Lawvere theory an extensive category?   Any necessary or sufficient conditions on the Lawvere theory will be interesting to me.
Here's why I'm interested.  An extensive category acts to some extent like a category of "spaces" (e.g. topological spaces, schemes, sets, etc.).  We can see this in various ways.  First, in any extensive category, an object over $X + Y$ is the same as an object over $X$ together with an object over $Y$.   Second, if such a category has binary products, they distribute over binary coproducts:
$$  X \times (Y + Z) \cong X \times Y + X \times Z.$$
Third, in any extensive category, any object with a morphism to the initial object $0$ must be initial itself.   All these are basic things we expect of a category of "spaces".
Furthermore, algebras of a Lawvere theory are a pretty good formalization of the general idea of "algebraic gadgets" (e.g. monoids, rings, $R$-algebras, etc.).
So, my question is an attempt at getting at the vaguer question "when does the opposite of a category of algebraic gadgets act like a category of spaces?"
One classic example is the Lawvere theory of commutative rings.  Its category of algebras is CommRing, and the opposite of that is the category of affine schemes, which is extensive.
Another classic example is the Lawvere theory of commutative $R$-algebras for some commutative ring $R$.   The opposite of its category of algebras is the category of affine schemes over $R$, which is again extensive.
But there are also more exotic examples, some of which show up e.g. in Durov's approach to algebraic geometry.  For example the Lawvere theories for commutative rigs, distributive lattices or $C^\infty$-rings also have categories of algebras with extensive opposites.
So, it would be nice to get a clearer sense of the full range of Lawvere theories whose category of algebras have extensive opposites.  Are there any that do not involve a commutative rig structure?
 A: Carboni, Pedicchio, and Rosicky, in Syntactic characterizations of various classes of locally presentable categories characterize those finite limit theories $T$ such that $T-Alg$ is coextensive as the "pro-lextensive" finite limit theories (see Thm 8 of loc. cit.).
They also characterize those Lawvere theories $T$ such that $T-Alg$ is coextensive in Corollary 10 of loc cit..
These characterizations are not fully syntactic -- I think there should be more that one can say.
A: Probably not a full answer, but that could be starting point : at least it reduces the problem to a purely syntactical question... but I would assume that this syntactical question might have a nicer description...
Given a morphisms of Lawvere theory $S \to T$, I'll say it is co-étale (not sure this is a good terminology) if up to equivalence of the categories of models $T$ can be obtained from $S$ by only adding constant symbols and equation between constants.
In terms of models this implies that the forgetful functor $T$-Mod  $\to$ $S$-Mod identifies $T$-mod with a coslice of $S$-Mod. Obviously when this is the case the coslicing object is the initial model of $T$ seen as a model of $S$ by the forgetful functor.
I claim that $T$ is co-extensive if and only if the two maps $\Delta: T \to T \times T$ and $T \to 1$ are co-étale,
where $T \times T$ denotes the Lawvere theory which at the level of underlying category is the products of $T$ with itself (and the set of sort is the product of the set of sort with itself) and whose models are pairs of models of $T$; and $1$ denotes the terminal (one sorted) Lawvere theory, which has only one model.
This follows from the fact that a category with coproduct and finite limits is extensive if and only if $C \times C \to C$ sending $(X,Y) \to X \coprod Y$ induces an equivalence $C \times C \simeq C /(1 \coprod 1)$ and if $C/0$ identifies with the terminal category.
Indeed, these conditions on $T$ would imply that the product functor $T$-Mod $\times$ $T$-Mod $\to T$-Mod identifies $T$-Mod $\times$ $T$-Mod with the coslice of $T$-Mod by the model $F_0 \times F_0$ (where $F_0$ is the initial model) which gives co-extensionality for binary product, and that the coslice of $T$-Mod by its terminal model is equivalent to the terminal category, which gives the extensionality condition of the terminal objects.
Note that the condition on $T \to T \times T$ is always a bit tricky as these obviously don't have have the same set of sorts,  so that's never going to be the case that $T \times T$ can be obtained from $T$ by only adding constant and equation between constant. A big part of the story happen in the "up to equivalence of categories of models". Basically, you are going to enrich the theory of rings with two constant P_1 and P_2 that are orthogonal projections and you send one to zero and the other to $1$ in each component of the product. This does not make the underlying category of Ring$[P_1,P_2]$ equivalent to Ring $\times$ Ring, but they have the same Cauchy completion.
A: I offer the following summary/interpretation of Broodryk's results.
In short, a category of algebras is coextensive if and only if there is a well behaved interpolation operation in the algebraic theory.
By "interpolation operation" what I mean is an operation $t$ of arity $2 + \kappa$, together with two $\kappa$-tuples of constants, $\vec{e}$ and $\vec{e}{}'$, satisfying the following equations:
$$\begin{aligned}
t (x, x', \vec{e}) & = x \\
t (x, x', \vec{e}{}') & = x' 
\end{aligned}$$
The meaning of "well behaved" is more complicated.
Let $A$ be an algebra, let $F (0)$ be the initial algebra (= free algebra with empty generating set), and let $\iota_1 : A + F (0) \times F (0)$ and $\iota_2 : F (0) \times F (0) \to A + F (0) \times F (0)$ be the coproduct insertions.
We define a map $\delta_A : A \times A \to A + F (0) \times F (0)$ as follows:
$$\delta_A (x, x') = t (\iota_1 (x), \iota_1 (x'), \iota_2 (\vec{e}, \vec{e}{}'))$$
(Here I am abusing notation.
What I mean by $\iota_2 (\vec{e}, \vec{e}{}')$ is the image of the pair $(\vec{e}, \vec{e}{}')$ under the obvious composite $F (0)^\kappa \times F (0)^\kappa \to (F (0) \times F (0))^\kappa \to (A + F (0) \times F (0))^\kappa$.)
This is not, prima facie, a homomorphism of algebras.
We can think of it as an external pairing operation on $A$.
(This will be made precise later.)
However, if the category of algebras is coextensive, it is possible to choose $t, \vec{e}, \vec{e}{}'$ so that $\delta_A$ is an homomorphism and furthermore satisfies the following equation:
$$\delta_A (x, x) = \iota_1 (x)$$
Conversely, the existence of such $t, \vec{e}, \vec{e}{}'$ guarantees that the category of algebras is coextensive.
Example.
For the theory of commutative rigs, we can take $\kappa = 2$, $t (x, x', y, y') = x y + x' y'$, $\vec{e} = (1, 0)$, and $\vec{e}{}' = (0, 1)$.
The point is that, in $A$,
$$\begin{aligned}
t (x, x', 1, 0) & = x \\
t (x, x', 0, 1) & = x'
\end{aligned}$$
and, in $A \otimes_\mathbb{N} (\mathbb{N} \times \mathbb{N})$ (the change in operator precedence by switching from $+$ to $\otimes$ here is confusing, but I digress),
$$\delta_A (x, x') = t (x \otimes 1, x' \otimes 1, 1 \otimes (1, 0), 1 \otimes (0, 1)) = x \otimes (1, 0) + x' \otimes (0, 1)$$
i.e. $\delta_A : A \times A \to A \otimes_\mathbb{N} (\mathbb{N} \times \mathbb{N})$ is the obvious natural isomorphism.
Example.
For the theory of commutative rings we can have $\kappa = 1$.
Indeed, we can take $t (x, x', y) = x y + x' (1 - y)$, $\vec{e} = 1$, $\vec{e}{}' = 0$.
Note that $t$ is literally linear interpolation!

In more detail now:
Let $\mathcal{A}$ be a category of algebras, by which I mean a category equipped with a (strictly) monadic functor $U : \mathcal{A} \to \textbf{Set}$.
Let $F : \textbf{Set} \to \mathcal{A}$ be left adjoint to $U$ and let $T = U F$.
Broodryk implicitly only considers finitary algebraic theories (i.e. $\mathcal{A}$ is locally finitely presentable and $U : \mathcal{A} \to \textbf{Set}$ preserves filtered colimits) but I think his main results also apply to infinitary algebraic theories.
First, as a warm up:
Lemma.
If a category has an initial object that is also a strict terminal object (i.e. every morphism with domain a terminal object is an isomorphism), then every object in that category is initial/terminal/zero. ◼
A trivial observation, to be sure, but turning it around tells us something about the set $T (0)$ of constants in the algebraic theory:
Proposition.
If $\mathcal{A}$ has a strict terminal object, then either:

*

*$T (0)$ is empty, or

*$T (0)$ has at least two elements, or

*$\mathcal{A}$ is trivial.

Proof.
$T (0)$ is the underlying set of the initial object $F (0)$ in $\mathcal{A}$.
If $T (0)$ has exactly one element, then $F (0)$ is both an initial object and a strict terminal object in $\mathcal{A}$, in which case $\mathcal{A}$ is trivial. ◼
Next:
Proposition. If $\mathcal{A}$ has codisjoint binary products then $T (0)$ is not empty.
Proof.
Let $A$ and $B$ be objects in $\mathcal{A}$.
The product $A \times B$ is codisjoint if the following is a pushout square in $\mathcal{A}$:
$$\require{AMScd}
\begin{CD}
A \times B @>{\pi_2}>> B \\
@V{\pi_1}VV @VVV \\
A @>>> 1
\end{CD}$$
Consider the case $A = B = F (0)$.
Assume $T (0)$ is empty.
Then $U (F (0) \times F (0)) \cong T (0) \times T (0)$ is also empty, hence both projections $F (0) \times F (0) \to F (0)$ are isomorphisms.
But the pushout of an isomorphism is an isomorphism, so that implies $F (0) \to 1$ is an isomorphism, which is a contradiction.
So $T (0)$ is not empty. ◼
Corollary.
If $\mathcal{A}$ is coextensive, then either:

*

*$T (0)$ has at least two elements, or

*$\mathcal{A}$ is trivial.

Proof.
A coextensive category has both a strict terminal object and codisjoint binary products. ◼
So far so good – after all, a rig has two distinguished elements.
But it is not obvious how to extract binary operations from the hypothesis that $\mathcal{A}$ is coextensive.
It seems the best we can do is to get a well behaved interpolation operation.
Theorem.
$\mathcal{A}$ is coextensive if and only if the following conditions hold:

*

*There exist a regular cardinal $\kappa$ ($\le \lambda$ if $F (0) \times F (0)$ admits a generating set of $\le \lambda$ elements), an element $t \in T (2 + \kappa)$, and $\vec{e} \in T (0)^\kappa$ and $\vec{e}{}' \in T (0)^\kappa$, such that the following equations hold in every $A$ in $\mathcal{A}$,
$$\begin{aligned}
t (x, x', \vec{e}) & = x \\
t (x, x', \vec{e}{}') & = x'
\end{aligned}$$
where $x$ and $x'$ are arbitrary elements of $A$ and (by abuse of notation) we have identified $t$ with the operation $U (A)^{2 + \kappa} \to U (A)$ it corresponds to, and $\vec{e}$ and $\vec{e}{}'$ with their images in $U (A)^\kappa$ under the unique morphism ${!} : F (0) \to A$.


*For every $A$ in $\mathcal{A}$, there is a morphism $\delta_A : A \times A \to A + F (0) \times F (0)$ in $\mathcal{A}$ (whose underlying map $U (\delta_A)$ is) given by
$$\delta_A (x, x') = t (\iota_1 (x), \iota_1 (x'), \iota_2 (\vec{e}, \vec{e}{}'))$$
where $t, \vec{e}, \vec{e}{}'$ are as above and I have abused notation as in the introduction.


*Moreover, $\delta_A (x, x) = \iota_1 (x)$.　◻
I will sketch just the construction of $t$.
Consider the following diagram in $\mathcal{A}$:
$$\begin{CD}
F (0) @<{\pi_1}<< F (0) \times F (0) @>{\pi_2}>> F(0) \\
@V{!_A}VV @V{\iota_2}VV @VV{!_A}V \\
A @<<{[\textrm{id}_A, \pi_1]}< A + F (0) \times F (0) @>>{[\textrm{id}_A, \pi_2]}> A \\
@| @V{\eta_A}VV @| \\
A @<<{\pi_1}< A \times A @>>{\pi_2}> A 
\end{CD}$$
The two squares in the top half are pushout squares (always).
The morphism $\eta_A : A + F (0) \times F (0) \to A \times A$ is defined by the universal property of $A \times A$, and it is an isomorphism if $\mathcal{A}$ is coextensive.
Consider the case where $A = F (2)$.
Let $x$ and $x'$ be the two distinguished generators of $F (2)$.
Then $(x, x')$ is an element of $U (F (2) \times F (2))$, and $U (\eta_X) : U (F (2) + F (0) \times F (0)) \to U (F (2) \times F (2))$ is a bijection, so it has a preimage $\bar{t}$.
The hypothesis on $\kappa$ ensures there is an effective epimorphism $F (2 + \kappa) \to F (2) + F (0) \times F (0)$ and we can arrange for the first two distinguished generators of $F (2 + \kappa)$ to be mapped to the image under $\iota_1 : F (2) \to F (2) + F (0) \times F (0)$ of the two distinguished generators of $F (2)$ and the remaining $\kappa$ generators to be mapped into the image of $\iota_2 : F (0) \times F (0) \to F (2) + F (0) \times F (0)$.
Let $(\vec{e}, \vec{e}{}')$ be a preimage in $T (0)^\kappa \times T (0)^\kappa$ of the images of the $\kappa$ generators, considered as an element of $U (F (2) + F (0) \times F (0))^\kappa$.
Then, $[\textrm{id}_A, \pi_1] (\bar{t}) = t (x, x', \vec{e})$ by homomorphicity, and $[\textrm{id}_A, \pi_1] (\bar{t}) = \pi_1 (\eta_X (\bar{t})) = x$ because the bottom left square commutes, so $t (x, x', \vec{e}) = x$ as required.
Similarly, $t (x, x', \vec{e}{}') = x'$.
Since we have proved the claim for the two distinguished generators of $F (2)$, the claim follows for all pairs of elements in all algebras.
The morphism $\delta_A : A \times A \to A + F (0) \times F (0)$ is simply the inverse of $\eta_A : A + F (0) \times F (0) \to A \times A$.
This is the sense in which $\delta_A : A \times A \to A + F (0) \times F (0)$ is a pairing operation.
Remark.
We have $\vec{e} = \vec{e}{}'$ if and only if $\mathcal{A}$ is trivial.
So this is another way of seeing that $T (0)$ has at least two elements if $\mathcal{A}$ is coextensive and not trivial.
It seems difficult to come up with a novel example of an algebraic theory satisfying all three of the conditions in the theorem.
The first condition – the existence of an interpolation operation – is easy enough to arrange.
(We can just freely add such $t, \vec{e}, \vec{e}{}'$ to any existing algebraic theory and get a new one!)
The hard part seems to be in the second and third conditions.
Broodryk remarks that the first condition alone is enough to guarantee many of the properties of coextensivity.
A: Graham Manuell has pointed out that my question is answered here:

*

*David Neal Broodryk, Characterization of coextensive varieties of universal algebras, August 8, 2020.


*David Neal Broodryk, Characterization of coextensive varieties of universal algebras II, April 25, 2021.
Broodryk gives necessary and sufficient conditions on a Lawvere theory for its category of algebras to be coextensive - that is, for the opposite of that category to be extensive.   He works in the traditional language of universal algebra, calling the category of algebras of a Lawvere theory a variety.
It will, alas, take me a while to understand his results.  If anyone wants to help, that would be great.
