Action polynomial rings

In Oscar we provide the action polynomial interface via the abstract types ActionPolyRing{T} <: Ring and ActionPolyRingElem{T} <: RingElem. The type parameter T is the element type of the coefficient ring. All concrete subtypes use the functionality of universal polynomials from the AbstractAlgebra package for polynomial arithmetic, as well as maintaining variables and adding new ones on demand. Currently, there are two concrete subtypes available, namely DifferencePolyRing{T} and DifferentialPolyRing{T} with element types DifferencePolyRingElem{T} and DifferentialPolyRingElem{T}. See difference polynomial rings and differential polynomial rings for their unique functionality.

Each action polynomial ring maintains a sorted list of currently tracked jet variables, that can be accessed and extended by a number of methods, see, e.g. the section Element Constructors. The jet variables are sorted with respect to a user-defined ranking.

Tracked jet variables

The set of valid jet variables of an action polynomial ring depend only on the integers $m$ and $n$ and are thus known at the time of construction. For reasons of efficiency, we keep the list of tracked jet variables as short as possible and track jet variables only, if necessary. The list of currently tracked jet variables is obtained using gens.

Currently, there are two concrete subtypes available, namely DifferencePolyRing{T} and DifferentialPolyRing{T} with element types DifferencePolyRingElem{T} and DifferentialPolyRingElem{T}. See difference polynomial rings and differential polynomial rings for their unique functionality.

Specifying jet variables

Recall that a jet variable is of the form $(u_i)_J$ with $i \in \lbrace 1, \ldots, m \rbrace$ and $J \in \mathbb{Z}_{\geq 0}^n$. There are four ways in which jet variables can be specified as an input for methods, which can be found below. The first two do not require the jet variable in question to be tracked, the last two do.

  • By a tuple consisting of the index i and the jet J.
  • By passing the tuple as separate arguments, starting with the index.
  • By passing the index of the jet variable in the list of the currently tracked jet variables.
  • By immediately passing the jet variable as an element of an action polynomial ring.
Note

For many methods, e.g. degree or derivative we provide all the above versions, but only record one in this documentation for readability. Usually, we choose the second version from the above list.

Element Constructors

(A::ActionPolyRing)() returns the zero polynomial of the action polynomial ring A. (A::ActionPolyRing)(a::T) where {T<:RingElement} returns a as an element of A, if possible. This can be used for creating constant polynomials.

Warning

The next three methods take input arguments specifying a jet variable or a vector of jet variables. After calling one of them, the provided action polynomial ring A will track all jet variables specified.

genMethod
gen(A::ActionPolyRing, i::Int, jet::Vector{Int})

Return the jet variable of the action polynomial ring A specified by i and jet. If this jet variable was untracked, it is tracked afterwards. The jet variable may also be specified by a tuple, see Specifying jet variables. Additionally, the jet variable may also be specified by an integer but the corresponding method gen(A::ActionPolyRing, i::Int) slightly differs in its functionality, as it cannot create new jet variables.

Examples

julia> dpr = differential_polynomial_ring(ZZ, [:a, :b, :c], 4)[1]; gen(dpr, 1, [3,1,0,0])
a[3,1,0,0]

julia> gen(dpr, (1, [3,2,0,0]))
a[3,2,0,0]

julia> gens(dpr)
5-element Vector{DifferentialPolyRingElem{ZZRingElem}}:
 a[3,2,0,0]
 a[3,1,0,0]
 a[0,0,0,0]
 b[0,0,0,0]
 c[0,0,0,0]
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
getindexMethod
getindex(A::ActionPolyRing, i::Int, jet::Vector{Int})

Alias for gen(A, i, jet).

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
gensMethod
gens(A::ActionPolyRing, jet_idxs::Vector{Tuple{Int, Vector{Int}}})

Return the jet variables of the action polynomial ring A specified by the entries of jet_idxs as a vector and track all new jet variables.

Examples

julia> dpr = differential_polynomial_ring(ZZ, [:a, :b, :c], 4)[1]; gens(dpr, [(1, [3,1,0,0]), (1, [3,2,0,0])])
2-element Vector{DifferentialPolyRingElem{ZZRingElem}}:
 a[3,1,0,0]
 a[3,2,0,0]

julia> gens(dpr)
5-element Vector{DifferentialPolyRingElem{ZZRingElem}}:
 a[3,2,0,0]
 a[3,1,0,0]
 a[0,0,0,0]
 b[0,0,0,0]
 c[0,0,0,0]
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
Creating polynomials

