def do_load(session: engine.Session, filename: str): """Loads a saved proof Arguments: - filename [str] """ try: ret = session.load_proof(filename) for i in session.proof.nodes.getbranchnames(): session.deal_closure(i) return ret except EngineError as e: return e
def do_contra(session: engine.Session, branch: str) -> str: """Detects contradictions and handles them by closing their branches""" cont = session.deal_closure(branch) if cont: return cont else: return f"No contradictions found on branch {branch}."