The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V03. Sets, finite structures and big operators

Mathlib.Algebra.BigOperators.Fin

174 declarations. Mathlib docs · Source

Big operators and Fin

Some results about products and sums over the type Fin.

The most important results are the induction formulas Fin.prod_univ_castSucc and Fin.prod_univ_succ, and the formula Fin.prod_const for the product of a constant function. These results have variants for sums instead of products.

Main declarations

  • finFunctionFinEquiv: An explicit equivalence between Fin n → Fin m and Fin (m ^ n).

Products over intervals: Fin.cast

Products over intervals: Fin.castLE

Products over intervals: Fin.castAdd

Products over intervals: Fin.castSucc

Products over intervals: Fin.succ

theorem List.alternatingSum.match_1.congr_eq_3 E1 #

∀ {G : Type u_1} (motive : List G → Sort u_2) (x : List G) (h_1 : Unit → motive []) (h_2 : (g : G) → motive [g])
  (h_3 : (g h : G) → (t : List G) → motive (g :: h :: t)) (g h : G) (t : List G),
  x = g :: h :: t →
    (match x with
      | [] => h_1 ()
      | [g] => h_2 g
      | g :: h :: t => h_3 g h t) ≍
      h_3 g h t

theorem List.alternatingSum.match_1.congr_eq_1 E1 #

∀ {G : Type u_1} (motive : List G → Sort u_2) (x : List G) (h_1 : Unit → motive []) (h_2 : (g : G) → motive [g])
  (h_3 : (g h : G) → (t : List G) → motive (g :: h :: t)),
  x = [] →
    (match x with
      | [] => h_1 ()
      | [g] => h_2 g
      | g :: h :: t => h_3 g h t) ≍
      h_1 ()

theorem finSigmaFinEquiv.match_1.congr_eq_2 E1 #

∀ (motive : (m : ℕ) → {n : Fin m → ℕ} → Sort u_1) (m : ℕ) {n : Fin m → ℕ} (h_1 : (n : Fin 0 → ℕ) → motive 0)
  (h_2 : (m : ℕ) → (n : Fin m.succ → ℕ) → motive m.succ) (m_1 : ℕ) (n_1 : Fin m_1.succ → ℕ),
  m = m_1.succ →
    n ≍ n_1 →
      (match m, n with
        | 0, n => h_1 n
        | m.succ, n => h_2 m n) ≍
        h_2 m_1 n_1

theorem finSigmaFinEquiv.match_1.congr_eq_1 E1 #

∀ (motive : (m : ℕ) → {n : Fin m → ℕ} → Sort u_1) (m : ℕ) {n : Fin m → ℕ} (h_1 : (n : Fin 0 → ℕ) → motive 0)
  (h_2 : (m : ℕ) → (n : Fin m.succ → ℕ) → motive m.succ) (n_1 : Fin 0 → ℕ),
  m = 0 →
    n ≍ n_1 →
      (match m, n with
        | 0, n => h_1 n
        | m.succ, n => h_2 m n) ≍
        h_1 n_1

theorem List.alternatingSum.match_1.congr_eq_2 E1 #

∀ {G : Type u_1} (motive : List G → Sort u_2) (x : List G) (h_1 : Unit → motive []) (h_2 : (g : G) → motive [g])
  (h_3 : (g h : G) → (t : List G) → motive (g :: h :: t)) (g : G),
  x = [g] →
    (match x with
      | [] => h_1 ()
      | [g] => h_2 g
      | g :: h :: t => h_3 g h t) ≍
      h_2 g

theorem Equiv.equivOfIsEmpty.congr_simp E1 #

∀ (α : Sort u_1) (β : Sort u_2) [inst : IsEmpty α] [inst_1 : IsEmpty β],
  Equiv.equivOfIsEmpty α β = Equiv.equivOfIsEmpty α β

theorem Finset.sum_range E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : ℕ → M), ∑ i ∈ Finset.range n, f i = ∑ i, f ↑i

theorem Finset.prod_range E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : ℕ → M), ∏ i ∈ Finset.range n, f i = ∏ i, f ↑i

theorem Fin.prod_ofFn E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin n → M), (List.ofFn f).prod = ∏ i, f i

theorem Fin.sum_ofFn E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin n → M), (List.ofFn f).sum = ∑ i, f i

theorem Fin.sum_univ_def E0 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin n → M), ∑ i, f i = (List.map f (List.finRange n)).sum

theorem Fin.prod_univ_def E0 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin n → M), ∏ i, f i = (List.map f (List.finRange n)).prod

theorem Fin.prod_univ_zero E1 #

∀ {M : Type u_2} [inst : CommMonoid M] (f : Fin 0 → M), ∏ i, f i = 1

A product of a function f : Fin 0 → M is 1 because Fin 0 is empty

theorem Fin.sum_univ_zero E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] (f : Fin 0 → M), ∑ i, f i = 0

A sum of a function f : Fin 0 → M is 0 because Fin 0 is empty

theorem Fin.prod_univ_succAbove E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (x : Fin (n + 1)),
  ∏ i, f i = f x * ∏ i, f (x.succAbove i)

A product of a function f : Fin (n + 1) → M over all Fin (n + 1) is the product of f x, for some x : Fin (n + 1) times the remaining product

theorem Fin.sum_univ_succAbove E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (x : Fin (n + 1)),
  ∑ i, f i = f x + ∑ i, f (x.succAbove i)

