4. If $f(x)=x+1, x \in(-\infty, a]$ is a solution to the functional inequality $f(x+y) \leqslant 2 f(x)-3 f(y)$, then the range of the real number $a$ is
A. $\{-2\}$
B. $(-\infty,-2]$
C. $[-2,+\infty)$
D. $\mathbf{R}$
4. B Substituting $f(x)=x+1$ into the given functional inequality, we get
$$
x+y+1 \leqslant 2(x+1)-3(y+1) .
$$

which simplifies to $x-4 y-2 \geqslant 0$.
Solving the system of equations $\left\{\begin{array}{l}y=x+1, \\ x-4 y-2=0 .\end{array}\right.$ yields $x=-2$.

Therefore, $a \leqslant-2$, so the answer is B.