l3lab/ntp-mathlib huggingface dataset:
/-- `exp 𝕂 x` has explicit two-sided inverse `exp 𝕂 (-x)`. -/
noncomputable def invertibleExpOfMemBall [CharZero 𝕂] {x : 𝔸}
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) : Invertible (exp 𝕂 x) where
  invOf := exp 𝕂 (-x)
  invOf_mul_self := by
    have hnx : -x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius := by
      rw [EMetric.mem_ball, ← neg_zero, edist_neg_neg]
      exact hx
    rw [← exp_add_of_commute_of_mem_ball (Commute.neg_left <| Commute.refl x) hnx hx, neg_add_self,
      exp_zero]
  mul_invOf_self := by
    have hnx : -x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius := by
      

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁶ : NontriviallyNormedField 𝕂
inst✝⁵ : NormedRing 𝔸
inst✝⁴ : NormedRing 𝔹
inst✝³ : NormedAlgebra 𝕂 𝔸
inst✝² : NormedAlgebra 𝕂 𝔹
inst✝¹ : CompleteSpace 𝔸
inst✝ : CharZero 𝕂
x : 𝔸
hx : x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
⊢ -x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))

Next tactic:
rw [EMetric.mem_ball, ← neg_zero, edist_neg_neg]
/-- `exp 𝕂 x` has explicit two-sided inverse `exp 𝕂 (-x)`. -/
noncomputable def invertibleExpOfMemBall [CharZero 𝕂] {x : 𝔸}
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) : Invertible (exp 𝕂 x) where
  invOf := exp 𝕂 (-x)
  invOf_mul_self := by
    have hnx : -x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius := by
      rw [EMetric.mem_ball, ← neg_zero, edist_neg_neg]
      exact hx
    rw [← exp_add_of_commute_of_mem_ball (Commute.neg_left <| Commute.refl x) hnx hx, neg_add_self,
      exp_zero]
  mul_invOf_self := by
    have hnx : -x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius := by
      rw [EMetric.mem_ball, ← neg_zero, edist_neg_neg]
      

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁶ : NontriviallyNormedField 𝕂
inst✝⁵ : NormedRing 𝔸
inst✝⁴ : NormedRing 𝔹
inst✝³ : NormedAlgebra 𝕂 𝔸
inst✝² : NormedAlgebra 𝕂 𝔹
inst✝¹ : CompleteSpace 𝔸
inst✝ : CharZero 𝕂
x : 𝔸
hx : x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
⊢ edist x 0 < FormalMultilinearSeries.radius (expSeries 𝕂 𝔸)

Next tactic:
exact hx
/-- `exp 𝕂 x` has explicit two-sided inverse `exp 𝕂 (-x)`. -/
noncomputable def invertibleExpOfMemBall [CharZero 𝕂] {x : 𝔸}
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) : Invertible (exp 𝕂 x) where
  invOf := exp 𝕂 (-x)
  invOf_mul_self := by
    have hnx : -x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius := by
      rw [EMetric.mem_ball, ← neg_zero, edist_neg_neg]
      exact hx
    rw [← exp_add_of_commute_of_mem_ball (Commute.neg_left <| Commute.refl x) hnx hx, neg_add_self,
      exp_zero]
  mul_invOf_self := by
    have hnx : -x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius := by
      rw [EMetric.mem_ball, ← neg_zero, edist_neg_neg]
      exact hx
    

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁶ : NontriviallyNormedField 𝕂
inst✝⁵ : NormedRing 𝔸
inst✝⁴ : NormedRing 𝔹
inst✝³ : NormedAlgebra 𝕂 𝔸
inst✝² : NormedAlgebra 𝕂 𝔹
inst✝¹ : CompleteSpace 𝔸
inst✝ : CharZero 𝕂
x : 𝔸
hx : x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
hnx : -x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
⊢ exp 𝕂 x * exp 𝕂 (-x) = 1

Next tactic:
rw [← exp_add_of_commute_of_mem_ball (Commute.neg_right <| Commute.refl x) hx hnx, add_neg_self,
      exp_zero]
