File: Mathlib/Algebra/BigOperators/Fin.lean

full_name: Finset.prod_range
code: @[to_additive]
theorem prod_range [CommMonoid β] {n : ℕ} (f : ℕ → β) :
    ∏ i ∈ Finset.range n, f i = ∏ i : Fin n, f i 
goal: ∏ i ∈ Finset.range n, f i = ∏ i : Fin n, f ↑i

full_name: Finset.sum_range
code: @[to_additive]
theorem prod_range [CommMonoid β] {n : ℕ} (f : ℕ → β) :
    ∏ i ∈ Finset.range n, f i = ∏ i : Fin n, f i 
goal: ∑ i ∈ Finset.range n, f i = ∑ i : Fin n, f ↑i

full_name: Fin.prod_ofFn
code: @[to_additive]
theorem prod_ofFn [CommMonoid β] {n : ℕ} (f : Fin n → β) : (List.ofFn f).prod = ∏ i, f i 
goal: (List.ofFn f).prod = ∏ i : Fin n, f i

full_name: Fin.sum_ofFn
code: @[to_additive]
theorem prod_ofFn [CommMonoid β] {n : ℕ} (f : Fin n → β) : (List.ofFn f).prod = ∏ i, f i 
goal: (List.ofFn f).sum = ∑ i : Fin n, f i

full_name: Fin.sum_univ_def
code: @[to_additive]
theorem prod_univ_def [CommMonoid β] {n : ℕ} (f : Fin n → β) :
    ∏ i, f i = ((List.finRange n).map f).prod 
goal: ∑ i : Fin n, f i = (List.map f (List.finRange n)).sum

full_name: Fin.prod_univ_def
code: @[to_additive]
theorem prod_univ_def [CommMonoid β] {n : ℕ} (f : Fin n → β) :
    ∏ i, f i = ((List.finRange n).map f).prod 
goal: ∏ i : Fin n, f i = (List.map f (List.finRange n)).prod

full_name: Fin.prod_univ_zero
code: /-- A product of a function `f : Fin 0 → β` is `1` because `Fin 0` is empty -/
@[to_additive "A sum of a function `f : Fin 0 → β` is `0` because `Fin 0` is empty"]
theorem prod_univ_zero [CommMonoid β] (f : Fin 0 → β) : ∏ i, f i = 1 
goal: ∏ i : Fin 0, f i = 1

full_name: Fin.sum_univ_zero
code: /-- A product of a function `f : Fin 0 → β` is `1` because `Fin 0` is empty -/
@[to_additive "A sum of a function `f : Fin 0 → β` is `0` because `Fin 0` is empty"]
theorem prod_univ_zero [CommMonoid β] (f : Fin 0 → β) : ∏ i, f i = 1 
goal: ∑ i : Fin 0, f i = 0

full_name: Fin.prod_univ_succAbove
code: /-- A product of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)`
is the product of `f x`, for some `x : Fin (n + 1)` times the remaining product -/
@[to_additive "A sum of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)` is the sum of
`f x`, for some `x : Fin (n + 1)` plus the remaining product"]
theorem prod_univ_succAbove [CommMonoid β] {n : ℕ} (f : Fin (n + 1) → β) (x : Fin (n + 1)) :
    ∏ i, f i = f x * ∏ i : Fin n, f (x.succAbove i) 
goal: ∏ i : Fin (n + 1), f i = f x * ∏ i : Fin n, f (x.succAbove i)

full_name: Fin.sum_univ_succAbove
code: /-- A product of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)`
is the product of `f x`, for some `x : Fin (n + 1)` times the remaining product -/
@[to_additive "A sum of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)` is the sum of
`f x`, for some `x : Fin (n + 1)` plus the remaining product"]
theorem prod_univ_succAbove [CommMonoid β] {n : ℕ} (f : Fin (n + 1) → β) (x : Fin (n + 1)) :
    ∏ i, f i = f x * ∏ i : Fin n, f (x.succAbove i) 
goal: ∑ i : Fin (n + 1), f i = f x + ∑ i : Fin n, f (x.succAbove i)

