The types are the propositions proved by the proof. The proof is correct <=> the program is soundly typed.