Formally verified code is not unheard of.
Ideally in practice, that problem is simpler than "Does our code what we want?
In theory in the abstract, of course, the problems are the same.
Formally verified code is not unheard of.