  This paper is devoted to explore the freeness of Nichols algebras of diagonal
type and to determine the dimension of the kernel of the shuffle map considered
as an operator acting on the free algebra. Our proof is based on an inequality
for the number of Lyndon words and on an identity for the shuffle map. For a
particular family of examples, the freeness of the Nichols algebra is
characterized in terms of solutions of a quadratic diophantine equation.
