Abstract In [J. Amer. Math. Soc. 5 (1992) 805–851] Stanley introduced the concept of a P-kernel for any locally finite partially ordered set P. In [Proc. Sympos. Pure Math., Vol. 56, AMS, 1994, pp. 135–148] Du introduced, for any set P, the concept of an IC basis. The purpose of this article is to show that, under some mild hypotheses, these two concepts are equivalent, and to characterize, for a given Coxeter group W, partially ordered by Bruhat order, the W-kernel corresponding to the Kazhdan–Lusztig basis of the Hecke algebra of W. Finally, we show that this W-kernel factorizes as a product of other W-kernels, and that these provide a solution to the Yang–Baxter equations for W.