/-- When `A : Rep k G` is a trivial representation of `G`, `Z¹(G, A)` is isomorphic to the
group homs `G → A`. -/
@[simps] def oneCocyclesLequivOfIsTrivial [hA : A.IsTrivial] :
    oneCocycles A ≃ₗ[k] Additive G →+ A where
  toFun f :=
    { toFun := f.1 ∘ Additive.toMul
      map_zero' := oneCocycles_map_one f
      map_add' := oneCocycles_map_mul_of_isTrivial f }
  map_add' x y := rfl
  map_smul' r x := rfl
  invFun f :=
    { val := f
      property := mem_oneCocycles_of_addMonoidHom f }
  left_inv f := by ext; rfl
  right_inv f := by 

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
hA : Rep.IsTrivial A
f : Additive G →+ CoeSort.coe A
⊢ AddHom.toFun
      {
          toAddHom :=
            {
              toFun := fun f =>
                { toZeroHom := { toFun := ↑f ∘ ⇑Additive.toMul, map_zero' := (_ : ↑f 1 = 0) },
                  map_add' := (_ : ∀ (g h : G), ↑f (g * h) = ↑f g + ↑f h) },
              map_add' :=
                (_ :
                  ∀ (x y : ↥(oneCocycles A)),
                    (fun f =>
                          { toZeroHom := { toFun := ↑f ∘ ⇑Additive.toMul, map_zero' := (_ : ↑f 1 = 0) },
                            map_add' := (_ : ∀ (g h : G), ↑f (g * h) = ↑f g + ↑f h) })
                        (x + y) =
                      (fun f =>
                          { toZeroHom := { toFun := ↑f ∘ ⇑Additive.toMul, map_zero' := (_ : ↑f 1 = 0) },
                            map_add' := (_ : ∀ (g h : G), ↑f (g * h) = ↑f g + ↑f h) })
                        (x + y)) },
          map_smul' :=
            (_ :
              ∀ (r : k) (x : ↥(oneCocycles A)),
                AddHom.toFun
                    {
                      toFun := fun f =>
                        { toZeroHom := { toFun := ↑f ∘ ⇑Additive.toMul, map_zero' := (_ : ↑f 1 = 0) },
                          map_add' := (_ : ∀ (g h : G), ↑f (g * h) = ↑f g + ↑f h) },
                      map_add' :=
                        (_ :
                          ∀ (x y : ↥(oneCocycles A)),
                            (fun f =>
                                  { toZeroHom := { toFun := ↑f ∘ ⇑Additive.toMul, map_zero' := (_ : ↑f 1 = 0) },
                                    map_add' := (_ : ∀ (g h : G), ↑f (g * h) = ↑f g + ↑f h) })
                                (x + y) =
                              (fun f =>
                                  { toZeroHom := { toFun := ↑f ∘ ⇑Additive.toMul, map_zero' := (_ : ↑f 1 = 0) },
                                    map_add' := (_ : ∀ (g h : G), ↑f (g * h) = ↑f g + ↑f h) })
                                (x + y)) }
                    (r • x) =
                  AddHom.toFun
                    {
                      toFun := fun f =>
                        { toZeroHom := { toFun := ↑f ∘ ⇑Additive.toMul, map_zero' := (_ : ↑f 1 = 0) },
                          map_add' := (_ : ∀ (g h : G), ↑f (g * h) = ↑f g + ↑f h) },
                      map_add' :=
                        (_ :
                          ∀ (x y : ↥(oneCocycles A)),
                            (fun f =>
                                  { toZeroHom := { toFun := ↑f ∘ ⇑Additive.toMul, map_zero' := (_ : ↑f 1 = 0) },
                                    map_add' := (_ : ∀ (g h : G), ↑f (g * h) = ↑f g + ↑f h) })
                                (x + y) =
                              (fun f =>
                                  { toZeroHom := { toFun := ↑f ∘ ⇑Additive.toMul, map_zero' := (_ : ↑f 1 = 0) },
                                    map_add' := (_ : ∀ (g h : G), ↑f (g * h) = ↑f g + ↑f h) })
                                (x + y)) }
                    (r • x)) }.toAddHom
      ((fun f => { val := ⇑f, property := (_ : ⇑f ∘ ⇑Additive.ofMul ∈ oneCocycles A) }) f) =
    f

Next tactic:
ext