{
  "artifactId": "artifact.library.mathlib.binomial-theorem.v001",
  "candidateOnly": false,
  "category": "Algebra",
  "claimBoundary": "This page indexes Mathlib's commutative-semiring binomial theorem add_pow. For x and y in a commutative semiring and n in ℕ, it gives one finite sum indexed by range (n + 1), with summand x ^ m * y ^ (n - m) * n.choose m. It is not an analytic infinite-series statement, does not extend the exponent beyond natural numbers, and does not claim the formula for arbitrary noncommuting elements.",
  "collectionSlug": "landmark-theorems-in-mathlib",
  "exactFormalStatement": "theorem add_pow [CommSemiring R] (x y : R) (n : ℕ) : (x + y) ^ n = ∑ m ∈ range (n + 1), x ^ m * y ^ (n - m) * n.choose m",
  "family": "Commutative algebra",
  "id": "library.mathlib.binomial-theorem.v001",
  "links": {
    "collection": "/collections/landmark-theorems-in-mathlib/",
    "collectionData": "/data/collections/mathlib-landmarks.json",
    "entry": "/library-theorems/binomial-theorem/",
    "entryData": "/data/library-theorems/binomial-theorem.json",
    "evidence": "/proofs/artifact.library.mathlib.binomial-theorem.v001.html",
    "evidenceData": "/data/proofs/artifact.library.mathlib.binomial-theorem.v001.evidence.json",
    "source": "/sources/upstream/binomial-theorem/"
  },
  "landmark": {
    "completeFormalType": "theorem add_pow [CommSemiring R] (x y : R) (n : ℕ) : (x + y) ^ n = ∑ m ∈ range (n + 1), x ^ m * y ^ (n - m) * n.choose m",
    "concepts": [
      "binomial theorem",
      "commutative semirings",
      "finite sums",
      "binomial coefficients",
      "natural powers",
      "combinatorial choice"
    ],
    "plainLanguage": "In any commutative semiring, expanding the nth power of x + y gives a finite sum with one term for each m from 0 through n: choose m of the n factors to contribute x, let the others contribute y, and weight the resulting monomial by n.choose m.",
    "poster": {
      "alt": "An ivory binomial-theorem poster places the exact finite range sum above a three-factor combinatorial expansion: eight three-token choices are gathered into four bounded groups of sizes one, three, three, and one according to how many factors contribute x.",
      "byteSize": 3099524,
      "caption": "The n-fold product of x + y becomes a finite sum after choices are grouped by the number m of factors contributing x.",
      "description": "The poster foregrounds Mathlib's exact commutative-semiring identity. Its central representative n = 3 construction uses gold sun tokens for x and cobalt ring tokens for y, displays all eight three-position selections, and groups them with multiplicities 1, 3, 3, and 1. The surrounding copy keeps the general range (n + 1), the exponents m and n - m, the coefficient n.choose m, and the finite natural-power boundary explicit.",
      "derivatives": [
        {
          "byteSize": 145088,
          "height": 960,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/binomial-theorem/theorem-poster-v2-640.webp",
          "sha256": "sha256:8e8685e98dd15f57e9bc3d2b57616aa6fc0178594885ddcb740ab3e0089746b5",
          "width": 640
        },
        {
          "byteSize": 299176,
          "height": 1536,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/binomial-theorem/theorem-poster-v2-1024.webp",
          "sha256": "sha256:65a420e7c2f67facd9a52086d42cd63917ff77eb5c051d12b55dca7f637c16ce",
          "width": 1024
        }
      ],
      "generatedAt": "2026-07-27T22:36:55-04:00",
      "height": 1536,
      "mediaType": "image/png",
      "modelRequested": null,
      "publicPath": "/assets/library-theorems/binomial-theorem/theorem-poster-v2.png",
      "sha256": "sha256:52812a06007738badad107b1c03cecaeb006e83730e12b34ec02d9611e950701",
      "title": "The binomial theorem at a glance",
      "width": 1024,
      "kind": "theorem_poster",
      "transcript": "ALGEBRA · FINITE SUMS\nBINOMIAL THEOREM\nR a commutative semiring · x, y ∈ R · n ∈ ℕ\n(x + y)^n = ∑ m ∈ range (n + 1), x^m · y^(n − m) · n.choose m\nTHE n + 1 FINITE TERMS GROUP THE FULL EXPANSION\nHOW EACH TERM IS FORMED\n1 · Expand n factors of (x + y)\n2 · Choose m factors to contribute x\n3 · The remaining n − m factors contribute y\n4 · Count those choices with n.choose m\nEXACT SCOPE\nNatural powers in a commutative semiring. No infinite-series or convergence claim."
    },
    "visual": {
      "alt": "A dark engraved combinatorial landscape displays all eight choices from a representative product of three binomials, using gold sun tokens for x and cobalt ring tokens for y, grouped into four finite classes of sizes one, three, three, and one.",
      "byteSize": 3088127,
      "caption": "Grouping selections by the number m of x choices produces the coefficient n.choose m and the monomial x^m y^(n - m).",
      "description": "Three paired choice gates feed exactly eight three-token selection bands. From bottom to top, the bands are grouped as one all-y choice, three choices with one x, three choices with two x, and one all-x choice. Four bounded aggregation medallions compress those groups into the finite term classes; there is no unbounded continuation or Pascal-triangle-only substitute.",
      "derivatives": [
        {
          "byteSize": 55902,
          "height": 427,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/binomial-theorem/theorem-schematic-v1-640.webp",
          "sha256": "sha256:1153f6cae4254fc56c8cc8f5993d4e5d573451acf2412a1fab8d67350978dc97",
          "width": 640
        },
        {
          "byteSize": 167872,
          "height": 800,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/binomial-theorem/theorem-schematic-v1-1200.webp",
          "sha256": "sha256:9981f6988013fa6cb304b6001f3d479bb9913897eb35b2a9deb1215344c5a026",
          "width": 1200
        }
      ],
      "generatedAt": "2026-07-27T10:41:39-04:00",
      "height": 1024,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/binomial-theorem/theorem-schematic-v1.png",
      "sha256": "sha256:4426405dafae5642de76467c936dc6e5a2ac060a163821b460765cdfe0e68a4d",
      "title": "A finite expansion grouped by x-choices",
      "width": 1536
    },
    "walkthrough": null,
    "whyLandmark": "The binomial theorem is a foundational bridge between algebraic expansion and combinatorial counting. Mathlib's add_pow states it at the natural generality of a commutative semiring and makes the finite index range, complementary exponents, and binomial coefficient completely explicit."
  },
  "nonClaims": [
    "The selected declaration is a finite algebraic identity for natural powers; it does not state an infinite binomial series or a convergence theorem.",
    "The theorem assumes a commutative semiring. It does not claim the formula for arbitrary noncommuting x and y; the nearby Commute.add_pow declaration handles an explicitly commuting pair.",
    "The finite sum is indexed by m in range (n + 1), and its summand retains the exact exponents m and n - m together with n.choose m.",
    "The combinatorial visual explanation is not a replacement for the full finite-sum statement, and generated visuals are not proof evidence.",
    "ProofAtlas is indexing an existing upstream Mathlib theorem, not presenting new ProofAtlas mathematics."
  ],
  "publicExportEligible": true,
  "relationship": "upstream_direct",
  "schemaVersion": "library-theorem-entry-data.v1",
  "statementId": "statement.library.mathlib.binomial-theorem.v001",
  "statusAxes": {
    "acceptedAtlasResult": "Not recorded for the preferred artifact",
    "locallyReproduced": "Exact upstream declaration replayed",
    "reviewedPage": "Current public presentation reviewed",
    "upstreamIndexed": "Pinned source bytes verified locally"
  },
  "summary": "A natural power of a sum in a commutative semiring expands as an exact finite binomial-coefficient sum.",
  "targetId": "target.library.mathlib.binomial-theorem.v001",
  "title": "Binomial Theorem",
  "upstreamOrigin": {
    "declarationName": "add_pow",
    "immutableSourceUrl": "https://github.com/leanprover-community/mathlib4/blob/5e932f97dd25535344f80f9dd8da3aab83df0fe6/Mathlib/Data/Nat/Choose/Sum.lean#L76",
    "packageName": "mathlib",
    "repositoryUrl": "https://github.com/leanprover-community/mathlib4",
    "sourceArtifactHash": "sha256:24629e74afa48706f470fccab4c8bfadd229e42e07ce8ba2e192aee4af6d3fe3",
    "sourceByteLength": 12902,
    "sourceCommit": "5e932f97dd25535344f80f9dd8da3aab83df0fe6",
    "sourceFile": "Mathlib/Data/Nat/Choose/Sum.lean",
    "sourceLine": 76,
    "verificationKind": "git_worktree"
  },
  "publicPresentationReview": {
    "status": "reviewed"
  }
}
