Algorithm Search⌘K

Proofs: F5 algorithm

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

The signature-based F5 algorithm terminates and returns the reduced Gröbner basis full

This proof shows: correctness, termination.

Let KK be a field, R=K[x1,…,xn]R = K[x_1, \ldots, x_n] with a monomial order >>, and f1,…,fs∈Rf_1, \ldots, f_s \in R. Let RsR^s be the free module with basis e1,…,ese_1, \ldots, e_s and α↦αˉ=∑iαifi\alpha \mapsto \bar\alpha = \sum_i \alpha_i f_i the map onto I=⟨f1,…,fs⟩I = \langle f_1, \ldots, f_s \rangle. Module monomials ueiu e_i are ordered position over term: uei<veju e_i < v e_j if i<ji < j, or i=ji = j and u<vu < v. This is a well-order compatible with multiplication by monomials. For α≠0\alpha \ne 0 the signature s(α)s(\alpha) is its largest module monomial.

A pair (σ,p)(\sigma, p) is a labeled polynomial if p=αˉp = \bar\alpha for some α\alpha with s(α)=σs(\alpha) = \sigma. For a finite set BB of labeled polynomials, write sig⁡(g)=σ\operatorname{sig}(g) = \sigma for (σ,g)∈B(\sigma, g) \in B. A standard s-representation of αˉ≠0\bar\alpha \ne 0 is αˉ=∑kcktkgk\bar\alpha = \sum_k c_k t_k g_k with gk∈Bg_k \in B, monomials tkt_k, tksig⁡(gk)≤s(α)t_k \operatorname{sig}(g_k) \le s(\alpha) and LM⁡(tkgk)≤LM⁡(αˉ)\operatorname{LM}(t_k g_k) \le \operatorname{LM}(\bar\alpha). We say BB is a signature Gröbner basis below σ\sigma if every α\alpha with s(α)<σs(\alpha) < \sigma and αˉ≠0\bar\alpha \ne 0 has one. A labeled (σ,p)(\sigma, p) is regular top-reduced by BB if no g∈Bg \in B and monomial tt satisfy tLM⁡(g)=LM⁡(p)t \operatorname{LM}(g) = \operatorname{LM}(p) and tsig⁡(g)<σt \operatorname{sig}(g) < \sigma. A signature τ\tau is a syzygy signature if τ=s(γ)\tau = s(\gamma) for some γ\gamma with γˉ=0\bar\gamma = 0; then every multiple wτw\tau is one too.

Lemma 1 (labels are valid). Every queue entry and every element of BB is a labeled polynomial, and every element of Syz is a syzygy signature.

Proof. The entry (ei,fi)(e_i, f_i) comes from α=ei\alpha = e_i. For an S-pair of (σr,r)(\sigma_r, r) and (σg,g)(\sigma_g, g) with multipliers ur,ugu_r, u_g and urσr≠ugσgu_r \sigma_r \ne u_g \sigma_g, the combination (ur/LC⁡(r))αr−(ug/LC⁡(g))αg(u_r/\operatorname{LC}(r))\alpha_r - (u_g/\operatorname{LC}(g))\alpha_g has signature max⁡(urσr,ugσg)\max(u_r\sigma_r, u_g\sigma_g), which is the label used at line L9. A regular reduction step subtracts c t gc\, t\, g with tsig⁡(g)<σt \operatorname{sig}(g) < \sigma, which does not change the signature of the module element. For g∈Bg \in B with sig⁡(g)\operatorname{sig}(g) of index j<ij < i, the element γ=g ei−fiαg\gamma = g\, e_i - f_i \alpha_g has γˉ=gfi−fig=0\bar\gamma = g f_i - f_i g = 0 and s(γ)=LM⁡(g)eis(\gamma) = \operatorname{LM}(g) e_i, since fiαgf_i \alpha_g involves only indices at most jj; these are the signatures added at line L4. A reduction to zero at line L7 gives a labeled (σ,0)(\sigma, 0), hence a syzygy signature. □\square

Lemma 2 (order of processing). The signatures handled at line L3 strictly increase, and when σ\sigma is handled, every signature smaller than σ\sigma that was ever put in the queue has already been handled.

