### A presentation by generators and relations of Nichols algebras of diagonal type and convex orders on root systems

We obtain a presentation by generators and relations of any Nichols algebra of diagonal type with finite root system. We prove that the defining ideal is finitely generated. The proof is based on Kharchenko’s theory of PBW bases of Lyndon words. We prove that the lexicographic order on Lyndon words is convex for PBW generators and so the PBW basis is orthogonal with respect to the canonical non-degenerate form associated to the Nichols algebra.