The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V09. Commutative algebra I: ideals, polynomials, factorization

Mathlib.RingTheory.Binomial

60 declarations and 2 deprecated aliases. Mathlib docs · Source

Binomial rings

In this file we introduce the binomial property as a mixin, and define the multichoose and choose functions generalizing binomial coefficients.

According to our main reference [elliott2006binomial] (which lists many equivalent conditions), a binomial ring is a torsion-free commutative ring R such that for any x ∈ R and any k ∈ ℕ, the product x(x-1)⋯(x-k+1) is divisible by k!. The torsion-free condition lets us divide by k! unambiguously, so we get uniquely defined binomial coefficients.

The defining condition doesn't require commutativity or associativity, and we get a theory with essentially the same power by replacing subtraction with addition. Thus, we consider any additive commutative monoid with a notion of natural number exponents in which multiplication by positive integers is injective, and demand that the evaluation of the ascending Pochhammer polynomial X(X+1)⋯(X+(k-1)) at any element is divisible by k!. The quotient is called multichoose r k, because for r a natural number, it is the number of multisets of cardinality k taken from a type of cardinality n.

Definitions

  • BinomialRing: a mixin class specifying a suitable multichoose function.
  • Ring.multichoose: the quotient of an ascending Pochhammer evaluation by a factorial.
  • Ring.choose: the quotient of a descending Pochhammer evaluation by a factorial.

Results

  • Basic results with choose and multichoose, e.g., choose_zero_right
  • Relations between choose and multichoose, negated input.
  • Fundamental recursion: choose_succ_succ
  • Chu-Vandermonde identity: add_choose_eq
  • Pochhammer API

References

  • [J. Elliott, Binomial rings, integer-valued polynomials, and λ-rings][elliott2006binomial]

TODO

Further results in Elliot's paper:

  • A CommRing is binomial if and only if it admits a λ-ring structure with trivial Adams operations.
  • The free commutative binomial ring on a set X is the ring of integer-valued polynomials in the variables X. (also, noncommutative version?)
  • Given a commutative binomial ring A and an A-algebra B that is complete with respect to an ideal I, formal exponentiation induces an A-module structure on the multiplicative subgroup 1 + I.

def BinomialRing.ctorIdx E1 #

{R : Type u_1} → {inst : AddCommMonoid R} → {inst_1 : Pow R ℕ} → BinomialRing R → ℕ

class BinomialRing E1 #

(R : Type u_1) → [AddCommMonoid R] → [Pow R ℕ] → Type u_1

A binomial ring is a ring for which ascending Pochhammer evaluations are uniquely divisible by suitable factorials. We define this notion as a mixin for additive commutative monoids with natural number powers, but retain the ring name. We introduce Ring.multichoose as the uniquely defined quotient.

ctor BinomialRing.mk E0 #

{R : Type u_1} →
  [inst : AddCommMonoid R] →
    [inst_1 : Pow R ℕ] →
      [toHasUniqueDiv : HasUniqueDiv R] →
        (multichoose : R → ℕ → R) →
          (∀ (r : R) (n : ℕ), n.factorial • multichoose r n = (ascPochhammer ℕ n).smeval r) → BinomialRing R

theorem BinomialRing.toHasUniqueDiv E1 #

∀ {R : Type u_1} {inst : AddCommMonoid R} {inst_1 : Pow R ℕ} [self : BinomialRing R], HasUniqueDiv R

abbrev BinomialRing.multichoose E1 #

{R : Type u_1} → {inst : AddCommMonoid R} → {inst_1 : Pow R ℕ} → [self : BinomialRing R] → R → ℕ → R

A multichoose function, giving the quotient of Pochhammer evaluations by factorials.

theorem BinomialRing.factorial_nsmul_multichoose E1 #

∀ {R : Type u_1} {inst : AddCommMonoid R} {inst_1 : Pow R ℕ} [self : BinomialRing R] (r : R) (n : ℕ),
  n.factorial • BinomialRing.multichoose r n = (ascPochhammer ℕ n).smeval r

The nth ascending Pochhammer polynomial evaluated at any element is divisible by n!

def Ring.multichoose E1 #

{R : Type u_1} → [inst : AddCommMonoid R] → [inst_1 : Pow R ℕ] → [BinomialRing R] → R → ℕ → R

The multichoose function is the quotient of ascending Pochhammer evaluation by the corresponding factorial. When applied to natural numbers, multichoose k n describes choosing a multiset of n items from a type of size k, i.e., choosing with replacement.

