Let $U\to X$ be an open immersion of schemes and denote by $D$ the (say reduced) complement. Then by applying the de Rham functor, we get morphisms
$$U\_{dR}\to X\_{dR}\leftarrow D\_{dR}$$
of the associated de Rham spaces. Then in [this](https://people.math.harvard.edu/%7Egaitsgde/GL/Crystalstext.pdf) (in 2.5.2) Gaitsgory and Rozenblyum say that $U\_{dR}\to X\_{dR}$ is an open embedding.
It looks like they are proving this using the functorial description of open embeddings via $QCoh$, but instead for $IndCoh$. Its not clear to me that we also have a description of openness via $IndCoh$, do you know of a good reference for it? Once we have that, I think using $IndCoh(X\_{dR})=\text{Crys}(X)$ and Kashiwara shows that the map is an open embedding.


My question is what do we know $D\_{dR}\to X\_{dR}$? Is it also a closed embedding? Naively you would think so, since we can see via the functor of points that $D\_{dR}$ is the complement of $X\_{dR}$, and the complement of a open substack ought to be a closed substack. Is this correct?



Open/closed embeddings and the de Rham space
I believe the following is a counter example to the claim in the last paragraph. Let $X$ be a smooth affine curve for simplicity, and let $pt \to X$ be a closed point. Consider the canonical map $X \to X\_{dR}$. Then $D := X \times\_{X\_{dR}} pt$ is the formal completion of the point, and the map


$$D \longrightarrow X $$


is not a closed immersion.


