The subresultants give the Rothstein-Trager logarithms full
This proof shows: correctness, termination.
Let K be a field of characteristic 0 with algebraic closure K, and A,D∈K[x] with D square-free, n=degD≥1, degA<n and A=0. Let β1,…,βn∈K be the roots of D, which are distinct, so D′(βk)=0. Write Bt=A−tD′, a polynomial in x of formal degree n−1 with coefficients in K[t], and rk=A(βk)/D′(βk).
Fact 1 (residues). DA=k=1∑nx−βkrk.
Proof. This is the partial fraction decomposition over K with simple poles. The coefficient of 1/(x−βk) is the limit of (x−βk)A/D at βk, which is A(βk)/D′(βk) because D′(βk)=lim(D(x)−D(βk))/(x−βk). □
Fact 2 (the resultant). R(t)=resx(D,Bt)=c∏k=1n(t−rk) with c∈K×.
Proof. For D of degree n and B of formal degree n−1, res(D,B)=lc(D)n−1∏kB(βk). This is an identity of polynomials in the coefficients of B, so it holds for Bt over K[t]. Here Bt(βk)=A(βk)−tD′(βk)=−D′(βk)(t−rk), so c=lc(D)n−1∏k(−D′(βk)), which is nonzero, and c∈K because R∈K[t] has leading coefficient c. □
For a root α of R let m(α)=#{k:rk=α}, its multiplicity by Fact 2, and Gα=∏k:rk=α(x−βk).
Fact 3. Gα is the monic gcd(D,Bα), of degree m(α).
Proof. D is square-free, so its gcd with any polynomial is the product of x−βk over the common roots βk. And Bα(βk)=0 exactly when A(βk)=αD′(βk), that is rk=α. □
Fact 4 (Rothstein-Trager). dxdR(α)=0∑αlogGα=DA.
Proof. dxdlogGα=Gα′/Gα=∑k:rk=α1/(x−βk). Each k belongs to exactly one α, namely rk, so the sum is ∑krk/(x−βk)=A/D by Fact 1. □
Fact 5 (gcd property of subresultants). Let P,Q∈K[x], degP=p, Q of formal degree q<p, and let Sj(P,Q) be the subresultants defined by determinants for these formal degrees, with Sq=Q. If g=gcd(P,Q) has degree e≤q, then Sj(P,Q)=0 for j<e and Se(P,Q) is a nonzero constant multiple of g. (Von zur Gathen and Gerhard, Chapter 6; Lazard and Rioboo state the case needed here.) Moreover, for a ring homomorphism φ that keeps lc(P)=0, φ(Sj(P,Q))=Sj(φP,φQ) with the same formal degrees, because each Sj is built from determinants whose entries are coefficients of P and Q.
Theorem. Let i≥1 with degQi>0, let Si be the polynomial of line L4 or L5, and let α be a root of Qi. Then lcxSi(α)=0, and Si(α,x)=lcxSi(α)⋅Gα.
Proof. By line L2, the roots of Qi are the roots of R of multiplicity exactly i, so m(α)=i, and degGα=i by Fact 3.
If i=n, then Gα has degree n and divides D, so Gα=D/lc(D), and Sn=D satisfies the claim.
If i<n, apply Fact 5 to φ:t↦α, which keeps lc(D), a nonzero element of K. So Si(α,x)=Si(D,Bα), the subresultant for formal degrees n and n−1. Since gcd(D,Bα)=Gα has degree i≤n−1, Fact 5 says Si(D,Bα)=λGα for some λ=0. The polynomial Si has degree at most i in x, so its coefficient of xi is lcxSi, and comparing the coefficients of xi gives λ=lcxSi(α)=0, since Gα is monic of degree i. ■
Lines L6 to L8. By the theorem, lcxSi does not vanish at any root of Qi, so gcd(Aj,Qi)=1 for every square-free factor Aj of lcxSi, and line L7 divides by 1. Since Qi is square-free and lcxSi has no common root with it, lcxSi is invertible modulo Qi. Reducing the coefficients modulo Qi and multiplying by this inverse does not change the values at roots of Qi except for dividing by lcxSi(α). So after line L8, Si(α,x)=Gα for every root α of Qi.
Correctness of the output. The roots of R are partitioned by multiplicity among the Qi, which are square-free and pairwise coprime. So the sum of line L9 is ∑R(α)=0αlogGα, and its derivative is A/D by Fact 4.
Termination. The subresultants are finitely many determinants or a finite pseudo-remainder sequence, the square-free factorizations and gcds are Euclidean computations in K[t], and the loop of line L3 has at most n passes. ■