See also Finset.prod_apply
, with the same conclusion but with the weaker hypothesis
f : α → β → γ
See also Finset.sum_apply
, with the same conclusion but with the weaker hypothesis
f : α → β → γ
The product of f
over insert a s
is the same as
the product over s
, as long as a
is in s
or f a = 1
.
The sum of f
over insert a s
is the same as
the sum over s
, as long as a
is in s
or f a = 0
.
The product of f
over insert a s
is the same as
the product over s
, as long as f a = 1
.
The sum of f
over insert a s
is the same as
the sum over s
, as long as f a = 0
.
Multiplying the products of a function over s
and over sᶜ
gives the whole product.
For a version expressed with subtypes, see Fintype.prod_subtype_mul_prod_subtype
.
Adding the sums of a function over s
and over sᶜ
gives the whole sum.
For a version expressed with subtypes, see Fintype.sum_subtype_add_sum_subtype
.
Alias of Finset.prod_sumElim
.
Alias of Finset.sum_sumElim
.
A product over s.subtype p
equals one over {x ∈ s | p x}
.
A sum over s.subtype p
equals one over {x ∈ s | p x}
.
If all elements of a Finset
satisfy the predicate p
, a product
over s.subtype p
equals that product over s
.
If all elements of a Finset
satisfy the predicate p
, a sum
over s.subtype p
equals that sum over s
.
A product of a function over a Finset
in a subtype equals a
product in the main type of a function that agrees with the first
function on that Finset
.
A sum of a function over a Finset
in a subtype equals a
sum in the main type of a function that agrees with the first
function on that Finset
.
The product of a function g
defined only on a set s
is equal to
the product of a function f
defined everywhere,
as long as f
and g
agree on s
, and f = 1
off s
.
The sum of a function g
defined only on a set s
is equal to
the sum of a function f
defined everywhere,
as long as f
and g
agree on s
, and f = 0
off s
.
A product taken over a conditional whose condition is an equality test on the index and whose
alternative is 1
has value either the term at that index or 1
.
The difference with Finset.prod_ite_eq
is that the arguments to Eq
are swapped.
A sum taken over a conditional whose condition is an equality
test on the index and whose alternative is 0
has value either the term at that index or 0
.
The difference with Finset.sum_ite_eq
is that the arguments to Eq
are swapped.
The difference with Finset.prod_ite_eq_of_mem
is that the arguments to Eq
are swapped.
Consider a product of g i (f i)
over a finset. Suppose g
is a function such as
n ↦ (· ^ n)
, which maps a second argument of 1
to 1
. Then if f
is replaced by the
corresponding multiplicative indicator function, the finset may be replaced by a possibly larger
finset without changing the value of the product.
Consider a sum of g i (f i)
over a finset. Suppose g
is a function such as
n ↦ (n • ·)
, which maps a second argument of 0
to 0
(or a weighted sum of f i * h i
or
f i • h i
, where f
gives the weights that are multiplied by some other function h
). Then if
f
is replaced by the corresponding indicator function, the finset may be replaced by a possibly
larger finset without changing the value of the sum.
Taking the product of an indicator function over a possibly larger finset is the same as taking the original function over the original finset.
Summing an indicator function over a possibly larger Finset
is the same as summing
the original function over the original finset.
For any product along {0, ..., n - 1}
of a commutative-monoid-valued function, we can verify
that it's equal to a different function just by checking ratios of adjacent terms.
This is a multiplicative discrete analogue of the fundamental theorem of calculus.
For any sum along {0, ..., n - 1}
of a commutative-monoid-valued function, we can
verify that it's equal to a different function just by checking differences of adjacent terms.
This is a discrete analogue of the fundamental theorem of calculus.
A telescoping sum along {0, ..., n-1}
of an ℕ
-valued function
reduces to the difference of the last and first terms
when the function we are summing is monotone.
The difference with Finset.prod_ninvolution
is that the involution is allowed to use
membership of the domain of the product, rather than being a non-dependent function.
The difference with Finset.sum_ninvolution
is that the involution is allowed to use
membership of the domain of the sum, rather than being a non-dependent function.
The difference with Finset.prod_involution
is that the involution is a non-dependent function,
rather than being allowed to use membership of the domain of the product.
The difference with Finset.sum_involution
is that the involution is a non-dependent
function, rather than being allowed to use membership of the domain of the sum.
The product of the composition of functions f
and g
, is the product over b ∈ s.image g
of
f b
to the power of the cardinality of the fibre of b
. See also Finset.prod_image
.
The sum of the composition of functions f
and g
, is the sum over b ∈ s.image g
of f b
times of the cardinality of the fibre of b
. See also Finset.sum_image
.
A product can be partitioned into a product of products, each equivalent under a setoid.
A sum can be partitioned into a sum of sums, each equivalent under a setoid.
If we can partition a product into subsets that cancel out, then the whole product cancels.
If we can partition a sum into subsets that cancel out, then the whole sum cancels.
Taking a product over s : Finset α
is the same as multiplying the value on a single element
f a
by the product of s.erase a
.
See Multiset.prod_map_erase
for the Multiset
version.
Taking a sum over s : Finset α
is the same as adding the value on a single element
f a
to the sum over s.erase a
.
See Multiset.sum_map_erase
for the Multiset
version.
A variant of Finset.mul_prod_erase
with the multiplication swapped.
A variant of Finset.add_sum_erase
with the addition swapped.
If a function applied at a point is 1, a product is unchanged by
removing that point, if present, from a Finset
.
If a function applied at a point is 0, a sum is unchanged by
removing that point, if present, from a Finset
.
If a product is 1 and the function is 1 except possibly at one
point, it is 1 everywhere on the Finset
.
If a sum is 0 and the function is 0 except possibly at one
point, it is 0 everywhere on the Finset
.
A version of Finset.prod_map
and Finset.prod_image
, but we do not assume that f
is
injective. Rather, we assume that the image of f
on I
only overlaps where g (f i) = 1
.
The conclusion is the same as in prod_image
.
A version of Finset.sum_map
and Finset.sum_image
, but we do not assume that f
is
injective. Rather, we assume that the image of f
on I
only overlaps where g (f i) = 0
.
The conclusion is the same as in sum_image
.
A version of Finset.prod_map
and Finset.prod_image
, but we do not assume that f
is
injective. Rather, we assume that the images of f
are disjoint on I
, and g ⊥ = 1
. The
conclusion is the same as in prod_image
.
A version of Finset.sum_map
and Finset.sum_image
, but we do not assume that f
is
injective. Rather, we assume that the images of f
are disjoint on I
, and g ⊥ = 0
. The
conclusion is the same as in sum_image
.
See also Finset.prod_dite_eq
.
See also Finset.sum_dite_eq
.
See also Finset.prod_dite_eq'
.
See also Finset.sum_dite_eq'
.
See also Finset.prod_ite_eq
.
See also Finset.sum_ite_eq
.
See also Finset.prod_ite_eq'
.
See also Finset.sum_ite_eq'
.
See also Finset.prod_pi_mulSingle
.
See also Finset.sum_pi_single
.
See also Finset.prod_pi_mulSingle'
.
See also Finset.sum_pi_single'
.