public class InequalityIntroduction extends AbstractClosureRule implements Proof.LinearRule
x < y and y < z then
this rule might infer that x < z. To reduce the number of
unnecessary inferences, the rule is selective about how to determine new
inequalities. Specifically, it relies on a lexiographic ordering of terms and
will only produce inferences for the least ordered term in any given pair of
inequualities.simp, types| Constructor and Description |
|---|
InequalityIntroduction(Simplification simp,
TypeSystem types) |
| Modifier and Type | Method and Description |
|---|---|
Proof.State |
apply(Proof.Delta.Set existingTruths,
Proof.State state,
Formula newTruth) |
Formula |
closeOver(Formula.Inequality ith,
Formula.Inequality jth)
Close over two inequalities.
|
String |
getName()
Get the name of this rule
|
apply, apply, getExistingTruthsextractDefinedTerms, findAllInstances, substituteclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplypublic InequalityIntroduction(Simplification simp, TypeSystem types)
public String getName()
Proof.RulegetName in interface Proof.Rulepublic Proof.State apply(Proof.Delta.Set existingTruths, Proof.State state, Formula newTruth) throws wybs.lang.NameResolver.ResolutionError
apply in class AbstractClosureRulewybs.lang.NameResolver.ResolutionErrorpublic Formula closeOver(Formula.Inequality ith, Formula.Inequality jth) throws wybs.lang.NameResolver.ResolutionError
Close over two inequalities. This may or may not produce a new inequality
as a result. For example, closing over 3 < x and
x < y gives 3 < y. Observe that, for this
operation to succeed, there must exist a term common to both
inequalities. In the case that multiple candidate terms exist, then the
lexiographically least is selected.
This operation always closes in the same direction. If ith is "p1 >= p2" and jth is "p3 >= p4" then it attempts to generate the inequality of the form "p1 >= p4", but never of the form "p4 >= p1". In otherwords, the ith inequality always provides the lower bound and the jth inequality always provides the upper bound.
NOTE: this currently assumes that the inequalities are balanced.ith - jth - wybs.lang.NameResolver.ResolutionErrorCopyright © 2017. All rights reserved.