A sum of a function f : Fin (n + 1) → M over all Fin (n + 1) is the sum of f x, for some x : Fin (n + 1) plus the remaining sum

theorem Fin.prod_univ_succ E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M), ∏ i, f i = f 0 * ∏ i, f i.succ

A product of a function f : Fin (n + 1) → M over all Fin (n + 1) is the product of f 0 times the remaining product

theorem Fin.sum_univ_succ E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M), ∑ i, f i = f 0 + ∑ i, f i.succ

A sum of a function f : Fin (n + 1) → M over all Fin (n + 1) is the sum of f 0 plus the remaining sum

theorem Fin.prod_univ_castSucc E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M), ∏ i, f i = (∏ i, f i.castSucc) * f (Fin.last n)

A product of a function f : Fin (n + 1) → M over all Fin (n + 1) is the product of f (Fin.last n) times the remaining product

theorem Fin.sum_univ_castSucc E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M), ∑ i, f i = ∑ i, f i.castSucc + f (Fin.last n)

A sum of a function f : Fin (n + 1) → M over all Fin (n + 1) is the sum of f (Fin.last n) plus the remaining sum

theorem Fin.prod_univ_getElem E0 #

∀ {M : Type u_2} [inst : CommMonoid M] (l : List M), ∏ i, l[↑i] = l.prod

theorem Fin.sum_univ_getElem E0 #

∀ {M : Type u_2} [inst : AddCommMonoid M] (l : List M), ∑ i, l[↑i] = l.sum

theorem Fin.prod_univ_fun_getElem E0 #

∀ {ι : Type u_1} {M : Type u_2} [inst : CommMonoid M] (l : List ι) (f : ι → M), ∏ i, f l[↑i] = (List.map f l).prod

theorem Fin.sum_univ_fun_getElem E0 #

∀ {ι : Type u_1} {M : Type u_2} [inst : AddCommMonoid M] (l : List ι) (f : ι → M), ∑ i, f l[↑i] = (List.map f l).sum

theorem Fin.sum_cons E0 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (x : M) (f : Fin n → M), ∑ i, Fin.cons x f i = x + ∑ i, f i

theorem Fin.prod_cons E0 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (x : M) (f : Fin n → M), ∏ i, Fin.cons x f i = x * ∏ i, f i

theorem Fin.sum_snoc E0 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (x : M) (f : Fin n → M), ∑ i, Fin.snoc f x i = ∑ i, f i + x

theorem Fin.prod_snoc E0 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (x : M) (f : Fin n → M), ∏ i, Fin.snoc f x i = (∏ i, f i) * x

theorem Fin.prod_univ_one E1 #

∀ {M : Type u_2} [inst : CommMonoid M] (f : Fin 1 → M), ∏ i, f i = f 0

theorem Fin.sum_univ_one E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] (f : Fin 1 → M), ∑ i, f i = f 0

theorem Fin.prod_univ_two E0 #

∀ {M : Type u_2} [inst : CommMonoid M] (f : Fin 2 → M), ∏ i, f i = f 0 * f 1

theorem Fin.sum_univ_two E0 #

∀ {M : Type u_2} [inst : AddCommMonoid M] (f : Fin 2 → M), ∑ i, f i = f 0 + f 1

theorem Fin.sum_univ_two' E1 #

∀ {ι : Type u_1} {M : Type u_2} [inst : AddCommMonoid M] (f : ι → M) (a b : ι), ∑ i, f (![a, b] i) = f a + f b

theorem Fin.prod_univ_two' E1 #

∀ {ι : Type u_1} {M : Type u_2} [inst : CommMonoid M] (f : ι → M) (a b : ι), ∏ i, f (![a, b] i) = f a * f b

theorem Fin.sum_univ_three E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] (f : Fin 3 → M), ∑ i, f i = f 0 + f 1 + f 2

theorem Fin.prod_univ_three E1 #

∀ {M : Type u_2} [inst : CommMonoid M] (f : Fin 3 → M), ∏ i, f i = f 0 * f 1 * f 2

theorem Fin.prod_univ_four E1 #

∀ {M : Type u_2} [inst : CommMonoid M] (f : Fin 4 → M), ∏ i, f i = f 0 * f 1 * f 2 * f 3

theorem Fin.sum_univ_four E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] (f : Fin 4 → M), ∑ i, f i = f 0 + f 1 + f 2 + f 3

theorem Fin.prod_univ_five E1 #

∀ {M : Type u_2} [inst : CommMonoid M] (f : Fin 5 → M), ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4

theorem Fin.sum_univ_five E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] (f : Fin 5 → M), ∑ i, f i = f 0 + f 1 + f 2 + f 3 + f 4

theorem Fin.sum_univ_six E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] (f : Fin 6 → M), ∑ i, f i = f 0 + f 1 + f 2 + f 3 + f 4 + f 5

theorem Fin.prod_univ_six E1 #

∀ {M : Type u_2} [inst : CommMonoid M] (f : Fin 6 → M), ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5

theorem Fin.prod_univ_seven E1 #

∀ {M : Type u_2} [inst : CommMonoid M] (f : Fin 7 → M), ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6

theorem Fin.sum_univ_seven E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] (f : Fin 7 → M), ∑ i, f i = f 0 + f 1 + f 2 + f 3 + f 4 + f 5 + f 6

theorem Fin.prod_univ_eight E1 #

