4 Find all functions $f$ from the set of positive integers to the set of real numbers, such that: (1) for any $n \geqslant 1, f(n+1) \geqslant f(n)$; (2) for any $m, n, (m, n)=1$, we have $f(m n)=f(m) f(n) . \quad$ (Supplied by Pan Chengbiao)
Solution: Clearly, $f=0$ is a solution to the problem. Suppose $f \neq 0$, then $f(1) \neq 0$, otherwise for any positive integer $n$ we have $f(n)=f(1) f(n)=0$, which is a contradiction! Thus, we get $f(1)=1$.
From (1), we know $f(2) \geqslant 1$, and there are two cases:
(i) $f(2)=1$, then we can prove
$$
f(n)=1(\forall n) \text {. }
$$

In fact, by (2), $f(6)=f(2) f(3)=f(3)$, let $f(3)=a$, then $a \geqslant 1$. Since $f(3)=f(6)=a$, using (1), we can see that $f(4)=f(5)=a$, and using (2), for any odd number $p$ we have $f(2 p)=f(2)=f(p)$, thus $f(10)=f(5)=a$, and by (1) we get $f(9)=a$, hence $f(18)=a$.
By induction, we can prove
$$
f(n)=a(\forall n \geqslant 3) .
$$

In fact, by assumption, $f(3)=a$. Suppose $3 \leqslant n \leqslant m$ when $f(n)=a$.
If $m$ is odd, then by (2) we get $f(2 m)=a$.
Thus, by (1) we know $f(n)=a(\forall m \leqslant n \leqslant 2 m)$. Clearly, $m+11$. Let $f(2)=2^{a}$, where $a>0$. Let $g(x)=f^{\frac{1}{a}}(x)$, then $g(x)$ satisfies (1) and (2), and $g(1)=1, g(2)=2$. Let $k \geqslant 2$, then by (1) and (2) we get
$$
\begin{aligned}
2 g\left(2^{k-1}-1\right) & =g(2) g\left(2^{k-1}-1\right)=g\left(2^{k}-2\right) \\
& \leqslant g\left(2^{k}\right) \leqslant g\left(2^{k}+2\right) \\
& =g(2) g\left(2^{k-1}+1\right)=2 g\left(2^{k-1}+1\right) ;
\end{aligned}
$$

If $k \geqslant 3$, then
$$
\begin{aligned}
2^{2} g\left(2^{k-2}-1\right) & =2 g\left(2^{k-1}-2\right) \leqslant g\left(2^{k}\right) \\
& \leqslant 2 g\left(2^{k-1}+2\right)=2^{2} g\left(2^{k-2}+1\right) ;
\end{aligned}
$$

By induction, we get
$$
2^{k-1} \leqslant g\left(2^{k}\right) \leqslant 2^{k-1} g(3)(\forall k \geqslant 2) .
$$

Similarly, for any $m \geqslant 3, k \geqslant 2$ we have
$$
g^{k-1}(m) g(m-1) \leqslant g\left(m^{k}\right) \leqslant g^{k-1}(m) g(m+1)
$$

Clearly, when $k=1$, (3) and (4) also hold.
For any $m \geqslant 3, k \geqslant 1$, there must be $s \geqslant 1$ such that $2^{s} \leqslant m^{k}<2^{s+1}$. Then we have $s \leqslant k \log _{2} m<s+1$, i.e.,
$$
k \log _{2} m-1<s \leqslant k \log _{2} m .
$$

By (1), we know $\quad g\left(2^{s}\right) \leqslant g\left(m^{k}\right) \leqslant g\left(2^{s+1}\right)$.
By (3) and (4), we get $\left\{\begin{array}{l}2^{s-1} \leqslant g^{k-1}(m) g(m+1), \\ g^{k-1}(m) g(m-1) \leqslant 2^{s-1} g(3),\end{array}\right.$ i.e.,
$$
\frac{2^{s-1}}{g(m+1)} \leqslant g^{k-1}(m) \leqslant \frac{2^{s-1} g(3)}{g(m-1)},
$$

So $\frac{g(m)}{g(m+1)} \cdot 2^{s-1} \leqslant g^{k}(m) \leqslant \frac{g(m) g(3)}{g(m-1)} \cdot 2^{s-1}$.
By (5), we get
$$
\frac{g(m)}{4 g(m+1)} 2^{k \log _{2} m} \leqslant g^{k}(m) \leqslant \frac{g(m) g(3)}{2 g(m-1)} 2^{k \log _{2} m},
$$

Thus $\sqrt[k]{\frac{g(m)}{4 g(m+1)}} 2^{\log _{2} m} \leqslant g(m) \leqslant \sqrt[k]{\frac{g(m) g(3)}{2 g(m-1)}} 2^{\log _{2} m}$,

i.e.,
$$
\sqrt[k]{\frac{g(m)}{4 g(m+1)}} m \leqslant g(m) \leqslant \sqrt[k]{\frac{g(m) g(3)}{2 g(m-1)}} m .
$$

Let $k \rightarrow+\infty$ we get $g(m)=m$, so $f(m)=m^{a}$.
In summary, $f=0$ or $f(n)=n^{a}(\forall n)$, where $a \geqslant 0$ is a constant.