The sum rules are derived from general principles, and are useful in situations where the behavior of individual energy levels is too complex to be described by a precise quantum-mechanical theory. In general, sum rules are derived by using Heisenberg 's quantum-mechanical algebra to construct operator equalities, which are then applied to the particles or energy levels of a system.