I'm glad u asked.
>why don't software engineers just write proofs instead of programs
Well, technically, they do write proofs, since programs are the same thing.
The things is, they usually prove something like:
"given integers x,y, either floor(x/y) is an integer or RuntimeException".
I guess are asking why their proofs almost always prove this extra " or RuntimeException" (and actually there are usually more such terms).
The reason is just that it's easier to not be as precise, at least with the current technology.
For example, if i can use (int)( x*(x+2)/2 ) without having to prove that x*(x+2)/2 is an integer.
There are some languages whose programs really are proofs (e.g. Coq),
but they are more difficult to read and write, have less access to libraries, etc.
I think there should be a way to write safe, yet readable and efficient code,Post too long. Click here to view the full text.