 LastSubresultant - Maple Help

RegularChains[ChainTools]

 SubresultantChain
 subresultant chain of two multivariate polynomials
 LastSubresultant
 last subresultant of two multivariate polynomials
 SubresultantOfIndex
 subresultant of given index for two multivariate polynomials Calling Sequence SubresultantChain(f1, f2, v, R) SubresultantChain(f1, f2, v, R, 'representation'=value) LastSubresultant(src, R) SubresultantOfIndex(ind, src, R) Parameters

 f1 - polynomial of R f2 - polynomial of R v - variable of R R - polynomial ring 'representation'='value' - (optional) specify representation; value can be 'MonomialBasis', 'ByValues', or 'BezoutMatrix' src - subresultant chain data structure ind - non-negative integer Description

 • The command SubresultantChain(f1, f2, v, R) returns a data structure which encodes the subresultant chain of f1 and f2 regarded as univariate polynomials in v.
 • f1 and f2 must have main variable v and $\mathrm{degree}\left(\mathrm{f2},v\right)\le \mathrm{degree}\left(\mathrm{f1},v\right)$ must hold.
 • If the option 'representation'='MonomialBasis' is specified then this subresultant chain is encoded as the subresultants of f1 and f2 expressed over the monomial basis of R. That is, in simpler words, the subresultants of f1 and f2 are given in the standard way, by monomials and coefficients. This method is well-suited if the coefficients of f1 and f2 are in a prime field or if the coefficients of f1 and f2 w.r.t. v are neither very sparse nor very dense.
 • If the option 'representation'='BezoutMatrix' is specified then the Bezout Matrix of f1 and f2 is constructed. When SubresultantOfIndex is invoked the corresponding subresultant is obtained from appropriate minors of the Bezout Matrix of f1 and f2. This method is well-suited if the coefficients of f1 and f2 w.r.t. v are very sparse.
 • If the option 'representation'='ByValues' is specified then all the variables of f1 and f2 except v are specialized at sufficiently many good values in order to interpolate the subresultants of f1 and f2, when needed. Here, good specialization value means a point at which the initials of f1 and f2 do not vanish. This option uses FFT-based polynomial arithmetic, which implies that the ring R should satisfy the hypotheses of the commands from the FastArithmeticTools subpackage. This method is well-suited if the coefficients of f1 and f2 w.r.t. v are very dense.
 • By default, the option 'representation'='MonomialBasis' is used.
 • The data structure returned by SubresultantChain(f1, f2, v, R) can be used to compute the last subresultant of f1 and f2 with respect to v, that is, the non-zero subresultant of smallest index. More precisely, the command LastSubresultant(src, R) returns the non-zero subresultant of smallest index from the subresultant chain data structure encoded by src.
 • This data structure can be used to compute a subresultant of f1 and f2 (with respect to v) of a given index ind by means of the call SubresultantOfIndex(ind, src, R). Note that ind must be non-negative and less than $\mathrm{degree}\left(\mathrm{f2},v\right)$
 • This data structure can also be used to compute a regular GCD of f1 and f2 modulo the saturated ideal of a regular chain, by means of the command RegularGcd. In this case, the resultant of f1 and f2 must be zero modulo the saturated ideal of this regular chain. Examples

 > $\mathrm{with}\left(\mathrm{RegularChains}\right):$
 > $\mathrm{with}\left(\mathrm{ChainTools}\right):$

Define a ring of polynomials.

 > $R≔\mathrm{PolynomialRing}\left(\left[y,x\right]\right)$
 ${R}{≔}{\mathrm{polynomial_ring}}$ (1)

Define two polynomials of R.

 > $\mathrm{f1}≔\left({y}^{2}+6\right)\left(x-1\right)-y\left({x}^{2}+1\right)$
 ${\mathrm{f1}}{≔}\left({{y}}^{{2}}{+}{6}\right){}\left({x}{-}{1}\right){-}{y}{}\left({{x}}^{{2}}{+}{1}\right)$ (2)
 > $\mathrm{f2}≔\left({x}^{2}+6\right)\left(y-1\right)-x\left({y}^{2}+1\right)$
 ${\mathrm{f2}}{≔}\left({{x}}^{{2}}{+}{6}\right){}\left({y}{-}{1}\right){-}{x}{}\left({{y}}^{{2}}{+}{1}\right)$ (3)

Compute their subresultant chain

 > $\mathrm{src}≔\mathrm{SubresultantChain}\left(\mathrm{f1},\mathrm{f2},y,R\right)$
 ${\mathrm{src}}{≔}{\mathrm{subresultant_chain}}$ (4)