∀ {M : Type u_2} [inst : CommMonoid M] (f : Fin 8 → M), ∏ i, f i = f 0 * f 1 * f 2 * f 3 * f 4 * f 5 * f 6 * f 7

theorem Fin.sum_univ_eight E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] (f : Fin 8 → M), ∑ i, f i = f 0 + f 1 + f 2 + f 3 + f 4 + f 5 + f 6 + f 7

theorem Fin.prod_const E1 #

∀ {M : Type u_2} [inst : CommMonoid M] (n : ℕ) (x : M), ∏ _i, x = x ^ n

theorem Fin.sum_const E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] (n : ℕ) (x : M), ∑ _i, x = n • x

theorem Fin.prod_congr' E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {a b : ℕ} (f : Fin b → M) (h : a = b), ∏ i, f (Fin.cast h i) = ∏ i, f i

theorem Fin.sum_congr' E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {a b : ℕ} (f : Fin b → M) (h : a = b), ∑ i, f (Fin.cast h i) = ∑ i, f i

theorem Fin.sum_univ_add E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {a b : ℕ} (f : Fin (a + b) → M),
  ∑ i, f i = ∑ i, f (Fin.castAdd b i) + ∑ i, f (Fin.natAdd a i)

theorem Fin.prod_univ_add E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {a b : ℕ} (f : Fin (a + b) → M),
  ∏ i, f i = (∏ i, f (Fin.castAdd b i)) * ∏ i, f (Fin.natAdd a i)

theorem Fin.sum_trunc E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {a b : ℕ} (f : Fin (a + b) → M),
  (∀ (j : Fin b), f (Fin.natAdd a j) = 0) → ∑ i, f i = ∑ i, f (Fin.castAdd b i)

theorem Fin.prod_trunc E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {a b : ℕ} (f : Fin (a + b) → M),
  (∀ (j : Fin b), f (Fin.natAdd a j) = 1) → ∏ i, f i = ∏ i, f (Fin.castAdd b i)

theorem Fin.prod_insertNth E0 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (i : Fin (n + 1)) (x : M) (p : Fin n → M),
  ∏ j, i.insertNth x p j = x * ∏ j, p j

theorem Fin.sum_insertNth E0 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (i : Fin (n + 1)) (x : M) (p : Fin n → M),
  ∑ j, i.insertNth x p j = x + ∑ j, p j

theorem Fin.mul_prod_removeNth E0 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (i : Fin (n + 1)) (f : Fin (n + 1) → M),
  f i * ∏ j, i.removeNth f j = ∏ j, f j

theorem Fin.add_sum_removeNth E0 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (i : Fin (n + 1)) (f : Fin (n + 1) → M),
  f i + ∑ j, i.removeNth f j = ∑ j, f j

theorem Fin.sum_Icc_cast E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a b : Fin n),
  ∑ i ∈ Finset.Icc (Fin.cast h a) (Fin.cast h b), f i = ∑ i ∈ Finset.Icc a b, f (Fin.cast h i)

theorem Fin.prod_Icc_cast E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a b : Fin n),
  ∏ i ∈ Finset.Icc (Fin.cast h a) (Fin.cast h b), f i = ∏ i ∈ Finset.Icc a b, f (Fin.cast h i)

theorem Fin.sum_Ico_cast E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a b : Fin n),
  ∑ i ∈ Finset.Ico (Fin.cast h a) (Fin.cast h b), f i = ∑ i ∈ Finset.Ico a b, f (Fin.cast h i)

theorem Fin.prod_Ico_cast E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a b : Fin n),
  ∏ i ∈ Finset.Ico (Fin.cast h a) (Fin.cast h b), f i = ∏ i ∈ Finset.Ico a b, f (Fin.cast h i)

theorem Fin.sum_Ioc_cast E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a b : Fin n),
  ∑ i ∈ Finset.Ioc (Fin.cast h a) (Fin.cast h b), f i = ∑ i ∈ Finset.Ioc a b, f (Fin.cast h i)

theorem Fin.prod_Ioc_cast E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a b : Fin n),
  ∏ i ∈ Finset.Ioc (Fin.cast h a) (Fin.cast h b), f i = ∏ i ∈ Finset.Ioc a b, f (Fin.cast h i)

theorem Fin.sum_Ioo_cast E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a b : Fin n),
  ∑ i ∈ Finset.Ioo (Fin.cast h a) (Fin.cast h b), f i = ∑ i ∈ Finset.Ioo a b, f (Fin.cast h i)

theorem Fin.prod_Ioo_cast E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a b : Fin n),
  ∏ i ∈ Finset.Ioo (Fin.cast h a) (Fin.cast h b), f i = ∏ i ∈ Finset.Ioo a b, f (Fin.cast h i)

theorem Fin.prod_uIcc_cast E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a b : Fin n),
  ∏ i ∈ Finset.uIcc (Fin.cast h a) (Fin.cast h b), f i = ∏ i ∈ Finset.uIcc a b, f (Fin.cast h i)

theorem Fin.sum_uIcc_cast E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a b : Fin n),
  ∑ i ∈ Finset.uIcc (Fin.cast h a) (Fin.cast h b), f i = ∑ i ∈ Finset.uIcc a b, f (Fin.cast h i)

theorem Fin.prod_Ici_cast E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a : Fin n),
  ∏ i ≥ Fin.cast h a, f i = ∏ i ≥ a, f (Fin.cast h i)