Proof. A candidate created while handling σ\sigma has signature at least urσ≥σu_r \sigma \ge \sigma. The smallest entry is taken each time, and an entry whose signature was already handled is skipped, so handled signatures strictly increase. □\square

Lemma 3 (uniqueness of leading monomials). Let BB be a signature Gröbner basis below σ\sigma, and let (σ,p)(\sigma, p) and (σ,q)(\sigma, q) be labeled polynomials, both regular top-reduced by BB. Then p=0p = 0 if and only if q=0q = 0, and otherwise LM⁡(p)=LM⁡(q)\operatorname{LM}(p) = \operatorname{LM}(q).

Proof. Take α,β\alpha, \beta with signature σ\sigma and images p,qp, q, and c∈Kc \in K with s(α−cβ)<σs(\alpha - c\beta) < \sigma. Suppose p≠0p \ne 0 and either q=0q = 0 or LM⁡(p)>LM⁡(q)\operatorname{LM}(p) > \operatorname{LM}(q). Then p−cq≠0p - cq \ne 0 with LM⁡(p−cq)=LM⁡(p)\operatorname{LM}(p - cq) = \operatorname{LM}(p), and its standard s-representation contains a term cktkgkc_k t_k g_k with LM⁡(tkgk)=LM⁡(p)\operatorname{LM}(t_k g_k) = \operatorname{LM}(p) and tksig⁡(gk)≤s(α−cβ)<σt_k \operatorname{sig}(g_k) \le s(\alpha - c\beta) < \sigma. So pp is not regular top-reduced, a contradiction. The case with pp and qq exchanged is the same. □\square

Lemma 4 (completeness). Let σ\sigma be a signature such that every candidate signature smaller than σ\sigma has been handled, and let BB be the current basis. Then BB is a signature Gröbner basis below σ\sigma. The same holds with no bound on σ\sigma when the queue is empty.

Proof. By induction on the signatures handled (assume the lemma at each earlier handled signature), and inside that by well-founded induction on τ=s(α)<σ\tau = s(\alpha) < \sigma. Let τ=uei\tau = u e_i and αˉ≠0\bar\alpha \ne 0.

Case 1: τ\tau is a syzygy signature, τ=s(γ)\tau = s(\gamma) with γˉ=0\bar\gamma = 0. Then α−cγ\alpha - c\gamma has a smaller signature and the same image, and the inner induction gives a standard s-representation.

Case 2: otherwise. Then eie_i is not a syzygy signature either, so its candidate was not discarded at line L5 and did not reduce to zero; it was the first signature of index ii, so it is not singular top-reducible, and BB contains an element of signature eie_i. Hence some g∈Bg \in B has sig⁡(g)∣τ\operatorname{sig}(g) \mid \tau. Among all such gg, with tgt g of signature τ\tau, choose one with LM⁡(tg)\operatorname{LM}(t g) smallest. Choose cc with s(α−c t αg)<τs(\alpha - c\, t\, \alpha_g) < \tau; by the inner induction its image αˉ−c tg\bar\alpha - c\, t g is 00 or has a standard s-representation. If LM⁡(tg)≤LM⁡(αˉ)\operatorname{LM}(t g) \le \operatorname{LM}(\bar\alpha), adding c tgc\, t g gives a standard s-representation of αˉ\bar\alpha. Otherwise LM⁡(αˉ−c tg)=LM⁡(tg)=:m\operatorname{LM}(\bar\alpha - c\, t g) = \operatorname{LM}(t g) =: m, so there are g′∈Bg' \in B and t′t' with t′LM⁡(g′)=mt' \operatorname{LM}(g') = m and t′sig⁡(g′)<τt' \operatorname{sig}(g') < \tau; here g′≠gg' \ne g.