Polynomials can be created by applying the usual arithmetic operations, such as +, -, *, and ^, to jet variables.

Generators and variables

genMethod
gen(A::ActionPolyRing, i::Int)

Among the currently tracked jet variables of A, return the i-th largest one.

Examples

julia> dpr = difference_polynomial_ring(ZZ, [:a, :b, :c], 4)[1]; gen(dpr, 2)
b[0,0,0,0]

julia> set_ranking!(dpr; partition = [[0,1,1],[1,0,0]]); gen(dpr, 2)
c[0,0,0,0]
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
gensMethod
gens(A::ActionPolyRing)

Return the currently tracked jet variables of the action polynomial ring A as a vector. The jet variables are sorted with respect to the ranking of A, leading with the largest jet variable.

Examples

julia> dpr = difference_polynomial_ring(ZZ, [:a, :b, :c], 4)[1]; gens(dpr)
3-element Vector{DifferencePolyRingElem{ZZRingElem}}:
 a[0,0,0,0]
 b[0,0,0,0]
 c[0,0,0,0]

julia> set_ranking!(dpr; partition = [[0,1,1],[1,0,0]]); gens(dpr)
3-element Vector{DifferencePolyRingElem{ZZRingElem}}:
 b[0,0,0,0]
 c[0,0,0,0]
 a[0,0,0,0]

julia> gens(dpr, [(1, [1,1,1,1]), (2, [1,1,1,1])]);

julia> gens(dpr)
5-element Vector{DifferencePolyRingElem{ZZRingElem}}:
 b[1,1,1,1]
 b[0,0,0,0]
 c[0,0,0,0]
 a[1,1,1,1]
 a[0,0,0,0]
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
is_genMethod
is_gen(p::ActionPolyRingElem)

Return true if p is a jet variable in an action polynomial ring.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
var_indexMethod
var_index(p::ActionPolyRingElem)

Return the integer i such that p is the i-th largest currently tracked jet variable. If p is not a jet variable an exception is raised.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
varsMethod
vars(p::ActionPolyRingElem; sorted::Bool=true)

Return the jet variables actually occurring in p as a vector. If sorted is true (the default), the jet variables are sorted with respect to the ranking of the action polynomial ring containing p, leading with the largest jet variable.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
leaderMethod
leader(p::ActionPolyRingElem)

Return the leader of the polynomial p, that is the largest jet variable with respect to the ranking of parent(p). If p is a nonzero constant, then the multiplicative identity of parent(p) is returned. If p is the zero polynomial, an error is raised.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

We also provide the usual ngens and nvars methods that respectively return the number of currently tracked jet variables. Finally, we provide the getindex method below to allow for fast access to jet variables from existing ones.

getindexMethod
getindex(var::ActionPolyRingElem, index_shift::Int...)

Given the jet variable var, return the jet variable with jet shifted by index_shift.

Examples

julia> R, u = difference_polynomial_ring(QQ, :u, 2);

julia> u[0,0]
u[0,0]

julia> u_45 = u[4,5]
u[4,5]

julia> u_45[1,0]
u[5,5]

julia> u_45[-3, -2]
u[1,3]
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Basic methods for action polynomial rings

zeroMethod
zero(A::ActionPolyRing)

Return the zero element of the action polynomial ring A.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
oneMethod
one(A::ActionPolyRing)

Return the multiplicative identity of the action polynomial ring A.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
n_action_indeterminatesMethod
n_action_indeterminates(A::ActionPolyRing) -> Int

Return the number of action indeterminates of the action polynomial ring A.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
action_indeterminatesMethod
action_indeterminates(A::ActionPolyRing) -> Vector{Symbol}

Return the action indeterminates of the action polynomial ring A as a vector.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
n_action_mapsMethod
n_action_maps(A::ActionPolyRing) -> Int

Return the number of action indeterminates of the action polynomial ring A.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Iterators

The following iterators are available for elements of action polynomial rings. The entries across the different iterators are guaranteed to match. Moreover, the order of the entries of the iterators depends only on the ranking of the action polynomial ring, leading with the most significant entry.

coefficientsMethod
coefficients(p::ActionPolyRingElem)

Return an iterator for the coefficients of p with respect to the ranking of the parent of p.

Examples

julia> dpr, (a,b,c) = difference_polynomial_ring(ZZ, [:a, :b, :c], 4; partition = [[0,1,1],[1,0,0]]); f = -2*a*b + a*c + 3*b^2;