We can choose different encodings to the computed subresultant chain

 > $\mathrm{srcBezout}≔\mathrm{SubresultantChain}\left(\mathrm{f1},\mathrm{f2},y,R,\mathrm{representation}='\mathrm{BezoutMatrix}'\right);$$\mathrm{op}\left(\mathrm{srcBezout}\right)$
 ${\mathrm{srcBezout}}{≔}{\mathrm{subresultant_chain}}$
 ${table}{}\left(\left[{\mathrm{representation}}{=}{\mathrm{BezoutMatrix}}{,}{\mathrm{SRC_MDEG}}{=}{1}{,}{\mathrm{SRC_POLYQ}}{=}{{x}}^{{2}}{}{y}{-}{x}{}{{y}}^{{2}}{-}{{x}}^{{2}}{-}{x}{+}{6}{}{y}{-}{6}{,}{\mathrm{SRC_MVAR}}{=}{y}{,}{\mathrm{SRC_POLYP}}{=}{-}{{x}}^{{2}}{}{y}{+}{x}{}{{y}}^{{2}}{-}{{y}}^{{2}}{+}{6}{}{x}{-}{y}{-}{6}{,}{\mathrm{SRC_MATRIX}}{=}\left[\begin{array}{cc}{-}{{x}}^{{2}}{+}{5}{}{x}{-}{6}& {-}{{x}}^{{3}}{+}{6}{}{{x}}^{{2}}{-}{11}{}{x}{+}{6}\\ {-}{{x}}^{{3}}{+}{6}{}{{x}}^{{2}}{-}{11}{}{x}{+}{6}& {{x}}^{{4}}{-}{5}{}{{x}}^{{3}}{+}{13}{}{{x}}^{{2}}{-}{35}{}{x}{+}{42}\end{array}\right]{,}{\mathrm{type}}{=}{\mathrm{subresultant_chain}}\right]\right)$ (5)
 > $\mathrm{srcMono}≔\mathrm{SubresultantChain}\left(\mathrm{f1},\mathrm{f2},y,R,\mathrm{representation}='\mathrm{MonomialBasis}'\right);$$\mathrm{op}\left(\mathrm{srcMono}\right)$
 ${\mathrm{srcMono}}{≔}{\mathrm{subresultant_chain}}$
 ${table}{}\left(\left[{\mathrm{representation}}{=}{\mathrm{MonomialBasis}}{,}{\mathrm{subresultant_chain_vector}}{=}\left[{2}{}{{x}}^{{6}}{-}{22}{}{{x}}^{{5}}{+}{102}{}{{x}}^{{4}}{-}{274}{}{{x}}^{{3}}{+}{488}{}{{x}}^{{2}}{-}{552}{}{x}{+}{288}{,}{-}{{x}}^{{3}}{-}{{x}}^{{2}}{}{y}{+}{6}{}{{x}}^{{2}}{+}{5}{}{x}{}{y}{-}{11}{}{x}{-}{6}{}{y}{+}{6}{,}{{x}}^{{2}}{}{y}{-}{x}{}{{y}}^{{2}}{-}{{x}}^{{2}}{-}{x}{+}{6}{}{y}{-}{6}{,}{-}{{x}}^{{2}}{}{y}{+}{x}{}{{y}}^{{2}}{-}{{y}}^{{2}}{+}{6}{}{x}{-}{y}{-}{6}\right]{,}{\mathrm{SRC_MDEG}}{=}{1}{,}{\mathrm{SRC_POLYQ}}{=}{{x}}^{{2}}{}{y}{-}{x}{}{{y}}^{{2}}{-}{{x}}^{{2}}{-}{x}{+}{6}{}{y}{-}{6}{,}{\mathrm{SRC_MVAR}}{=}{y}{,}{\mathrm{SRC_POLYP}}{=}{-}{{x}}^{{2}}{}{y}{+}{x}{}{{y}}^{{2}}{-}{{y}}^{{2}}{+}{6}{}{x}{-}{y}{-}{6}{,}{\mathrm{type}}{=}{\mathrm{subresultant_chain}}\right]\right)$ (6)