theorem Fin.sum_Ici_cast E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a : Fin n),
  ∑ i ≥ Fin.cast h a, f i = ∑ i ≥ a, f (Fin.cast h i)

theorem Fin.sum_Ioi_cast E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a : Fin n),
  ∑ i > Fin.cast h a, f i = ∑ i > a, f (Fin.cast h i)

theorem Fin.prod_Ioi_cast E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a : Fin n),
  ∏ i > Fin.cast h a, f i = ∏ i > a, f (Fin.cast h i)

theorem Fin.sum_Iic_cast E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a : Fin n),
  ∑ i ≤ Fin.cast h a, f i = ∑ i ≤ a, f (Fin.cast h i)

theorem Fin.prod_Iic_cast E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a : Fin n),
  ∏ i ≤ Fin.cast h a, f i = ∏ i ≤ a, f (Fin.cast h i)

theorem Fin.sum_Iio_cast E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a : Fin n),
  ∑ i < Fin.cast h a, f i = ∑ i < a, f (Fin.cast h i)

theorem Fin.prod_Iio_cast E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n = m) (f : Fin m → M) (a : Fin n),
  ∏ i < Fin.cast h a, f i = ∏ i < a, f (Fin.cast h i)

theorem Fin.prod_Icc_castLE E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n ≤ m) (f : Fin m → M) (a b : Fin n),
  ∏ i ∈ Finset.Icc (Fin.castLE h a) (Fin.castLE h b), f i = ∏ i ∈ Finset.Icc a b, f (Fin.castLE h i)

theorem Fin.sum_Icc_castLE E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n ≤ m) (f : Fin m → M) (a b : Fin n),
  ∑ i ∈ Finset.Icc (Fin.castLE h a) (Fin.castLE h b), f i = ∑ i ∈ Finset.Icc a b, f (Fin.castLE h i)

theorem Fin.prod_Ico_castLE E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n ≤ m) (f : Fin m → M) (a b : Fin n),
  ∏ i ∈ Finset.Ico (Fin.castLE h a) (Fin.castLE h b), f i = ∏ i ∈ Finset.Ico a b, f (Fin.castLE h i)

theorem Fin.sum_Ico_castLE E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n ≤ m) (f : Fin m → M) (a b : Fin n),
  ∑ i ∈ Finset.Ico (Fin.castLE h a) (Fin.castLE h b), f i = ∑ i ∈ Finset.Ico a b, f (Fin.castLE h i)

theorem Fin.prod_Ioc_castLE E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n ≤ m) (f : Fin m → M) (a b : Fin n),
  ∏ i ∈ Finset.Ioc (Fin.castLE h a) (Fin.castLE h b), f i = ∏ i ∈ Finset.Ioc a b, f (Fin.castLE h i)

theorem Fin.sum_Ioc_castLE E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n ≤ m) (f : Fin m → M) (a b : Fin n),
  ∑ i ∈ Finset.Ioc (Fin.castLE h a) (Fin.castLE h b), f i = ∑ i ∈ Finset.Ioc a b, f (Fin.castLE h i)

theorem Fin.prod_Ioo_castLE E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n ≤ m) (f : Fin m → M) (a b : Fin n),
  ∏ i ∈ Finset.Ioo (Fin.castLE h a) (Fin.castLE h b), f i = ∏ i ∈ Finset.Ioo a b, f (Fin.castLE h i)

theorem Fin.sum_Ioo_castLE E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n ≤ m) (f : Fin m → M) (a b : Fin n),
  ∑ i ∈ Finset.Ioo (Fin.castLE h a) (Fin.castLE h b), f i = ∑ i ∈ Finset.Ioo a b, f (Fin.castLE h i)

theorem Fin.prod_uIcc_castLE E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n ≤ m) (f : Fin m → M) (a b : Fin n),
  ∏ i ∈ Finset.uIcc (Fin.castLE h a) (Fin.castLE h b), f i = ∏ i ∈ Finset.uIcc a b, f (Fin.castLE h i)

theorem Fin.sum_uIcc_castLE E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n ≤ m) (f : Fin m → M) (a b : Fin n),
  ∑ i ∈ Finset.uIcc (Fin.castLE h a) (Fin.castLE h b), f i = ∑ i ∈ Finset.uIcc a b, f (Fin.castLE h i)

theorem Fin.sum_Iic_castLE E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n ≤ m) (f : Fin m → M) (a : Fin n),
  ∑ i ≤ Fin.castLE h a, f i = ∑ i ≤ a, f (Fin.castLE h i)

theorem Fin.prod_Iic_castLE E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n ≤ m) (f : Fin m → M) (a : Fin n),
  ∏ i ≤ Fin.castLE h a, f i = ∏ i ≤ a, f (Fin.castLE h i)

theorem Fin.sum_Iio_castLE E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n m : ℕ} (h : n ≤ m) (f : Fin m → M) (a : Fin n),
  ∑ i < Fin.castLE h a, f i = ∑ i < a, f (Fin.castLE h i)

theorem Fin.prod_Iio_castLE E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n m : ℕ} (h : n ≤ m) (f : Fin m → M) (a : Fin n),
  ∏ i < Fin.castLE h a, f i = ∏ i < a, f (Fin.castLE h i)

theorem Fin.sum_Icc_castAdd E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (m : ℕ) (f : Fin (n + m) → M) (a b : Fin n),
  ∑ i ∈ Finset.Icc (Fin.castAdd m a) (Fin.castAdd m b), f i = ∑ i ∈ Finset.Icc a b, f (Fin.castAdd m i)

