Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 20 additions & 5 deletions Mathlib/Algebra/Star/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,15 @@ theorem star_inj [InvolutiveStar R] {x y : R} : star x = star y ↔ x = y :=
star_injective.eq_iff

/-- `star` as an equivalence when it is involutive. -/
@[simps! apply]
protected def Equiv.Perm.star [InvolutiveStar R] : Equiv.Perm R :=
star_involutive.toPerm _

@[simp]
theorem Equiv.Perm.symm_star [InvolutiveStar R] :
(Equiv.Perm.star : R ≃ R).symm = Equiv.Perm.star :=
rfl

theorem eq_star_of_eq_star [InvolutiveStar R] {r s : R} (h : r = star s) : s = star r := by
simp [h]

Expand Down Expand Up @@ -232,11 +238,20 @@ export StarAddMonoid (star_add)
attribute [simp] star_add

/-- `star` as an `AddEquiv` -/
@[simps apply]
def starAddEquiv [AddMonoid R] [StarAddMonoid R] : R ≃+ R :=
{ InvolutiveStar.star_involutive.toPerm star with
toFun := star
map_add' := star_add }
@[simps! apply]
def starAddEquiv [AddMonoid R] [StarAddMonoid R] : R ≃+ R where
toEquiv := Equiv.Perm.star
map_add' := star_add

@[simp]
theorem toEquiv_starAddEquiv [AddMonoid R] [StarAddMonoid R] :
(starAddEquiv : R ≃+ R) = (Equiv.Perm.star : R ≃ R) :=
rfl

@[simp]
theorem symm_starAddEquiv [AddMonoid R] [StarAddMonoid R] :
(starAddEquiv : R ≃+ R).symm = starAddEquiv :=
rfl

variable (R) in
@[simp]
Expand Down
32 changes: 26 additions & 6 deletions Mathlib/Algebra/Star/Module.lean
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,34 @@ instance StarAddMonoid.toStarModuleRat [AddCommGroup R] [Module ℚ R] [StarAddM

end SMulLemmas

section starLinearEquiv

variable (R : Type*) {A : Type*}
[CommSemiring R] [StarRing R] [AddCommMonoid A] [StarAddMonoid A] [Module R A] [StarModule R A]

/-- If `A` is a module over a commutative `R` with compatible actions,
then `star` is a semilinear equivalence. -/
@[simps]
def starLinearEquiv (R : Type*) {A : Type*} [CommSemiring R] [StarRing R] [AddCommMonoid A]
[StarAddMonoid A] [Module R A] [StarModule R A] : A ≃ₗ⋆[R] A :=
{ starAddEquiv with
toFun := star
map_smul' := star_smul }
@[simps! apply]
def starLinearEquiv : A ≃ₗ⋆[R] A where
__ := starAddEquiv
Comment thread
gasparattila marked this conversation as resolved.
map_smul' := star_smul

@[simp]
theorem toAddEquiv_starLinearEquiv :
(starLinearEquiv R : A ≃ₗ⋆[R] A).toAddEquiv = starAddEquiv :=
rfl

@[simp]
theorem symm_starLinearEquiv : (starLinearEquiv R : A ≃ₗ⋆[R] A).symm = starLinearEquiv R :=
rfl
Comment thread
gasparattila marked this conversation as resolved.

@[deprecated "Use `symm_starLinearEquiv` and `starLinearEquiv_apply` instead"
(since := "2026-06-03")]
theorem starLinearEquiv_symm_apply (x : A) :
(starLinearEquiv R).symm x = starAddEquiv.invFun x := by
simp

end starLinearEquiv

section SelfSkewAdjoint

Expand Down
8 changes: 8 additions & 0 deletions Mathlib/Analysis/CStarAlgebra/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,19 @@ theorem coe_starₗᵢ : (starₗᵢ 𝕜 : E → E) = star :=
theorem starₗᵢ_apply {x : E} : starₗᵢ 𝕜 x = star x :=
rfl

@[simp]
theorem symm_starₗᵢ : (starₗᵢ 𝕜 : E ≃ₗᵢ⋆[𝕜] E).symm = starₗᵢ 𝕜 :=
rfl

@[simp]
theorem starₗᵢ_toContinuousLinearEquiv :
Comment thread
gasparattila marked this conversation as resolved.
(starₗᵢ 𝕜 : E ≃ₗᵢ⋆[𝕜] E).toContinuousLinearEquiv = (starL 𝕜 : E ≃L⋆[𝕜] E) :=
ContinuousLinearEquiv.ext rfl

@[simp]
theorem toLinearEquiv_starₗᵢ : (starₗᵢ 𝕜 : E ≃ₗᵢ⋆[𝕜] E).toLinearEquiv = starLinearEquiv 𝕜 :=
rfl

end starₗᵢ

namespace StarSubalgebra
Expand Down
44 changes: 34 additions & 10 deletions Mathlib/Topology/Algebra/Module/Star.lean
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,56 @@ notation:25 M " →L⋆[" R "] " M₂ => ContinuousLinearMap (starRingEnd R) M M
@[inherit_doc]
notation:50 M " ≃L⋆[" R "] " M₂ => ContinuousLinearEquiv (starRingEnd R) M M₂

section starL

variable (R : Type*) {A : Type*} [CommSemiring R] [StarRing R] [AddCommMonoid A]
[StarAddMonoid A] [Module R A] [StarModule R A] [TopologicalSpace A] [ContinuousStar A]

set_option backward.defeqAttrib.useBackward true in

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default tactic for the continuity fields calls dsimp, which became much stricter recently. I plan to fix this default tactic later, so I would prefer to keep it this way for now. In fact, the real goal of this PR was to remove the manual proofs here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides this comment, everything looks good thanks. Let's see what others think about this,

maintainer merge?

/-- If `A` is a topological module over a commutative `R` with compatible actions,
then `star` is a continuous semilinear equivalence. -/
@[simps!]
def starL (R : Type*) {A : Type*} [CommSemiring R] [StarRing R] [AddCommMonoid A]
[StarAddMonoid A] [Module R A] [StarModule R A] [TopologicalSpace A] [ContinuousStar A] :
A ≃L⋆[R] A where
@[simps! apply]
def starL : A ≃L⋆[R] A where
toLinearEquiv := starLinearEquiv R
Comment thread
gasparattila marked this conversation as resolved.
continuous_toFun := continuous_star
continuous_invFun := continuous_star

@[simp]
theorem toLinearEquiv_starL : (starL R : A ≃L⋆[R] A).toLinearEquiv = starLinearEquiv R :=
rfl
Comment thread
gasparattila marked this conversation as resolved.

@[simp]
theorem symm_starL : (starL R : A ≃L⋆[R] A).symm = starL R :=
rfl

@[deprecated "Use `symm_starL` and `starL_apply` instead" (since := "2026-06-03")]
theorem starL_symm_apply (x : A) : (starL R).symm x = starAddEquiv.symm x := by
simp

variable [TrivialStar R]

-- TODO: this could be replaced with something like `(starL R).restrict_scalarsₛₗ h` if we
-- implemented the idea in
-- https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/Star-semilinear.20maps.20are.20semilinear.20when.20star.20is.20trivial/near/359557835
/-- If `A` is a topological module over a commutative `R` with trivial star and compatible actions,
then `star` is a continuous linear equivalence. -/
@[simps!]
def starL' (R : Type*) {A : Type*} [CommSemiring R] [StarRing R] [TrivialStar R] [AddCommMonoid A]
[StarAddMonoid A] [Module R A] [StarModule R A] [TopologicalSpace A] [ContinuousStar A] :
A ≃L[R] A :=
@[simps! apply]
def starL' : A ≃L[R] A :=
(starL R : A ≃L⋆[R] A).trans
({ AddEquiv.refl A with
map_smul' := fun r a => by simp
continuous_toFun := continuous_id
continuous_invFun := continuous_id } :
A ≃L⋆[R] A)

@[simp]
theorem symm_starL' : (starL' R : A ≃L[R] A).symm = starL' R :=
rfl

@[deprecated "Use `symm_starL'` and `starL'_apply` instead" (since := "2026-06-03")]
theorem starL'_symm_apply (x : A) : (starL' R).symm x = starAddEquiv.symm x := by
simp

end starL

variable (R : Type*) (A : Type*) [Semiring R] [StarMul R] [TrivialStar R] [AddCommGroup A]
[Module R A] [StarAddMonoid A] [StarModule R A] [Invertible (2 : R)] [TopologicalSpace A]

Expand Down
Loading