Weighted Burnside lemma (source code)

= Weighted Burnside lemma

Let a <finite group> $G$ act on a <finite set> $X$, with an orbit-invariant weight $w:X\to R$ in a <commutative ring>. Double counting gives the division-free identity
$$
\sum_{g\in G}\sum_{x:gx=x}w(x)=|G|\sum_{O\in X/G}w(O).
$$
Indeed, each $x$ is counted $|G_x|$ times, and each <orbit> contributes $|O||G_x|=|G|$ copies of its common weight. If $|G|$ is invertible in $R$, dividing gives the weighted average formula of <Burnside's lemma>. For formal <monomial> weights one can first count over the <integers> and then specialize into any <commutative ring>; this avoids dividing by zero in modular <characteristic>.