l3lab/ntp-mathlib huggingface dataset:
theorem symm_toRingHom_comp_toRingHom (e : R ≃+* S) :
    e.symm.toRingHom.comp e.toRingHom = RingHom.id _ := by
  

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
S : Type u_5
S' : Type u_6
inst✝² : NonAssocSemiring R
inst✝¹ : NonAssocSemiring S
inst✝ : NonAssocSemiring S'
e : R ≃+* S
⊢ RingHom.comp (toRingHom (RingEquiv.symm e)) (toRingHom e) = RingHom.id R

Next tactic:
ext
theorem symm_toRingHom_comp_toRingHom (e : R ≃+* S) :
    e.symm.toRingHom.comp e.toRingHom = RingHom.id _ := by
  ext
  

Proof state:
case a
F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
S : Type u_5
S' : Type u_6
inst✝² : NonAssocSemiring R
inst✝¹ : NonAssocSemiring S
inst✝ : NonAssocSemiring S'
e : R ≃+* S
x✝ : R
⊢ (RingHom.comp (toRingHom (RingEquiv.symm e)) (toRingHom e)) x✝ = (RingHom.id R) x✝

Next tactic:
simp
protected theorem isField {A : Type*} (B : Type*) [Semiring A] [Semiring B] (hB : IsField B)
    (e : A ≃* B) : IsField A where
  exists_pair_ne := have ⟨x, y, h⟩ := hB.exists_pair_ne; ⟨e.symm x, e.symm y, e.symm.injective.ne h⟩
  mul_comm := fun x y => e.injective <| by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
S : Type u_5
S' : Type u_6
A : Type u_7
B : Type u_8
inst✝¹ : Semiring A
inst✝ : Semiring B
hB : IsField B
e : A ≃* B
x y : A
⊢ e (x * y) = e (y * x)

Next tactic:
rw [map_mul, map_mul, hB.mul_comm]
protected theorem isField {A : Type*} (B : Type*) [Semiring A] [Semiring B] (hB : IsField B)
    (e : A ≃* B) : IsField A where
  exists_pair_ne := have ⟨x, y, h⟩ := hB.exists_pair_ne; ⟨e.symm x, e.symm y, e.symm.injective.ne h⟩
  mul_comm := fun x y => e.injective <| by rw [map_mul, map_mul, hB.mul_comm]
  mul_inv_cancel := fun h => by
    

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
S : Type u_5
S' : Type u_6
A : Type u_7
B : Type u_8
inst✝¹ : Semiring A
inst✝ : Semiring B
hB : IsField B
e : A ≃* B
a✝ : A
h : a✝ ≠ 0
⊢ ∃ b, a✝ * b = 1

Next tactic:
obtain ⟨a', he⟩ := hB.mul_inv_cancel ((e.injective.ne h).trans_eq <| map_zero e)
protected theorem isField {A : Type*} (B : Type*) [Semiring A] [Semiring B] (hB : IsField B)
    (e : A ≃* B) : IsField A where
  exists_pair_ne := have ⟨x, y, h⟩ := hB.exists_pair_ne; ⟨e.symm x, e.symm y, e.symm.injective.ne h⟩
  mul_comm := fun x y => e.injective <| by rw [map_mul, map_mul, hB.mul_comm]
  mul_inv_cancel := fun h => by
    obtain ⟨a', he⟩ := hB.mul_inv_cancel ((e.injective.ne h).trans_eq <| map_zero e)
    

Proof state:
case intro
F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
S : Type u_5
S' : Type u_6
A : Type u_7
B : Type u_8
inst✝¹ : Semiring A
inst✝ : Semiring B
hB : IsField B
e : A ≃* B
a✝ : A
h : a✝ ≠ 0
a' : B
he : e a✝ * a' = 1
⊢ ∃ b, a✝ * b = 1

Next tactic:
exact ⟨e.symm a', e.injective <| by rw [map_mul, map_one, e.apply_symm_apply, he]⟩
protected theorem isField {A : Type*} (B : Type*) [Semiring A] [Semiring B] (hB : IsField B)
    (e : A ≃* B) : IsField A where
  exists_pair_ne := have ⟨x, y, h⟩ := hB.exists_pair_ne; ⟨e.symm x, e.symm y, e.symm.injective.ne h⟩
  mul_comm := fun x y => e.injective <| by rw [map_mul, map_mul, hB.mul_comm]
  mul_inv_cancel := fun h => by
    obtain ⟨a', he⟩ := hB.mul_inv_cancel ((e.injective.ne h).trans_eq <| map_zero e)
    exact ⟨e.symm a', e.injective <| by 

