That's what seperates them both, it's not about immediate formal checking from a compiler here, but rather if our proof is being justified adequately according with the rules of deduction and reasoning, it's a more intuitive approach in math, although you do end up knowing whether something is right or wrong, akin to programs.
That is 100% true.
Obviously the code needs to be self-contained (not calling into other unknown code) but so do mathematical proofs.