Mathematically, he's correct. However, he's making assumptions that the investments continually go up. There's more risk at that end, than there is risk with the cost of a mortgage from month to month.
To keep the math at a very basic level, it's just the commutative and associative properties at work. Let's say you have an extra $100 dollars. What do you do with it - reduce the mortgage principal by $100, or invest the $100. The compounding is the same - the final realized value of that $100 by paying down the mortgage will be the $100 compounded over the remainder of the loan. The final realized value of the $100 invested is that compounded over, well, the life of the loan to make it an apples to apples comparison. If you're getting more interest than you're paying, you're coming out ahead. Further, many people can deduct the mortgage interest, so there's that working for you as well. (Though, you may have to pay interest on the capital gains, if you go the investment route as well.)