Let ℓ=lcm⁡(LM⁡(g),LM⁡(g′))\ell = \operatorname{lcm}(\operatorname{LM}(g), \operatorname{LM}(g')), m=wℓm = w \ell, and a=ℓ/LM⁡(g)a = \ell / \operatorname{LM}(g), b=ℓ/LM⁡(g′)b = \ell / \operatorname{LM}(g'). Then wasig⁡(g)=τ>wbsig⁡(g′)w a \operatorname{sig}(g) = \tau > w b \operatorname{sig}(g'), so the S-pair of gg and g′g' is regular with signature ρ=asig⁡(g)\rho = a \operatorname{sig}(g), wρ=τw \rho = \tau, and ρ<σ\rho < \sigma. It was put in the queue when the later of g,g′g, g' was added (or skipped there because ρ\rho was handled), so by Lemma 2 the signature ρ\rho was handled, with some candidate (ρ,p)(\rho, p). Let BρB_\rho be the basis at that time; by the outer induction it is a signature Gröbner basis below ρ\rho. Let SS be the S-polynomial of g,g′g, g', with LM⁡(S)<ℓ\operatorname{LM}(S) < \ell or S=0S = 0, and S′S' its regular top-reduction by BρB_\rho.

  • If ρ\rho was discarded at line L5 or pp reduced to zero, ρ\rho is a syzygy signature by Lemma 1, and so is τ=wρ\tau = w\rho: excluded in Case 2.
  • Otherwise pp reduced to r≠0r \ne 0, which is regular top-reduced by BρB_\rho. By Lemma 3, S′≠0S' \ne 0 and LM⁡(r)=LM⁡(S′)≤LM⁡(S)<ℓ\operatorname{LM}(r) = \operatorname{LM}(S') \le \operatorname{LM}(S) < \ell. If rr was added to BB, then wrw r has signature τ\tau and LM⁡(wr)<wℓ=m\operatorname{LM}(w r) < w \ell = m. If rr was discarded at line L8, some h∈Bh \in B and tht_h have thsig⁡(h)=ρt_h \operatorname{sig}(h) = \rho and thLM⁡(h)=LM⁡(r)t_h \operatorname{LM}(h) = \operatorname{LM}(r), so wthhw t_h h has signature τ\tau and leading monomial below mm.

Both contradict the choice of gg. So Case 2 always ends with a standard s-representation. When the queue is empty, every regular S-pair and every eie_i has been handled, and the same argument applies to all τ\tau. □\square

Theorem. The algorithm terminates and returns the reduced Gröbner basis of II.

Proof. Termination. Each regular reduction terminates, because the leading monomial decreases in a well-order. Suppose infinitely many elements were added to BB. Then infinitely many have the same index ii. By Dickson's lemma applied to the monomials (LM⁡(r),ur)(\operatorname{LM}(r), u_r) in 2n2n variables, where sig⁡(r)=urei\operatorname{sig}(r) = u_r e_i, there are rkr_k added before rlr_l with LM⁡(rk)∣LM⁡(rl)\operatorname{LM}(r_k) \mid \operatorname{LM}(r_l) and uk∣ulu_k \mid u_l. Put t=LM⁡(rl)/LM⁡(rk)t = \operatorname{LM}(r_l)/\operatorname{LM}(r_k) and v=ul/ukv = u_l/u_k. Since rlr_l is regular top-reduced and not singular top-reducible (line L8), tuk>ul=vukt u_k > u_l = v u_k, so t>vt > v. Then vrkv r_k is labeled with signature sig⁡(rl)\operatorname{sig}(r_l) and LM⁡(vrk)<LM⁡(rl)\operatorname{LM}(v r_k) < \operatorname{LM}(r_l), and its regular top-reduction by the basis at the time of rlr_l has a leading monomial below LM⁡(rl)\operatorname{LM}(r_l) or is zero. This contradicts Lemma 3, which applies by Lemma 4. So BB is finite, each element creates finitely many candidates, and the loop ends.

Correctness. By Lemma 1, B⊆IB \subseteq I. When the queue is empty, Lemma 4 says that every nonzero f=αˉ∈If = \bar\alpha \in I has a standard s-representation, so LM⁡(f)=LM⁡(tg)\operatorname{LM}(f) = \operatorname{LM}(t g) for some g∈Bg \in B, and LM⁡(g)∣LM⁡(f)\operatorname{LM}(g) \mid \operatorname{LM}(f). So the polynomials of BB form a Gröbner basis of II, and line L10 turns it into the reduced Gröbner basis, which is unique (CLO Chapter 2, Section 7). ■\blacksquare

Back to F5 algorithm