Theorem: IsPrimitiveRoot.zmodEquivZpowers_apply_coe_int
File: Mathlib/RingTheory/RootsOfUnity/Basic.lean

tactic: rw [zmodEquivZpowers, AddEquiv.ofBijective_apply]
state_before: M : Type ?u.2827809
N : Type ?u.2827812
G : Type ?u.2827815
R : Type u_1
S : Type ?u.2827821
F : Type ?u.2827824
inst✝³ : CommMonoid M
inst✝² : CommMonoid N
inst✝¹ : DivisionCommMonoid G
k l : ℕ
inst✝ : CommRing R
ζ : Rˣ
h : IsPrimitiveRoot ζ k
i : ℤ
⊢ ↑(zmodEquivZpowers h) ↑i = ↑Additive.ofMul { val := ζ ^ i, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = ζ ^ i) }

tactic: exact AddMonoidHom.liftOfRightInverse_comp_apply _ _ ZMod.int_cast_rightInverse _ _
state_before: M : Type ?u.2827809
N : Type ?u.2827812
G : Type ?u.2827815
R : Type u_1
S : Type ?u.2827821
F : Type ?u.2827824
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_1 => x ^ x_1) ζ i,
                          property := (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) },
                    map_zero' :=
                      (_ :
                        (fun i =>
                              ↑Additive.ofMul
                                { val := (fun x x_1 => x ^ x_1) ζ i,
                                  property := (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) })
                            0 =
                          0) },
                map_add' :=
                  (_ :
                    ∀ (i j : ℤ),
                      ZeroHom.toFun
                          {
                            toFun := fun i =>
                              ↑Additive.ofMul
                                { val := (fun x x_1 => x ^ x_1) ζ i,
                                  property := (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) },
                            map_zero' :=
                              (_ :
                                (fun i =>
                                      ↑Additive.ofMul
                                        { val := (fun x x_1 => x ^ x_1) ζ i,
                                          property :=
                                            (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) })
                                    0 =
                                  0) }
                          (i + j) =
                        ZeroHom.toFun
                            {
                              toFun := fun i =>
                                ↑Additive.ofMul
                                  { val := (fun x x_1 => x ^ x_1) ζ i,
                                    property := (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) },
                              map_zero' :=
                                (_ :
                                  (fun i =>
                                        ↑Additive.ofMul
                                          { val := (fun x x_1 => x ^ x_1) ζ i,
                                            property :=
                                              (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) })
                                      0 =
                                    0) }
                            i +
                          ZeroHom.toFun
                            {
                              toFun := fun i =>
                                ↑Additive.ofMul
                                  { val := (fun x x_1 => x ^ x_1) ζ i,
                                    property := (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) },
                              map_zero' :=
                                (_ :
                                  (fun i =>
                                        ↑Additive.ofMul
                                          { val := (fun x x_1 => x ^ x_1) ζ i,
                                            property :=
                                              (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) })
                                      0 =
                                    0) }
                            j) },
            property :=
              (_ :
                ∀ (i : ℤ),
                  i ∈ AddMonoidHom.ker (Int.castAddHom (ZMod k)) →
                    i ∈
                      AddMonoidHom.ker
                        {
                          toZeroHom :=
                            {
                              toFun := fun i =>
                                ↑Additive.ofMul
                                  { val := (fun x x_1 => x ^ x_1) ζ i,
                                    property := (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) },
                              map_zero' :=
                                (_ :
                                  (fun i =>
                                        ↑Additive.ofMul
                                          { val := (fun x x_1 => x ^ x_1) ζ i,
                                            property :=
                                              (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) })
                                      0 =
                                    0) },
                          map_add' :=
                            (_ :
                              ∀ (i j : ℤ),
                                ZeroHom.toFun
                                    {
                                      toFun := fun i =>
                                        ↑Additive.ofMul
                                          { val := (fun x x_1 => x ^ x_1) ζ i,
                                            property :=
                                              (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) },
                                      map_zero' :=
                                        (_ :
                                          (fun i =>
                                                ↑Additive.ofMul
                                                  { val := (fun x x_1 => x ^ x_1) ζ i,
                                                    property :=
                                                      (_ :
                                                        ∃ y, (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) })
                                              0 =
                                            0) }
                                    (i + j) =
                                  ZeroHom.toFun
                                      {
                                        toFun := fun i =>
                                          ↑Additive.ofMul
                                            { val := (fun x x_1 => x ^ x_1) ζ i,
                                              property :=
                                                (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) },
                                        map_zero' :=
                                          (_ :
                                            (fun i =>
                                                  ↑Additive.ofMul
                                                    { val := (fun x x_1 => x ^ x_1) ζ i,
                                                      property :=
                                                        (_ :
                                                          ∃ y,
                                                            (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) })
                                                0 =
                                              0) }
                                      i +
                                    ZeroHom.toFun
                                      {
                                        toFun := fun i =>
                                          ↑Additive.ofMul
                                            { val := (fun x x_1 => x ^ x_1) ζ i,
                                              property :=
                                                (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) },
                                        map_zero' :=
                                          (_ :
                                            (fun i =>
                                                  ↑Additive.ofMul
                                                    { val := (fun x x_1 => x ^ x_1) ζ i,
                                                      property :=
                                                        (_ :
                                                          ∃ y,
                                                            (fun x x_1 => x ^ x_1) ζ y = (fun x x_1 => x ^ x_1) ζ i) })
                                                0 =
                                              0) }
                                      j) }) })
      ↑i =
    ↑Additive.ofMul { val := ζ ^ i, property := (_ : ∃ y, (fun x x_1 => x ^ x_1) ζ y = ζ ^ i) }