Chapter V: The generalized P -scheme algorithm
5.3 Reduction to computing an idempotent decomposition of R F
See Appendix C for its proof.
which sends an elementh(X) + (g(X))toτ(h(X)) + Rad( ¯OF). Note that both Fq[X]/(g(X))andO¯F/Rad( ¯OF)are semisimple rings.
We can efficiently computeτ¯by the following lemma.
Lemma 5.9. There exists a polynomial-time algorithm that givenf, f˜, F and the outputs ofComputeRings (see Lemma 5.7) on the input (F, p), computes theFq- algebra Fq[X]/(g(X)) (encoded in the standard Fq-basis {1, X, . . . , Xdeg(g)−1}) and the mapτ¯:Fq[X]/(g(X))→O¯F/Rad( ¯OF).
Proof. Computeg using Corollary 5.1 and form theFq-algebraFq[X]/(g(X)). To compute¯τ, we first computeα=X+( ˜f(X))∈F andY¯ :=Y+(˜h(Y))∈K0 ⊆F. Then computeα+pOF,Y¯+pOF ∈O¯F by identifyingF with an ordinary number field (see Corollary 4.1) and running the algorithmComputeResiduein Lemma 3.9 on α,Y¯ ∈ F. Next, computeτ : Fq[X]/(f(X)) → O¯F as the unique Fp-linear map sendingX+ (f(X))to α+pOF andY + (h(Y)) ∈ Fp[Y]/(h(Y))∼= Fq to Y¯ +pOF. Finally compute τ¯from τ by passing to the quotients modulo radicals using the given mapO¯F →O¯F/Rad( ¯OF).
Extracting a factorization from an idempotent decomposition. We extract a factorization offfrom an idempotent decomposition ofRF. This is achieved by the algorithmExtractFactorsV2below (see Algorithm 10), extending the algorithm in Section 3.3.
The algorithm first computesg = Rad(f), the ringFq[X]/(g(X)), and the mapτ¯ at Line 1 using Lemma 5.9. It also maintains an idempotent decompositionIof the ringFq[X]/(g(X))which initially only contains the unity.
The loop in Lines 3–8 enumerates idempotentsδ0 ∈IF. For eachδ0, we compute an idealJ = ¯τ−1((1−δ0) ¯OF/Rad( ¯OF))ofFq[X]/(g(X))and an elementδ0 ∈Jsat- isfying(1−δ0)J ={0}by solving systems of linear equations. AsFq[X]/(g(X))is semisimple, the elementδ0is the unique idempotent ofFq[X]/(g(X))that generates J. And we use it to refineI.
The loop in Lines 9–12 extracts, for each idempotent δ ∈ I, a monic factorgδ of f. Furthermore, we compute a square-free factorizationgδ(X) =Qkδ
i=1gδ,i(X)for each factorgδ. Finally, the algorithm returns the factorization
f(X) = Y
δ∈I kδ
Y
i=1
gδ,i(X).
Algorithm 10ExtractFactorsV2
Input: f,f˜,F, the outputs ofComputeRings(see Lemma 5.7) on the input(F, p), and an idempotent decompositionIF ofRF
Output: factorization off
1: computeg = Rad(f),Fq[X]/(g(X))andτ¯:Fq[X]/(g(X))→O¯F/Rad( ¯OF)
2: I ← {1}, where1denotes the unity ofFq[X]/(g(X))
3: forδ0 ∈IF do
4: J ←τ¯−1((1−δ0) ¯OF/Rad( ¯OF))
5: computeδ0 ∈J satisfying(1−δ0)J ={0}
6: forδ ∈Isatisfyingδ0δ 6∈ {0, δ}do
7: I ←I− {δ}
8: I ←I∪ {δ0δ,(1−δ0)δ}
9: forδ ∈Ido
10: compute nonzerohδ(X)∈Fq[X]of degree at mostdeg(g)lifting1−δ
11: gδ(X)←gcd(f(X),(hδ(X))n) . n= deg(f)
12: compute a square-free factorizationgδ(X) = Qkδ
i=1gδ,i(X)
13: returnthe factorizationf(X) = Q
δ∈I
Qkδ
i=1gδ,i(X) The following theorem is the main result of this section.
Theorem 5.6. The algorithm ExtractFactorsV2 computes a factorization of f overFq in polynomial time, such that
1. the factorization is complete ifIF is a complete idempotent decomposition, 2. the factorization is proper ifIF is a proper idempotent decomposition, and 3. at least one factor in the factorization is irreducible overFq ifIF contains a
primitive idempotent.
Analysis of the algorithm. To prove Theorem 5.6, we introduce the following notations: letS (resp. SF) denote the set of the maximal ideals ofFq[X]/(g(X)) (resp. O¯F/Rad( ¯OF)). For a maximal ideal m of O¯F/Rad( ¯OF), the preimage
¯
τ−1(m)is a prime (and hence maximal) ideal ofFq[X]/(g(X)). So we obtain a map π:SF →S,
sendingmtoτ (m). It can be shown thatπis surjective.10 Suppose f(X) = Qk
i=1(fi(X))mi where f1, . . . , fk are distinct monic irreducible factors off overFq. Fori ∈ [k], let mi be the (maximal) ideal ofFq[X]/(g(X)) generated byfi(X) + (g(X)). Then we have
S ={m1, . . . ,mk} and g(X) =
k
Y
i=1
fi(X).
The proof of Theorem 5.6 is based on the following lemma.
Lemma 5.10. LetIbe the idempotent decomposition ofFq[X]/(g(X))given at the end of the algorithmExtractFactorsV2. Define the partitionP ofS by
P :={Bδ :δ∈I}, where Bδ:={m∈S:δ ≡1 (mod m)}
and the partitionP0ofSF by
P0 :={B0δ:δ ∈IF}, where Bδ0 :={m∈SF :δ ≡1 (mod m)}.
Then P is the coarsest common refinement of the partitions {π(B), S −π(B)}, whereB ranges over the blocks inP0. Moreover, for eachδ ∈I, the polynomialgδ in the algorithm is given by
gδ(X) = Y
i∈[k]:mi∈Bδ
(fi(X))mi.
Proof. For the last claim, it suffices to prove, for alli ∈ [k], thathδ is divisible by fi iffmi ∈ Bδ. By the choice ofhδ, it holds for alli ∈[k]thathδ is divisible byfi iff1−δ∈mi. The claim then follows from the definition ofBδ.
For the first claim, it suffices to show that for everyδ0 ∈IF enumerated at Line 3 and δ0computed at Line 5 in the same iteration, it holds thatBδ0 ∈ {π(Bδ00), S−π(Bδ00)}. We claim thatBδ0 =S−π(Bδ00). As the idealJ computed at Line 4 is generated byδ0, this claim is equivalent toJ = T
m∈π(B0
δ0)m. Note that for m∈ SF, it holds that1−δ0 ∈miffm∈Bδ00 by the definition ofBδ00. So we have
(1−δ0) ¯OF/Rad( ¯OF) = \
m∈B0
δ0
m
10To prove this, it suffices to show that any prime ideal ofA0[X]/( ˜f(X)) = A0[α] ⊆ OF is contained in a prime ideal ofOF, which follows from [AM69, Theorem 5.10].
and hence
J = ¯τ−1
\
m∈B0
δ0
m
= \
m∈B0
δ0
¯
τ−1(m) = \
m∈B0
δ0
π(m) = \
m∈π(B0
δ0)
m
as desired.
We also need the following lemma.
Lemma 5.11. π:SF →S is bijective iff is square-free, i.e.,mi = 1fori∈[k].
Proof. SupposepOF splits into the product of prime ideals by pOF =
`
Y
i=1
Pe(Pi i),
where P1, . . . ,P` are distinct prime ideals lying over p. For j ∈ [`], let m0j :=
Pj/pOF
Rad( ¯OF). Then SF = {m01, . . . ,m0`}. Let n = deg(f). Assume f is square-free.
Then we have
k
X
i=1
deg(fi) =
k
X
i=1
mideg(fi) =n =
`
X
j=1
e(Pj)f(Pj). (5.1) Fix i ∈ [k]. We know π−1(i) 6= ∅ since π is surjective. Consider j ∈ π−1(i). As τ¯(mi) ⊆ m0j, the map τ¯ : Fq[X]/(g(X)) → O¯F/Rad( ¯OF) induces a field embedding
Fq[X]/(g(X))
mi ,→ O¯F/Rad( ¯OF) m0j .
The left hand side is isomorphic toFq[X]/(fi(X))whereas the right hand side is isomorphic toOF/Pj =κPj. Thereforedeg(fi)dividesf(Pj).
Note thate(Pj)≥1holds for allj ∈[`]. It follows from (5.1) that in facte(Pj) = 1 holds for all j ∈ [`]. Moreover, for all i ∈ [k], the set π−1(i) contains only one elementji ∈[`], anddeg(fi) = f(Pji). In particular, the mapπis bijective.
Now we are ready to prove Theorem 5.6.
Proof of Theorem 5.6. Polynomiality of the algorithm is straightforward. Suppose IF is a complete idempotent decomposition of RF. It is also a complete idem- potent decomposition ofO¯F/Rad( ¯OF)since the maximal ideals ofO¯F/Rad( ¯OF) correspond one-to-one to those of RF via m 7→ m∩RF. So the partition P0 in
Lemma 5.10 is∞SF. By Lemma 5.10 and surjectivity ofπ, the partitionP equals
∞S, and the algorithm outputs the complete factorizationf(X) =Q
i∈[k](fi(X))mi. Similarly, ifIF contains a primitive idempotentδ. ThenP0 contains a singletonBδ0. By Lemma 5.10, the partitionP contains a singletonπ(Bδ0), and algorithm outputs a factorization off(X)in which the irreducible factorsfi(X)appearmitimes, where iis the unique index in[k]satisfyingπ(B0δ) = {mi}.
Finally, supposeIF is a proper idempotent decomposition ofRF, and hence a proper idempotent decomposition ofO¯F/Rad( ¯OF). ThenP0 6= 0SF. Ifπis bijective, then by Lemma 5.10, we haveP 6= 0S, and the algorithm outputs a proper factorization off. Now suppose π is not bijective. Then f is not square-free by Lemma 5.11.
As we compute a square-free factorization for eachgδ, the algorithm still outputs a proper factorization off.
The reduction for non-monic polynomials. The same trick in Section 3.3 can be applied to make the above reduction work for a possibly non-monic polynomial f˜: letc ∈ A0 be the leading coefficient of f(X)˜ ∈ A0[X], and let ¯c := ˜ψ0(c) ∈ F×q. Compute the monic polynomials f˜0(X) := cn−1 · f˜(X/c) ∈ A0[X] and f0(X) := ¯cn−1f(X/¯cn−1)∈ Fq[X]. Run the algorithmExtractFactorsV2onf0 and f˜0 instead of f and f˜, and obtain a factorization of f0. Finally, we recover a factorization off from that off0 by substitutingXwith¯cX in each factor.
Remark. The reduction in this section exploits the well known connection between factorization of polynomials over finite fields and the splitting of prime ideals in number field extensions, which dates back to the classical work of Kummer and Dedekind (see, e.g., [Neu99, Proposition I.8.3]). The Kummer-Dedekind theorem, however, requires the map Fq[X]/(f(X)) → O¯F to be an isomorphism. For this reason, known factoring algorithms that use an irreducible lifted polynomial f˜ often assume pisregular with respect tof˜. See, e.g., [Hua84; Hua91a; Hua91b;
Rón92].11 This assumption is not needed in our algorithm. The key observation is that we can always employ the surjective map πfrom the set of prime ideals of O¯F/Rad( ¯OF)to that ofFq[X]/(g(X)), whereg = Rad(f). In algebro-geometric terminology, the mapπis interpreted as the morphism of reduced affine schemes
π : Spec( ¯OF)red→Spec(A0[α]/pA0[α])red
11We saypis regular with respect tof˜ifpA0[α] is coprime to theconductorof A0[α]. See [Hua84] for the exact formulation of this condition. We remark that the journal version [Hua91a]
(and [Hua91b; Rón92]) assumes the stronger condition thatpis coprime to the discriminant off˜.
induced from the morphismSpecOF →SpecA0[α]. The latter morphism is known as thenormalizationofSpecA0[α](see [Har77, Exercise II.3.8]).