I know it's a well-known result, but I have not found any clear formalization, and I need a clear formalization. So I want to know if you agree with this formalization, and this proof.
Thank you for any replies.
Let $K \subset \Omega \subset \mathbb{R}^n$ with $K$ compact and $\Omega$ open. Then there exists a regular Urysohn function $\psi \in \mathcal{D}(\Omega)$, i.e. $0 \leq \psi(x) \leq 1$ $\forall x \in \Omega$ e $\psi(x)=1$ on a neighborhood of $K$, and this fact is denoted by $ K \prec \psi \prec \Omega$. My proof is the following:
Since $K$ is closed, if $\widetilde{x} \in \mathbb{R}^n \setminus \Omega \subset \mathbb{R}^n \setminus K$, for the properties of the distance we have $0 < \delta /2 < \mathrm{dist}(K,\Omega^c)=\widetilde{\delta}$. We assume that $\delta/2 < < \widetilde{\delta}$.
Let $\varphi \in \mathcal{D}(\Omega)$ with $\mathrm{supp}(\varphi) \subseteq \overline{B}(0,\delta /2)$. without considering the translations, we define: \begin{align*} K(\delta /2 ):=K + \overline{B}(0,\delta /2):=\lbrace y \in \mathbb{R}^n : \mathrm{dist}(y,K) \leq \delta \rbrace \end{align*} In other words, $\lbrace K(\delta /2) \rbrace_{\delta > 0}$ it's an increasing sequence of compact in $\Omega$ for $\delta \rightarrow \widetilde{\delta}$ with $K \subset K(\delta /2) \subset \Omega$. Define the function: \begin{align*} \psi(x):=( \chi_{K(\delta /2)} \ast \varphi)(x)=\int_{\mathbb{R}^n} \chi_{K(\delta /2)}(x-y) \varphi(y) dy \end{align*} Then $\psi(x)$ satisfies the required properties. In fact, we know that $\psi \in \mathcal{E}(\mathbb{R}^n)$ and also \begin{align*} \mathrm{supp}(\psi) &= \mathrm{supp}(\chi_{K(\delta /2)} \ast \varphi) \\ &\subset \mathrm{supp}(\chi_{K(\delta /2)})+ \mathrm{supp}(\varphi) \\ &\subset K(\delta /2) + \overline{B}(0,\delta /2) \\ &= K+ \overline{B}(0,\delta /2) + \overline{B}(0,\delta /2) \\ &= K+ \overline{B}(0,\delta) \\ &=K(\delta) \end{align*} Consequently, $\psi \in \mathcal{D}(\Omega)$, and $0 \leq \psi(x) \leq 1$ $\forall x \in \Omega$. and $\psi(x)=1$ $\forall x \in K$.
The usual statement of Urysohn's lemma is that we can find a function $\psi$ with $\operatorname{supp}\psi\subseteq\Omega$ and $\psi=1$ in $K$. This is different from what you stated. Other than that, the proof of the theorem is correct. Simply use $K$ instead. I would also change $\delta/2$ by $\delta/3$ in the arguments, just to be on the safe side (since then we can take some closures, etc...), but this is not really necessary.