102{
104 { "x", "y", "z" },
106 {1,1,1},
107 {},
108 {1}
109 );
115 g = y + z;
117
119 H->addPolynomial(*f);
120 H->addPolynomial(*g);
121 EXPECT_TRUE(A->
is_equal(* H->value(), *h));
122 EXPECT_TRUE(A->
is_equal(* H->value(), *h));
123
124 H->removeLeadTerm();
125 EXPECT_FALSE(H->isZero());
126
127 H->removeLeadTerm();
128 EXPECT_FALSE(H->isZero());
129
130 H->removeLeadTerm();
131 EXPECT_TRUE(H->isZero());
132 EXPECT_TRUE(A->
is_zero(* H->value()));
133}
std::unique_ptr< PolynomialHeap > makePolynomialHeap(HeapType type, const FreeAlgebra &F)
void var(Poly &result, int v) const
bool is_zero(const Poly &f) const
static FreeAlgebra * create(const Ring *K, const std::vector< std::string > &names, const PolynomialRing *degreeRing, const std::vector< int > °rees, const std::vector< int > &wtvecs, const std::vector< int > &heftVector)
bool is_equal(const Poly &f, const Poly &g) const
Owned Poly value paired with its FreeAlgebra*, providing natural operator-overloaded arithmetic.
Free associative algebra over a coefficient ring: the non-commutative analogue of PolynomialRing.
const PolynomialRing * degreeRing(const std::vector< std::string > &names)