analysis.normed_space.matrix_exponentialMathlib.Analysis.NormedSpace.MatrixExponential

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -5,7 +5,7 @@ Authors: Eric Wieser
 -/
 import Analysis.NormedSpace.Exponential
 import Analysis.Matrix
-import LinearAlgebra.Matrix.Zpow
+import LinearAlgebra.Matrix.ZPow
 import LinearAlgebra.Matrix.Hermitian
 import LinearAlgebra.Matrix.Symmetric
 import Topology.UniformSpace.Matrix
@@ -174,7 +174,7 @@ end Topological
 
 section Normed
 
-variable [IsROrC 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [∀ i, Fintype (n' i)]
+variable [RCLike 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [∀ i, Fintype (n' i)]
   [∀ i, DecidableEq (n' i)] [NormedRing 𝔸] [NormedAlgebra 𝕂 𝔸] [CompleteSpace 𝔸]
 
 #print Matrix.exp_add_of_commute /-
@@ -244,7 +244,7 @@ end Normed
 
 section NormedComm
 
-variable [IsROrC 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [∀ i, Fintype (n' i)]
+variable [RCLike 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [∀ i, Fintype (n' i)]
   [∀ i, DecidableEq (n' i)] [NormedCommRing 𝔸] [NormedAlgebra 𝕂 𝔸] [CompleteSpace 𝔸]
 
 #print Matrix.exp_neg /-
@@ -263,10 +263,10 @@ theorem exp_zsmul (z : ℤ) (A : Matrix m m 𝔸) :
     NormedSpace.exp 𝕂 (z • A) = NormedSpace.exp 𝕂 A ^ z :=
   by
   obtain ⟨n, rfl | rfl⟩ := z.eq_coe_or_neg
-  · rw [zpow_coe_nat, coe_nat_zsmul, NormedSpace.exp_nsmul]
+  · rw [zpow_natCast, natCast_zsmul, NormedSpace.exp_nsmul]
   · have : IsUnit (NormedSpace.exp 𝕂 A).det :=
       (Matrix.isUnit_iff_isUnit_det _).mp (NormedSpace.isUnit_exp _ _)
-    rw [Matrix.zpow_neg this, zpow_coe_nat, neg_smul, NormedSpace.exp_neg, coe_nat_zsmul,
+    rw [Matrix.zpow_neg this, zpow_natCast, neg_smul, NormedSpace.exp_neg, natCast_zsmul,
       NormedSpace.exp_nsmul]
 #align matrix.exp_zsmul Matrix.exp_zsmul
 -/
Diff
@@ -263,10 +263,10 @@ theorem exp_zsmul (z : ℤ) (A : Matrix m m 𝔸) :
     NormedSpace.exp 𝕂 (z • A) = NormedSpace.exp 𝕂 A ^ z :=
   by
   obtain ⟨n, rfl | rfl⟩ := z.eq_coe_or_neg
-  · rw [zpow_ofNat, coe_nat_zsmul, NormedSpace.exp_nsmul]
+  · rw [zpow_coe_nat, coe_nat_zsmul, NormedSpace.exp_nsmul]
   · have : IsUnit (NormedSpace.exp 𝕂 A).det :=
       (Matrix.isUnit_iff_isUnit_det _).mp (NormedSpace.isUnit_exp _ _)
-    rw [Matrix.zpow_neg this, zpow_ofNat, neg_smul, NormedSpace.exp_neg, coe_nat_zsmul,
+    rw [Matrix.zpow_neg this, zpow_coe_nat, neg_smul, NormedSpace.exp_neg, coe_nat_zsmul,
       NormedSpace.exp_nsmul]
 #align matrix.exp_zsmul Matrix.exp_zsmul
 -/
Diff
@@ -113,35 +113,38 @@ variable [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [∀ i, Fintype
   [Algebra 𝕂 𝔸] [T2Space 𝔸]
 
 #print Matrix.exp_diagonal /-
-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_diagonal (v : m → 𝔸) :
+    NormedSpace.exp 𝕂 (diagonal v) = diagonal (NormedSpace.exp 𝕂 v) := by
+  simp_rw [NormedSpace.exp_eq_tsum, diagonal_pow, ← diagonal_smul, ← diagonal_tsum]
 #align matrix.exp_diagonal Matrix.exp_diagonal
 -/
 
 #print Matrix.exp_blockDiagonal /-
 theorem exp_blockDiagonal (v : m → Matrix n n 𝔸) :
-    exp 𝕂 (blockDiagonal v) = blockDiagonal (exp 𝕂 v) := by
-  simp_rw [exp_eq_tsum, ← block_diagonal_pow, ← block_diagonal_smul, ← block_diagonal_tsum]
+    NormedSpace.exp 𝕂 (blockDiagonal v) = blockDiagonal (NormedSpace.exp 𝕂 v) := by
+  simp_rw [NormedSpace.exp_eq_tsum, ← block_diagonal_pow, ← block_diagonal_smul, ←
+    block_diagonal_tsum]
 #align matrix.exp_block_diagonal Matrix.exp_blockDiagonal
 -/
 
 #print Matrix.exp_blockDiagonal' /-
 theorem exp_blockDiagonal' (v : ∀ i, Matrix (n' i) (n' i) 𝔸) :
-    exp 𝕂 (blockDiagonal' v) = blockDiagonal' (exp 𝕂 v) := by
-  simp_rw [exp_eq_tsum, ← block_diagonal'_pow, ← block_diagonal'_smul, ← block_diagonal'_tsum]
+    NormedSpace.exp 𝕂 (blockDiagonal' v) = blockDiagonal' (NormedSpace.exp 𝕂 v) := by
+  simp_rw [NormedSpace.exp_eq_tsum, ← block_diagonal'_pow, ← block_diagonal'_smul, ←
+    block_diagonal'_tsum]
 #align matrix.exp_block_diagonal' Matrix.exp_blockDiagonal'
 -/
 
 #print Matrix.exp_conjTranspose /-
 theorem exp_conjTranspose [StarRing 𝔸] [ContinuousStar 𝔸] (A : Matrix m m 𝔸) :
-    exp 𝕂 Aᴴ = (exp 𝕂 A)ᴴ :=
-  (star_exp A).symm
+    NormedSpace.exp 𝕂 Aᴴ = (NormedSpace.exp 𝕂 A)ᴴ :=
+  (NormedSpace.star_exp A).symm
 #align matrix.exp_conj_transpose Matrix.exp_conjTranspose
 -/
 
 #print Matrix.IsHermitian.exp /-
 theorem IsHermitian.exp [StarRing 𝔸] [ContinuousStar 𝔸] {A : Matrix m m 𝔸} (h : A.IsHermitian) :
-    (exp 𝕂 A).IsHermitian :=
+    (NormedSpace.exp 𝕂 A).IsHermitian :=
   (exp_conjTranspose _ _).symm.trans <| congr_arg _ h
 #align matrix.is_hermitian.exp Matrix.IsHermitian.exp
 -/
@@ -154,13 +157,13 @@ variable [Fintype m] [DecidableEq m] [Field 𝕂] [CommRing 𝔸] [TopologicalSp
   [Algebra 𝕂 𝔸] [T2Space 𝔸]
 
 #print Matrix.exp_transpose /-
-theorem exp_transpose (A : Matrix m m 𝔸) : exp 𝕂 Aᵀ = (exp 𝕂 A)ᵀ := by
-  simp_rw [exp_eq_tsum, transpose_tsum, transpose_smul, transpose_pow]
+theorem exp_transpose (A : Matrix m m 𝔸) : NormedSpace.exp 𝕂 Aᵀ = (NormedSpace.exp 𝕂 A)ᵀ := by
+  simp_rw [NormedSpace.exp_eq_tsum, transpose_tsum, transpose_smul, transpose_pow]
 #align matrix.exp_transpose Matrix.exp_transpose
 -/
 
 #print Matrix.IsSymm.exp /-
-theorem IsSymm.exp {A : Matrix m m 𝔸} (h : A.IsSymm) : (exp 𝕂 A).IsSymm :=
+theorem IsSymm.exp {A : Matrix m m 𝔸} (h : A.IsSymm) : (NormedSpace.exp 𝕂 A).IsSymm :=
   (exp_transpose _ _).symm.trans <| congr_arg _ h
 #align matrix.is_symm.exp Matrix.IsSymm.exp
 -/
@@ -176,62 +179,63 @@ variable [IsROrC 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [
 
 #print Matrix.exp_add_of_commute /-
 theorem exp_add_of_commute (A B : Matrix m m 𝔸) (h : Commute A B) :
-    exp 𝕂 (A + B) = exp 𝕂 A ⬝ exp 𝕂 B :=
+    NormedSpace.exp 𝕂 (A + B) = NormedSpace.exp 𝕂 A ⬝ NormedSpace.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 NormedSpace.exp_add_of_commute h
 #align matrix.exp_add_of_commute Matrix.exp_add_of_commute
 -/
 
 #print Matrix.exp_sum_of_commute /-
 theorem exp_sum_of_commute {ι} (s : Finset ι) (f : ι → Matrix m m 𝔸)
     (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 𝕂 :=
+    NormedSpace.exp 𝕂 (∑ i in s, f i) =
+      s.noncommProd (fun i => NormedSpace.exp 𝕂 (f i)) fun i hi j 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 NormedSpace.exp_sum_of_commute s f h
 #align matrix.exp_sum_of_commute Matrix.exp_sum_of_commute
 -/
 
 #print Matrix.exp_nsmul /-
-theorem exp_nsmul (n : ℕ) (A : Matrix m m 𝔸) : exp 𝕂 (n • A) = exp 𝕂 A ^ n :=
+theorem exp_nsmul (n : ℕ) (A : Matrix m m 𝔸) :
+    NormedSpace.exp 𝕂 (n • A) = NormedSpace.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 NormedSpace.exp_nsmul n A
 #align matrix.exp_nsmul Matrix.exp_nsmul
 -/
 
 #print Matrix.isUnit_exp /-
-theorem isUnit_exp (A : Matrix m m 𝔸) : IsUnit (exp 𝕂 A) :=
+theorem isUnit_exp (A : Matrix m m 𝔸) : IsUnit (NormedSpace.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 NormedSpace.isUnit_exp _ A
 #align matrix.is_unit_exp Matrix.isUnit_exp
 -/
 
 #print Matrix.exp_units_conj /-
 theorem exp_units_conj (U : (Matrix m m 𝔸)ˣ) (A : Matrix m m 𝔸) :
-    exp 𝕂 (↑U ⬝ A ⬝ ↑U⁻¹ : Matrix m m 𝔸) = ↑U ⬝ exp 𝕂 A ⬝ ↑U⁻¹ :=
+    NormedSpace.exp 𝕂 (↑U ⬝ A ⬝ ↑U⁻¹ : Matrix m m 𝔸) = ↑U ⬝ NormedSpace.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 NormedSpace.exp_units_conj _ U A
 #align matrix.exp_units_conj Matrix.exp_units_conj
 -/
 
 #print Matrix.exp_units_conj' /-
 theorem exp_units_conj' (U : (Matrix m m 𝔸)ˣ) (A : Matrix m m 𝔸) :
-    exp 𝕂 (↑U⁻¹ ⬝ A ⬝ U : Matrix m m 𝔸) = ↑U⁻¹ ⬝ exp 𝕂 A ⬝ U :=
+    NormedSpace.exp 𝕂 (↑U⁻¹ ⬝ A ⬝ U : Matrix m m 𝔸) = ↑U⁻¹ ⬝ NormedSpace.exp 𝕂 A ⬝ U :=
   exp_units_conj 𝕂 U⁻¹ A
 #align matrix.exp_units_conj' Matrix.exp_units_conj'
 -/
@@ -244,7 +248,7 @@ variable [IsROrC 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [
   [∀ i, DecidableEq (n' i)] [NormedCommRing 𝔸] [NormedAlgebra 𝕂 𝔸] [CompleteSpace 𝔸]
 
 #print Matrix.exp_neg /-
-theorem exp_neg (A : Matrix m m 𝔸) : exp 𝕂 (-A) = (exp 𝕂 A)⁻¹ :=
+theorem exp_neg (A : Matrix m m 𝔸) : NormedSpace.exp 𝕂 (-A) = (NormedSpace.exp 𝕂 A)⁻¹ :=
   by
   rw [nonsing_inv_eq_ring_inverse]
   letI : SeminormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
@@ -255,28 +259,31 @@ theorem exp_neg (A : Matrix m m 𝔸) : exp 𝕂 (-A) = (exp 𝕂 A)⁻¹ :=
 -/
 
 #print Matrix.exp_zsmul /-
-theorem exp_zsmul (z : ℤ) (A : Matrix m m 𝔸) : exp 𝕂 (z • A) = exp 𝕂 A ^ z :=
+theorem exp_zsmul (z : ℤ) (A : Matrix m m 𝔸) :
+    NormedSpace.exp 𝕂 (z • A) = NormedSpace.exp 𝕂 A ^ z :=
   by
   obtain ⟨n, rfl | rfl⟩ := z.eq_coe_or_neg
-  · rw [zpow_ofNat, coe_nat_zsmul, exp_nsmul]
-  · have : IsUnit (exp 𝕂 A).det := (Matrix.isUnit_iff_isUnit_det _).mp (isUnit_exp _ _)
-    rw [Matrix.zpow_neg this, zpow_ofNat, neg_smul, exp_neg, coe_nat_zsmul, exp_nsmul]
+  · rw [zpow_ofNat, coe_nat_zsmul, NormedSpace.exp_nsmul]
+  · have : IsUnit (NormedSpace.exp 𝕂 A).det :=
+      (Matrix.isUnit_iff_isUnit_det _).mp (NormedSpace.isUnit_exp _ _)
+    rw [Matrix.zpow_neg this, zpow_ofNat, neg_smul, NormedSpace.exp_neg, coe_nat_zsmul,
+      NormedSpace.exp_nsmul]
 #align matrix.exp_zsmul Matrix.exp_zsmul
 -/
 
 #print Matrix.exp_conj /-
 theorem exp_conj (U : Matrix m m 𝔸) (A : Matrix m m 𝔸) (hy : IsUnit U) :
-    exp 𝕂 (U ⬝ A ⬝ U⁻¹) = U ⬝ exp 𝕂 A ⬝ U⁻¹ :=
+    NormedSpace.exp 𝕂 (U ⬝ A ⬝ U⁻¹) = U ⬝ NormedSpace.exp 𝕂 A ⬝ U⁻¹ :=
   let ⟨u, hu⟩ := hy
-  hu ▸ by simpa only [Matrix.coe_units_inv] using exp_units_conj 𝕂 u A
+  hu ▸ by simpa only [Matrix.coe_units_inv] using NormedSpace.exp_units_conj 𝕂 u A
 #align matrix.exp_conj Matrix.exp_conj
 -/
 
 #print Matrix.exp_conj' /-
 theorem exp_conj' (U : Matrix m m 𝔸) (A : Matrix m m 𝔸) (hy : IsUnit U) :
-    exp 𝕂 (U⁻¹ ⬝ A ⬝ U) = U⁻¹ ⬝ exp 𝕂 A ⬝ U :=
+    NormedSpace.exp 𝕂 (U⁻¹ ⬝ A ⬝ U) = U⁻¹ ⬝ NormedSpace.exp 𝕂 A ⬝ U :=
   let ⟨u, hu⟩ := hy
-  hu ▸ by simpa only [Matrix.coe_units_inv] using exp_units_conj' 𝕂 u A
+  hu ▸ by simpa only [Matrix.coe_units_inv] using NormedSpace.exp_units_conj' 𝕂 u A
 #align matrix.exp_conj' Matrix.exp_conj'
 -/
 
Diff
@@ -3,12 +3,12 @@ Copyright (c) 2022 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 -/
-import Mathbin.Analysis.NormedSpace.Exponential
-import Mathbin.Analysis.Matrix
-import Mathbin.LinearAlgebra.Matrix.Zpow
-import Mathbin.LinearAlgebra.Matrix.Hermitian
-import Mathbin.LinearAlgebra.Matrix.Symmetric
-import Mathbin.Topology.UniformSpace.Matrix
+import Analysis.NormedSpace.Exponential
+import Analysis.Matrix
+import LinearAlgebra.Matrix.Zpow
+import LinearAlgebra.Matrix.Hermitian
+import LinearAlgebra.Matrix.Symmetric
+import Topology.UniformSpace.Matrix
 
 #align_import analysis.normed_space.matrix_exponential from "leanprover-community/mathlib"@"5d0c76894ada7940957143163d7b921345474cbc"
 
Diff
@@ -73,38 +73,30 @@ open scoped Matrix BigOperators
 
 section HacksForPiInstanceSearch
 
-#print Function.topologicalRing /-
 /-- A special case of `pi.topological_ring` for when `R` is not dependently typed. -/
 instance Function.topologicalRing (I : Type _) (R : Type _) [NonUnitalRing R] [TopologicalSpace R]
     [TopologicalRing R] : TopologicalRing (I → R) :=
   Pi.instTopologicalRing
 #align function.topological_ring Function.topologicalRing
--/
 
-#print Function.algebraRing /-
 /-- A special case of `function.algebra` for when A is a `ring` not a `semiring` -/
 instance Function.algebraRing (I : Type _) {R : Type _} (A : Type _) [CommSemiring R] [Ring A]
     [Algebra R A] : Algebra R (I → A) :=
   Pi.algebra _ _
 #align function.algebra_ring Function.algebraRing
--/
 
-#print Pi.matrixAlgebra /-
 /-- A special case of `pi.algebra` for when `f = λ i, matrix (m i) (m i) A`. -/
 instance Pi.matrixAlgebra (I R A : Type _) (m : I → Type _) [CommSemiring R] [Semiring A]
     [Algebra R A] [∀ i, Fintype (m i)] [∀ i, DecidableEq (m i)] :
     Algebra R (∀ i, Matrix (m i) (m i) A) :=
   @Pi.algebra I R (fun i => Matrix (m i) (m i) A) _ _ fun i => Matrix.instAlgebra
 #align pi.matrix_algebra Pi.matrixAlgebra
--/
 
-#print Pi.matrix_topologicalRing /-
 /-- A special case of `pi.topological_ring` for when `f = λ i, matrix (m i) (m i) A`. -/
 instance Pi.matrix_topologicalRing (I A : Type _) (m : I → Type _) [Ring A] [TopologicalSpace A]
     [TopologicalRing A] [∀ i, Fintype (m i)] : TopologicalRing (∀ i, Matrix (m i) (m i) A) :=
   @Pi.instTopologicalRing _ (fun i => Matrix (m i) (m i) A) _ _ fun i => Matrix.topologicalRing
 #align pi.matrix_topological_ring Pi.matrix_topologicalRing
--/
 
 end HacksForPiInstanceSearch
 
Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2022 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module analysis.normed_space.matrix_exponential
-! leanprover-community/mathlib commit 5d0c76894ada7940957143163d7b921345474cbc
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.NormedSpace.Exponential
 import Mathbin.Analysis.Matrix
@@ -15,6 +10,8 @@ import Mathbin.LinearAlgebra.Matrix.Hermitian
 import Mathbin.LinearAlgebra.Matrix.Symmetric
 import Mathbin.Topology.UniformSpace.Matrix
 
+#align_import analysis.normed_space.matrix_exponential from "leanprover-community/mathlib"@"5d0c76894ada7940957143163d7b921345474cbc"
+
 /-!
 # Lemmas about the matrix exponential
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 
 ! This file was ported from Lean 3 source module analysis.normed_space.matrix_exponential
-! leanprover-community/mathlib commit 1e3201306d4d9eb1fd54c60d7c4510ad5126f6f9
+! leanprover-community/mathlib commit 5d0c76894ada7940957143163d7b921345474cbc
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -18,6 +18,9 @@ import Mathbin.Topology.UniformSpace.Matrix
 /-!
 # Lemmas about the matrix exponential
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file, we provide results about `exp` on `matrix`s over a topological or normed algebra.
 Note that generic results over all topological spaces such as `exp_zero` can be used on matrices
 without issue, so are not repeated here. The topological results specific to matrices are:
Diff
@@ -73,30 +73,38 @@ open scoped Matrix BigOperators
 
 section HacksForPiInstanceSearch
 
+#print Function.topologicalRing /-
 /-- A special case of `pi.topological_ring` for when `R` is not dependently typed. -/
 instance Function.topologicalRing (I : Type _) (R : Type _) [NonUnitalRing R] [TopologicalSpace R]
     [TopologicalRing R] : TopologicalRing (I → R) :=
-  Pi.topologicalRing
+  Pi.instTopologicalRing
 #align function.topological_ring Function.topologicalRing
+-/
 
+#print Function.algebraRing /-
 /-- A special case of `function.algebra` for when A is a `ring` not a `semiring` -/
 instance Function.algebraRing (I : Type _) {R : Type _} (A : Type _) [CommSemiring R] [Ring A]
     [Algebra R A] : Algebra R (I → A) :=
   Pi.algebra _ _
 #align function.algebra_ring Function.algebraRing
+-/
 
+#print Pi.matrixAlgebra /-
 /-- A special case of `pi.algebra` for when `f = λ i, matrix (m i) (m i) A`. -/
 instance Pi.matrixAlgebra (I R A : Type _) (m : I → Type _) [CommSemiring R] [Semiring A]
     [Algebra R A] [∀ i, Fintype (m i)] [∀ i, DecidableEq (m i)] :
     Algebra R (∀ i, Matrix (m i) (m i) A) :=
-  @Pi.algebra I R (fun i => Matrix (m i) (m i) A) _ _ fun i => Matrix.algebra
+  @Pi.algebra I R (fun i => Matrix (m i) (m i) A) _ _ fun i => Matrix.instAlgebra
 #align pi.matrix_algebra Pi.matrixAlgebra
+-/
 
+#print Pi.matrix_topologicalRing /-
 /-- A special case of `pi.topological_ring` for when `f = λ i, matrix (m i) (m i) A`. -/
 instance Pi.matrix_topologicalRing (I A : Type _) (m : I → Type _) [Ring A] [TopologicalSpace A]
     [TopologicalRing A] [∀ i, Fintype (m i)] : TopologicalRing (∀ i, Matrix (m i) (m i) A) :=
-  @Pi.topologicalRing _ (fun i => Matrix (m i) (m i) A) _ _ fun i => Matrix.topologicalRing
+  @Pi.instTopologicalRing _ (fun i => Matrix (m i) (m i) A) _ _ fun i => Matrix.topologicalRing
 #align pi.matrix_topological_ring Pi.matrix_topologicalRing
+-/
 
 end HacksForPiInstanceSearch
 
@@ -112,29 +120,39 @@ variable [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [∀ i, Fintype
   [∀ i, DecidableEq (n' i)] [Field 𝕂] [Ring 𝔸] [TopologicalSpace 𝔸] [TopologicalRing 𝔸]
   [Algebra 𝕂 𝔸] [T2Space 𝔸]
 
+#print Matrix.exp_diagonal /-
 theorem exp_diagonal (v : m → 𝔸) : exp 𝕂 (diagonal v) = diagonal (exp 𝕂 v) := by
   simp_rw [exp_eq_tsum, diagonal_pow, ← diagonal_smul, ← diagonal_tsum]
 #align matrix.exp_diagonal Matrix.exp_diagonal
+-/
 
+#print Matrix.exp_blockDiagonal /-
 theorem exp_blockDiagonal (v : m → Matrix n n 𝔸) :
     exp 𝕂 (blockDiagonal v) = blockDiagonal (exp 𝕂 v) := by
   simp_rw [exp_eq_tsum, ← block_diagonal_pow, ← block_diagonal_smul, ← block_diagonal_tsum]
 #align matrix.exp_block_diagonal Matrix.exp_blockDiagonal
+-/
 
+#print Matrix.exp_blockDiagonal' /-
 theorem exp_blockDiagonal' (v : ∀ i, Matrix (n' i) (n' i) 𝔸) :
     exp 𝕂 (blockDiagonal' v) = blockDiagonal' (exp 𝕂 v) := by
   simp_rw [exp_eq_tsum, ← block_diagonal'_pow, ← block_diagonal'_smul, ← block_diagonal'_tsum]
 #align matrix.exp_block_diagonal' Matrix.exp_blockDiagonal'
+-/
 
+#print Matrix.exp_conjTranspose /-
 theorem exp_conjTranspose [StarRing 𝔸] [ContinuousStar 𝔸] (A : Matrix m m 𝔸) :
     exp 𝕂 Aᴴ = (exp 𝕂 A)ᴴ :=
   (star_exp A).symm
 #align matrix.exp_conj_transpose Matrix.exp_conjTranspose
+-/
 
+#print Matrix.IsHermitian.exp /-
 theorem IsHermitian.exp [StarRing 𝔸] [ContinuousStar 𝔸] {A : Matrix m m 𝔸} (h : A.IsHermitian) :
     (exp 𝕂 A).IsHermitian :=
   (exp_conjTranspose _ _).symm.trans <| congr_arg _ h
 #align matrix.is_hermitian.exp Matrix.IsHermitian.exp
+-/
 
 end Ring
 
@@ -143,13 +161,17 @@ section CommRing
 variable [Fintype m] [DecidableEq m] [Field 𝕂] [CommRing 𝔸] [TopologicalSpace 𝔸] [TopologicalRing 𝔸]
   [Algebra 𝕂 𝔸] [T2Space 𝔸]
 
+#print Matrix.exp_transpose /-
 theorem exp_transpose (A : Matrix m m 𝔸) : exp 𝕂 Aᵀ = (exp 𝕂 A)ᵀ := by
   simp_rw [exp_eq_tsum, transpose_tsum, transpose_smul, transpose_pow]
 #align matrix.exp_transpose Matrix.exp_transpose
+-/
 
+#print Matrix.IsSymm.exp /-
 theorem IsSymm.exp {A : Matrix m m 𝔸} (h : A.IsSymm) : (exp 𝕂 A).IsSymm :=
   (exp_transpose _ _).symm.trans <| congr_arg _ h
 #align matrix.is_symm.exp Matrix.IsSymm.exp
+-/
 
 end CommRing
 
@@ -160,6 +182,7 @@ section Normed
 variable [IsROrC 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [∀ i, Fintype (n' i)]
   [∀ i, DecidableEq (n' i)] [NormedRing 𝔸] [NormedAlgebra 𝕂 𝔸] [CompleteSpace 𝔸]
 
+#print Matrix.exp_add_of_commute /-
 theorem exp_add_of_commute (A B : Matrix m m 𝔸) (h : Commute A B) :
     exp 𝕂 (A + B) = exp 𝕂 A ⬝ exp 𝕂 B :=
   by
@@ -168,7 +191,9 @@ theorem exp_add_of_commute (A B : Matrix m m 𝔸) (h : Commute A B) :
   letI : NormedAlgebra 𝕂 (Matrix m m 𝔸) := Matrix.linftyOpNormedAlgebra
   exact exp_add_of_commute h
 #align matrix.exp_add_of_commute Matrix.exp_add_of_commute
+-/
 
+#print Matrix.exp_sum_of_commute /-
 theorem exp_sum_of_commute {ι} (s : Finset ι) (f : ι → Matrix m m 𝔸)
     (h : (s : Set ι).Pairwise fun i j => Commute (f i) (f j)) :
     exp 𝕂 (∑ i in s, f i) =
@@ -179,7 +204,9 @@ theorem exp_sum_of_commute {ι} (s : Finset ι) (f : ι → Matrix m m 𝔸)
   letI : NormedAlgebra 𝕂 (Matrix m m 𝔸) := Matrix.linftyOpNormedAlgebra
   exact exp_sum_of_commute s f h
 #align matrix.exp_sum_of_commute Matrix.exp_sum_of_commute
+-/
 
+#print Matrix.exp_nsmul /-
 theorem exp_nsmul (n : ℕ) (A : Matrix m m 𝔸) : exp 𝕂 (n • A) = exp 𝕂 A ^ n :=
   by
   letI : SeminormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
@@ -187,7 +214,9 @@ theorem exp_nsmul (n : ℕ) (A : Matrix m m 𝔸) : exp 𝕂 (n • A) = exp 
   letI : NormedAlgebra 𝕂 (Matrix m m 𝔸) := Matrix.linftyOpNormedAlgebra
   exact exp_nsmul n A
 #align matrix.exp_nsmul Matrix.exp_nsmul
+-/
 
+#print Matrix.isUnit_exp /-
 theorem isUnit_exp (A : Matrix m m 𝔸) : IsUnit (exp 𝕂 A) :=
   by
   letI : SeminormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
@@ -195,7 +224,9 @@ theorem isUnit_exp (A : Matrix m m 𝔸) : IsUnit (exp 𝕂 A) :=
   letI : NormedAlgebra 𝕂 (Matrix m m 𝔸) := Matrix.linftyOpNormedAlgebra
   exact isUnit_exp _ A
 #align matrix.is_unit_exp Matrix.isUnit_exp
+-/
 
+#print Matrix.exp_units_conj /-
 theorem exp_units_conj (U : (Matrix m m 𝔸)ˣ) (A : Matrix m m 𝔸) :
     exp 𝕂 (↑U ⬝ A ⬝ ↑U⁻¹ : Matrix m m 𝔸) = ↑U ⬝ exp 𝕂 A ⬝ ↑U⁻¹ :=
   by
@@ -204,11 +235,14 @@ theorem exp_units_conj (U : (Matrix m m 𝔸)ˣ) (A : Matrix m m 𝔸) :
   letI : NormedAlgebra 𝕂 (Matrix m m 𝔸) := Matrix.linftyOpNormedAlgebra
   exact exp_units_conj _ U A
 #align matrix.exp_units_conj Matrix.exp_units_conj
+-/
 
+#print Matrix.exp_units_conj' /-
 theorem exp_units_conj' (U : (Matrix m m 𝔸)ˣ) (A : Matrix m m 𝔸) :
     exp 𝕂 (↑U⁻¹ ⬝ A ⬝ U : Matrix m m 𝔸) = ↑U⁻¹ ⬝ exp 𝕂 A ⬝ U :=
   exp_units_conj 𝕂 U⁻¹ A
 #align matrix.exp_units_conj' Matrix.exp_units_conj'
+-/
 
 end Normed
 
@@ -217,6 +251,7 @@ section NormedComm
 variable [IsROrC 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [∀ i, Fintype (n' i)]
   [∀ i, DecidableEq (n' i)] [NormedCommRing 𝔸] [NormedAlgebra 𝕂 𝔸] [CompleteSpace 𝔸]
 
+#print Matrix.exp_neg /-
 theorem exp_neg (A : Matrix m m 𝔸) : exp 𝕂 (-A) = (exp 𝕂 A)⁻¹ :=
   by
   rw [nonsing_inv_eq_ring_inverse]
@@ -225,7 +260,9 @@ theorem exp_neg (A : Matrix m m 𝔸) : exp 𝕂 (-A) = (exp 𝕂 A)⁻¹ :=
   letI : NormedAlgebra 𝕂 (Matrix m m 𝔸) := Matrix.linftyOpNormedAlgebra
   exact (Ring.inverse_exp _ A).symm
 #align matrix.exp_neg Matrix.exp_neg
+-/
 
+#print Matrix.exp_zsmul /-
 theorem exp_zsmul (z : ℤ) (A : Matrix m m 𝔸) : exp 𝕂 (z • A) = exp 𝕂 A ^ z :=
   by
   obtain ⟨n, rfl | rfl⟩ := z.eq_coe_or_neg
@@ -233,18 +270,23 @@ theorem exp_zsmul (z : ℤ) (A : Matrix m m 𝔸) : exp 𝕂 (z • A) = exp 
   · have : IsUnit (exp 𝕂 A).det := (Matrix.isUnit_iff_isUnit_det _).mp (isUnit_exp _ _)
     rw [Matrix.zpow_neg this, zpow_ofNat, neg_smul, exp_neg, coe_nat_zsmul, exp_nsmul]
 #align matrix.exp_zsmul Matrix.exp_zsmul
+-/
 
+#print Matrix.exp_conj /-
 theorem exp_conj (U : Matrix m m 𝔸) (A : Matrix m m 𝔸) (hy : IsUnit 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
 #align matrix.exp_conj Matrix.exp_conj
+-/
 
+#print Matrix.exp_conj' /-
 theorem exp_conj' (U : Matrix m m 𝔸) (A : Matrix m m 𝔸) (hy : IsUnit 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
 #align matrix.exp_conj' Matrix.exp_conj'
+-/
 
 end NormedComm
 
Diff
@@ -69,7 +69,7 @@ Hopefully we will be able to remove these in Lean 4.
 -/
 
 
-open Matrix BigOperators
+open scoped Matrix BigOperators
 
 section HacksForPiInstanceSearch
 
Diff
@@ -4,13 +4,15 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 
 ! This file was ported from Lean 3 source module analysis.normed_space.matrix_exponential
-! leanprover-community/mathlib commit 31263840fccb6bc5ea3d3d49676a1d16d596cfc0
+! leanprover-community/mathlib commit 1e3201306d4d9eb1fd54c60d7c4510ad5126f6f9
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.NormedSpace.Exponential
 import Mathbin.Analysis.Matrix
 import Mathbin.LinearAlgebra.Matrix.Zpow
+import Mathbin.LinearAlgebra.Matrix.Hermitian
+import Mathbin.LinearAlgebra.Matrix.Symmetric
 import Mathbin.Topology.UniformSpace.Matrix
 
 /-!
@@ -129,6 +131,11 @@ theorem exp_conjTranspose [StarRing 𝔸] [ContinuousStar 𝔸] (A : Matrix m m
   (star_exp A).symm
 #align matrix.exp_conj_transpose Matrix.exp_conjTranspose
 
+theorem IsHermitian.exp [StarRing 𝔸] [ContinuousStar 𝔸] {A : Matrix m m 𝔸} (h : A.IsHermitian) :
+    (exp 𝕂 A).IsHermitian :=
+  (exp_conjTranspose _ _).symm.trans <| congr_arg _ h
+#align matrix.is_hermitian.exp Matrix.IsHermitian.exp
+
 end Ring
 
 section CommRing
@@ -140,6 +147,10 @@ theorem exp_transpose (A : Matrix m m 𝔸) : exp 𝕂 Aᵀ = (exp 𝕂 A)ᵀ :=
   simp_rw [exp_eq_tsum, transpose_tsum, transpose_smul, transpose_pow]
 #align matrix.exp_transpose Matrix.exp_transpose
 
+theorem IsSymm.exp {A : Matrix m m 𝔸} (h : A.IsSymm) : (exp 𝕂 A).IsSymm :=
+  (exp_transpose _ _).symm.trans <| congr_arg _ h
+#align matrix.is_symm.exp Matrix.IsSymm.exp
+
 end CommRing
 
 end Topological
Diff
@@ -152,7 +152,7 @@ variable [IsROrC 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [
 theorem exp_add_of_commute (A B : Matrix m m 𝔸) (h : Commute A B) :
     exp 𝕂 (A + B) = exp 𝕂 A ⬝ exp 𝕂 B :=
   by
-  letI : SemiNormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
+  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
@@ -163,7 +163,7 @@ theorem exp_sum_of_commute {ι} (s : Finset ι) (f : ι → Matrix m m 𝔸)
     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
-  letI : SemiNormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
+  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
@@ -171,7 +171,7 @@ theorem exp_sum_of_commute {ι} (s : Finset ι) (f : ι → Matrix m m 𝔸)
 
 theorem exp_nsmul (n : ℕ) (A : Matrix m m 𝔸) : exp 𝕂 (n • A) = exp 𝕂 A ^ n :=
   by
-  letI : SemiNormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
+  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
@@ -179,7 +179,7 @@ theorem exp_nsmul (n : ℕ) (A : Matrix m m 𝔸) : exp 𝕂 (n • A) = exp 
 
 theorem isUnit_exp (A : Matrix m m 𝔸) : IsUnit (exp 𝕂 A) :=
   by
-  letI : SemiNormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
+  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
@@ -188,7 +188,7 @@ theorem isUnit_exp (A : Matrix m m 𝔸) : IsUnit (exp 𝕂 A) :=
 theorem exp_units_conj (U : (Matrix m m 𝔸)ˣ) (A : Matrix m m 𝔸) :
     exp 𝕂 (↑U ⬝ A ⬝ ↑U⁻¹ : Matrix m m 𝔸) = ↑U ⬝ exp 𝕂 A ⬝ ↑U⁻¹ :=
   by
-  letI : SemiNormedRing (Matrix m m 𝔸) := Matrix.linftyOpSemiNormedRing
+  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
@@ -209,7 +209,7 @@ variable [IsROrC 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [
 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 : 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

Changes in mathlib4

mathlib3
mathlib4
chore: Rename coe_nat/coe_int/coe_rat to natCast/intCast/ratCast (#11499)

This is less exhaustive than its sibling #11486 because edge cases are harder to classify. No fundamental difficulty, just me being a bit fast and lazy.

Reduce the diff of #11203

Diff
@@ -189,9 +189,9 @@ theorem exp_neg (A : Matrix m m 𝔸) : exp 𝕂 (-A) = (exp 𝕂 A)⁻¹ := 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_coe_nat, 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_coe_nat, neg_smul, exp_neg, natCast_zsmul, exp_nsmul]
+    rw [Matrix.zpow_neg this, zpow_natCast, neg_smul, exp_neg, natCast_zsmul, exp_nsmul]
 #align matrix.exp_zsmul Matrix.exp_zsmul
 
 theorem exp_conj (U : Matrix m m 𝔸) (A : Matrix m m 𝔸) (hy : IsUnit U) :
chore(Analysis): fix mathlib3 names; automated fixes (#11950)
Diff
@@ -16,8 +16,9 @@ import Mathlib.Topology.UniformSpace.Matrix
 # Lemmas about the matrix exponential
 
 In this file, we provide results about `exp` on `Matrix`s over a topological or normed algebra.
-Note that generic results over all topological spaces such as `exp_zero` can be used on matrices
-without issue, so are not repeated here. The topological results specific to matrices are:
+Note that generic results over all topological spaces such as `NormedSpace.exp_zero`
+can be used on matrices without issue, so are not repeated here.
+The topological results specific to matrices are:
 
 * `Matrix.exp_transpose`
 * `Matrix.exp_conjTranspose`
@@ -25,15 +26,15 @@ without issue, so are not repeated here. The topological results specific to mat
 * `Matrix.exp_blockDiagonal`
 * `Matrix.exp_blockDiagonal'`
 
-Lemmas like `exp_add_of_commute` require a canonical norm on the type; while there are multiple
-sensible choices for the norm of a `Matrix` (`Matrix.normedAddCommGroup`,
+Lemmas like `NormedSpace.exp_add_of_commute` require a canonical norm on the type;
+while there are multiple sensible choices for the norm of a `Matrix` (`Matrix.normedAddCommGroup`,
 `Matrix.frobeniusNormedAddCommGroup`, `Matrix.linftyOpNormedAddCommGroup`), none of them
 are canonical. In an application where a particular norm is chosen using
-`attribute [local instance]`, then the usual lemmas about `exp` are fine. When choosing a norm is
-undesirable, the results in this file can be used.
+`attribute [local instance]`, then the usual lemmas about `NormedSpace.exp` are fine.
+When choosing a norm is undesirable, the results in this file can be used.
 
-In this file, we copy across the lemmas about `exp`, but hide the requirement for a norm inside the
-proof.
+In this file, we copy across the lemmas about `NormedSpace.exp`,
+but hide the requirement for a norm inside the proof.
 
 * `Matrix.exp_add_of_commute`
 * `Matrix.exp_sum_of_commute`
chore: Rename IsROrC to RCLike (#10819)

IsROrC contains data, which goes against the expectation that classes prefixed with Is are prop-valued. People have been complaining about this on and off, so this PR renames IsROrC to RCLike.

Diff
@@ -121,7 +121,7 @@ end Topological
 
 section Normed
 
-variable [IsROrC 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [∀ i, Fintype (n' i)]
+variable [RCLike 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [∀ i, Fintype (n' i)]
   [∀ i, DecidableEq (n' i)] [NormedRing 𝔸] [NormedAlgebra 𝕂 𝔸] [CompleteSpace 𝔸]
 
 nonrec theorem exp_add_of_commute (A B : Matrix m m 𝔸) (h : Commute A B) :
@@ -175,7 +175,7 @@ end Normed
 
 section NormedComm
 
-variable [IsROrC 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [∀ i, Fintype (n' i)]
+variable [RCLike 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [∀ i, Fintype (n' i)]
   [∀ i, DecidableEq (n' i)] [NormedCommRing 𝔸] [NormedAlgebra 𝕂 𝔸] [CompleteSpace 𝔸]
 
 theorem exp_neg (A : Matrix m m 𝔸) : exp 𝕂 (-A) = (exp 𝕂 A)⁻¹ := by
chore: Rename zpow_coe_nat to zpow_natCast (#11528)

... and add a deprecated alias for the old name. This is mostly just me discovering the power of F2

Diff
@@ -188,9 +188,9 @@ theorem exp_neg (A : Matrix m m 𝔸) : exp 𝕂 (-A) = (exp 𝕂 A)⁻¹ := 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_coe_nat, coe_nat_zsmul, exp_nsmul]
+  · rw [zpow_coe_nat, natCast_zsmul, exp_nsmul]
   · have : IsUnit (exp 𝕂 A).det := (Matrix.isUnit_iff_isUnit_det _).mp (isUnit_exp _ _)
-    rw [Matrix.zpow_neg this, zpow_coe_nat, neg_smul, exp_neg, coe_nat_zsmul, exp_nsmul]
+    rw [Matrix.zpow_neg this, zpow_coe_nat, neg_smul, exp_neg, natCast_zsmul, exp_nsmul]
 #align matrix.exp_zsmul Matrix.exp_zsmul
 
 theorem exp_conj (U : Matrix m m 𝔸) (A : Matrix m m 𝔸) (hy : IsUnit U) :
fix: correct statement of zpow_ofNat and ofNat_zsmul (#10969)

Previously these were syntactically identical to the corresponding zpow_coe_nat and coe_nat_zsmul lemmas, now they are about OfNat.ofNat.

Unfortunately, almost every call site uses the ofNat name to refer to Nat.cast, so the downstream proofs had to be adjusted too.

Diff
@@ -188,9 +188,9 @@ theorem exp_neg (A : Matrix m m 𝔸) : exp 𝕂 (-A) = (exp 𝕂 A)⁻¹ := 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_ofNat, coe_nat_zsmul, exp_nsmul]
+  · rw [zpow_coe_nat, coe_nat_zsmul, exp_nsmul]
   · have : IsUnit (exp 𝕂 A).det := (Matrix.isUnit_iff_isUnit_det _).mp (isUnit_exp _ _)
-    rw [Matrix.zpow_neg this, zpow_ofNat, neg_smul, exp_neg, coe_nat_zsmul, exp_nsmul]
+    rw [Matrix.zpow_neg this, zpow_coe_nat, neg_smul, exp_neg, coe_nat_zsmul, exp_nsmul]
 #align matrix.exp_zsmul Matrix.exp_zsmul
 
 theorem exp_conj (U : Matrix m m 𝔸) (A : Matrix m m 𝔸) (hy : IsUnit U) :
chore: fix some Lean-3-isms in comments (#10240)
Diff
@@ -29,7 +29,7 @@ Lemmas like `exp_add_of_commute` require a canonical norm on the type; while the
 sensible choices for the norm of a `Matrix` (`Matrix.normedAddCommGroup`,
 `Matrix.frobeniusNormedAddCommGroup`, `Matrix.linftyOpNormedAddCommGroup`), none of them
 are canonical. In an application where a particular norm is chosen using
-`local attribute [instance]`, then the usual lemmas about `exp` are fine. When choosing a norm is
+`attribute [local instance]`, then the usual lemmas about `exp` are fine. When choosing a norm is
 undesirable, the results in this file can be used.
 
 In this file, we copy across the lemmas about `exp`, but hide the requirement for a norm inside the
chore: exp -> NormedSpace.exp (#8436)

Per discussion at zulip

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -62,6 +62,8 @@ results for general rings are instead stated about `Ring.inverse`:
 
 open scoped Matrix BigOperators
 
+open NormedSpace -- For `exp`.
+
 variable (𝕂 : Type*) {m n p : Type*} {n' : m → Type*} {𝔸 : Type*}
 
 namespace Matrix
chore(Analysis/NormedSpace/MatrixExponential): remove Lean 3 TC workarounds (#6608)

The file still compiles without these, so I guess as predicted we no longer need them. They were certainly needed in Lean 3.

Diff
@@ -50,12 +50,6 @@ results for general rings are instead stated about `Ring.inverse`:
 * `Matrix.exp_conj`
 * `Matrix.exp_conj'`
 
-## Implementation notes
-
-This file runs into some sharp edges on typeclass search in lean 3, especially regarding pi types.
-To work around this, we copy a handful of instances for when lean can't find them by itself.
-Hopefully we will be able to remove these in Lean 4.
-
 ## TODO
 
 * Show that `Matrix.det (exp 𝕂 A) = exp 𝕂 (Matrix.trace A)`
@@ -68,35 +62,6 @@ Hopefully we will be able to remove these in Lean 4.
 
 open scoped Matrix BigOperators
 
-section HacksForPiInstanceSearch
-
-/-- A special case of `Pi.instTopologicalRing` for when `R` is not dependently typed. -/
-instance Function.topologicalRing (I : Type*) (R : Type*) [NonUnitalRing R] [TopologicalSpace R]
-    [TopologicalRing R] : TopologicalRing (I → R) :=
-  Pi.instTopologicalRing
-#align function.topological_ring Function.topologicalRing
-
-/-- A special case of `Function.algebra` for when A is a `Ring` not a `Semiring` -/
-instance Function.algebraRing (I : Type*) {R : Type*} (A : Type*) [CommSemiring R] [Ring A]
-    [Algebra R A] : Algebra R (I → A) :=
-  Pi.algebra _ _
-#align function.algebra_ring Function.algebraRing
-
-/-- A special case of `Pi.algebra` for when `f = λ i, Matrix (m i) (m i) A`. -/
-instance Pi.matrixAlgebra (I R A : Type*) (m : I → Type*) [CommSemiring R] [Semiring A]
-    [Algebra R A] [∀ i, Fintype (m i)] [∀ i, DecidableEq (m i)] :
-    Algebra R (∀ i, Matrix (m i) (m i) A) :=
-  @Pi.algebra I R (fun i => Matrix (m i) (m i) A) _ _ fun _ => Matrix.instAlgebra
-#align pi.matrix_algebra Pi.matrixAlgebra
-
-/-- A special case of `Pi.instTopologicalRing` for when `f = λ i, Matrix (m i) (m i) A`. -/
-instance Pi.matrix_topologicalRing (I A : Type*) (m : I → Type*) [Ring A] [TopologicalSpace A]
-    [TopologicalRing A] [∀ i, Fintype (m i)] : TopologicalRing (∀ i, Matrix (m i) (m i) A) :=
-  @Pi.instTopologicalRing _ (fun i => Matrix (m i) (m i) A) _ _ fun _ => Matrix.topologicalRing
-#align pi.matrix_topological_ring Pi.matrix_topologicalRing
-
-end HacksForPiInstanceSearch
-
 variable (𝕂 : Type*) {m n p : Type*} {n' : m → Type*} {𝔸 : Type*}
 
 namespace Matrix
refactor(Data/Matrix): Eliminate notation in favor of HMul (#6487)

The main difficulty here is that * has a slightly difference precedence to . notably around smul and neg.

The other annoyance is that ↑U ⬝ A ⬝ ↑U⁻¹ : Matrix m m 𝔸 now has to be written U.val * A * (U⁻¹).val in order to typecheck.

A downside of this change to consider: if you have a goal of A * (B * C) = (A * B) * C, mul_assoc now gives the illusion of matching, when in fact Matrix.mul_assoc is needed. Previously the distinct symbol made it easy to avoid this mistake.

On the flipside, there is now no need to rewrite by Matrix.mul_eq_mul all the time (indeed, the lemma is now removed).

Diff
@@ -158,7 +158,7 @@ variable [IsROrC 𝕂] [Fintype m] [DecidableEq m] [Fintype n] [DecidableEq n] [
   [∀ i, DecidableEq (n' i)] [NormedRing 𝔸] [NormedAlgebra 𝕂 𝔸] [CompleteSpace 𝔸]
 
 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
@@ -189,16 +189,18 @@ nonrec theorem isUnit_exp (A : Matrix m m 𝔸) : IsUnit (exp 𝕂 A) := by
   exact isUnit_exp _ A
 #align matrix.is_unit_exp Matrix.isUnit_exp
 
+-- TODO(mathlib4#6607): fix elaboration so `val` isn't needed
 nonrec theorem exp_units_conj (U : (Matrix m m 𝔸)ˣ) (A : Matrix m m 𝔸) :
-    exp 𝕂 (↑U ⬝ A ⬝ ↑U⁻¹ : Matrix m m 𝔸) = ↑U ⬝ exp 𝕂 A ⬝ ↑U⁻¹ := by
+    exp 𝕂 (U.val * A * (U⁻¹).val) = U.val * exp 𝕂 A * (U⁻¹).val := 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
 #align matrix.exp_units_conj Matrix.exp_units_conj
 
+-- TODO(mathlib4#6607): fix elaboration so `val` isn't needed
 theorem exp_units_conj' (U : (Matrix m m 𝔸)ˣ) (A : Matrix m m 𝔸) :
-    exp 𝕂 (↑U⁻¹ ⬝ A ⬝ U : Matrix m m 𝔸) = ↑U⁻¹ ⬝ exp 𝕂 A ⬝ U :=
+    exp 𝕂 ((U⁻¹).val * A * U.val) = (U⁻¹).val * exp 𝕂 A * U.val :=
   exp_units_conj 𝕂 U⁻¹ A
 #align matrix.exp_units_conj' Matrix.exp_units_conj'
 
@@ -225,13 +227,13 @@ theorem exp_zsmul (z : ℤ) (A : Matrix m m 𝔸) : exp 𝕂 (z • A) = exp 
 #align matrix.exp_zsmul Matrix.exp_zsmul
 
 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
 #align matrix.exp_conj Matrix.exp_conj
 
 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
 #align matrix.exp_conj' Matrix.exp_conj'
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -71,33 +71,33 @@ open scoped Matrix BigOperators
 section HacksForPiInstanceSearch
 
 /-- A special case of `Pi.instTopologicalRing` for when `R` is not dependently typed. -/
-instance Function.topologicalRing (I : Type _) (R : Type _) [NonUnitalRing R] [TopologicalSpace R]
+instance Function.topologicalRing (I : Type*) (R : Type*) [NonUnitalRing R] [TopologicalSpace R]
     [TopologicalRing R] : TopologicalRing (I → R) :=
   Pi.instTopologicalRing
 #align function.topological_ring Function.topologicalRing
 
 /-- A special case of `Function.algebra` for when A is a `Ring` not a `Semiring` -/
-instance Function.algebraRing (I : Type _) {R : Type _} (A : Type _) [CommSemiring R] [Ring A]
+instance Function.algebraRing (I : Type*) {R : Type*} (A : Type*) [CommSemiring R] [Ring A]
     [Algebra R A] : Algebra R (I → A) :=
   Pi.algebra _ _
 #align function.algebra_ring Function.algebraRing
 
 /-- A special case of `Pi.algebra` for when `f = λ i, Matrix (m i) (m i) A`. -/
-instance Pi.matrixAlgebra (I R A : Type _) (m : I → Type _) [CommSemiring R] [Semiring A]
+instance Pi.matrixAlgebra (I R A : Type*) (m : I → Type*) [CommSemiring R] [Semiring A]
     [Algebra R A] [∀ i, Fintype (m i)] [∀ i, DecidableEq (m i)] :
     Algebra R (∀ i, Matrix (m i) (m i) A) :=
   @Pi.algebra I R (fun i => Matrix (m i) (m i) A) _ _ fun _ => Matrix.instAlgebra
 #align pi.matrix_algebra Pi.matrixAlgebra
 
 /-- A special case of `Pi.instTopologicalRing` for when `f = λ i, Matrix (m i) (m i) A`. -/
-instance Pi.matrix_topologicalRing (I A : Type _) (m : I → Type _) [Ring A] [TopologicalSpace A]
+instance Pi.matrix_topologicalRing (I A : Type*) (m : I → Type*) [Ring A] [TopologicalSpace A]
     [TopologicalRing A] [∀ i, Fintype (m i)] : TopologicalRing (∀ i, Matrix (m i) (m i) A) :=
   @Pi.instTopologicalRing _ (fun i => Matrix (m i) (m i) A) _ _ fun _ => Matrix.topologicalRing
 #align pi.matrix_topological_ring Pi.matrix_topologicalRing
 
 end HacksForPiInstanceSearch
 
-variable (𝕂 : Type _) {m n p : Type _} {n' : m → Type _} {𝔸 : Type _}
+variable (𝕂 : Type*) {m n p : Type*} {n' : m → Type*} {𝔸 : Type*}
 
 namespace Matrix
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2022 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module analysis.normed_space.matrix_exponential
-! leanprover-community/mathlib commit 1e3201306d4d9eb1fd54c60d7c4510ad5126f6f9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.NormedSpace.Exponential
 import Mathlib.Analysis.Matrix
@@ -15,6 +10,8 @@ import Mathlib.LinearAlgebra.Matrix.Hermitian
 import Mathlib.LinearAlgebra.Matrix.Symmetric
 import Mathlib.Topology.UniformSpace.Matrix
 
+#align_import analysis.normed_space.matrix_exponential from "leanprover-community/mathlib"@"1e3201306d4d9eb1fd54c60d7c4510ad5126f6f9"
+
 /-!
 # Lemmas about the matrix exponential
 
feat: port Analysis.NormedSpace.MatrixExponential (#5381)

Dependencies 12 + 921

922 files ported (98.7%)
407594 lines ported (98.6%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file