Proving $f(n) = O(g(n)) \Rightarrow lg(f(n)) = O(lg(g(n)))$?

360 Views Asked by At

Say you have to prove that $f(n) = O(g(n))$ implies $lg(f(n)) = O(lg(g(n)))$, where $lg(g(n)) \geq 1$ and $f(n) \geq 1$ for all sufficiently large n.

The solution is given as enter image description here

So I do understand the individual parts of the proof. However, I do not understand why we are not done after the $\Rightarrow lg f(n) \leq lg(c g(n)) = lg c + lg (g(n))$?

I mean since we already know that $0 \leq f(n) \leq c g (n)$ is true, doesn't it suffice simply to take the logarithm of the inequality? Why, why not? Why does the solution proceed to additional steps after this?