theorem Ring.multichoose_eq_multichoose E0 #

∀ {R : Type u_1} [inst : AddCommMonoid R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] (r : R) (n : ℕ),
  BinomialRing.multichoose r n = Ring.multichoose r n

theorem Ring.factorial_nsmul_multichoose_eq_ascPochhammer E1 #

∀ {R : Type u_1} [inst : AddCommMonoid R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] (r : R) (n : ℕ),
  n.factorial • Ring.multichoose r n = (ascPochhammer ℕ n).smeval r

theorem Ring.multichoose_zero_right' E0 #

∀ {R : Type u_1} [inst : AddCommMonoid R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] (r : R),
  Ring.multichoose r 0 = r ^ 0

theorem Ring.multichoose_zero_right E1 #

∀ {R : Type u_1} [inst : AddCommMonoid R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] [inst_3 : MulOneClass R]
  [NatPowAssoc R] (r : R), Ring.multichoose r 0 = 1

theorem Ring.multichoose_one_right' E0 #

∀ {R : Type u_1} [inst : AddCommMonoid R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] (r : R),
  Ring.multichoose r 1 = r ^ 1

theorem Ring.multichoose_one_right E1 #

∀ {R : Type u_1} [inst : AddCommMonoid R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] [inst_3 : MulOneClass R]
  [NatPowAssoc R] (r : R), Ring.multichoose r 1 = r

theorem Ring.multichoose_zero_succ E0 #

∀ {R : Type u_2} [inst : NonAssocSemiring R] [inst_1 : Pow R ℕ] [NatPowAssoc R] [inst_3 : BinomialRing R] (k : ℕ),
  Ring.multichoose 0 (k + 1) = 0

theorem Ring.ascPochhammer_succ_succ E1 #

∀ {R : Type u_2} [inst : NonAssocSemiring R] [inst_1 : Pow R ℕ] [NatPowAssoc R] [inst_3 : BinomialRing R] (r : R)
  (k : ℕ),
  (ascPochhammer ℕ (k + 1)).smeval (r + 1) =
    (k + 1).factorial • Ring.multichoose (r + 1) k + (ascPochhammer ℕ (k + 1)).smeval r

theorem Ring.multichoose_succ_succ E1 #

∀ {R : Type u_2} [inst : NonAssocSemiring R] [inst_1 : Pow R ℕ] [NatPowAssoc R] [inst_3 : BinomialRing R] (r : R)
  (k : ℕ), Ring.multichoose (r + 1) (k + 1) = Ring.multichoose r (k + 1) + Ring.multichoose (r + 1) k

theorem Ring.multichoose_one E0 #

∀ {R : Type u_2} [inst : NonAssocSemiring R] [inst_1 : Pow R ℕ] [NatPowAssoc R] [inst_3 : BinomialRing R] (k : ℕ),
  Ring.multichoose 1 k = 1

theorem Ring.multichoose_two E1 #

∀ {R : Type u_2} [inst : NonAssocSemiring R] [inst_1 : Pow R ℕ] [NatPowAssoc R] [inst_3 : BinomialRing R] (k : ℕ),
  Ring.multichoose 2 k = ↑k + 1

theorem Ring.map_multichoose E0 #

∀ {R : Type u_3} {S : Type u_4} {F : Type u_5} [inst : Ring R] [inst_1 : Ring S] [inst_2 : BinomialRing R]
  [inst_3 : BinomialRing S] [inst_4 : FunLike F R S] [RingHomClass F R S] (f : F) (a : R) (n : ℕ),
  f (Ring.multichoose a n) = Ring.multichoose (f a) n

theorem Polynomial.ascPochhammer_smeval_cast E0 #

∀ (R : Type u_1) [inst : Semiring R] {S : Type u_2} [inst_1 : NonAssocSemiring S] [inst_2 : Pow S ℕ]
  [inst_3 : Module R S] [IsScalarTower R S S] [NatPowAssoc S] (x : S) (n : ℕ),
  (ascPochhammer R n).smeval x = (ascPochhammer ℕ n).smeval x

theorem Polynomial.ascPochhammer_smeval_eq_eval E1 #

∀ {R : Type u_1} [inst : Semiring R] (r : R) (n : ℕ),
  (ascPochhammer ℕ n).smeval r = Polynomial.eval r (ascPochhammer R n)