full_name: Fin.prod_univ_succ
code: /-- A product of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)`
is the product of `f 0` plus the remaining product -/
@[to_additive "A sum of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)` is the sum of
`f 0` plus the remaining product"]
theorem prod_univ_succ [CommMonoid β] {n : ℕ} (f : Fin (n + 1) → β) :
    ∏ i, f i = f 0 * ∏ i : Fin n, f i.succ 
goal: ∏ i : Fin (n + 1), f i = f 0 * ∏ i : Fin n, f i.succ

full_name: Fin.sum_univ_succ
code: /-- A product of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)`
is the product of `f 0` plus the remaining product -/
@[to_additive "A sum of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)` is the sum of
`f 0` plus the remaining product"]
theorem prod_univ_succ [CommMonoid β] {n : ℕ} (f : Fin (n + 1) → β) :
    ∏ i, f i = f 0 * ∏ i : Fin n, f i.succ 
goal: ∑ i : Fin (n + 1), f i = f 0 + ∑ i : Fin n, f i.succ

full_name: Fin.prod_univ_castSucc
code: /-- A product of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)`
is the product of `f (Fin.last n)` plus the remaining product -/
@[to_additive "A sum of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)` is the sum of
`f (Fin.last n)` plus the remaining sum"]
theorem prod_univ_castSucc [CommMonoid β] {n : ℕ} (f : Fin (n + 1) → β) :
    ∏ i, f i = (∏ i : Fin n, f (Fin.castSucc i)) * f (last n) 
goal: ∏ i : Fin (n + 1), f i = (∏ i : Fin n, f i.castSucc) * f (Fin.last n)

