In class we had the Proposition about density of compactly supported continuous functions $C_c(X)$ in $L^p(X)$
(If you do not know the Prop. see e.g.: https://planetmath.org/compactlysupportedcontinuousfunctionsaredenseinlp)
My confusion is about the sometimes used notation of density:
$A$ is dense in $X:\iff\bar A = X$
If we use this notation together with twice the Propoistion we get:
$L^p(X) = \overline {C_c(X)} = L^q(X)$ for $1\leq p,q < \infty$
and therefore
$L^p(X) = L^q(X)$ for $1\leq p,q < \infty$
But equality is not given in general (e.g. $L^p$ and $L^q$ space inclusion)
So I guess that the equal symbol in this dense notaion is not the equal symbol itself?
The equal sign is a "true" equal sign.
Your confusion stems from the fact that, for two metric spaces $(X,d)$, $(Y, \widetilde d)$ and $A\subset X\cap Y$, in general the closure of $A$ in $X$ (denoted by $\bar A^X$) and the closure of $A$ in $Y$ (denoted by $\bar A^Y$) need not be the same.*
In fact, if written carefully, your proposition states that $$L^p(X) = \overline {C_c(X)}^{L^p(X)}.$$
So that we have for $p\neq q$:
$$L^p(X) = \overline {C_c(X)}^{L^p(X)} \neq \overline {C_c(X)}^{L^q(X)} = L^q(X).$$
* We have $$\bar A^X :=\bigcap_{\substack{M\subseteq X\\M \text{ closed in} X\\A\subseteq M}} M,\quad \bar A^X :=\bigcap_{\substack{M\subseteq Y\\M \text{ closed in }Y\\A\subseteq M}} M$$