theorem Fin.prod_Icc_castAdd E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (m : ℕ) (f : Fin (n + m) → M) (a b : Fin n),
  ∏ i ∈ Finset.Icc (Fin.castAdd m a) (Fin.castAdd m b), f i = ∏ i ∈ Finset.Icc a b, f (Fin.castAdd m i)

theorem Fin.sum_Ico_castAdd E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (m : ℕ) (f : Fin (n + m) → M) (a b : Fin n),
  ∑ i ∈ Finset.Ico (Fin.castAdd m a) (Fin.castAdd m b), f i = ∑ i ∈ Finset.Ico a b, f (Fin.castAdd m i)

theorem Fin.prod_Ico_castAdd E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (m : ℕ) (f : Fin (n + m) → M) (a b : Fin n),
  ∏ i ∈ Finset.Ico (Fin.castAdd m a) (Fin.castAdd m b), f i = ∏ i ∈ Finset.Ico a b, f (Fin.castAdd m i)

theorem Fin.sum_Ioc_castAdd E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (m : ℕ) (f : Fin (n + m) → M) (a b : Fin n),
  ∑ i ∈ Finset.Ioc (Fin.castAdd m a) (Fin.castAdd m b), f i = ∑ i ∈ Finset.Ioc a b, f (Fin.castAdd m i)

theorem Fin.prod_Ioc_castAdd E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (m : ℕ) (f : Fin (n + m) → M) (a b : Fin n),
  ∏ i ∈ Finset.Ioc (Fin.castAdd m a) (Fin.castAdd m b), f i = ∏ i ∈ Finset.Ioc a b, f (Fin.castAdd m i)

theorem Fin.prod_Ioo_castAdd E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (m : ℕ) (f : Fin (n + m) → M) (a b : Fin n),
  ∏ i ∈ Finset.Ioo (Fin.castAdd m a) (Fin.castAdd m b), f i = ∏ i ∈ Finset.Ioo a b, f (Fin.castAdd m i)

theorem Fin.sum_Ioo_castAdd E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (m : ℕ) (f : Fin (n + m) → M) (a b : Fin n),
  ∑ i ∈ Finset.Ioo (Fin.castAdd m a) (Fin.castAdd m b), f i = ∑ i ∈ Finset.Ioo a b, f (Fin.castAdd m i)

theorem Fin.sum_uIcc_castAdd E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (m : ℕ) (f : Fin (n + m) → M) (a b : Fin n),
  ∑ i ∈ Finset.uIcc (Fin.castAdd m a) (Fin.castAdd m b), f i = ∑ i ∈ Finset.uIcc a b, f (Fin.castAdd m i)

theorem Fin.prod_uIcc_castAdd E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (m : ℕ) (f : Fin (n + m) → M) (a b : Fin n),
  ∏ i ∈ Finset.uIcc (Fin.castAdd m a) (Fin.castAdd m b), f i = ∏ i ∈ Finset.uIcc a b, f (Fin.castAdd m i)

theorem Fin.sum_Iic_castAdd E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (m : ℕ) (f : Fin (n + m) → M) (a : Fin n),
  ∑ i ≤ Fin.castAdd m a, f i = ∑ i ≤ a, f (Fin.castAdd m i)

theorem Fin.prod_Iic_castAdd E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (m : ℕ) (f : Fin (n + m) → M) (a : Fin n),
  ∏ i ≤ Fin.castAdd m a, f i = ∏ i ≤ a, f (Fin.castAdd m i)

theorem Fin.prod_Iio_castAdd E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (m : ℕ) (f : Fin (n + m) → M) (a : Fin n),
  ∏ i < Fin.castAdd m a, f i = ∏ i < a, f (Fin.castAdd m i)

theorem Fin.sum_Iio_castAdd E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (m : ℕ) (f : Fin (n + m) → M) (a : Fin n),
  ∑ i < Fin.castAdd m a, f i = ∑ i < a, f (Fin.castAdd m i)

theorem Fin.prod_Icc_castSucc E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∏ i ∈ Finset.Icc a.castSucc b.castSucc, f i = ∏ i ∈ Finset.Icc a b, f i.castSucc

theorem Fin.sum_Icc_castSucc E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∑ i ∈ Finset.Icc a.castSucc b.castSucc, f i = ∑ i ∈ Finset.Icc a b, f i.castSucc

theorem Fin.sum_Ico_castSucc E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∑ i ∈ Finset.Ico a.castSucc b.castSucc, f i = ∑ i ∈ Finset.Ico a b, f i.castSucc

theorem Fin.prod_Ico_castSucc E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∏ i ∈ Finset.Ico a.castSucc b.castSucc, f i = ∏ i ∈ Finset.Ico a b, f i.castSucc

theorem Fin.prod_Ioc_castSucc E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∏ i ∈ Finset.Ioc a.castSucc b.castSucc, f i = ∏ i ∈ Finset.Ioc a b, f i.castSucc

theorem Fin.sum_Ioc_castSucc E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∑ i ∈ Finset.Ioc a.castSucc b.castSucc, f i = ∑ i ∈ Finset.Ioc a b, f i.castSucc

theorem Fin.prod_Ioo_castSucc E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∏ i ∈ Finset.Ioo a.castSucc b.castSucc, f i = ∏ i ∈ Finset.Ioo a b, f i.castSucc

