Skip to content

Commit 02ac6c3

Browse files
committed
chore(Analysis): golf Basic, Exponential, and ContinuousFunctionalCalculus/Unique (#38006)
Split from #37987 at reviewer request. This PR contains only the golf changes to: - `Mathlib/Analysis/CStarAlgebra/Basic.lean` - `Mathlib/Analysis/CStarAlgebra/Exponential.lean` - `Mathlib/Analysis/CStarAlgebra/ContinuousFunctionalCalculus/Unique.lean` Requested in: #37987 (comment)
1 parent 2b93138 commit 02ac6c3

File tree

3 files changed

+12
-50
lines changed

3 files changed

+12
-50
lines changed

Mathlib/Analysis/CStarAlgebra/Basic.lean

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -224,17 +224,8 @@ theorem norm_of_mem_unitary [Nontrivial E] {U : E} (hU : U ∈ unitary E) : ‖U
224224

225225
@[simp]
226226
theorem norm_coe_unitary_mul (U : unitary E) (A : E) : ‖(U : E) * A‖ = ‖A‖ := by
227-
nontriviality E
228-
refine le_antisymm ?_ ?_
229-
· calc
230-
_ ≤ ‖(U : E)‖ * ‖A‖ := norm_mul_le _ _
231-
_ = ‖A‖ := by rw [norm_coe_unitary, one_mul]
232-
· calc
233-
_ = ‖(U : E)⋆ * U * A‖ := by rw [Unitary.coe_star_mul_self U, one_mul]
234-
_ ≤ ‖(U : E)⋆‖ * ‖(U : E) * A‖ := by
235-
rw [mul_assoc]
236-
exact norm_mul_le _ _
237-
_ = ‖(U : E) * A‖ := by rw [norm_star, norm_coe_unitary, one_mul]
227+
rw [← sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)]
228+
simp [sq, ← CStarRing.norm_star_mul_self, mul_assoc, ← mul_assoc (U : E)⋆]
238229

239230
@[simp]
240231
theorem norm_unitary_smul (U : unitary E) (A : E) : ‖U • A‖ = ‖A‖ :=
@@ -244,12 +235,8 @@ theorem norm_mem_unitary_mul {U : E} (A : E) (hU : U ∈ unitary E) : ‖U * A
244235
norm_coe_unitary_mul ⟨U, hU⟩ A
245236

246237
@[simp]
247-
theorem norm_mul_coe_unitary (A : E) (U : unitary E) : ‖A * U‖ = ‖A‖ :=
248-
calc
249-
_ = ‖((U : E)⋆ * A⋆)⋆‖ := by simp only [star_star, star_mul]
250-
_ = ‖(U : E)⋆ * A⋆‖ := by rw [norm_star]
251-
_ = ‖A⋆‖ := norm_mem_unitary_mul (star A) (Unitary.star_mem U.prop)
252-
_ = ‖A‖ := norm_star _
238+
theorem norm_mul_coe_unitary (A : E) (U : unitary E) : ‖A * U‖ = ‖A‖ := by
239+
simpa [← norm_star (A * U)] using norm_coe_unitary_mul (star U) (star A)
253240

254241
theorem norm_mul_mem_unitary (A : E) {U : E} (hU : U ∈ unitary E) : ‖A * U‖ = ‖A‖ :=
255242
norm_mul_coe_unitary A ⟨U, hU⟩

