Open affine subscheme of affine scheme with different underlying set is non-isomorphic If I have an affine scheme $X=\operatorname{Spec}A$, and an open subscheme $Y=\operatorname{Spec}B$ which is also affine and whose topological space is different from $X$, does it follow that $X$ and $Y$ are non-isomorphic?
But if $X$ and $Y$ would be isomorphic, then we'd have $A\cong B$ and hence $Y$ and $X$ must actually be the same as subsets of $X$, because the prime ideals of $A$ are $1:1$ to the prime ideals in $B$. I think I'm confused here in this situation about the interplay of &quot;being the same&quot; and &quot;being isomorphic&quot;.
Let $k$ be a non-trivial ring.
Consider $A = k [s_1, s_2, s_3, \ldots, t_1, t_2, t_3, \ldots] [s_1^{-1}, s_2^{-1}, s_3^{-1}, \ldots]$, that is, the polynomial ring over $k$ in countably infinitely many variables, with half of those variables made invertible by localisation.
Let $B = A [t_1^{-1}]$.
Then $A \cong B$ as $k$-algebras: there is a unique homomorphism $B \to A$ sending $t_1$ to $s_1$, $t_{n+1}$ to $t_n$, and $s_n$ to $s_{n+1}$, and it has an obvious inverse.
So $\operatorname{Spec} A \cong \operatorname{Spec} B$ as schemes over $\operatorname{Spec} k$.
But $A \ncong B$ as $A$-algebras, and $\operatorname{Spec} B$ as a scheme over $\operatorname{Spec} A$ is a non-surjective open immersion.
Moral: you have to pay attention to the category when asking whether two objects are isomorphic.
Question: &quot;If I have an affine scheme X=SpecA, and an open subscheme Y=SpecB which is also affine and whose topological space is different from X, does it follow that X and Y are non-isomorphic?&quot;
Answer: Two affine schemes $X:=Spec(A), Y:=Spec(B)$ are isomorphic iff $A\cong B$ are isomorphic rings. In particular this implies that $X$ and $Y$ have &quot;isomorphic&quot; topological spaces. Hence if $X \cong Y$ are &quot;abstractly isomorphic&quot;, this implies the topological spaces are isomorphic.
In general two schemes (or ringed spaces) $(X, \mathcal{O}_X), (Y, \mathcal{O}_Y)$ are &quot;isomorphic&quot; iff there are maps $f:(X, \mathcal{O}_X) \rightarrow (Y, \mathcal{O}_Y), g:(Y, \mathcal{O}_Y)\rightarrow  (X, \mathcal{O}_X)$ with $f\circ g =Id,g \circ f=Id$. In particular the maps $f,g$ induce homeomorphisms of topological spaces $X \cong Y$. If a strict  open subscheme $U \subsetneq V$ is abstractly isomorphic to $V$ you end up with a topological space $U_t \subsetneq V_t$ realizable as a strict subspace of $V_t$, but where there is an abstract isomorphism $U_t \cong V_t$. This stuation is &quot;paradoxical&quot; - the topological space $V_t$ would then be homeomorphic to a strict subspace of itself.
Remark: &quot;But if X and Y would be isomorphic, then we'd have A≅B and hence Y and X must actually be the same as subsets of X, because the prime ideals of A are 1:1 to the prime ideals in B. I think I'm confused here in this situation about the interplay of &quot;being the same&quot; and &quot;being isomorphic&quot;.&quot;
Answer: Here is an example (the affine line over an algebraically closed field) to show that there are no strict open subschemes $U \subsetneq \mathbb{A}^1$ with $U_t \cong \mathbb{A}^1_t$ a homeomorphism induced by a map of schemes. Hence in this situation you avoid such paradoxes.
Example: Let $k$ be an algebraically closed field and let $A:=k[x]$ be the polynomial ring in one variable $x$ over $k$. Let
$$f(x):=(x-u_1)^{l_1}\cdots (x-u_m)^{l_m}$$
with $u_i \neq u_j\in k$. Let $X:=Spec(A)$ and $U:=D(f) \subsetneq X$ be a strict open subscheme of $X$ and assume $X \cong D(f)$ is an abstract isomorphism of schemes over $k$, induced by a map of $k$-algebras $\tilde{\phi}: A \cong A_f$. The map $\tilde{\phi}$ induce a map of $k$-algebras
$$\phi:k[x] \rightarrow k[x]$$
with $\phi(x)=a(x)$ and $\phi(f(x)):=f(a(x))\in k^*$ a unit. It follows
$\phi(a(x)):=a_0\in k^*$ is a unit with $a_0\neq u_i$ for all $i$. Hence the map $\phi$ factors as follows
$$ k[x] \rightarrow k[x]/(x-a_0) \rightarrow k \subseteq k[x].$$
Hence the induced map $k[x]\rightarrow A_f \rightarrow A$ is the &quot;constant map&quot;: The induced map of affine schemes
$$ D(f) \rightarrow X$$
identifies $D(f) \cong \{(x-a_0)\} \subseteq X$ as a topological space with one point which contradicts the assumption that $D(f) \subseteq X$ is an open subscheme.
There are problems related to infinite sets and maps of infinite sets - an infinite  set can be embedded as a strict subset of itself. In the above discussion we see that if we consider maps of schemes and open subschemes, in the case of the affine line we can not construct a strict open subscheme which is isomorphic to the affine line. Hence in this situation we avoid such &quot;paradoxes&quot;. If you ignore the algebraic structure you can - as mentioned in the comments - easily construct such examples, but then you are not doing algebraic geometry, you are doing set theory.
For a discussion of this and the &quot;Peano curve&quot; see the following post:
&quot;Infinity&quot; in mathematics and an elementary question on dimension.
https://en.wikipedia.org/wiki/Dedekind-infinite_set