julia> cf = coefficients(f)
Coefficients iterator of 3*b[0,0,0,0]^2 - 2*a[0,0,0,0]*b[0,0,0,0] + c[0,0,0,0]*a[0,0,0,0]

julia> collect(cf)
3-element Vector{ZZRingElem}:
  3
 -2
  1
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
exponentsMethod
exponents(p::ActionPolyRingElem)

Return an iterator for the exponents of p with respect to the ranking of the parent of p.

Examples

julia> dpr, (a,b,c) = difference_polynomial_ring(ZZ, [:a, :b, :c], 4; partition = [[0,1,1],[1,0,0]]); f = -2*a*b + a*c + 3*b^2;

julia> ef = exponents(f)
Exponents iterator of 3*b[0,0,0,0]^2 - 2*a[0,0,0,0]*b[0,0,0,0] + c[0,0,0,0]*a[0,0,0,0]

julia> collect(ef)
3-element Vector{Vector{Int64}}:
 [2, 0, 0]
 [1, 0, 1]
 [0, 1, 1]
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
monomialsMethod
monomials(p::ActionPolyRingElem)

Return an iterator for the monomials of p with respect to the ranking of the parent of p.

Examples

julia> dpr, (a,b,c) = difference_polynomial_ring(ZZ, [:a, :b, :c], 4; partition = [[0,1,1],[1,0,0]]); f = -2*a*b + a*c + 3*b^2;

julia> mf = monomials(f)
Monomials iterator of 3*b[0,0,0,0]^2 - 2*a[0,0,0,0]*b[0,0,0,0] + c[0,0,0,0]*a[0,0,0,0]

julia> collect(mf)
3-element Vector{DifferencePolyRingElem{ZZRingElem}}:
 b[0,0,0,0]^2
 a[0,0,0,0]*b[0,0,0,0]
 a[0,0,0,0]*c[0,0,0,0]
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
termsMethod
terms(p::ActionPolyRingElem)

Return an iterator for the terms of p with respect to the ranking of the parent of p.

Examples

julia> dpr, (a,b,c) = difference_polynomial_ring(ZZ, [:a, :b, :c], 4; partition = [[0,1,1],[1,0,0]]); f = -2*a*b + a*c + 3*b^2;

julia> tf = terms(f)
Terms iterator of 3*b[0,0,0,0]^2 - 2*a[0,0,0,0]*b[0,0,0,0] + c[0,0,0,0]*a[0,0,0,0]

julia> collect(tf)
3-element Vector{DifferencePolyRingElem{ZZRingElem}}:
 3*b[0,0,0,0]^2
 -2*a[0,0,0,0]*b[0,0,0,0]
 a[0,0,0,0]*c[0,0,0,0]
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Iterator based methods

The following methods are based on the iterators for elements of action polynomial rings.


Basic access to entries of the iterators:

coeffMethod
coeff(p::ActionPolyRingElem, i::Int)

Return coefficient of the i-th term of p.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
exponent_vectorMethod
exponent_vector(p::ActionPolyRingElem, i::Int)

Return the exponent vector of the i-th term of p.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
monomialMethod
monomial(p::ActionPolyRingElem, i::Int)

Return the i-th monomial of p.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
termMethod
term(p::ActionPolyRingElem, i::Int)

Return the i-th term of p.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Access to the first and last entries:

leading_coefficientMethod
leading_coefficient(p::ActionPolyRingElem{T}) -> T

Return the leading coefficient of the polynomial p, i.e. the coefficient of the first (with respect to the ranking of the action polynomial ring containing it) nonzero term.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
leading_monomialMethod
leading_monomial(p::ActionPolyRingElem)

Return the leading monomial of the polynomial p with respect to the ranking of the action polynomial ring containing it.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
leading_termMethod
leading_term(p::ActionPolyRingElem)

Return the leading term of the polynomial p with respect to the ranking of the action polynomial ring containing it.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
trailing_coefficientMethod
trailing_coefficient(p::MPolyRingElem)

Return the trailing coefficient of the polynomial $p$, i.e. the coefficient of the last nonzero term.

source
trailing_coefficient(p::ActionPolyRingElem{T}) -> T

Return the trailing coefficient of the polynomial p, i.e. the coefficient of the last (with respect to the ranking of the action polynomial ring containing it) nonzero term, or zero if the polynomial is zero.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
trailing_monomialMethod
trailing_monomial(p::ActionPolyRingElem)

