Prove that $C(\mathbb{R})$ is not separable. Let $C(\mathbb{R})$ be the set of continuous bounded functions defined on $\mathbb{R}$ and the metric $d(f,g) = \text{sup}_{t\in\mathbb{R}}|f-g|$.
Prove that $C(\mathbb{R})$ is not separable.
May I know if my proof is correct?
Let $A=$ set of all continuous tent functions $f:\mathbb{R} \to [0,1]$ such that $f(n) = 0$ or $1,$ if $n$ is natural number. Then $\{f_{\restriction_{\mathbb{N}}}: f \in A \}$ has same cardinality as $2^{\mathbb{N}}$, so $A$ is uncountable.
Now, given $f, g\in A, d(f,g) = 1$ and $B(f,0.3) \cap B(g,0.3) = \emptyset$ whenever $f\neq g$. Why? Suppose there exists $h\in B(f,0.3) \cap B(g,0.3),$ then $1= d(f,g) \leq d(f,h) + d(h,g) < 0.6. $ Contradiction.
Since there are uncountably many such balls and if there exists a dense subset of $C(\mathbb{R}),$ it must intersect uncountably many such balls. Contradiction.
Thank you.
 A: Right general thrust, but you're being too lazy/sloppy in the details.
I think you should define $A$ in more detail. As it stands, the "set of piecewise continuous functions bounded by $1$ such that $f(n) = 0$ or $1$ if $n$ is a natural number" does not produce the isolated points that you claim later in the proof. As written, for any $\varepsilon \in (0, 1)$, you would have
$$f(x) = \begin{cases} 0 & \text{if } |x| \ge \varepsilon \\ 1 - x/\varepsilon & \text{if }0 \le x < \varepsilon \\ 1 + x/\varepsilon & \text{if } -\varepsilon<x<0,\end{cases}$$
as this function is continuous everywhere, and $f(n) \in \{0, 1\}$ for all natural numbers $n$. Note that these functions do not remain distance at least $1/2$ from each other!
Further, I think rather than "piecewise continuous", you mean "piecewise linear", and simply restricting to the natural numbers means all sorts of shenanigans can occur on the negative real axis (and, as I was trying to demonstrate above, between the integers too).
You also write $\{f(\mathbb{N}): f \in \mathbb{N}\}$, which doesn't make sense. I presume you meant to write $\{f(\mathbb{N}): f \in A\}$, but even then, $f(\Bbb{N})$ can only equal $\{0\}$, $\{1\}$, or $\{0, 1\}$ by assumption. What you really want is $A$ to be uncountable, and you want to show it's uncountable by injecting into it a known uncountable set, presumably the power set of the natural numbers.
Another small issue is that an uncountable number of balls is not quite enough to show inseparability. You need to show that the balls are pairwise disjoint. For example, in $\Bbb{R}$, the sets $\{(-a, a) : a \in \Bbb{R}\}$ are uncountable, but $\Bbb{R}$ is still separable.
So, you should define more rigorously exactly which functions are contained in $A$, and show more precisely that $A$ is uncountable. Here's the way I'd do it:
Define a map $\phi : \mathcal{P}(\Bbb{N}) \to \{0, 1\}^\Bbb{N}$ by
$$\phi(S) : n \mapsto \begin{cases} 1 & \text{if } n \in S \\ 0 & \text{if } n \notin S. \end{cases}$$
Show that this map is injective. Then, for any $S$, define the function
$$f_S(x) = \begin{cases} 0 & \text{if } x < 0 \\ \phi(S)(x) & \text{if } x \in \Bbb{N} \\ (x - \lfloor x \rfloor)\phi(S)(\lfloor x \rfloor) + (\lceil x \rceil - x)\phi(S)(\lceil x \rceil) & \text{otherwise}. \end{cases}$$
Proving its bounded by $1$ is straightforward enough. Continuity is a little less straight forward; you can show it without much difficulty for $x \notin \Bbb{N}$, as it is locally equal to a linear polynomial. For $x \in \Bbb{N}$, you'll have to do a left and right limit argument.
You also need to show that $S \mapsto f_S$ is injective, and thus conclude that $\{f_S : S \subseteq \Bbb{N}\}$ is uncountable. Finally, you need to show that $S_1 \neq S_2 \implies \|f_{S_1} - f_{S_2}\|_\infty \ge 1$, so that the balls of radius $1/2$ fail to intersect. This should be easy enough: look for a point $n$ in $S_1$ but not in $S_2$, or vice-versa, and compute $|f_{S_1}(n) - f_{S_2}(n)|$.
So, there's a bit of work to do. It's ok to gloss over this work when a) you understand exactly what you're glossing over and how you'd write out the details, and b) when the reader would not be interested and could fill in the tedious details themself. The errors in your write-up suggest to me that a) does not apply to you, and you should write out the details.
A: With the additional condition of "tent function", this seems to work.

edit for your second proof:
(i) The new idea is to find an uncountable collection of disjoints open subsets of $\mathbb{C}(\mathbb{R})$. A dense subset would then intersect all of these open subsets, hence has uncountable cardinal. I believe this is true.
How ever the collection of subsets you chose doesn't work, because:
(ii)

Now, given $f,g\in A,d(f,g)=1$

Here are two functions $f,g\in A$ with the distance $d(f,g)$<1. It can be done for any $\varepsilon>0$.

(iii) The other answer gives a detailed construction of such a collection of open subsets, given by $\{B_{1/2}(f_S), S\subset\mathbb{N}\}$. Of course there exist other such collections.

(i) $B(f,0.5)$ surely contains elements different from $f$. We can choose such element inside the set $A$.

(ii) Your idea is to find isolated points and to use them to prove separability.
(a) There is no isolated point in $\mathcal{C}(\mathbb{R})$: choose any $\varepsilon>0$ and a function $f$. Then $f+\frac{\varepsilon}{2}$ is another function different from $f$ and contained in the ball $B(f,\varepsilon)$.
(b) Suppose $X$ is a metric space with uncountably many isolated points. Then any dense subset have to contain all these isolated points. Hence $X$ is not separable. This works!
I suggest that you find another method to apply to $\mathcal{C}(\mathbb{R})$, and that you note down your idea on isolated points somewhere for further usage.
