SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
Hong.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Collins.h"
4 #include "utils.h"
5 
6 namespace smtrat {
7 namespace cad {
8 namespace projection {
9 
10 /**
11  * Contains the implementation of Hongs projection operator as specified in @cite Hong1990 in Section 2.2.
12  */
13 namespace hong {
14 
15 /**
16  * Implements the part of Hongs projection operator from @cite Hong1990 that deals with a single polynomial `p` which is just the respective part of Collins' projection operator collins::single.
17  */
18 template<typename Poly, typename Callback>
19 void single(const Poly& p, carl::Variable variable, Callback&& cb) {
20  SMTRAT_LOG_DEBUG("smtrat.cad.projection", "Hong_single(" << p << ") -> Collins_single");
21  collins::single(p, variable, std::forward<Callback>(cb));
22 }
23 
24 /**
25  * Implements the part of Hongs projection operator from @cite Hong1990 that deals with two polynomials `p` and `q`:
26  * \f$ \bigcup_{F \in RED(p)} PSC(F, q) \f$
27  */
28 template<typename Poly, typename Callback>
29 void paired(const Poly& p, const UPoly& q, carl::Variable variable, Callback&& cb) {
30  SMTRAT_LOG_DEBUG("smtrat.cad.projection", "Hong_paired(" << p << ", " << q << ")");
32  for (const auto& reducta_p : RED_p) {
33  for (const auto& psc : projection::PSC(reducta_p, q)) {
34  SMTRAT_LOG_DEBUG("smtrat.cad.projection", "reducta pcs: " << psc);
35  returnPoly(projection::normalize(carl::switch_main_variable(psc, variable)), cb);
36  }
37  }
38 }
39 
40 } // namespace hong
41 } // namespace projection
42 } // namespace cad
43 } // namespace smtrat
void single(const Poly &p, carl::Variable variable, Callback &&cb)
Implements the part of Collins projection operator from that deals with a single polynomial p: .
Definition: Collins.h:21
void single(const Poly &p, carl::Variable variable, Callback &&cb)
Implements the part of Hongs projection operator from that deals with a single polynomial p which is...
Definition: Hong.h:19
void paired(const Poly &p, const UPoly &q, carl::Variable variable, Callback &&cb)
Implements the part of Hongs projection operator from that deals with two polynomials p and q: .
Definition: Hong.h:29
void returnPoly(const Poly &p, Callback &&cb)
Definition: utils.h:95
std::vector< Poly > PSC(const Poly &p, const Poly &q)
Computes the Principal Subresultant Coefficients of two polynomials.
Definition: utils.h:90
Poly normalize(const Poly &p)
Normalizes the given Poly by removing constant and duplicate factors.
Definition: utils.h:32
carl::UnivariatePolynomial< Poly > UPoly
Definition: common.h:17
Class to create the formulas for axioms.
carl::MultivariatePolynomial< Rational > Poly
Definition: types.h:25
#define SMTRAT_LOG_DEBUG(channel, msg)
Definition: logging.h:35
Construct the set of reducta of the given polynomial.
Definition: utils.h:74