Algorithm Search⌘K

Proofs: Multivariate division algorithm

These are the human proofs of Multivariate division algorithm, at full length.

The division algorithm stops and returns a valid quotient and remainder full

This proof shows: correctness, termination.

Fix a field KK, a monomial order >> on Nn\mathbb{N}^n, a polynomial f∈K[x1,…,xn]f \in K[x_1, \ldots, x_n] and nonzero f1,…,fsf_1, \ldots, f_s. We write LM⁡\operatorname{LM}, LT⁡\operatorname{LT} and LC⁡\operatorname{LC} for the leading monomial, term and coefficient for >>, and we use two facts about a monomial order. (O1) If xβ≤xαx^\beta \le x^\alpha then xγxβ≤xγxαx^\gamma x^\beta \le x^\gamma x^\alpha for each γ\gamma, by compatibility with multiplication. (O2) There is no infinite strictly descending sequence of monomials, because >> is a well-ordering.

Invariant. At each test of line L2:

(D1) f=q1f1+⋯+qsfs+p+rf = q_1 f_1 + \cdots + q_s f_s + p + r. (D2) No term of rr is divisible by any LT⁡(fi)\operatorname{LT}(f_i). (D3) If p≠0p \ne 0, then LM⁡(p)≤LM⁡(f)\operatorname{LM}(p) \le \operatorname{LM}(f). Each monomial of each qifiq_i f_i is at most LM⁡(f)\operatorname{LM}(f).

Initialization. Line L1 sets qi=0q_i = 0, r=0r = 0 and p=fp = f. Then (D1) reads f=ff = f, (D2) holds because rr has no terms, and (D3) holds because LM⁡(p)=LM⁡(f)\operatorname{LM}(p) = \operatorname{LM}(f) and each qifi=0q_i f_i = 0.

Maintenance, division step. Assume p≠0p \ne 0 and that line L5 finds the first ii with LT⁡(fi)∣LT⁡(p)\operatorname{LT}(f_i) \mid \operatorname{LT}(p). Let u=LT⁡(p)/LT⁡(fi)u = \operatorname{LT}(p)/\operatorname{LT}(f_i), a term c xγc\,x^\gamma. Lines L6 and L7 replace qiq_i by qi+uq_i + u and pp by p−ufip - u f_i. The sum qifi+pq_i f_i + p becomes (qi+u)fi+p−ufi=qifi+p(q_i + u) f_i + p - u f_i = q_i f_i + p, so (D1) still holds. The remainder does not change, so (D2) holds. The term uLT⁡(fi)=LT⁡(p)u \operatorname{LT}(f_i) = \operatorname{LT}(p), so LT⁡(ufi)=LT⁡(p)\operatorname{LT}(u f_i) = \operatorname{LT}(p) by the product rule for leading terms. Each other monomial of ufiu f_i is xγm′x^\gamma m' with m′<LM⁡(fi)m' < \operatorname{LM}(f_i), so xγm′<xγLM⁡(fi)=LM⁡(p)x^\gamma m' < x^\gamma \operatorname{LM}(f_i) = \operatorname{LM}(p) by (O1) with strict inequality (a monomial order is compatible with strict inequality too, because it is a total order and xγx^\gamma times two distinct monomials gives two distinct monomials). So in p−ufip - u f_i the term LT⁡(p)\operatorname{LT}(p) cancels and every other monomial is smaller than the old LM⁡(p)\operatorname{LM}(p). Hence the new pp is 00 or has LM⁡(pnew)<LM⁡(pold)≤LM⁡(f)\operatorname{LM}(p_{\text{new}}) < \operatorname{LM}(p_{\text{old}}) \le \operatorname{LM}(f). The new monomials of qifiq_i f_i are those of ufiu f_i, all at most LM⁡(pold)≤LM⁡(f)\operatorname{LM}(p_{\text{old}}) \le \operatorname{LM}(f). So (D3) holds.

Maintenance, remainder step. Assume p≠0p \ne 0 and no LT⁡(fi)\operatorname{LT}(f_i) divides LT⁡(p)\operatorname{LT}(p). Lines L11 and L12 add LT⁡(p)\operatorname{LT}(p) to rr and subtract it from pp. The sum p+rp + r does not change, so (D1) holds. The new term of rr is not divisible by any LT⁡(fi)\operatorname{LT}(f_i), and the monomial LM⁡(p)\operatorname{LM}(p) is not yet in rr, because every earlier term of rr was a leading monomial of an earlier pp and these are strictly larger (see below). So (D2) holds. The new pp is 00 or has a smaller leading monomial. So (D3) holds.

Termination. In both steps, the new pp is 00 or LM⁡(pnew)<LM⁡(pold)\operatorname{LM}(p_{\text{new}}) < \operatorname{LM}(p_{\text{old}}). Suppose the loop of line L2 ran forever. Then the leading monomials of pp in successive passes would form an infinite strictly descending sequence, which (O2) forbids. So the loop stops after finitely many passes, and the inner loop of line L4 stops after at most ss steps in each pass. For a graded order the number of passes is at most the number of monomials of degree at most deg⁡f\deg f, which is (n+deg⁡fn)\binom{n + \deg f}{n}, because the leading monomials of pp are distinct monomials of degree at most deg⁡f\deg f (the degree argument is in the Complexity section of the page). This gives an explicit bound in that case.

The output. When the loop stops, p=0p = 0. Then (D1) is f=∑qifi+rf = \sum q_i f_i + r, (D2) is condition 2 of the output, and (D3) gives condition 3: if qifi≠0q_i f_i \ne 0 then its leading monomial is one of its monomials, so it is at most LM⁡(f)\operatorname{LM}(f). If f=0f = 0, the loop does not run and the output is qi=0q_i = 0, r=0r = 0, which meets the specification. ■\blacksquare

Uniqueness for a Gröbner basis. Let G={f1,…,fs}G = \{f_1, \ldots, f_s\} be a Gröbner basis of I=⟨f1,…,fs⟩I = \langle f_1, \ldots, f_s \rangle, and let r,r′r, r' be two outputs of the algorithm for ff with two orders of the divisors or two choices at line L5. Then r−r′=∑(qi′−qi)fi∈Ir - r' = \sum (q'_i - q_i) f_i \in I. If r≠r′r \ne r', then LT⁡(r−r′)∈LT⁡(I)\operatorname{LT}(r - r') \in \operatorname{LT}(I) is divisible by some LT⁡(fi)\operatorname{LT}(f_i), by the definition of a Gröbner basis. But LM⁡(r−r′)\operatorname{LM}(r - r') is a monomial of rr or of r′r', and by (D2) no LT⁡(fi)\operatorname{LT}(f_i) divides it. This is a contradiction, so r=r′r = r'. If f∈If \in I, then r=f−∑qifi∈Ir = f - \sum q_i f_i \in I, and the same argument with r′=0r' = 0 gives r=0r = 0. ■\blacksquare

Back to Multivariate division algorithm