I have a question about the proof of Fatou's Lemma in Rudin's Real and Complex Analysis, 3rd ed, on page 23. I underlined the part that I don't follow in red below:
To prove the lemma, I would have to replace the underlined part by:
Then $g_k \le f_n, \forall n\ge k$, so that $$\int_X g_k d\mu\le \int_X f_n d\mu, \quad \forall n\ge k,$$ and hence $$\int_X g_k d\mu\le \underset{n\ge k}\inf \int_X f_n d\mu.$$
...
Hence (1) follows from (3). (Take the limit on both sides and apply Monotone Convergence on the left.)
My question: What I don't follow is why the author would say "Hence (1) follows from (3)", when (3) is only
$$\int_X g_k d\mu\le \int_X f_k d\mu, \quad(k=1,2,3,\cdots).$$
I'd appreciate it if someone can point out where I missed. Thanks a lot!

It is that $\lim_{k}g_{k}=\liminf_{n}f_{n}$ and we have $\displaystyle\int\lim_{k}g_{k}=\lim_{k}\int g_{k}$ by Monotone Convergence Theorem.
Now $\displaystyle\int g_{k}\leq\int f_{k}$ and taking limit infimum $k\rightarrow\infty$ both sides we have $\liminf_{k}\displaystyle\int g_{k}\leq\liminf_{k}\int f_{k}$. But $\liminf_{k}\displaystyle\int g_{k}=\lim_{k}\int g_{k}$ because the latter limit exists.