Return the trailing monomial of the polynomial p with respect to the ranking of the action polynomial ring containing it.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
trailing_termMethod
trailing_term(p::ActionPolyRingElem)

Return the leading term of the polynomial p with respect to the ranking of the action polynomial ring containing it.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Other useful methods:

is_monomialMethod
is_monomial(p::ActionPolyRingElem)

Return true if p is a monomial and false otherwise.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
is_termMethod
is_term(p::ActionPolyRingElem)

Return true if p is a term, i.e. a non-zero multiple of a monomial, and false otherwise.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
initialMethod
initial(p::ActionPolyRingElem)

Return the initial of the polynomial p, i.e. the leading coefficient of p regarded as a univariate polynomial in its leader. If p is a nonzero constant, p itself is returned. If p is the zero polynomial, an error is raised.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
lengthMethod
length(p::ActionPolyRingElem) -> Int

Return the length of p, i.e. the number of terms of p.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
tailMethod
tail(p::ActionPolyRingElem)

Return the tail of p, i.e. p, i.e. return p without its leading term with respect to the ranking of the action polynomial ring containing it.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Miscellaneous

In this subsection, we enumerate methods that might be useful but primarily exists, because they already do for other polynomial types.

Constant polynomials

is_constantMethod
is_constant(p::ActionPolyRingElem)

Return true if p is a degree zero polynomial or the zero polynomial, i.e. a constant polynomial.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
constant_coefficientMethod
constant_coefficient(p::ActionPolyRingElem{T}) -> T

Return the constant coefficient of p. Does not throw an error for the zero polynomial like trailing_coefficient.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Degree

degreeMethod
degree(p::ActionPolyRingElem, i::Int, jet::Vector{Int}) -> Int

Return the degree of the polynomial p in the jet variable specified by i and jet. If this jet variable is valid but still untracked, return $0$.

This method allows all versions described in Specifying jet variables; see the online documentation.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
degreesMethod
degrees(p::ActionPolyRingElem)

Return an array of the degrees of the polynomial p in terms of each jet variable. The jet variables are sorted with respect to the ranking of the action polynomial ring containing p, leading with the largest variable.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
total_degreeMethod
total_degree(p::ActionPolyRingElem) -> Int

Return the total degree of p.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Derivative

derivativeMethod
derivative(p::ActionPolyRing, i::Int, jet::Vector{Int})

Return the derivative of p with respect to the jet variable specified by i and jet.

This method allows all versions described in Specifying jet variables; see the online documentation.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Discriminant and resultant

discriminantMethod
discriminant(p::ActionPolyRingElem)

Return the discriminant of p.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
resultantMethod
resultant(f::ActionPolyRingElem, g::ActionPolyRingElem, i::Int, jet::Vector{Int})

Return the resultant of f and g regarded as univariate polynomials in the jet variable specified by i and jet.

This method allows all versions described in Specifying jet variables; see the online documentation.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Evaluation

The following function allows evaluation of a polynomial at all its variables. The result is always in the ring that a product of a coefficient and one of the values belongs to, i.e. if all the values are in the coefficient ring, the result of the evaluation will be too.

evaluateMethod
evaluate(a::ActionPolyRingElem{T}, vals::Vector{V}) where {T <: RingElement, V <: Ringelement}

Evaluate the polynomial expression by substituting in the supplied values in the array vals for each of the tracked jet variables. The evaluation will succeed if multiplication is defined between elements of the coefficient ring of a and elements of vals.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

The following functions allow evaluation of a polynomial at some of its variables. Note that the result will be a product of values and an element of the polynomial ring, i.e. even if all the values are in the coefficient ring and all variables are given values, the result will be a constant polynomial, not a coefficient.

evaluateMethod
evaluate(a::ActionPolyRingElem{T}, vars::Vector{Int}, vals::Vector{V}) where {T <: RingElement, V <: Ringelement}

Evaluate the polynomial expression by substituting in the supplied values in the array vals for the corresponding jet variables specified by the indices given by the array vars; see Specifying jet variables. The evaluation will succeed if multiplication is defined between elements of the coefficient ring of a and elements of vals.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
evaluateMethod
evaluate(a::ActionPolyRingElem, vars::Vector{ActionPolyRingElem}, vals::Vector{V}) where {V <: Ringelement}

