@[simp]
theorem zmodEquivZPowers_apply_coe_int (i : ℤ) :
    h.zmodEquivZPowers i = Additive.ofMul (⟨ζ ^ i, i, rfl⟩ : Subgroup.zpowers ζ) := by
  rw [zmodEquivZPowers, AddEquiv.ofBijective_apply] -- Porting note: Original proof didn't have `rw`
  

Proof state:
M : Type u_1
N : Type u_2
G : Type u_3
R : Type u_4
S : Type u_5
F : Type u_6
inst✝³ : CommMonoid M
inst✝² : CommMonoid N
inst✝¹ : DivisionCommMonoid G
k l : ℕ
inst✝ : CommRing R
ζ : Rˣ
h : IsPrimitiveRoot ζ k
i : ℤ
⊢ ((AddMonoidHom.liftOfRightInverse (Int.castAddHom (ZMod k)) ZMod.cast (_ : Function.RightInverse ZMod.cast Int.cast))
        {
          val :=
            {
              toZeroHom :=
                {
                  toFun := fun i =>
                    Additive.ofMul
                      { val := (fun x => ζ ^ x) i, property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) },
                  map_zero' :=
                    (_ :
                      (fun i =>
                            Additive.ofMul
                              { val := (fun x => ζ ^ x) i,
                                property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) })
                          0 =
                        0) },
              map_add' :=
                (_ :
                  ∀ (i j : ℤ),
                    ZeroHom.toFun
                        {
                          toFun := fun i =>
                            Additive.ofMul
                              { val := (fun x => ζ ^ x) i,
                                property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) },
                          map_zero' :=
                            (_ :
                              (fun i =>
                                    Additive.ofMul
                                      { val := (fun x => ζ ^ x) i,
                                        property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) })
                                  0 =
                                0) }
                        (i + j) =
                      ZeroHom.toFun
                          {
                            toFun := fun i =>
                              Additive.ofMul
                                { val := (fun x => ζ ^ x) i,
                                  property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) },
                            map_zero' :=
                              (_ :
                                (fun i =>
                                      Additive.ofMul
                                        { val := (fun x => ζ ^ x) i,
                                          property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) })
                                    0 =
                                  0) }
                          i +
                        ZeroHom.toFun
                          {
                            toFun := fun i =>
                              Additive.ofMul
                                { val := (fun x => ζ ^ x) i,
                                  property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) },
                            map_zero' :=
                              (_ :
                                (fun i =>
                                      Additive.ofMul
                                        { val := (fun x => ζ ^ x) i,
                                          property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) })
                                    0 =
                                  0) }
                          j) },
          property :=
            (_ :
              ∀ i ∈ AddMonoidHom.ker (Int.castAddHom (ZMod k)),
                i ∈
                  AddMonoidHom.ker
                    {
                      toZeroHom :=
                        {
                          toFun := fun i =>
                            Additive.ofMul
                              { val := (fun x => ζ ^ x) i,
                                property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) },
                          map_zero' :=
                            (_ :
                              (fun i =>
                                    Additive.ofMul
                                      { val := (fun x => ζ ^ x) i,
                                        property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) })
                                  0 =
                                0) },
                      map_add' :=
                        (_ :
                          ∀ (i j : ℤ),
                            ZeroHom.toFun
                                {
                                  toFun := fun i =>
                                    Additive.ofMul
                                      { val := (fun x => ζ ^ x) i,
                                        property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) },
                                  map_zero' :=
                                    (_ :
                                      (fun i =>
                                            Additive.ofMul
                                              { val := (fun x => ζ ^ x) i,
                                                property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) })
                                          0 =
                                        0) }
                                (i + j) =
                              ZeroHom.toFun
                                  {
                                    toFun := fun i =>
                                      Additive.ofMul
                                        { val := (fun x => ζ ^ x) i,
                                          property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) },
                                    map_zero' :=
                                      (_ :
                                        (fun i =>
                                              Additive.ofMul
                                                { val := (fun x => ζ ^ x) i,
                                                  property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) })
                                            0 =
                                          0) }
                                  i +
                                ZeroHom.toFun
                                  {
                                    toFun := fun i =>
                                      Additive.ofMul
                                        { val := (fun x => ζ ^ x) i,
                                          property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) },
                                    map_zero' :=
                                      (_ :
                                        (fun i =>
                                              Additive.ofMul
                                                { val := (fun x => ζ ^ x) i,
                                                  property := (_ : ∃ y, (fun x => ζ ^ x) y = (fun x => ζ ^ x) i) })
                                            0 =
                                          0) }
                                  j) }) })
      ↑i =
    Additive.ofMul { val := ζ ^ i, property := (_ : ∃ y, (fun x => ζ ^ x) y = ζ ^ i) }

Next tactic:
exact AddMonoidHom.liftOfRightInverse_comp_apply _ _ ZMod.int_cast_rightInverse _ _