Algorithm Search⌘K

Proofs: Hermite reduction

These are the human proofs of Hermite reduction, at full length.

Hermite reduction returns g and a squarefree remainder with A/D = g' + a/d full

This proof shows: correctness, termination.

Let KK be a field of characteristic 0 and D∈K[x]D \in K[x] nonzero, with squarefree factorization D=c∏i=1mDi iD = c \prod_{i=1}^{m} D_i^{\,i}, where c∈Kc \in K, the DiD_i are monic, squarefree and pairwise coprime, and Dm≠1D_m \ne 1. All gcds are monic.

Lemma 1. For a polynomial E=c∏iEi iE = c \prod_i E_i^{\,i} of this form, gcd⁡(E,E′)=∏iEi i−1\gcd(E, E') = \prod_i E_i^{\,i-1}, and E/gcd⁡(E,E′)E / \gcd(E, E') is c∏iEic \prod_i E_i, a squarefree polynomial.

Proof. Let pp be a monic irreducible factor of EiE_i, so pp divides EE exactly ii times. Write E=piuE = p^i u with p∤up \nmid u. Then E′=pi−1(ip′u+pu′)E' = p^{i-1}(i p' u + p u'). Since deg⁡p′<deg⁡p\deg p' < \deg p and p′≠0p' \ne 0 in characteristic 0, and p∤up \nmid u, pp does not divide ip′ui p' u, so it does not divide ip′u+pu′i p' u + p u'. Hence pp divides E′E' exactly i−1i - 1 times, and gcd⁡(E,E′)\gcd(E, E') contains pp exactly i−1i - 1 times. Irreducible factors of E′E' that do not divide EE do not enter the gcd. □\square

Write Dk−D^-_k for the value of D−D^- at the start of pass kk of the loop, k=1,2,…k = 1, 2, \ldots. By Lemma 1, D1−=∏iDi i−1D^-_1 = \prod_i D_i^{\,i-1} and D∗=c∏iDiD^* = c \prod_i D_i, and by induction, applying Lemma 1 to Dk−D^-_k in line L4,

Dk−=∏i≥kDi i−k,Dk−∗=∏i>kDi,Dk−−=Dk+1−.D^-_k = \prod_{i \ge k} D_i^{\,i - k}, \qquad D^{-*}_k = \prod_{i > k} D_i, \qquad D^{--}_k = D^-_{k+1}.

Lemma 2 (line L5 is solvable). Let Fk=−D∗Dk−′/Dk−F_k = -D^* D_k^{-\prime} / D^-_k. Then FkF_k is a polynomial and gcd⁡(Fk,Dk−∗)=1\gcd(F_k, D^{-*}_k) = 1. Hence there are unique B,CB, C with BFk+CDk−∗=AB F_k + C D^{-*}_k = A and deg⁡B<deg⁡Dk−∗\deg B < \deg D^{-*}_k.

Proof. From the formula for Dk−D^-_k, logarithmic differentiation gives Dk−′/Dk−=∑i>k(i−k)Di′/DiD_k^{-\prime} / D^-_k = \sum_{i > k} (i - k) D_i' / D_i. Multiplying by D∗=c∏jDjD^* = c \prod_j D_j gives Fk=−c∑i>k(i−k)Di′∏j≠iDjF_k = -c \sum_{i > k} (i - k) D_i' \prod_{j \ne i} D_j, a polynomial. Let pp be an irreducible factor of Dk−∗D^{-*}_k, so p∣Dlp \mid D_l for one l>kl > k. Every term of the sum with i≠li \ne l contains the factor DlD_l, so it is divisible by pp. The term with i=li = l is (l−k)Dl′∏j≠lDj(l - k) D_l' \prod_{j \ne l} D_j. Here l−k≠0l - k \ne 0 in characteristic 0, p∤Dl′p \nmid D_l' because DlD_l is squarefree, and p∤Djp \nmid D_j for j≠lj \ne l because the DjD_j are pairwise coprime. So p∤Fkp \nmid F_k. Therefore FkF_k and Dk−∗D^{-*}_k are coprime. The extended Euclidean algorithm gives s,ts, t with sFk+tDk−∗=1s F_k + t D^{-*}_k = 1; then B=(sA) mod Dk−∗B = (s A) \bmod D^{-*}_k and C=(A−BFk)/Dk−∗C = (A - B F_k)/D^{-*}_k satisfy the equation, the division being exact because BFk≡sFkA≡AB F_k \equiv s F_k A \equiv A modulo Dk−∗D^{-*}_k. If (B1,C1)(B_1, C_1) is another solution with the degree bound, then (B−B1)Fk=(C1−C)Dk−∗(B - B_1) F_k = (C_1 - C) D^{-*}_k, so Dk−∗∣B−B1D^{-*}_k \mid B - B_1 by coprimality, and the degree bound gives B=B1B = B_1, hence C=C1C = C_1. □\square

