  Methods of Harder and Narasimhan from the theory of moduli of vector bundles
are applied to moduli of quiver representations. Using the Hall algebra
approach to quantum groups, an analog of the Harder-Narasimhan recursion is
constructed inside the quantized enveloping algebra of a Kac-Moody algebra.
This leads to a canonical orthogonal system, the HN system, in this algebra.
Using a resolution of the recursion, an explicit formula for the HN system is
given. As an application, explicit formulas for Betti numbers of the cohomology
of quiver moduli are derived, generalizing several results on the cohomology of
quotients in 'linear algebra type' situations.
