Product
The product of all elements in the collection.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wikipedia
Product (mathematics)MathWorldProductWikidataQ901718Britannicatopic/product-mathematicsFungrimProduct✓Fungrim entry33f13a✓Wolfram LanguageProduct!Product(collection)the product of all elements in the collection.Product(body, Tuple(index, lo, hi))a symbolic product over a range, closed-form whenever body is a power of the index (a factorial power) or a power WITH the index in the exponent (folds to a single power via a closed-form sum of the exponent); nested Tuple clauses reduce inner-first, so an inner limit depending on the outer index still closes. With hi = PositiveInfinity and body a ratio of polynomials in the index of equal degree and leading coefficient, closes via a Gamma-function product over the roots whenever those roots are exact (rational, Gaussian, or a quadratic surd) and the series converges; declines otherwise.Product(body, Tuple(index))an index with neither bound stays unevaluated (an indefinite product is defined only up to a constant), where compute-engine read it as a degenerate range.Typed signatures
| Type | Package | Applies |
|---|---|---|
(any, tuple*) -> number | analyticreplaces compute-engine | always |
(any, tuple*) -> number | combinatoricsreplaces evaluation | always |
(any, tuple*) -> number | compute-engine | always |
(any, tuple*) -> number | evaluationreplaces compute-engine | always |
Details
- The empty product is 1 by convention, matching . See Factorial.
- The product of through is : .
- Applies across the list's elements (the product of a list).
- Forces evaluation of a lazy collection like Range, which otherwise stays unevaluated on its own.
- A symbolic bound closes in two general shapes: for free of the index (a factorial power), and for free of the index, the sum found by Faulhaber's formula for any polynomial . A product with more than one
Tupleclause reduces inner-first, so a triangular product (an inner limit depending on the outer index) closes too, once the inner reduction leaves a shape the outer sum recognises. - An infinite product , for and polynomials of equal degree and equal leading coefficient, factors both over and rewrites the ratio as a Gamma-function product via the Pochhammer identity ; the series converges exactly when the roots' sums agree, which cancels the tail. Each factor then closes either straight to a factorial (a real integer root) or, paired with its negation, via Gamma recursion and the reflection formula . Roots come from
Factor's own linear and irreducible-quadratic pieces (rational, Gaussian, or quadratic-surd only); anything past that -- an unresolved root, a pole, or an unpaired leftover -- leaves the product unevaluated rather than guess.
Examples
Scope #
A quartic infinite product, via a Gamma product over a conjugate pair of Gaussian-integer roots alongside the real roots :
live ↗InOut
live ↗
InOut
live ↗
InOut
live ↗
InOut
live ↗
InOut
Neat examples #
About
| Examples | 33 |
|---|---|
| Checked against | Wolfram Language 28 agree4 differSymPy 15 agreemathlib4 2 agreeSageMath 5 agree1 differ2 unevaluated4 error |
| Crosswalk | WikipediaMathWorldWikidataBritannicaFungrimFungrim entryWolfram LanguageSageMathSymPy |
Implementation
mapped
sagepackages/oracle/src/mappings.tsmapped
sympypackages/oracle/src/mappings.tsmapped
mathlib4packages/oracle/src/mappings.tsAs Sum; an empty range is 1, as ours.
See also: Length