§  Weighted Burnside Lemma 
 -  I'm learning the weighted burnside lemma as a preamble to polya enumeration. 
-  Define for a set  X with a group action  G, a weight function on the orbits  O. Said differently, we have a weight function  w:X→W such that  w(x)=w(g(x)) for all  x∈X and  g∈G. 
-  We wish to count the orbits of  X weighted by the weight function  w:X→W (where  W is a commutative ring). So we wish to find  ∑o∈Orb(X)w(o). 
-  Recall that Burnside tells us that: 
∣X/G∣=g∈G∑∣Fix(g)∣ 
 -  We replace cardinality with weight, giving us the statement: 
w(X/G)=1/∣G∣(g∈G∑w(Fix(g)))=[o]∈X/G∑w(o)=1/∣G∣(g∈G∑x∈Fix(g)∑w(x)) 
 -  In english, this reads: for each orbit in  X/G, pick an equivalence class representative  o. The sum of weights of the representatives equals the average over  G of the fixpoint-weights. 
 §  Proof 
 -  We begin by considering the LHS: 
-   y=∑g∈G∑x∈Fix(g)w(x). 
-  We switch the order of summation to get  y=∑x∈X∑g∈G[gx=x]w(x) where  [gx=x] is the Iverson bracket --- it evaluates to 1 if  gx=x and  0 if  gx=x. 
-  We pull the constant  w(x) out to get  y=∑x∈Xw(x)(∑g∈G[gx=x]). 
-  We see that  ∑g∈G[gx=x] is the cardinality of the stabilizer of  x, written as  ∣Stab(G,x)∣. So we write this as  y=∑x∈X∣Stab(G,x)∣w(x). 
-  By orbit stabilizer, we use  ∣Stab(G,x)∣⋅∣Orb(G,x)∣=∣G∣. Thus, we get y=∣G∣∑x∈Xw(x)/∣Orb(G,x)∣. 
-  Since the set of orbits partitions  X, we write the above as 
-   y=∣G∣∑[o]∈G/X∑x∈[o]w(x)/∣Orb(G,x)∣. 
-  Since  [o] is the orbit of  x, we replace  Orb(G,x) with  o, giving  y=∣G∣∑[o]∈G/X∑x∈[o]w(x)/∣[o]∣. 
-  Since the weight is constant on orbits, we replace  w(x) by  w(o) giving  y=∣G∣∑[o]∈G/X∑x∈[o]w(o)/∣[o]∣. 
-  We pull the inner terms out giving  y=∣G∣∑[o]∈X/Gw(o)/∣[o]∣∑x∈[o]1. 
-  Since  ∑x∈[o]1=∣o∣, we get  ∣G∣∑[o]∈X/Gw(o)/∣[o]∣∣[o]∣ which simplies to  y=∣G∣∑[o]∈X/Gw(o). 
-  We are done, since we have shown that  ∑g∈G∑x∈Fix(g)w(x)=∣G∣∑[o]∈X/Gw(o). 
y=g∈G∑x∈Fix(g)∑w(x)=g∈G∑x∈X∑[gx=x]w(x)=x∈X∑g∈G∑[gx=x]w(x)=x∈X∑w(x)g∈G∑[gx=x]=x∈X∑w(x)Stab(x)=x∈X∑w(x)∣G∣/∣Orb(G,x)=∣G∣x∈X∑w(x)/∣Orb(G,x)=∣G∣[o]∈X/G∑x∈O∑w(x)/∣Orb(G,x)∣=∣G∣[o]∈X/G∑x∈O∑w(o)/∣Orb(G,x)∣=∣G∣[o]∈X/G∑x∈O∑w(o)/∣o∣=∣G∣[o]∈X/G∑w(o)/∣o∣x∈O∑1=∣G∣[o]∈X/G∑w(o)/∣o∣⋅∣o∣=∣G∣[o]∈X/G∑w(o) 
  §  Example, Unweighted 
 -  Suppose we squares acted on by rotations  e,r,r2,r3. It takes the square: 
a b
c d
 to the squares: 
 e     r     r^2   r^3
----|-----|-----|-----
1 2 | 4 1 | 4 2 | 4 3
3 4 | 3 2 | 3 1 | 1 2