Documentation

Mathlib.Combinatorics.Enumerative.Partition.Glaisher

Glaisher's theorem #

This file proves Glaisher's theorem: the number of partitions of an integer $n$ into parts not divisible by $d$ is equal to the number of partitions in which no part is repeated $d$ or more times.

Main declarations #

Proof outline #

The proof is based on the generating functions for restricted and countRestricted partitions, which turn out to be equal:

$$\prod_{i=1,i\nmid m}^\infty\frac{1}{1-X^i}=\prod_{i=0}^\infty (1+X^{i+1}+\cdots+X^{(m-1)(i+1)})$$

References #

https://en.wikipedia.org/wiki/Glaisher%27s_theorem

theorem Nat.Partition.hasProd_powerSeriesMk_card_restricted (R : Type u_1) [TopologicalSpace R] [T2Space R] [CommSemiring R] [IsTopologicalSemiring R] (p : Prop) [DecidablePred p] :
HasProd (fun (i : ) => if p (i + 1) then ∑' (j : ), PowerSeries.X ^ ((i + 1) * j) else 1) (PowerSeries.mk fun (n : ) => (restricted n p).card)

The generating function of Nat.Partition.restricted n p is $$ \prod_{i \in p} \sum_{j = 0}^{\infty} X^{ij} $$

theorem Nat.Partition.hasProd_powerSeriesMk_card_countRestricted (R : Type u_1) [TopologicalSpace R] [T2Space R] [CommSemiring R] {m : } (hm : 0 < m) :
HasProd (fun (i : ) => jFinset.range m, PowerSeries.X ^ ((i + 1) * j)) (PowerSeries.mk fun (n : ) => (countRestricted n m).card)

The generating function of Nat.Partition.countRestricted n m is $$ \prod_{i = 1}^{\infty} \sum_{j = 0}^{m - 1} X^{ij} $$