Yes, but it's possible to verify software in a similar way to mathematical theorems (some theorems in fact are essentially algorithms proven to yield the correct result). The advantage in math is that it has been constructed from a few axioms and every step of the way has been formally verified. For software, I don't think it will be possible to create a fully verified stack of dependencies any time soon (at some point you reach hardware level and you'd have to prove that no software-controlled hardware exploit like Rowhammer is possible), but maybe there exists a reasonable set of axioms upon which provably correct/secure algorithms can be built.