theorem Fin.sum_Ioo_castSucc E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∑ i ∈ Finset.Ioo a.castSucc b.castSucc, f i = ∑ i ∈ Finset.Ioo a b, f i.castSucc

theorem Fin.prod_uIcc_castSucc E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∏ i ∈ Finset.uIcc a.castSucc b.castSucc, f i = ∏ i ∈ Finset.uIcc a b, f i.castSucc

theorem Fin.sum_uIcc_castSucc E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∑ i ∈ Finset.uIcc a.castSucc b.castSucc, f i = ∑ i ∈ Finset.uIcc a b, f i.castSucc

theorem Fin.prod_Iic_castSucc E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a : Fin n),
  ∏ i ≤ a.castSucc, f i = ∏ i ≤ a, f i.castSucc

theorem Fin.sum_Iic_castSucc E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a : Fin n),
  ∑ i ≤ a.castSucc, f i = ∑ i ≤ a, f i.castSucc

theorem Fin.prod_Iio_castSucc E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a : Fin n),
  ∏ i < a.castSucc, f i = ∏ i < a, f i.castSucc

theorem Fin.sum_Iio_castSucc E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a : Fin n),
  ∑ i < a.castSucc, f i = ∑ i < a, f i.castSucc

theorem Fin.prod_Icc_succ E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∏ i ∈ Finset.Icc a.succ b.succ, f i = ∏ i ∈ Finset.Icc a b, f i.succ

theorem Fin.sum_Icc_succ E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∑ i ∈ Finset.Icc a.succ b.succ, f i = ∑ i ∈ Finset.Icc a b, f i.succ

theorem Fin.prod_Ico_succ E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∏ i ∈ Finset.Ico a.succ b.succ, f i = ∏ i ∈ Finset.Ico a b, f i.succ

theorem Fin.sum_Ico_succ E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∑ i ∈ Finset.Ico a.succ b.succ, f i = ∑ i ∈ Finset.Ico a b, f i.succ

theorem Fin.sum_Ioc_succ E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∑ i ∈ Finset.Ioc a.succ b.succ, f i = ∑ i ∈ Finset.Ioc a b, f i.succ

theorem Fin.prod_Ioc_succ E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∏ i ∈ Finset.Ioc a.succ b.succ, f i = ∏ i ∈ Finset.Ioc a b, f i.succ

theorem Fin.sum_Ioo_succ E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∑ i ∈ Finset.Ioo a.succ b.succ, f i = ∑ i ∈ Finset.Ioo a b, f i.succ

theorem Fin.prod_Ioo_succ E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∏ i ∈ Finset.Ioo a.succ b.succ, f i = ∏ i ∈ Finset.Ioo a b, f i.succ

theorem Fin.prod_uIcc_succ E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∏ i ∈ Finset.uIcc a.succ b.succ, f i = ∏ i ∈ Finset.uIcc a b, f i.succ

theorem Fin.sum_uIcc_succ E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a b : Fin n),
  ∑ i ∈ Finset.uIcc a.succ b.succ, f i = ∑ i ∈ Finset.uIcc a b, f i.succ

theorem Fin.prod_Ici_succ E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a : Fin n), ∏ i ≥ a.succ, f i = ∏ i ≥ a, f i.succ

theorem Fin.sum_Ici_succ E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a : Fin n),
  ∑ i ≥ a.succ, f i = ∑ i ≥ a, f i.succ

theorem Fin.prod_Ioi_succ E0 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a : Fin n), ∏ i > a.succ, f i = ∏ i > a, f i.succ

theorem Fin.sum_Ioi_succ E0 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (a : Fin n),
  ∑ i > a.succ, f i = ∑ i > a, f i.succ

theorem Fin.prod_Ioi_zero E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → M), ∏ i > 0, f i = ∏ j, f j.succ

theorem Fin.sum_Ioi_zero E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → M), ∑ i > 0, f i = ∑ j, f j.succ

theorem Fin.prod_prod_eq_prod_triangle_mul E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin (n + 1) → Fin n → M),
  ∏ i, ∏ j, f i j = ∏ i, ∏ j ≥ i, f i.castSucc j * f j.succ i

The product of g i j over i j : Fin (n + 1), i ≠ j, is equal to the product of g i j * g j i over i < j.

The additive version of this lemma is useful for some proofs about differential forms. In this application, the function has the signature f : Fin (n + 1) → Fin n → M, where f i j means g i (Fin.succAbove i j) in the informal statements.

Similarly, the product of g i j * g j i over i < j is written as f (Fin.castSucc i) j * f (Fin.succ j) i over i j : Fin n, j ≥ i.

theorem Fin.sum_sum_eq_sum_triangle_add E2 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin (n + 1) → Fin n → M),
  ∑ i, ∑ j, f i j = ∑ i, ∑ j ≥ i, (f i.castSucc j + f j.succ i)

The sum of g i j over i j : Fin (n + 1), i ≠ j, is equal to the sum of g i j + g j i over i < j.

This lemma is useful for some proofs about differential forms. In this application, the function has the signature f : Fin (n + 1) → Fin n → M, where f i j means g i (Fin.succAbove i j) in the informal statements.

Similarly, the sum of g i j + g j i over i < j is written as f (Fin.castSucc i) j + f (Fin.succ j) i over i j : Fin n, j ≥ i.

theorem Fin.sum_pow_mul_eq_add_pow E1 #

