Find the weak topology on R generated by the family of all constant functions.
$$ f: \mathbb R\to\mathbb R. $$
I solve like below subbasis of weak topology is $ \left\{f^{(-1)}(U) : U ~\textrm{open}~\mathbb R\right\}.$ Let $f(x)=a, $ then $f$ is constant function.
Then $f^{(-1)}(a)=\mathbb R, $ $f^{-1}(x)=\textrm{empty set}$ where $x$ is not $a.$
Then Basis of topology is empty set cause basis is consisted of finite intersection of members in subbasis.
finally topology is trivial topology.
Is that right?
In fact, I have no idea with it. Especially with the term "the family of all constant functions".
The topology $\tau$ on $\mathbb R$ that you are looking for is by definition the coarsest topology on $\mathbb R$ such that every constant function $f:\mathbb R\to\mathbb R$ is continuous when the domain $\mathbb R$ is equipped with topology $\tau$ and the codomain $\mathbb R$ is equipped with its usual topology.
Fact is that constant functions are always continuous, which is easy to check. So evidently the coarsest topology on $\mathbb R$ that you can get will do. That is indeed the trivial indiscrete topology $\tau=\{\varnothing,\mathbb R\}$.
This fact makes it somehow unnecessary to immerse oneself into the collection of preimages under constant functions of elements of a (sub)base.