\section{Introduction}

This paper is motivated by modern algebraic geometry -- more concretely, by its basic objects of study: schemes. To define them, one must first define a functor \( \operatorname{Spec}\colon \operatorname{\mathsf{CRing}}^\mathrm{op} \to \operatorname{\mathsf{LRSp}}\), the codomain being the category of \textit{locally ringed spaces}. This is quite a non-trivial and non-obvious construction: for a commutative ring \(R\), the topological space of \(\operatorname{Spec} R\) is usually not even Hausdorff and its points are given by prime ideals of \(R\); moreover, forming the structure sheaf is quite a painful procedure. But it pays off, since powerful methods of scheme-based algebraic geometry have proved useful in many parts of mathematics, e.g.\ number theory. To some extent, we can thus say that in order to apply these methods in new contexts, we first need to construct some analogue of the functor $\operatorname{Spec}$, landing in some analogue of the category $\operatorname{\mathsf{LRSp}}$. Many of these $\operatorname{Spec}$-like functors have been already used (see Section 5).

But how to come up with such a weird construction? Here, category theory gives a hint: we can characterize the functor $\operatorname{Spec}$ formally as the right adjoint to a functor \(\Gamma\colon \operatorname{\mathsf{LRSp}}\to\operatorname{\mathsf{CRing}}^\mathrm{op}\) sending a locally ringed space \((X,\mathcal F)\) to a ring of global sections \(\mathcal F(X)\). This is useful for if we try to construct some analogue of $\operatorname{Spec}$, we can make sure that our construction makes sense by verifying the appropriate analogue of this adjunction. 

This observation is useful in proving that some construction is $\operatorname{Spec}$-like, but not quite helpful in finding the construction: in literature, one first constructs Spec (or its analogue) and then proves that it is the right adjoint to \(\Gamma\). However, in this paper, we are going to reverse the process: first we prove formally that the right adjoint to $\Gamma$ exists and use that to deduce the particular construction. Since we are doing this in great generality, this might be quite helpful for constructing new $\operatorname{Spec}$-like functors.

The strategy of the proof is as follows: we can factor the functor $\Gamma$ by first embedding locally ringed spaces to the category $\operatorname{\mathsf{RSp}}$ of ringed spaces and then take global sections. We can denote the latter functor as $\Gamma'\colon \operatorname{\mathsf{RSp}}\to \operatorname{\mathsf{CRing}}^{op}$. The point of doing that is that this functor $\Gamma'$ is easily seen to have the right adjoint sending a ring $R$ to a ringed space $R^* = (X,\mathcal F)$ such that $X=*$ is just a point and $\mathcal F(X)=R$. Hence the non-trivial task is actually to find a right adjoint for the embedding $\operatorname{\mathsf{LRSp}}\to \operatorname{\mathsf{RSp}}$. We will do this in a general framework where we replace $\operatorname{\mathsf{CRing}}$ with some locally finitely presentable category $\operatorname{\mathcal{A}}$ and instead of using local rings in defining $\operatorname{\mathsf{LRSp}}$, we will use some \textit{cone injectivity} class of objects of $\operatorname{\mathcal{A}}$.

\section{Main theorem}

Let $\mathcal A$ be a complete and cocomplete category such that:
\begin{itemize}
\item
	For any topological space $X$, the inclusion $\operatorname{Sh}_X \to \operatorname{PrSh}_X$ of $\mathcal A$-valued sheaves into $\mathcal A$-valued presheaves admits a left adjoint -- the sheafication $\operatorname{sh}$. We will use the easily verified fact that the sheafification functor $\operatorname{sh}$ then automatically preserves stalks.
\item
	The isomorphisms of sheaves are reflected by the (total) stalk functor: $F \to G$ is an isomorphism if and only if the induced map $F_p \to G_p$ is an isomorphism, for each point $p \in X$.
\end{itemize}
Both these properties hold if $\mathcal A$ is locally finitely presentable.

Let $a_{ij} \colon A_i \to B_{ij}$ be a collection of maps in $\mathcal A$ with finitely presentable domains and codomains (the index $i$ ranges over a set $I$, while, for a fixed $i \in I$, the indices $j$ range over a set $J_i$). We say that an object $R \in \mathcal A$ is \emph{cone injective} w.r.t.\ this collection if, for each $i$, and for each map $A_i \to R$, there exists $j$ and an extension
\[\xymatrix{
A_i \ar[r] \ar[d]_-{a_{ij}} & R \\
B_{ij} \ar@{-->}[ru]
}\]
We will always assume that $A_i \to B_{ij}$ are epimorphisms so that the extension is unique (the index $j$ need not be). A map $f \colon R \to S$ is \emph{cone injective} if it has the right lifting property w.r.t.\ this collection, i.e.
\[\xymatrix{
A_i \ar[r] \ar[d]_-{a_{ij}} & R \ar[d]^-f \\
B_{ij} \ar@{-->}[ru] \ar[r] & S
}\]
We note that in this case, we do not make use of the common domain $A_i$ for the maps $a_{ij}$, with varying $j$.

Finally, if $R \to S$ is obtained as a transfinite composition of pushouts of coproducts of the $a_{ij}$'s, we say that it is a \emph{localization}. Further, we say that it is a \emph{finite localization} if the number of the $a_{ij}$'s used is finite.

Localizations have the left lifting property w.r.t.\ cone injective maps, implying in particular that a map that is both a localization and cone injective must be an isomorphism.