full_name: Fin.sum_univ_castSucc
code: /-- A product of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)`
is the product of `f (Fin.last n)` plus the remaining product -/
@[to_additive "A sum of a function `f : Fin (n + 1) → β` over all `Fin (n + 1)` is the sum of
`f (Fin.last n)` plus the remaining sum"]
theorem prod_univ_castSucc [CommMonoid β] {n : ℕ} (f : Fin (n + 1) → β) :
    ∏ i, f i = (∏ i : Fin n, f (Fin.castSucc i)) * f (last n) 
goal: ∑ i : Fin (n + 1), f i = ∑ i : Fin n, f i.castSucc + f (Fin.last n)

full_name: Fin.sum_univ_get
code: @[to_additive (attr := simp)]
theorem prod_univ_get [CommMonoid α] (l : List α) : ∏ i : Fin l.length, l[i.1] = l.prod 
goal: ∑ i : Fin l.length, l[↑i] = l.sum

full_name: Fin.prod_univ_get
code: @[to_additive (attr := simp)]
theorem prod_univ_get [CommMonoid α] (l : List α) : ∏ i : Fin l.length, l[i.1] = l.prod 
goal: ∏ i : Fin l.length, l[↑i] = l.prod

full_name: Fin.prod_univ_get'
code: @[to_additive (attr := simp)]
theorem prod_univ_get' [CommMonoid β] (l : List α) (f : α → β) :
    ∏ i : Fin l.length, f l[i.1] = (l.map f).prod 
goal: ∏ i : Fin l.length, f l[↑i] = (List.map f l).prod

full_name: Fin.sum_univ_get'
code: @[to_additive (attr := simp)]
theorem prod_univ_get' [CommMonoid β] (l : List α) (f : α → β) :
    ∏ i : Fin l.length, f l[i.1] = (l.map f).prod 
goal: ∑ i : Fin l.length, f l[↑i] = (List.map f l).sum

full_name: Fin.prod_cons
code: @[to_additive]
theorem prod_cons [CommMonoid β] {n : ℕ} (x : β) (f : Fin n → β) :
    (∏ i : Fin n.succ, (cons x f : Fin n.succ → β) i) = x * ∏ i : Fin n, f i 
goal: ∏ i : Fin n.succ, Fin.cons x f i = x * ∏ i : Fin n, f i

full_name: Fin.sum_cons
code: @[to_additive]
theorem prod_cons [CommMonoid β] {n : ℕ} (x : β) (f : Fin n → β) :
    (∏ i : Fin n.succ, (cons x f : Fin n.succ → β) i) = x * ∏ i : Fin n, f i 
goal: ∑ i : Fin n.succ, Fin.cons x f i = x + ∑ i : Fin n, f i

full_name: Fin.sum_univ_one
code: @[to_additive sum_univ_one]
theorem prod_univ_one [CommMonoid β] (f : Fin 1 → β) : ∏ i, f i = f 0 
goal: ∑ i : Fin 1, f i = f 0

full_name: Fin.prod_univ_one
code: @[to_additive sum_univ_one]
theorem prod_univ_one [CommMonoid β] (f : Fin 1 → β) : ∏ i, f i = f 0 
goal: ∏ i : Fin 1, f i = f 0

full_name: Fin.prod_univ_two
code: @[to_additive (attr := simp)]
theorem prod_univ_two [CommMonoid β] (f : Fin 2 → β) : ∏ i, f i = f 0 * f 1 
goal: ∏ i : Fin 2, f i = f 0 * f 1

full_name: Fin.sum_univ_two
code: @[to_additive (attr := simp)]
theorem prod_univ_two [CommMonoid β] (f : Fin 2 → β) : ∏ i, f i = f 0 * f 1 
goal: ∑ i : Fin 2, f i = f 0 + f 1

full_name: Fin.prod_univ_two'
code: @[to_additive]
theorem prod_univ_two' [CommMonoid β] (f : α → β) (a b : α) :
    ∏ i, f (![a, b] i) = f a * f b 
goal: ∏ i : Fin (Nat.succ 0).succ, f (![a, b] i) = f a * f b

full_name: Fin.sum_univ_two'
code: @[to_additive]
theorem prod_univ_two' [CommMonoid β] (f : α → β) (a b : α) :
    ∏ i, f (![a, b] i) = f a * f b 
goal: ∑ i : Fin (Nat.succ 0).succ, f (![a, b] i) = f a + f b

full_name: Fin.prod_univ_three
code: @[to_additive]
theorem prod_univ_three [CommMonoid β] (f : Fin 3 → β) : ∏ i, f i = f 0 * f 1 * f 2 
goal: ∏ i : Fin 3, f i = f 0 * f 1 * f 2

full_name: Fin.sum_univ_three
code: @[to_additive]
theorem prod_univ_three [CommMonoid β] (f : Fin 3 → β) : ∏ i, f i = f 0 * f 1 * f 2 
goal: ∑ i : Fin 3, f i = f 0 + f 1 + f 2

full_name: Fin.sum_univ_four
code: @[to_additive]
theorem prod_univ_four [CommMonoid β] (f : Fin 4 → β) : ∏ i, f i = f 0 * f 1 * f 2 * f 3 
goal: ∑ i : Fin 4, f i = f 0 + f 1 + f 2 + f 3

full_name: Fin.prod_univ_four
code: @[to_additive]
theorem prod_univ_four [CommMonoid β] (f : Fin 4 → β) : ∏ i, f i = f 0 * f 1 * f 2 * f 3 
goal: ∏ i : Fin 4, f i = f 0 * f 1 * f 2 * f 3

full_name: Fin.prod_univ_five
code: @[to_additive]
theorem prod_univ_five [CommMonoid β] (f : Fin 5 → β) :
    ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 
goal: ∏ i : Fin 5, f i = f 0 * f 1 * f 2 * f 3 * f 4

full_name: Fin.sum_univ_five
code: @[to_additive]
theorem prod_univ_five [CommMonoid β] (f : Fin 5 → β) :
    ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 
goal: ∑ i : Fin 5, f i = f 0 + f 1 + f 2 + f 3 + f 4

full_name: Fin.prod_univ_six
code: @[to_additive]
theorem prod_univ_six [CommMonoid β] (f : Fin 6 → β) :
    ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 
goal: ∏ i : Fin 6, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5

full_name: Fin.sum_univ_six
code: @[to_additive]
theorem prod_univ_six [CommMonoid β] (f : Fin 6 → β) :
    ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 
goal: ∑ i : Fin 6, f i = f 0 + f 1 + f 2 + f 3 + f 4 + f 5

full_name: Fin.prod_univ_seven
code: @[to_additive]
theorem prod_univ_seven [CommMonoid β] (f : Fin 7 → β) :
    ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6 
goal: ∏ i : Fin 7, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6

full_name: Fin.sum_univ_seven
code: @[to_additive]
theorem prod_univ_seven [CommMonoid β] (f : Fin 7 → β) :
    ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6 
goal: ∑ i : Fin 7, f i = f 0 + f 1 + f 2 + f 3 + f 4 + f 5 + f 6

full_name: Fin.sum_univ_eight
code: @[to_additive]
theorem prod_univ_eight [CommMonoid β] (f : Fin 8 → β) :
    ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6 * f 7 
goal: ∑ i : Fin 8, f i = f 0 + f 1 + f 2 + f 3 + f 4 + f 5 + f 6 + f 7

full_name: Fin.prod_univ_eight
code: @[to_additive]
theorem prod_univ_eight [CommMonoid β] (f : Fin 8 → β) :
    ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6 * f 7 
goal: ∏ i : Fin 8, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6 * f 7

full_name: Fin.sum_pow_mul_eq_add_pow
code: theorem sum_pow_mul_eq_add_pow {n : ℕ} {R : Type*} [CommSemiring R] (a b : R) :
    (∑ s : Finset (Fin n), a ^ s.card * b ^ (n - s.card)) = (a + b) ^ n 
goal: ∑ s : Finset (Fin n), a ^ s.card * b ^ (n - s.card) = (a + b) ^ n

full_name: Fin.prod_const
code: theorem prod_const [CommMonoid α] (n : ℕ) (x : α) : ∏ _i : Fin n, x = x ^ n 
goal: ∏ _i : Fin n, x = x ^ n

full_name: Fin.sum_const
code: theorem sum_const [AddCommMonoid α] (n : ℕ) (x : α) : ∑ _i : Fin n, x = n • x 
goal: ∑ _i : Fin n, x = n • x

full_name: Fin.prod_Ioi_zero
code: @[to_additive]
theorem prod_Ioi_zero {M : Type*} [CommMonoid M] {n : ℕ} {v : Fin n.succ → M} :
    ∏ i ∈ Ioi 0, v i = ∏ j : Fin n, v j.succ 
goal: ∏ i ∈ Finset.Ioi 0, v i = ∏ j : Fin n, v j.succ

full_name: Fin.sum_Ioi_zero
code: @[to_additive]
theorem prod_Ioi_zero {M : Type*} [CommMonoid M] {n : ℕ} {v : Fin n.succ → M} :
    ∏ i ∈ Ioi 0, v i = ∏ j : Fin n, v j.succ 
goal: ∑ i ∈ Finset.Ioi 0, v i = ∑ j : Fin n, v j.succ

full_name: Fin.prod_Ioi_succ
code: @[to_additive]
theorem prod_Ioi_succ {M : Type*} [CommMonoid M] {n : ℕ} (i : Fin n) (v : Fin n.succ → M) :
    ∏ j ∈ Ioi i.succ, v j = ∏ j ∈ Ioi i, v j.succ 
goal: ∏ j ∈ Finset.Ioi i.succ, v j = ∏ j ∈ Finset.Ioi i, v j.succ

full_name: Fin.sum_Ioi_succ
code: @[to_additive]
theorem prod_Ioi_succ {M : Type*} [CommMonoid M] {n : ℕ} (i : Fin n) (v : Fin n.succ → M) :
    ∏ j ∈ Ioi i.succ, v j = ∏ j ∈ Ioi i, v j.succ 
goal: ∑ j ∈ Finset.Ioi i.succ, v j = ∑ j ∈ Finset.Ioi i, v j.succ

full_name: Fin.prod_congr'
code: @[to_additive]
theorem prod_congr' {M : Type*} [CommMonoid M] {a b : ℕ} (f : Fin b → M) (h : a = b) :
    (∏ i : Fin a, f (cast h i)) = ∏ i : Fin b, f i 
goal: ∏ i : Fin a, f (Fin.cast h i) = ∏ i : Fin b, f i

full_name: Fin.sum_congr'
code: @[to_additive]
theorem prod_congr' {M : Type*} [CommMonoid M] {a b : ℕ} (f : Fin b → M) (h : a = b) :
    (∏ i : Fin a, f (cast h i)) = ∏ i : Fin b, f i 
goal: ∑ i : Fin a, f (Fin.cast h i) = ∑ i : Fin b, f i

full_name: Fin.sum_univ_add
code: @[to_additive]
theorem prod_univ_add {M : Type*} [CommMonoid M] {a b : ℕ} (f : Fin (a + b) → M) :
    (∏ i : Fin (a + b), f i) = (∏ i : Fin a, f (castAdd b i)) * ∏ i : Fin b, f (natAdd a i) 
goal: ∑ i : Fin (a + b), f i = ∑ i : Fin a, f (Fin.castAdd b i) + ∑ i : Fin b, f (Fin.natAdd a i)

full_name: Fin.prod_univ_add
code: @[to_additive]
theorem prod_univ_add {M : Type*} [CommMonoid M] {a b : ℕ} (f : Fin (a + b) → M) :
    (∏ i : Fin (a + b), f i) = (∏ i : Fin a, f (castAdd b i)) * ∏ i : Fin b, f (natAdd a i) 
goal: ∏ i : Fin (a + b), f i = (∏ i : Fin a, f (Fin.castAdd b i)) * ∏ i : Fin b, f (Fin.natAdd a i)

full_name: Fin.sum_trunc
code: @[to_additive]
theorem prod_trunc {M : Type*} [CommMonoid M] {a b : ℕ} (f : Fin (a + b) → M)
    (hf : ∀ j : Fin b, f (natAdd a j) = 1) :
    (∏ i : Fin (a + b), f i) = ∏ i : Fin a, f (castLE (Nat.le.intro rfl) i) 
goal: ∑ i : Fin (a + b), f i = ∑ i : Fin a, f (Fin.castLE ⋯ i)

full_name: Fin.prod_trunc
code: @[to_additive]
theorem prod_trunc {M : Type*} [CommMonoid M] {a b : ℕ} (f : Fin (a + b) → M)
    (hf : ∀ j : Fin b, f (natAdd a j) = 1) :
    (∏ i : Fin (a + b), f i) = ∏ i : Fin a, f (castLE (Nat.le.intro rfl) i) 
goal: ∏ i : Fin (a + b), f i = ∏ i : Fin a, f (Fin.castLE ⋯ i)

full_name: Fin.partialProd
code: /-- For `f = (a₁, ..., aₙ)` in `αⁿ`, `partialProd f` is `(1, a₁, a₁a₂, ..., a₁...aₙ)` in `αⁿ⁺¹`. -/
@[to_additive "For `f = (a₁, ..., aₙ)` in `αⁿ`, `partialSum f` is\n
`(0, a₁, a₁ + a₂, ..., a₁ + ... + aₙ)` in `αⁿ⁺¹`."]
def partialProd (f : Fin n → α) (i : Fin (n + 1)) : α 
goal: α

full_name: Fin.partialSum
code: /-- For `f = (a₁, ..., aₙ)` in `αⁿ`, `partialProd f` is `(1, a₁, a₁a₂, ..., a₁...aₙ)` in `αⁿ⁺¹`. -/
@[to_additive "For `f = (a₁, ..., aₙ)` in `αⁿ`, `partialSum f` is\n
`(0, a₁, a₁ + a₂, ..., a₁ + ... + aₙ)` in `αⁿ⁺¹`."]
def partialProd (f : Fin n → α) (i : Fin (n + 1)) : α 
goal: α

full_name: Fin.partialSum_zero
code: @[to_additive (attr := simp)]
theorem partialProd_zero (f : Fin n → α) : partialProd f 0 = 1 
goal: Fin.partialSum f 0 = 0

full_name: Fin.partialProd_zero
code: @[to_additive (attr := simp)]
theorem partialProd_zero (f : Fin n → α) : partialProd f 0 = 1 
goal: Fin.partialProd f 0 = 1

full_name: Fin.partialSum_succ
code: @[to_additive]
theorem partialProd_succ (f : Fin n → α) (j : Fin n) :
    partialProd f j.succ = partialProd f (Fin.castSucc j) * f j 
goal: Fin.partialSum f j.succ = Fin.partialSum f j.castSucc + f j

full_name: Fin.partialProd_succ
code: @[to_additive]
theorem partialProd_succ (f : Fin n → α) (j : Fin n) :
    partialProd f j.succ = partialProd f (Fin.castSucc j) * f j 
goal: Fin.partialProd f j.succ = Fin.partialProd f j.castSucc * f j

full_name: Fin.partialProd_succ'
code: @[to_additive]
theorem partialProd_succ' (f : Fin (n + 1) → α) (j : Fin (n + 1)) :
    partialProd f j.succ = f 0 * partialProd (Fin.tail f) j 
goal: Fin.partialProd f j.succ = f 0 * Fin.partialProd (Fin.tail f) j

full_name: Fin.partialSum_succ'
code: @[to_additive]
theorem partialProd_succ' (f : Fin (n + 1) → α) (j : Fin (n + 1)) :
    partialProd f j.succ = f 0 * partialProd (Fin.tail f) j 
goal: Fin.partialSum f j.succ = f 0 + Fin.partialSum (Fin.tail f) j

full_name: Fin.partialProd_left_inv
code: @[to_additive]
theorem partialProd_left_inv {G : Type*} [Group G] (f : Fin (n + 1) → G) :
    (f 0 • partialProd fun i : Fin n => (f i)⁻¹ * f i.succ) = f 
goal: (f 0 • Fin.partialProd fun i => (f ↑↑i)⁻¹ * f i.succ) = f

full_name: Fin.partialSum_left_neg
code: @[to_additive]
theorem partialProd_left_inv {G : Type*} [Group G] (f : Fin (n + 1) → G) :
    (f 0 • partialProd fun i : Fin n => (f i)⁻¹ * f i.succ) = f 
goal: (f 0 +ᵥ Fin.partialSum fun i => -f ↑↑i + f i.succ) = f

full_name: Fin.partialSum_right_neg
code: @[to_additive]
theorem partialProd_right_inv {G : Type*} [Group G] (f : Fin n → G) (i : Fin n) :
    (partialProd f (Fin.castSucc i))⁻¹ * partialProd f i.succ = f i 
goal: -Fin.partialSum f i.castSucc + Fin.partialSum f i.succ = f i

full_name: Fin.partialProd_right_inv
code: @[to_additive]
theorem partialProd_right_inv {G : Type*} [Group G] (f : Fin n → G) (i : Fin n) :
    (partialProd f (Fin.castSucc i))⁻¹ * partialProd f i.succ = f i 
goal: (Fin.partialProd f i.castSucc)⁻¹ * Fin.partialProd f i.succ = f i

full_name: Fin.neg_partialSum_add_eq_contractNth
code: /-- Let `(g₀, g₁, ..., gₙ)` be a tuple of elements in `Gⁿ⁺¹`.
Then if `k < j`, this says `(g₀g₁...gₖ₋₁)⁻¹ * g₀g₁...gₖ = gₖ`.
If `k = j`, it says `(g₀g₁...gₖ₋₁)⁻¹ * g₀g₁...gₖ₊₁ = gₖgₖ₊₁`.
If `k > j`, it says `(g₀g₁...gₖ)⁻¹ * g₀g₁...gₖ₊₁ = gₖ₊₁.`
Useful for defining group cohomology. -/
@[to_additive
      "Let `(g₀, g₁, ..., gₙ)` be a tuple of elements in `Gⁿ⁺¹`.
      Then if `k < j`, this says `-(g₀ + g₁ + ... + gₖ₋₁) + (g₀ + g₁ + ... + gₖ) = gₖ`.
      If `k = j`, it says `-(g₀ + g₁ + ... + gₖ₋₁) + (g₀ + g₁ + ... + gₖ₊₁) = gₖ + gₖ₊₁`.
      If `k > j`, it says `-(g₀ + g₁ + ... + gₖ) + (g₀ + g₁ + ... + gₖ₊₁) = gₖ₊₁.`
      Useful for defining group cohomology."]
theorem inv_partialProd_mul_eq_contractNth {G : Type*} [Group G] (g : Fin (n + 1) → G)
    (j : Fin (n + 1)) (k : Fin n) :
    (partialProd g (j.succ.succAbove (Fin.castSucc k)))⁻¹ * partialProd g (j.succAbove k).succ =
      j.contractNth (· * ·) g k 
goal: -Fin.partialSum g (j.succ.succAbove k.castSucc) + Fin.partialSum g (j.succAbove k).succ =
  j.contractNth (fun x x_1 => x + x_1) g k

full_name: Fin.inv_partialProd_mul_eq_contractNth
code: /-- Let `(g₀, g₁, ..., gₙ)` be a tuple of elements in `Gⁿ⁺¹`.
Then if `k < j`, this says `(g₀g₁...gₖ₋₁)⁻¹ * g₀g₁...gₖ = gₖ`.
If `k = j`, it says `(g₀g₁...gₖ₋₁)⁻¹ * g₀g₁...gₖ₊₁ = gₖgₖ₊₁`.
If `k > j`, it says `(g₀g₁...gₖ)⁻¹ * g₀g₁...gₖ₊₁ = gₖ₊₁.`
Useful for defining group cohomology. -/
@[to_additive
      "Let `(g₀, g₁, ..., gₙ)` be a tuple of elements in `Gⁿ⁺¹`.
      Then if `k < j`, this says `-(g₀ + g₁ + ... + gₖ₋₁) + (g₀ + g₁ + ... + gₖ) = gₖ`.
      If `k = j`, it says `-(g₀ + g₁ + ... + gₖ₋₁) + (g₀ + g₁ + ... + gₖ₊₁) = gₖ + gₖ₊₁`.
      If `k > j`, it says `-(g₀ + g₁ + ... + gₖ) + (g₀ + g₁ + ... + gₖ₊₁) = gₖ₊₁.`
      Useful for defining group cohomology."]
theorem inv_partialProd_mul_eq_contractNth {G : Type*} [Group G] (g : Fin (n + 1) → G)
    (j : Fin (n + 1)) (k : Fin n) :
    (partialProd g (j.succ.succAbove (Fin.castSucc k)))⁻¹ * partialProd g (j.succAbove k).succ =
      j.contractNth (· * ·) g k 
goal: (Fin.partialProd g (j.succ.succAbove k.castSucc))⁻¹ * Fin.partialProd g (j.succAbove k).succ =
  j.contractNth (fun x x_1 => x * x_1) g k

full_name: finFunctionFinEquiv_apply_val
code: /-- Equivalence between `Fin n → Fin m` and `Fin (m ^ n)`. -/
@[simps!]
def finFunctionFinEquiv {m n : ℕ} : (Fin n → Fin m) ≃ Fin (m ^ n) 
goal: ↑(finFunctionFinEquiv f) = ∑ i : Fin n, ↑(f i) * m ^ ↑i

full_name: finFunctionFinEquiv_symm_apply_val
code: /-- Equivalence between `Fin n → Fin m` and `Fin (m ^ n)`. -/
@[simps!]
def finFunctionFinEquiv {m n : ℕ} : (Fin n → Fin m) ≃ Fin (m ^ n) 
goal: ↑(finFunctionFinEquiv.symm a b) = ↑a / m ^ ↑b % m

full_name: finFunctionFinEquiv
code: /-- Equivalence between `Fin n → Fin m` and `Fin (m ^ n)`. -/
@[simps!]
def finFunctionFinEquiv {m n : ℕ} : (Fin n → Fin m) ≃ Fin (m ^ n) 
goal: (Fin n → Fin m) ≃ Fin (m ^ n)

full_name: finFunctionFinEquiv_apply
code: theorem finFunctionFinEquiv_apply {m n : ℕ} (f : Fin n → Fin m) :
    (finFunctionFinEquiv f : ℕ) = ∑ i : Fin n, ↑(f i) * m ^ (i : ℕ) 
goal: ↑(finFunctionFinEquiv f) = ∑ i : Fin n, ↑(f i) * m ^ ↑i

full_name: finFunctionFinEquiv_single
code: theorem finFunctionFinEquiv_single {m n : ℕ} [NeZero m] (i : Fin n) (j : Fin m) :
    (finFunctionFinEquiv (Pi.single i j) : ℕ) = j * m ^ (i : ℕ) 
goal: ↑(finFunctionFinEquiv (Pi.single i j)) = ↑j * m ^ ↑i

full_name: finPiFinEquiv
code: /-- Equivalence between `∀ i : Fin m, Fin (n i)` and `Fin (∏ i : Fin m, n i)`. -/
def finPiFinEquiv {m : ℕ} {n : Fin m → ℕ} : (∀ i : Fin m, Fin (n i)) ≃ Fin (∏ i : Fin m, n i) 
goal: ((i : Fin m) → Fin (n i)) ≃ Fin (∏ i : Fin m, n i)

full_name: finPiFinEquiv_apply
code: theorem finPiFinEquiv_apply {m : ℕ} {n : Fin m → ℕ} (f : ∀ i : Fin m, Fin (n i)) :
    (finPiFinEquiv f : ℕ) = ∑ i, f i * ∏ j, n (Fin.castLE i.is_lt.le j) 
goal: ↑(finPiFinEquiv f) = ∑ i : Fin m, ↑(f i) * ∏ j : Fin ↑i, n (Fin.castLE ⋯ j)

full_name: finPiFinEquiv_single
code: theorem finPiFinEquiv_single {m : ℕ} {n : Fin m → ℕ} [∀ i, NeZero (n i)] (i : Fin m)
    (j : Fin (n i)) :
    (finPiFinEquiv (Pi.single i j : ∀ i : Fin m, Fin (n i)) : ℕ) =
      j * ∏ j, n (Fin.castLE i.is_lt.le j) 
goal: ↑(finPiFinEquiv (Pi.single i j)) = ↑j * ∏ j : Fin ↑i, n (Fin.castLE ⋯ j)

full_name: List.prod_take_ofFn
code: @[to_additive]
theorem prod_take_ofFn {n : ℕ} (f : Fin n → α) (i : ℕ) :
    ((ofFn f).take i).prod = ∏ j ∈ Finset.univ.filter fun j : Fin n => j.val < i, f j 
goal: (List.take i (List.ofFn f)).prod = ∏ j ∈ Finset.filter (fun j => ↑j < i) Finset.univ, f j

full_name: List.sum_take_ofFn
code: @[to_additive]
theorem prod_take_ofFn {n : ℕ} (f : Fin n → α) (i : ℕ) :
    ((ofFn f).take i).prod = ∏ j ∈ Finset.univ.filter fun j : Fin n => j.val < i, f j 
goal: (List.take i (List.ofFn f)).sum = ∑ j ∈ Finset.filter (fun j => ↑j < i) Finset.univ, f j

full_name: List.sum_ofFn
code: @[to_additive]
theorem prod_ofFn {n : ℕ} {f : Fin n → α} : (ofFn f).prod = ∏ i, f i 
goal: (List.ofFn f).sum = ∑ i : Fin n, f i

full_name: List.prod_ofFn
code: @[to_additive]
theorem prod_ofFn {n : ℕ} {f : Fin n → α} : (ofFn f).prod = ∏ i, f i 
goal: (List.ofFn f).prod = ∏ i : Fin n, f i

full_name: List.alternatingSum_eq_finset_sum
code: @[to_additive]
theorem alternatingProd_eq_finset_prod {G : Type*} [CommGroup G] :
    ∀ (L : List G), alternatingProd L = ∏ i : Fin L.length, L.get i ^ (-1 : ℤ) ^ (i : ℕ)
  
goal: L.alternatingSum = ∑ i : Fin L.length, (-1) ^ ↑i • L.get i

full_name: List.alternatingProd_eq_finset_prod
code: @[to_additive]
theorem alternatingProd_eq_finset_prod {G : Type*} [CommGroup G] :
    ∀ (L : List G), alternatingProd L = ∏ i : Fin L.length, L.get i ^ (-1 : ℤ) ^ (i : ℕ)
  
goal: L.alternatingProd = ∏ i : Fin L.length, L.get i ^ (-1) ^ ↑i