Lemma 3 (one pass). Suppose that before pass kk, Ain/D=g′+A/(D∗Dk−)A_{\text{in}}/D = g' + A / (D^* D^-_k) and deg⁡A<deg⁡(D∗Dk−)\deg A < \deg(D^* D^-_k). Then after the pass, Ain/D=g′+A/(D∗Dk+1−)A_{\text{in}}/D = g' + A / (D^* D^-_{k+1}) with the new values, and deg⁡A<deg⁡(D∗Dk+1−)\deg A < \deg(D^* D^-_{k+1}).

Proof. Write E=Dk−E = D^-_k, E∗=Dk−∗E^* = D^{-*}_k and E−=Dk+1−E^{-} = D^{-}_{k+1}, so E=E∗E−E = E^* E^{-}. By Lemma 2, A=BF+CE∗A = B F + C E^* with F=−D∗E′/EF = -D^* E'/E. Then

AD∗E−(BE)′=AD∗E−B′E+BE′E2=A−B′D∗+BD∗E′/ED∗E=CE∗−B′D∗D∗E∗E−.\frac{A}{D^* E} - \left(\frac{B}{E}\right)' = \frac{A}{D^* E} - \frac{B'}{E} + \frac{B E'}{E^2} = \frac{A - B' D^* + B D^* E'/E}{D^* E} = \frac{C E^* - B' D^*}{D^* E^* E^{-}} .

The term BD∗E′/E=−BFB D^* E'/E = -B F cancels against the part BFB F of AA. Now E∗∣D∗E^* \mid D^*, since every DiD_i with i>ki > k is a factor of D∗D^*, so D∗/E∗D^*/E^* is a polynomial and the last fraction equals (C−B′D∗/E∗)/(D∗E−)\left(C - B' D^*/E^*\right) / (D^* E^{-}). This is the new AA of line L6 over D∗Dk+1−D^* D^-_{k+1}, and line L7 adds B/EB/E to gg, so the identity holds after the pass.

For the degrees, let N=deg⁡(D∗E)N = \deg(D^* E). Then deg⁡F=deg⁡D∗−1\deg F = \deg D^* - 1 and deg⁡B<deg⁡E∗\deg B < \deg E^*, so deg⁡(BF)<deg⁡E∗+deg⁡D∗−1≤N−1\deg(B F) < \deg E^* + \deg D^* - 1 \le N - 1 because deg⁡E∗≤deg⁡E\deg E^* \le \deg E. With deg⁡A<N\deg A < N this gives deg⁡(CE∗)<N\deg(C E^*) < N, so deg⁡C<N−deg⁡E∗=deg⁡(D∗E−)\deg C < N - \deg E^* = \deg(D^* E^{-}). Also deg⁡(B′D∗/E∗)<deg⁡E∗−1+deg⁡D∗−deg⁡E∗+1=deg⁡D∗≤deg⁡(D∗E−)\deg(B' D^*/E^*) < \deg E^* - 1 + \deg D^* - \deg E^* + 1 = \deg D^* \le \deg(D^* E^{-}). So the new AA has degree less than deg⁡(D∗Dk+1−)\deg(D^* D^-_{k+1}). □\square

Theorem. HERMITE-REDUCE(Ain,D)(A_{\text{in}}, D) terminates after m−1m - 1 passes and returns gg and a/da/d with Ain/D=g′+a/dA_{\text{in}}/D = g' + a/d, where d=D∗d = D^* is squarefree and deg⁡a<deg⁡d\deg a < \deg d.

Proof. After line L1, Ain=PD+AA_{\text{in}} = P D + A with deg⁡A<deg⁡D\deg A < \deg D, and g=∫Pg = \int P, so Ain/D=g′+A/DA_{\text{in}}/D = g' + A/D. After line L2, D=D∗D1−D = D^* D^-_1, so the hypothesis of Lemma 3 holds for k=1k = 1. By Lemma 3 and induction, it holds at the start of every pass. By the formula above, Dk−D^-_k has degree 0 exactly when k≥mk \ge m, so the loop of line L3 runs for k=1,…,m−1k = 1, \ldots, m - 1 and stops with D−=Dm−=1D^- = D^-_m = 1, a monic polynomial of degree 0. Then the identity reads Ain/D=g′+A/D∗A_{\text{in}}/D = g' + A/D^* with deg⁡A<deg⁡D∗\deg A < \deg D^*, and D∗=c∏iDiD^* = c \prod_i D_i is squarefree by Lemma 1. Line L9 returns this. ■\blacksquare

Back to Hermite reduction