Proof state:
F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
S : Type u_5
S' : Type u_6
A : Type u_7
B : Type u_8
inst✝¹ : Semiring A
inst✝ : Semiring B
hB : IsField B
e : A ≃* B
a✝ : A
h : a✝ ≠ 0
a' : B
he : e a✝ * a' = 1
⊢ e (a✝ * (symm e) a') = e 1

Next tactic:
rw [map_mul, map_one, e.apply_symm_apply, he]
theorem birkhoffSum_add (f : α → α) (g : α → M) (m n : ℕ) (x : α) :
    birkhoffSum f g (m + n) x = birkhoffSum f g m x + birkhoffSum f g n (f^[m] x) := by
  

Proof state:
α : Type u_1
M : Type u_2
inst✝ : AddCommMonoid M
f : α → α
g : α → M
m n : ℕ
x : α
⊢ birkhoffSum f g (m + n) x = birkhoffSum f g m x + birkhoffSum f g n (f^[m] x)

Next tactic:
simp_rw [birkhoffSum, sum_range_add, add_comm m, iterate_add_apply]
theorem Function.IsFixedPt.birkhoffSum_eq {f : α → α} {x : α} (h : IsFixedPt f x) (g : α → M)
    (n : ℕ) : birkhoffSum f g n x = n • g x := by
  

Proof state:
α : Type u_1
M : Type u_2
inst✝ : AddCommMonoid M
f : α → α
x : α
h : IsFixedPt f x
g : α → M
n : ℕ
⊢ birkhoffSum f g n x = n • g x

Next tactic:
simp [birkhoffSum, (h.iterate _).eq]
/-- Birkhoff sum is "almost invariant" under `f`:
the difference between `birkhoffSum f g n (f x)` and `birkhoffSum f g n x`
is equal to `g (f^[n] x) - g x`. -/
theorem birkhoffSum_apply_sub_birkhoffSum (f : α → α) (g : α → G) (n : ℕ) (x : α) :
    birkhoffSum f g n (f x) - birkhoffSum f g n x = g (f^[n] x) - g x := by
  

Proof state:
α : Type u_1
G : Type u_2
inst✝ : AddCommGroup G
f : α → α
g : α → G
n : ℕ
x : α
⊢ birkhoffSum f g n (f x) - birkhoffSum f g n x = g (f^[n] x) - g x

Next tactic:
rw [← sub_eq_iff_eq_add.2 (birkhoffSum_succ f g n x),
    ← sub_eq_iff_eq_add.2 (birkhoffSum_succ' f g n x),
    ← sub_add, ← sub_add, sub_add_comm]
/-- If `exp R x.fst` converges to `e` then `(exp R x).fst` converges to `e`. -/
theorem hasSum_fst_expSeries [Field 𝕜] [Ring R] [AddCommGroup M] [Algebra 𝕜 R] [Module R M]
    [Module Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] [Module 𝕜 M] [IsScalarTower 𝕜 R M]
    [IsScalarTower 𝕜 Rᵐᵒᵖ M] [TopologicalRing R] [TopologicalAddGroup M] [ContinuousSMul R M]
    [ContinuousSMul Rᵐᵒᵖ M] (x : tsze R M) {e : R}
    (h : HasSum (fun n => expSeries 𝕜 R n fun _ => x.fst) e) :
    HasSum (fun n => fst (expSeries 𝕜 (tsze R M) n fun _ => x)) e := by
  

Proof state:
𝕜 : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁵ : TopologicalSpace R
inst✝¹⁴ : TopologicalSpace M
inst✝¹³ : Field 𝕜
inst✝¹² : Ring R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Algebra 𝕜 R
inst✝⁹ : Module R M
inst✝⁸ : Module Rᵐᵒᵖ M
inst✝⁷ : SMulCommClass R Rᵐᵒᵖ M
inst✝⁶ : Module 𝕜 M
inst✝⁵ : IsScalarTower 𝕜 R M
inst✝⁴ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup M
inst✝¹ : ContinuousSMul R M
inst✝ : ContinuousSMul Rᵐᵒᵖ M
x : tsze R M
e : R
h : HasSum (fun n => (expSeries 𝕜 R n) fun x_1 => fst x) e
⊢ HasSum (fun n => fst ((expSeries 𝕜 (tsze R M) n) fun x_1 => x)) e

Next tactic:
simpa [expSeries_apply_eq] using h
/-- If `exp R x.fst` converges to `e` then `(exp R x).snd` converges to `e • x.snd`. -/
theorem hasSum_snd_expSeries_of_smul_comm [Field 𝕜] [CharZero 𝕜] [Ring R] [AddCommGroup M]
    [Algebra 𝕜 R] [Module R M] [Module Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] [Module 𝕜 M]
    [IsScalarTower 𝕜 R M] [IsScalarTower 𝕜 Rᵐᵒᵖ M] [TopologicalRing R] [TopologicalAddGroup M]
    [ContinuousSMul R M] [ContinuousSMul Rᵐᵒᵖ M] (x : tsze R M)
    (hx : MulOpposite.op x.fst • x.snd = x.fst • x.snd) {e : R}
    (h : HasSum (fun n => expSeries 𝕜 R n fun _ => x.fst) e) :
    HasSum (fun n => snd (expSeries 𝕜 (tsze R M) n fun _ => x)) (e • x.snd) := by
  

Proof state:
𝕜 : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁶ : TopologicalSpace R
inst✝¹⁵ : TopologicalSpace M
inst✝¹⁴ : Field 𝕜
inst✝¹³ : CharZero 𝕜
inst✝¹² : Ring R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Algebra 𝕜 R
inst✝⁹ : Module R M
inst✝⁸ : Module Rᵐᵒᵖ M
inst✝⁷ : SMulCommClass R Rᵐᵒᵖ M
inst✝⁶ : Module 𝕜 M
inst✝⁵ : IsScalarTower 𝕜 R M
inst✝⁴ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup M
inst✝¹ : ContinuousSMul R M
inst✝ : ContinuousSMul Rᵐᵒᵖ M
x : tsze R M
hx : MulOpposite.op (fst x) • snd x = fst x • snd x
e : R
h : HasSum (fun n => (expSeries 𝕜 R n) fun x_1 => fst x) e
⊢ HasSum (fun n => snd ((expSeries 𝕜 (tsze R M) n) fun x_1 => x)) (e • snd x)

Next tactic:
simp_rw [expSeries_apply_eq] at *
/-- If `exp R x.fst` converges to `e` then `(exp R x).snd` converges to `e • x.snd`. -/
theorem hasSum_snd_expSeries_of_smul_comm [Field 𝕜] [CharZero 𝕜] [Ring R] [AddCommGroup M]
    [Algebra 𝕜 R] [Module R M] [Module Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] [Module 𝕜 M]
    [IsScalarTower 𝕜 R M] [IsScalarTower 𝕜 Rᵐᵒᵖ M] [TopologicalRing R] [TopologicalAddGroup M]
    [ContinuousSMul R M] [ContinuousSMul Rᵐᵒᵖ M] (x : tsze R M)
    (hx : MulOpposite.op x.fst • x.snd = x.fst • x.snd) {e : R}
    (h : HasSum (fun n => expSeries 𝕜 R n fun _ => x.fst) e) :
    HasSum (fun n => snd (expSeries 𝕜 (tsze R M) n fun _ => x)) (e • x.snd) := by
  simp_rw [expSeries_apply_eq] at *
  

Proof state:
𝕜 : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁶ : TopologicalSpace R
inst✝¹⁵ : TopologicalSpace M
inst✝¹⁴ : Field 𝕜
inst✝¹³ : CharZero 𝕜
inst✝¹² : Ring R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Algebra 𝕜 R
inst✝⁹ : Module R M
inst✝⁸ : Module Rᵐᵒᵖ M
inst✝⁷ : SMulCommClass R Rᵐᵒᵖ M
inst✝⁶ : Module 𝕜 M
inst✝⁵ : IsScalarTower 𝕜 R M
inst✝⁴ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup M
inst✝¹ : ContinuousSMul R M
inst✝ : ContinuousSMul Rᵐᵒᵖ M
x : tsze R M
hx : MulOpposite.op (fst x) • snd x = fst x • snd x
e : R
h : HasSum (fun n => (↑(Nat.factorial n))⁻¹ • fst x ^ n) e
⊢ HasSum (fun n => snd ((↑(Nat.factorial n))⁻¹ • x ^ n)) (e • snd x)

Next tactic:
conv =>
    congr
    ext n
    rw [snd_smul, snd_pow_of_smul_comm _ _ hx, nsmul_eq_smul_cast 𝕜 n, smul_smul, inv_mul_eq_div, ←
      inv_div, ← smul_assoc]
/-- If `exp R x.fst` converges to `e` then `(exp R x).snd` converges to `e • x.snd`. -/
theorem hasSum_snd_expSeries_of_smul_comm [Field 𝕜] [CharZero 𝕜] [Ring R] [AddCommGroup M]
    [Algebra 𝕜 R] [Module R M] [Module Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] [Module 𝕜 M]
    [IsScalarTower 𝕜 R M] [IsScalarTower 𝕜 Rᵐᵒᵖ M] [TopologicalRing R] [TopologicalAddGroup M]
    [ContinuousSMul R M] [ContinuousSMul Rᵐᵒᵖ M] (x : tsze R M)
    (hx : MulOpposite.op x.fst • x.snd = x.fst • x.snd) {e : R}
    (h : HasSum (fun n => expSeries 𝕜 R n fun _ => x.fst) e) :
    HasSum (fun n => snd (expSeries 𝕜 (tsze R M) n fun _ => x)) (e • x.snd) := by
  simp_rw [expSeries_apply_eq] at *
  conv =>
    

Proof state:
𝕜 : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁶ : TopologicalSpace R
inst✝¹⁵ : TopologicalSpace M
inst✝¹⁴ : Field 𝕜
inst✝¹³ : CharZero 𝕜
inst✝¹² : Ring R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Algebra 𝕜 R
inst✝⁹ : Module R M
inst✝⁸ : Module Rᵐᵒᵖ M
inst✝⁷ : SMulCommClass R Rᵐᵒᵖ M
inst✝⁶ : Module 𝕜 M
inst✝⁵ : IsScalarTower 𝕜 R M
inst✝⁴ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup M
inst✝¹ : ContinuousSMul R M
inst✝ : ContinuousSMul Rᵐᵒᵖ M
x : tsze R M
hx : MulOpposite.op (fst x) • snd x = fst x • snd x
e : R
h : HasSum (fun n => (↑(Nat.factorial n))⁻¹ • fst x ^ n) e
| HasSum (fun n => snd ((↑(Nat.factorial n))⁻¹ • x ^ n)) (e • snd x)

Next tactic:
congr
    ext n
    rw [snd_smul, snd_pow_of_smul_comm _ _ hx, nsmul_eq_smul_cast 𝕜 n, smul_smul, inv_mul_eq_div, ←
      inv_div, ← smul_assoc]
/-- If `exp R x.fst` converges to `e` then `(exp R x).snd` converges to `e • x.snd`. -/
theorem hasSum_snd_expSeries_of_smul_comm [Field 𝕜] [CharZero 𝕜] [Ring R] [AddCommGroup M]
    [Algebra 𝕜 R] [Module R M] [Module Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] [Module 𝕜 M]
    [IsScalarTower 𝕜 R M] [IsScalarTower 𝕜 Rᵐᵒᵖ M] [TopologicalRing R] [TopologicalAddGroup M]
    [ContinuousSMul R M] [ContinuousSMul Rᵐᵒᵖ M] (x : tsze R M)
    (hx : MulOpposite.op x.fst • x.snd = x.fst • x.snd) {e : R}
    (h : HasSum (fun n => expSeries 𝕜 R n fun _ => x.fst) e) :
    HasSum (fun n => snd (expSeries 𝕜 (tsze R M) n fun _ => x)) (e • x.snd) := by
  simp_rw [expSeries_apply_eq] at *
  conv =>
    

Proof state:
𝕜 : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁶ : TopologicalSpace R
inst✝¹⁵ : TopologicalSpace M
inst✝¹⁴ : Field 𝕜
inst✝¹³ : CharZero 𝕜
inst✝¹² : Ring R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Algebra 𝕜 R
inst✝⁹ : Module R M
inst✝⁸ : Module Rᵐᵒᵖ M
inst✝⁷ : SMulCommClass R Rᵐᵒᵖ M
inst✝⁶ : Module 𝕜 M
inst✝⁵ : IsScalarTower 𝕜 R M
inst✝⁴ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup M
inst✝¹ : ContinuousSMul R M
inst✝ : ContinuousSMul Rᵐᵒᵖ M
x : tsze R M
hx : MulOpposite.op (fst x) • snd x = fst x • snd x
e : R
h : HasSum (fun n => (↑(Nat.factorial n))⁻¹ • fst x ^ n) e
| HasSum (fun n => snd ((↑(Nat.factorial n))⁻¹ • x ^ n)) (e • snd x)

Next tactic:
congr
/-- If `exp R x.fst` converges to `e` then `(exp R x).snd` converges to `e • x.snd`. -/
theorem hasSum_snd_expSeries_of_smul_comm [Field 𝕜] [CharZero 𝕜] [Ring R] [AddCommGroup M]
    [Algebra 𝕜 R] [Module R M] [Module Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] [Module 𝕜 M]
    [IsScalarTower 𝕜 R M] [IsScalarTower 𝕜 Rᵐᵒᵖ M] [TopologicalRing R] [TopologicalAddGroup M]
    [ContinuousSMul R M] [ContinuousSMul Rᵐᵒᵖ M] (x : tsze R M)
    (hx : MulOpposite.op x.fst • x.snd = x.fst • x.snd) {e : R}
    (h : HasSum (fun n => expSeries 𝕜 R n fun _ => x.fst) e) :
    HasSum (fun n => snd (expSeries 𝕜 (tsze R M) n fun _ => x)) (e • x.snd) := by
  simp_rw [expSeries_apply_eq] at *
  conv =>
    congr
    

Proof state:
case f
𝕜 : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁶ : TopologicalSpace R
inst✝¹⁵ : TopologicalSpace M
inst✝¹⁴ : Field 𝕜
inst✝¹³ : CharZero 𝕜
inst✝¹² : Ring R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Algebra 𝕜 R
inst✝⁹ : Module R M
inst✝⁸ : Module Rᵐᵒᵖ M
inst✝⁷ : SMulCommClass R Rᵐᵒᵖ M
inst✝⁶ : Module 𝕜 M
inst✝⁵ : IsScalarTower 𝕜 R M
inst✝⁴ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup M
inst✝¹ : ContinuousSMul R M
inst✝ : ContinuousSMul Rᵐᵒᵖ M
x : tsze R M
hx : MulOpposite.op (fst x) • snd x = fst x • snd x
e : R
h : HasSum (fun n => (↑(Nat.factorial n))⁻¹ • fst x ^ n) e
| fun n => snd ((↑(Nat.factorial n))⁻¹ • x ^ n)
case a
𝕜 : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁶ : TopologicalSpace R
inst✝¹⁵ : TopologicalSpace M
inst✝¹⁴ : Field 𝕜
inst✝¹³ : CharZero 𝕜
inst✝¹² : Ring R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Algebra 𝕜 R
inst✝⁹ : Module R M
inst✝⁸ : Module Rᵐᵒᵖ M
inst✝⁷ : SMulCommClass R Rᵐᵒᵖ M
inst✝⁶ : Module 𝕜 M
inst✝⁵ : IsScalarTower 𝕜 R M
inst✝⁴ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup M
inst✝¹ : ContinuousSMul R M
inst✝ : ContinuousSMul Rᵐᵒᵖ M
x : tsze R M
hx : MulOpposite.op (fst x) • snd x = fst x • snd x
e : R
h : HasSum (fun n => (↑(Nat.factorial n))⁻¹ • fst x ^ n) e
| e • snd x

Next tactic:
ext n
/-- If `exp R x.fst` converges to `e` then `(exp R x).snd` converges to `e • x.snd`. -/
theorem hasSum_snd_expSeries_of_smul_comm [Field 𝕜] [CharZero 𝕜] [Ring R] [AddCommGroup M]
    [Algebra 𝕜 R] [Module R M] [Module Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] [Module 𝕜 M]
    [IsScalarTower 𝕜 R M] [IsScalarTower 𝕜 Rᵐᵒᵖ M] [TopologicalRing R] [TopologicalAddGroup M]
    [ContinuousSMul R M] [ContinuousSMul Rᵐᵒᵖ M] (x : tsze R M)
    (hx : MulOpposite.op x.fst • x.snd = x.fst • x.snd) {e : R}
    (h : HasSum (fun n => expSeries 𝕜 R n fun _ => x.fst) e) :
    HasSum (fun n => snd (expSeries 𝕜 (tsze R M) n fun _ => x)) (e • x.snd) := by
  simp_rw [expSeries_apply_eq] at *
  conv =>
    congr
    ext n
    

Proof state:
case f.h
𝕜 : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁶ : TopologicalSpace R
inst✝¹⁵ : TopologicalSpace M
inst✝¹⁴ : Field 𝕜
inst✝¹³ : CharZero 𝕜
inst✝¹² : Ring R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Algebra 𝕜 R
inst✝⁹ : Module R M
inst✝⁸ : Module Rᵐᵒᵖ M
inst✝⁷ : SMulCommClass R Rᵐᵒᵖ M
inst✝⁶ : Module 𝕜 M
inst✝⁵ : IsScalarTower 𝕜 R M
inst✝⁴ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup M
inst✝¹ : ContinuousSMul R M
inst✝ : ContinuousSMul Rᵐᵒᵖ M
x : tsze R M
hx : MulOpposite.op (fst x) • snd x = fst x • snd x
e : R
h : HasSum (fun n => (↑(Nat.factorial n))⁻¹ • fst x ^ n) e
n : ℕ
| snd ((↑(Nat.factorial n))⁻¹ • x ^ n)
case a
𝕜 : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁶ : TopologicalSpace R
inst✝¹⁵ : TopologicalSpace M
inst✝¹⁴ : Field 𝕜
inst✝¹³ : CharZero 𝕜
inst✝¹² : Ring R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Algebra 𝕜 R
inst✝⁹ : Module R M
inst✝⁸ : Module Rᵐᵒᵖ M
inst✝⁷ : SMulCommClass R Rᵐᵒᵖ M
inst✝⁶ : Module 𝕜 M
inst✝⁵ : IsScalarTower 𝕜 R M
inst✝⁴ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup M
inst✝¹ : ContinuousSMul R M
inst✝ : ContinuousSMul Rᵐᵒᵖ M
x : tsze R M
hx : MulOpposite.op (fst x) • snd x = fst x • snd x
e : R
h : HasSum (fun n => (↑(Nat.factorial n))⁻¹ • fst x ^ n) e
| e • snd x

Next tactic:
rw [snd_smul, snd_pow_of_smul_comm _ _ hx, nsmul_eq_smul_cast 𝕜 n, smul_smul, inv_mul_eq_div, ←
      inv_div, ← smul_assoc]
/-- If `exp R x.fst` converges to `e` then `(exp R x).snd` converges to `e • x.snd`. -/
theorem hasSum_snd_expSeries_of_smul_comm [Field 𝕜] [CharZero 𝕜] [Ring R] [AddCommGroup M]
    [Algebra 𝕜 R] [Module R M] [Module Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] [Module 𝕜 M]
    [IsScalarTower 𝕜 R M] [IsScalarTower 𝕜 Rᵐᵒᵖ M] [TopologicalRing R] [TopologicalAddGroup M]
    [ContinuousSMul R M] [ContinuousSMul Rᵐᵒᵖ M] (x : tsze R M)
    (hx : MulOpposite.op x.fst • x.snd = x.fst • x.snd) {e : R}
    (h : HasSum (fun n => expSeries 𝕜 R n fun _ => x.fst) e) :
    HasSum (fun n => snd (expSeries 𝕜 (tsze R M) n fun _ => x)) (e • x.snd) := by
  simp_rw [expSeries_apply_eq] at *
  conv =>
    congr
    ext n
    rw [snd_smul, snd_pow_of_smul_comm _ _ hx, nsmul_eq_smul_cast 𝕜 n, smul_smul, inv_mul_eq_div, ←
      inv_div, ← smul_assoc]
  

Proof state:
𝕜 : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁶ : TopologicalSpace R
inst✝¹⁵ : TopologicalSpace M
inst✝¹⁴ : Field 𝕜
inst✝¹³ : CharZero 𝕜
inst✝¹² : Ring R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Algebra 𝕜 R
inst✝⁹ : Module R M
inst✝⁸ : Module Rᵐᵒᵖ M
inst✝⁷ : SMulCommClass R Rᵐᵒᵖ M
inst✝⁶ : Module 𝕜 M
inst✝⁵ : IsScalarTower 𝕜 R M
inst✝⁴ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup M
inst✝¹ : ContinuousSMul R M
inst✝ : ContinuousSMul Rᵐᵒᵖ M
x : tsze R M
hx : MulOpposite.op (fst x) • snd x = fst x • snd x
e : R
h : HasSum (fun n => (↑(Nat.factorial n))⁻¹ • fst x ^ n) e
⊢ HasSum (fun n => ((↑(Nat.factorial n) / ↑n)⁻¹ • fst x ^ Nat.pred n) • snd x) (e • snd x)

Next tactic:
apply HasSum.smul_const
/-- If `exp R x.fst` converges to `e` then `(exp R x).snd` converges to `e • x.snd`. -/
theorem hasSum_snd_expSeries_of_smul_comm [Field 𝕜] [CharZero 𝕜] [Ring R] [AddCommGroup M]
    [Algebra 𝕜 R] [Module R M] [Module Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] [Module 𝕜 M]
    [IsScalarTower 𝕜 R M] [IsScalarTower 𝕜 Rᵐᵒᵖ M] [TopologicalRing R] [TopologicalAddGroup M]
    [ContinuousSMul R M] [ContinuousSMul Rᵐᵒᵖ M] (x : tsze R M)
    (hx : MulOpposite.op x.fst • x.snd = x.fst • x.snd) {e : R}
    (h : HasSum (fun n => expSeries 𝕜 R n fun _ => x.fst) e) :
    HasSum (fun n => snd (expSeries 𝕜 (tsze R M) n fun _ => x)) (e • x.snd) := by
  simp_rw [expSeries_apply_eq] at *
  conv =>
    congr
    ext n
    rw [snd_smul, snd_pow_of_smul_comm _ _ hx, nsmul_eq_smul_cast 𝕜 n, smul_smul, inv_mul_eq_div, ←
      inv_div, ← smul_assoc]
  apply HasSum.smul_const
  

Proof state:
case hf
𝕜 : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁶ : TopologicalSpace R
inst✝¹⁵ : TopologicalSpace M
inst✝¹⁴ : Field 𝕜
inst✝¹³ : CharZero 𝕜
inst✝¹² : Ring R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Algebra 𝕜 R
inst✝⁹ : Module R M
inst✝⁸ : Module Rᵐᵒᵖ M
inst✝⁷ : SMulCommClass R Rᵐᵒᵖ M
inst✝⁶ : Module 𝕜 M
inst✝⁵ : IsScalarTower 𝕜 R M
inst✝⁴ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup M
inst✝¹ : ContinuousSMul R M
inst✝ : ContinuousSMul Rᵐᵒᵖ M
x : tsze R M
hx : MulOpposite.op (fst x) • snd x = fst x • snd x
e : R
h : HasSum (fun n => (↑(Nat.factorial n))⁻¹ • fst x ^ n) e
⊢ HasSum (fun z => (↑(Nat.factorial z) / ↑z)⁻¹ • fst x ^ Nat.pred z) e

Next tactic:
rw [← hasSum_nat_add_iff' 1]
/-- If `exp R x.fst` converges to `e` then `(exp R x).snd` converges to `e • x.snd`. -/
theorem hasSum_snd_expSeries_of_smul_comm [Field 𝕜] [CharZero 𝕜] [Ring R] [AddCommGroup M]
    [Algebra 𝕜 R] [Module R M] [Module Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] [Module 𝕜 M]
    [IsScalarTower 𝕜 R M] [IsScalarTower 𝕜 Rᵐᵒᵖ M] [TopologicalRing R] [TopologicalAddGroup M]
    [ContinuousSMul R M] [ContinuousSMul Rᵐᵒᵖ M] (x : tsze R M)
    (hx : MulOpposite.op x.fst • x.snd = x.fst • x.snd) {e : R}
    (h : HasSum (fun n => expSeries 𝕜 R n fun _ => x.fst) e) :
    HasSum (fun n => snd (expSeries 𝕜 (tsze R M) n fun _ => x)) (e • x.snd) := by
  simp_rw [expSeries_apply_eq] at *
  conv =>
    congr
    ext n
    rw [snd_smul, snd_pow_of_smul_comm _ _ hx, nsmul_eq_smul_cast 𝕜 n, smul_smul, inv_mul_eq_div, ←
      inv_div, ← smul_assoc]
  apply HasSum.smul_const
  rw [← hasSum_nat_add_iff' 1]
  

Proof state:
case hf
𝕜 : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁶ : TopologicalSpace R
inst✝¹⁵ : TopologicalSpace M
inst✝¹⁴ : Field 𝕜
inst✝¹³ : CharZero 𝕜
inst✝¹² : Ring R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Algebra 𝕜 R
inst✝⁹ : Module R M
inst✝⁸ : Module Rᵐᵒᵖ M
inst✝⁷ : SMulCommClass R Rᵐᵒᵖ M
inst✝⁶ : Module 𝕜 M
inst✝⁵ : IsScalarTower 𝕜 R M
inst✝⁴ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup M
inst✝¹ : ContinuousSMul R M
inst✝ : ContinuousSMul Rᵐᵒᵖ M
x : tsze R M
hx : MulOpposite.op (fst x) • snd x = fst x • snd x
e : R
h : HasSum (fun n => (↑(Nat.factorial n))⁻¹ • fst x ^ n) e
⊢ HasSum (fun n => (↑(Nat.factorial (n + 1)) / ↑(n + 1))⁻¹ • fst x ^ Nat.pred (n + 1))
    (e - Finset.sum (Finset.range 1) fun i => (↑(Nat.factorial i) / ↑i)⁻¹ • fst x ^ Nat.pred i)

Next tactic:
rw [Finset.range_one, Finset.sum_singleton, Nat.cast_zero, div_zero, inv_zero, zero_smul,
    sub_zero]
/-- If `exp R x.fst` converges to `e` then `(exp R x).snd` converges to `e • x.snd`. -/
theorem hasSum_snd_expSeries_of_smul_comm [Field 𝕜] [CharZero 𝕜] [Ring R] [AddCommGroup M]
    [Algebra 𝕜 R] [Module R M] [Module Rᵐᵒᵖ M] [SMulCommClass R Rᵐᵒᵖ M] [Module 𝕜 M]
    [IsScalarTower 𝕜 R M] [IsScalarTower 𝕜 Rᵐᵒᵖ M] [TopologicalRing R] [TopologicalAddGroup M]
    [ContinuousSMul R M] [ContinuousSMul Rᵐᵒᵖ M] (x : tsze R M)
    (hx : MulOpposite.op x.fst • x.snd = x.fst • x.snd) {e : R}
    (h : HasSum (fun n => expSeries 𝕜 R n fun _ => x.fst) e) :
    HasSum (fun n => snd (expSeries 𝕜 (tsze R M) n fun _ => x)) (e • x.snd) := by
  simp_rw [expSeries_apply_eq] at *
  conv =>
    congr
    ext n
    rw [snd_smul, snd_pow_of_smul_comm _ _ hx, nsmul_eq_smul_cast 𝕜 n, smul_smul, inv_mul_eq_div, ←
      inv_div, ← smul_assoc]
  apply HasSum.smul_const
  rw [← hasSum_nat_add_iff' 1]
  rw [Finset.range_one, Finset.sum_singleton, Nat.cast_zero, div_zero, inv_zero, zero_smul,
    sub_zero]
  

Proof state:
case hf
𝕜 : Type u_1
R : Type u_2
M : Type u_3
inst✝¹⁶ : TopologicalSpace R
inst✝¹⁵ : TopologicalSpace M
inst✝¹⁴ : Field 𝕜
inst✝¹³ : CharZero 𝕜
inst✝¹² : Ring R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Algebra 𝕜 R
inst✝⁹ : Module R M
inst✝⁸ : Module Rᵐᵒᵖ M
inst✝⁷ : SMulCommClass R Rᵐᵒᵖ M
inst✝⁶ : Module 𝕜 M
inst✝⁵ : IsScalarTower 𝕜 R M
inst✝⁴ : IsScalarTower 𝕜 Rᵐᵒᵖ M
inst✝³ : TopologicalRing R
inst✝² : TopologicalAddGroup M
inst✝¹ : ContinuousSMul R M
inst✝ : ContinuousSMul Rᵐᵒᵖ M
x : tsze R M
hx : MulOpposite.op (fst x) • snd x = fst x • snd x
e : R
h : HasSum (fun n => (↑(Nat.factorial n))⁻¹ • fst x ^ n) e
⊢ HasSum (fun n => (↑(Nat.factorial (n + 1)) / ↑(n + 1))⁻¹ • fst x ^ Nat.pred (n + 1)) e

Next tactic:
simp_rw [← Nat.succ_eq_add_one, Nat.pred_succ, Nat.factorial_succ, Nat.cast_mul, ←
    Nat.succ_eq_add_one,
    mul_div_cancel_left _ ((@Nat.cast_ne_zero 𝕜 _ _ _).mpr <| Nat.succ_ne_zero _)]