The Belkale-Kumar cup product and relative Lie algebra cohomology