From 32fa6fe637bd032aff021407b6ca7c025eb7b0f4 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Thu, 3 Aug 2023 17:42:52 +0000 Subject: [PATCH] chore(Analysis/NormedSpace/Star/Multiplier); golf some proofs (#6329) `coeHom` now elaborates 10x faster on my machine. While perhaps a bit cryptic, this new spelling makes it clear which bit of the proofs are not just unfolding. --- .../Analysis/NormedSpace/Star/Multiplier.lean | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/Mathlib/Analysis/NormedSpace/Star/Multiplier.lean b/Mathlib/Analysis/NormedSpace/Star/Multiplier.lean index 72a2347f642c0..f2d77543b43c3 100644 --- a/Mathlib/Analysis/NormedSpace/Star/Multiplier.lean +++ b/Mathlib/Analysis/NormedSpace/Star/Multiplier.lean @@ -504,10 +504,10 @@ theorem coe_snd (a : A) : (a : ๐“œ(๐•œ, A)).snd = (ContinuousLinearMap.mul #align double_centralizer.coe_snd DoubleCentralizer.coe_snd theorem coe_eq_algebraMap : (DoubleCentralizer.coe ๐•œ : ๐•œ โ†’ ๐“œ(๐•œ, ๐•œ)) = algebraMap ๐•œ ๐“œ(๐•œ, ๐•œ) := by - ext <;> - simp only [coe_fst, mul_apply', mul_one, algebraMap_toProd, Prod.algebraMap_apply, coe_snd, - flip_apply, one_mul] <;> - simp only [Algebra.algebraMap_eq_smul_one, smul_apply, one_apply, smul_eq_mul, mul_one] + ext x : 3 + ยท rfl -- `fst` is defeq + ยท refine ContinuousLinearMap.ext fun y => ?_ + exact mul_comm y x -- `snd` multiplies on the wrong side #align double_centralizer.coe_eq_algebra_map DoubleCentralizer.coe_eq_algebraMap /-- The coercion of an algebra into its multiplier algebra as a non-unital star algebra @@ -516,17 +516,15 @@ homomorphism. -/ noncomputable def coeHom [StarRing ๐•œ] [StarRing A] [StarModule ๐•œ A] [NormedStarGroup A] : A โ†’โ‹†โ‚™โ‚[๐•œ] ๐“œ(๐•œ, A) where toFun a := a - map_smul' k a := by - ext <;> simp only [coe_fst, coe_snd, ContinuousLinearMap.map_smul, smul_fst, smul_snd] - map_zero' := by ext <;> simp only [coe_fst, coe_snd, map_zero, zero_fst, zero_snd] - map_add' a b := by ext <;> simp only [coe_fst, coe_snd, map_add, add_fst, add_snd] - map_mul' a b := by - ext <;> - simp only [coe_fst, coe_snd, mul_apply', flip_apply, mul_fst, mul_snd, - ContinuousLinearMap.coe_mul, Function.comp_apply, mul_assoc] - map_star' a := by - ext <;> - simp only [coe_fst, coe_snd, mul_apply', star_fst, star_snd, flip_apply, star_mul, star_star] + map_smul' _ _ := ext _ _ _ _ <| Prod.ext (map_smul _ _ _) (map_smul _ _ _) + map_zero' := ext _ _ _ _ <| Prod.ext (map_zero _) (map_zero _) + map_add' _ _ := ext _ _ _ _ <| Prod.ext (map_add _ _ _) (map_add _ _ _) + map_mul' _ _ := ext _ _ _ _ <| Prod.ext + (ContinuousLinearMap.ext fun _ => (mul_assoc _ _ _)) + (ContinuousLinearMap.ext fun _ => (mul_assoc _ _ _).symm) + map_star' _ := ext _ _ _ _ <| Prod.ext + (ContinuousLinearMap.ext fun _ => (star_star_mul _ _).symm) + (ContinuousLinearMap.ext fun _ => (star_mul_star _ _).symm) #align double_centralizer.coe_hom DoubleCentralizer.coeHom /-!