This PR adds proofs for lemmas that introduce bounds on the constant representing pi.
case PfRule::INT_TRUST: return "INT_TRUST";
case PfRule::ARITH_MULT_TANGENT: return "ARITH_MULT_TANGENT";
case PfRule::ARITH_OP_ELIM_AXIOM: return "ARITH_OP_ELIM_AXIOM";
+ case PfRule::ARITH_TRANS_PI: return "ARITH_TRANS_PI";
case PfRule::ARITH_TRANS_SINE_SHIFT: return "ARITH_TRANS_SINE_SHIFT";
//================================================= Unknown rule
case PfRule::UNKNOWN: return "UNKNOWN";
// or 1. tplane is the tangent plane of x*y at (a,b): b*x + a*y - a*b
ARITH_MULT_TANGENT,
+ // ================ Lemmas for transcendentals
+ //======== Assert bounds on PI
+ // Children: none
+ // Arguments: (l, u)
+ // ---------------------
+ // Conclusion: (and (>= real.pi l) (<= real.pi u))
+ // Where l (u) is a valid lower (upper) bound on pi.
+ ARITH_TRANS_PI,
//======== Sine arg shifted to -pi..pi
// Children: none
// Arguments: (x, y, s)
void TranscendentalProofRuleChecker::registerTo(ProofChecker* pc)
{
+ pc->registerChecker(PfRule::ARITH_TRANS_PI, this);
pc->registerChecker(PfRule::ARITH_TRANS_SINE_SHIFT, this);
}
{
Trace("nl-trans-checker") << "\t" << c << std::endl;
}
- if (id == PfRule::ARITH_TRANS_SINE_SHIFT)
+ if (id == PfRule::ARITH_TRANS_PI)
+ {
+ Assert(children.empty());
+ Assert(args.size() == 2);
+ return nm->mkAnd(std::vector<Node>{nm->mkNode(Kind::GEQ, pi, args[0]),
+ nm->mkNode(Kind::LEQ, pi, args[1])});
+ } else if (id == PfRule::ARITH_TRANS_SINE_SHIFT)
{
Assert(children.empty());
Assert(args.size() == 3);
Node pi_lem = nm->mkNode(Kind::AND,
nm->mkNode(Kind::GEQ, d_pi, d_pi_bound[0]),
nm->mkNode(Kind::LEQ, d_pi, d_pi_bound[1]));
- d_im.addPendingArithLemma(pi_lem, InferenceId::NL_T_PI_BOUND);
+ CDProof* proof = nullptr;
+ if (isProofEnabled())
+ {
+ proof = getProof();
+ proof->addStep(
+ pi_lem, PfRule::ARITH_TRANS_PI, {}, {d_pi_bound[0], d_pi_bound[1]});
+ }
+ d_im.addPendingArithLemma(pi_lem, InferenceId::NL_T_PI_BOUND, proof);
}
std::pair<Node, Node> TranscendentalState::getClosestSecantPoints(TNode e,