Evaluate the polynomial expression by substituting in the supplied values in the array vals for the corresponding jet variables from the vector vars; see Specifying jet variables. The evaluation will succeed if multiplication is defined between elements of the coefficient ring of a and elements of vals.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Univariate polynomials

is_univariateMethod
is_univariate(p::ActionPolyRingElem)

Return true if p is a polynomial in a single jet variable and false otherwise.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
to_univariateMethod
to_univariate(R::PolyRing{T}, p::ActionPolyRingElem{T}) where {T <: RingElement}

Assuming the polynomial p is actually a univariate polynomial, convert the polynomial to a univariate polynomial in the given univariate polynomial ring R. An exception is raised if the polynomial p involves more than one jet variable.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
to_univariateMethod
to_univariate(p::ActionPolyRingElem)

Assuming the polynomial p is actually a univariate polynomial in the jet variable x, convert the polynomial to a univariate polynomial in a univariate polynomial ring over the same coefficient ring in the variable x. If p is constant, it is considered to be a polynomial in the largest tracked jet variable of its parent. An exception is raised if the polynomial p involves more than one jet variable.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
univariate_coefficientsMethod
univariate_coefficients(p::ActionPolyRingElem, i::Int, jet::Vector{Int})

Return the coefficient vector of p regarded as a univariate polynomial in the jet variable specified by i and jet, leading with the constant coefficient.

This method allows all versions described in Specifying jet variables; see the online documentation.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
univariate_leading_coefficientMethod
univariate_leading_coefficient(p::ActionPolyRingElem, i::Int, jet::Vector{Int})

Return the leading coefficient of p regarded as a univariate polynomial in the jet variable specified by i and jet. Note that in case where the jet variable coincides with the leader of p, this result is just the initial of p; see initial.

This method allows all versions described in Specifying jet variables; see the online documentation.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

Polynomial reduction methods

The following two methods pseudorem and pseudodivrem for the pseudo-division of an action polynomial $p$ by another action polynomial $q$ form the backbone of most reduction methods. Recall that if $s$ is the pseudo-quotient and the pseudo-remainder $r$ of $p$ by $q$, we have the identity

\[\operatorname{init}(q)^a p = s \cdot q + r,\]

with $\operatorname{deg}_{v}(r) < \operatorname{deg}_{v}(q)$ or $r = 0$, $v = \operatorname{ld}(q)$ and some $a \in \mathbb{N}_0$. In order to avoid coefficient swell, both methods specifically return the values for $r$ and $s$, where the exponent $a$ is minimal. For additional flexibility, both methods also allow the user to specify with respect to which jet variable the pseudo-division should be performed, so they are not just restricted to pseudo-division by the leader of the second input. However, if no such jet variable is specified, the leader is used by default.

pseudoremMethod
pseudorem(p::PolyT, q::PolyT, i::Int, jet::Vector{Int}) where {PolyT <: ActionPolyRingElem} -> PolyT

Return the algebraic pseudo-remainder of p divided by q with respect to the jet variable specified by i and jet. If no jet variable is specified then division is performed with respect to the leader of q, even allowing q to be a nonzero constant. This method performs division by using a lazy pre-multiplication by the initial of q at each step, only multiplying the remainder when necessary.

This method allows all versions described in Specifying jet variables; see the online documentation.

Examples

julia> dpr, (x, y) = differential_polynomial_ring(QQ, [:x, :y], 1); p, q = (x^2 + y, y*x + 1)
(x[0]^2 + y[0], y[0]*x[0] + 1)

julia> pseudorem(p, q, x)
y[0]^3 + 1

julia> pseudorem(p, q, y)
x[0]^3 - 1

Note that in this example, the leader of q is x, so it need not be specified for pseudo-division with respect to x:

julia> leader(q) == x
true

julia> pseudorem(p, q)
y[0]^3 + 1

Finally, the pseudoremainder of any polynomial with respect to a non-zero constant is always zero.

julia> pseudorem(p, dpr(1))
0
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
pseudodivremMethod
pseudodivrem(p::PolyT, q::PolyT, i::Int, jet::Vector{Int}) where {PolyT <: ActionPolyRingElem} -> Tuple{PolyT, PolyT}

Return the pair (s, r) where s is the pseudo-quotient and r is the pseudo-remainder of p by q with respect to the jet variable specified by i and jet. If no jet variable is specified then division is performed with respect to the leader of q, even allowing q to be a nonzero constant. The number of pre-multiplications by the leading coefficient of q in this jet variable is minimised, i.e. we have lc(q)^k * p = s * q + r where the integer k >= 0 is minimal and lc(q) is the above mentioned leading coefficient.

