Can I recover the Zariski open subobjects from the Grothendieck topology they generate? Let $\mathbf{cRing}$ be a category of commutative rings and let $\mathbf{Set}$ be a category of sets relative to which $\mathbf{cRing}$ is small (Grothendieck universes). The opposite $\mathbf{Aff}$ of the category of commutative rings becomes a site when we equip it with the Grothendieck topology generated by the pretopology consisting of families $\{\,R \to R[s_i^{-1}]\,\}_i$ such that the $s_i$ generate the unit ideal $(1)$ of $R$. The topology is subcanonical and the Yoneda embedding makes $\mathbf{Aff}$ a full subcategory of the topos $\operatorname{Sh}(\mathbf{Aff})$. I denote the Yoneda embedding by $R\mapsto \operatorname{Spec}R$. I call the objects of the presheaf category $\operatorname{Pr}(\mathbf{Aff})$ Z-functors, and I call the objects of the sheaf topos Zariski-local Z-functors. The Grothendieck topology on $\mathbf{Aff}$ induces a Lawvere-Tierney topology $j: \Omega \to \Omega$ on the subobject classifier of the presheaf topos and the Zariski-local Z-functors are precisely the sheaves for this topology.
The open subfunctors of an affine Z-functor $\operatorname{Spec}R$ are by definition (lecture notes by Marc Nieper-Wißkirchen) those of the form $DI\hookrightarrow \operatorname{Spec}R$, where $I$ is an ideal of $R$ and $(DI)A = \{\phi^*: R \to A\,|\,\text{$\phi^*I$ generates (1)\}}$. The closed subfunctors of $\operatorname{Spec}R$ are up to isomorphism of the form $\operatorname{Spec}R/I \to \operatorname{Spec} R$. Once it is clear what the open/closed subobjects of the representable are, one can define topologies on all Z-functors and one can define schemes.
Question: Is there a way to recover the open and closed subobjects from the topology $j$ on the presheaf category?
Edit: I am sorry, I left out important context. I am reading A functional approach to General Topology, and on page 114 section 2.5. the authors hint that it is possible to get a notion of closed maps from a topology on an elementary topos. According to them the closed maps $f: X \to Y$ are those for which both image $\Sigma_f$ and preimage $f^*$ in the subobject fibration commute with the closure operator induced by $j$. I would like if someone with experience to tell me if this will (probably) give me the closed maps I want or something else entirely.
 A: I will explain why I believe it is not possible to define the Zariski-open subobjects in terms of the Grothendieck topology alone.
