The areas / V03. Sets, finite structures and big operators
Mathlib.Algebra.BigOperators.Pi
44 declarations. Mathlib docs · Source
Big operators for Pi Types
This file contains theorems relevant to big operators in binary and arbitrary products of monoids and groups.
theorem Pi.list_sum_apply E0 #
∀ {α : Type u_7} {M : α → Type u_8} [inst : (a : α) → AddMonoid (M a)] (a : α) (l : List ((a : α) → M a)),
l.sum a = (List.map (fun f ↦ f a) l).sum
theorem Pi.list_prod_apply E0 #
∀ {α : Type u_7} {M : α → Type u_8} [inst : (a : α) → Monoid (M a)] (a : α) (l : List ((a : α) → M a)),
l.prod a = (List.map (fun f ↦ f a) l).prod
theorem Pi.multiset_prod_apply E0 #
∀ {α : Type u_7} {M : α → Type u_8} [inst : (a : α) → CommMonoid (M a)] (a : α) (s : Multiset ((a : α) → M a)),
s.prod a = (Multiset.map (fun f ↦ f a) s).prod
theorem Pi.multiset_sum_apply E0 #
∀ {α : Type u_7} {M : α → Type u_8} [inst : (a : α) → AddCommMonoid (M a)] (a : α) (s : Multiset ((a : α) → M a)),
s.sum a = (Multiset.map (fun f ↦ f a) s).sum
theorem Finset.prod_apply E0 #
∀ {ι : Type u_1} {α : Type u_7} {M : α → Type u_8} [inst : (a : α) → CommMonoid (M a)] (a : α) (s : Finset ι)
(g : ι → (a : α) → M a), (∏ c ∈ s, g c) a = ∏ c ∈ s, g c a
theorem Finset.sum_apply E0 #
∀ {ι : Type u_1} {α : Type u_7} {M : α → Type u_8} [inst : (a : α) → AddCommMonoid (M a)] (a : α) (s : Finset ι)
(g : ι → (a : α) → M a), (∑ c ∈ s, g c) a = ∑ c ∈ s, g c a
theorem Finset.prod_fn E1 #
∀ {α : Type u_7} {M : α → Type u_8} {ι : Type u_9} [inst : (a : α) → CommMonoid (M a)] (s : Finset ι)
(g : ι → (a : α) → M a), ∏ c ∈ s, g c = fun a ↦ ∏ c ∈ s, g c a
An 'unapplied' analogue of Finset.prod_apply.
theorem Finset.sum_fn E1 #
∀ {α : Type u_7} {M : α → Type u_8} {ι : Type u_9} [inst : (a : α) → AddCommMonoid (M a)] (s : Finset ι)
(g : ι → (a : α) → M a), ∑ c ∈ s, g c = fun a ↦ ∑ c ∈ s, g c a
An 'unapplied' analogue of Finset.sum_apply.
theorem Fintype.prod_apply E0 #
∀ {ι : Type u_1} {α : Type u_7} {M : α → Type u_8} [inst : Fintype ι] [inst_1 : (a : α) → CommMonoid (M a)] (a : α)
(g : ι → (a : α) → M a), (∏ c, g c) a = ∏ c, g c a
theorem Fintype.sum_apply E0 #
∀ {ι : Type u_1} {α : Type u_7} {M : α → Type u_8} [inst : Fintype ι] [inst_1 : (a : α) → AddCommMonoid (M a)] (a : α)
(g : ι → (a : α) → M a), (∑ c, g c) a = ∑ c, g c a
theorem prod_mk_sum E1 #
∀ {ι : Type u_1} {M : Type u_3} {N : Type u_4} [inst : AddCommMonoid M] [inst_1 : AddCommMonoid N] (s : Finset ι)
(f : ι → M) (g : ι → N), (∑ x ∈ s, f x, ∑ x ∈ s, g x) = ∑ x ∈ s, (f x, g x)
theorem prod_mk_prod E1 #
∀ {ι : Type u_1} {M : Type u_3} {N : Type u_4} [inst : CommMonoid M] [inst_1 : CommMonoid N] (s : Finset ι) (f : ι → M)
(g : ι → N), (∏ x ∈ s, f x, ∏ x ∈ s, g x) = ∏ x ∈ s, (f x, g x)
theorem pi_eq_sum_univ E1 #
∀ {ι : Type u_7} [inst : Fintype ι] [inst_1 : DecidableEq ι] {R : Type u_8} [inst_2 : NonAssocSemiring R] (x : ι → R),
x = ∑ i, x i • fun j ↦ if i = j then 1 else 0
decomposing x : ι → R as a sum along the canonical basis
theorem pi_eq_sum_univ' E1 #
∀ {ι : Type u_7} [inst : Fintype ι] [inst_1 : DecidableEq ι] {R : Type u_8} [inst_2 : NonAssocSemiring R] (x : ι → R),
x = ∑ i, x i • Pi.single i 1
Decomposing x : ι → R as a sum along the canonical basis Pi.single i 1 for i : ι.
theorem prod_indicator_apply E0 #
∀ {ι : Type u_1} {κ : Type u_2} {R : Type u_5} [inst : CommSemiring R] (s : Finset ι) (f : ι → Set κ) (g : ι → κ → R)
(j : κ), ∏ i ∈ s, (f i).indicator (g i) j = (⋂ x ∈ s, f x).indicator (∏ i ∈ s, g i) j
theorem prod_indicator E1 #
∀ {ι : Type u_1} {κ : Type u_2} {R : Type u_5} [inst : CommSemiring R] (s : Finset ι) (f : ι → Set κ) (g : ι → κ → R),
∏ i ∈ s, (f i).indicator (g i) = (⋂ x ∈ s, f x).indicator (∏ i ∈ s, g i)
theorem prod_indicator_const_apply E0 #
∀ {ι : Type u_1} {κ : Type u_2} {R : Type u_5} [inst : CommSemiring R] (s : Finset ι) (f : ι → Set κ) (g : κ → R)
(j : κ), ∏ i ∈ s, (f i).indicator g j = (⋂ x ∈ s, f x).indicator (g ^ s.card) j
theorem prod_indicator_const E1 #
∀ {ι : Type u_1} {κ : Type u_2} {R : Type u_5} [inst : CommSemiring R] (s : Finset ι) (f : ι → Set κ) (g : κ → R),
∏ i ∈ s, (f i).indicator g = (⋂ x ∈ s, f x).indicator (g ^ s.card)
theorem Finset.univ_prod_mulSingle E1 #
∀ {I : Type u_7} [inst : DecidableEq I] {M : I → Type u_8} [inst_1 : (i : I) → CommMonoid (M i)] [inst_2 : Fintype I]
(f : (i : I) → M i), ∏ i, Pi.mulSingle i (f i) = f
theorem Finset.univ_sum_single E1 #
∀ {I : Type u_7} [inst : DecidableEq I] {M : I → Type u_8} [inst_1 : (i : I) → AddCommMonoid (M i)] [inst_2 : Fintype I]
(f : (i : I) → M i), ∑ i, Pi.single i (f i) = f
theorem MonoidHom.functions_ext E1 #
∀ {I : Type u_7} [inst : DecidableEq I] {M : I → Type u_8} [inst_1 : (i : I) → CommMonoid (M i)] [Finite I]
(N : Type u_9) [inst_3 : CommMonoid N] (g h : ((i : I) → M i) →* N),
(∀ (i : I) (x : M i), g (Pi.mulSingle i x) = h (Pi.mulSingle i x)) → g = h
theorem AddMonoidHom.functions_ext E1 #
∀ {I : Type u_7} [inst : DecidableEq I] {M : I → Type u_8} [inst_1 : (i : I) → AddCommMonoid (M i)] [Finite I]
(N : Type u_9) [inst_3 : AddCommMonoid N] (g h : ((i : I) → M i) →+ N),
(∀ (i : I) (x : M i), g (Pi.single i x) = h (Pi.single i x)) → g = h
theorem MonoidHom.functions_ext' E1 #
∀ {I : Type u_7} [inst : DecidableEq I] {M : I → Type u_8} [inst_1 : (i : I) → CommMonoid (M i)] [Finite I]
(N : Type u_9) [inst_3 : CommMonoid N] (g h : ((i : I) → M i) →* N),
(∀ (i : I), g.comp (MonoidHom.mulSingle M i) = h.comp (MonoidHom.mulSingle M i)) → g = h
This is used as the ext lemma instead of MonoidHom.functions_ext for reasons explained in
note [partially-applied ext lemmas].
theorem MonoidHom.functions_ext'_iff E0 #
∀ {I : Type u_7} [inst : DecidableEq I] {M : I → Type u_8} [inst_1 : (i : I) → CommMonoid (M i)] [Finite I]
{N : Type u_9} [inst_3 : CommMonoid N] {g h : ((i : I) → M i) →* N},
g = h ↔ ∀ (i : I), g.comp (MonoidHom.mulSingle M i) = h.comp (MonoidHom.mulSingle M i)
theorem AddMonoidHom.functions_ext'_iff E0 #
∀ {I : Type u_7} [inst : DecidableEq I] {M : I → Type u_8} [inst_1 : (i : I) → AddCommMonoid (M i)] [Finite I]
{N : Type u_9} [inst_3 : AddCommMonoid N] {g h : ((i : I) → M i) →+ N},
g = h ↔ ∀ (i : I), g.comp (AddMonoidHom.single M i) = h.comp (AddMonoidHom.single M i)
theorem AddMonoidHom.functions_ext' E1 #
∀ {I : Type u_7} [inst : DecidableEq I] {M : I → Type u_8} [inst_1 : (i : I) → AddCommMonoid (M i)] [Finite I]
(N : Type u_9) [inst_3 : AddCommMonoid N] (g h : ((i : I) → M i) →+ N),
(∀ (i : I), g.comp (AddMonoidHom.single M i) = h.comp (AddMonoidHom.single M i)) → g = h
This is used as the ext lemma instead of AddMonoidHom.functions_ext for reasons
explained in note [partially-applied ext lemmas].
theorem RingHom.functions_ext E1 #
∀ {I : Type u_7} [inst : DecidableEq I] {R : I → Type u_8} [inst_1 : (i : I) → NonAssocSemiring (R i)] [Finite I]
(S : Type u_9) [inst_3 : NonAssocSemiring S] (g h : ((i : I) → R i) →+* S),
(∀ (i : I) (x : R i), g (Pi.single i x) = h (Pi.single i x)) → g = h
theorem RingHom.functions_ext_iff E0 #
∀ {I : Type u_7} [inst : DecidableEq I] {R : I → Type u_8} [inst_1 : (i : I) → NonAssocSemiring (R i)] [Finite I]
{S : Type u_9} [inst_3 : NonAssocSemiring S] {g h : ((i : I) → R i) →+* S},
g = h ↔ ∀ (i : I) (x : R i), g (Pi.single i x) = h (Pi.single i x)
theorem Prod.fst_prod E1 #
∀ {ι : Type u_1} {M : Type u_3} {N : Type u_4} [inst : CommMonoid M] [inst_1 : CommMonoid N] {s : Finset ι}
{f : ι → M × N}, (∏ c ∈ s, f c).1 = ∏ c ∈ s, (f c).1
theorem Prod.fst_sum E1 #
∀ {ι : Type u_1} {M : Type u_3} {N : Type u_4} [inst : AddCommMonoid M] [inst_1 : AddCommMonoid N] {s : Finset ι}
{f : ι → M × N}, (∑ c ∈ s, f c).1 = ∑ c ∈ s, (f c).1
theorem Prod.snd_sum E1 #
∀ {ι : Type u_1} {M : Type u_3} {N : Type u_4} [inst : AddCommMonoid M] [inst_1 : AddCommMonoid N] {s : Finset ι}
{f : ι → M × N}, (∑ c ∈ s, f c).2 = ∑ c ∈ s, (f c).2
theorem Prod.snd_prod E1 #
∀ {ι : Type u_1} {M : Type u_3} {N : Type u_4} [inst : CommMonoid M] [inst_1 : CommMonoid N] {s : Finset ι}
{f : ι → M × N}, (∏ c ∈ s, f c).2 = ∏ c ∈ s, (f c).2
def Pi.monoidHomMulEquiv E1 #
{ι : Type u_7} →
[Fintype ι] →
[DecidableEq ι] →
(M : ι → Type u_8) →
[inst : (i : ι) → CommMonoid (M i)] →
(M' : Type u_9) → [inst_1 : CommMonoid M'] → (((i : ι) → M i) →* M') ≃* ((i : ι) → M i →* M')
The canonical isomorphism between the monoid of homomorphisms from a finite product of commutative monoids to another commutative monoid and the product of the homomorphism monoids.
def Pi.addMonoidHomAddEquiv E1 #
{ι : Type u_7} →
[Fintype ι] →
[DecidableEq ι] →
(M : ι → Type u_8) →
[inst : (i : ι) → AddCommMonoid (M i)] →
(M' : Type u_9) → [inst_1 : AddCommMonoid M'] → (((i : ι) → M i) →+ M') ≃+ ((i : ι) → M i →+ M')
The canonical isomorphism between the additive monoid of homomorphisms from a finite product of additive commutative monoids to another additive commutative monoid and the product of the homomorphism monoids.
theorem Pi.single_induction E1 #
∀ {ι : Type u_1} [Finite ι] [inst : DecidableEq ι] {M : ι → Type u_7} [inst_1 : (i : ι) → AddCommMonoid (M i)]
(p : ((i : ι) → M i) → Prop) (f : (i : ι) → M i),
p 0 → (∀ (f g : (i : ι) → M i), p f → p g → p (f + g)) → (∀ (i : ι) (m : M i), p (Pi.single i m)) → p f
theorem Pi.mulSingle_induction E1 #
∀ {ι : Type u_1} [Finite ι] [inst : DecidableEq ι] {M : ι → Type u_7} [inst_1 : (i : ι) → CommMonoid (M i)]
(p : ((i : ι) → M i) → Prop) (f : (i : ι) → M i),
p 1 → (∀ (f g : (i : ι) → M i), p f → p g → p (f * g)) → (∀ (i : ι) (m : M i), p (Pi.mulSingle i m)) → p f
theorem eqOn_finsetProd E1 #
∀ {ι : Type u_8} {α : Type u_9} {β : Type u_10} [inst : CommMonoid α] {s : Set β} {f f' : ι → β → α},
(∀ (i : ι), Set.EqOn (f i) (f' i) s) → ∀ (v : Finset ι), Set.EqOn (∏ i ∈ v, f i) (∏ i ∈ v, f' i) s
theorem eqOn_finsetSum E1 #
∀ {ι : Type u_8} {α : Type u_9} {β : Type u_10} [inst : AddCommMonoid α] {s : Set β} {f f' : ι → β → α},
(∀ (i : ι), Set.EqOn (f i) (f' i) s) → ∀ (v : Finset ι), Set.EqOn (∑ i ∈ v, f i) (∑ i ∈ v, f' i) s
theorem eqOn_fun_finsetProd E1 #
∀ {ι : Type u_8} {α : Type u_9} {β : Type u_10} [inst : CommMonoid α] {s : Set β} {f f' : ι → β → α},
(∀ (i : ι), Set.EqOn (f i) (f' i) s) → ∀ (v : Finset ι), Set.EqOn (fun b ↦ ∏ i ∈ v, f i b) (fun b ↦ ∏ i ∈ v, f' i b) s
theorem eqOn_fun_finsetSum E1 #
∀ {ι : Type u_8} {α : Type u_9} {β : Type u_10} [inst : AddCommMonoid α] {s : Set β} {f f' : ι → β → α},
(∀ (i : ι), Set.EqOn (f i) (f' i) s) → ∀ (v : Finset ι), Set.EqOn (fun b ↦ ∑ i ∈ v, f i b) (fun b ↦ ∑ i ∈ v, f' i b) s
theorem prod_apply E0 #
∀ {F : Type u_8} {α : Type u_9} {β : Type u_10} {ι : Type u_11} [inst : FunLike F α β] [inst_1 : CommMonoid β]
[inst_2 : CommMonoid F] [IsOneApply F] [IsMulApply F] (s : Finset ι) (f : ι → F) (x : α),
(∏ i ∈ s, f i) x = ∏ i ∈ s, (f i) x
theorem sum_apply E0 #
∀ {F : Type u_8} {α : Type u_9} {β : Type u_10} {ι : Type u_11} [inst : FunLike F α β] [inst_1 : AddCommMonoid β]
[inst_2 : AddCommMonoid F] [IsZeroApply F] [IsAddApply F] (s : Finset ι) (f : ι → F) (x : α),
(∑ i ∈ s, f i) x = ∑ i ∈ s, (f i) x
theorem FunLike.coe_prod E0 #
∀ {F : Type u_8} {α : Type u_9} {β : Type u_10} {ι : Type u_11} [inst : FunLike F α β] [inst_1 : CommMonoid β]
[inst_2 : CommMonoid F] [IsOneApply F] [IsMulApply F] (s : Finset ι) (f : ι → F), ⇑(∏ i ∈ s, f i) = ∏ i ∈ s, ⇑(f i)
theorem FunLike.coe_sum E0 #
∀ {F : Type u_8} {α : Type u_9} {β : Type u_10} {ι : Type u_11} [inst : FunLike F α β] [inst_1 : AddCommMonoid β]
[inst_2 : AddCommMonoid F] [IsZeroApply F] [IsAddApply F] (s : Finset ι) (f : ι → F),
⇑(∑ i ∈ s, f i) = ∑ i ∈ s, ⇑(f i)