Documentation

Mathlib.RingTheory.Binomial

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 #

Results #

References #

TODO #

Further results in Elliot's paper:

class BinomialRing (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.

  • nsmul_right_injective : ∀ (n : ), n 0Function.Injective fun (x : R) => n x

    Scalar multiplication by positive integers is injective

  • multichoose : RR

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

  • factorial_nsmul_multichoose : ∀ (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!

Instances
    theorem Ring.nsmul_right_injective {R : Type u_1} [AddCommMonoid R] [Pow R ] [BinomialRing R] (n : ) (h : n 0) :
    Function.Injective fun (x : R) => n x
    def Ring.multichoose {R : Type u_1} [AddCommMonoid R] [Pow R ] [BinomialRing R] (r : R) (n : ) :
    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.

    Equations
    Instances For
      @[simp]
      theorem Ring.multichoose_zero_right' {R : Type u_1} [AddCommMonoid R] [Pow R ] [BinomialRing R] (r : R) :
      @[simp]
      theorem Ring.multichoose_one_right' {R : Type u_1} [AddCommMonoid R] [Pow R ] [BinomialRing R] (r : R) :
      @[simp]
      theorem Ring.ascPochhammer_succ_succ {R : Type u_2} [NonAssocSemiring R] [Pow R ] [NatPowAssoc R] [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 {R : Type u_2} [NonAssocSemiring R] [Pow R ] [NatPowAssoc R] [BinomialRing R] (r : R) (k : ) :
      Ring.multichoose (r + 1) (k + 1) = Ring.multichoose r (k + 1) + Ring.multichoose (r + 1) k
      @[simp]
      @[simp]
      theorem Polynomial.ascPochhammer_smeval_cast (R : Type u_1) [Semiring R] {S : Type u_2} [NonAssocSemiring S] [Pow S ] [Module R S] [IsScalarTower R S S] [NatPowAssoc S] (x : S) (n : ) :
      (ascPochhammer R n).smeval x = (ascPochhammer n).smeval x
      theorem Polynomial.descPochhammer_smeval_eq_ascPochhammer {R : Type u_1} [NonAssocRing R] [Pow R ] [NatPowAssoc R] (r : R) (n : ) :
      (descPochhammer n).smeval r = (ascPochhammer n).smeval (r - n + 1)
      theorem Polynomial.descPochhammer_smeval_eq_descFactorial {R : Type u_1} [NonAssocRing R] [Pow R ] [NatPowAssoc R] (n k : ) :
      (descPochhammer k).smeval n = (n.descFactorial k)
      theorem Polynomial.ascPochhammer_smeval_neg_eq_descPochhammer {R : Type u_1} [NonAssocRing R] [Pow R ] [NatPowAssoc R] (r : R) (k : ) :
      (ascPochhammer k).smeval (-r) = (-1) ^ k * (descPochhammer k).smeval r
      Equations
      • One or more equations did not get rendered due to their size.
      def Int.multichoose (n : ) (k : ) :

      The multichoose function for integers.

      Equations
      Instances For
        Equations
        noncomputable instance instBinomialRingOfModuleNNRat {R : Type u_1} [AddCommMonoid R] [Module ℚ≥0 R] [Pow R ] :
        Equations
        • instBinomialRingOfModuleNNRat = { nsmul_right_injective := , multichoose := fun (r : R) (n : ) => (↑n.factorial)⁻¹ (ascPochhammer n).smeval r, factorial_nsmul_multichoose := }
        @[simp]
        theorem Ring.smeval_ascPochhammer_self_neg (n : ) :
        (ascPochhammer n).smeval (-n) = (-1) ^ n * n.factorial
        @[simp]
        theorem Ring.smeval_ascPochhammer_succ_neg (n : ) :
        (ascPochhammer (n + 1)).smeval (-n) = 0
        theorem Ring.smeval_ascPochhammer_neg_add (n k : ) :
        (ascPochhammer (n + k + 1)).smeval (-n) = 0
        @[simp]
        theorem Ring.smeval_ascPochhammer_neg_of_lt {n k : } (h : n < k) :
        (ascPochhammer k).smeval (-n) = 0
        theorem Ring.smeval_ascPochhammer_nat_cast {R : Type u_2} [NonAssocRing R] [Pow R ] [NatPowAssoc R] (n k : ) :
        (ascPochhammer k).smeval n = ((ascPochhammer k).smeval n)
        @[simp]
        theorem Ring.multichoose_neg_succ (n : ) :
        Ring.multichoose (-n) (n + 1) = 0
        theorem Ring.multichoose_neg_add (n k : ) :
        Ring.multichoose (-n) (n + k + 1) = 0
        @[simp]
        theorem Ring.multichoose_neg_of_lt (n k : ) (h : n < k) :
        Ring.multichoose (-n) k = 0
        theorem Ring.smeval_ascPochhammer_int_ofNat {R : Type u_2} [NonAssocRing R] [Pow R ] [NatPowAssoc R] (r : R) (n : ) :
        (ascPochhammer n).smeval r = (ascPochhammer n).smeval r
        def Ring.choose {R : Type u_1} [AddCommGroupWithOne R] [Pow R ] [BinomialRing R] (r : R) (n : ) :
        R

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

        Equations
        Instances For
          theorem Ring.descPochhammer_eq_factorial_smul_choose {R : Type u_1} [NonAssocRing R] [Pow R ] [BinomialRing R] [NatPowAssoc R] (r : R) (n : ) :
          (descPochhammer n).smeval r = n.factorial Ring.choose r n
          theorem Ring.choose_natCast {R : Type u_1} [NonAssocRing R] [Pow R ] [BinomialRing R] [NatPowAssoc R] (n k : ) :
          Ring.choose (↑n) k = (n.choose k)
          @[deprecated Ring.choose_natCast]
          theorem Ring.choose_nat_cast {R : Type u_1} [NonAssocRing R] [Pow R ] [BinomialRing R] [NatPowAssoc R] (n k : ) :
          Ring.choose (↑n) k = (n.choose k)

          Alias of Ring.choose_natCast.

          @[simp]
          theorem Ring.choose_zero_right' {R : Type u_1} [NonAssocRing R] [Pow R ] [BinomialRing R] (r : R) :
          Ring.choose r 0 = (r + 1) ^ 0
          theorem Ring.choose_zero_right {R : Type u_1} [NonAssocRing R] [Pow R ] [BinomialRing R] [NatPowAssoc R] (r : R) :
          @[simp]
          theorem Ring.choose_zero_succ (R : Type u_2) [NonAssocRing R] [Pow R ] [NatPowAssoc R] [BinomialRing R] (n : ) :
          Ring.choose 0 (n + 1) = 0
          theorem Ring.choose_zero_pos (R : Type u_2) [NonAssocRing R] [Pow R ] [NatPowAssoc R] [BinomialRing R] {k : } (h_pos : 0 < k) :
          theorem Ring.choose_zero_ite (R : Type u_2) [NonAssocRing R] [Pow R ] [NatPowAssoc R] [BinomialRing R] (k : ) :
          Ring.choose 0 k = if k = 0 then 1 else 0
          @[simp]
          theorem Ring.choose_one_right' {R : Type u_1} [NonAssocRing R] [Pow R ] [BinomialRing R] (r : R) :
          Ring.choose r 1 = r ^ 1
          theorem Ring.choose_one_right {R : Type u_1} [NonAssocRing R] [Pow R ] [BinomialRing R] [NatPowAssoc R] (r : R) :
          theorem Ring.descPochhammer_succ_succ_smeval {R : Type u_2} [NonAssocRing R] [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 {R : Type u_1} [NonAssocRing R] [Pow R ] [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_eq_nat_choose {R : Type u_1} [NonAssocRing R] [Pow R ] [BinomialRing R] [NatPowAssoc R] (n k : ) :
          Ring.choose (↑n) k = (n.choose k)
          theorem Ring.choose_smul_choose {R : Type u_1} [NonAssocRing R] [Pow R ] [BinomialRing R] [NatPowAssoc R] (r : R) (n k : ) (hkn : 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 {R : Type u_1} [NonAssocRing R] [Pow R ] [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.descPochhammer_smeval_add {R : Type u_1} [Ring R] {r s : R} (k : ) (h : Commute r s) :
          (descPochhammer k).smeval (r + s) = ijFinset.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 {R : Type u_1} [Ring R] [BinomialRing R] {r s : R} (k : ) (h : Commute r s) :
          Ring.choose (r + s) k = ijFinset.antidiagonal k, Ring.choose r ij.1 * Ring.choose s ij.2

          The Chu-Vandermonde identity for binomial rings