l3lab/ntp-mathlib huggingface dataset:
/-- Group conjugation, `MulAut.conj g h = g * h * g⁻¹`, as a monoid homomorphism
mapping multiplication in `G` into multiplication in the automorphism group `MulAut G`.
See also the type `ConjAct G` for any group `G`, which has a `MulAction (ConjAct G) G` instance
where `conj G` acts on `G` by conjugation. -/
def conj [Group G] : G →* MulAut G where
  toFun g :=
    { toFun := fun h => g * h * g⁻¹
      invFun := fun h => g⁻¹ * h * g
      left_inv := fun _ => by simp only [mul_assoc, inv_mul_cancel_left, mul_left_inv, mul_one]
      right_inv := fun _ => by 

Proof state:
A : Type u_1
M : Type u_2
G : Type u_3
inst✝¹ : Mul M
inst✝ : Group G
g x✝ : G
⊢ (fun h => g * h * g⁻¹) ((fun h => g⁻¹ * h * g) x✝) = x✝

Next tactic:
simp only [mul_assoc, mul_inv_cancel_left, mul_right_inv, mul_one]
/-- Group conjugation, `MulAut.conj g h = g * h * g⁻¹`, as a monoid homomorphism
mapping multiplication in `G` into multiplication in the automorphism group `MulAut G`.
See also the type `ConjAct G` for any group `G`, which has a `MulAction (ConjAct G) G` instance
where `conj G` acts on `G` by conjugation. -/
def conj [Group G] : G →* MulAut G where
  toFun g :=
    { toFun := fun h => g * h * g⁻¹
      invFun := fun h => g⁻¹ * h * g
      left_inv := fun _ => by simp only [mul_assoc, inv_mul_cancel_left, mul_left_inv, mul_one]
      right_inv := fun _ => by simp only [mul_assoc, mul_inv_cancel_left, mul_right_inv, mul_one]
      map_mul' := by 

Proof state:
A : Type u_1
M : Type u_2
G : Type u_3
inst✝¹ : Mul M
inst✝ : Group G
g : G
⊢ ∀ (x y : G),
    Equiv.toFun
        { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,
          left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),
          right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) }
        (x * y) =
      Equiv.toFun
          { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,
            left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),
            right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) }
          x *
        Equiv.toFun
          { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,
            left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),
            right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) }
          y

Next tactic:
simp only [mul_assoc, inv_mul_cancel_left, forall_const]
/-- Group conjugation, `MulAut.conj g h = g * h * g⁻¹`, as a monoid homomorphism
mapping multiplication in `G` into multiplication in the automorphism group `MulAut G`.
See also the type `ConjAct G` for any group `G`, which has a `MulAction (ConjAct G) G` instance
where `conj G` acts on `G` by conjugation. -/
def conj [Group G] : G →* MulAut G where
  toFun g :=
    { toFun := fun h => g * h * g⁻¹
      invFun := fun h => g⁻¹ * h * g
      left_inv := fun _ => by simp only [mul_assoc, inv_mul_cancel_left, mul_left_inv, mul_one]
      right_inv := fun _ => by simp only [mul_assoc, mul_inv_cancel_left, mul_right_inv, mul_one]
      map_mul' := by simp only [mul_assoc, inv_mul_cancel_left, forall_const] }
  map_mul' g₁ g₂ := by
    ext h
    show g₁ * g₂ * h * (g₁ * g₂)⁻¹ = g₁ * (g₂ * h * g₂⁻¹) * g₁⁻¹
    simp only [mul_assoc, mul_inv_rev]
  map_one' := by 

Proof state:
A : Type u_1
M : Type u_2
G : Type u_3
inst✝¹ : Mul M
inst✝ : Group G
⊢ (fun g =>
        {
          toEquiv :=
            { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,
              left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),
              right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },
          map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) })
      1 =
    1

