8     SMTRAT_LOG_TRACE(
"smtrat.cadcells.operators.rules", 
"delineable_interval start");
 
    9     auto subderiv = datastructures::make_derivation<PropertiesSet>(proj, sample, sample.size()).sampled_ref();
 
   10     for (
const auto& poly : polys) {
 
   14     for(
const auto& prop : subderiv->template properties<properties::poly_del>()) {
 
   17     for(
const auto& prop : subderiv->template properties<properties::poly_ord_inv>()) {
 
   20     for(
const auto& prop : subderiv->template properties<properties::poly_sgn_inv>()) {
 
   23     for(
const auto& prop : subderiv->template properties<properties::poly_irreducible_sgn_inv>()) {
 
   26     subderiv->delineate_cell();
 
   27     SMTRAT_LOG_TRACE(
"smtrat.cadcells.operators.rules", 
"delineable_interval end; got " << subderiv->cell());
 
   29     if (subderiv->cell().is_section()) {
 
   30         return carl::Interval<RAN>(subderiv->cell().lower()->first);
 
   32         return carl::Interval<RAN>(subderiv->cell().lower_unbounded() ? 
RAN(0) : subderiv->cell().lower()->first, subderiv->cell().lower_unbounded() ? carl::BoundType::INFTY : carl::BoundType::STRICT, subderiv->cell().upper_unbounded() ? 
RAN(0) : subderiv->cell().upper()->first, subderiv->cell().upper_unbounded() ? carl::BoundType::INFTY : carl::BoundType::STRICT);
 
   38     SMTRAT_LOG_TRACE(
"smtrat.cadcells.operators.rules", 
"delineable_interval_roots start");
 
   39     auto subderiv = datastructures::make_derivation<P>(deriv.
proj(), deriv.
sample(), deriv.
level()).sampled_ref();
 
   40     for (
const auto& poly : polys) {
 
   44     for(
const auto& prop : subderiv->template properties<properties::poly_del>()) {
 
   50     for(
const auto& prop : subderiv->template properties<properties::poly_ord_inv>()) {
 
   53     for(
const auto& prop : subderiv->template properties<properties::poly_sgn_inv>()) {
 
   56     for(
const auto& prop : subderiv->template properties<properties::poly_irreducible_sgn_inv>()) {
 
   59     SMTRAT_LOG_TRACE(
"smtrat.cadcells.operators.rules", 
"delineable_interval_roots end; got " << subderiv->delin());
 
   61     for (
const auto& [k,v] : subderiv->delin().roots()) {
 
   63             assert(!ir.is_optional);
 
   64             assert(!ir.is_inclusive);
 
   78     SMTRAT_LOG_TRACE(
"smtrat.cadcells.operators.rules", 
"filter_roots " << poly);
 
   82         if (factor.level == deriv.
level()) {
 
   84                 SMTRAT_LOG_TRACE(
"smtrat.cadcells.operators.rules", 
"-> nullified: " << factor);
 
   89                     SMTRAT_LOG_TRACE(
"smtrat.cadcells.operators.rules", 
"-> nonzero: " << factor);
 
   92                     SMTRAT_LOG_TRACE(
"smtrat.cadcells.operators.rules", 
"-> got roots: " << roots);
 
   93                     for (
size_t idx = 0; idx < roots.size(); idx++) {
 
  101     for (
const auto& entry : root_map) {
 
  102         SMTRAT_LOG_TRACE(
"smtrat.cadcells.operators.rules", 
"considering root " << entry);
 
  104         switch (filter_condition(entry.first)) {
 
  106             for (
const auto& ir : entry.second) {
 
  112             for (
const auto& ir : entry.second) {
 
  118             for (
const auto& ir : entry.second) {
 
  124             for (
const auto& ir : entry.second) {
 
  143     ass.emplace(deriv.
main_var(), root);
 
  148     SMTRAT_LOG_FUNC(
"smtrat.cadcells.operators.rules", root1 << 
", " << root2);
 
  150     if (root1.is_numeric() && root1 == root2) 
return true;
 
  151     auto intersection = carl::set_intersection(root1.interval(), root2.interval());
 
  152     if (intersection.is_empty()) 
return false;
 
  153     if (root1 < intersection.lower() || root1 > intersection.upper()) 
return false;
 
  154     if (root1.is_numeric() && root1 == root2) 
return true;
 
  155     intersection = carl::set_intersection(root1.interval(), root2.interval());
 
  156     if (intersection.is_empty()) 
return false;
 
  157     if (root2 < intersection.lower() || root2 > intersection.upper()) 
return false;
 
  158     if (root1.is_numeric() && root1 == root2) 
return true;
 
  159     intersection = carl::set_intersection(root1.interval(), root2.interval());
 
  160     if (intersection.is_empty()) 
return false;
 
  184     auto common_zero = std::find_if(roots1.begin(), roots1.end(), [&roots2](
const auto& root1) { return std::find_if(roots2.begin(), roots2.end(), [&root1](const auto& root2) { return has_intersection(root1, root2); } ) != roots2.end(); });
 
  185     return common_zero != roots1.end();
 
A DelineatedDerivation is a BaseDerivation with a Delineation and an underlying SampledDerivation.
carl::Variable main_var() const
const Assignment & underlying_sample() const
void add_poly_nonzero(PolyRef poly)
void add_poly_nullified(PolyRef poly)
void add_root(RAN root, TaggedIndexedRoot tagged_root)
Encapsulates all computations on polynomials.
const std::vector< PolyRef > & factors_nonconst(PolyRef p)
bool is_nullified(const Assignment &sample, PolyRef p)
const std::vector< RAN > & real_roots(const Assignment &sample, PolyRef p)
A SampledDerivation is a DelineatedDerivation with a sample and an DelineationInterval w....
const Assignment & sample() const
Poly resultant(carl::Variable variable, const Poly &p, const Poly &q)
Computes the resultant of two polynomials.
boost::container::flat_map< RAN, std::vector< IndexedRoot > > RootMapPlain
void delineable_interval_roots(datastructures::SampledDerivation< P > &deriv, const boost::container::flat_set< datastructures::PolyRef > &polys, const datastructures::PolyRef resultant)
bool has_intersection(const RAN &root1, const RAN &root2)
bool has_common_real_root(datastructures::Projections &proj, Assignment ass, const datastructures::PolyRef &poly1, const datastructures::PolyRef &poly2)
void filter_roots(datastructures::DelineatedDerivation< P > &deriv, const datastructures::PolyRef poly, std::function< result(const RAN &)> filter_condition)
auto projection_root(const datastructures::DelineatedDerivation< P > &deriv, const RAN &root)
std::optional< carl::Interval< RAN > > delineable_interval(datastructures::Projections &proj, const Assignment &sample, const boost::container::flat_set< datastructures::PolyRef > &polys)
void poly_ord_inv(datastructures::SampledDerivation< P > &deriv, datastructures::PolyRef poly)
void poly_sgn_inv(datastructures::SampledDerivation< P > &deriv, datastructures::PolyRef poly, bool skip_if_ord_inv=true)
bool poly_del(datastructures::SampledDerivation< P > &deriv, datastructures::PolyRef poly)
void delineate(datastructures::DelineatedDerivation< P > &deriv, const properties::poly_irreducible_sgn_inv &prop)
carl::Assignment< RAN > Assignment
#define SMTRAT_LOG_TRACE(channel, msg)
#define SMTRAT_LOG_FUNC(channel, args)
#define SMTRAT_STATISTICS_CALL(function)
Represents the i-th root of a multivariate polynomial at its main variable (given an appropriate samp...
level_t level
The level of the polynomial.