theorem Polynomial.descPochhammer_smeval_eq_ascPochhammer E1 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [NatPowAssoc R] (r : R) (n : ℕ),
  (descPochhammer ℤ n).smeval r = (ascPochhammer ℕ n).smeval (r - ↑n + 1)

theorem Polynomial.descPochhammer_smeval_eq_descFactorial E1 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [NatPowAssoc R] (n k : ℕ),
  (descPochhammer ℤ k).smeval ↑n = ↑(n.descFactorial k)

theorem Polynomial.ascPochhammer_smeval_neg_eq_descPochhammer E1 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [NatPowAssoc R] (r : R) (k : ℕ),
  (ascPochhammer ℕ k).smeval (-r) = (↑k).negOnePow • (descPochhammer ℤ k).smeval r

instance Nat.instBinomialRing E0 #

BinomialRing ℕ

def Int.multichoose E1 #

ℤ → ℕ → ℤ

The multichoose function for integers.

instance Int.instBinomialRing E0 #

BinomialRing ℤ

instance instBinomialRingOfModuleNNRat E0 #

{R : Type u_1} → [inst : AddCommMonoid R] → [Module ℚ≥0 R] → [inst_2 : Pow R ℕ] → BinomialRing R

theorem Ring.smeval_ascPochhammer_self_neg E0 #

∀ (n : ℕ), (ascPochhammer ℕ n).smeval (-↑n) = (-1) ^ n * ↑n.factorial

theorem Ring.smeval_ascPochhammer_succ_neg E0 #

∀ (n : ℕ), (ascPochhammer ℕ (n + 1)).smeval (-↑n) = 0

theorem Ring.smeval_ascPochhammer_neg_add E1 #

∀ (n k : ℕ), (ascPochhammer ℕ (n + k + 1)).smeval (-↑n) = 0

theorem Ring.smeval_ascPochhammer_neg_of_lt E0 #

∀ {n k : ℕ}, n < k → (ascPochhammer ℕ k).smeval (-↑n) = 0

theorem Ring.smeval_ascPochhammer_natCast E1 #

∀ {R : Type u_2} [inst : NonAssocSemiring R] [inst_1 : Pow R ℕ] [NatPowAssoc R] (n k : ℕ),
  (ascPochhammer ℕ k).smeval ↑n = ↑((ascPochhammer ℕ k).smeval n)

theorem Ring.multichoose_neg_self E1 #

∀ (n : ℕ), Ring.multichoose (-↑n) n = (-1) ^ n

theorem Ring.multichoose_neg_succ E0 #

∀ (n : ℕ), Ring.multichoose (-↑n) (n + 1) = 0

theorem Ring.multichoose_neg_add E1 #

∀ (n k : ℕ), Ring.multichoose (-↑n) (n + k + 1) = 0

theorem Ring.multichoose_neg_of_lt E0 #

∀ (n k : ℕ), n < k → Ring.multichoose (-↑n) k = 0

theorem Ring.multichoose_succ_neg_natCast E1 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] [NatPowAssoc R] (n : ℕ),
  Ring.multichoose (-↑n) (n + 1) = 0

theorem Ring.smeval_ascPochhammer_int_ofNat E1 #

∀ {R : Type u_2} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [NatPowAssoc R] (r : R) (n : ℕ),
  (ascPochhammer ℤ n).smeval r = (ascPochhammer ℕ n).smeval r

def Ring.choose E1 #

{R : Type u_1} → [inst : AddCommGroupWithOne R] → [inst_1 : Pow R ℕ] → [BinomialRing R] → R → ℕ → R

The binomial coefficient choose r n generalizes the natural number Nat.choose function, interpreted in terms of choosing without replacement.

theorem Ring.multichoose_eq E0 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] (r : R) (n : ℕ),
  Ring.multichoose r n = Ring.choose (r + ↑n - 1) n

theorem Ring.descPochhammer_eq_factorial_smul_choose E1 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] [NatPowAssoc R] (r : R) (n : ℕ),
  (descPochhammer ℤ n).smeval r = n.factorial • Ring.choose r n

theorem Ring.choose_natCast E1 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] [NatPowAssoc R] (n k : ℕ),
  Ring.choose (↑n) k = ↑(n.choose k)

theorem Ring.choose_zero_right' E0 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] (r : R),
  Ring.choose r 0 = (r + 1) ^ 0

theorem Ring.choose_zero_right E1 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] [NatPowAssoc R] (r : R),
  Ring.choose r 0 = 1

theorem Ring.choose_zero_succ E0 #

