def prove_tautology(tautology: Formula) -> Proof: """Proves the given predicate-logic tautology. Parameters: tautology: predicate-logic tautology to prove. Returns: A valid proof of the given predicate-logic tautology from the axioms `PROPOSITIONAL_AXIOMATIC_SYSTEM_SCHEMAS` via only assumption lines and MP lines. """ assert is_propositional_tautology(tautology.propositional_skeleton()[0]) # Task 9.12 skeleton, m = tautology.propositional_skeleton() skeleton_proof = prove_propositional_tautology(skeleton) return prove_from_skeleton_proof(tautology, skeleton_proof, m)
def prove_tautology(tautology: Formula) -> Proof: """Proves the given predicate-logic tautology. Parameters: tautology: predicate-logic tautology to prove. Returns: A valid proof of the given predicate-logic tautology from the axioms `PROPOSITIONAL_AXIOMATIC_SYSTEM_SCHEMAS` via only assumption lines and MP lines. """ assert is_propositional_tautology(tautology.propositional_skeleton()[0]) propositional_tautology, sub_map = tautology.propositional_skeleton() proof_to_convert = prove_propositional_tautology(propositional_tautology) proof = _prove_from_skeleton_proof(tautology, proof_to_convert, sub_map) return proof