Correctness of the Sylvester matrix operations and the rank formula full
This proof shows: correctness.
Setting. R is an integral domain with field of fractions F. f=∑k=0makxk and g=∑k=0nbkxk have formal degrees m,n≥0, and N=m+n. Column c of Syl(f,g) stands for xN−1−c. For d≥0, Pd is the F-space of polynomials of degree less than d, with the basis xd−1,…,x,1.
ENTRY. Row i<n is meant to be the coefficient vector of xn−1−if=∑kakxk+n−1−i. Column c stands for xN−1−c, so the entry is ak with k+n−1−i=N−1−c, that is k=m−(c−i), when 0≤k≤m, and 0 otherwise. This is line E3. In the same way, row n+j is xm−1−jg, with the entry bn−(c−j), as on line E4. □
COMBINE. Let s=∑i<nsixn−1−i∈Pn and t=∑j<mtjxm−1−j∈Pm. The row vector (s0,…,sn−1,t0,…,tm−1) times Syl(f,g) is ∑isirowi+∑jtjrown+j. By the claim on ENTRY, this is the coefficient vector of ∑isixn−1−if+∑jtjxm−1−jg=sf+tg, which has degree less than N. Lines C3 and C4 add siam−k and tjbn−k at position i+k and j+k. Position p stands for xN−1−p, and xn−1−i⋅xm−k=xN−1−(i+k), so these are exactly the terms of the two products. □
So Syl(f,g) is the matrix of the F-linear map
φ:Pn×Pm→PN,(s,t)↦sf+tg, acting on row vectors, and rankSyl(f,g)=dimimφ=N−dimkerφ.
DET. Lines L2 to L11 are the Bareiss algorithm on the dense matrix. Its correctness proof shows: after the step for pivot k, each entry A[i][j] with i,j>k equals the minor of the row-permuted input on the rows 0,…,k,i and the columns 0,…,k,j, which is an element of R, and the division on line L9 is exact because R is an integral domain and the divisor is the previous pivot minor, which is nonzero. If line L6 finds no pivot in column k, then the rows k,…,N−1 of the current matrix are zero in column k, and the current matrix is upper block triangular with a zero column below the diagonal, so the determinant is 0. Otherwise, at the end A[N−1][N−1] is the full determinant of the row-permuted input. Each swap on line L7 changes the sign of the determinant, and sign records this. Line L1 returns det of the empty matrix, which is 1. So DET returns detSyl(f,g). □
Rank formula. Claim. If am=0 or bn=0, then rankSyl(f,g)=m+n−deggcd(f,g), where gcd(f,0)=f and the gcd is taken in F[x].
Proof. By symmetry (swapping f and g permutes the rows and does not change the rank) assume am=0, so degf=m. If g=0, then gcd(f,g)=f has degree m, and kerφ={(s,t):sf=0}={0}×Pm has dimension m, so the rank is n, as claimed. Now let g=0, h=gcd(f,g) of degree e, f=hf1 and g=hg1 with gcd(f1,g1)=1 and degf1=m−e.
Let (s,t)∈kerφ. Then sf1=−tg1. So f1 divides tg1, and since f1 and g1 are coprime, f1 divides t: t=qf1 for some q∈F[x]. Then sf1=−qf1g1, so s=−qg1. The condition degt<m means degq<m−degf1=e (or q=0). Conversely, every q∈Pe gives t=qf1 with degt<e+m−e=m and s=−qg1 with degs<e+degg1=degg≤n, and (s,t)∈kerφ. The map q↦(−qg1,qf1) is linear and injective, because f1=0. So dimkerφ=dimPe=e, and the rank is m+n−e. □
Consequence. When am=0 or bn=0, Resm,n(f,g)=detSyl(f,g)=0 if and only if the rank is below N, which is if and only if deggcd(f,g)≥1. When am=bn=0, column 0 is zero, and the determinant is 0. ■