\begin{example}
Our main illustrating example is in the category of commutative rings. Here, there is a single index $i$ with two corresponding indices $j$: the first map is
\[\mathbb Z[x,y]/\{x+y=1\} \to \mathbb Z[x,y,x^{-1}]/\{x+y=1\}\]
and the second is the symmetric version of the first
\[\mathbb Z[x,y]/\{x+y=1\} \to \mathbb Z[x,y,y^{-1}]/\{x+y=1\}\]
(that can be seen also as $\mathbb Z[x] \to \mathbb Z[x,x^{-1}]$ and $\mathbb Z[x] \to \mathbb Z[x, (1-x)^{-1}]$). Here cone injectivity of a commutative ring $R$ means that it is a local ring or the trivial ring. In order to get rid of the trivial ring we add another index $i$ with no corresponding index $j$ (giving thus an empty cone) and with $A_i = \mathbb Z/\{1 = 0\}$, the trivial ring. Cone injectivity of a ring homomorphism $f$ means simply that it reflects invertibility: $f(r)$ invertible $\Rightarrow$ $r$ invertible. (Finite) localizations are obtained by adding inverses to (a finite number of) elements.

There are two modifications whose spectra have the same underlying set as the spectrum resulting from the above example. The first modification consists of 
\[\mathbb Z[x] \to \mathbb Z[x,x^{-1}], \qquad \mathbb Z[x] \to \mathbb Z[x]/\{x=0\}\]
for which the cone injective objects are exactly the fields, and which are obtained as localizations as fraction fields of the quotients by various prime ideals. The second modification consists of
\[\mathbb Z[x, y]/\{x y = 0\} \to \mathbb Z[x, y]/\{x = 0\}, \qquad \mathbb Z[x, y]/\{x y = 0\} \to \mathbb Z[x, y]/\{y = 0\}\]
for which the cone injective objects are exactly the domains, and which are obtained as quotients by various prime ideals.
\end{example}

We define $\mathcal B \subseteq \mathcal A$ to be the non-full subcategory of cone injective objects and morphisms. Next we define $\mcA{-}\Top$, the category of $\mathcal A$-spaces, to be the category of topological spaces $X$ equipped with an $\mathcal A$-valued sheaf $\mathcal O_X \colon \operatorname{Op}(X)^\mathrm{op} \to \mathcal A$. Maps are continuous maps $f \colon X \to Y$ together with $\varphi \colon \mathcal O_Y \to f_*\mathcal O_X$ or equivalently $f^* \mathcal O_Y \to \mathcal O_X$. We note that $\mcA{-}\Top$ is the Grothendieck construction of the functor $\operatorname{Sh}^\mathrm{op} \colon \operatorname{\mathsf{Top}} \to \operatorname{Cat}$, $X \mapsto (\operatorname{Sh}_X)^\mathrm{op}$, using $f_*$, or $\operatorname{\mathsf{Top}}^\mathrm{op} \to \operatorname{Cat}$, using $f^*$. The non-full subcategory $\AB{-}\Top \subseteq \mcA{-}\Top$, consisting of $(\mcA, \mcB)$-spaces, is the category consisting of the $\mathcal A$-spaces whose stalks $\mathcal O_{X,x}$, for all $x \in X$, lie in $\mathcal B$ and maps for which the induced maps on stalks $\varphi_x \colon \mathcal O_{Y,f(x)} \to \mathcal O_{X,x}$ also lie in $\mathcal B$.

In our main example, $\mcA{-}\Top$ are the ringed spaces and $\AB{-}\Top$ are the locally ringed spaces.

We have the following categories, functors and adjunctions:
\[\xymatrix{
\AB{-}\Top \ar@<1ex>[r]^-{\operatorname{in}} & \mcA{-}\Top \ar@<1ex>@{-->}[l]^-{\operatorname{spec}} \ar@<1ex>[r]^-{\Gamma} & \mathcal A^\mathrm{op} \ar@<1ex>[l]^-{(-)^*}
}\]
where, $\operatorname{in}$ denotes the inclusion, $\Gamma$ is the functor of global sections $\Gamma(X,\operatorname{\mathcal{O}}_X) = \mathcal O_X(X)$, the right adjoint of which is $R \mapsto R^*$, the one-point space with global sections $R$. The other, dashed, right adjoint is the content of our main theorem.

\begin{theorem}
The inclusion $\operatorname{in} \colon \AB{-}\Top \subseteq \mcA{-}\Top$ admits a right adjoint $\operatorname{spec}$. Its image $\operatorname{Spec} R = \operatorname{spec} R^*$ on the one-point space $R^*$ is the $(\mcA, \mcB)$-space with: \begin{itemize}
    \item underlying set consisting of all localizations $R \to L$ with a cone injective codomain $L$ (up to isomorphism),
    \item open sets the collections of all finite localizations,
    \item the structure sheaf obtained as the sheafification of the right Kan extension of the canonical presheaf sending a finite localization $R \to K$ to $K$.
\end{itemize}   
\end{theorem}

\section{Proof of the existence part}


First we prove a useful characterization of $(\mcA, \mcB)$-spaces among $\mathcal A$-spaces. Let $X \in \mcA{-}\Top$ and $f \colon A_i \to \mathcal O_X(U)$ be a map. We define a subset $U_j \subseteq U$ to consist of the points $p \in U$ for which an extension
\[\xymatrix{
A_i \ar[r]^-f \ar[d] & \mathcal O_X(U) \ar[r] & \mathcal O_{X,p} \\
B_{ij} \ar@{-->}[rru]
}\]
exists. By the finite presentability of $A_i$ and $B_{ij}$, one may then replace the stalk $\mathcal O_{X,p}$ by $\mathcal O_X(V)$ for some $V \ni p$ and, by the uniqueness of the extensions, these are compatible and thus provide an extension
\[\xymatrix{
A_i \ar[r]^-f \ar[d] & \mathcal O_X(U) \ar[r] & \mathcal O_X(U_j) \\
B_{ij} \ar@{-->}[rru]_-{g_j}
}\]
When $X \in \AB{-}\Top$ the open sets $U_j$ give a particular open cover of $U$ that we refer to as the \emph{distinguished} open cover. This proves the necessity part of the following criterion in which any open cover suffices.

\begin{lemma} \label{lemma:local_criterion}
An $\mathcal A$-space $X$ is an $(\mcA, \mcB)$-space if and only if for each map $f \colon A_i \to \mathcal O_X(U)$ there exists an open cover $U = \bigcup U_j$ together with ``partial'' extensions $g_j \colon B_{ij} \to \mathcal O_X(U_j)$ as above.
\end{lemma}

