Skip to content

Commit 2cabfc5

Browse files
committed
feat(Algebra/Star/LinearMap): star mul' = mul' ∘ TensorProduct.comm and star (f ⊗ₘ g) = star f ⊗ₘ star g (#31003)
1 parent 5ddd545 commit 2cabfc5

File tree

3 files changed

+50
-16
lines changed

3 files changed

+50
-16
lines changed

Mathlib/Algebra/Star/LinearMap.lean

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Authors: Monica Omar
55
-/
66
import Mathlib.Algebra.Algebra.Bilinear
77
import Mathlib.Algebra.Star.SelfAdjoint
8+
import Mathlib.Algebra.Star.TensorProduct
89

910
/-!
1011
# Intrinsic star operation on `E →ₗ[R] F`
@@ -52,10 +53,12 @@ def intrinsicStarAddMonoid : StarAddMonoid (E →ₗ[R] F) where
5253

5354
scoped[IntrinsicStar] attribute [instance] LinearMap.intrinsicStarAddMonoid
5455

56+
/-- A linear map is self-adjoint (with respect to the intrinsic star) iff it is star-preserving. -/
5557
theorem isSelfAdjoint_iff_map_star (f : E →ₗ[R] F) :
5658
IsSelfAdjoint f ↔ ∀ x, f (star x) = star (f x) := by
5759
simp_rw [IsSelfAdjoint, LinearMap.ext_iff, intrinsicStar_apply, star_eq_iff_star_eq, eq_comm]
5860

61+
/-- A star-preserving linear map is self-adjoint (with respect to the intrinsic star). -/
5962
@[simp]
6063
protected theorem _root_.StarHomClass.isSelfAdjoint {S : Type*} [FunLike S E F]
6164
[LinearMapClass S R E F] [StarHomClass S E F] {f : S} : IsSelfAdjoint (f : E →ₗ[R] F) :=
@@ -71,25 +74,44 @@ theorem intrinsicStar_comp (f : E →ₗ[R] F) (g : G →ₗ[R] E) :
7174
@[simp] theorem intrinsicStar_zero : star (0 : E →ₗ[R] F) = 0 := by ext; simp
7275

7376
section NonUnitalNonAssocSemiring
74-
variable {E : Type*} [NonUnitalNonAssocSemiring E] [StarRing E] [Module R E]
75-
[StarModule R E] [SMulCommClass R E E] [IsScalarTower R E E]
77+
variable {R' E : Type*} [CommSemiring R'] [StarRing R']
78+
[NonUnitalNonAssocSemiring E] [StarRing E] [Module R E] [Module R' E]
79+
[StarModule R E] [StarModule R' E] [SMulCommClass R E E] [IsScalarTower R E E]
7680

7781
theorem intrinsicStar_mulLeft (x : E) : star (mulLeft R x) = mulRight R (star x) := by ext; simp
7882

7983
theorem intrinsicStar_mulRight (x : E) : star (mulRight R x) = mulLeft R (star x) := by
8084
rw [star_eq_iff_star_eq, intrinsicStar_mulLeft, star_star]
8185

82-
-- TODO: when we have `Star (E ⊗[R] F)` (PR #27290), we can do these two:
83-
-- `star (mul' R E) = mul' R E ∘ₗ TensorProduct.comm R E E`
84-
-- `star (f ⊗ₘ g) = star f ⊗ₘ star g`
86+
theorem intrinsicStar_mul' [SMulCommClass R' E E] [IsScalarTower R' E E] :
87+
star (mul' R' E) = mul' R' E ∘ₗ TensorProduct.comm R' E E :=
88+
TensorProduct.ext' fun _ _ ↦ by simp
8589

8690
end NonUnitalNonAssocSemiring
8791

88-
variable [SMulCommClass R R F]
89-
92+
variable [SMulCommClass R R F] in
9093
lemma intrinsicStarModule : StarModule R (E →ₗ[R] F) where
9194
star_smul _ _ := by ext; simp
9295

9396
scoped[IntrinsicStar] attribute [instance] LinearMap.intrinsicStarModule
9497

98+
section TensorProduct
99+
variable {R E F G H : Type*} [CommSemiring R] [StarRing R]
100+
[AddCommMonoid E] [StarAddMonoid E] [Module R E] [StarModule R E]
101+
[AddCommMonoid F] [StarAddMonoid F] [Module R F] [StarModule R F]
102+
[AddCommMonoid G] [StarAddMonoid G] [Module R G] [StarModule R G]
103+
[AddCommMonoid H] [StarAddMonoid H] [Module R H] [StarModule R H]
104+
105+
theorem _root_.TensorProduct.intrinsicStar_map (f : E →ₗ[R] F) (g : G →ₗ[R] H) :
106+
star (TensorProduct.map f g) = TensorProduct.map (star f) (star g) :=
107+
TensorProduct.ext' fun _ _ ↦ by simp
108+
109+
theorem intrinsicStar_lTensor (f : F →ₗ[R] G) : star (lTensor E f) = lTensor E (star f) := by
110+
simp [lTensor, TensorProduct.intrinsicStar_map]
111+
112+
theorem intrinsicStar_rTensor (f : E →ₗ[R] F) : star (rTensor G f) = rTensor G (star f) := by
113+
simp [rTensor, TensorProduct.intrinsicStar_map]
114+
115+
end TensorProduct
116+
95117
end LinearMap

Mathlib/Algebra/Star/TensorProduct.lean

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import Mathlib.Algebra.Star.Module
77
import Mathlib.LinearAlgebra.TensorProduct.Basic
88

99
/-!
10+
# The star structure on tensor products
1011
1112
This file defines the `Star` structure on tensor products. This also
1213
defines the `StarAddMonoid` and `StarModule` instances for tensor products.
13-
1414
-/
1515

1616
namespace TensorProduct
@@ -22,20 +22,24 @@ variable {R A B : Type*}
2222
open scoped TensorProduct
2323

2424
instance : Star (A ⊗[R] B) where
25-
star x := map (starLinearEquiv R (A := A)) (starLinearEquiv R).toLinearMap x
25+
star x := congr (starLinearEquiv R) (starLinearEquiv R) x
2626

2727
@[simp]
2828
theorem star_tmul (x : A) (y : B) : star (x ⊗ₜ[R] y) = star x ⊗ₜ[R] star y := rfl
2929

3030
noncomputable instance : InvolutiveStar (A ⊗[R] B) where
3131
star_involutive x := by
32-
simp only [star, map_map, LinearEquiv.comp_coe]
33-
convert congr($map_id x) <;> ext <;> simp
32+
simp_rw [star]
33+
rw [congr_congr]
34+
convert congr($congr_refl_refl x) <;> ext <;> simp
3435

3536
noncomputable instance : StarAddMonoid (A ⊗[R] B) where
3637
star_add := LinearMap.map_add _
3738

3839
instance : StarModule R (A ⊗[R] B) where
3940
star_smul := LinearMap.map_smulₛₗ _
4041

42+
theorem _root_.starLinearEquiv_tensor :
43+
starLinearEquiv R (A := A ⊗[R] B) = congr (starLinearEquiv R) (starLinearEquiv R) := rfl
44+
4145
end TensorProduct

Mathlib/LinearAlgebra/TensorProduct/Basic.lean

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -973,13 +973,21 @@ theorem congr_symm (f : M ≃ₛₗ[σ₁₂] M₂) (g : N ≃ₛₗ[σ₁₂] N
973973
@[simp] theorem congr_refl_refl : congr (.refl R M) (.refl R N) = .refl R _ :=
974974
LinearEquiv.toLinearMap_injective <| ext' fun _ _ ↦ rfl
975975

976-
theorem congr_trans {σ₃₂ : R₃ →+* R₂} [RingHomInvPair σ₂₃ σ₃₂] [RingHomInvPair σ₃₂ σ₂₃]
977-
{σ₃₁ : R₃ →+* R} [RingHomInvPair σ₁₃ σ₃₁] [RingHomInvPair σ₃₁ σ₁₃]
978-
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] [RingHomCompTriple σ₃₂ σ₂₁ σ₃₁]
979-
(f₂ : M₂ ≃ₛₗ[σ₂₃] M₃) (g₂ : N₂ ≃ₛₗ[σ₂₃] N₃) (f₁ : M ≃ₛₗ[σ₁₂] M₂) (g₁ : N ≃ₛₗ[σ₁₂] N₂) :
980-
congr (f₁.trans f₂) (g₁.trans g₂) = (congr f₁ g₁).trans (congr f₂ g₂) :=
976+
section congr_congr
977+
variable {σ₃₂ : R₃ →+* R₂} [RingHomInvPair σ₂₃ σ₃₂] [RingHomInvPair σ₃₂ σ₂₃]
978+
{σ₃₁ : R₃ →+* R} [RingHomInvPair σ₁₃ σ₃₁] [RingHomInvPair σ₃₁ σ₁₃]
979+
[RingHomCompTriple σ₁₂ σ₂₃ σ₁₃] [RingHomCompTriple σ₃₂ σ₂₁ σ₃₁]
980+
(f₂ : M₂ ≃ₛₗ[σ₂₃] M₃) (g₂ : N₂ ≃ₛₗ[σ₂₃] N₃) (f₁ : M ≃ₛₗ[σ₁₂] M₂) (g₁ : N ≃ₛₗ[σ₁₂] N₂)
981+
982+
theorem congr_trans : congr (f₁.trans f₂) (g₁.trans g₂) = (congr f₁ g₁).trans (congr f₂ g₂) :=
981983
LinearEquiv.toLinearMap_injective <| map_comp _ _ _ _
982984

985+
theorem congr_congr (x : M ⊗[R] N) :
986+
congr f₂ g₂ (congr f₁ g₁ x) = congr (f₁.trans f₂) (g₁.trans g₂) x :=
987+
DFunLike.congr_fun (congr_trans ..).symm x
988+
989+
end congr_congr
990+
983991
theorem congr_mul (f : M ≃ₗ[R] M) (g : N ≃ₗ[R] N) (f' : M ≃ₗ[R] M) (g' : N ≃ₗ[R] N) :
984992
congr (f * f') (g * g') = congr f g * congr f' g' := congr_trans _ _ _ _
985993

0 commit comments

Comments
 (0)