Formalizing the Curry-Howard Correspondence