Documentation

Mathlib.Algebra.BigOperators.ModEq

Congruence modulo natural and integer numbers for big operators #

In this file we prove various versions of the following theorem: if f i ≡ g i [MOD n] for all i ∈ s, then ∏ i ∈ s, f i ≡ ∏ i ∈ s, g i [MOD n], and similarly for sums.

We prove it for lists, multisets, and finsets, as well as for natural and integer numbers.

theorem Nat.ModEq.listProd_map {α : Type u_1} {n : } {l : List α} {f g : α} (h : xl, f x g x [MOD n]) :
theorem Nat.ModEq.listProd_map_one {α : Type u_1} {n : } {l : List α} {f : α} (h : xl, f x 1 [MOD n]) :
theorem Nat.ModEq.listProd_one {n : } {l : List } (h : xl, x 1 [MOD n]) :
l.prod 1 [MOD n]
theorem Nat.ModEq.listSum_map {α : Type u_1} {n : } {l : List α} {f g : α} (h : xl, f x g x [MOD n]) :
theorem Nat.ModEq.listSum_map_zero {α : Type u_1} {n : } {l : List α} {f : α} (h : xl, f x 0 [MOD n]) :
(List.map f l).sum 0 [MOD n]
theorem Nat.ModEq.listSum_zero {n : } {l : List } (h : xl, x 0 [MOD n]) :
l.sum 0 [MOD n]
theorem Nat.ModEq.multisetProd_map {α : Type u_1} {n : } {f g : α} {s : Multiset α} (h : xs, f x g x [MOD n]) :
theorem Nat.ModEq.multisetProd_map_one {α : Type u_1} {n : } {f : α} {s : Multiset α} (h : xs, f x 1 [MOD n]) :
theorem Nat.ModEq.multisetProd_one {n : } {s : Multiset } (h : xs, x 1 [MOD n]) :
s.prod 1 [MOD n]
theorem Nat.ModEq.multisetSum_map {α : Type u_1} {n : } {f g : α} {s : Multiset α} (h : xs, f x g x [MOD n]) :
theorem Nat.ModEq.multisetSum_map_zero {α : Type u_1} {n : } {f : α} {s : Multiset α} (h : xs, f x 0 [MOD n]) :
theorem Nat.ModEq.multisetSum_zero {n : } {s : Multiset } (h : xs, x 0 [MOD n]) :
s.sum 0 [MOD n]
theorem Nat.ModEq.prod {α : Type u_1} {n : } {f g : α} {s : Finset α} (h : xs, f x g x [MOD n]) :
xs, f x xs, g x [MOD n]
theorem Nat.ModEq.prod_one {α : Type u_1} {n : } {f : α} {s : Finset α} (h : xs, f x 1 [MOD n]) :
xs, f x 1 [MOD n]
theorem Nat.ModEq.sum {α : Type u_1} {n : } {f g : α} {s : Finset α} (h : xs, f x g x [MOD n]) :
xs, f x xs, g x [MOD n]
theorem Nat.ModEq.sum_zero {α : Type u_1} {n : } {f : α} {s : Finset α} (h : xs, f x 0 [MOD n]) :
xs, f x 0 [MOD n]
theorem Nat.prod_modEq_ite {α : Type u_1} {n : } {f : α} [DecidableEq α] {s : Finset α} {a : α} (hf : xs, x af x 1 [MOD n]) :
xs, f x if a s then f a else 1 [MOD n]
theorem Nat.prod_modEq_single {α : Type u_1} {n : } {f : α} {s : Finset α} {a : α} (ha : asf a 1 [MOD n]) (hf : xs, x af x 1 [MOD n]) :
xs, f x f a [MOD n]
theorem Nat.sum_modEq_ite {α : Type u_1} {n : } {f : α} [DecidableEq α] {s : Finset α} {a : α} (hf : xs, x af x 0 [MOD n]) :
xs, f x if a s then f a else 0 [MOD n]
theorem Nat.sum_modEq_single {α : Type u_1} {n : } {f : α} {s : Finset α} {a : α} (ha : asf a 0 [MOD n]) (hf : xs, x af x 0 [MOD n]) :
xs, f x f a [MOD n]
theorem Int.ModEq.listProd_map {α : Type u_1} {n : } {l : List α} {f g : α} (h : xl, f x g x [ZMOD n]) :
theorem Int.ModEq.listProd_map_one {α : Type u_1} {n : } {l : List α} {f : α} (h : xl, f x 1 [ZMOD n]) :
theorem Int.ModEq.listProd_one {n : } {l : List } (h : xl, x 1 [ZMOD n]) :
theorem Int.ModEq.listSum_map {α : Type u_1} {n : } {l : List α} {f g : α} (h : xl, f x g x [ZMOD n]) :
theorem Int.ModEq.listSum_map_zero {α : Type u_1} {n : } {l : List α} {f : α} (h : xl, f x 0 [ZMOD n]) :
theorem Int.ModEq.listSum_zero {n : } {l : List } (h : xl, x 0 [ZMOD n]) :
l.sum 0 [ZMOD n]
theorem Int.ModEq.multisetProd_map {α : Type u_1} {n : } {f g : α} {s : Multiset α} (h : xs, f x g x [ZMOD n]) :
theorem Int.ModEq.multisetProd_map_one {α : Type u_1} {n : } {f : α} {s : Multiset α} (h : xs, f x 1 [ZMOD n]) :
theorem Int.ModEq.multisetProd_one {n : } {s : Multiset } (h : xs, x 1 [ZMOD n]) :
theorem Int.ModEq.multisetSum_map {α : Type u_1} {n : } {f g : α} {s : Multiset α} (h : xs, f x g x [ZMOD n]) :
theorem Int.ModEq.multisetSum_map_zero {α : Type u_1} {n : } {f : α} {s : Multiset α} (h : xs, f x 0 [ZMOD n]) :
theorem Int.ModEq.multisetSum_zero {n : } {s : Multiset } (h : xs, x 0 [ZMOD n]) :
s.sum 0 [ZMOD n]
theorem Int.ModEq.prod {α : Type u_1} {n : } {f g : α} {s : Finset α} (h : xs, f x g x [ZMOD n]) :
xs, f x xs, g x [ZMOD n]
theorem Int.ModEq.prod_one {α : Type u_1} {n : } {f : α} {s : Finset α} (h : xs, f x 1 [ZMOD n]) :
xs, f x 1 [ZMOD n]
theorem Int.ModEq.sum {α : Type u_1} {n : } {f g : α} {s : Finset α} (h : xs, f x g x [ZMOD n]) :
xs, f x xs, g x [ZMOD n]
theorem Int.ModEq.sum_zero {α : Type u_1} {n : } {f : α} {s : Finset α} (h : xs, f x 0 [ZMOD n]) :
xs, f x 0 [ZMOD n]
theorem Int.prod_modEq_ite {α : Type u_1} {n : } {f : α} [DecidableEq α] {s : Finset α} {a : α} (hf : xs, x af x 1 [ZMOD n]) :
xs, f x if a s then f a else 1 [ZMOD n]
theorem Int.prod_modEq_single {α : Type u_1} {n : } {f : α} {s : Finset α} {a : α} (ha : asf a 1 [ZMOD n]) (hf : xs, x af x 1 [ZMOD n]) :
xs, f x f a [ZMOD n]
theorem Int.sum_modEq_ite {α : Type u_1} {n : } {f : α} [DecidableEq α] {s : Finset α} {a : α} (hf : xs, x af x 0 [ZMOD n]) :
xs, f x if a s then f a else 0 [ZMOD n]
theorem Int.sum_modEq_single {α : Type u_1} {n : } {f : α} {s : Finset α} {a : α} (ha : asf a 0 [ZMOD n]) (hf : xs, x af x 0 [ZMOD n]) :
xs, f x f a [ZMOD n]