Skip to content

Commit

Permalink
implemented check function similar to prove
Browse files Browse the repository at this point in the history
but does not return Proof
  • Loading branch information
Vipul-Cariappa committed Oct 24, 2023
1 parent ce6d217 commit 6de64da
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions logic/proof.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,17 @@ def prove(self, to_prove: Statement) -> tuple[Proof, bool]:

return self._prove_decomposed_conclusion(to_prove)

def check(self, statement: Statement) -> bool:
"""Checks if the given statement is True in the given environment
Args:
statement (Statement): Statement to check the truth value of
Returns:
bool: True if it can be proved to be true, otherwise False
"""
return self.prove(statement)[-1]


def prove(
assumptions: Assumption | Sequence[Statement], conclusion: Statement
Expand Down

0 comments on commit 6de64da

Please sign in to comment.