The $p$-Zassenhaus Filtration of a Free Profinite Group and Shuffle Relations

For a prime number $p$ and a free profinite group $S$ on the basis $X$, let $S_{(n,p)}$, $n=1,2,\ldots,$ be the $p$-Zassenhaus filtration of $S$. For $p>n$, we give a word-combinatorial description of the cohomology group $H^2(S/S_{(n,p)},\mathbb{Z}/p)$ in terms of the shuffle algebra on $X$. We give a natural linear basis for this cohomology group, which is constructed by means of unitriangular representations arising from Lyndon words.


Introduction
The purpose of this paper is to study the p-Zassenhaus filtration of a free profinite group S and its cohomology by means of the combinatorics of words. Here p is a fixed prime number, and we recall that the p-Zassenhaus filtration of a profinite group G is given by G (n,p) = ip j ≥n (G (i) ) p j , n = 1, 2, . . . , i.e., G (n,p) is generated as a profinite group by all p j -powers of elements of the i-th term of the (profinite) lower central filtration G (i) of G for ip j ≥ n.
This filtration was introduced by Zassenhaus [Zas39] for discrete groups (under the name dimension subgroups modulo p) as a tool to study free Lie algebras in characteristic p. It proved itself to be a powerful tool in a variety of group-theoretic and arithmetic problems: the Golod-Shafarevich solution to the class field tower problem ( [Koc69], [Koc02,§7.7], [Zel00], [Ers12]), the structure of finitely generated pro-p groups of finite rank [DDMS99,Ch. 11], mild groups [Lab06] and one-relator pro-p groups [Gär11, §2.4], multiple residue symbols and their knot theory analogs ( [Mor04], [Mor12,Ch. 8], [Vog05]), and more. In the Galois theory context, where G = G F is the absolute Galois group of a field F containing a root of unity of order p, it was shown in [EfMi17] that the quotient G/G (3,p) determines the full cohomology ring H * (G) = i≥0 H i (G) with the cup product. Here and in the sequel we abbreviate H i (G) = H i (G, Z/p) for the profinite cohomology group of G with its trivial action on Z/p. Moreover, G/G (3,p) is the smallest Galois group of F with this property (see also [CEM12]).
In the present paper we focus on the cohomology group H 2 (G/G (n,p) ) for a profinite group G and n ≥ 2. Its importance is that it controls the relator structure in the pro-p group G/G (n,p) , whereas its generators are captured by the group H 1 (G/G (n,p) ), which is well understood [NSW08,§3.9].
Our main result gives, for a free profinite group S on a basis X, an explicit description of H 2 (S/S (n,p) ) in terms of the combinatorics of words. Namely, we consider X as an alphabet with a fixed total order, and let X * be the monoid of words in X. For every n ≥ 0 let Z X n be the free Z-module generated by all words in X * of length n. Let Sh(X) indec,n be its quotient by the submodule generated by all shuffle products uxv, where u, v are nonempty words in X * with |u| + |v| = n. We recall for words u = (x 1 · · · x r ) and v = (x r+1 · · · x r+s ) in X * one defines where σ ranges over all permutations of {1, 2, . . . , r + s} such that σ(1) < · · · < σ(r) and σ(r + 1) < · · · < σ(r + t). Thus Sh(X) indec,n is the nth homogenous component of the indecomposable quotient of the shuffle algebra Sh(X) in the sense of [Efr20, §5] (see §9). We prove the following word-combinatorial description of H 2 (S/S (n,p) ) for p sufficiently large: Main Theorem. Suppose that n < p. There is a canonical isomorphism of F p -linear spaces x∈X Z/p ⊕ (Sh(X) indec,n ⊗ (Z/p) ∼ − → H 2 (S/S (n,p) ).
When p ≤ n we give a similar result, in the form of a canonical epimorphism.
More specifically, to any word w in X * of length 1 ≤ |w| ≤ n we associate a canonical cohomology element α w,n ∈ H 2 (S/S (n,p) ). Then the isomorphism in the Main Theorem is induced by the map w → α w,n , where w is either a single-letter word, or a word of length n. In these cases α w,n turns out to be a Bockstein element, or an element of an n-fold Massey product, respectively (see Examples 7.1-7.2 and the remarks below). The construction of α w,n is based on a representation of S/S (n,p) in a group of The correspondence in the Main Theorem demonstrates deep conections between the p-Zassenhaus filtration and its cohomology and the n-fold Massey product H 1 (G) n → H 2 (G). In fact, it was shown in [Efr14] that when S is a free profinite group, S (n,p) /S (n+1,p) is dual to the subgroup of H 2 (S/S (n,p) ) generated by all such products. Moreover, the latter subgroup is the kernel of the inflation map H 2 (S/S (n,p) ) → H 2 (S/S (n+1,p) ). The size of S (n,p) /S (n+1,p) was computed in [MRT16]. The behavior of Massey products for absolute Galois groups G = G F has been the focus of extensive research in recent years, where the p-Zassenhaus filtration played an important role; see e.g. [HoW15], [MT15], [EfMa17], [MT16], [GMTW18], [HaW19] as well as the references therein.

Hall sets
Let X be a nonempty set, considered as an alphabet. Let again X * be the free monoid on X. We consider its elements as associative words. It is equipped with the binary operation (u, v) → uv of associative concatenation. Let M X be the free magma on X (see [Ser92, Part I, Ch. IV, §1], [Efr17,§2]). Thus the elements of M X are the nonempty non-associative words in the alphabet X, and it is equipped with the binary operation (u, v) → (uv) of non-associative concatenation. There is a natural foliage (brackets dropping) map f : M X → X * which is the identity on X (considered as a subset of both M X and X * ) and which commutes with the concatenation maps.
We fix a total order on X. It induces on X * the alphabetic order ≤ alp , which is also total. We denote the length of a word w ∈ X * by |w|.
Let H be a subset of words in M X and ≤ any total order on H. We say that (H, ≤) is a Hall set in M X , if the following conditions hold [Reu93, §4.1]: (1) X ⊆ H as ordered sets; ( Example 2.1. The set of all Lyndon words in X * (see the Introduction) is a Hall set with respect to ≤ alp [Reu93, Th. 5.1].
The standard factorization of Lyndon words is explicitly given as follows: Lemma 2.2. Let w, u, v ∈ X * be nonempty words such that w = uv and w is Lyndon. The following conditions are equivalent: (a) w = uv is the the standard factorization of w in the set of Lyndon words. Let v ′ by a nontrivial Lyndon right factor of w.
We order Z ≥0 × X * lexicographically with respect to the usual order on Z ≥0 and ≤ alp . We then define a second total order on X * by setting with respect to the latter order on Z ≥0 × X * .

Lie algebras
Let R be a unital commutative ring. We write R X for the free associative R-algebra over the set X. We view its elements as polynomials in the set X of non-commuting variables and with coefficients in R. Alternatively, it is the free R-module on the basis X * with multiplication induced by concatenation. The algebra R X is graded with respect to total degree. We write R X for the R-algebra of formal power series in the set X of non-commuting variables and with coefficients in R.
Let k be a field. For an associative k-algebra A, let A Lie be the Lie algebra on A with Lie bracket [a, b] = ab − ba.
We now assume that X is a nonempty totally ordered set, and fix a Hall set H in X * .
Let L(X) be the free Lie k-algebra on the set X. The universal enveloping algebra of L(X) is k X [Ser92, Part I, Ch. IV, Th. 4.2].
Let L be a Lie k-algebra containing X. Define a map P L = P H L : H → L by P L (x) = x for x ∈ X, and P L (w) = [P L (u), P L (v)], if w = uv is the standard factorization of w, as in §2. This construction is functorial in L in the natural sense. (b) This follows from (a), the universal property of L(X), and the functoriality of P L .
By Proposition 3.1(a) and the Poincaré-Birkhoff-Witt theorem [Ser92, Part I, Ch. III, §4], the products m i=1 P L(X) (w i ), with w 1 ≥ alp · · · ≥ alp w m in H, form a k-linear basis of the universal enveloping algebra k X of L(X).
Next assume that char k = p > 0. A restricted Lie k-algebra L is a Lie k-algebra with an additional unary operation a → a [p] for which there is an associative k-algebra A and a Lie k-algebra monomorphism θ : L → A Lie such that θ(a [p] ) = θ(a) p for every a ∈ L ([DDMS99, §12.1]; see also [Jac62] for an alternative equivalent definition). A morphism of restricted Lie k-algebras is a morphism of Lie k-algebras which commutes with the (·) [p] -maps.
Every associative k-algebra A is endowed with the structure of a restricted Lie algebra A res.Lie , where we set [a, b] = ab − ba and a [p] = a p . Every restricted Lie k-algebra L has a unique restricted universal enveloping algebra U res (L). This means that U res (L) is an associative k-algebra, and the functor A → A res.Lie , from the category of associative k-algebras to the category of restricted Lie k-algebras, and the functor L → U res (L) from the category of restricted Lie k-algebras to the category of associative k-algebras, are adjoint ([DDMS99, §12.1], [Jac62, Ch. V, Th. 12]).
Given a restricted Lie k-algebra L containing X, we define a map P L = P H L : [p] j denotes applying j times the operation (·) [p] ). In analogy with Proposition 3.1(b) we have: Proposition 3.2. The image of P L k-linearly spans the restricted Lie ksubalgebra of L generated by X.
Proof. Let L 0 be the k-linear subspace of L spanned by Im( P L ). Let L 0 be the k-linear subspace of L spanned by Im(P L ). Clearly, X ⊆ L 0 ⊆ L 0 . By Proposition 3.1(b), L 0 is the Lie k-subalgebra of L generated by X.
Since char k = p, the binomial formula implies that the subspace L 0 is closed under (·) [p] .
Hence L 0 is the restricted Lie k-subalgebra of L generated by X.
There is a free restricted k-algebra L(X) on the generating set X, with the standard universal property. It is the restricted Lie k-subalgebra of k X res.Lie generated by X, and its restricted universal enveloping algebra is k X [Gär11, Prop. 1.2.7]. We note that in the algebra k X one has  Proof. We consider L(X) as a k-linear subspace of k X . By Proposition 3.2, it is spanned by the powers P L(X) (j, w), where j ≥ 0 and w ∈ H. As observed above, the products m i=1 P L(X) (w i ), with w 1 ≥ alp · · · ≥ alp w m in H, form a k-linear basis of k X . In particular, the powers P L(X) (j, w) = P L(X) (w) p j are k-linearly independent. Hence they form a k-linear basis of L(X) res .
We grade L(X) and L(X) by total degree, and write L(X) n , L(X) n for their homogenous components of degree n. Proof. (a) This follows from Proposition 3.1(a), since P L(X) (w) has degree |w| in k X .
(b) This follows from Corollary 3.3, since P L(X) (j, w) has degree |w|p j in k X .

The p-Zassenhaus filtration
We fix as before a prime number p. For an integer 1 ≤ i ≤ n let j n (i) = ⌈log p (n/i)⌉, i.e., j n (i) is the least integer j such that ip j ≥ n.
Lemma 4.1. The following conditions on 1 ≤ i ≤ n are equivalent: Proof. Set i k = ⌈n/p k ⌉. Thus i 0 = n, and the sequence i k is weakly decreasing to 1. We may restrict ourselves to k such that p k ≤ n. Then We also observe that if i < i k−1 , then i < n/p k−1 , i.e., j n (i) ≥ k.
(a)⇒(b): Since (b) certainly holds for i = n, we may assume that i < n, so there is k in the above range such that i k ≤ i < i k−1 . By the previous observation, j n (i) ≥ k. We take in (a) i ′ = i k to obtain that We define J(n) to be the set of all 1 ≤ i ≤ n such that the equivalent conditions of Lemma 4.1 hold.
(2) Let 1 = i ∈ J(n) and take k such that i = ⌈n/p k ⌉. By the first paragraph of the proof of Lemma 4.1, j n (i) = k. Now let G be a profinite group. Given closed subgroups K, K ′ of G and a positive integer m, we write [K, K ′ ] (resp., K m ) for the closed subgroup of G generated by all commutators [k, Recall that the (profinite) lower central series As in the Introduction, we denote the p-Zassenhaus filtration of G by G (n,p) , n = 1, 2, . . . . Since The subgroups G (n,p) of G are characteristic, hence normal. We note that The Zassenhaus filtration can also be defined inductively by for n ≥ 2. Indeed, this follows from a theorem of Lazard in the case of discrete groups ([DDMS99, Th. 11.2], [Laz65, 3.14.5]), and the profinite analog follows by a density argument. It follows from (4.1) that for n ≥ 2, Let r ≥ 0. The following identity was proved in the discrete case by Shalev [Sha90, Prop. 1.2]; the profinite analog follows again by a density argument: In particular, If j > j ′ , then It follows from (4.1) that for every n the quotient G (n,p) /G (n+1,p) is abelian of exponent dividing p. Consider the graded F p -module The commutator map and the p-power map induce on grG the structure of We now specialize to the case where S is a free profinite group on the basis X, in the sense of [FJ08,§17.4]. It is the inverse limit of the free profinite groups on finite subsets of X [FJ08, Lemma 17.4.9], so in our following results one may assume whenever convenient that X is actually finite, and use limit arguments for the general case. By Let H be as before a fixed Hall set in X * . For every word w ∈ H we associate an element τ w ∈ S as in [Efr17]. Thus τ (x) = x for x ∈ X, and for a word w ∈ H of length i > 1 with standard factorization w = uv, where Proposition 4.4. Let n ≥ 1. The cosets of the powers τ p j w , with w ∈ H and n = |w|p j , form an F p -linear basis of S (n,p) /S (n+1,p) .
Proof. We use the terminology of §3 with the ground field k = F p . By induction on the structure of w, the isomorphism grS ∼ − → L(X) of restricted Lie F p -algebras maps the coset of τ w to P L(X) (w). Therefore it maps the coset of τ p j w to P L(X) (j, w) = P L(X) (w) p j considered as polynomials in F p X . The assertion now follows from Corollary 3.4(b).
Remark 4.5. Vogel [Vog05, Ch. I, §3] uses a specific Hall set H to give F p -linear bases of S (n,p) /S (n+1,p) for n = 2, 3, as well as generating sets for arbitrary n. Namely for similarly defined basic commutators c w ∈ S (i) of words w ∈ H with |w| = i, the generating set consists of all c p j w with n = ip j . Furthermore, according to [MRT16,Cor. 3.12] the set of all such powers forms a basis of S (n,p) /S (n+1,p) , however the proof lacks details. I thank J. Mináč for a correspondence on the latter reference.
For a word w ∈ H of length 1 ≤ i ≤ n we abbreviate Thus σ w ∈ S (n,p) .
Proof. Proposition 4.4 implies by induction on r ≥ 1, that S (n,p) /S (n+r,p) is generated by the cosets of τ p j w , where w ∈ H has length i, and n ≤ ip j < n + r. We apply this for n + r = np. By (4.2), S (np,p) ≤ (S (n,p) ) p [S, S (n,p) ], and we deduce that S (n,p) /(S (n,p) ) p [S, S (n,p) ] is generated by the cosets of τ p j w , where w ∈ H has length i and n ≤ ip j < np. Moreover, it suffices to take such powers with j = j n (i), since otherwise τ p j w ∈ (S (n,p) ) p . Finally, by Proposition 4.3, if i ∈ J(n), then the coset of σ w = τ p jn(i) w is trivial. We are therefore left with with the generators σ w as in the assertion.

The fundamental matrix
For a profinite ring R, let R X × be the group of invertible elements in R X (see §3). As before, let S be the free profinite group over the basis X. The continuous Magnus homomorphism Λ = Λ R : S → R X × is defined on the (profinite) generators x ∈ X of S by Λ(x) = 1 + x; See [Efr14, §5] for details, and note that 1 + x is invertible by the geometric progression formula. For an arbitrary σ ∈ S we write Λ(σ) = w∈X * ǫ w,R (σ)w, with ǫ w,R (σ) ∈ R. The map ǫ w,R : S → R is continuous, and ǫ ∅,R (σ) = 1 for every σ (where ∅ denotes the empty word).
Let U i (R) be the profinite group of all unitriangular (i + 1) × (i + 1)matrices over R. Given a word w = (x 1 · · · x i ) ∈ X * of length i, we define a continuous map ρ w : S → U i (R) by The fact that Λ is a homomorphism implies that ρ w is a homomorphism of profinite groups [Efr14, Lemma 7.5]. We call it the Magnus representation of S corresponding to w.
The subgroup S (n) of S is characterized in terms of the Magnus map as the set of all σ ∈ S such that ǫ w,Zp (σ) = 0 for every word w of length 1 ≤ i < n [Efr17, Prop. 4.1(a)]. The following result gives similar restrictions on the Magnus coefficients of elements of S (n,p) . In the discrete case, it was proved in [CE16, Example 4.6], where it was further shown that these restrictions in fact characterize S (n,p) . While it is possible to derive the proposition from the discrete case using a density argument, we provide a direct proof.

Proof. Consider the subset
It is an ideal in Z p X , and therefore 1 + I is closed under multiplication. Moreover, the identity α −1 = 1 − α −1 (α − 1) shows that 1 + I is in fact a subgroup of Z p X × .
Corollary 5.2. Let w, w ′ be nonempty words in For an integer 1 ≤ i ≤ n let be the natural epimorphism. For words w, w ′ of lengths i, i ′ , respectively, with w ′ ∈ H, we define w, w ′ n = π i (ǫ w,Zp (σ w ′ )).
By Corollary 5.2, w, w ′ n ∈ p jn(i) Z p /p jn(i)+1 Z p . We identify the latter group with Z/p, and thus view w, w ′ n as an element of Z/p. Consider the (possibly infinite) transposed matrix w, w ′ n T w,w ′ over Z/p, where w, w ′ range over all words in H of lengths in J(n), and indexed with respect to the total order on X * defined in §2. We call it the fundamental matrix of level n of H.
We now focus on the Hall set of Lyndon words (see the Introduction). We record the following fundamental triangularity property of H [Reu93, Th. 5.1]: For every Lyndon word w ∈ X * one has (5.1) Λ Zp (τ w ) = 1 + w + a combination of words strictly larger than w in . Proof. Let w be a Lyndon word of length i ≤ n. By (5.1), Λ Zp (σ w ) = (1 + w + · · · ) p jn(i) = 1 + p jn(i) w + · · · , where the remaining terms are multiples of of words strictly larger than w in . Therefore w, w n = π i (p jn(i) ) = 1 in Z/p. Furthermore, for Lyndon words w ≺ w ′ we get ǫ w,Zp (σ w ′ ) = 0, whence w, w ′ n = 0 (note that the empty word is not Lyndon). Consequently, the matrix [ w, w ′ n ] w,w ′ is unipotent lower-triangular, and therefore its transpose is unitriangular.
The Lyndon words of length ≤ 2 are the words w = (x) and w = (xy) with x, y ∈ X, x < y. Then σ w is τ p j 2 (1) w = x p and τ p j 2 (2) w = [x, y], respectively. In [Efr17,§10] it is shown that the value of w, w ′ , where w, w ′ are Lyndon words of lengths ≤ 2, respectively, is 1 if w = w ′ , and is 0 otherwise. Thus the fundamental matrix of level 2 for the Lyndon words is the identity matrix. respectively. We recall that w, w 3 = 1 for every w, and w, w ′ 3 = 0 when w ≺ w ′ . It remains to compute w, w ′ 3 when w ′ ≺ w. If |w|, |w ′ | ≤ 2, then by Example 5.4, w, w ′ 3 = 0. We may therefore assume that |w ′ | ≤ |w| = 3.
If w contains a letter which does not appear in w ′ , then ǫ w,Zp (σ w ′ ) = 0, whence w, w ′ 3 = 0. Thus we may assume that every letter in w appears in w ′ .
Altogether, we have shown that In particular, the fundamental matrix need not be the identity matrix.

Unitriangular matrices
Let i ≥ 1 and j ≥ 0 be integers and consider the ring R = Z/p j+1 . In this section we study the p-Zassenhaus filtration of the group U = U i (R) of all unitriangular (i+1)×(i+1)-matrices over R, and in particular characterize the values of i, j for which U (n,p) ∼ = Z/p (see §5 for the notation).
We denote the unit matrix in U by I, and write E 1,i+1 for the matrix which is 1 at entry (1, i + 1), and is 0 elsewhere. For i ′ ≥ 1, the subgroup U (i ′ ) of U consists of all matrices in U which are zero on the first i ′ − 1 diagonals above the main diagonal [BH15, Th. 1.5(i)].
We record the following fact about binomial coefficients: Lemma 6.1. Let t, j ′ be positive integers such that 1 ≤ t ≤ p j ′ . The following conditions are equivalent: Proof. Let N be an (i + 1) × (i + 1)-matrix over Z/p j+1 such that I + N ∈ U (i ′ ) . Then N l = 0 for every integer l with i/i ′ < l. Hence In particular, let M be the (i + 1) × (i + 1)-matrix over Z/p j+1 which is 1 on the (first) super-diagonal, and is 0 elsewhere. Then the matrix M i ′ l is 1 on the i ′ l-th diagonal above the main one, and is 0 elsewhere. In particular, I + M i ′ ∈ U (i ′ ) . As above, This matrix is p j ′ l on the i ′ l-th diagonals above the main one, and is 0 elsewhere.
Next we assume that i > i ′ . By the previous observations, (U (i ′ ) ) p j ′ = I + Zp j E 1,i+1 holds if and only if the following conditions hold: By Lemma 6.1 again, (i)-(iii) mean that i/i ′ is an integer ≤ p j ′ , and This amounts to saying that j ′ = j + log p (i/i ′ ). Corollary 6.3. Suppose that 1 ≤ i ≤ n and j = j n (i). One has U (n,p) = I + p jn(i) ZE 1,i+1 if and only if i ∈ J(n).
Thus, for i ∈ J(n) and U = U i (Z/p jn(i)+1 ) there is a central extension where the isomorphism is the projection on the (1, i + 1)-entry composed with the isomorphism p j(i) Z/p j(i)+1 Z ∼ = Z/p.

The cohomology elements α w,n
Let S be again a free profinite group on the basis X, and let n ≥ 2. Consider the transgression homomorphism trg : H 1 (S (n,p) ) S → H 2 (S/S (n,p) ) (recall that the cohomology groups are with respect to the coefficient module Z/p with trivial action). It is the differential d 01 2 in the Lyndon-Hochschild-Serre spectral sequence corresponding to the closed normal subgroup S (n,p) of S [NSW08, Th. 2.4.3]. It follows from the five term sequence in profinite cohomology [NSW08, Prop. 1.6.7] and the fact that S has cohomological dimension 1, that trg is an isomorphism. Now consider a word w of length i ∈ J(n). Consider the ring R i = Z/p jn(i)+1 , and set U = U i (R i ). As before, let U = U/U (n,p) . By Corollary 6.3, the projection on the (1, i + 1)-entry gives an isomorphism The Magnus representation ρ = ρ w : S → U induces continuous homomorphismsρ w : S/S (n,p) → U, ρ 0 w = ρ| S (n,p) : S (n,p) → U (n,p) . Letρ * w : H 2 (U) → H 2 (S/S (n,p) ) be the pullback ofρ w . Let γ = γ n,R i ∈ H 2 (U) correspond to the extension (6.1) under the Schreier correspondence [NSW08, Th. 1.2.4]. We set α w,n =ρ * w (γ) ∈ H 2 (S/S (n,p) ). Example 7.1. α w,n for a word w = (x) of length 1.
Let j = j n (1) = ⌈log p n⌉, so U = U 1 (Z/p j+1 ) ∼ = Z/p j+1 . As 1 ∈ J(n), we have U (n,p) ∼ = Z/p, and the central extension (6.1) becomes We consider this extension as a sequence of trivial S/S (n,p) -modules. The Bockstein homomorphism is the associated connecting homomorphism. We may identify ρ (x) : S → U with ǫ (x),Z/p j+1 : S → Z/p j+1 , andρ (x) : S/S (n,p) → U with ǫ (x),Z/p j : S/S (n,p) → Z/p j , which are both continuous homomorphisms. Thus α (x),n corresponds to the pullback of (7.1) under ǫ (x),Z/p j . By [Efr17,Remark 7.3], α (x),n = Bock p j ,S/S (n,p) (ǫ (x),Z/p j ). For Example 7.2 below, we first recall a few facts about Massey products. While these products are defined in the general context of differential graded algebras, in the special case of the n-fold Massey product H 1 (G, R) n → H 2 (G, R) in profinite (or discrete) group cohomology it can be alternatively described in terms of unitriangular representions. This was discovered by Dwyer [Dwy75] in the discrete case, and we refer to [Efr14,§8] for the profinite case, which is considered here. We assume as above that n ≥ 2 and R is a finite commutative ring on which G acts trivially (see [Wic12] for the case of a nontrivial action).
By Proposition 5.1 and Corollary 6.3, for a word w of length i ∈ J(n), there is a commutative diagram (8.2) S (n,p) where as before, π i : Z p → Z/p jn(i)+1 is the natural projection, and the lower isomorphism is the projection on the (1, i + 1)-entry. We deduce the following link between cohomology and the Magnus map. As before, we identify p jn(i) Z/p jn(i)+1 Z with Z/p.
We can therefore restate Proposition 5.3 cohomologically: Corollary 8.2. The transposed matrix (σ w ′ , α w,n ) n T w,w ′ , where w, w ′ range over all Lyndon words in X * of lengths i, i ′ , respectively, in J(n), and totally ordered by , coincides with the fundamental matrix of level n of the Lyndon words. In particular, it is unitriangular, whence invertible.
Example 8.3. Let n = 2. Then J(n) = {1, 2}. For every x ∈ X let ǫ x ∈ H 1 (S/S (2,p) ) be the homomorphism induced by ǫ (x),Z/p . It is 1 on the coset of x, and is 0 on the coset of any x ′ ∈ X, x ′ = x.
We will need the following elementary fact in linear algebra [Efr17,Lemma 8.4]: Lemma 8.4. Let R be a commutative ring and let (·, ·) : A × B → R be a non-degenerate bilinear map of R-modules. Let (I, ≤) be a finite totally ordered set, and for every w ∈ I let a w ∈ A, b w ∈ B. Suppose that the matrix (a w , b w ′ ) w,w ′ ∈I is invertible, and that a w , w ∈ I, generate A. Then a w , w ∈ I, is an R-linear basis of A, and b w , w ∈ I, is an R-linear basis of B.
We now deduce our first main result. Note that part (a) of the theorem strengthens Theorem 4.6 in the special case where H is the Hall set of Lyndon words.
(a) The F p -linear space S (n,p) /(S (n,p) ) p [S, S (n,p) ] has a basis consisting of the cosetsσ w of σ w , where w is a Lyndon word in X * of length i ∈ J(n). (b) The F p -linear space H 2 (S/S (n,p) ) has a basis consisting of all α w,n , where w is a Lyndon word in X * of length i ∈ J(n).
Proof. First assume that X is finite. By Theorem 4.6, the cosets in (a) generate S (n,p) /(S (n,p) ) p [S, S (n,p) ]. Furthermore, the bilinear map (·, ·) n of (8.1) is non-degenerate, and the fundamental matrix (σ w ′ , α w,n ) n w,w ′ is invertible, by Corollary 8.2. Therefore Lemma 8.4 implies both assertions. The case of general X follows from the finite case by a standard limit argument (see [NSW08, Prop. 1.2.5]).
(a) The F p -linear space S (n,p) /(S (n,p) ) p [S, S (n,p) ] has a basis consisting of: (i) the cosets of x p , x ∈ X; (ii) the cosets of τ w , where w is a Lyndon word in X * of length n. (b) The F p -linear space H 2 (S/S (n,p) ) has a basis consisting of: (i) The Bockstein elements Bock p,S/S (n,p) (ǫ (x),Z/p ) = α (x),n , x ∈ X; (ii) The n-fold Massey product elements α w,n , where w is a Lyndon word in X * of length n.
The number of words of a given length in a Hall set H can be expressed in terms of Witt's necklace function, defined for integers i, m ≥ 1 by Here µ is the Möbius function, i.e., µ(d) = (−1) k , if d is a product of k distinct prime numbers, and µ(d) = 0 otherwise. We also set ϕ i (∞) = ∞. Then, the number of words of length i in H is ϕ i (|X|) [Reu93,Cor. 4.14] We deduce: Corollary 8.7.

Shuffle relations
Recall that the shuffle product uxv of words u, v has been defined in the Introduction. It extends naturally to a bilinear, commutative and associative product map x : Z X × Z X → Z X . The shuffle algebra Sh(X) on X is the graded Z-algebra whose underlying module is the free module on X * (graded by the length of words), and its multiplication is x.
We define the infiltration product u ↓ v of words u = (x 1 · · · x r ), v = (x r+1 · · · x r+t ) in X * as follows (see [CFL58], [Reu93,). Consider all maps σ : {1, 2, . . . , r + t} → {1, 2, . . . , r + t} with σ(1) < · · · < σ(r) and σ(r + 1) < · · · < σ(r + t), and which satisfy the following weak form of injectivity: If σ(i) = σ(j), then x i = x j . Let the image of σ consist of l 1 < · · · < l m(σ) . Then we set By our assumption, x σ −1 (l i ) does not depend on the choice of the preimages σ −1 (l i ) of l i . We also write Infil(u, v) for the set of all such words (x σ −1 (l 1 ) · · · x σ −1 (l m(σ) ) ). Thus uxv is the part of u ↓ v of degree r + t, that is, the partial sum corresponding to all such maps σ which in addition are bijective. The product ↓ on words extends by linearity to an associative and commutative bilinear map on Z X . There is a well defined Z p -bilinear map where f w , g w are the coefficients of f , g, respectively, at w [Reu93, p. 17].
The following connection between the Magnus representation and the infiltration product is proved in the discrete case in [ Here we view the infiltration and shuffle products as elements of Z X ⊆ Z p X .
Proof. Let w be a word of length 1 ≤ k ≤ i − 1. Then j n (k) ≥ j n (i − 1), so by Proposition 5.1, ǫ w,Zp (σ) ∈ p jn(k) Z p ⊆ p jn(i−1) Z p . In particular, this is the case for w = u, w = v, and for w ∈ Infil(u, v) of length smaller than i. Since uxv is the part of u ↓ v consisting of summands of maximal length i, Proposition 9.1 implies that (Λ Zp (σ), uxv) ∈ p jn(i−1) Z p .
We obtain the following shuffle relations. Here X i stands for the set of words in X * of length i. Theorem 9.3. Let ∅ = u, v ∈ X * with i = |u| + |v| ∈ J(n). Then w∈X i (uxv) w α w,n = 0.
Given a graded R-algebra A = i≥0 A i , we denote A + = i≥1 A i . Let WD(A) be the R-submodule of A generated by all products aa ′ , where a, a ′ ∈ A + . We call WD(A) the submodule of weakly decomposable elements of A. It is also generated by all products aa ′ , where a, a ′ ∈ A + are homogenous. Hence the quotient A indec = A/WD(A) has the structure of a graded R-module, which we call the indecomposable quotient of A.
Note that WD(A) 0 = WD(A) 1 = {0}, so the graded module morphism A → A indec is an isomorphism in degrees 0 and 1. For example, when A = R X , one has A indec,0 = R, A indec,1 is the free R-module on the basis X, and A indec,i = 0 for all i ≥ 2.
When A = Sh(X) is the shuffle algebra, we recover the module Sh(X) indec,n as defined in the Introduction. The following key fact was proved in [Efr20, Prop. 6.3]. It is based on a construction by Radford [Rad79] and Perrin-Viennot of a basis of Z X , which arises from the decomposition of words in X * into Lyndon words.
Proposition 9.4. Suppose that 1 ≤ n < p. Then the images of the Lyndon words of length n span Sh(X) indec,n ⊗ (Z/p) as an F p -linear space.
In fact, in [Efr20, Th. 7.3(b)] it is proved that these images form a linear basis of Sh(X) indec,n ⊗ (Z/p), but we shall not use this stronger result.
We now obtain the Main Theorem from the Introduction: Theorem 9.6. Suppose that 2 ≤ n < p. Then there is an isomorphism of F p -linear spaces (9.2) x∈X Z/p ⊕ (Sh(X) indec,n ⊗ (Z/p) ∼ − → H 2 (S/S (n,p) ).
Specifically, this isomorphism maps a generator 1 x of the Z/p-summand at x ∈ X to Bock p,S/S (n,p) (ǫ (x),Z/p ), and maps the imagew of a word w ∈ X * of length n to the n-fold Massey product element α w,n .
Proof. By Remark 4.2(1), J(n) = {1, n}. Therefore Theorem 9.5 gives an epimorphism as in (9.2). The generators 1 x and the imagesw of words w of length n are mapped as specified, by Examples 7.1 and 7.2.
The generators 1 x , x ∈ X, clearly span x∈X Z/p, and by Proposition 9.4, the imagesw of the Lyndon words w in X * of length n span Sh(X) indec,n ⊗ (Z/p). Together they form a spanning set of the left-hand side of (9.2), which is mapped to a linear basis of the right-hand side (Corollary 8.6). It follows that this spanning set is a linear basis, and the map (9.2) is an isomorphism.