First of all, there is a very important conceptual difference between topologies on sets and Grothendieck topologies: topologies on a set tell you about which sets are open, but Grothendieck topologies tell you about which sieves cover.
For topologies on a set, the axiom that the union of open sets is open means the notion of coverage is inherited from the powerset – there is no freedom to change what it means to cover.
By contrast, the raison d'être of Grothendieck topologies is to change the notion of coverage – even if we restrict our attention to subcanonical topologies, this should be clear from the fact that not every epimorphism in the site becomes an epimorphism of sheaves.
(This is why I prefer the "coverage" terminology.)
The paragraph above should be reason enough to be sceptical about the possibility of recovering any notion of open subobject from a Grothendieck topology in general.
For the category of schemes in particular there are additional difficulties.
Recall that a local ring is a ring $A$ that has a unique maximal ideal.
The topological space $\operatorname{Spec} A$ has this property: there is a point whose only open neighbourhood is the entire space.
Thus, the only Zariski-covering sieve on $\operatorname{Spec} A$ is the maximal sieve!
Nonetheless, provided $A$ is not a field, $\operatorname{Spec} A$ does have non-trivial open subspaces.
So any attempt to identify open subschemes in terms of e.g. minimal generating subsets of covering sieves is doomed to failure.
So much for open subschemes.
What about closed subschemes?
In the category of affine schemes, closed immersions are precisely the regular monomorphisms.
This fails already in the category of schemes, because there are non-separated schemes.
But if you take the category of affine schemes as given there is a general procedure that will construct the Zariski coverage, so it is hard to say that having a Grothendieck topology adds any information here.
I think you are already convinced that the answer to your original question is no, but in the comments you mention the possibility of defining a modality whose fixed points are the open subobjects.
It is not clear to me exactly what you mean but there are obstacles here too.
A unary operation $\Box$ on subobjects that can be represented by an endomorphism of the subobject classifier must be pullback-stable.
In particular, if we assume that $\Box$ preserves the top subobject $\top$, it follows that the operation must be inflationary: indeed, given any monomorphism $f : X \to Y$, we have the following pullback square,
$$\require{AMScd}
\begin{CD}
X @>{\textrm{id}_X}>> X \\
@V{\top_X}VV @VV{f}V \\
X @>>{f}> Y
\end{CD}$$
so we must have $f \le \Box f$ in $\textrm{Sub} (Y)$.
Thus $\Box$ cannot be a non-trivial interior operator.
A: Here is what I learned in the past hours after I posted the question. It does not allow me to recover the opens from the topology $j$, but it does allow me to talk about openness in the internal language by adding another symbol to the language.
The endomorphism $j:\Omega \to \Omega$ on the subobject classifier of the presheaf topos is not the right one to give me the Zariski open and closed subfunctors. Let me denote the subobject classifier of $\text{Sh}(\mathbf{Aff})$ by $\Omega_j$. It is the image of $j$ and a subobject of $\Omega$. $\Omega_j(R)$ is the set of all closed sieves (relative to the topology $j$) on the object $R$. When we view a sieve $S$ on $R$ as a subfunctor of $\text{Spec}R$, then they are precisely the sieves which are sheaves relative to the Grothendieck topology $j$. In other words $\Omega_j(R)$ is the set of subobjects of $\text{Spec}R$ in the category $\text{Sh}(\textbf{Aff})$ in the same way that $\Omega R$ is the set of subobjects of $\text{Spec}R$ in the presheaf category.
Some of the subobjects of $\text{Spec}R$ are open. We can collect them in a subfunctor $\Sigma$ (of both $\Omega_j$ and $\Omega$). We let $\Sigma R$ be the collection of open sieves (i.e. the open subfunctors of $\text{Spec}R$). Then a subfunctor $U$ of a sheaf $X$ is open if and only if the classifying map $X \to \Omega_j$ of $U$ factors through $\Sigma$. The subobject $\Sigma \hookrightarrow \Omega_j$ has a classifying arrow $\square: \Omega_j \to \Omega_j$. It is then the case that a subobject $U \hookrightarrow X$ is open if and only if the classifying arrow $\phi_U: X \to \Omega_j$ factors through $\Sigma$ which is the case if and only if $\square \phi_U = \top$. It was wrong from me in the comments to claim that the open predicates are the fixed points of $\square$. Indeed, since every maximal subobject is open the operator $\square$ is inflationary. And $\square$ is not a Lawvere-Tierney topology on $\Omega_j$ since this would in particular imply that whenever $S \hookrightarrow \text{Spec}R$ is open and $T$ is a bigger subobject of $\text{Spec}R$ which is also open, then $T$ is open. This can of course not be true, since it would make all subobjects (above the open least subobject) be open. In synthetic topology the lattices of open and closed subobjects are not in general dual or even related, but in the case of Zariski-local Z functors we can characterize the closed subobjects as the complements of the open subobjects. A subsheaf $Z \hookrightarrow X$ is closed if and only if $\neg \phi_Z$ is open if and only if $\square \neg \phi_Z = \top$.
All this means that we can apply the techniques of synthetic topology to scheme theory. The object of open truth values $\Sigma$ has many useful properties which allows one to develop constructive topology. In particular $\Sigma$ is a dominance. The references are Ingo Blechschmidt's master thesis Topostheorie und Algebraische Geometrie, the PhD thesis by the same author (even though the explanation is more advanced in the thesis), and the PhD thesis Synthetic topology and Constructive Metric Spaces by Davorin Lesnik. In the latter text in particular theorem 2.53 is relevant, since it applies to our situation.
I do not understand the geometric meaning of $\phi_A\mapsto \square \phi_A$ for an arbitrary subspace $A \hookrightarrow X$. The operator $\square$ can not be an interior operator, since it is inflationary.
Edit: I have written that theorem 2.53 of Synthetic topology and Constructive Metric Spaces applies to the gros Zariski topos, but this is not true! In particular theorem 2.53 states that the complements of opens are closed, but this is not the case in the Zariski topos.
Consider $\text{Spec }\mathbb Z[x] $ with its open subspace $D(x)$. The complement of $D(x)$ contains all closed subschemes of the form $\text{Spec }\mathbb Z[x]/(x^n)$, so if it where of the form $\text{Spec }\mathbb Z[x]/I$ for some ideal $I$ then the ideal $I$ would be contained in every $(x^n)$ and thus zero.
Complements of closed subspace are open though.