\begin{proof}
It remains to proof sufficiency. For any extension problem
\[\xymatrix{
A_i \ar[r] \ar[d] & \mathcal O_{X,p} \\
B_{ij} \ar@{-->}[ru]
}\]
we may first replace the stalk by $\mathcal O_X(U)$, then use the property from the statement to get an open cover $U = \bigcup U_j$, choose $j$ so that $p \in U_j$ and then get an extension
\[\xymatrix{
A_i \ar[r] \ar[d] & \mathcal O_X(U_j) \ar[r] & \mathcal O_{X,p} \\
B_{ij} \ar@{-->}[ru]
}\]
to $\mathcal O_X(U_j)$ and thus also to $\mathcal O_{X,p}$, as required.
\end{proof}


We proceed with the proof of the main theorem. First of all, $\mcA{-}\Top$ is cocomplete (similarly also complete): since $\operatorname{\mathsf{Top}}$ is cocomplete and, easily, the opposite categories of sheaves $(\operatorname{Sh}_X)^\mathrm{op}$ possess colimits and the direct image functors preserve them, the Grothendieck construction $\mcA{-}\Top$ is also cocomplete.
More concretely, the colimit of a diagram $F\colon \mathcal{D}\to \mcA{-}\Top$ with $Fk=(X_k,\operatorname{\mathcal{O}}_{X_k})$ is given by the topological space $X=\operatorname{colim} X_k$ with the universal cone $\lambda_k$, and the sheaf is given by the limit $\operatorname{\mathcal{O}}_X=\lim \lambda_{k*}\operatorname{\mathcal{O}}_{X_k}$.


 
 

 

Secondly, we show that $\AB{-}\Top$ is closed under these colimits, i.e.\ when all the stalks in the diagram and maps between them are cone injective, the same is true for the colimit. By Lemma~\ref{lemma:local_criterion}, consider $A_i \to \mathcal O_X (U)$ and, for each $k$, the respective distinguished open covers $(\lambda_k)^{-1}(U) = \bigcup U_{kj}$. The $U_{kj}$ are compatible under taking inverse images in the diagram in the sense that, for every $\alpha \colon k \to l$, we have $(\alpha_*)^{-1} (U_{lj}) = U_{kj}$, for in the diagram
\[\xymatrix{
A_i \ar[r] \ar[d]_-{a_{ij}} & \mathcal O_{X_l, \alpha_*(p)} \ar[r] & \mathcal O_{X_k, p}\\
B_{ij} \ar@{-->}[ru] \ar@{-->}[rru]
}\]
one extension exists if and only if the other exists, by the virtue of cone injectivity of the map between stalks; this means precisely that $\alpha_*(p) \in U_{lj}$ if and only if $p \in U_{kj}$. Therefore, the collection of open sets $U_{kj}$ describes an open set $U_j \subseteq X$.\footnote{The open subsets $U_{kj} \subseteq X_k$ are classified by maps $X_k \to 2$ to the famous 2-point space and the compatibility means that they form a cocone, thus yielding a map from the colimit, i.e.\ an open subset thereof.} Since also $\mathcal O_X(U_j) = \lim \mathcal O_{X_k}(U_{kj})$ by the above explicit description of colimits in $\mcA{-}\Top$, the (unique) partial extensions $B_{ij} \to \mathcal O_{X_k}(U_{kj})$ yield a partial extension $B_{ij} \to \mathcal O_X(U_j)$ and Lemma~\ref{lemma:local_criterion} proves $X \in \AB{-}\Top$. The cone injectivity of the cocone injections $\lambda_k$ is similar.

To finish the proof of the existence of the right adjoint $\operatorname{spec}$, we need to verify the solution set condition. Given $Y \in \mcA{-}\Top$ we need to find a weakly terminal subset of $\AB{-}\Top/Y$. Thus, let $(f, \varphi) \colon (X, \mathcal O_X) \to (Y, \mathcal O_Y)$ be a map with $X \in \AB{-}\Top$. First, we factor $\varphi \colon f^*\mathcal O_Y \to \mathcal O_X$ through a cone injective in the following way: For each open $U \subseteq X$, apply the usual small object argument to $f^* \mathcal O_Y(U) \to \mathcal O_X(U)$, thus producing by functoriality a factorization
\[f^* \mathcal O_Y \to \mathcal F \to \mathcal O_X\]
in $\operatorname{PrSh}_X$ and upon replacing $\mathcal F$ by its sheafification also in $\operatorname{Sh}_X$. We will now show that $\mathcal F$ has stalks in $\mathcal B$ (for which we may ignore the sheafification). Thus let $A_i \to \mathcal F_p$ be arbitrary. Then by cone injectivity of $\mathcal O_{X,p}$ the outer square exists in
\[\xymatrix{
A_i \ar[d]_-{a_{ij}} \ar@/^3ex/[rr] \ar@{-->}[r] \ar[d] & \mathcal F(U) \ar[r] \ar[d] & \mathcal F_p \ar[d] \\
B_{ij} \ar@/_3ex/[rr] \ar@{-->}[r] \ar@{..>}[ru] & \mathcal O_X(U) \ar[r] & \mathcal O_{X,p}
}\]
By finite presentability, we get the left hand side dashed square and the dotted diagonal exists by cone injectivity of $\mathcal F(U) \to \mathcal O_X(U)$ guaranteed by the small object argument. The composition of the diagonal with the canonical map to $\mathcal F_p$ then provides the required extension.

