4 #include "../datastructures/derivation.h"
10 SMTRAT_LOG_TRACE(
"smtrat.cadcells.operators.rules",
"ord_inv(" << poly <<
"), " << poly <<
" nullified");
13 boost::container::flat_set<datastructures::PolyRef> polys({poly});
14 boost::container::flat_set<datastructures::PolyRef> poly_derivative;
15 std::optional<datastructures::PolyRef> poly_nonzero_derivative_of_order;
19 for (
const auto& p : polys) {
24 poly_nonzero_derivative_of_order = d;
25 poly_derivative.clear();
27 poly_derivative.insert(d);
30 if (poly_nonzero_derivative_of_order)
break;
32 if (poly_nonzero_derivative_of_order)
break;
34 if (poly_nonzero_derivative_of_order)
break;
36 assert(!poly_derivative.empty());
37 polys = std::move(poly_derivative);
38 poly_derivative = boost::container::flat_set<datastructures::PolyRef>();
42 assert(*poly_nonzero_derivative_of_order != poly);
44 for (
const auto& p : polys) {
51 SMTRAT_LOG_TRACE(
"smtrat.cadcells.operators.rules",
"ord_inv(" << poly <<
")");
53 SMTRAT_LOG_TRACE(
"smtrat.cadcells.operators.rules",
"-> ord_inv(" << poly <<
") <= " << poly <<
" const");
56 SMTRAT_LOG_TRACE(
"smtrat.cadcells.operators.rules",
"-> ord_inv(" << poly <<
") <= ord_inv(factors(" << poly <<
")) <=> ord_inv(" << factors <<
")");
57 for (
const auto& factor : factors) {
const std::vector< PolyRef > & factors_nonconst(PolyRef p)
PolyRef derivative(PolyRef p, carl::Variable var)
bool is_nullified(const Assignment &sample, PolyRef p)
std::vector< carl::Variable > variables(PolyRef p)
bool is_zero(const Assignment &sample, PolyRef p)
A SampledDerivation is a DelineatedDerivation with a sample and an DelineationInterval w....
const Assignment & sample() const
const Assignment & underlying_sample() const
Implementation of derivation rules.
void poly_irreducible_ord_inv(datastructures::SampledDerivation< P > &deriv, datastructures::PolyRef poly)
void poly_irreducible_ord_inv_nullified(datastructures::SampledDerivation< P > &deriv, const datastructures::PolyRef &poly)
void poly_ord_inv_maybe_null(datastructures::SampledDerivation< P > &deriv, datastructures::PolyRef poly)
#define SMTRAT_LOG_TRACE(channel, msg)
level_t level
The level of the polynomial.