Package mepk.kernel
Class ProofStep
java.lang.Object
mepk.kernel.Proof
mepk.kernel.ProofStep
A proof step is the smallest step in a proof: it shows how to create a new
statement from existing ones. Proof steps are values: they cannot be modified
after they have been created. It is only possible to create an instance using
the static methods in this class.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ProofStepCreate a compose proof step, which unifies the conclusions of the given statements with the hypotheses of the given statementReturn the abbreviations used by this proof.Return the set of statements constructed by this proof from thegroundingstatements.Return the statement constructed by this proof step.Return the set of statements which form the basis of this proof step.getJustificationFor(Statement statement) Return a justification for the given statement.static ProofStepSubstitute(Statement statement, String varName, Expression replacement, Map<String, String> typesOfNewVars) Create a substitution proof step, which takes a statementsand a substitution, and constructs (grounds) the statement resulting from the substitution.static ProofStepWeaken(Statement statement, DVRSet addedDVRs, Expression... addedHypotheses) Create a weakening proof step, which takes a statement and adds hypotheses and DVRs.Methods inherited from class mepk.kernel.Proof
equals, hashCode, verify, verifyStatementsAreJustified
-
Method Details
-
Substitute
public static ProofStep Substitute(Statement statement, String varName, Expression replacement, Map<String, String> typesOfNewVars) Create a substitution proof step, which takes a statementsand a substitution, and constructs (grounds) the statement resulting from the substitution.- Parameters:
statement- the grounding statementvarName- the variable namereplacement- the replacement expressiontypesOfNewVars- the additional type expressions- Returns:
- the created proof step
-
Weaken
public static ProofStep Weaken(Statement statement, DVRSet addedDVRs, Expression... addedHypotheses) Create a weakening proof step, which takes a statement and adds hypotheses and DVRs.- Parameters:
statement- the grounding statementaddedHypotheses- the added hypothesesaddedDVRs- the added DVRs- Returns:
- the created proof step
-
Compose
Create a compose proof step, which unifies the conclusions of the given statements with the hypotheses of the given statement- Parameters:
statement- the statement which is 'applied'statements- the statements to which the statement parameter is 'applied'- Returns:
- the created proof step
-
getGrounding
Return the set of statements which form the basis of this proof step.- Specified by:
getGroundingin classProof- Returns:
- the grounding statements
-
getGrounded1
Return the statement constructed by this proof step.- Returns:
- the grounded statement
-
getGrounded
Description copied from class:ProofReturn the set of statements constructed by this proof from thegroundingstatements.- Specified by:
getGroundedin classProof- Returns:
- the grounded statements
-
getAbbreviations
Description copied from class:ProofReturn the abbreviations used by this proof.- Specified by:
getAbbreviationsin classProof- Returns:
- the abbreviations
-
getJustificationFor
Description copied from class:ProofReturn a justification for the given statement.- Specified by:
getJustificationForin classProof- Parameters:
statement- a statement which is an element ofProof.getGrounded()- Returns:
- either
null, meaning that no justification is necessary becausegetGrounding().contains(statement); or aJustificationwhich gives aproof stepthat constructs the statement, and aproofthat constructs all prerequisites of the proof step.
-