Next tactic:
ext
/-- Group conjugation, `MulAut.conj g h = g * h * g⁻¹`, as a monoid homomorphism
mapping multiplication in `G` into multiplication in the automorphism group `MulAut G`.
See also the type `ConjAct G` for any group `G`, which has a `MulAction (ConjAct G) G` instance
where `conj G` acts on `G` by conjugation. -/
def conj [Group G] : G →* MulAut G where
  toFun g :=
    { toFun := fun h => g * h * g⁻¹
      invFun := fun h => g⁻¹ * h * g
      left_inv := fun _ => by simp only [mul_assoc, inv_mul_cancel_left, mul_left_inv, mul_one]
      right_inv := fun _ => by simp only [mul_assoc, mul_inv_cancel_left, mul_right_inv, mul_one]
      map_mul' := by simp only [mul_assoc, inv_mul_cancel_left, forall_const] }
  map_mul' g₁ g₂ := by
    ext h
    show g₁ * g₂ * h * (g₁ * g₂)⁻¹ = g₁ * (g₂ * h * g₂⁻¹) * g₁⁻¹
    simp only [mul_assoc, mul_inv_rev]
  map_one' := by ext; 

Proof state:
case h
A : Type u_1
M : Type u_2
G : Type u_3
inst✝¹ : Mul M
inst✝ : Group G
x✝ : G
⊢ ((fun g =>
          {
            toEquiv :=
              { toFun := fun h => g * h * g⁻¹, invFun := fun h => g⁻¹ * h * g,
                left_inv := (_ : ∀ (x : G), g⁻¹ * (g * x * g⁻¹) * g = x),
                right_inv := (_ : ∀ (x : G), g * (g⁻¹ * x * g) * g⁻¹ = x) },
            map_mul' := (_ : ∀ (a a_1 : G), g * (a * a_1) * g⁻¹ = g * a * g⁻¹ * (g * a_1 * g⁻¹)) })
        1)
      x✝ =
    1 x✝

Next tactic:
simp only [one_mul, inv_one, mul_one, one_apply]
/-- Group conjugation, `MulAut.conj g h = g * h * g⁻¹`, as a monoid homomorphism
mapping multiplication in `G` into multiplication in the automorphism group `MulAut G`.
See also the type `ConjAct G` for any group `G`, which has a `MulAction (ConjAct G) G` instance
where `conj G` acts on `G` by conjugation. -/
def conj [Group G] : G →* MulAut G where
  toFun g :=
    { toFun := fun h => g * h * g⁻¹
      invFun := fun h => g⁻¹ * h * g
      left_inv := fun _ => by simp only [mul_assoc, inv_mul_cancel_left, mul_left_inv, mul_one]
      right_inv := fun _ => by simp only [mul_assoc, mul_inv_cancel_left, mul_right_inv, mul_one]
      map_mul' := by simp only [mul_assoc, inv_mul_cancel_left, forall_const] }
  map_mul' g₁ g₂ := by
    ext h
    show g₁ * g₂ * h * (g₁ * g₂)⁻¹ = g₁ * (g₂ * h * g₂⁻¹) * g₁⁻¹
    simp only [mul_assoc, mul_inv_rev]
  map_one' := by ext; simp only [one_mul, inv_one, mul_one, one_apply]; 

Proof state:
case h
A : Type u_1
M : Type u_2
G : Type u_3
inst✝¹ : Mul M
inst✝ : Group G
x✝ : G
⊢ {
        toEquiv :=
          { toFun := fun h => h, invFun := fun h => h, left_inv := (_ : Function.LeftInverse (fun h => h) fun h => h),
            right_inv := (_ : Function.RightInverse (fun h => h) fun h => h) },
        map_mul' :=
          (_ :
            ∀ (x y : G),
              Equiv.toFun
                  { toFun := fun h => h, invFun := fun h => h,
                    left_inv := (_ : Function.LeftInverse (fun h => h) fun h => h),
                    right_inv := (_ : Function.RightInverse (fun h => h) fun h => h) }
                  (x * y) =
                Equiv.toFun
                    { toFun := fun h => h, invFun := fun h => h,
                      left_inv := (_ : Function.LeftInverse (fun h => h) fun h => h),
                      right_inv := (_ : Function.RightInverse (fun h => h) fun h => h) }
                    x *
                  Equiv.toFun
                    { toFun := fun h => h, invFun := fun h => h,
                      left_inv := (_ : Function.LeftInverse (fun h => h) fun h => h),
                      right_inv := (_ : Function.RightInverse (fun h => h) fun h => h) }
                    y) }
      x✝ =
    x✝

Next tactic:
rfl
/-- Group conjugation, `MulAut.conj g h = g * h * g⁻¹`, as a monoid homomorphism
mapping multiplication in `G` into multiplication in the automorphism group `MulAut G`.
See also the type `ConjAct G` for any group `G`, which has a `MulAction (ConjAct G) G` instance
where `conj G` acts on `G` by conjugation. -/
def conj [Group G] : G →* MulAut G where
  toFun g :=
    { toFun := fun h => g * h * g⁻¹
      invFun := fun h => g⁻¹ * h * g
      left_inv := fun _ => by simp only [mul_assoc, inv_mul_cancel_left, mul_left_inv, mul_one]
      right_inv := fun _ => by simp only [mul_assoc, mul_inv_cancel_left, mul_right_inv, mul_one]
      map_mul' := by simp only [mul_assoc, inv_mul_cancel_left, forall_const] }
  map_mul' g₁ g₂ := by
    ext h
    show g₁ * g₂ * h * (g₁ * g₂)⁻¹ = g₁ * (g₂ * h * g₂⁻¹) * g₁⁻¹
    

Proof state:
case h
A : Type u_1
M : Type u_2
G : Type u_3
inst✝¹ : Mul M
inst✝ : Group G
g₁ g₂ h : G
⊢ g₁ * g₂ * h * (g₁ * g₂)⁻¹ = g₁ * (g₂ * h * g₂⁻¹) * g₁⁻¹

Next tactic:
simp only [mul_assoc, mul_inv_rev]
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  

Proof state:
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
⊢ Group (AddAut A)

Next tactic:
refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. }
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  

Proof state:
case refine'_1
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
⊢ ∀ (a b c : AddAut A), a * b * c = a * (b * c)

Next tactic:
intros
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  

Proof state:
case refine'_2
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
⊢ ∀ (a : AddAut A), 1 * a = a

Next tactic:
intros
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  

Proof state:
case refine'_3
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
⊢ ∀ (a : AddAut A), a * 1 = a

Next tactic:
intros
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  

Proof state:
case refine'_4
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
⊢ ∀ (x : AddAut A), npowRec 0 x = 1

Next tactic:
intros
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  

Proof state:
case refine'_5
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
⊢ ∀ (n : ℕ) (x : AddAut A), npowRec (n + 1) x = x * npowRec n x

Next tactic:
intros
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  

Proof state:
case refine'_6
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
⊢ ∀ (a b : AddAut A), a / b = a * b⁻¹

Next tactic:
intros
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  

Proof state:
case refine'_7
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
⊢ ∀ (a : AddAut A), zpowRec 0 a = 1

Next tactic:
intros
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  

Proof state:
case refine'_8
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
⊢ ∀ (n : ℕ) (a : AddAut A), zpowRec (Int.ofNat (Nat.succ n)) a = a * zpowRec (Int.ofNat n) a

Next tactic:
intros
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  

Proof state:
case refine'_9
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
⊢ ∀ (n : ℕ) (a : AddAut A), zpowRec (Int.negSucc n) a = (zpowRec (↑(Nat.succ n)) a)⁻¹

Next tactic:
intros
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  

Proof state:
case refine'_10
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
⊢ ∀ (a : AddAut A), a⁻¹ * a = 1

Next tactic:
intros
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  intros <;>
  

Proof state:
case refine'_1
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
a✝ b✝ c✝ : AddAut A
⊢ a✝ * b✝ * c✝ = a✝ * (b✝ * c✝)

Next tactic:
ext
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  intros <;>
  

Proof state:
case refine'_2
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
a✝ : AddAut A
⊢ 1 * a✝ = a✝

Next tactic:
ext
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  intros <;>
  

Proof state:
case refine'_3
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
a✝ : AddAut A
⊢ a✝ * 1 = a✝

Next tactic:
ext
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  intros <;>
  

Proof state:
case refine'_4
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
x✝ : AddAut A
⊢ npowRec 0 x✝ = 1

Next tactic:
ext
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  intros <;>
  

Proof state:
case refine'_5
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
n✝ : ℕ
x✝ : AddAut A
⊢ npowRec (n✝ + 1) x✝ = x✝ * npowRec n✝ x✝

Next tactic:
ext
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  intros <;>
  

Proof state:
case refine'_6
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
a✝ b✝ : AddAut A
⊢ a✝ / b✝ = a✝ * b✝⁻¹

Next tactic:
ext
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  intros <;>
  

Proof state:
case refine'_7
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
a✝ : AddAut A
⊢ zpowRec 0 a✝ = 1

Next tactic:
ext
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  intros <;>
  

Proof state:
case refine'_8
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
n✝ : ℕ
a✝ : AddAut A
⊢ zpowRec (Int.ofNat (Nat.succ n✝)) a✝ = a✝ * zpowRec (Int.ofNat n✝) a✝

Next tactic:
ext
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  intros <;>
  

Proof state:
case refine'_9
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
n✝ : ℕ
a✝ : AddAut A
⊢ zpowRec (Int.negSucc n✝) a✝ = (zpowRec (↑(Nat.succ n✝)) a✝)⁻¹

Next tactic:
ext
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  intros <;>
  

Proof state:
case refine'_10
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
a✝ : AddAut A
⊢ a✝⁻¹ * a✝ = 1

Next tactic:
ext
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  intros <;>
  ext <;>
  

Proof state:
case refine'_1.h
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
a✝ b✝ c✝ : AddAut A
x✝ : A
⊢ (a✝ * b✝ * c✝) x✝ = (a✝ * (b✝ * c✝)) x✝

Next tactic:
try rfl
/-- The group operation on additive automorphisms is defined by `g h => AddEquiv.trans h g`.
This means that multiplication agrees with composition, `(g*h)(x) = g (h x)`.
-/
instance group : Group (AddAut A) := by
  refine'
  { mul := fun g h => AddEquiv.trans h g
    one := AddEquiv.refl A
    inv := AddEquiv.symm
    div := fun g h => AddEquiv.trans h.symm g
    npow := @npowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩
    zpow := @zpowRec _ ⟨AddEquiv.refl A⟩ ⟨fun g h => AddEquiv.trans h g⟩ ⟨AddEquiv.symm⟩
    .. } <;>
  intros <;>
  ext <;>
  try 

Proof state:
case refine'_1.h
A : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Add A
a✝ b✝ c✝ : AddAut A
x✝ : A
⊢ (a✝ * b✝ * c✝) x✝ = (a✝ * (b✝ * c✝)) x✝

Next tactic:
rfl