Dimension of a subset For a closed subset $Y$ of a space $X$ we have the following inequlity of topological (covering) dimensions: $$\dim{Y} \leq \dim{X}$$ (assuming at least one of those is finite).
I have two questions related to that:


*

*Does the above inequality hold for any (not necessarily closed) $Y \subseteq X = \mathbb{R}^n$?

*Can you come up with some nice counterexamples to the above inequality when we skip the assumption that $Y$ is closed? By nice I mean something nicer than my counterexample described below.


Not nice counterexample
I'm not happy with it, because it is not even a Hausdorff space and it is quite artificial for me.
Let $C_n=[n-1,n] \times [0,1]^{n-1}$ ($C_1=[0,1]$). Then $D_m = \bigcup_{n=1}^m C_n$ (for $m \in \mathbb{N} \cup {\infty} $). Define the topology $\tau_m$ on $D_m$ with a normal euqlidean metric on $D_m \subseteq \mathbb{R}^m$.
For $m<\infty$ $D_m$'s dimension is $m$ since it is a finite sum of closed subsets $C_n$ and maximum of their dimensions is $m$*. For $m=\infty$ we can notice that $D_N \subseteq D_m$, $D_N$ is closed and its dimension is $N$ and then go with $N$ to infinity.
The exact counterexample: 
(1) We can define $(D'_m, \tau'_m)$ as $(D_m \cup \{Inf\}, \tau_m \cup \{D'_m\})$. Then its dimension is zero since the only open set containing $Inf$ is the whole space so it must be included in any open covering. However zero-dimensional $D'_m$ contains $D_{m'}$ for any $m' \leq m$, which dimension is $m' \gt 0$.
(2) Moreover one can define more additional (containing $Inf$) sets in topology in such a way that they don't have to contain the whole $D_m$ but only its "tail" without some initial part $D_{m'} \subsetneq D_m \subseteq D'_m$ ($m' \lt m$) and then the dimension of the whole space would be $m'$.
*I haven't seen the proof that $\dim{\mathbb{R}^n}=n$, but I strongly believe in it.
EDIT:
As Brian points below, my inequality is not true with Engelking's definition of $\dim$ with functionally open sets. The definition that I meant is the following (X is any topological space):

A space X is said to be finite dimensional if there is some integer $m$ such that for every open covering $A$ of X, there is an open covering $B$ of X that refines $A$ and has order at most $m+1$. The topological dimension of X is defined to be the smallest value of $m$ for which this statement holds; we denote it by $\dim$X.

(Munkres J.R., Topology, paragraph 50)
I'm sorry for the lack of precision.
 A: Here, adapted from an example and a problem in Engelking and with lots of blanks filled in, is an example of a zero-dimensional Tikhonov space with a subspace $-$ in fact a closed subspace $-$ of dimension greater than $0$. 
The first step is to construct a zero-dimensional Tikhonov space $X$ that is not strongly zero-dimensional; this construction is apparently due to Dowker.
Let $I=[0,1]$, and let $Q=I\cap\mathbb{Q}$. Define the relation $\sim$ on $I$ by $x\sim y$ iff $|x-y|\in Q$; clearly $\sim$ is an equivalence relation with countable equivalence classes, so it has $2^\omega\ge\omega_1$ equivalence classes, one of which is $Q$ itself. Note also that each $\sim$-class is dense in $I$.
Choose $\omega_1$ of these classes, not including $Q$, and enumerate them as $\{Q_\xi:\xi<\omega_1\}$. For $\eta<\omega_1$ let $$S_\eta=I\setminus\bigcup_{\eta\le\xi<\omega_1}Q_\xi\;;$$ each $S_\eta$ is zero-dimensional, since its complement is dense in $I$. We now use the $S_\eta$ to define some subspaces of $(\omega_1+1)\times I$:
$$\begin{align*}
X_\eta&=\bigcup_{\xi\le\eta}\Big(\{\xi\}\times S_\xi\Big), \qquad\eta<\omega_1\\
X&=\bigcup_{\xi<\omega_1}\Big(\{\xi\}\times S_\xi\Big)=\bigcup_{\eta<\omega_1}X_\eta\;.
\end{align*}$$
Note that $X_\eta=\big((\eta+1)\times I\big)\cap X$ is a clopen subset of $X$ for each $\eta<\omega_1$. Moreover, $X_\eta\subseteq (\eta+1)\times S_\eta$, which is clearly zero-dimensional, so each $X_\eta$ is zero-dimensional, and therefore so is $X$. This also ensures that $X$ is Tikhonov. (In fact $X$ is normal, but that’s a bit harder to prove.)
However, $X$ is not strongly zero-dimensional, because the closed sets $H_0=\omega_1\times\{0\}$ and $H_1=\omega_1\times\{1\}$ can’t be separated by clopen sets in $X$. To prove this, suppose that $U$ is a clopen subset of $X$ such that $H_0\subseteq U\subseteq X\setminus H_1$. Let $x\in I$ be arbitrary, and fix $\alpha<\omega_1$ such that $x\in S_\alpha$; clearly $x\in S_\eta$ whenever $\alpha\le\eta<\omega_1$.
Suppose that for every $\eta<\omega_1$ and $n\in\omega$ there are $\langle \xi_0,x_0\rangle\in U$ and $\langle \xi_1,x_1\rangle\in X\setminus U$ such that $\xi_0,\xi_1\ge\eta$, $|x-x_0|<2^{-n}$, and $|x-x_1|<2^{-n}$. Then we can recursively construct a sequence $$\Big\langle\langle \xi_n,x_n\rangle:n\in\omega \Big\rangle$$ such that $\xi_0\ge\alpha$, $\xi_{n+1}>\xi_n$ and $|x-x_n|<2^{-n}$ for each $n\in\omega$, $\langle \xi_n,x_n\rangle\in U$ when $n$ is even, and $\langle \xi_n,x_n\rangle\in X\setminus U$ when $n$ is odd. Let $\eta=\sup_n\xi_n$. Then $$\Big\langle\langle \xi_n,x_n\rangle:n\in\omega \Big\rangle\to\langle \eta,x\rangle\in X_\eta\;,$$ so $\langle \eta,x\rangle\in U\cap (X\setminus U)=\varnothing$, which is absurd. Thus, for each $x\in I$ there are $\eta(x)<\omega_1$ and $n(x)\in\omega$ such that $$B(x)\triangleq\big\{\langle \xi,y\rangle\in X:\xi\ge\eta(x)\land|y-x|<2^{-n(x)}\big\}$$ is a subset either of $U$ or of $X\setminus U$.
Let $I_0=\{x\in I:B(x)\subseteq U\}$ and $I_1=I\setminus I_0=\{x\in I:B(x)\subseteq X\setminus U\}$. Clearly $I_0\cap I_1=\varnothing$, $0\in I_0$, and $1\in I_1$, so $\{I_0,I_1\}$ is a partition of $I$. But it’s easy to see that if $x\in I_i$, then $\{y\in I:|y-x|<2^{-n(x)}\}\subseteq I_i$ as well, so $I_0$ and $I_1$ are open in $I$. This contradicts the connectedness of $I$, completing the proof that there is no clopen separation of $H_0$ and $H_1$ in $X$.
It follows immediately that $\beta X$ is not strongly zero-dimensional (Theorem 6.2.12 in Engelking) and since every Lindelöf zero-dimensional space is strongly zero-dimensional (this is easy to show), it follows that $\beta X$ is not even zero-dimensional.
Next, note that each $X_\eta$, being a subspace of a compact metrizable space $\big((\eta+1)\times I\big)$, is second countable, and therefore the weight of $X$ (= minimum cardinality of a base for the topology) is $\omega_1$. It follows that $X$ can be embedded in $D^{\omega_1}$, where $D=\{0,1\}$ with the discrete topology. Let $e:X\to D^{\omega_1}$ be such an embedding, and let $K=\operatorname{cl}e[X]$; $K$ is a zero-dimensional compactification of $X$ of weight at most $\omega_1$. Let $K^*=K\setminus e[X]$, and let $$Z=\Big((\omega_2+1)\times K\Big)\setminus\Big(\{\omega_2\}\times K^*\Big)\;.$$
Clearly $\{\omega_2\}\times e[X]$ of $Z$ is a closed subspace of $Z$ homeomorphic to $X$, so $\beta Z$ contains a closed subspace homeomorphic to $\beta X$, and we’ll have the desired example if we can show that $\beta Z$ is zero-dimensional. I’ll show that in fact $\beta Z=(\omega_2+1)\times K$ which is certainly zero-dimensional.
To do this, it suffices (e.g., by Corollary 3.6.4 in Engelking) to show that disjoint closed subsets of $Z$ have disjoint closures in $(\omega_2+1)\times K$. Suppose, then, that $F$ and $G$ are closed subsets of $Z$, let $\overline F$ and $\overline G$ be their closures in $(\omega_2+1)\times K$, and suppose that $p\in \overline F\cap\overline G$. Clearly $p\in \{\omega_2\}\times K^*$, so $p=\langle\omega_2,q\rangle$ for some $q\in K^*$. Let $\mathscr{B}_q$ be a local base of clopen sets at $q$ in $K$; since the weight of $K$ is at most $\omega_1$, we may assume that $|\mathscr{B}_q|\le\omega_1$ and index it as $\mathscr{B}_q=\{B_\xi:\xi<\omega_1\}$.
Enumerate $\omega_1\times\omega_1\times 2=\{\langle \alpha_\xi,\beta_\xi,i_\xi\rangle:\xi<\omega_1\}$. For each $\langle\eta,\xi\rangle\in \omega_2\times\omega_1$ let $V(\eta,\xi)=(\eta,\omega_2]\times B_\xi$, and let $$\mathscr{V}=\big\{V(\eta,\xi):\langle\eta,\xi\rangle\in\omega_2\times\omega_1\big\}\;;$$ $\mathscr{V}$ is a local base at $p$ in $(\omega_2+1)\times K$, so $F\cap V(\eta,\xi)\ne\varnothing\ne G\cap V(\eta,\xi)$ for each $\langle\eta,\xi\rangle\in\omega_2 \times\omega_1$. Thus, we can recursively construct a transfinite sequence
$$\Big\langle\langle\eta_\xi,q_\xi\rangle:\xi<\omega_1\Big\rangle\tag{1}$$
in $\omega_2\times K$ such that $\eta_\xi<\eta_{\xi+1}$ and $q_\xi\in B_{\alpha_\xi}$ for each $\xi<\omega_1$, $\langle\eta_\xi,q_\xi\rangle\in F$ whenever $i_\xi=0$, and $\langle\eta_\xi,q_\xi\rangle\in G$ whenever $i_\xi=1$.
Let $\eta=\sup\limits_{\xi<\omega_1}\eta_\xi<\omega_2$, and let $p'=\langle\eta,q\rangle\in\omega_2\times K$; the proof will be complete if I can show that $p'\in F\cap G$. To this end note that $$\big\{(\xi,\eta]\times B_\alpha:\langle\xi,\alpha\rangle\in\eta\times\omega_1\big\}$$ is a local base at $p'$. Fix $\alpha<\omega_1$; then
$$\Big\langle\langle\eta_\xi,q_\xi\rangle:\alpha_\xi=\alpha\land i_\xi=0\Big\rangle$$ and $$\Big\langle\langle\eta_\xi,q_\xi\rangle:\alpha_\xi=\alpha\land i_\xi=1\Big\rangle$$
are cofinal subsequences of $(1)$ lying entirely in $\big([0,\eta]\times B_\alpha\big)\cap F$ and $\big([0,\eta]\times B_\alpha\big)\cap G$, respectively, and it’s immediate that $p'\in \operatorname{cl}_Z F=F$ and $p'\in\operatorname{cl}_Z G=G$, i.e., $p'\in F\cap G$. This completes the proof.
A: The monotonicity of dimension functions is tricky for quite general spaces. For $\operatorname{ind}$ we have the easiest situation: for every subspace $A$ of a regular space $X$ (most texts only consider $\operatorname{ind}$ to be defined for regular spaces) $\operatorname{ind}(A) \le \operatorname{ind}(X)$.
The dimension functions $\operatorname{Ind}(X)$ and $\dim(X)$ are usually defined for normal spaces (including $T_1$) only and then the corresponding inequality only holds for closed subsets $A$, where the dimension function is also guaranteed to be defined as well. But even for hereditarily normal spaces (where all subspaces have the dimension defined as well) we can have weird situations, like a hereditarily normal space $X$ with $\dim(X) = \operatorname{Ind}(X) = 0$ but for every $n \in \mathbb{N}$ it has a subspace $A_n$ with $\dim(A_n) = \operatorname{Ind}(A_n) = n$. See this paper from Fundamenta Mathematica (1979).
As a positive result, in Engelking's book "theory of dimensions finite and infinite" it is proved that for so-called strongly hereditarily normal spaces $X$ we have that $\dim(A) \le \dim(X)$ for all subspaces $A$ and also for $\operatorname{Ind}$. A space $X$ is called strongly hereditarily normal iff all pairs of separated subsets $A$ and $B$ of $X$ can be separated by disjoint open subsets $U$ and $V$ such that both these open sets can be written as a union of a point-finite family of open $F_\sigma$-sets; this is quite technical but defines a class of spaces that includes all perfectly normal spaces and all hereditarily weakly paracompact (hereditarily metacompact) spaces. In particularly all metric spaces, so this covers the first part of your question.
Another way to get the result for Euclidean spaces is to show that $\dim = \operatorname{ind}$ for separable metric spaces, which is shown in the first 7 paragraphs of the mentioned book by Engelking ;it's not very hard, but requires some development of theory (like sum theorems for the dimension functions etc.). There is also a treatment in van Mill's book "the infinite-dimensional topology of function spaces", chapter 3, that also shows the subspace theorem and the coincidence theorem. 