theorem invOf_exp_of_mem_ball [CharZero 𝕂] {x : 𝔸}
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) [Invertible (exp 𝕂 x)] :
    ⅟ (exp 𝕂 x) = exp 𝕂 (-x) := by
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁷ : NontriviallyNormedField 𝕂
inst✝⁶ : NormedRing 𝔸
inst✝⁵ : NormedRing 𝔹
inst✝⁴ : NormedAlgebra 𝕂 𝔸
inst✝³ : NormedAlgebra 𝕂 𝔹
inst✝² : CompleteSpace 𝔸
inst✝¹ : CharZero 𝕂
x : 𝔸
hx : x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
inst✝ : Invertible (exp 𝕂 x)
⊢ ⅟(exp 𝕂 x) = exp 𝕂 (-x)

Next tactic:
letI := invertibleExpOfMemBall hx
theorem invOf_exp_of_mem_ball [CharZero 𝕂] {x : 𝔸}
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) [Invertible (exp 𝕂 x)] :
    ⅟ (exp 𝕂 x) = exp 𝕂 (-x) := by
  letI := invertibleExpOfMemBall hx; 

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁷ : NontriviallyNormedField 𝕂
inst✝⁶ : NormedRing 𝔸
inst✝⁵ : NormedRing 𝔹
inst✝⁴ : NormedAlgebra 𝕂 𝔸
inst✝³ : NormedAlgebra 𝕂 𝔹
inst✝² : CompleteSpace 𝔸
inst✝¹ : CharZero 𝕂
x : 𝔸
hx : x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
inst✝ : Invertible (exp 𝕂 x)
this : Invertible (exp 𝕂 x) := invertibleExpOfMemBall hx
⊢ ⅟(exp 𝕂 x) = exp 𝕂 (-x)

Next tactic:
convert (rfl : ⅟ (exp 𝕂 x) = _)
/-- Any continuous ring homomorphism commutes with `exp`. -/
theorem map_exp_of_mem_ball {F} [RingHomClass F 𝔸 𝔹] (f : F) (hf : Continuous f) (x : 𝔸)
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) : f (exp 𝕂 x) = exp 𝕂 (f x) := by
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁶ : NontriviallyNormedField 𝕂
inst✝⁵ : NormedRing 𝔸
inst✝⁴ : NormedRing 𝔹
inst✝³ : NormedAlgebra 𝕂 𝔸
inst✝² : NormedAlgebra 𝕂 𝔹
inst✝¹ : CompleteSpace 𝔸
F : Type u_4
inst✝ : RingHomClass F 𝔸 𝔹
f : F
hf : Continuous ⇑f
x : 𝔸
hx : x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
⊢ f (exp 𝕂 x) = exp 𝕂 (f x)

Next tactic:
rw [exp_eq_tsum, exp_eq_tsum]
/-- Any continuous ring homomorphism commutes with `exp`. -/
theorem map_exp_of_mem_ball {F} [RingHomClass F 𝔸 𝔹] (f : F) (hf : Continuous f) (x : 𝔸)
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) : f (exp 𝕂 x) = exp 𝕂 (f x) := by
  rw [exp_eq_tsum, exp_eq_tsum]
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁶ : NontriviallyNormedField 𝕂
inst✝⁵ : NormedRing 𝔸
inst✝⁴ : NormedRing 𝔹
inst✝³ : NormedAlgebra 𝕂 𝔸
inst✝² : NormedAlgebra 𝕂 𝔹
inst✝¹ : CompleteSpace 𝔸
F : Type u_4
inst✝ : RingHomClass F 𝔸 𝔹
f : F
hf : Continuous ⇑f
x : 𝔸
hx : x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
⊢ f ((fun x => ∑' (n : ℕ), (↑n !)⁻¹ • x ^ n) x) = (fun x => ∑' (n : ℕ), (↑n !)⁻¹ • x ^ n) (f x)

Next tactic:
refine' ((expSeries_summable_of_mem_ball' _ hx).hasSum.map f hf).tsum_eq.symm.trans _
/-- Any continuous ring homomorphism commutes with `exp`. -/
theorem map_exp_of_mem_ball {F} [RingHomClass F 𝔸 𝔹] (f : F) (hf : Continuous f) (x : 𝔸)
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) : f (exp 𝕂 x) = exp 𝕂 (f x) := by
  rw [exp_eq_tsum, exp_eq_tsum]
  refine' ((expSeries_summable_of_mem_ball' _ hx).hasSum.map f hf).tsum_eq.symm.trans _
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁶ : NontriviallyNormedField 𝕂
inst✝⁵ : NormedRing 𝔸
inst✝⁴ : NormedRing 𝔹
inst✝³ : NormedAlgebra 𝕂 𝔸
inst✝² : NormedAlgebra 𝕂 𝔹
inst✝¹ : CompleteSpace 𝔸
F : Type u_4
inst✝ : RingHomClass F 𝔸 𝔹
f : F
hf : Continuous ⇑f
x : 𝔸
hx : x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
⊢ ∑' (b : ℕ), (⇑f ∘ fun n => (↑n !)⁻¹ • x ^ n) b = (fun x => ∑' (n : ℕ), (↑n !)⁻¹ • x ^ n) (f x)

