| 1 | /****************************************************************************** |
| 2 | * Top contributors (to current version): |
| 3 | * Andrew Reynolds, Gereon Kremer, Aina Niemetz |
| 4 | * |
| 5 | * This file is part of the cvc5 project. |
| 6 | * |
| 7 | * Copyright (c) 2009-2025 by the authors listed in the file AUTHORS |
| 8 | * in the top-level source directory and their institutional affiliations. |
| 9 | * All rights reserved. See the file COPYING in the top-level source |
| 10 | * directory for licensing information. |
| 11 | * **************************************************************************** |
| 12 | * |
| 13 | * Proof checker utility for transcendental solver. |
| 14 | */ |
| 15 | |
| 16 | #include "cvc5_private.h"cxx . . $ `<file>/src/include/cvc5_private.h`/ |
| 17 | |
| 18 | #ifndef CVC5__THEORY__ARITH__NL__TRANSCENDENTAL__PROOF_CHECKER_H |
| 19 | #define CVC5__THEORY__ARITH__NL__TRANSCENDENTAL__PROOF_CHECKER_Hcxx . . $ `src/theory/arith/nl/transcendental/proof_checker.h:19:9`! |
| 20 | |
| 21 | #include "expr/node.h"cxx . . $ `<file>/src/expr/node.h`/ |
| 22 | #include "proof/proof_checker.h"cxx . . $ `<file>/src/proof/proof_checker.h`/ |
| 23 | #include "proof/proof_node.h"cxx . . $ `<file>/src/proof/proof_node.h`/ |
| 24 | |
| 25 | namespace cvc5cxx . . $ cvc5/::internalcxx . . $ cvc5/internal/ { |
| 26 | namespace theorycxx . . $ cvc5/internal/theory/ { |
| 27 | namespace arithcxx . . $ cvc5/internal/theory/arith/ { |
| 28 | namespace nlcxx . . $ cvc5/internal/theory/arith/nl/ { |
| 29 | namespace transcendentalcxx . . $ cvc5/internal/theory/arith/nl/transcendental/ { |
| 30 | |
| 31 | /** |
| 32 | * A checker for NlExt proofs |
| 33 | * |
| 34 | * This proof checker takes care of all proofs for lemmas from the |
| 35 | * transcendental subsolver. |
| 36 | */ |
| 37 | class TranscendentalProofRuleCheckercxx . . $ cvc5/internal/theory/arith/nl/transcendental/TranscendentalProofRuleChecker# : public ProofRuleCheckercxx . . $ cvc5/internal/ProofRuleChecker# |
| 38 | { |
| 39 | public: |
| 40 | TranscendentalProofRuleCheckercxx . . $ cvc5/internal/theory/arith/nl/transcendental/TranscendentalProofRuleChecker#TranscendentalProofRuleChecker(8586e3cf9cf7e9ae).(NodeManagercxx . . $ cvc5/internal/NodeManager#* nm); |
| 41 | |
| 42 | /** Register all rules owned by this rule checker in pc. */ |
| 43 | void registerTocxx . . $ cvc5/internal/theory/arith/nl/transcendental/TranscendentalProofRuleChecker#registerTo(e5a64338032b20a8).(ProofCheckercxx . . $ cvc5/internal/ProofChecker#* pc) override; |
| 44 | |
| 45 | protected: |
| 46 | /** Return the conclusion of the given proof step, or null if it is invalid */ |
| 47 | Nodecxx . . $ cvc5/internal/Node# checkInternalcxx . . $ cvc5/internal/theory/arith/nl/transcendental/TranscendentalProofRuleChecker#checkInternal(a66a798bd1cf42b8).(ProofRule id, |
| 48 | const stdcxx . . $ std/::vectorcxx . . $ std/vector#<Nodecxx . . $ cvc5/internal/Node#>& children, |
| 49 | const stdcxx . . $ std/::vectorcxx . . $ std/vector#<Nodecxx . . $ cvc5/internal/Node#>& args) override; |
| 50 | /** |
| 51 | * Helper method to construct a bounds constraint (t >= lb) AND (t <= up) |
| 52 | * for a given term `t`. |
| 53 | * |
| 54 | * @param t The given term `t`. |
| 55 | * @param lb The lower bound `lb` in the formula above. |
| 56 | * @param ub The upper bound `ub` in the formula above. |
| 57 | * @return The bounds constraint as the formula of the form above. |
| 58 | */ |
| 59 | Nodecxx . . $ cvc5/internal/Node# mkBoundscxx . . $ cvc5/internal/theory/arith/nl/transcendental/TranscendentalProofRuleChecker#mkBounds(9cd3cb70237198cc).(TNodecxx . . $ cvc5/internal/TNode# t, TNodecxx . . $ cvc5/internal/TNode# lb, TNodecxx . . $ cvc5/internal/TNode# ub); |
| 60 | /** |
| 61 | * Helper method to construct a secant plane: |
| 62 | * evall + ((evall - evalu) / (l - u)) * (t - l). |
| 63 | * Used for ProofRule::ARITH_TRANS_EXP_APPROX_ABOVE_POS and |
| 64 | * ProofRule::ARITH_TRANS_EXP_APPROX_ABOVE_NEG. |
| 65 | * |
| 66 | * @param t The term `t` in the above formula. |
| 67 | * @param l The term `l` in the above formula. |
| 68 | * @param u The term `u` in the above formula. |
| 69 | * @param evall The term `evall` in the above formula. |
| 70 | * @param evalu The term in `evalu` the above formula. |
| 71 | * @return The formula of the form above. |
| 72 | */ |
| 73 | Nodecxx . . $ cvc5/internal/Node# mkSecantcxx . . $ cvc5/internal/theory/arith/nl/transcendental/TranscendentalProofRuleChecker#mkSecant(a3c6cc03947bf8a3).(TNodecxx . . $ cvc5/internal/TNode# t, TNodecxx . . $ cvc5/internal/TNode# l, TNodecxx . . $ cvc5/internal/TNode# u, TNodecxx . . $ cvc5/internal/TNode# evall, TNodecxx . . $ cvc5/internal/TNode# evalu); |
| 74 | }; |
| 75 | |
| 76 | } // namespace transcendental |
| 77 | } // namespace nl |
| 78 | } // namespace arith |
| 79 | } // namespace theory |
| 80 | } // namespace cvc5::internal |
| 81 | |
| 82 | #endif /* CVC5__THEORY__STRINGS__PROOF_CHECKER_H */ |