#include <arith_proof_rules.h>
Inheritance diagram for CVC3::ArithProofRules:
Definition at line 33 of file arith_proof_rules.h.
virtual CVC3::ArithProofRules::~ArithProofRules | ( | ) | [inline, virtual] |
Definition at line 36 of file arith_proof_rules.h.
==> -(e) = (-1) * e
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::canon(), and CVC3::TheoryArithNew::canon().
virtual Theorem CVC3::ArithProofRules::minusToPlus | ( | const Expr & | x, | |
const Expr & | y | |||
) | [pure virtual] |
==> x - y = x + (-1) * y
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::canon(), and CVC3::TheoryArithNew::canon().
-(e) ==> e / (-1); takes 'e'
Canon Rule for unary minus: it just converts it to division by -1, the result is not yet canonical:
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Transform e = (SUM r t1 ... tn) @ 0 into (SUM t1 ... tn) @ -r. The first sum term (r) must be a rational and t1 ... tn terms must be canonised.
e | the expression to transform |
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
virtual Theorem CVC3::ArithProofRules::canonDivideConst | ( | const Expr & | c, | |
const Expr & | d | |||
) | [pure virtual] |
(c) / d ==> (c/d), takes c and d
Canon Rules for division by constant 'd'
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
virtual Theorem CVC3::ArithProofRules::canonDivideMult | ( | const Expr & | cx, | |
const Expr & | d | |||
) | [pure virtual] |
(c * x) / d ==> (c/d) * x, takes (c*x) and d
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
virtual Theorem CVC3::ArithProofRules::canonDividePlus | ( | const Expr & | e, | |
const Expr & | d | |||
) | [pure virtual] |
(+ c ...)/d ==> push division to all the coefficients.
The result is not canonical, but canonizing the summands will make it canonical. Takes (+ c ...) and d
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
virtual Theorem CVC3::ArithProofRules::canonDivideVar | ( | const Expr & | e, | |
const Expr & | d | |||
) | [pure virtual] |
x / d ==> (1/d) * x, takes x and d
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Canonize (PLUS t1 ... tn).
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::canon(), CVC3::TheoryArithNew::canon(), CVC3::TheoryArithNew::getLowerBoundExplanation(), CVC3::TheoryArithNew::getUpperBoundExplanation(), and CVC3::TheoryArithNew::rewrite().
Canonize (MULT t1 ... tn).
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::canon(), and CVC3::TheoryArithNew::canon().
==> 1/e = e' where e' is canonical; takes e.
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Canonize t1/t2.
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::canon(), and CVC3::TheoryArithNew::canon().
virtual Theorem CVC3::ArithProofRules::canonMultTermConst | ( | const Expr & | c, | |
const Expr & | t | |||
) | [pure virtual] |
t*c ==> c*t, takes constant c and term t
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithNew::getLowerBoundExplanation(), and CVC3::TheoryArithNew::getUpperBoundExplanation().
virtual Theorem CVC3::ArithProofRules::canonMultTerm1Term2 | ( | const Expr & | t1, | |
const Expr & | t2 | |||
) | [pure virtual] |
t1*t2 ==> Error, takes t1 and t2 where both are non-constants
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
virtual Theorem CVC3::ArithProofRules::canonMultConstConst | ( | const Expr & | c1, | |
const Expr & | c2 | |||
) | [pure virtual] |
c1*c2 ==> c', takes constant c1*c2
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithNew::getLowerBoundExplanation(), and CVC3::TheoryArithNew::getUpperBoundExplanation().
virtual Theorem CVC3::ArithProofRules::canonMultConstTerm | ( | const Expr & | c1, | |
const Expr & | c2, | |||
const Expr & | t | |||
) | [pure virtual] |
c1*(c2*t) ==> c'*t, takes c1 and c2 and t
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
virtual Theorem CVC3::ArithProofRules::canonMultConstSum | ( | const Expr & | c1, | |
const Expr & | sum | |||
) | [pure virtual] |
c1*(+ c2 v1 ...) ==> (+ c' c1v1 ...), takes c1 and the sum
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
c^n = c' (compute the constant power expression)
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::canon(), and CVC3::TheoryArithNew::canon().
flattens the input. accepts a PLUS expr
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
combine like terms. accepts a flattened PLUS expr
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
e0 @ e1 <==> true | false, where @ is {=,<,<=,>,>=}
e | takes e is (e0@e1) where e0 and e1 are constants |
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::doSolve(), CVC3::TheoryArithNew::doSolve(), CVC3::TheoryArithOld::isolateVariable(), CVC3::TheoryArithOld::normalizeProjectIneqs(), CVC3::TheoryArithOld::rewrite(), and CVC3::TheoryArithNew::rewrite().
e[0] @ e[1] <==> 0 @ e[1] - e[0], where @ is {=,<,<=,>,>=}
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::addToBuffer(), CVC3::TheoryArithNew::addToBuffer(), CVC3::TheoryArithOld::doSolve(), CVC3::TheoryArithNew::doSolve(), CVC3::TheoryArithOld::normalizeProjectIneqs(), CVC3::TheoryArithOld::rewrite(), and CVC3::TheoryArithNew::rewrite().
e[0] @ e[1] <==> e[0] - e[1] @ 0, where @ is {=,<,<=,>,>=}
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
virtual Theorem CVC3::ArithProofRules::plusPredicate | ( | const Expr & | x, | |
const Expr & | y, | |||
const Expr & | z, | |||
int | kind | |||
) | [pure virtual] |
x @ y <==> x + z @ y + z, where @ is {=,<,<=,>,>=} (given as 'kind')
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::isolateVariable(), CVC3::TheoryArithNew::pivotRule(), CVC3::TheoryArithOld::processRealEq(), CVC3::TheoryArithNew::processRealEq(), CVC3::TheoryArithOld::processSimpleIntEq(), CVC3::TheoryArithNew::processSimpleIntEq(), and CVC3::TheoryArithNew::rewrite().
virtual Theorem CVC3::ArithProofRules::multEqn | ( | const Expr & | x, | |
const Expr & | y, | |||
const Expr & | z | |||
) | [pure virtual] |
x = y <==> x * z = y * z, where z is a non-zero constant
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::normalize(), CVC3::TheoryArithNew::pivotRule(), CVC3::TheoryArithOld::processRealEq(), CVC3::TheoryArithNew::processRealEq(), CVC3::TheoryArithOld::processSimpleIntEq(), and CVC3::TheoryArithNew::processSimpleIntEq().
Multiplying inequation by a non-zero constant.
z>0 ==> e[0] @ e[1] <==> e[0]*z @ e[1]*z
z<0 ==> e[0] @ e[1] <==> e[1]*z @ e[0]*z
for @ in {<,<=,>,>=}:
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithNew::getLowerBoundExplanation(), CVC3::TheoryArithNew::getUpperBoundExplanation(), CVC3::TheoryArithOld::isolateVariable(), CVC3::TheoryArithOld::normalize(), CVC3::TheoryArithNew::normalize(), CVC3::TheoryArithOld::normalizeProjectIneqs(), CVC3::TheoryArithOld::processFiniteInterval(), and CVC3::TheoryArithNew::processFiniteInterval().
x = y ==> x <= y and x >= y
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithNew::rewrite().
"op1 GE|GT op2" <==> op2 LE|LT op1
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::rewrite().
Propagating negation over <,<=,>,>=.
NOT (op1 < op2) <==> (op1 >= op2)
NOT (op1 <= op2) <==> (op1 > op2)
NOT (op1 > op2) <==> (op1 <= op2)
NOT (op1 >= op2) <==> (op1 < op2)
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::assertFact(), CVC3::TheoryArithOld::rewrite(), and CVC3::TheoryArithNew::rewrite().
virtual Theorem CVC3::ArithProofRules::realShadow | ( | const Theorem & | alphaLTt, | |
const Theorem & | tLTbeta | |||
) | [pure virtual] |
Real shadow: a <(=) t, t <(=) b ==> a <(=) b.
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::normalizeProjectIneqs().
virtual Theorem CVC3::ArithProofRules::realShadowEq | ( | const Theorem & | alphaLEt, | |
const Theorem & | tLEalpha | |||
) | [pure virtual] |
Projecting a tight inequality: alpha <= t <= alpha ==> t = alpha.
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::normalizeProjectIneqs().
virtual Theorem CVC3::ArithProofRules::finiteInterval | ( | const Theorem & | aLEt, | |
const Theorem & | tLEac, | |||
const Theorem & | isInta, | |||
const Theorem & | isIntt | |||
) | [pure virtual] |
Finite interval for integers: a <= t <= a + c ==> G(t, a, 0, c).
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::processFiniteInterval(), and CVC3::TheoryArithNew::processFiniteInterval().
virtual Theorem CVC3::ArithProofRules::darkGrayShadow2ab | ( | const Theorem & | betaLEbx, | |
const Theorem & | axLEalpha, | |||
const Theorem & | isIntAlpha, | |||
const Theorem & | isIntBeta, | |||
const Theorem & | isIntx | |||
) | [pure virtual] |
Dark & Gray shadows when a <= b.
takes two integer ineqs (i.e. all vars are ints) "|- beta <= b.x" and "|- a.x <= alpha" and checks if "1 <= a <= b" and returns (D or G) and (!D or !G), where D = Dark_Shadow(ab-1, b.alpha - a.beta), G = Gray_Shadow(a.x, alpha, -(a-1), 0).
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::normalizeProjectIneqs().
virtual Theorem CVC3::ArithProofRules::darkGrayShadow2ba | ( | const Theorem & | betaLEbx, | |
const Theorem & | axLEalpha, | |||
const Theorem & | isIntAlpha, | |||
const Theorem & | isIntBeta, | |||
const Theorem & | isIntx | |||
) | [pure virtual] |
Dark & Gray shadows when b <= a.
takes two integer ineqs (i.e. all vars are ints) "|- beta <= b.x" and "|- a.x <= alpha" and checks if "1 <= b < a" and returns (D or G) and (!D or !G), where D = Dark_Shadow(ab-1, b.alpha - a.beta), G = Gray_Shadow(b.x, beta, 0, b-1).
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::normalizeProjectIneqs().
virtual Theorem CVC3::ArithProofRules::expandDarkShadow | ( | const Theorem & | darkShadow | ) | [pure virtual] |
DARK_SHADOW(t1, t2) ==> t1 <= t2.
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::assertFact().
GRAY_SHADOW(v, e, c, c) ==> v=e+c.
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::assertFact().
G(x, e, c1, c2) ==> (G1 or G2) and (!G1 or !G2).
Here G1 = G(x,e,c1,c), G2 = G(x,e,c+1,c2), and c = floor((c1+c2)/2).
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::assertFact().
G(x, e, c1, c2) ==> e+c1 <= x AND x <= e+c2.
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::assertFact().
Optimized rules: GRAY_SHADOW(a*x, c, c1, c2) ==> [expansion].
Implements three versions of the rule:
where the conclusion may become FALSE or without the GRAY_SHADOW part, depending on the values of a, c and i.
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
|- G(ax, c, c1, c2) ==> |- G(x, 0, ceil((c1+c)/a), floor((c2+c)/a))
In the case the new c1 > c2, return |- FALSE
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::assertFact().
virtual Theorem CVC3::ArithProofRules::lessThanToLE | ( | const Theorem & | less, | |
const Theorem & | isIntLHS, | |||
const Theorem & | isIntRHS, | |||
bool | changeRight | |||
) | [pure virtual] |
a,b: INT; a < b ==> a <= b-1 [or a+1 <= b]
Takes a Theorem(\alpha < \beta) and returns Theorem(\alpha < \beta <==> \alpha <= \beta -1) or Theorem(\alpha < \beta <==> \alpha + 1 <= \beta), depending on which side must be changed (changeRight flag)
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::projectInequalities().
virtual Theorem CVC3::ArithProofRules::intVarEqnConst | ( | const Expr & | eqn, | |
const Theorem & | isIntx | |||
) | [pure virtual] |
eqn | is an equation 0 = a.x or 0 = c + a.x, where x is integer | |
isIntx | is a proof of IS_INTEGER(x) |
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::processSimpleIntEq(), and CVC3::TheoryArithNew::processSimpleIntEq().
virtual Theorem CVC3::ArithProofRules::eqElimIntRule | ( | const Theorem & | eqn, | |
const Theorem & | isIntx, | |||
const std::vector< Theorem > & | isIntVars | |||
) | [pure virtual] |
Equality elimination rule for integers:
See the detailed description for explanations.
See detailed docs for more information.
This rule implements a step in the iterative algorithm for eliminating integer equality. The terms in the rule are defined as follows:
All the variables and coefficients are integer, and a >= 2.
eqn | is the equation ax=t:
| |
isIntx | is a Theorem deriving the integrality of the LHS variable: IS_INTEGER(x) | |
isIntVars | is a vector of Theorems deriving the integrality of all variables on the RHS |
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::processSimpleIntEq(), and CVC3::TheoryArithNew::processSimpleIntEq().
return e <=> TRUE/FALSE for e == IS_INTEGER(c), where c is a constant
e | is a predicate IS_INTEGER(c) where c is a rational constant |
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
x /= y ==> (x < y) OR (x > y)
Used in concrete model generation
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithOld::checkSat().
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithNew::rewrite().
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithNew::assertFact(), and CVC3::TheoryArithNew::pivotRule().
virtual Theorem CVC3::ArithProofRules::addInequalities | ( | const Theorem & | thm1, | |
const Theorem & | thm2 | |||
) | [pure virtual] |
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithNew::getLowerBoundExplanation(), and CVC3::TheoryArithNew::getUpperBoundExplanation().
virtual Theorem CVC3::ArithProofRules::implyWeakerInequality | ( | const Expr & | expr1, | |
const Expr & | expr2 | |||
) | [pure virtual] |
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithNew::propagateTheory().
virtual Theorem CVC3::ArithProofRules::implyNegatedInequality | ( | const Expr & | expr1, | |
const Expr & | expr2 | |||
) | [pure virtual] |
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithNew::propagateTheory().
virtual Theorem CVC3::ArithProofRules::integerSplit | ( | const Expr & | intVar, | |
const Rational & | intPoint | |||
) | [pure virtual] |
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithNew::checkSatInteger().
virtual Theorem CVC3::ArithProofRules::trustedRewrite | ( | const Expr & | expr1, | |
const Expr & | expr2 | |||
) | [pure virtual] |
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
virtual Theorem CVC3::ArithProofRules::rafineStrictInteger | ( | const Theorem & | isIntConstrThm, | |
const Expr & | constr | |||
) | [pure virtual] |
Implemented in CVC3::ArithTheoremProducer, and CVC3::ArithTheoremProducerOld.
Referenced by CVC3::TheoryArithNew::rafineIntegerConstraints().