Mathlib/Analysis/CStarAlgebra/ContinuousFunctionalCalculus/Unique.lean

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,7 @@ instance NNReal.instContinuousMap.UniqueHom [T2Space A] :
177177
ContinuousMap.UniqueHom ℝ≥0 A where
178178
eq_of_continuous_of_map_id s hs φ ψ hφ hψ h := by
179179
let s' : Set ℝ := (↑) '' s
180-
let e : s ≃ₜ s' :=
181-
{ toFun := Subtype.map (↑) (by simp [s'])
182-
invFun := Subtype.map Real.toNNReal (by simp [s'])
183-
left_inv := fun _ ↦ by ext; simp
184-
right_inv := fun x ↦ by
185-
ext
186-
obtain ⟨y, -, hy⟩ := x.2
187-
simpa using hy ▸ NNReal.coe_nonneg y
188-
continuous_toFun := continuous_coe.subtype_map (by simp [s'])
189-
continuous_invFun := continuous_real_toNNReal.subtype_map (by simp [s']) }
180+
let e : s ≃ₜ s' := NNReal.isEmbedding_coe.homeomorphImage s
190181
have (ξ : C(s, ℝ≥0) →⋆ₐ[ℝ≥0] A) (hξ : Continuous ξ) :
191182
(let ξ' := ξ.realContinuousMapOfNNReal.comp <| ContinuousMap.compStarAlgHom' ℝ ℝ e
192183
Continuous ξ' ∧ ξ' (.restrict s' <| .id ℝ) = ξ (.restrict s <| .id ℝ≥0)) := by
@@ -366,20 +357,10 @@ instance NNReal.instContinuousMapZero.UniqueHom
366357
ContinuousMapZero.UniqueHom ℝ≥0 A where
367358
eq_of_continuous_of_map_id s hs h0 φ ψ hφ hψ h := by
368359
let s' : Set ℝ := (↑) '' s
369-
let e : s ≃ₜ s' :=
370-
{ toFun := Subtype.map (↑) (by simp [s'])
371-
invFun := Subtype.map Real.toNNReal (by simp [s'])
372-
left_inv := fun _ ↦ by ext; simp
373-
right_inv := fun x ↦ by
374-
ext
375-
obtain ⟨y, -, hy⟩ := x.2
376-
simpa using hy ▸ NNReal.coe_nonneg y
377-
continuous_toFun := continuous_coe.subtype_map (by simp [s'])
378-
continuous_invFun := continuous_real_toNNReal.subtype_map (by simp [s']) }
360+
let e : s ≃ₜ s' := NNReal.isEmbedding_coe.homeomorphImage s
379361
have : Fact (0 ∈ s') := ⟨0, Fact.out, coe_zero⟩
380-
have e0 : e 0 = 0 := by ext; simp [e]; rfl
381-
have e0' : e.symm 0 = 0 := by
382-
simpa only [Homeomorph.symm_apply_apply] using congr(e.symm $(e0)).symm
362+
have e0 : e 0 = 0 := rfl
363+
have e0' : e.symm 0 = 0 := e.symm_apply_eq.mpr e0
383364
have (ξ : C(s, ℝ≥0)₀ →⋆ₙₐ[ℝ≥0] A) (hξ : Continuous ξ) :
384365
(let ξ' := ξ.realContinuousMapZeroOfNNReal.comp <|
385366
ContinuousMapZero.nonUnitalStarAlgHom_precomp ℝ ⟨e, e0⟩;

Mathlib/Analysis/CStarAlgebra/Exponential.lean

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,11 @@ lemma selfAdjoint.continuous_expUnitary : Continuous (expUnitary : selfAdjoint A
5555
theorem Commute.expUnitary_add {a b : selfAdjoint A} (h : Commute (a : A) (b : A)) :
5656
expUnitary (a + b) = expUnitary a * expUnitary b := by
5757
let +nondep : NormedAlgebra ℚ A := .restrictScalars ℚ ℂ A
58-
ext
59-
have hcomm : Commute (I • (a : A)) (I • (b : A)) := by
60-
unfold Commute SemiconjBy
61-
simp only [h.eq, Algebra.smul_mul_assoc, Algebra.mul_smul_comm]
62-
simpa only [expUnitary_coe, AddSubgroup.coe_add, smul_add] using exp_add_of_commute hcomm
58+
simpa only [Subtype.ext_iff, expUnitary_coe, AddSubgroup.coe_add, smul_add] using
59+
exp_add_of_commute ((h.smul_left I).smul_right I)
6360

6461
theorem Commute.expUnitary {a b : selfAdjoint A} (h : Commute (a : A) (b : A)) :
65-
Commute (expUnitary a) (expUnitary b) :=
66-
calc
67-
selfAdjoint.expUnitary a * selfAdjoint.expUnitary b =
68-
selfAdjoint.expUnitary b * selfAdjoint.expUnitary a := by
69-
rw [← h.expUnitary_add, ← h.symm.expUnitary_add, add_comm]
62+
Commute (expUnitary a) (expUnitary b) := by
63+
rw [Commute, SemiconjBy, ← h.expUnitary_add, ← h.symm.expUnitary_add, add_comm]
7064

7165
end Star

0 commit comments

Comments
 (0)