∀ (R : Type u_2) [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [NatPowAssoc R] [inst_3 : BinomialRing R] (n : ℕ),
  Ring.choose 0 (n + 1) = 0

theorem Ring.choose_zero_pos E1 #

∀ (R : Type u_2) [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [NatPowAssoc R] [inst_3 : BinomialRing R] {k : ℕ},
  0 < k → Ring.choose 0 k = 0

theorem Ring.choose_zero_ite E1 #

∀ (R : Type u_2) [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [NatPowAssoc R] [inst_3 : BinomialRing R] (k : ℕ),
  Ring.choose 0 k = if k = 0 then 1 else 0

theorem Ring.choose_one_right' E0 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] (r : R), Ring.choose r 1 = r ^ 1

theorem Ring.choose_one_right E1 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] [NatPowAssoc R] (r : R),
  Ring.choose r 1 = r

theorem Ring.choose_neg E1 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] [NatPowAssoc R] (r : R) (n : ℕ),
  Ring.choose (-r) n = (↑n).negOnePow • Ring.choose (r + ↑n - 1) n

theorem Ring.choose_neg' E1 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] [NatPowAssoc R] (r : R) (n : ℕ),
  Ring.choose (-r) n = (↑n).negOnePow • Ring.multichoose r n

theorem Ring.descPochhammer_succ_succ_smeval E1 #

∀ {R : Type u_2} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [NatPowAssoc R] (r : R) (k : ℕ),
  (descPochhammer ℤ (k + 1)).smeval (r + 1) =
    (k + 1) • (descPochhammer ℤ k).smeval r + (descPochhammer ℤ (k + 1)).smeval r

theorem Ring.choose_succ_succ E1 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] [NatPowAssoc R] (r : R) (k : ℕ),
  Ring.choose (r + 1) (k + 1) = Ring.choose r k + Ring.choose r (k + 1)

theorem Ring.choose_smul_choose E1 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] [NatPowAssoc R] (r : R) {n k : ℕ},
  k ≤ n → n.choose k • Ring.choose r n = Ring.choose r k * Ring.choose (r - ↑k) (n - k)

theorem Ring.choose_add_smul_choose E1 #

∀ {R : Type u_1} [inst : NonAssocRing R] [inst_1 : Pow R ℕ] [inst_2 : BinomialRing R] [NatPowAssoc R] (r : R) (n k : ℕ),
  (n + k).choose k • Ring.choose (r + ↑k) (n + k) = Ring.choose (r + ↑k) k * Ring.choose r n

theorem Ring.choose_eq_smul E1 #

∀ {R : Type u_1} [inst : Field R] [inst_1 : CharZero R] {a : R} {n : ℕ},
  Ring.choose a n = (↑n.factorial)⁻¹ • (descPochhammer ℤ n).smeval a

theorem Ring.descPochhammer_smeval_add E2 #

∀ {R : Type u_1} [inst : Ring R] {r s : R} (k : ℕ),
  Commute r s →
    (descPochhammer ℤ k).smeval (r + s) =
      ∑ ij ∈ Finset.HasAntidiagonal.antidiagonal k,
        ↑(k.choose ij.1) * ((descPochhammer ℤ ij.1).smeval r * (descPochhammer ℤ ij.2).smeval s)

Pochhammer version of Chu-Vandermonde identity

theorem Ring.add_choose_eq E0 #

∀ {R : Type u_1} [inst : Ring R] [inst_1 : BinomialRing R] {r s : R} (k : ℕ),
  Commute r s →
    Ring.choose (r + s) k = ∑ ij ∈ Finset.HasAntidiagonal.antidiagonal k, Ring.choose r ij.1 * Ring.choose s ij.2

The Chu-Vandermonde identity for binomial rings

theorem Ring.map_choose E0 #

∀ {R : Type u_2} {S : Type u_3} {F : Type u_4} [inst : Ring R] [inst_1 : Ring S] [inst_2 : BinomialRing R]
  [inst_3 : BinomialRing S] [inst_4 : FunLike F R S] [RingHomClass F R S] (f : F) (a : R) (n : ℕ),
  f (Ring.choose a n) = Ring.choose (f a) n

Deprecated aliases

NameNew nameSince
BinomialRing.toIsAddTorsionFreeBinomialRing.toHasUniqueDiv2026-09-29
Ring.smeval_ascPochhammer_nat_castRing.smeval_ascPochhammer_natCast2026-10-13