Note that ByValues representation is used only for modpn ring.

 > $p≔962592769:$
 > $\mathrm{modpnR}≔\mathrm{PolynomialRing}\left(\left[y,x\right],p\right):$
 > $\mathrm{srcValues}≔\mathrm{SubresultantChain}\left(\mathrm{f1},\mathrm{f2},y,\mathrm{modpnR},\mathrm{representation}='\mathrm{ByValues}'\right);$$\mathrm{op}\left(\mathrm{srcValues}\right)$
 ${\mathrm{srcValues}}{≔}{\mathrm{subresultant_chain}}$
 ${table}{}\left(\left[{\mathrm{representation}}{=}{\mathrm{ByValues}}{,}{\mathrm{SRC_MDEG}}{=}{1}{,}{\mathrm{SRC_POLYQ}}{=}{962592768}{}{{x}}^{{2}}{}{y}{+}{x}{}{{y}}^{{2}}{+}{{x}}^{{2}}{+}{x}{+}{962592763}{}{y}{+}{6}{,}{\mathrm{subresultant_chain_scube}}{=}{\mathrm{subresultant_chain_specialization_cube}}{,}{\mathrm{SRC_MVAR}}{=}{y}{,}{\mathrm{SRC_POLYP}}{=}{962592768}{}{{x}}^{{2}}{}{y}{+}{x}{}{{y}}^{{2}}{+}{962592768}{}{{y}}^{{2}}{+}{6}{}{x}{+}{962592768}{}{y}{+}{962592763}{,}{\mathrm{type}}{=}{\mathrm{subresultant_chain}}\right]\right)$ (7)

Extract the last non-zero subresultant

 > $\mathrm{lsr}≔\mathrm{LastSubresultant}\left(\mathrm{src},R\right)$
 ${\mathrm{lsr}}{≔}{2}{}{{x}}^{{6}}{-}{22}{}{{x}}^{{5}}{+}{102}{}{{x}}^{{4}}{-}{274}{}{{x}}^{{3}}{+}{488}{}{{x}}^{{2}}{-}{552}{}{x}{+}{288}$ (8)

which is also the subresultant of index 0 in this example

 > $\mathrm{res}≔\mathrm{SubresultantOfIndex}\left(0,\mathrm{src},R\right)$
 ${\mathrm{res}}{≔}{2}{}{{x}}^{{6}}{-}{22}{}{{x}}^{{5}}{+}{102}{}{{x}}^{{4}}{-}{274}{}{{x}}^{{3}}{+}{488}{}{{x}}^{{2}}{-}{552}{}{x}{+}{288}$ (9)
 > $\mathrm{expand}\left(\mathrm{lsr}-\mathrm{res}\right)$
 ${0}$ (10)

Define a regular chain with res. Note that res is not required to be irreducible or even square free.

 > $\mathrm{rc}≔\mathrm{Chain}\left(\left[\mathrm{res}\right],\mathrm{Empty}\left(R\right),R\right)$
 ${\mathrm{rc}}{≔}{\mathrm{regular_chain}}$ (11)
 > $\mathrm{factor}\left(\mathrm{res}\right)$
 ${2}{}\left({{x}}^{{2}}{-}{x}{+}{4}\right){}{\left({x}{-}{2}\right)}^{{2}}{}{\left({x}{-}{3}\right)}^{{2}}$ (12)

Compute a regular GCD of f1 and f2 modulo rc

 > $\mathrm{RegularGcd}\left(\mathrm{src},\mathrm{rc},R\right)$
 $\left[\left[{-}{{x}}^{{3}}{-}{{x}}^{{2}}{}{y}{+}{6}{}{{x}}^{{2}}{+}{5}{}{x}{}{y}{-}{11}{}{x}{-}{6}{}{y}{+}{6}{,}{\mathrm{regular_chain}}\right]{,}\left[{{x}}^{{2}}{}{y}{-}{x}{}{{y}}^{{2}}{-}{{x}}^{{2}}{-}{x}{+}{6}{}{y}{-}{6}{,}{\mathrm{regular_chain}}\right]{,}\left[{{x}}^{{2}}{}{y}{-}{x}{}{{y}}^{{2}}{-}{{x}}^{{2}}{-}{x}{+}{6}{}{y}{-}{6}{,}{\mathrm{regular_chain}}\right]{,}\left[{{x}}^{{2}}{}{y}{-}{x}{}{{y}}^{{2}}{-}{{x}}^{{2}}{-}{x}{+}{6}{}{y}{-}{6}{,}{\mathrm{regular_chain}}\right]{,}\left[{{x}}^{{2}}{}{y}{-}{x}{}{{y}}^{{2}}{-}{{x}}^{{2}}{-}{x}{+}{6}{}{y}{-}{6}{,}{\mathrm{regular_chain}}\right]\right]$ (13)