A program using the Curry-Howard isomorphism to check and produce typeset proofs from a proof term