∀ {n : ℕ} {R : Type u_3} [inst : CommSemiring R] (a b : R), ∑ s, a ^ s.card * b ^ (n - s.card) = (a + b) ^ n

theorem Fin.sum_neg_one_pow E1 #

∀ (R : Type u_3) [inst : Ring R] (m : ℕ), ∑ n, (-1) ^ ↑n = if Even m then 0 else 1

def Fin.partialProd E1 #

{M : Type u_2} → [Monoid M] → {n : ℕ} → (Fin n → M) → Fin (n + 1) → M

For f = (a₁, ..., aₙ) in αⁿ, partialProd f is (1, a₁, a₁a₂, ..., a₁...aₙ) in αⁿ⁺¹.

def Fin.partialSum E1 #

{M : Type u_2} → [AddMonoid M] → {n : ℕ} → (Fin n → M) → Fin (n + 1) → M

For f = (a₁, ..., aₙ) in αⁿ, partialSum f is (0, a₁, a₁ + a₂, ..., a₁ + ... + aₙ) in αⁿ⁺¹.

theorem Fin.partialSum_zero E0 #

∀ {M : Type u_2} [inst : AddMonoid M] {n : ℕ} (f : Fin n → M), Fin.partialSum f 0 = 0

theorem Fin.partialProd_zero E0 #

∀ {M : Type u_2} [inst : Monoid M] {n : ℕ} (f : Fin n → M), Fin.partialProd f 0 = 1

theorem Fin.partialProd_succ E1 #

∀ {M : Type u_2} [inst : Monoid M] {n : ℕ} (f : Fin n → M) (j : Fin n),
  Fin.partialProd f j.succ = Fin.partialProd f j.castSucc * f j

theorem Fin.partialSum_succ E1 #

∀ {M : Type u_2} [inst : AddMonoid M] {n : ℕ} (f : Fin n → M) (j : Fin n),
  Fin.partialSum f j.succ = Fin.partialSum f j.castSucc + f j

theorem Fin.partialProd_succ' E1 #

∀ {M : Type u_2} [inst : Monoid M] {n : ℕ} (f : Fin (n + 1) → M) (j : Fin (n + 1)),
  Fin.partialProd f j.succ = f 0 * Fin.partialProd (Fin.tail f) j

theorem Fin.partialSum_succ' E1 #

∀ {M : Type u_2} [inst : AddMonoid M] {n : ℕ} (f : Fin (n + 1) → M) (j : Fin (n + 1)),
  Fin.partialSum f j.succ = f 0 + Fin.partialSum (Fin.tail f) j

theorem Fin.partialProd_init E1 #

∀ {M : Type u_2} [inst : Monoid M] {n : ℕ} {f : Fin (n + 1) → M} (i : Fin (n + 1)),
  Fin.partialProd (Fin.init f) i = Fin.partialProd f i.castSucc

theorem Fin.partialSum_init E1 #

∀ {M : Type u_2} [inst : AddMonoid M] {n : ℕ} {f : Fin (n + 1) → M} (i : Fin (n + 1)),
  Fin.partialSum (Fin.init f) i = Fin.partialSum f i.castSucc

theorem Fin.partialSum_left_neg E1 #

∀ {n : ℕ} {G : Type u_3} [inst : AddGroup G] (f : Fin (n + 1) → G),
  (f 0 +ᵥ Fin.partialSum fun i ↦ -f i.castSucc + f i.succ) = f

theorem Fin.partialProd_left_inv E1 #

∀ {n : ℕ} {G : Type u_3} [inst : Group G] (f : Fin (n + 1) → G),
  (f 0 • Fin.partialProd fun i ↦ (f i.castSucc)⁻¹ * f i.succ) = f

theorem Fin.partialSum_right_neg E1 #

∀ {n : ℕ} {G : Type u_3} [inst : AddGroup G] (f : Fin n → G) (i : Fin n),
  -Fin.partialSum f i.castSucc + Fin.partialSum f i.succ = f i

theorem Fin.partialProd_right_inv E1 #

∀ {n : ℕ} {G : Type u_3} [inst : Group G] (f : Fin n → G) (i : Fin n),
  (Fin.partialProd f i.castSucc)⁻¹ * Fin.partialProd f i.succ = f i

theorem Fin.partialProd_contractNth E1 #

∀ {G : Type u_3} [inst : Monoid G] {n : ℕ} (g : Fin (n + 1) → G) (a : Fin (n + 1)),
  Fin.partialProd (a.contractNth (fun x1 x2 ↦ x1 * x2) g) = Fin.partialProd g ∘ a.succ.succAbove

theorem Fin.partialSum_contractNth E1 #

∀ {G : Type u_3} [inst : AddMonoid G] {n : ℕ} (g : Fin (n + 1) → G) (a : Fin (n + 1)),
  Fin.partialSum (a.contractNth (fun x1 x2 ↦ x1 + x2) g) = Fin.partialSum g ∘ a.succ.succAbove

theorem Fin.inv_partialProd_mul_eq_contractNth E1 #

∀ {n : ℕ} {G : Type u_3} [inst : Group G] (g : Fin (n + 1) → G) (j : Fin (n + 1)) (k : Fin n),
  (Fin.partialProd g (j.succ.succAbove k.castSucc))⁻¹ * Fin.partialProd g (j.succAbove k).succ =
    j.contractNth (fun x1 x2 ↦ x1 * x2) g k

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 Fin.neg_partialSum_add_eq_contractNth E1 #