Next tactic:
dsimp only [Function.comp_def]
/-- Any continuous ring homomorphism commutes with `exp`. -/
theorem map_exp_of_mem_ball {F} [RingHomClass F 𝔸 𝔹] (f : F) (hf : Continuous f) (x : 𝔸)
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) : f (exp 𝕂 x) = exp 𝕂 (f x) := by
  rw [exp_eq_tsum, exp_eq_tsum]
  refine' ((expSeries_summable_of_mem_ball' _ hx).hasSum.map f hf).tsum_eq.symm.trans _
  dsimp only [Function.comp_def]
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁶ : NontriviallyNormedField 𝕂
inst✝⁵ : NormedRing 𝔸
inst✝⁴ : NormedRing 𝔹
inst✝³ : NormedAlgebra 𝕂 𝔸
inst✝² : NormedAlgebra 𝕂 𝔹
inst✝¹ : CompleteSpace 𝔸
F : Type u_4
inst✝ : RingHomClass F 𝔸 𝔹
f : F
hf : Continuous ⇑f
x : 𝔸
hx : x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
⊢ ∑' (b : ℕ), f ((↑b !)⁻¹ • x ^ b) = ∑' (n : ℕ), (↑n !)⁻¹ • f x ^ n

Next tactic:
simp_rw [map_inv_nat_cast_smul f 𝕂 𝕂, map_pow]
theorem norm_expSeries_div_summable_of_mem_ball (x : 𝔸)
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    Summable fun n => ‖x ^ n / (n ! : 𝔸)‖ := by
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
inst✝² : NontriviallyNormedField 𝕂
inst✝¹ : NormedDivisionRing 𝔸
inst✝ : NormedAlgebra 𝕂 𝔸
x : 𝔸
hx : x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
⊢ Summable fun n => ‖x ^ n / ↑n !‖

Next tactic:
change Summable (norm ∘ _)
theorem norm_expSeries_div_summable_of_mem_ball (x : 𝔸)
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    Summable fun n => ‖x ^ n / (n ! : 𝔸)‖ := by
  change Summable (norm ∘ _)
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
inst✝² : NontriviallyNormedField 𝕂
inst✝¹ : NormedDivisionRing 𝔸
inst✝ : NormedAlgebra 𝕂 𝔸
x : 𝔸
hx : x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
⊢ Summable (norm ∘ fun n => x ^ n / ↑n !)

