/-- 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; 

Proof state:
case a.h
k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
hA : Rep.IsTrivial A
f : ↥(oneCocycles A)
x✝ : G
⊢ ↑((fun f => { val := ⇑f, property := (_ : ⇑f ∘ ⇑Additive.ofMul ∈ oneCocycles 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
            f))
      x✝ =
    ↑f x✝

Next tactic:
rfl