Basic Polynomial Algebra Subprograms (BPAS)  v. 1.791
zerodimensionalregularchain.hpp
1 #ifndef _ZERODIMENSIONALREGULARCHAIN_H_
2 #define _ZERODIMENSIONALREGULARCHAIN_H_
3 
4 #include "regularchain_macros.hpp"
5 
6 #include "BPASZeroDimRegularChain.hpp"
7 #include "../Ring/BPASField.hpp"
8 #include "regularchain.hpp"
9 #include "chainstructures.hpp"
10 #include "../TriangularSet/triangularset.hpp"
11 #include "../SubResultantChain/subresultantchain.hpp"
12 
13 
14 
15 extern long long unsigned int rcProfilingStart;
16 extern float primitivePartTime;
17 extern float squareFreePartTime;
18 extern float subresultantChainTime;
19 extern float zerodimensionalregularchainTime;
20 extern float pseudoDivideTime;
21 extern float normalFormTime;
22 
23 extern float zdrcCopyTime;
24 
25 /**
26  * A class for handling regular chains in dimension zero.
27  * A ZeroDimensionalRegularChain contains polynomials of type BPASRecursivelyViewedPolynomial, which have coefficients in a BPASField.
28  **/
29 template <class Field, class RecursivePoly>
30 class ZeroDimensionalRegularChain : public RegularChain<Field,RecursivePoly>,
31  public virtual BPASZeroDimensionalRegularChain<Field,RecursivePoly>
32 {
33  protected:
34 
43 
47 
48  /**
49  * Cut an input zero-dimensional regular chain at the symbol v, returning the zero-dimensional subchain below v,
50  * the polynomial with main variable v and the potentially positive-dimensional subchain above v.
51  *
52  * @param T: a regular chain
53  * @param v: a symbol
54  * @param Tlv: the zero-dimensional subchain of T below v
55  * @param Tv: the recursively viewed polynomial with main variable v, if it exists
56  * @param Tgv: the (potentially positive-dimensional) subchain of T above v
57  **/
59 
60  /**
61  * Cut the current object at the symbol v, returning the polynomial with main variable v and the subchain above v, which may no longer be zero-dimensional.
62  *
63  * @param v: a symbol
64  * @param Tv: the recursively viewed polynomial with main variable v, if it exists
65  * @param Tgv: the regular chain obtained from the polynomials of the current object above v
66  **/
67  void cutChain(const Symbol& v, RecursivePoly& Tv, RegularChain<Field,RecursivePoly>& Tgv) const;
68 
69  /**
70  * Cut the current object at the symbol v, returning the zero-dimensional subchain below v and the polynomial with main variable v.
71  *
72  * @param v: a symbol
73  * @param Tlv: the zero-dimensional subchain of the current object below v
74  * @param Tv: the recursively viewed polynomial with main variable v, if it exists
75  **/
76  void cutChain(const Symbol& v, ZeroDimensionalRegularChain<Field,RecursivePoly>& Tlv, RecursivePoly& Tv) const;
77 
78  /**
79  * Add an input polynomial to the current object
80  *
81  * @param p: a recursively viewed polynomial
82  **/
83  void constructChain(const RecursivePoly& p, int options=ASSUME_REGULAR);
84 
85  /**
86  * Add an an upper regular chain to the current object
87  *
88  * @param T: a recursively viewed polynomial
89  **/
90  void constructChain(const RegularChain<Field,RecursivePoly>& T, int options=ASSUME_REGULAR);
91 
92  /**
93  * Construct a set of regular chains from the current object and an input polynomial
94  *
95  * @param p: a recursively viewed polynomial
96  **/
97  std::vector<ZeroDimensionalRegularChain<Field,RecursivePoly>> constructChains(const RecursivePoly& p, int options=ASSUME_REGULAR) const;
98 
99  /**
100  * Construct a set of regular chains from the current object and an input polynomial
101  *
102  * @param p: a recursively viewed polynomial
103  **/
104  std::vector<ZeroDimensionalRegularChain<Field,RecursivePoly>> constructChains(const RegularChain<Field,RecursivePoly>& T, int options=ASSUME_REGULAR) const;
105 
106  /*******************************
107  * Generator methods
108  *
109  *******************************/
110 
111  /**
112  * Compute the last nonzero subresultant of the subresultant chain src of f and g modulo the current regular chain,
113  * i.e., compute a splitting of pairs (R_i,T_i) such that R_i is the last nonzero subresultant modulo T_i.
114  *
115  * @param f: input polynomial
116  * @param g: input polynomial
117  * @param v: common main variable of f and g
118  * @param assumeRegular: boolean flag specifying whether the input polynomials are assumed to be regular modulo the current chain.
119  **/
120  #if defined(RC_WITH_GENERATORS) && RC_WITH_GENERATORS
121  void lastNonZeroSubResultant(const RecursivePoly& f, const RecursivePoly& g, const Symbol& v, bool assumeRegular, AsyncGenerator<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>>& results) const;
122  #else
123  std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> lastNonZeroSubResultant(const RecursivePoly& f, const RecursivePoly& g, const Symbol& v, bool assumeRegular) const;
124  #endif
125 
126  /**
127  * Compute the last nonzero subresultant of the subresultant chain src of f and g modulo the current regular chain,
128  * i.e., compute a splitting of pairs (R_i,T_i) such that R_i is the last nonzero subresultant modulo T_i.
129  *
130  * @param f: input polynomial
131  * @param g: input polynomial
132  * @param v: common main variable of f and g
133  * @param src: subresultant chain of f and g
134  * @param assumeRegular: boolean flag specifying whether the input polynomials are assumed to be regular modulo the current chain.
135  **/
136  #if defined(RC_WITH_GENERATORS) && RC_WITH_GENERATORS
137  void lastNonZeroSubResultant_inner(const RecursivePoly& f, const RecursivePoly& g, const Symbol& v, const SubResultantChain<RecursivePoly,RecursivePoly>& src, bool assumeRegular, AsyncGenerator<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>>& results) const;
138  #else
139  std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> lastNonZeroSubResultant_inner(const RecursivePoly& f, const RecursivePoly& g, const Symbol& v, const SubResultantChain<RecursivePoly,RecursivePoly>& src, bool assumeRegular) const;
140  #endif
141 
142  /**
143  * Compute a decomposition of the current object such that on each component the initial of the input polynomial is either
144  * zero or regular modulo the saturated ideal of that component. If the initial is zero, (0, T_i) is returned;
145  * if the initial is regular, (p_i, T_i), is returned, where p_i is equivalent to p modulo the saturated ideal of T_i and
146  * p_i is reduced modulo Sat(T_i).
147  *
148  * @param p: a recursively viewed polynomial
149  **/
150  #if defined(RC_WITH_GENERATORS) && RC_WITH_GENERATORS
151  void _regularizeInitial(const RecursivePoly& f, AsyncGenerator<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>>&) const;
152  void _isInvertible(const RecursivePoly& f, AsyncGenerator<BoolChainPair<ZeroDimensionalRegularChain<Field,RecursivePoly>>>& results) const;
153  #else
154  std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> _regularizeInitial(const RecursivePoly& p) const;
155  std::vector<BoolChainPair<ZeroDimensionalRegularChain<Field,RecursivePoly>>> _isInvertible(const RecursivePoly& f) const;
156  #endif
157 
158  public:
159 
160  // TODO: the underscore routines should be protected+friends
161 
162  /**
163  * Compute the common solutions of the input polynomial and the current regular chain.
164  * More precisely, this routine computes the intersection of the varieties of the input polynomial and the
165  * current zero-dimensional regular chain, expressed as a set of zero-dimensional regular chains.
166  *
167  * @param p: a recursively viewed polynomial
168  **/
169  #if defined(RC_WITH_GENERATORS) && RC_WITH_GENERATORS
170  void _intersect(const RecursivePoly& p, AsyncGenerator<ZeroDimensionalRegularChain<Field,RecursivePoly>>& results) const;
171  #else
172  std::vector<ZeroDimensionalRegularChain<Field,RecursivePoly>> _intersect(const RecursivePoly& p) const;
173  #endif
174 
175  /**
176  * Compute the gcd of two input polynomials p and q modulo the saturated ideal of the current object. The result is a list of pairs (g_i,T_i) of
177  * polynomials g_i and regular chains T_i, where g_i is gcd(p,q) modulo the saturated ideal of T_i.
178  *
179  * @param p: a recursively viewed polynomial
180  * @param q: a recursively viewed polynomial
181  * @param v: common main variable of f and g
182  **/
183  #if defined(RC_WITH_GENERATORS) && RC_WITH_GENERATORS
184  void _regularGCD(const RecursivePoly& p, const RecursivePoly& q, const Symbol& v, AsyncGenerator<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>>& results);
185  #else
186  std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> _regularGCD(const RecursivePoly& p, const RecursivePoly& q, const Symbol& v);
187  #endif
188 
189  /**
190  * Compute a decomposition of the current object such that on each component the input polynomial is either
191  * zero or regular modulo the saturated ideal of that component. If the polynomial is zero, (0, T_i) is returned;
192  * if the polynomial is regular, (p_i, T_i), is returned, where p_i is equivalent to p modulo the saturated ideal of T_i.
193  *
194  * @param p: a recursively viewed polynomial
195  **/
196  #if defined(RC_WITH_GENERATORS) && RC_WITH_GENERATORS
197  void _regularize(const RecursivePoly& p, AsyncGenerator<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>>& results) const;
198  #else
199  std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> _regularize(const RecursivePoly& p) const;
200  #endif
201 
203 
204  /**
205  * Default constructor: creates an empty "zero-dimensional" regular chain with variable size
206  * with empty list of transcendentals.
207  *
208  * @param
209  **/
211 
212  /**
213  * Construct an empty zero-dimensional regular chain of variable size with
214  * variables given by xs with empty list of transcendentals.
215  *
216  * @param ps: the transcendental variable names
217  **/
218  ZeroDimensionalRegularChain<Field,RecursivePoly> (const std::vector<Symbol>& ps);
219 
220  /**
221  * Construct a zero-dimensional regular chain of variable size containing a univariate polynomial p
222  * with empty list of transcendentals.
223  *
224  * @param p: a recursively viewed polynomial with only one variable
225  **/
226  ZeroDimensionalRegularChain<Field,RecursivePoly> (const RecursivePoly& p);
227 
228  /**
229  * Construct a variable zero-dimensional regular chain containing p, such that the supplied list of transcendental variable names
230  * includes all of the variables in p except its main variable, which becomes the only algebraic variable of the chain.
231  *
232  * @param p: a recursively viewed polynomial
233  * @param ts: the transcendental variable names
234  **/
235  ZeroDimensionalRegularChain<Field,RecursivePoly> (const RecursivePoly& p, const std::vector<Symbol>& ts);
236 
237  /**
238  * Construct a fixed zero-dimensional regular chain containing the polynomials in polys.
239  * @note: It is assumed that the polynomials in polys form a valid zero-dimensional regular chain.
240  *
241  * @param polys: a list of recursively viewed polynomials.
242  *
243  */
244  ZeroDimensionalRegularChain<Field,RecursivePoly> (const std::vector<RecursivePoly> polys);
245 
246 
247  /**
248  * Copy constructor.
249  *
250  * @param a: a zero-dimensional regular chain
251  **/
253 
254  /**
255  * Copy constructor taking a regular chain as input. Note that this routine allow the construction of fixed zero-dimensional regular
256  * chains that are technically positive-dimensional because the polynomials above the maximum algebraic variable are zero.
257  * This is allowed to optimize the performance of routines in the RegularChain class.
258  *
259  * @param a: a regular chain
260  **/
262  // TODO: make this protected
263 
264  /**
265  * Move constructor.
266  *
267  * @param a: an r-value reference zero-dimensional regular chain
268  **/
270 
271  /**
272  * Move constructor taking a regular chain as input. Note that this routine allow the construction of fixed zero-dimensional regular
273  * chains that are technically positive-dimensional because the polynomials above the maximum algebraic variable are zero.
274  * This is allowed to optimize the performance of routines in the RegularChain class.
275  *
276  * @param a: an r-value reference regular chain
277  **/
279  // TODO: make this protected
280 
281  /**
282  * Computational constructor: creates a triangular set given all the data
283  *
284  * @param vs: rvalue reference to variables of the zero-dimensional regular chain
285  * @param avs: rvalue reference to algebraic variables of the zero-dimensional regular chain
286  * @param tvs: rvalue reference to transcendental variables of the zero-dimensional regular chain
287  * @param polys: rvalue reference to polynomials of the zero-dimensional regular chain
288  * @param tsm: whether the zero-dimensional regular chain is variable or fixed
289  * @param c: characteristic of the zero-dimensional regular chain
290  **/
291  ZeroDimensionalRegularChain<Field,RecursivePoly> (const std::vector<Symbol>&& vs, const std::vector<Symbol>&& avs, const std::vector<Symbol>&& tvs, const std::vector<RecursivePoly>&& ts, TriangularSetMode tsm, const mpz_class& c);
292  // TODO: do we really need this?
293 
294  /**
295  * Assignment operator =.
296  *
297  * @param a: a triangular set
298  **/
300 
301  /**
302  * Assignment operator = imposed by abstract class BPASTriangularSet.
303  *
304  * @param a: a triangular set
305  **/
307 
308  /**
309  * Assignment operator = imposed by abstract class BPASRegularChain.
310  *
311  * @param a: a regular chain
312  **/
314 
315  /**
316  * Assignment operator = imposed by abstract class BPASZeroDimensionalRegularChain.
317  *
318  * @param a: a zero-dimensional regular chain
319  **/
321 
322  /**
323  * Move assignment operator = imposed by class ZeroDimensionalRegularChain.
324  *
325  * @param a: a zero-dimensional regular chain
326  **/
328 
329  /**
330  * Move assignment operator = imposed by abstract class BPASTriangularSet.
331  *
332  * @param a: a triangular set
333  **/
335 
336  /**
337  * Move assignment operator =
338  *
339  * @param a: a BPASRegularChain
340  **/
342 
343  /**
344  * Move assignment operator = imposed by abstract class BPASZeroDimensionalRegularChain.
345  *
346  * @param a: a zero-dimensional regular chain
347  **/
349 
350  /**
351  * Add operator +:
352  * Adds a polynomial p to a zero-dimensional regular chain and returns a new zero-dimensional regular chain,
353  * assuming that the main variable of p is neither algebraic nor transcendental, p contains no other non-transcendental
354  * variables, and that init(p) is regular modulo the saturated ideal of the current object.
355  *
356  * @param p: a recursively viewed polynomial
357  **/
358  ZeroDimensionalRegularChain<Field,RecursivePoly> operator+ (const RecursivePoly& p) const;
359 
360  /**
361  * Add assignment operator +=:
362  * Adds a polynomial p to a zero-dimensional regular chain, assuming that the main variable of p
363  * is neither algebraic nor transcendental, p contains no other non-transcendental
364  * variables, and that init(p) is regular modulo the saturated ideal of the current object.
365  *
366  * @param p: a recursively viewed polynomial
367  **/
369 
370  /**
371  * Add operator +:
372  * Adds the polynomials of an input regular chain to the current object and returns a new zero-dimensional
373  * regular chain, assuming that the result of the addition is both a regular chain and zero-dimensional.
374  *
375  * @param p: a regular chain
376  **/
378 
379  /**
380  * Add assignment operator +=:
381  * Adds the polynomials of an input regular chain to the current object, assuming that the result of
382  * the addition is both a regular chain and zero-dimensional.
383  *
384  * @param p: a recursively viewed polynomial
385  **/
387 
388  /**
389  * Identity operator ==.
390  *
391  *
392  * @param a: A triangular set
393  **/
395 
396  /**
397  * Negated identity operator !=.
398  *
399  *
400  * @param a: A triangular set
401  **/
403 
404  /**
405  * Get the number of (potentially algebraic) variables. This can only be different than the number
406  * of algebraic variables for fixed zero-dimensional regular chains.
407  *
408  * @param
409  **/
410  inline int numberOfVariables() const {
412  }
413 
414  /**
415  * Get the number of algebraic variables in the current object.
416  *
417  * @param
418  **/
419  inline int numberOfAlgebraicVariables() const {
421  }
422 
423  /**
424  * Get the number of transcendental variables in the current object.
425  *
426  * @param
427  **/
428  inline int numberOfTranscendentalVariables() const {
430  }
431 
432  /**
433  * Get the (potentially algebraic) variable names for the current object in decreasing order.
434  * This can only be different from the list of algebraic variable names for fixed zero-dimensional
435  * regular chains.
436  *
437  * @param
438  **/
439  inline std::vector<Symbol> variables() const {
441  }
442 
443  /**
444  * Get algebraic variables in the current object.
445  *
446  * @param
447  **/
448  inline std::vector<Symbol> mainVariables() const {
450  }
451 
452  /**
453  * Get transcendental variables in the current object.
454  *
455  * @param
456  **/
457  inline std::vector<Symbol> transcendentalVariables() const {
459  }
460 
461  /**
462  * Find out if the input symbol is an algebraic variable of the current object.
463  *
464  * @param s: a symbol
465  **/
466  inline bool isAlgebraic(const Symbol& s) const {
468  }
469 
470  /**
471  * Find out if the current object is the empty chain.
472  *
473  * @param
474  **/
475  inline bool isEmpty() const {
477  }
478 
479  /**
480  * Get the list of polynomials in the current object.
481  *
482  * @param
483  **/
484  inline std::vector<RecursivePoly> polynomials() const {
486  }
487 
488  /**
489  * Select the polynomial in the current object with main variable s, if it exists.
490  *
491  * @param s: a symbol
492  **/
493  inline RecursivePoly select(const Symbol& s) const {
495  }
496 
497  /**
498  * Returns the zero-dimensional regular chain consisting of polynomials with
499  * main variable strictly less than s. NB: the type of the returned object is always
500  * a ZeroDimensionalRegularChain, since the lower chain is always genuinely zero-dimensional;
501  * however, if the current object is a variable zero-dimensional regular chain, the returned
502  * object really is zero-dimensional, in the sense that all variables are algebraic, but if
503  * the current object is a fixed type, then the chain may only be morally zero-dimensional
504  * in the sense that all variables below some variable are algebraic but the chain has
505  * non-algebraic variables.
506  *
507  * @param s: symbol of the main variable of specified element of the regular chain
508  * @param ts: The returned regular chain
509  **/
510  void lower(const Symbol& s, BPASTriangularSet<Field,RecursivePoly>& ts) const;
511 
512  /**
513  * Returns the regular chain consisting of polynomials with
514  * main variable strictly greater than s. The type of the returned object is always
515  * a RegularChain, since the upper chain can be genuinely positive dimensional.
516  *
517  * @param s: symbol of the main variable of specified element of the regular chain
518  * @param ts: The returned regular chain
519  **/
520  void upper(const Symbol& s, BPASTriangularSet<Field,RecursivePoly>& ts) const;
521 
522  /**
523  * Compute the common solutions of the input polynomial and the current regular chain.
524  * More precisely, this routine computes the intersection of the varieties of the input polynomial and the
525  * current zero-dimensional regular chain, expressed as a set of zero-dimensional regular chains.
526  *
527  * @param p: a recursively viewed polynomial
528  **/
529  std::vector<ZeroDimensionalRegularChain<Field,RecursivePoly>> intersect(const RecursivePoly& p) const;
530 
531  /**
532  * Compute a decomposition of the current object such that on each component the input polynomial is either
533  * zero or regular modulo the saturated ideal of that component. If the polynomial is zero, (0, T_i) is returned;
534  * if the polynomial is regular, (p_i, T_i), is returned, where p_i is equivalent to p modulo the saturated ideal of T_i.
535  *
536  * @param p: a recursively viewed polynomial
537  **/
538  std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> regularize(const RecursivePoly& p) const;
539 
540  /**
541  * Compute a decomposition of the current object such that on each component the initial of the input polynomial is either
542  * zero or regular modulo the saturated ideal of that component. If the initial is zero, (0, T_i) is returned;
543  * if the initial is regular, (p_i, T_i), is returned, where p_i is equivalent to p modulo the saturated ideal of T_i and
544  * p_i is reduced modulo Sat(T_i).
545  *
546  * @param p: a recursively viewed polynomial
547  **/
548  std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> regularizeInitial(const RecursivePoly& p) const;
549 
550  /**
551  * Determine whether a recursively viewed polynomial is invertible with respect to the current regular chain.
552  * More precisely, compute a splitting consisting of pairs (b_i,T_i) such that b_i is true if f is invertible
553  * modulo T_i and b_i is false if f is zero modulo T_i.
554  *
555  * @param p: a recursively viewed polynomial
556  **/
557  std::vector<BoolChainPair<ZeroDimensionalRegularChain<Field,RecursivePoly>>> isInvertible(const RecursivePoly& p) const;
558 
559  /**
560  * Compute the gcd of two input polynomials p and q modulo the saturated ideal of the current object. The result is a list of pairs (g_i,T_i) of
561  * polynomials g_i and regular chains T_i, where g_i is gcd(p,q) modulo the saturated ideal of T_i.
562  *
563  * @param p: a recursively viewed polynomial
564  * @param q: a recursively viewed polynomial
565  * @param v: common main variable of f and g
566  **/
567  std::vector<PolyChainPair<RecursivePoly,ZeroDimensionalRegularChain<Field,RecursivePoly>>> regularGCD(const RecursivePoly& p, const RecursivePoly& q, const Symbol& v);
568 
569  /**
570  * Generate a random zero-dimensional regular chain based on the number of terms of the polynomials of the chain.
571  *
572  * @param nVars: number of variables = number of algebraic variables
573  * @param nTrcVars: number of transcendental variables
574  * @param nTerms: maximum number of terms in the polynomials
575  * @param coefBound: maximum coefficient size
576  * @param pSparsity: sparsity of the polynomials
577  * @param includeNeg: whether to include negative coefficients
578  **/
579  void randomZeroDimensionalRegularChain(int nVars, int nTrcVars, int nTerms, unsigned long int coefBound, int pSparsity, bool includeNeg);
580 
581  /**
582  * Generate a random zero-dimensional regular chain based on a list of maximum degrees of variables in the polynomials in the chain.
583  *
584  * @param nVars: number of variables = number of algebraic variables
585  * @param nTrcVars: number of transcendental variables
586  * @param maxDegs: maximum degrees among the full list of variables
587  * @param coefBound: maximum coefficient size
588  * @param pSparsity: sparsity of the polynomials
589  * @param includeNeg: whether to include negative coefficients
590  **/
591  void randomZeroDimensionalRegularChain(int nVars, int nTrcVars, std::vector<int> maxDegs, unsigned long int coefBound, double pSparsity, bool includeNeg);
592 
593 };
594 
595 #endif
ZeroDimensionalRegularChain< Field, RecursivePoly > & operator+=(const RecursivePoly &p)
Add assignment operator +=: Adds a polynomial p to a zero-dimensional regular chain, assuming that the main variable of p is neither algebraic nor transcendental, p contains no other non-transcendental variables, and that init(p) is regular modulo the saturated ideal of the current object.
bool isEmpty() const
Copy an object derived from abstract BPASTriangularSet class to type of current object.
std::vector< RecursivePoly > polynomials() const
Get the vector of polynoials in the triangular set.
Definition: triangularset.hpp:369
std::vector< Symbol > mainVariables() const
Get algebraic variables in the current object.
Definition: zerodimensionalregularchain.hpp:448
An abstract class defining the interface of a zero-dimensional regular chain.
Definition: BPASZeroDimRegularChain.hpp:12
void lower(const Symbol &s, BPASTriangularSet< Field, RecursivePoly > &ts) const
Returns the zero-dimensional regular chain consisting of polynomials with main variable strictly less...
bool isEmpty() const
Find out if the current object is the empty chain.
Definition: zerodimensionalregularchain.hpp:475
std::vector< Symbol > transcendentalVariables() const
Get transcendental variables in the current object.
Definition: zerodimensionalregularchain.hpp:457
ZeroDimensionalRegularChain< Field, RecursivePoly > & operator=(const ZeroDimensionalRegularChain< Field, RecursivePoly > &a)
Assignment operator =.
A class for handling regular chains in dimension zero.
Definition: regularchain.hpp:61
int numberOfTranscendentalVariables() const
Get the number of transcendental variables.
Definition: triangularset.hpp:302
std::vector< Symbol > variables() const
Get the (potentially algebraic) variable names for the current object in decreasing order...
Definition: zerodimensionalregularchain.hpp:439
int numberOfTranscendentalVariables() const
Get the number of transcendental variables in the current object.
Definition: zerodimensionalregularchain.hpp:428
RecursivePoly select(const Symbol &s) const
Select the polynomial in the current object with main variable s, if it exists.
Definition: regularchain.hpp:904
int numberOfVariables() const
Get the number of (potentially algebraic) variables.
Definition: zerodimensionalregularchain.hpp:410
bool isAlgebraic(const Symbol &s) const
Determine if the input variable s is algebraic, i.e., if the triangular set contains a polynomial wit...
Definition: triangularset.hpp:347
std::vector< PolyChainPair< RecursivePoly, ZeroDimensionalRegularChain< Field, RecursivePoly > > > _regularize(const RecursivePoly &p) const
Compute a decomposition of the current object such that on each component the input polynomial is eit...
bool isAlgebraic(const Symbol &s) const
Find out if the input symbol is an algebraic variable of the current object.
Definition: zerodimensionalregularchain.hpp:466
bool operator!=(const ZeroDimensionalRegularChain< Field, RecursivePoly > &a) const
Negated identity operator !=.
std::vector< PolyChainPair< RecursivePoly, ZeroDimensionalRegularChain< Field, RecursivePoly > > > regularize(const RecursivePoly &p) const
Compute a decomposition of the current object such that on each component the input polynomial is eit...
std::vector< RecursivePoly > polynomials() const
Get the list of polynomials in the current object.
Definition: zerodimensionalregularchain.hpp:484
void upper(const Symbol &s, BPASTriangularSet< Field, RecursivePoly > &ts) const
Returns the regular chain consisting of polynomials with main variable strictly greater than s...
std::vector< ZeroDimensionalRegularChain< Field, RecursivePoly > > intersect(const RecursivePoly &p) const
Compute the common solutions of the input polynomial and the current regular chain.
std::vector< Symbol > variables() const
Get the (potentially algebriac) variable names in decreasing order.
Definition: regularchain.hpp:895
std::vector< BoolChainPair< ZeroDimensionalRegularChain< Field, RecursivePoly > > > isInvertible(const RecursivePoly &p) const
Determine whether a recursively viewed polynomial is invertible with respect to the current regular c...
int numberOfAlgebraicVariables() const
Get the number of algebraic variables in the current object.
Definition: zerodimensionalregularchain.hpp:419
std::vector< PolyChainPair< RecursivePoly, ZeroDimensionalRegularChain< Field, RecursivePoly > > > regularGCD(const RecursivePoly &p, const RecursivePoly &q, const Symbol &v)
Compute the gcd of two input polynomials p and q modulo the saturated ideal of the current object...
std::vector< PolyChainPair< RecursivePoly, ZeroDimensionalRegularChain< Field, RecursivePoly > > > _regularGCD(const RecursivePoly &p, const RecursivePoly &q, const Symbol &v)
Compute the gcd of two input polynomials p and q modulo the saturated ideal of the current object...
int options() const
Get the encoded options of the regular chain, a bitwise or of RegularChainOption values.
int numberOfAlgebraicVariables() const
Get the number of algebraic variables.
Definition: triangularset.hpp:293
ZeroDimensionalRegularChain< Field, RecursivePoly > operator+(const RecursivePoly &p) const
Add operator +: Adds a polynomial p to a zero-dimensional regular chain and returns a new zero-dimens...
A class for handling regular chains of arbitrary dimension.
Definition: regularchain.hpp:69
int numberOfVariables() const
Get the number of (potentially algebraic) variables in the current object.
Definition: regularchain.hpp:784
An encapsulation of a mathematical symbol.
Definition: Symbol.hpp:23
void randomZeroDimensionalRegularChain(int nVars, int nTrcVars, int nTerms, unsigned long int coefBound, int pSparsity, bool includeNeg)
Generate a random zero-dimensional regular chain based on the number of terms of the polynomials of t...
std::vector< PolyChainPair< RecursivePoly, ZeroDimensionalRegularChain< Field, RecursivePoly > > > regularizeInitial(const RecursivePoly &p) const
Compute a decomposition of the current object such that on each component the initial of the input po...
std::vector< ZeroDimensionalRegularChain< Field, RecursivePoly > > _intersect(const RecursivePoly &p) const
Compute the common solutions of the input polynomial and the current regular chain.
std::vector< Symbol > transcendentalVariables() const
Get the transcendentalVariables variables.
Definition: triangularset.hpp:329
bool operator==(const ZeroDimensionalRegularChain< Field, RecursivePoly > &a) const
Identity operator ==.
RecursivePoly select(const Symbol &s) const
Select the polynomial in the current object with main variable s, if it exists.
Definition: zerodimensionalregularchain.hpp:493
std::vector< Symbol > mainVariables() const
Get the algebraic variables.
Definition: triangularset.hpp:320