Theorem: inhomogeneousCochains.d_apply
File: Mathlib/RepresentationTheory/GroupCohomology/Basic.lean

Proof steps:
state_before: k G : Type u
inst✝¹ : CommRing k
n✝ : ℕ
inst✝ : Monoid G
n : ℕ
A : Rep k G
f g : (Fin n → G) → CoeSort.coe A
⊢ (fun f g =>
        (A.ρ (g 0)) (f fun i => g i.succ) +
          ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g))
      (f + g) =
    (fun f g =>
          (A.ρ (g 0)) (f fun i => g i.succ) +
            ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g))
        f +
      (fun f g =>
          (A.ρ (g 0)) (f fun i => g i.succ) +
            ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g))
        g
state_after: case h
k G : Type u
inst✝¹ : CommRing k
n✝ : ℕ
inst✝ : Monoid G
n : ℕ
A : Rep k G
f g : (Fin n → G) → CoeSort.coe A
x : Fin (n + 1) → G
⊢ (fun f g =>
        (A.ρ (g 0)) (f fun i => g i.succ) +
          ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g))
      (f + g) x =
    ((fun f g =>
            (A.ρ (g 0)) (f fun i => g i.succ) +
              ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g))
          f +
        (fun f g =>
            (A.ρ (g 0)) (f fun i => g i.succ) +
              ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g))
          g)
      x
tactic: ext x
state_before: case h
k G : Type u
inst✝¹ : CommRing k
n✝ : ℕ
inst✝ : Monoid G
n : ℕ
A : Rep k G
f g : (Fin n → G) → CoeSort.coe A
x : Fin (n + 1) → G
⊢ (fun f g =>
        (A.ρ (g 0)) (f fun i => g i.succ) +
          ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g))
      (f + g) x =
    ((fun f g =>
            (A.ρ (g 0)) (f fun i => g i.succ) +
              ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g))
          f +
        (fun f g =>
            (A.ρ (g 0)) (f fun i => g i.succ) +
              ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g))
          g)
      x
state_after: no goals
tactic: simp_rw [Pi.add_apply, map_add, smul_add, Finset.sum_add_distrib, add_add_add_comm]
state_before: k G : Type u
inst✝¹ : CommRing k
n✝ : ℕ
inst✝ : Monoid G
n : ℕ
A : Rep k G
r : k
f : (Fin n → G) → CoeSort.coe A
⊢ {
          toFun := fun f g =>
            (A.ρ (g 0)) (f fun i => g i.succ) +
              ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g),
          map_add' := ⋯ }.toFun
      (r • f) =
    (RingHom.id k) r •
      {
            toFun := fun f g =>
              (A.ρ (g 0)) (f fun i => g i.succ) +
                ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g),
            map_add' := ⋯ }.toFun
        f
state_after: case h
k G : Type u
inst✝¹ : CommRing k
n✝ : ℕ
inst✝ : Monoid G
n : ℕ
A : Rep k G
r : k
f : (Fin n → G) → CoeSort.coe A
x : Fin (n + 1) → G
⊢ {
          toFun := fun f g =>
            (A.ρ (g 0)) (f fun i => g i.succ) +
              ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g),
          map_add' := ⋯ }.toFun
      (r • f) x =
    ((RingHom.id k) r •
        {
              toFun := fun f g =>
                (A.ρ (g 0)) (f fun i => g i.succ) +
                  ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g),
              map_add' := ⋯ }.toFun
          f)
      x
tactic: ext x
state_before: case h
k G : Type u
inst✝¹ : CommRing k
n✝ : ℕ
inst✝ : Monoid G
n : ℕ
A : Rep k G
r : k
f : (Fin n → G) → CoeSort.coe A
x : Fin (n + 1) → G
⊢ {
          toFun := fun f g =>
            (A.ρ (g 0)) (f fun i => g i.succ) +
              ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g),
          map_add' := ⋯ }.toFun
      (r • f) x =
    ((RingHom.id k) r •
        {
              toFun := fun f g =>
                (A.ρ (g 0)) (f fun i => g i.succ) +
                  ∑ j : Fin (n + 1), (-1) ^ (↑j + 1) • f (j.contractNth (fun x x_1 => x * x_1) g),
              map_add' := ⋯ }.toFun
          f)
      x
state_after: no goals
tactic: simp_rw [Pi.smul_apply, RingHom.id_apply, map_smul, smul_add, Finset.smul_sum, ← smul_assoc,
      smul_eq_mul, mul_comm r]