This method allows all versions described in Specifying jet variables; see the online documentation.

Examples

julia> dpr, (x, y) = differential_polynomial_ring(QQ, [:x, :y], 1); p, q = (x^2 + y, y*x + 1)
(x[0]^2 + y[0], y[0]*x[0] + 1)

julia> pseudodivrem(p, q, x)
(y[0]*x[0] - 1, y[0]^3 + 1)

julia> y^2 * p == (y*x - 1) * q + (y^3 + 1)
true

julia> pseudodivrem(p, q, y)
(1, x[0]^3 - 1)

julia> x * p == 1 * q + (x^3 - 1)
true

Note that in this example, the leader of q is x, so it need not be specified for pseudo-division with respect to x:

julia> leader(q) == x
true

julia> pseudodivrem(p, q)
(y[0]*x[0] - 1, y[0]^3 + 1)

Finally, if the second argument is a non-zero constant, then it depends on the first argument being divisible by said constant, whether the pseudo-quotient is the first argument divided by the second one or just the first argument. The pseudo-remainder is always equal to zero in this case.

julia> pseudodivrem(p, dpr(2))
(1//2*x[0]^2 + 1//2*y[0], 0)
Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

We provide the following methods for reducing the action polynomial $p$ with respect to the action polynomial $q$ and to verify reducedness:

is_partially_reducedMethod
is_partially_reduced(p::ActionPolyRingElem, q::ActionPolyRingElem)

Return true if the action polynomial p is partially reduced with respect to the nonzero action polynomial q.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
is_reducedMethod
is_reduced(p::ActionPolyRingElem, q::ActionPolyRingElem)

Return true if the polynomial p is fully reduced with respect to the non-constant polynomial q. This means p is partially reduced with respect to q, and the degree of p in the leader of q is strictly less than the degree of q in its leader.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
partially_reduceMethod
partially_reduce(p::ActionPolyRingElem, q::ActionPolyRingElem)

Return the partial remainder of p with respect to the non-zero polynomial q, by performing successive pseudo-divisions of p by proper derivatives (or shifts) of q. This means that the returned polynomial has strictly smaller degree in each jet variable that is a proper derivative (or shift) of the leader of q. If q is a non-zero constant then the zero polynomial is returned.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
reduceMethod
reduce(p::ActionPolyRingElem, q::ActionPolyRingElem)

Return the full remainder of p with respect to the nonzero polynomial q. This remainder is reduced with respect to q in the sense that the degree of p in each derivative (or shift) of the leader of q is strictly smaller than the degree of the respective derivative (or shift) of q in that same jet variable. If q is a nonzero constant then the zero polynomial is returned.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source

We also provide similar methods for the set-related notions of reducedness:

is_partially_reducedMethod
is_partially_reduced(p::ActionPolyRingElem, S::Vector{<:ActionPolyRingElem})

Return true if p is partially reduced with respect to every element in the set S.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
is_reducedMethod
is_reduced(p::ActionPolyRingElem, S::Vector{<:ActionPolyRingElem})

Return true if p is fully reduced with respect to every element in the set S.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
is_autoreducedMethod
is_autoreduced(S::Vector{<:ActionPolyRingElem})

Return true if S is an autoreduced set. A set is autoreduced if every polynomial in the set is fully reduced with respect to all other polynomials in the set, and the set is sorted by Ritt ordering.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
partially_reduceMethod
partially_reduce(p::ActionPolyRingElem, S::Vector{ActionPolyRingElem})

Partially reduce the action polynomial p with respect to the vector S. This is done by pre-sorting S with respect to Ritt ordering and then performing top-down partial reductions of p by the remaining elements of S until no further reductions are possible.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
reduceMethod
reduce(p::ActionPolyRingElem, S::Vector{ActionPolyRingElem})

Reduce the action polynomial p with respect to the vector S. This is done by pre-sorting S with respect to Ritt ordering and then performing top-down reductions of p by the elements of S until no further reductions are possible.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source
autoreduceMethod
autoreduce(S::Vector{ActionPolyRingElem})

Compute an autoreduced set from the vector of action polynomials S. If at any point in the reduction process a nonzero constant is discovered, the vector containing just this constant is returned.

Experimental

This function is part of the experimental code in Oscar. Please read here for more details.

source