SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
operator_mccallum_pdel.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "operator.h"
4 
5 
6 #include "../datastructures/roots.h"
7 #include "properties.h"
8 #include "rules.h"
9 #include "rules_pdel.h"
10 
11 
13 
14 struct MccallumPdel {
15 
16 static constexpr bool filter = false;
17 
19 
21  SMTRAT_LOG_FUNC("smtrat.cadcells.operators", &deriv);
22  for(const auto& prop : deriv.properties<properties::poly_del>()) {
23  if (!rules::poly_del_pdel(deriv, prop.poly)) return false;
24  }
25  for(const auto& prop : deriv.properties<properties::poly_proj_del>()) {
26  if (!rules::poly_proj_del(deriv, prop.poly)) return false;
27  }
28  for(const auto& prop : deriv.properties<properties::poly_ord_inv>()) {
29  rules::poly_ord_inv_pdel(deriv, prop.poly);
30  }
31  for(const auto& prop : deriv.properties<properties::poly_semi_sgn_inv>()) {
33  }
34  for(const auto& prop : deriv.properties<properties::poly_sgn_inv>()) {
35  rules::poly_sgn_inv(deriv, prop.poly);
36  }
37  return true;
38 }
39 
41  SMTRAT_LOG_FUNC("smtrat.cadcells.operators", &deriv);
42  for(const auto& prop : deriv.properties<properties::poly_irreducible_sgn_inv>()) {
43  rules::delineate(*deriv.delineated(), prop);
44  }
45 }
46 
48  SMTRAT_LOG_FUNC("smtrat.cadcells.operators", repr);
49  auto& deriv = *repr.derivation;
50 
51  for (const auto poly : deriv.delin().nullified()) {
52  if (deriv.contains(properties::poly_del{ poly }) || deriv.contains(properties::poly_proj_del{ poly })) {
53  return false;
54  }
55  }
56 
57  for(const auto& poly : repr.description.polys()) {
58  deriv.insert(properties::poly_proj_del{ poly });
59  }
60  for(const auto& poly : repr.ordering.polys()) {
61  deriv.insert(properties::poly_proj_del{ poly });
62  }
63 
64  if (deriv.contains(properties::cell_connected{deriv.level()})) {
65  rules::cell_connected(deriv, repr.description, repr.ordering);
66  }
69 
70  rules::root_ordering_holds_pdel(deriv.underlying().sampled(), repr.ordering);
71 
72  for(const auto& prop : deriv.properties<properties::poly_irreducible_sgn_inv>()) {
73  if (repr.equational.find(prop.poly) != repr.equational.end()) {
74  rules::poly_irreducible_sgn_inv_ec(deriv, repr.description, prop.poly);
75  } else if (deriv.delin().nonzero().find(prop.poly) != deriv.delin().nonzero().end()) {
76  rules::poly_irreducible_nonzero_sgn_inv(*deriv.delineated(), prop.poly);
77  } else if (deriv.delin().nullified().find(prop.poly) != deriv.delin().nullified().end()) {
78  rules::poly_irreducible_null_sgn_inv(deriv, prop.poly);
79  } else {
81  }
82  }
83  return true;
84 }
85 
87  SMTRAT_LOG_FUNC("smtrat.cadcells.operators", repr);
88  for (auto& cell_repr : repr.cells) {
89  if (!project_cell_properties(cell_repr)) {
90  return false;
91  }
92  }
93  auto cov = repr.get_covering();
94  rules::root_ordering_holds_pdel(repr.cells.front().derivation->underlying().sampled(), repr.ordering);
95  rules::covering_holds(repr.cells.front().derivation->underlying().delineated(), cov, repr.ordering);
96  return true;
97 }
98 
99 };
100 
101 }
void polys(boost::container::flat_set< PolyRef > &result) const
Definition: roots.h:561
A SampledDerivation is a DelineatedDerivation with a sample and an DelineationInterval w....
Definition: derivation.h:299
DelineatedDerivationRef< Properties > & delineated()
Definition: derivation.h:314
const PropertiesTSet< P > & properties() const
Definition: derivation.h:345
void polys(boost::container::flat_set< PolyRef > &result) const
Definition: roots.h:296
void root_ordering_holds_pdel(datastructures::SampledDerivation< P > &deriv, const datastructures::IndexedRootOrdering &ordering)
Definition: rules_pdel.h:63
void cell_analytic_submanifold([[maybe_unused]] datastructures::SampledDerivation< P > &deriv, const datastructures::SymbolicInterval &)
Definition: rules.h:169
void poly_ord_inv_pdel(datastructures::SampledDerivation< P > &deriv, datastructures::PolyRef poly)
Definition: rules_pdel.h:49
void poly_irreducible_null_sgn_inv(datastructures::SampledDerivation< P > &deriv, datastructures::PolyRef poly)
Definition: rules.h:244
void poly_irreducible_sgn_inv_pdel(datastructures::SampledDerivation< P > &deriv, const datastructures::SymbolicInterval &cell, const datastructures::IndexedRootOrdering &, const boost::container::flat_set< datastructures::PolyRef > &ordering_non_projective_polys, datastructures::PolyRef poly)
Definition: rules_pdel.h:81
void poly_irreducible_sgn_inv_ec(datastructures::SampledDerivation< P > &deriv, const datastructures::SymbolicInterval &cell, datastructures::PolyRef poly)
Definition: rules.h:174
bool poly_del_pdel(datastructures::SampledDerivation< P > &deriv, datastructures::PolyRef poly)
Definition: rules_pdel.h:9
void poly_irreducible_nonzero_sgn_inv(datastructures::DelineatedDerivation< P > &deriv, datastructures::PolyRef poly)
Definition: rules.h:118
void cell_connected(datastructures::SampledDerivation< P > &deriv, const datastructures::SymbolicInterval &cell, const datastructures::IndexedRootOrdering &ordering)
Definition: rules.h:160
void poly_sgn_inv(datastructures::SampledDerivation< P > &deriv, datastructures::PolyRef poly, bool skip_if_ord_inv=true)
Definition: rules.h:85
void cell_represents(datastructures::SampledDerivation< P > &deriv, const datastructures::SymbolicInterval &cell)
Definition: rules.h:191
void delineate(datastructures::DelineatedDerivation< P > &deriv, const properties::poly_irreducible_sgn_inv &prop)
Definition: rules.h:126
void covering_holds(datastructures::DelineatedDerivation< P > &, const datastructures::CoveringDescription &covering, const datastructures::IndexedRootOrdering &ordering)
Definition: rules_covering.h:6
bool poly_proj_del(datastructures::SampledDerivation< P > &deriv, datastructures::PolyRef poly)
Definition: rules_pdel.h:22
Projection operators.
Definition: operator.h:33
#define SMTRAT_LOG_FUNC(channel, args)
Definition: logging.h:38
IndexedRootOrdering ordering
An ordering on the roots that protects the cell.
SymbolicInterval description
Description of a cell.
boost::container::flat_set< PolyRef > equational
Polynomials that should be projected using the equational constraints projection.
boost::container::flat_set< PolyRef > ordering_non_projective_polys
Polys that are considered "non-projectively" in the ordering.
SampledDerivationRef< P > derivation
Derivation.
IndexedRootOrdering ordering
An ordering on the roots for the cell boundaries mainting the covering.
std::vector< CellRepresentation< P > > cells
Cells of the covering in increasing order and no cell is contained in another cell.
CoveringDescription get_covering() const
Returns a descriptions of the covering.
static bool project_covering_properties(datastructures::CoveringRepresentation< PropertiesSet > &repr)
static void delineate_properties(datastructures::SampledDerivation< PropertiesSet > &deriv)
static bool project_basic_properties(datastructures::SampledDerivation< PropertiesSet > &deriv)
static bool project_cell_properties(datastructures::CellRepresentation< PropertiesSet > &repr)