A commutative ring with unity is called pm-ring if every prime ideal is contained in a unique maximal ideal. In [dMO71], it is shown that pm-rings are characterized by the fact that $\operatorname{max Spec} R$ (the set of all maximal ideals under Zariski subspace topology) is a retract of $\operatorname{Spec} R$, and in this case, the unique retraction is given by $u: \operatorname{Spec} R \to \operatorname{max Spec} R$ , $u(P)$ is the unique maximal ideal containing $P\in \operatorname{Spec} R$ .
It can moreover be shown that for pm-rings, this retract is actually also a deformation retract , because $H : \operatorname{Spec} R \times [0,1] \to \operatorname{Spec} R$ given by $H(P,t)=P, \forall t \in [0,1)$ and $H(P,1)=u(P)$ is continuous, so gives a homotopy between $i\circ u$ and $Id_{\operatorname{Spec} R}$, where $i:\operatorname{max Spec} R \to \operatorname{Spec} R$ is the inclusion map.
So the questions I want to ask are the following :
(1) Can we characterize (possibly algebraic characterization) commutative rings (with unity) $R$ such that $\operatorname{max Spec} R$ is homotopy equivalent with $\operatorname{Spec} R$ ?
(2) Can we characterize commutative rings (with unity) $R$, such that $i : \operatorname {max} \operatorname {Spec} R \to \operatorname {Spec} R$ is a homotopy equivalence i.e. there exists a map $g : \operatorname {Spec} R \to \operatorname {max} \operatorname {Spec} R$ such that $i\circ g$ and $g \circ i$ are homotopic to the respective identity maps ?
As noted, pm-rings are definitely in both the class, but what are all such rings ? Even if we can't say what are all such rings, can we atleast find class of rings for each case (1) and (2) which are not necessarily pm-rings ?
References.
[dMO71] De Marco, Giuseppe; Orsatti, Adalberto, Commutative rings in which every prime ideal is contained in a unique maximal ideal, Proc. Am. Math. Soc. 30, 459-466 (1971). ZBL0207.05001.