Checking and generating proofs for formulas in propositional logic