Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2aabb1c
refactor(Analysis/NormedSpace/Exponential): remove the `𝕂` argument f…
eric-wieser Nov 12, 2023
2ab023d
downstream fixes
eric-wieser Nov 12, 2023
318a6b5
remove porting header
eric-wieser Nov 12, 2023
29371f1
style fixes
eric-wieser Nov 12, 2023
8756b5e
add back dropped lemma
eric-wieser Nov 12, 2023
fdec6d2
Merge remote-tracking branch 'origin/master' into eric-wieser/exp-rat
eric-wieser Nov 12, 2023
51d59c1
fix remaining downstream issues
eric-wieser Nov 12, 2023
667f721
long lines
eric-wieser Nov 12, 2023
85c30e4
Merge branch 'master' into eric-wieser/exp-rat
eric-wieser Nov 13, 2023
712f194
Merge remote-tracking branch 'origin/master' into eric-wieser/exp-rat
eric-wieser Jan 5, 2024
ec14e7e
fix a broken proof
eric-wieser Jan 5, 2024
4c88fd5
fixes
eric-wieser Feb 22, 2024
4352a0d
fix
eric-wieser Feb 22, 2024
b4f1125
fix lint
eric-wieser Feb 23, 2024
b19e1e0
Merge branch 'master' into eric-wieser/exp-rat
eric-wieser Feb 23, 2024
1c99cb3
Update DualNumber.lean
eric-wieser Feb 23, 2024
41597a6
Merge remote-tracking branch 'origin/master' into eric-wieser/exp-rat
eric-wieser Feb 27, 2024
ceffca9
Merge commit 'a8a6713b92e1dc246a2d2a5255bb2d1846e88fe2^' into eric-wi…
eric-wieser Apr 3, 2025
f8ce078
Merge commit 'a8a6713b92e1dc246a2d2a5255bb2d1846e88fe2' into eric-wie…
eric-wieser Apr 3, 2025
88a37c0
Merge tag 'v4.8.0' into eric-wieser/exp-rat
eric-wieser Apr 3, 2025
ddbeb05
Merge tag 'v4.9.0' into eric-wieser/exp-rat
eric-wieser Apr 3, 2025
5862361
Merge commit 'v4.10.0~350' into eric-wieser/exp-rat
eric-wieser Apr 3, 2025
20ee617
Merge commit 'v4.10.0~335' into eric-wieser/exp-rat
eric-wieser Apr 3, 2025
127517d
Merge commit 'v4.10.0~332' into eric-wieser/exp-rat
eric-wieser Apr 3, 2025
a42ae41
remove aligns
eric-wieser Apr 3, 2025
d740ffc
Merge commit 'v4.10.0~331' into eric-wieser/exp-rat
eric-wieser Apr 3, 2025
d49cc83
git Merge tag 'v4.10.0' into eric-wieser/exp-rat
eric-wieser Apr 3, 2025
f026156
Merge v4.11.0 into eric-wieser/exp-rat (using imerge)
eric-wieser Apr 3, 2025
cb3c28a
Merge v4.12.0 into eric-wieser/exp-rat (using imerge)
eric-wieser Apr 3, 2025
2cdf694
Merge tag 'v4.13.0' into eric-wieser/exp-rat
eric-wieser Apr 3, 2025
d1f757f
imerge 'v4.11.0': manual merge 1-90
eric-wieser Apr 3, 2025
d80e936
Merge tag 'v4.15.0' into eric-wieser/exp-rat
eric-wieser Apr 3, 2025
df1ede9
Merge tag 'v4.16.0' into eric-wieser/exp-rat
eric-wieser Apr 3, 2025
3855639
Merge tag 'v4.17.0' into eric-wieser/exp-rat
eric-wieser Apr 3, 2025
a6a04cf
Merge remote-tracking branch 'origin/master' into eric-wieser/exp-rat
eric-wieser Apr 3, 2025
7e6a65d
fix
eric-wieser Apr 3, 2025
4d5da7d
fix
eric-wieser Apr 3, 2025
58eeba7
another fix
eric-wieser Apr 3, 2025
48c2f09
one final fix
eric-wieser Apr 3, 2025
f31b802
getting close
eric-wieser Apr 3, 2025
765dbdb
lintfix
eric-wieser Apr 3, 2025
d69bbff
Finite regression
eric-wieser Apr 3, 2025
913bc45
fix
eric-wieser Apr 3, 2025
36187df
lost simp
eric-wieser Apr 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Mathlib/Analysis/CStarAlgebra/Exponential.lean
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ open NormedSpace -- For `NormedSpace.exp`.
section Star