Next tactic:
rw [← expSeries_apply_eq_div' (𝕂 := 𝕂) x]
theorem norm_expSeries_div_summable_of_mem_ball (x : 𝔸)
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    Summable fun n => ‖x ^ n / (n ! : 𝔸)‖ := by
  change Summable (norm ∘ _)
  rw [← expSeries_apply_eq_div' (𝕂 := 𝕂) x]
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
inst✝² : NontriviallyNormedField 𝕂
inst✝¹ : NormedDivisionRing 𝔸
inst✝ : NormedAlgebra 𝕂 𝔸
x : 𝔸
hx : x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
⊢ Summable (norm ∘ fun n => (expSeries 𝕂 𝔸 n) fun x_1 => x)

Next tactic:
exact norm_expSeries_summable_of_mem_ball x hx
theorem expSeries_div_hasSum_exp_of_mem_ball [CompleteSpace 𝔸] (x : 𝔸)
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    HasSum (fun n => x ^ n / n !) (exp 𝕂 x) := by
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
inst✝³ : NontriviallyNormedField 𝕂
inst✝² : NormedDivisionRing 𝔸
inst✝¹ : NormedAlgebra 𝕂 𝔸
inst✝ : CompleteSpace 𝔸
x : 𝔸
hx : x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
⊢ HasSum (fun n => x ^ n / ↑n !) (exp 𝕂 x)

Next tactic:
rw [← expSeries_apply_eq_div' (𝕂 := 𝕂) x]
theorem expSeries_div_hasSum_exp_of_mem_ball [CompleteSpace 𝔸] (x : 𝔸)
    (hx : x ∈ EMetric.ball (0 : 𝔸) (expSeries 𝕂 𝔸).radius) :
    HasSum (fun n => x ^ n / n !) (exp 𝕂 x) := by
  rw [← expSeries_apply_eq_div' (𝕂 := 𝕂) x]
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
inst✝³ : NontriviallyNormedField 𝕂
inst✝² : NormedDivisionRing 𝔸
inst✝¹ : NormedAlgebra 𝕂 𝔸
inst✝ : CompleteSpace 𝔸
x : 𝔸
hx : x ∈ EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸))
⊢ HasSum (fun n => (expSeries 𝕂 𝔸 n) fun x_1 => x) (exp 𝕂 x)

Next tactic:
exact expSeries_hasSum_exp_of_mem_ball x hx
/-- In a normed algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ`, the series defining the exponential map
has an infinite radius of convergence. -/
theorem expSeries_radius_eq_top : (expSeries 𝕂 𝔸).radius = ∞ := by
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁴ : IsROrC 𝕂
inst✝³ : NormedRing 𝔸
inst✝² : NormedAlgebra 𝕂 𝔸
inst✝¹ : NormedRing 𝔹
inst✝ : NormedAlgebra 𝕂 𝔹
⊢ FormalMultilinearSeries.radius (expSeries 𝕂 𝔸) = ⊤

Next tactic:
refine' (expSeries 𝕂 𝔸).radius_eq_top_of_summable_norm fun r => _
/-- In a normed algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ`, the series defining the exponential map
has an infinite radius of convergence. -/
theorem expSeries_radius_eq_top : (expSeries 𝕂 𝔸).radius = ∞ := by
  refine' (expSeries 𝕂 𝔸).radius_eq_top_of_summable_norm fun r => _
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁴ : IsROrC 𝕂
inst✝³ : NormedRing 𝔸
inst✝² : NormedAlgebra 𝕂 𝔸
inst✝¹ : NormedRing 𝔹
inst✝ : NormedAlgebra 𝕂 𝔹
r : NNReal
⊢ Summable fun n => ‖expSeries 𝕂 𝔸 n‖ * ↑r ^ n

Next tactic:
refine' .of_norm_bounded_eventually _ (Real.summable_pow_div_factorial r) _
/-- In a normed algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ`, the series defining the exponential map
has an infinite radius of convergence. -/
theorem expSeries_radius_eq_top : (expSeries 𝕂 𝔸).radius = ∞ := by
  refine' (expSeries 𝕂 𝔸).radius_eq_top_of_summable_norm fun r => _
  refine' .of_norm_bounded_eventually _ (Real.summable_pow_div_factorial r) _
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁴ : IsROrC 𝕂
inst✝³ : NormedRing 𝔸
inst✝² : NormedAlgebra 𝕂 𝔸
inst✝¹ : NormedRing 𝔹
inst✝ : NormedAlgebra 𝕂 𝔹
r : NNReal
⊢ ∀ᶠ (i : ℕ) in cofinite, ‖‖expSeries 𝕂 𝔸 i‖ * ↑r ^ i‖ ≤ ↑r ^ i / ↑i !

Next tactic:
filter_upwards [eventually_cofinite_ne 0] with n hn
/-- In a normed algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ`, the series defining the exponential map
has an infinite radius of convergence. -/
theorem expSeries_radius_eq_top : (expSeries 𝕂 𝔸).radius = ∞ := by
  refine' (expSeries 𝕂 𝔸).radius_eq_top_of_summable_norm fun r => _
  refine' .of_norm_bounded_eventually _ (Real.summable_pow_div_factorial r) _
  filter_upwards [eventually_cofinite_ne 0] with n hn
  

Proof state:
case h
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁴ : IsROrC 𝕂
inst✝³ : NormedRing 𝔸
inst✝² : NormedAlgebra 𝕂 𝔸
inst✝¹ : NormedRing 𝔹
inst✝ : NormedAlgebra 𝕂 𝔹
r : NNReal
n : ℕ
hn : n ≠ 0
⊢ ‖‖expSeries 𝕂 𝔸 n‖ * ↑r ^ n‖ ≤ ↑r ^ n / ↑n !

Next tactic:
rw [norm_mul, norm_norm (expSeries 𝕂 𝔸 n), expSeries]
/-- In a normed algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ`, the series defining the exponential map
has an infinite radius of convergence. -/
theorem expSeries_radius_eq_top : (expSeries 𝕂 𝔸).radius = ∞ := by
  refine' (expSeries 𝕂 𝔸).radius_eq_top_of_summable_norm fun r => _
  refine' .of_norm_bounded_eventually _ (Real.summable_pow_div_factorial r) _
  filter_upwards [eventually_cofinite_ne 0] with n hn
  rw [norm_mul, norm_norm (expSeries 𝕂 𝔸 n), expSeries]
  

Proof state:
case h
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁴ : IsROrC 𝕂
inst✝³ : NormedRing 𝔸
inst✝² : NormedAlgebra 𝕂 𝔸
inst✝¹ : NormedRing 𝔹
inst✝ : NormedAlgebra 𝕂 𝔹
r : NNReal
n : ℕ
hn : n ≠ 0
⊢ ‖(↑n !)⁻¹ • ContinuousMultilinearMap.mkPiAlgebraFin 𝕂 n 𝔸‖ * ‖↑r ^ n‖ ≤ ↑r ^ n / ↑n !

Next tactic:
rw [norm_smul (n ! : 𝕂)⁻¹ (ContinuousMultilinearMap.mkPiAlgebraFin 𝕂 n 𝔸)]
/-- In a normed algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ`, the series defining the exponential map
has an infinite radius of convergence. -/
theorem expSeries_radius_eq_top : (expSeries 𝕂 𝔸).radius = ∞ := by
  refine' (expSeries 𝕂 𝔸).radius_eq_top_of_summable_norm fun r => _
  refine' .of_norm_bounded_eventually _ (Real.summable_pow_div_factorial r) _
  filter_upwards [eventually_cofinite_ne 0] with n hn
  rw [norm_mul, norm_norm (expSeries 𝕂 𝔸 n), expSeries]
  rw [norm_smul (n ! : 𝕂)⁻¹ (ContinuousMultilinearMap.mkPiAlgebraFin 𝕂 n 𝔸)]
  -- porting note: Lean needed this to be explicit for some reason
  

Proof state:
case h
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁴ : IsROrC 𝕂
inst✝³ : NormedRing 𝔸
inst✝² : NormedAlgebra 𝕂 𝔸
inst✝¹ : NormedRing 𝔹
inst✝ : NormedAlgebra 𝕂 𝔹
r : NNReal
n : ℕ
hn : n ≠ 0
⊢ ‖(↑n !)⁻¹‖ * ‖ContinuousMultilinearMap.mkPiAlgebraFin 𝕂 n 𝔸‖ * ‖↑r ^ n‖ ≤ ↑r ^ n / ↑n !

Next tactic:
rw [norm_inv, norm_pow, NNReal.norm_eq, norm_natCast, mul_comm, ← mul_assoc, ← div_eq_mul_inv]
/-- In a normed algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ`, the series defining the exponential map
has an infinite radius of convergence. -/
theorem expSeries_radius_eq_top : (expSeries 𝕂 𝔸).radius = ∞ := by
  refine' (expSeries 𝕂 𝔸).radius_eq_top_of_summable_norm fun r => _
  refine' .of_norm_bounded_eventually _ (Real.summable_pow_div_factorial r) _
  filter_upwards [eventually_cofinite_ne 0] with n hn
  rw [norm_mul, norm_norm (expSeries 𝕂 𝔸 n), expSeries]
  rw [norm_smul (n ! : 𝕂)⁻¹ (ContinuousMultilinearMap.mkPiAlgebraFin 𝕂 n 𝔸)]
  -- porting note: Lean needed this to be explicit for some reason
  rw [norm_inv, norm_pow, NNReal.norm_eq, norm_natCast, mul_comm, ← mul_assoc, ← div_eq_mul_inv]
  

Proof state:
case h
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁴ : IsROrC 𝕂
inst✝³ : NormedRing 𝔸
inst✝² : NormedAlgebra 𝕂 𝔸
inst✝¹ : NormedRing 𝔹
inst✝ : NormedAlgebra 𝕂 𝔹
r : NNReal
n : ℕ
hn : n ≠ 0
⊢ ↑r ^ n / ↑n ! * ‖ContinuousMultilinearMap.mkPiAlgebraFin 𝕂 n 𝔸‖ ≤ ↑r ^ n / ↑n !

Next tactic:
have : ‖ContinuousMultilinearMap.mkPiAlgebraFin 𝕂 n 𝔸‖ ≤ 1 :=
    norm_mkPiAlgebraFin_le_of_pos (Ei := fun _ => 𝔸) (Nat.pos_of_ne_zero hn)
/-- In a normed algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ`, the series defining the exponential map
has an infinite radius of convergence. -/
theorem expSeries_radius_eq_top : (expSeries 𝕂 𝔸).radius = ∞ := by
  refine' (expSeries 𝕂 𝔸).radius_eq_top_of_summable_norm fun r => _
  refine' .of_norm_bounded_eventually _ (Real.summable_pow_div_factorial r) _
  filter_upwards [eventually_cofinite_ne 0] with n hn
  rw [norm_mul, norm_norm (expSeries 𝕂 𝔸 n), expSeries]
  rw [norm_smul (n ! : 𝕂)⁻¹ (ContinuousMultilinearMap.mkPiAlgebraFin 𝕂 n 𝔸)]
  -- porting note: Lean needed this to be explicit for some reason
  rw [norm_inv, norm_pow, NNReal.norm_eq, norm_natCast, mul_comm, ← mul_assoc, ← div_eq_mul_inv]
  have : ‖ContinuousMultilinearMap.mkPiAlgebraFin 𝕂 n 𝔸‖ ≤ 1 :=
    norm_mkPiAlgebraFin_le_of_pos (Ei := fun _ => 𝔸) (Nat.pos_of_ne_zero hn)
  

Proof state:
case h
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁴ : IsROrC 𝕂
inst✝³ : NormedRing 𝔸
inst✝² : NormedAlgebra 𝕂 𝔸
inst✝¹ : NormedRing 𝔹
inst✝ : NormedAlgebra 𝕂 𝔹
r : NNReal
n : ℕ
hn : n ≠ 0
this : ‖ContinuousMultilinearMap.mkPiAlgebraFin 𝕂 n 𝔸‖ ≤ 1
⊢ ↑r ^ n / ↑n ! * ‖ContinuousMultilinearMap.mkPiAlgebraFin 𝕂 n 𝔸‖ ≤ ↑r ^ n / ↑n !

Next tactic:
exact mul_le_of_le_one_right (div_nonneg (pow_nonneg r.coe_nonneg n) n !.cast_nonneg) this
theorem expSeries_radius_pos : 0 < (expSeries 𝕂 𝔸).radius := by
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁴ : IsROrC 𝕂
inst✝³ : NormedRing 𝔸
inst✝² : NormedAlgebra 𝕂 𝔸
inst✝¹ : NormedRing 𝔹
inst✝ : NormedAlgebra 𝕂 𝔹
⊢ 0 < FormalMultilinearSeries.radius (expSeries 𝕂 𝔸)

Next tactic:
rw [expSeries_radius_eq_top]
theorem expSeries_radius_pos : 0 < (expSeries 𝕂 𝔸).radius := by
  rw [expSeries_radius_eq_top]
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁴ : IsROrC 𝕂
inst✝³ : NormedRing 𝔸
inst✝² : NormedAlgebra 𝕂 𝔸
inst✝¹ : NormedRing 𝔹
inst✝ : NormedAlgebra 𝕂 𝔹
⊢ 0 < ⊤

Next tactic:
exact WithTop.zero_lt_top
@[continuity]
theorem exp_continuous : Continuous (exp 𝕂 : 𝔸 → 𝔸) := by
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁵ : IsROrC 𝕂
inst✝⁴ : NormedRing 𝔸
inst✝³ : NormedAlgebra 𝕂 𝔸
inst✝² : NormedRing 𝔹
inst✝¹ : NormedAlgebra 𝕂 𝔹
inst✝ : CompleteSpace 𝔸
⊢ Continuous (exp 𝕂)

Next tactic:
rw [continuous_iff_continuousOn_univ, ← Metric.eball_top_eq_univ (0 : 𝔸), ←
    expSeries_radius_eq_top 𝕂 𝔸]
@[continuity]
theorem exp_continuous : Continuous (exp 𝕂 : 𝔸 → 𝔸) := by
  rw [continuous_iff_continuousOn_univ, ← Metric.eball_top_eq_univ (0 : 𝔸), ←
    expSeries_radius_eq_top 𝕂 𝔸]
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁵ : IsROrC 𝕂
inst✝⁴ : NormedRing 𝔸
inst✝³ : NormedAlgebra 𝕂 𝔸
inst✝² : NormedRing 𝔹
inst✝¹ : NormedAlgebra 𝕂 𝔹
inst✝ : CompleteSpace 𝔸
⊢ ContinuousOn (exp 𝕂) (EMetric.ball 0 (FormalMultilinearSeries.radius (expSeries 𝕂 𝔸)))

Next tactic:
exact continuousOn_exp
theorem exp_mem_unitary_of_mem_skewAdjoint [StarRing 𝔸] [ContinuousStar 𝔸] {x : 𝔸}
    (h : x ∈ skewAdjoint 𝔸) : exp 𝕂 x ∈ unitary 𝔸 := by
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁷ : IsROrC 𝕂
inst✝⁶ : NormedRing 𝔸
inst✝⁵ : NormedAlgebra 𝕂 𝔸
inst✝⁴ : NormedRing 𝔹
inst✝³ : NormedAlgebra 𝕂 𝔹
inst✝² : CompleteSpace 𝔸
inst✝¹ : StarRing 𝔸
inst✝ : ContinuousStar 𝔸
x : 𝔸
h : x ∈ skewAdjoint 𝔸
⊢ exp 𝕂 x ∈ unitary 𝔸

Next tactic:
rw [unitary.mem_iff, star_exp, skewAdjoint.mem_iff.mp h, ←
    exp_add_of_commute (Commute.refl x).neg_left, ← exp_add_of_commute (Commute.refl x).neg_right,
    add_left_neg, add_right_neg, exp_zero, and_self_iff]
/-- In a Banach-algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ`, if a family of elements `f i` mutually
commute then `exp 𝕂 (∑ i, f i) = ∏ i, exp 𝕂 (f i)`. -/
theorem exp_sum_of_commute {ι} (s : Finset ι) (f : ι → 𝔸)
    (h : (s : Set ι).Pairwise fun i j => Commute (f i) (f j)) :
    exp 𝕂 (∑ i in s, f i) =
      s.noncommProd (fun i => exp 𝕂 (f i)) fun i hi j hj _ => (h.of_refl hi hj).exp 𝕂 := by
  

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁵ : IsROrC 𝕂
inst✝⁴ : NormedRing 𝔸
inst✝³ : NormedAlgebra 𝕂 𝔸
inst✝² : NormedRing 𝔹
inst✝¹ : NormedAlgebra 𝕂 𝔹
inst✝ : CompleteSpace 𝔸
ι : Type u_4
s : Finset ι
f : ι → 𝔸
h : Set.Pairwise ↑s fun i j => Commute (f i) (f j)
⊢ exp 𝕂 (∑ i in s, f i) =
    Finset.noncommProd s (fun i => exp 𝕂 (f i)) (_ : ∀ i ∈ ↑s, ∀ j ∈ ↑s, i ≠ j → Commute (exp 𝕂 (f i)) (exp 𝕂 (f j)))

Next tactic:
classical
    induction' s using Finset.induction_on with a s ha ih
    · simp
    rw [Finset.noncommProd_insert_of_not_mem _ _ _ _ ha, Finset.sum_insert ha, exp_add_of_commute,
      ih (h.mono <| Finset.subset_insert _ _)]
    refine' Commute.sum_right _ _ _ fun i hi => _
    exact h.of_refl (Finset.mem_insert_self _ _) (Finset.mem_insert_of_mem hi)
/-- In a Banach-algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ`, if a family of elements `f i` mutually
commute then `exp 𝕂 (∑ i, f i) = ∏ i, exp 𝕂 (f i)`. -/
theorem exp_sum_of_commute {ι} (s : Finset ι) (f : ι → 𝔸)
    (h : (s : Set ι).Pairwise fun i j => Commute (f i) (f j)) :
    exp 𝕂 (∑ i in s, f i) =
      s.noncommProd (fun i => exp 𝕂 (f i)) fun i hi j hj _ => (h.of_refl hi hj).exp 𝕂 := by
  classical
    

Proof state:
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁵ : IsROrC 𝕂
inst✝⁴ : NormedRing 𝔸
inst✝³ : NormedAlgebra 𝕂 𝔸
inst✝² : NormedRing 𝔹
inst✝¹ : NormedAlgebra 𝕂 𝔹
inst✝ : CompleteSpace 𝔸
ι : Type u_4
s : Finset ι
f : ι → 𝔸
h : Set.Pairwise ↑s fun i j => Commute (f i) (f j)
⊢ exp 𝕂 (∑ i in s, f i) =
    Finset.noncommProd s (fun i => exp 𝕂 (f i)) (_ : ∀ i ∈ ↑s, ∀ j ∈ ↑s, i ≠ j → Commute (exp 𝕂 (f i)) (exp 𝕂 (f j)))

Next tactic:
induction' s using Finset.induction_on with a s ha ih
/-- In a Banach-algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ`, if a family of elements `f i` mutually
commute then `exp 𝕂 (∑ i, f i) = ∏ i, exp 𝕂 (f i)`. -/
theorem exp_sum_of_commute {ι} (s : Finset ι) (f : ι → 𝔸)
    (h : (s : Set ι).Pairwise fun i j => Commute (f i) (f j)) :
    exp 𝕂 (∑ i in s, f i) =
      s.noncommProd (fun i => exp 𝕂 (f i)) fun i hi j hj _ => (h.of_refl hi hj).exp 𝕂 := by
  classical
    induction' s using Finset.induction_on with a s ha ih
    · 

Proof state:
case empty
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁵ : IsROrC 𝕂
inst✝⁴ : NormedRing 𝔸
inst✝³ : NormedAlgebra 𝕂 𝔸
inst✝² : NormedRing 𝔹
inst✝¹ : NormedAlgebra 𝕂 𝔹
inst✝ : CompleteSpace 𝔸
ι : Type u_4
f : ι → 𝔸
h : Set.Pairwise ↑∅ fun i j => Commute (f i) (f j)
⊢ exp 𝕂 (∑ i in ∅, f i) =
    Finset.noncommProd ∅ (fun i => exp 𝕂 (f i)) (_ : ∀ i ∈ ↑∅, ∀ j ∈ ↑∅, i ≠ j → Commute (exp 𝕂 (f i)) (exp 𝕂 (f j)))

Next tactic:
simp
/-- In a Banach-algebra `𝔸` over `𝕂 = ℝ` or `𝕂 = ℂ`, if a family of elements `f i` mutually
commute then `exp 𝕂 (∑ i, f i) = ∏ i, exp 𝕂 (f i)`. -/
theorem exp_sum_of_commute {ι} (s : Finset ι) (f : ι → 𝔸)
    (h : (s : Set ι).Pairwise fun i j => Commute (f i) (f j)) :
    exp 𝕂 (∑ i in s, f i) =
      s.noncommProd (fun i => exp 𝕂 (f i)) fun i hi j hj _ => (h.of_refl hi hj).exp 𝕂 := by
  classical
    induction' s using Finset.induction_on with a s ha ih
    · simp
    

Proof state:
case insert
𝕂 : Type u_1
𝔸 : Type u_2
𝔹 : Type u_3
inst✝⁵ : IsROrC 𝕂
inst✝⁴ : NormedRing 𝔸
inst✝³ : NormedAlgebra 𝕂 𝔸
inst✝² : NormedRing 𝔹
inst✝¹ : NormedAlgebra 𝕂 𝔹
inst✝ : CompleteSpace 𝔸
ι : Type u_4
f : ι → 𝔸
a : ι
s : Finset ι
ha : a ∉ s
ih :
  ∀ (h : Set.Pairwise ↑s fun i j => Commute (f i) (f j)),
    exp 𝕂 (∑ i in s, f i) =
      Finset.noncommProd s (fun i => exp 𝕂 (f i)) (_ : ∀ i ∈ ↑s, ∀ j ∈ ↑s, i ≠ j → Commute (exp 𝕂 (f i)) (exp 𝕂 (f j)))
h : Set.Pairwise ↑(insert a s) fun i j => Commute (f i) (f j)
⊢ exp 𝕂 (∑ i in insert a s, f i) =
    Finset.noncommProd (insert a s) (fun i => exp 𝕂 (f i))
      (_ : ∀ i ∈ ↑(insert a s), ∀ j ∈ ↑(insert a s), i ≠ j → Commute (exp 𝕂 (f i)) (exp 𝕂 (f j)))

Next tactic:
rw [Finset.noncommProd_insert_of_not_mem _ _ _ _ ha, Finset.sum_insert ha, exp_add_of_commute,
      ih (h.mono <| Finset.subset_insert _ _)]