This means that $f$ factors through the local space $(X, \mathcal F)$,
\[f \colon (X, \mathcal O_X) \xlra{1} (X, \mathcal F) \xlra{f} (Y, \mathcal O_Y)\]
and in effect we reduced all the possible $\mathcal O_X$ to those obtained from $f^*\mathcal O_Y$ by localization followed by sheafification; for a fixed $f \colon X \to Y$ there is a set of such. However, the underlying spaces $X$ and maps $f$ still form a proper class. Thus, form an equivalence relation on $X$: $p \sim p'$ if their images in $Y$ agree, i.e.\ $f(p) = q = f(p')$ and if the two induced maps
\[\xymatrix{
\mathcal F_p \ar@{-->}[dd]_-\cong \\
& \mathcal O_{Y,q} \ar[lu] \ar[ld] \\
\mathcal F_{p'}
}\]
are isomorphic -- note that, as localizations, they are epimorphisms so the isomorphism will be unique. Now we need to show that $X/{\sim}$ inherits a structure sheaf from $X$ with cone injective stalks and that $f$ factors through it:
\[f \colon (X, \mathcal O_X) \xlra{1} (X, \mathcal F) \xlra{\operatorname{pr}} (X/{\sim}, \mathcal F/{\sim}) \xlra{\overline f} (Y, \mathcal O_Y)\]
this will finish the proof since the $(\mcA, \mcB)$-spaces of the form $(X/{\sim}, \mathcal F/{\sim})$ form, up to isomorphism, a set: localizations of each $\mathcal O_{Y,q}$ form a set, thus we get a set of all possible underlying sets $X/{\sim}$, thus a set of possible topologies and, finally, a set of possible structure sheaves as above.

To finish the proof, we remark that $X/{\sim}$ is a colimit; namely, it is a coequalizer
\[\xymatrix{
\sim \ar@/^1ex/[r]^-{\operatorname{pr}_l} \ar@/_1ex/[r]_-{\operatorname{pr}_r} & X
}\]
with the equivalence relation ${\sim} \subseteq X \times X$ topologized discretely and given the structure sheaf with stalks at $(p, p')$ the cone injective $\mathcal F_p \cong \mathcal F_{p'}$. Since this diagram lies in $\AB{-}\Top$, so does its colimit.

\section{Proof of the concrete description}

\begin{lemma}
Each component of the comma category $R/\mathcal B$ contains an initial object.
\end{lemma}

\begin{proof}
This follows from the fact that any cone injective object under $R$ factors through a localization of $R$ with a cone injective codomain (by the usual small object argument) and any two such are isomorphic: given two such factorizations, $R \to L_k \to B$, form the pushout as in
\[\xymatrix{
R \ar[r] \ar[d] & L_1 \ar[d] \ar[rdd] \\
L_2 \ar[r] \ar[rrd] & L \po \ar[rd] \\
& & B
}\]
Since each $L_k \to B$ is cone injective, the same is true of the $L_k \to L$. As the latter are at the same time localizations, they must be isomorphisms.
\end{proof}

Now consider $\mathcal B^* / X$ for any $X \in \AB{-}\Top$. Clearly, an object of this comma category is given equivalently by a point $p \in X$ and an object of $\mathcal O_{X,p} / \mathcal B$, i.e.
\[\mathcal B^* / X \cong \coprod_{p \in X} (\mathcal O_{X,p} / \mathcal B)^\mathrm{op}\]
In particular, each component of this category contains a terminal object given by the respective identity.

Restricting to $X = \operatorname{Spec} R$, we get from the adjunction $\mathcal B^*/\operatorname{Spec} R \cong (R/\mathcal B)^\mathrm{op}$. By the previous lemma, each component has a terminal object $L^* \to \operatorname{Spec} R$, coming from some localization $R \to L$ with a cone injective codomain $L$.
\[\coprod_{p \in \operatorname{Spec} R} (\mathcal O_{\operatorname{Spec} R,p} / \mathcal B)^\mathrm{op} \cong \mathcal B^* / \operatorname{Spec} R \cong (R / \mathcal B)^\mathrm{op} \cong \coprod_{R \to L} (L / \mathcal B)^\mathrm{op}\]
This concludes the identification of the underlying set of $\operatorname{Spec} R$.

We will now exhibit certain open subsets of $\operatorname{Spec} R$. It will be convenient to denote the structure sheaf of $\operatorname{Spec} R$ simply as $\mathcal R := \mathcal O_{\operatorname{Spec} R}$. The counit of the adjunction gives a canonical map $\operatorname{Spec} R \to R^*$ that on the level of structure sheaves is equivalently a map $R \to \mathcal R(\operatorname{Spec} R)$. In our main example of commutative rings, this happens to be an isomorphism, but we think that, generally, it may not be the case.

Let $K$ be a finite localization of $R$, i.e.\ $R \to K$ is obtained by a finite number of coproducts and pushouts in the construction from the small object argument. Clearly, $\operatorname{Spec} K \to \operatorname{Spec} R$ is an inclusion on the level of the underlying sets (since the localization $R \to K$ is an epimorphism), and we will now show that its image is an open subset. We recall that a point $p \in \operatorname{Spec} R$ is given by a localization $p \colon R \to L$ with a cone injective codomain $L$. If this point lies in the image of $\operatorname{Spec} K \to \operatorname{Spec} R$, it factors through $K$ and then it factors through $\mathcal R(U)$, for some $U \ni p$:
\[\xymatrix{
R \ar[r] \ar[rrd] & K \ar[r] \ar@{-->}[rd] & \leftbox{L}{{} = \operatorname{colim}_{U \ni p} \mathcal R(U)} \\
& & \mathcal R(U) \ar[u] \ar[r] & L'
}\]
(by finiteness of $K$ and by finite presentability of the $B_{ij}$). Consequently, for any $p' \in U$, the corresponding localization $R \to L'$ factors through $K$ as well.

We will now show that, in fact, $\operatorname{Spec} K \to \operatorname{Spec} R$ is an inclusion of an open sub-$(\mcA, \mcB)$-space. Since its image is open, we may consider the restriction of $\operatorname{Spec} R$ to this image, which we denote simply by $\operatorname{Spec} K$: we show that a factorisation
\[\xymatrix{
& \operatorname{Spec} K \ar[d] \\
\operatorname{Spec} R|_{\operatorname{Spec} K} \ar@{c->}[r] \ar@{-->}[ru] & \operatorname{Spec} R
}\]
exists by translating it to an equivalent extension problem (where the bottom left corner denotes the global sections of $\operatorname{Spec} R|_{\operatorname{Spec} K}$):
\[\xymatrix{
& K \ar@{-->}[ld] \\
\mathcal R(\operatorname{Spec} K) & R \ar[u] \ar[l]
}\]
By the above, such an extension exists locally, i.e.\ with $\mathcal R(\operatorname{Spec} K)$ replaced by $\mathcal R(U)$ for some neighbourhood $U \ni p$ of any given $p \in \operatorname{Spec} K$. Since these local extensions are unique and $\mathcal R$ is a sheaf, they glue to give an extension to $\mathcal R(\operatorname{Spec} K)$ as required. From the interpretation in $\AB{-}\Top$, it follows that $\operatorname{Spec} K \to \operatorname{Spec} R$ is an open embedding and since it is also a stalkwise iso, we may identify $\operatorname{Spec} K$ with the restriction $\operatorname{Spec} R|_{\operatorname{Spec} K}$.

Finally, we will show that the opens $\operatorname{Spec} K$ form a basis of the topology of $\operatorname{Spec} R$ and give a somewhat abstract description of the structure sheaf $\mathcal R$. To this end, let $\operatorname{Spec}' R$ be $\operatorname{Spec} R$ equipped with a topology given by the basis formed by the $\operatorname{Spec} K$, for all finite localizations $R \to K$. These are clearly closed under finite intersections (these correspond to pushouts of localizations). We equip $\operatorname{Spec}' R$ with the structure sheaf obtained in the following steps: start with the partial presheaf $\operatorname{Spec} K \mapsto K$, right Kan extend it to a full presheaf (since the opens form a poset, this will be an honest extension) and finally sheafify it to obtain a sheaf $\mathcal R'$. Both constructions preserve stalks (the first does since a basis was included, the second by the general property of the sheafification) and, thus, the stalks are
\[\mathcal R'_p = \operatorname{colim}_{p \colon R \to K \to L} K \cong L\]
where the isomorphism comes from the general procedure of rewriting a (relative) cell complex as a directed colimit of finite cell complexes, see \cite{fsoa}. For this reason, the space $\operatorname{Spec}' R$ equipped with the structure sheaf $\mathcal R'$ belongs to $\AB{-}\Top$ and so does the canonical map $\operatorname{Spec} R \to \operatorname{Spec}' R$ (the identity on the underlying sets) which, by the above, is a stalkwise isomorphism. Since it admits a canonical map into $R^*$, we get from the universal property of $\operatorname{Spec} R$ the following filler:
\[\xymatrix{
\operatorname{Spec} R \ar[d] \ar[rd] \\
\operatorname{Spec}' R \ar[r] \ar@{-->}[d] & R^* \\
\operatorname{Spec} R \ar[ru]
}\]
This shows that the two topologies coincide and, thus, $\mathcal R' \to \mathcal R$ is an isomorphism (as it is one on stalks).

\section{Concrete examples of spectra}

Before starting to give examples, let us outline how the category $\AB{-}\Top$ is usually used in geometry. The point is that spectrum functor enables us to consider objects locally looking like $\operatorname{Spec} R$ for some $R$:

\begin{definition}
We say that a map $(X,\mathcal O_X)\to(Y,\mathcal O_Y)$ of $\mathcal A$-spaces is an \emph{open immersion} if the following holds: \begin{itemize}
    \item the map $X\to Y$ is a homeomorphism onto an open subset,
    \item the map $f^*\mathcal O_Y\to \mathcal O_X$ is an isomorphism.
\end{itemize}    
We say that an $(\mathcal A,\mathcal B)$-space $(X,\mathcal O_X)$ is a \emph{scheme} if there exists a family of open immersions $h_k\colon \operatorname{Spec} A_k\to (X,\mathcal O_X)$ such that $X=\bigcup h_k(\operatorname{Spec} A_k)$.
\end{definition}

We are now going to identify spectra and schemes for some particular choices of $\mathcal A$ and $\mathcal B$.

\subsection{Ordinary (relative) schemes}

If we start with $\mathcal A$ the category of commutative $R$-algebras for any commutative ring $R$ and $\mathcal B$ the subcategory of local $R$-algebras (i.e. the underlying ring is local) and local homomorphisms, we can easily recognize $\operatorname{\mathcal{B}}$ as a subcategory of cone injective objects with respect to morphisms $R[x,y]/\{x+y=1\}\to R[x,x^{-1},y]/\{x+y=1\},R[x,y]/\{x+y=1\}\to R[x,y,y^{-1}]/\{x+y=1\}$. $\operatorname{\mathcal{A}}$ and $\operatorname{\mathcal{B}}$ satisfy conditions of the main theorem, hence we can construct the spectrum functor, which is just the relative $\operatorname{Spec}$ used in algebraic geometry. Schemes in this context are thus just $R$-schemes in the usual sense. For an $R$-algebra $A$, points of $\operatorname{Spec} A$ correspond to prime $R$-ideals of $A$.

\subsection{Deitmar’s $\mathbb{F}_1$-schemes}

Here, $\operatorname{\mathcal{A}}=\mathsf{CMon}$ is the category of commutative monoids and we consider the cone injectivity with respect to identity $\operatorname{\mathbb{N}}\to \operatorname{\mathbb{N}}$ and the inclusion $\operatorname{\mathbb{N}}\to \operatorname{\mathbb{Z}}$. We thus obtain that the category $\operatorname{\mathcal{B}}$ has all monoids as objects and homomorphisms reflecting invertible elements as morphisms. The schemes with respect to $\operatorname{\mathcal{A}}, \operatorname{\mathcal{B}}$ are $\mathbb{F}_1$-schemes in sense of Deitmar \cite{Deitmar}. For a commutative monoid $M$, points of $\operatorname{Spec} M$ correspond to prime ideals of $M$.

\subsection{$C^{\infty}$-schemes}

In this context, $\operatorname{\mathcal{A}}=C^{\infty}\operatorname{\mathsf{Ring}}$ is the category of smooth rings, i.e. the category of product preserving functors $\operatorname{\mathsf{Euc}}\to \operatorname{\mathsf{Set}}$ where $\operatorname{\mathsf{Euc}}$ is the category with $\operatorname{\mathbb{R}}^n$ as objects (for $n\ge0$) and smooth functions $\operatorname{\mathbb{R}}^m\to \operatorname{\mathbb{R}}^n$ as morphisms. In other words, $\operatorname{\mathcal{A}}$ is a category of $\operatorname{\mathsf{Set}}$-valued models for the Lawvere theory $\operatorname{\mathsf{Euc}}$ and as such it satisfies the conditions of the main theorem. $\operatorname{\mathcal{B}}$ is now the subcategory of those smooth rings (and morphisms) such that the underlying $\operatorname{\mathbb{R}}$-algebra (or $\operatorname{\mathbb{R}}$-algebra homomorphism) is local. 

For a smooth ring $\mathfrak C$, denote the underlying $\operatorname{\mathbb{R}}$-algebra by $C$. Since $C^{\infty}\operatorname{\mathsf{Ring}}$ is a category of models for a Lawvere theory, we can build a free smooth ring $C^{\infty}\{a,b\}$ on two generators $a,b$ as well as a localization $\mathfrak C\{a^{-1}\}$ inverting an element $a\in\mathfrak C$. It's well-known that we can also form a quotient $\mathfrak{C}/I$ for any ideal $I$ of underlying algebra $C$. Hence we are able to recognize $\operatorname{\mathcal{B}}$ as a cone injectivity class with respect to morphisms  $C^{\infty}\{a,b\}/\{a+b=1\}\to C^{\infty}\{a,a^{-1},b\}/\{a+b=1\}, C^{\infty}\{a,b\}/\{a+b=1\}\to C^{\infty}\{a,b,b^{-1}\}/\{a+b=1\}$. The corresponding spectrum functor was used by Moerdijk, Reyes and van Quê in \cite{MoerdijkReyes}; points of $\operatorname{Spec} \mathfrak{C}$ are so-called $C^{\infty}$-radical prime ideals of $\mathfrak{C}.$

\section{Cone small object argument}




This is a variation of the usual small object argument, but producing a localization with a cone injective codomain or, more precisely, all such localizations. The main difference lies in choosing, at each point, which of the maps $a_{ij}$ is used for the pushout, thus producing multiple objects at each stage.\par 
Let us formulate and prove this variation in a general categorical context. In order to substantially simplify the notation in the argument it is useful to consider the free product completion, see the following well-known definition.
\begin{definition}
Let $\mathcal{K}$ be a category. Then the {\it free product completion} $\mathrm{Prod}(\mathcal{K})$ of $\mathcal{K}$ is defined as follows: It has as objects pairs $(X,A)$, where $X$ is a set and $A \colon X \to \mathcal{K}$ is a functor whose domain is viewed as a discrete category. A morphism is a pair $(p,f) \colon (X,A) \to (Y,B)$, where $p \colon Y \to X$ is a function and $f \colon A \cdot p \Rightarrow B$ is a natural transformation, i.e. a collection $(f_i \colon A(pi) \to Bi)_{i \in Y}$.
\end{definition}
\begin{remark}
We will sometimes write $(Ax)_{x \in X}$ instead of $(X,A)$.
\end{remark}
Note that one can use the free product completion to derive the definitions of cone injectivity of an object and of cone injectivity of a morphism.\par
The reason why the free product completion is going to simplify the notation is that at each stage in the cone small object argument we are dealing with possibly a collection of objects rather than with a single object as is the case in the usual small object argument, and the free product completion allows us to consider this collection as a single object instead.\par
When trying to perform the cone small object argument in a category $\mathcal{K}$ one might be tempted to simply pass to $\mathrm{Prod}(\mathcal{K})$ and perform the usual small object argument there. However, this gives a different result than we are looking for: The reason is that an injective object $(Ax)_{x \in X}$ of the free product completion can happen to have a non-injective component. For example, consider the category with only four objects $A, B, C, D$ and only two non-identity morphisms $A \to B$, $A \to C$. If we consider injectivity of objects with respect to $A \to B$, then the object $C$ is not injective because there does not exist an extension of $A \to C$ to $B$, whereas the object $(C,D)$ of the free product completion is injective because there does not exist a morphism $A \to (C,D)$.
\begin{remark}
If a category $\mathcal{K}$ has transfinite composites, then its free product completion also has transfinite composites and they're explicitly given as follows: Suppose that we have a diagram $$(X_0, A_0) \xrightarrow{(p_0,f_0)} (X_1, A_1) \xrightarrow{(p_1,f_1)} (X_2, A_2) \xrightarrow{(p_2,f_2)} \cdots$$ whose objects are indexed by ordinals less than some limit ordinal $\lambda$. Let $(q_\mu \colon X \to X_\mu)_{\mu < \lambda}$ be the limit of the diagram $$\cdots \xrightarrow{p_2} X_2 \xrightarrow{p_1} X_1 \xrightarrow{p_0} X_0$$ in $\mathbf{Set}$. Hence, $X$ consists precisely of the elements $(x_\mu)_{\mu < \lambda} \in \prod_{\mu < \lambda} X_\mu$ such that $p_{\mu, \kappa}(x_\mu) = x_\kappa$ for each $p_{\mu, \kappa} \colon X_\mu \to X_\kappa$ from the diagram. Each element $x = (x_\mu)_{\mu < \lambda} \in X$ induces a diagram $$A_0(x_0) \xrightarrow{f_{0,x_1}} A_1(x_1) \xrightarrow{f_{1,x_2}} A_2(x_2) \xrightarrow{f_{2, x_3}} \cdots.$$ Let $(f_{\mu,x} \colon A_\mu(x_\mu) \to A(x))_{\mu < \lambda}$ be the colimit of that diagram in $\mathcal{K}$. This defines a functor $A \colon X \to \mathbf{Set}$. Finally, it is easy to verify that the cocone ${((q_\mu, f_\mu) \colon (X_\mu, A_\mu) \to (X,A))_{\mu < \lambda}}$ is a colimit in $\mathrm{Prod}(\mathcal{K})$.
\end{remark}
The following theorem is already known (under mildly stronger assumptions than in the theorem statement below), see Theorem 2.53 and Proposition 4.16 in \cite{AdamekRosicky}. However, the proof there uses a different approach than the explicit construction that we give below.
\begin{theorem}
Let $\mathcal{K}$ be a category with pushouts and transfinite composites and let $I$ be a set of cones in $\mathcal{K}$ whose domains are $\lambda$-presentable for some regular cardinal $\lambda$. Then the full subcategory {$I$-Inj} of $\mathcal{K}$ consisting of cone injective objects with respect to $I$ is cone-reflective in $\mathcal{K}$. Explicitly, this means that for each object $A$ in $\mathcal{K}$ there exists a cone $(f_i \colon A \to A_i)_{i \in I'}$ such that each $A_i$ is in {$I$-Inj} and for each morphism $g \colon A \to B$ whose codomain $B$ belongs to {$I$-Inj} there exists $i \in I'$ and a morphism $h \colon A_i \to B$ such that $h \cdot f_i = g$.
\end{theorem}
\begin{proof}
We will transfinitely define pairwise disjoint sets $I_\alpha$, where $\alpha \in \lambda$, and a diagram $D \colon \bigcup_{\alpha \in \lambda} I_\alpha \to \mathcal{K}$ such that on $\bigcup_{\alpha \in \lambda} I_\alpha$ there is the obvious partial order such that for $x \in I_\alpha$, $y \in I_\beta$: $x < y$ iff $\alpha < \beta$, $I_0 = \{0\}$, $D0 = A$, each morphism ${D(x \to y)}$, where $x \in I_\alpha$, $y \in I_{\alpha + 1}$, is a transfinite composition of pushouts of morphisms contained in cones in $I$ for each ordinal $\alpha < \lambda$, and $DI_\alpha$ will be a ``fat colimit'' of all $Dx$, where $x \in I_\beta$, $\beta < \alpha$ for each limit ordinal $\alpha < \lambda$. The precise meaning of this imprecisely stated last fact will be clear from the construction.\par
Let $\mathscr{J}$ be the set of all spans
\begin{center}
\begin{tikzcd}
{(1,E)} \arrow[r, "g"] \arrow[d, "f\in I"'] & {(1,A)} \\
{(Z, C)}                                       &        
\end{tikzcd}
\end{center}
in $\mathrm{Prod}(\mathcal{K})$. When interpreted in $\mathcal{K}$, $g$ is a morphism and $f$ is a cone, and we can reinterpret the set $\mathscr{J}$ as $\{(f_{j,z},g_j) \mid j \in J, z \in Z_j\}$ for some indexing set $J$.
Well-order the set $J$, i.e.\ let $J = \delta$, where $\delta$ is an ordinal. Using transfinite induction we will obtain an object $(X_\beta, A_\beta)$ for each ordinal $\beta \leq \delta$. More precisely, we will define a chain
\begin{center}
\begin{tikzcd}
{(X_0,A_0)} \arrow[r, "{(p_1,\overline{f}_1)}"] & {(X_1,A_1)} \arrow[r, "{(p_2,\overline{f}_2)}"] & {(X_2,A_2)} \arrow[r, "{(p_3,\overline{f}_3)}"] & \cdots \arrow[r] & {(X_{\delta}, A_{\delta})}
\end{tikzcd}
\end{center}
in $\mathrm{Prod}(\mathcal{K})$. Such a chain induces for each pair $\beta \leq \beta' \leq \delta$ of ordinals a map $(p_{\beta', \beta}, \overline{f}_{\beta, \beta'}) \colon (X_\beta, A_\beta) \to (X_{\beta'}, A_{\beta'})$.\newline
Base Case: Define $D0 := A$. This gives us an object $(X_0,A_0)$ of $\mathrm{Prod}(\mathcal{K})$, where $X_0 := 1$ and $A_0(0) := A$.\newline
Successor step: If $\beta < \delta$ is an ordinal such that we've already performed the construction for all the ordinals less or equal to $\beta$, then for each $z \in Z_\beta$ and each $x \in X_\beta$ consider the following pushout
\begin{center}
\begin{tikzcd}
E_\beta(0) \arrow[d, "f_{\beta, z}"'] \arrow[r, "\ell_{\beta, x}\cdot g_\beta"] & A_{\beta}(x) \arrow[d, "\overline{f}_{\beta + 1, z, x}"] \\
C_{\beta}(z) \arrow[r, "h'_{\beta + 1, z, x}"']                                & A_{\beta + 1}(z, x)                     
\end{tikzcd}
\end{center}
where $\ell_{\beta, x}$ is the transfinite composite
$$A_0(p_{\beta,0}(x)) \xrightarrow{\overline{f}_{1,p_{\beta,1}(x)}} A_1(p_{\beta, 1}(x)) \xrightarrow{\overline{f}_{2,p_{\beta,2}(x)}} A_2(p_{\beta,2}(x)) \xrightarrow{\overline{f}_{3,p_{\beta,3}(x)}} \cdots \xrightarrow{} A_\beta(x).$$
In this way we obtain an object $(X_{\beta + 1}, A_{\beta + 1})$ of $\mathrm{Prod}(\mathcal{K})$ that's defined as follows: ${X_{\beta + 1} := Z_\beta \times X_\beta}$ and $A_{\beta + 1}(z, x)$ is the pushout from the diagram above. Moreover, the morphism $(p_{\beta + 1}, \overline{f}_{\beta + 1}) \colon (X_\beta, A_\beta) \to (X_{\beta + 1}, A_{\beta +1})$ is defined as follows: $p_{\beta + 1} \colon Z_\beta \times X_\beta \to X_\beta$ is the product projection and the component $\overline{f}_{\beta + 1, z, x}$ of $\overline{f}_{\beta + 1}$ at $(z, x)$ is the vertical morphism from the right side of the pushout square above.\newline
Limit Step: If $\beta \leq \delta$ is a limit ordinal such that we've already performed the construction for all the ordinals less than $\beta$, then we define the object ${(X_{\beta}, A_\beta) := \operatorname{colim}_{\gamma < \beta} (X_\gamma, A_\gamma)}$, where the transifinite composite is taken in $\mathrm{Prod}(\mathcal{K})$.\par
The first transfinite construction is finished. In this way we obtain a cone $(\tilde{f}_{0,x} \colon D0 \xrightarrow{} A_{\delta}(x))_{x \in X_{\delta}}$, and we define $I_1 := X_{\delta}$ and $D$ on $I_1$ to be $A_{\delta}$. Furthermore,  let $(Y_0, B_0) := (X_0, A_0)$ and $(Y_1, B_1) := (X_{\delta}, A_{\delta})$. There is an obvious morphism $(Y_0, B_0) \xrightarrow{} (Y_1, B_1)$. We repeat this transfinite procedure for each $x \in I_1$ by using $Dx$ instead of $D0$ and in this way we obtain a cone $(g_{x,y} \colon Dx \xrightarrow{} Dy)_{y \in I_{2,x}}$. Putting together all the codomains from these cones, where $x \in I_1$, we obtain the definition of $D$ on $I_2 := \bigcup_{x \in I_1} I_{2,x}$. This gives us an object $(Y_2, B_2)$ of $\mathrm{Prod}(\mathcal{K})$ in an obvious way and also an obvious morphism $(Y_1, B_1) \xrightarrow{} (Y_2, B_2)$. In this way we continue in each successor step. In limit steps $\beta \leq \lambda$ we take $(Y_\beta, B_\beta) := \mathrm{colim}_{\gamma < \beta} (Y_\gamma, B_\gamma)$. This transfinite construction finally gives us the functor $D$. Now define the cone $(f_i \colon A \to A_i)_{i \in I'}$ to be the colimit injection $(Y_0, B_0) \to (Y_\lambda, B_\lambda)$.\par
Now that we've finished the construction let us show that each $A_i$, where $i \in I'$, belongs to $I$-Inj. Suppose that we have a cone $(h_j \colon A \xrightarrow{} L_j)_{j \in J'}$ from $I$ and a morphism $g \colon A \to A_i$. By construction, there exists a transfinite composition from $A$ to $A_i$, in other words for each $\alpha < \lambda$ there exists $x_\alpha \in I_\alpha$ such that $A_i = \operatorname{colim}_{\alpha < \lambda} Dx_\alpha$. Using the fact that $A$ is $\lambda$-presentable we get that there exists a factorization of $g$ through some $Dx_\alpha$ via some morphism $f \colon A \to Dx_\alpha$. The diagram
\begin{center}
\begin{tikzcd}
{(1,A)} \arrow[r, "f"] \arrow[d, "h"] & {(1,Dx_\alpha)} \\
{(J',L)}                              &                
\end{tikzcd}
\end{center}
is one of the diagrams from the construction. Therefore there exists an index $j \in J'$ and a morphism $u \colon L_j \to Dx_{\alpha + 1}$. Composing this morphism with the colimit injection $\iota_{\alpha + 1} \colon Dx_{\alpha + 1} \to A_i$ we obtain a morphism $\iota_{\alpha + 1} \cdot u \colon L_j \to A_i$ and this morphism satisfies $$\iota_{\alpha + 1} \cdot u \cdot h_j = \iota_{\alpha + 1} \cdot (Dx_{\alpha} \to Dx_{\alpha + 1}) \cdot f = \iota_\alpha \cdot f = g.$$
Now suppose that $g \colon A \to B$ is a morphism whose codomain $B$ belongs to {$I$-Inj}. We want to show that there exists $i \in I'$ and a morphism $h \colon A_i \to B$ such that $h \cdot f_i = g$. Using {$B \in I$-Inj} we get that there exists $z \in Z_0$ and $g' \colon C_{0}(z) \to B$ such that $g \cdot g_0 = g' \cdot f_{0, z}$. Using the universal property of the pushout $A_{1}(z,0)$ we get a morphism $h_1 \colon A_{1}(z,0) \to B$ such that $h_1 \cdot \overline{f}_{1,z,0} = g$ and $h_1 \cdot h'_{1,z,0} = g'$. The previous two sentences are summed up in the following diagram.
\[\begin{tikzcd}
	{E_0(0)} && A \\
	{C_0(z)} & {A_1(z,0)} \\
	&& B
	\arrow["{f_{0,z}}", from=1-1, to=2-1]
	\arrow["g", from=1-3, to=3-3]
	\arrow["{g_0}", from=1-1, to=1-3]
	\arrow["{\overline{f}_{1,z,0}}", from=1-3, to=2-2]
	\arrow["{h'_{1,z,0}}"', from=2-1, to=2-2]
	\arrow["{h_1}", dashed, from=2-2, to=3-3]
	\arrow["{g'}"', curve={height=12pt}, dashed, from=2-1, to=3-3]
\end{tikzcd}\]
Repeating the previous procedure we get $z' \in Z_1$ and $h_2 \colon A_{2}(z', (z, 0)) \to B$ such that the obvious diagrams commute. We continue in this way in each successor step. In the limit steps we use the universal property of colimits. After this transfinite construction is finished we obtain an element $x \in I_1$ and a morphism $h_x \colon Dx \to B$ such that the obvious diagrams commute. Repeating this procedure we obtain $y \in I_2$ and a morphism $h_y \colon Dy \to B$ such that the obvious diagrams commute. In each successor step we repeat this. In limit steps we use the universal property of the colimit. In the end we obtain $i \in I'$ and a morphism $h \colon A_i \to B$ such that $h \cdot f_i = g$.
\end{proof}

\section*{Acknowledgements}
We would like to thank John Bourke for very useful discussions and for his enlightening explanations.