variable {A : Type*} [NormedRing A] [NormedAlgebra ℂ A] [StarRing A] [ContinuousStar A]
[CompleteSpace A] [StarModule ℂ A]
[CompleteSpace A] [Algebra ℚ A] [StarModule ℂ A]

open Complex

/-- The map from the selfadjoint real subspace to the unitary group. This map only makes sense
over ℂ. -/
@[simps]
noncomputable def selfAdjoint.expUnitary (a : selfAdjoint A) : unitary A :=
⟨exp ((I • a.val) : A),
exp_mem_unitary_of_mem_skewAdjoint _ (a.prop.smul_mem_skewAdjoint conj_I)⟩
⟨exp ((I • a.val) : A),
exp_mem_unitary_of_mem_skewAdjoint (a.prop.smul_mem_skewAdjoint conj_I)⟩

open selfAdjoint

Expand All @@ -42,7 +42,7 @@ theorem Commute.expUnitary_add {a b : selfAdjoint A} (h : Commute (a : A) (b : A
have hcomm : Commute (I • (a : A)) (I • (b : A)) := by
unfold Commute SemiconjBy
simp only [h.eq, Algebra.smul_mul_assoc, Algebra.mul_smul_comm]
simpa only [expUnitary_coe, AddSubgroup.coe_add, smul_add] using exp_add_of_commute hcomm
simpa only [expUnitary_coe, AddSubgroup.coe_add, smul_add] using exp_add_of_commute hcomm

theorem Commute.expUnitary {a b : selfAdjoint A} (h : Commute (a : A) (b : A)) :
Commute (expUnitary a) (expUnitary b) :=
Expand Down
3 changes: 2 additions & 1 deletion Mathlib/Analysis/CStarAlgebra/Spectrum.lean
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ variable [StarModule ℂ A]
/-- Any element of the spectrum of a selfadjoint is real. -/
theorem IsSelfAdjoint.mem_spectrum_eq_re {a : A} (ha : IsSelfAdjoint a) {z : ℂ}
(hz : z ∈ spectrum ℂ a) : z = z.re := by
letI : Algebra ℚ A := RestrictScalars.algebra ℚ ℂ A
have hu := exp_mem_unitary_of_mem_skewAdjoint ℂ (ha.smul_mem_skewAdjoint conj_I)
let Iu := Units.mk0 I I_ne_zero
have : NormedSpace.exp (I • z) ∈ spectrum ℂ (NormedSpace.exp (I • a)) := by
have : NormedSpace.exp (I • z) ∈ spectrum ℂ (NormedSpace.exp (I • a)) := by
simpa only [Units.smul_def, Units.val_mk0] using
spectrum.exp_mem_exp (Iu • a) (smul_mem_smul_iff.mpr hz)
exact Complex.ext (ofReal_re _) <| by
Expand Down
404 changes: 219 additions & 185 deletions Mathlib/Analysis/Normed/Algebra/Exponential.lean

Large diffs are not rendered by default.

74 changes: 38 additions & 36 deletions Mathlib/Analysis/Normed/Algebra/MatrixExponential.lean
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ results for general rings are instead stated about `Ring.inverse`:

## TODO

* Show that `Matrix.det (NormedSpace.exp 𝕂 A) = NormedSpace.exp 𝕂 (Matrix.trace A)`
* Show that `Matrix.det (NormedSpace.exp A) = NormedSpace.exp (Matrix.trace A)`

## References

Expand All @@ -73,40 +73,40 @@ section Topological
section Ring

variable [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [∀ i, Fintype (n' i)]
[∀ i, DecidableEq (n' i)] [Field 𝕂] [Ring 𝔸] [TopologicalSpace 𝔸] [IsTopologicalRing 𝔸]
[Algebra 𝕂 𝔸] [T2Space 𝔸]
[∀ i, DecidableEq (n' i)] [Ring 𝔸] [TopologicalSpace 𝔸] [IsTopologicalRing 𝔸]
[Algebra 𝔸] [T2Space 𝔸]

theorem exp_diagonal (v : m → 𝔸) : exp 𝕂 (diagonal v) = diagonal (exp 𝕂 v) := by
theorem exp_diagonal (v : m → 𝔸) : exp (diagonal v) = diagonal (exp v) := by
simp_rw [exp_eq_tsum, diagonal_pow, ← diagonal_smul, ← diagonal_tsum]

theorem exp_blockDiagonal (v : m → Matrix n n 𝔸) :
exp 𝕂 (blockDiagonal v) = blockDiagonal (exp 𝕂 v) := by
exp (blockDiagonal v) = blockDiagonal (exp v) := by
simp_rw [exp_eq_tsum, ← blockDiagonal_pow, ← blockDiagonal_smul, ← blockDiagonal_tsum]

theorem exp_blockDiagonal' (v : ∀ i, Matrix (n' i) (n' i) 𝔸) :
exp 𝕂 (blockDiagonal' v) = blockDiagonal' (exp 𝕂 v) := by
exp (blockDiagonal' v) = blockDiagonal' (exp v) := by
simp_rw [exp_eq_tsum, ← blockDiagonal'_pow, ← blockDiagonal'_smul, ← blockDiagonal'_tsum]

theorem exp_conjTranspose [StarRing 𝔸] [ContinuousStar 𝔸] (A : Matrix m m 𝔸) :
exp 𝕂 Aᴴ = (exp 𝕂 A)ᴴ :=
exp Aᴴ = (exp A)ᴴ :=
(star_exp A).symm

theorem IsHermitian.exp [StarRing 𝔸] [ContinuousStar 𝔸] {A : Matrix m m 𝔸} (h : A.IsHermitian) :
(exp 𝕂 A).IsHermitian :=
(exp_conjTranspose _ _).symm.trans <| congr_arg _ h
(exp A).IsHermitian :=
(exp_conjTranspose _).symm.trans <| congr_arg _ h

end Ring

section CommRing

variable [Fintype m] [DecidableEq m] [Field 𝕂] [CommRing 𝔸] [TopologicalSpace 𝔸]
[IsTopologicalRing 𝔸] [Algebra 𝕂 𝔸] [T2Space 𝔸]
variable [Fintype m] [DecidableEq m] [CommRing 𝔸] [TopologicalSpace 𝔸]
[IsTopologicalRing 𝔸] [Algebra 𝔸] [T2Space 𝔸]

theorem exp_transpose (A : Matrix m m 𝔸) : exp 𝕂 Aᵀ = (exp 𝕂 A)ᵀ := by
theorem exp_transpose (A : Matrix m m 𝔸) : exp Aᵀ = (exp A)ᵀ := by
simp_rw [exp_eq_tsum, transpose_tsum, transpose_smul, transpose_pow]

theorem IsSymm.exp {A : Matrix m m 𝔸} (h : A.IsSymm) : (exp 𝕂 A).IsSymm :=
(exp_transpose _ _).symm.trans <| congr_arg _ h
theorem IsSymm.exp {A : Matrix m m 𝔸} (h : A.IsSymm) : (exp A).IsSymm :=
(exp_transpose _).symm.trans <| congr_arg _ h

end CommRing

Expand All @@ -115,75 +115,77 @@ end Topological
section Normed

variable [RCLike 𝕂] [Fintype m] [DecidableEq m]
[NormedRing 𝔸] [NormedAlgebra 𝕂 𝔸] [CompleteSpace 𝔸]
[NormedRing 𝔸] [Algebra ℚ 𝔸] [NormedAlgebra 𝕂 𝔸] [CompleteSpace 𝔸]
include 𝕂

nonrec theorem exp_add_of_commute (A B : Matrix m m 𝔸) (h : Commute A B) :
exp 𝕂 (A + B) = exp 𝕂 A * exp 𝕂 B := by
exp (A + B) = exp A * exp B := by
letI : SeminormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
letI : NormedRing (Matrix m m 𝔸) := Matrix.linftyOpNormedRing
letI : NormedAlgebra 𝕂 (Matrix m m 𝔸) := Matrix.linftyOpNormedAlgebra
exact exp_add_of_commute h
exact exp_add_of_commute 𝕂 h

open scoped Function in -- required for scoped `on` notation
nonrec theorem exp_sum_of_commute {ι} (s : Finset ι) (f : ι → Matrix m m 𝔸)
(h : (s : Set ι).Pairwise (Commute on f)) :
exp 𝕂 (∑ i ∈ s, f i) =
s.noncommProd (fun i => exp 𝕂 (f i)) fun _ hi _ hj _ => (h.of_refl hi hj).exp 𝕂 := by
exp (∑ i ∈ s, f i) =
s.noncommProd (fun i => exp (f i)) fun _ hi _ hj _ => (h.of_refl hi hj).exp := by
letI : SeminormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
letI : NormedRing (Matrix m m 𝔸) := Matrix.linftyOpNormedRing
letI : NormedAlgebra 𝕂 (Matrix m m 𝔸) := Matrix.linftyOpNormedAlgebra
exact exp_sum_of_commute s f h
exact exp_sum_of_commute 𝕂 s f h

nonrec theorem exp_nsmul (n : ℕ) (A : Matrix m m 𝔸) : exp 𝕂 (n • A) = exp 𝕂 A ^ n := by
nonrec theorem exp_nsmul (n : ℕ) (A : Matrix m m 𝔸) : exp (n • A) = exp A ^ n := by
letI : SeminormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
letI : NormedRing (Matrix m m 𝔸) := Matrix.linftyOpNormedRing
letI : NormedAlgebra 𝕂 (Matrix m m 𝔸) := Matrix.linftyOpNormedAlgebra
exact exp_nsmul n A
exact exp_nsmul 𝕂 n A

nonrec theorem isUnit_exp (A : Matrix m m 𝔸) : IsUnit (exp 𝕂 A) := by
nonrec theorem isUnit_exp (A : Matrix m m 𝔸) : IsUnit (exp A) := by
letI : SeminormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
letI : NormedRing (Matrix m m 𝔸) := Matrix.linftyOpNormedRing
letI : NormedAlgebra 𝕂 (Matrix m m 𝔸) := Matrix.linftyOpNormedAlgebra
exact isUnit_exp _ A
exact isUnit_exp 𝕂 A

nonrec theorem exp_units_conj (U : (Matrix m m 𝔸)ˣ) (A : Matrix m m 𝔸) :
exp 𝕂 (U * A * U⁻¹) = U * exp 𝕂 A * U⁻¹ := by
exp (U * A * U⁻¹) = U * exp A * U⁻¹ := by
letI : SeminormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
letI : NormedRing (Matrix m m 𝔸) := Matrix.linftyOpNormedRing
letI : NormedAlgebra 𝕂 (Matrix m m 𝔸) := Matrix.linftyOpNormedAlgebra
exact exp_units_conj _ U A
exact exp_units_conj 𝕂 U A

theorem exp_units_conj' (U : (Matrix m m 𝔸)ˣ) (A : Matrix m m 𝔸) :
exp 𝕂 (U⁻¹ * A * U) = U⁻¹ * exp 𝕂 A * U :=
exp (U⁻¹ * A * U) = U⁻¹ * exp A * U :=
exp_units_conj 𝕂 U⁻¹ A

end Normed

section NormedComm

variable [RCLike 𝕂] [Fintype m] [DecidableEq m]
[NormedCommRing 𝔸] [NormedAlgebra 𝕂 𝔸] [CompleteSpace 𝔸]
[NormedCommRing 𝔸] [Algebra ℚ 𝔸] [NormedAlgebra 𝕂 𝔸] [CompleteSpace 𝔸]
include 𝕂

theorem exp_neg (A : Matrix m m 𝔸) : exp 𝕂 (-A) = (exp 𝕂 A)⁻¹ := by
theorem exp_neg (A : Matrix m m 𝔸) : exp (-A) = (exp A)⁻¹ := by
rw [nonsing_inv_eq_ring_inverse]
letI : SeminormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
letI : NormedRing (Matrix m m 𝔸) := Matrix.linftyOpNormedRing
letI : NormedAlgebra 𝕂 (Matrix m m 𝔸) := Matrix.linftyOpNormedAlgebra
exact (Ring.inverse_exp _ A).symm
exact (Ring.inverse_exp 𝕂 A).symm

theorem exp_zsmul (z : ℤ) (A : Matrix m m 𝔸) : exp 𝕂 (z • A) = exp 𝕂 A ^ z := by
theorem exp_zsmul (z : ℤ) (A : Matrix m m 𝔸) : exp (z • A) = exp A ^ z := by
obtain ⟨n, rfl | rfl⟩ := z.eq_nat_or_neg
· rw [zpow_natCast, natCast_zsmul, exp_nsmul]
· have : IsUnit (exp 𝕂 A).det := (Matrix.isUnit_iff_isUnit_det _).mp (isUnit_exp _ _)
rw [Matrix.zpow_neg this, zpow_natCast, neg_smul, exp_neg, natCast_zsmul, exp_nsmul]
· rw [zpow_natCast, natCast_zsmul, exp_nsmul 𝕂]
· have : IsUnit (exp A).det := (Matrix.isUnit_iff_isUnit_det _).mp (isUnit_exp 𝕂 _)
rw [Matrix.zpow_neg this, zpow_natCast, neg_smul, exp_neg 𝕂, natCast_zsmul, exp_nsmul 𝕂]

theorem exp_conj (U : Matrix m m 𝔸) (A : Matrix m m 𝔸) (hy : IsUnit U) :
exp 𝕂 (U * A * U⁻¹) = U * exp 𝕂 A * U⁻¹ :=
exp (U * A * U⁻¹) = U * exp A * U⁻¹ :=
let ⟨u, hu⟩ := hy
hu ▸ by simpa only [Matrix.coe_units_inv] using exp_units_conj 𝕂 u A

theorem exp_conj' (U : Matrix m m 𝔸) (A : Matrix m m 𝔸) (hy : IsUnit U) :
exp 𝕂 (U⁻¹ * A * U) = U⁻¹ * exp 𝕂 A * U :=
exp (U⁻¹ * A * U) = U⁻¹ * exp A * U :=
let ⟨u, hu⟩ := hy
hu ▸ by simpa only [Matrix.coe_units_inv] using exp_units_conj' 𝕂 u A

Expand Down
30 changes: 15 additions & 15 deletions Mathlib/Analysis/Normed/Algebra/QuaternionExponential.lean
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ open NormedSpace
namespace Quaternion

@[simp, norm_cast]
theorem exp_coe (r : ℝ) : exp (r : ℍ[ℝ]) = ↑(exp r) :=
theorem exp_coe (r : ℝ) : exp (r : ℍ[ℝ]) = ↑(exp r) :=
(map_exp ℝ (algebraMap ℝ ℍ[ℝ]) (continuous_algebraMap _ _) _).symm

/-- The even terms of `expSeries` are real, and correspond to the series for $\cos ‖q‖$. -/
Expand Down Expand Up @@ -92,45 +92,45 @@ theorem hasSum_expSeries_of_imaginary {q : Quaternion ℝ} (hq : q.re = 0) {c s

/-- The closed form for the quaternion exponential on imaginary quaternions. -/
theorem exp_of_re_eq_zero (q : Quaternion ℝ) (hq : q.re = 0) :
exp q = ↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q := by
exp q = ↑(Real.cos ‖q‖) + (Real.sin ‖q‖ / ‖q‖) • q := by
rw [exp_eq_tsum]
refine HasSum.tsum_eq ?_
simp_rw [← expSeries_apply_eq]
simp_rw [← expSeries_apply_eq, ← expSeries_eq_expSeries_rat ℝ]
exact hasSum_expSeries_of_imaginary hq (Real.hasSum_cos _) (Real.hasSum_sin _)

/-- The closed form for the quaternion exponential on arbitrary quaternions. -/
theorem exp_eq (q : Quaternion ℝ) :
exp q = exp q.re • (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im) := by
rw [← exp_of_re_eq_zero q.im q.im_re, ← coe_mul_eq_smul, ← exp_coe, ← exp_add_of_commute,
exp q = exp q.re • (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im) := by
rw [← exp_of_re_eq_zero q.im q.im_re, ← coe_mul_eq_smul, ← exp_coe, ← exp_add_of_commute,
re_add_im]
exact Algebra.commutes q.re (_ : ℍ[ℝ])

theorem re_exp (q : ℍ[ℝ]) : (exp q).re = exp q.re * Real.cos ‖q - q.re‖ := by simp [exp_eq]
theorem re_exp (q : ℍ[ℝ]) : (exp q).re = exp q.re * Real.cos ‖q - q.re‖ := by simp [exp_eq]

theorem im_exp (q : ℍ[ℝ]) : (exp q).im = (exp q.re * (Real.sin ‖q.im‖ / ‖q.im‖)) • q.im := by
theorem im_exp (q : ℍ[ℝ]) : (exp q).im = (exp q.re * (Real.sin ‖q.im‖ / ‖q.im‖)) • q.im := by
simp [exp_eq, smul_smul]

theorem normSq_exp (q : ℍ[ℝ]) : normSq (exp q) = exp q.re ^ 2 :=
theorem normSq_exp (q : ℍ[ℝ]) : normSq (exp q) = exp q.re ^ 2 :=
calc
normSq (exp q) =
normSq (exp q.re • (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im)) := by
normSq (exp q) =
normSq (exp q.re • (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im)) := by
rw [exp_eq]
_ = exp q.re ^ 2 * normSq (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im) := by
_ = exp q.re ^ 2 * normSq (↑(Real.cos ‖q.im‖) + (Real.sin ‖q.im‖ / ‖q.im‖) • q.im) := by
rw [normSq_smul]
_ = exp q.re ^ 2 * (Real.cos ‖q.im‖ ^ 2 + Real.sin ‖q.im‖ ^ 2) := by
_ = exp q.re ^ 2 * (Real.cos ‖q.im‖ ^ 2 + Real.sin ‖q.im‖ ^ 2) := by
congr 1
obtain hv | hv := eq_or_ne ‖q.im‖ 0
· simp [hv]
rw [normSq_add, normSq_smul, star_smul, coe_mul_eq_smul, smul_re, smul_re, star_re, im_re,
smul_zero, smul_zero, mul_zero, add_zero, div_pow, normSq_coe,
normSq_eq_norm_mul_self, ← sq, div_mul_cancel₀ _ (pow_ne_zero _ hv)]
_ = exp q.re ^ 2 := by rw [Real.cos_sq_add_sin_sq, mul_one]
_ = exp q.re ^ 2 := by rw [Real.cos_sq_add_sin_sq, mul_one]

/-- Note that this implies that exponentials of pure imaginary quaternions are unit quaternions
since in that case the RHS is `1` via `NormedSpace.exp_zero` and `norm_one`. -/
@[simp]
theorem norm_exp (q : ℍ[ℝ]) : ‖exp q‖ = ‖exp q.re‖ := by
rw [norm_eq_sqrt_real_inner (exp q), inner_self, normSq_exp, Real.sqrt_sq_eq_abs,
theorem norm_exp (q : ℍ[ℝ]) : ‖exp q‖ = ‖exp q.re‖ := by
rw [norm_eq_sqrt_real_inner (exp q), inner_self, normSq_exp, Real.sqrt_sq_eq_abs,
Real.norm_eq_abs]

end Quaternion
20 changes: 11 additions & 9 deletions Mathlib/Analysis/Normed/Algebra/Spectrum.lean
Original file line number Diff line number Diff line change
Expand Up @@ -468,11 +468,11 @@ section ExpMapping

local notation "↑ₐ" => algebraMap 𝕜 A

/-- For `𝕜 = ℝ` or `𝕜 = ℂ`, `exp 𝕜` maps the spectrum of `a` into the spectrum of `exp 𝕜 a`. -/
theorem exp_mem_exp [RCLike 𝕜] [NormedRing A] [NormedAlgebra 𝕜 A] [CompleteSpace A] (a : A)
{z : 𝕜} (hz : z ∈ spectrum 𝕜 a) : exp 𝕜 z ∈ spectrum 𝕜 (exp 𝕜 a) := by
have hexpmul : exp 𝕜 a = exp 𝕜 (a - ↑ₐ z) * ↑ₐ (exp 𝕜 z) := by
rw [algebraMap_exp_comm z, ← exp_add_of_commute (Algebra.commutes z (a - ↑ₐ z)).symm,
/-- For `𝕜 = ℝ` or `𝕜 = ℂ`, `exp` maps the spectrum of `a` into the spectrum of `exp a`. -/
theorem exp_mem_exp [RCLike 𝕜] [NormedRing A] [Algebra ℚ A] [NormedAlgebra 𝕜 A] [CompleteSpace A]
(a : A) {z : 𝕜} (hz : z ∈ spectrum 𝕜 a) : exp z ∈ spectrum 𝕜 (exp a) := by
have hexpmul : exp a = exp (a - ↑ₐ z) * ↑ₐ (exp z) := by
rw [algebraMap_exp_comm z, ← exp_add_of_commute 𝕜 (Algebra.commutes z (a - ↑ₐ z)).symm,
sub_add_cancel]
let b := ∑' n : ℕ, ((n + 1).factorial⁻¹ : 𝕜) • (a - ↑ₐ z) ^ n
have hb : Summable fun n : ℕ => ((n + 1).factorial⁻¹ : 𝕜) • (a - ↑ₐ z) ^ n := by
Expand All @@ -485,13 +485,15 @@ theorem exp_mem_exp [RCLike 𝕜] [NormedRing A] [NormedAlgebra 𝕜 A] [Complet
simpa only [mul_smul_comm, pow_succ'] using hb.tsum_mul_left (a - ↑ₐ z)
have h₁ : (∑' n : ℕ, ((n + 1).factorial⁻¹ : 𝕜) • (a - ↑ₐ z) ^ (n + 1)) = b * (a - ↑ₐ z) := by
simpa only [pow_succ, Algebra.smul_mul_assoc] using hb.tsum_mul_right (a - ↑ₐ z)
have h₃ : exp 𝕜 (a - ↑ₐ z) = 1 + (a - ↑ₐ z) * b := by
have h₃ : exp (a - ↑ₐ z) = 1 + (a - ↑ₐ z) * b := by
rw [exp_eq_tsum]
convert tsum_eq_zero_add (expSeries_summable' (𝕂 := 𝕜) (a - ↑ₐ z))
· simp only [Nat.factorial_zero, Nat.cast_one, inv_one, pow_zero, one_smul]
· exact h₀.symm
rw [spectrum.mem_iff, IsUnit.sub_iff, ← one_mul (↑ₐ (exp 𝕜 z)), hexpmul, ← _root_.sub_mul,
Commute.isUnit_mul_iff (Algebra.commutes (exp 𝕜 z) (exp 𝕜 (a - ↑ₐ z) - 1)).symm,
· convert h₀.symm
ext a
exact inv_natCast_smul_eq ℚ 𝕜 _ a
rw [spectrum.mem_iff, IsUnit.sub_iff, ← one_mul (↑ₐ (exp z)), hexpmul, ← _root_.sub_mul,
Commute.isUnit_mul_iff (Algebra.commutes (exp z) (exp (a - ↑ₐ z) - 1)).symm,
sub_eq_iff_eq_add'.mpr h₃, Commute.isUnit_mul_iff (h₀ ▸ h₁ : (a - ↑ₐ z) * b = b * (a - ↑ₐ z))]
exact not_and_of_not_left _ (not_and_of_not_left _ ((not_iff_not.mpr IsUnit.sub_iff).mp hz))

Expand Down
Loading
Loading