∀ {n : ℕ} {G : Type u_3} [inst : AddGroup G] (g : Fin (n + 1) → G) (j : Fin (n + 1)) (k : Fin n),
  -Fin.partialSum g (j.succ.succAbove k.castSucc) + Fin.partialSum g (j.succAbove k).succ =
    j.contractNth (fun x1 x2 ↦ x1 + x2) g k

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.

def finFunctionFinEquiv E3 #

{m n : ℕ} → (Fin n → Fin m) ≃ Fin (m ^ n)

Equivalence between Fin n → Fin m and Fin (m ^ n).

theorem finFunctionFinEquiv_apply_val E0 #

∀ {m n : ℕ} (f : Fin n → Fin m), ↑(finFunctionFinEquiv f) = ∑ i, ↑(f i) * m ^ ↑i

theorem finFunctionFinEquiv_symm_apply_val E0 #

∀ {m n : ℕ} (a : Fin (m ^ n)) (b : Fin n), ↑(finFunctionFinEquiv.symm a b) = ↑a / m ^ ↑b % m

theorem finFunctionFinEquiv_apply E0 #

∀ {m n : ℕ} (f : Fin n → Fin m), ↑(finFunctionFinEquiv f) = ∑ i, ↑(f i) * m ^ ↑i

theorem finFunctionFinEquiv_single E1 #

∀ {m n : ℕ} [inst : NeZero m] (i : Fin n) (j : Fin m), ↑(finFunctionFinEquiv (Pi.single i j)) = ↑j * m ^ ↑i

def finPiFinEquiv E1 #

{m : ℕ} → {n : Fin m → ℕ} → ((i : Fin m) → Fin (n i)) ≃ Fin (∏ i, n i)

Equivalence between ∀ i : Fin m, Fin (n i) and Fin (∏ i : Fin m, n i).

theorem finPiFinEquiv_apply E0 #

∀ {m : ℕ} {n : Fin m → ℕ} (f : (i : Fin m) → Fin (n i)), ↑(finPiFinEquiv f) = ∑ i, ↑(f i) * ∏ j, n (Fin.castLE ⋯ j)

theorem finPiFinEquiv_single E1 #

∀ {m : ℕ} {n : Fin m → ℕ} [inst : ∀ (i : Fin m), NeZero (n i)] (i : Fin m) (j : Fin (n i)),
  ↑(finPiFinEquiv (Pi.single i j)) = ↑j * ∏ j, n (Fin.castLE ⋯ j)

def finSigmaFinEquiv E1 #

{m : ℕ} → {n : Fin m → ℕ} → (i : Fin m) × Fin (n i) ≃ Fin (∑ i, n i)

Equivalence between the Sigma type (i : Fin m) × Fin (n i) and Fin (∑ i : Fin m, n i).

theorem finSigmaFinEquiv_apply E0 #

∀ {m : ℕ} {n : Fin m → ℕ} (k : (i : Fin m) × Fin (n i)), ↑(finSigmaFinEquiv k) = ∑ i, n (Fin.castLE ⋯ i) + ↑k.snd

theorem finSigmaFinEquiv_one E1 #

∀ {n : Fin 1 → ℕ} (ij : (i : Fin 1) × Fin (n i)), ↑(finSigmaFinEquiv ij) = ↑ij.snd

finSigmaFinEquiv on Fin 1 × f is just f

theorem List.sum_take_ofFn E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} (f : Fin n → M) (i : ℕ),
  (List.take i (List.ofFn f)).sum = ∑ j with ↑j < i, f j

theorem List.prod_take_ofFn E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} (f : Fin n → M) (i : ℕ),
  (List.take i (List.ofFn f)).prod = ∏ j with ↑j < i, f j

theorem List.sum_ofFn E1 #

∀ {M : Type u_2} [inst : AddCommMonoid M] {n : ℕ} {f : Fin n → M}, (List.ofFn f).sum = ∑ i, f i

theorem List.prod_ofFn E1 #

∀ {M : Type u_2} [inst : CommMonoid M] {n : ℕ} {f : Fin n → M}, (List.ofFn f).prod = ∏ i, f i

theorem List.alternatingProd_eq_finsetProd E1 #

∀ {G : Type u_3} [inst : DivisionCommMonoid G] (L : List G), L.alternatingProd = ∏ i, L[i] ^ (-1) ^ ↑i

theorem List.alternatingSum_eq_finsetSum E1 #

∀ {G : Type u_3} [inst : SubtractionCommMonoid G] (L : List G), L.alternatingSum = ∑ i, (-1) ^ ↑i • L[i]

theorem Fin.sum_neg_one_pow_eq_zero E1 #

∀ {α : Type u_3} [inst : AddCommGroup α] {n : ℕ} (d : Fin (n + 2) → α) (r : Fin (n + 1) → α),
  d 0 = r 0 →
    (∀ (i : Fin n), d i.succ.castSucc = r i.castSucc + r i.succ) →
      d (Fin.last (n + 1)) = r (Fin.last n) → ∑ i, (-1) ^ ↑i • d i = 0

This is a classic "telescoping sum" lemma. It says: r₀ - (r₀ + r₁) + (r₁ + r₂) - (r₂+ r₃) + ⋯ ± (rₙ₋₁ + rₙ) ∓ rₙ = 0.

The chosen spelling, which gives definitional power over d, is influenced by downstream applications such as Module.sum_neg_one_pow_finrank_eq_zero_of_exact.