under construction – needs attention
higher geometry / derived geometry
geometric little (∞,1)-toposes
geometric big (∞,1)-toposes
function algebras on ∞-stacks?
derived smooth geometry
For usual (commutative) rings, Grothendieck introduced the notion of a prime spectrum. In order to accommodate not only polynomials but also formal power series, it is convenient to consider completions and topological rings. Order $n$ nilpotent elements in an ordinary ring compare to completions as truncations of general power series and geometrically represent certain $n$-th infinitesimal neighborhood. Completions represent certain pro-objects in the category of rings. Adic completion corresponds to have all infinitesimal neighborhoods at once.
A formal spectrum is a generalization of prime spectrum to adic noetherian rings, therefore containing information on all infinitesimal neighborhoods, corresponding to the ideal of completion.
see for instance (Strickland 00, def. 4.13)
Assume $R$ is a commutative ring and $I \subset R$ is an ideal, such that its powers make a fundamental system of neighborhoods of zero of a complete Hausdorff topology (we say that $R$ is an separated complete ring in the $I$-adic topology).
The formal spectrum $Spf R$ of $(R,I)$ is the inductive limit of the prime spectra
where the connecting morphisms are the closed nilpotent immersions $Spec(R/I^n)\hookrightarrow Spec(R/I^{n+1})$ of affine schemes and the colimit is taken in the category of topologically ringed spaces.
Regarding that all affine schemes $X_n := Spec(R/I^n)$ for $n\geq 1$ have the same underlying topological space $\chi$ because nilpotents in $I^n$ do not affect the underlying reduced scheme, so does $Spf R = (\chi,\mathcal{O}_\chi)$. With our assumptions on $I$-adic topology, in fact $\chi$ contains all closed points of $Spec R$ and any open subset of $Spec R$ containing $\chi$ is the whole of $Spec R$. The structure sheaf $\mathcal{O}_\chi$ has the ring of sections $\mathcal{O}_\chi(U) = lim_n \mathcal{O}_{X_n}(U)$ where the limit is taken in the category of topological rings, and $\mathcal{O}_{X_n}(U)$ have the discrete topology. For example, the ring of global sections is $\mathcal{O}_\chi(\chi) = \hat R$.
A formal spectrum is an example of a formal scheme. Formal schemes in general form certain subcategory of the category of ind-schemes.
The formal spectrum of a separated complete topological $I$-adic ring $R$ depends just on the underlying topology on $R$ and not on a choice of the ideal $I$ generating this topology.
standard references are EGA, Hartshorne
Luc Illusie, Grothendieck existence theorem in formal geometry, in FGA explained (draft: pdf)
Discussion more from a topos theory perspective is in section 4.2 of
For the case of formal group laws see also