Semantics of proofs and certified mathematics