Is there any formal method to prove that one problem belongs to Complexity Class $\mathbb{P}$?
For example, how can we prove that the problem of finding $n^k$ belongs to Class $\mathbb{P}$? We can use the fact that each multiplication can be done in unit time.
If you present an algorithm that can solve this problem with $\mathcal{O} (\log n)$ time, can it be a proof?