Example. Let $m, n$ be positive integers, find the minimum value of $\left|12^{m}-5^{n}\right|$.
Solution: First, when $m=n=1$, $\left|12^{m}-5^{n}\right|=7$. The following uses the method of exhaustion to prove that 7 is the minimum value sought.
(1) It is clear that $\left|12^{m}-5^{n}\right|$ is an odd number, and cannot be $2,4,6$.
(2) Noting that $3 \mid 12^{m}, 3 \nmid 5^{n}$ and $5 \nmid 12^{m}$, it is easy to see that $\left|12^{m}-5^{n}\right|$ cannot be 3,5.
(3) If $12^{m}-5^{n}=1$, then $12^{m}-1=5^{n}$. The left side is a multiple of 11 while the right side is not, a contradiction!
(4) If $12^{m}-5^{n}=-1$, then $12^{m}=5^{n}-1$. The last digit of the right side is 4, and the last digit of the left side corresponds to $m=1$, $2,3,4,5,6,7, \cdots$ as $2,4,8,6,2,4,8, \cdots$, so there should be $m=4 k+2$, which means $144^{2 k+1}+1$ $=5^{n}$. But $145 \mid 144^{2 k+1}+1$, and $145 \nmid 5^{n}$. Contradiction!
In summary, the minimum value sought is 7.