The real algebra structure on E āL[š] E #
Real continuous functional calculus on an operator algebra over an RCLike field needs the
algebra to be an ā-algebra, compatibly with its š-action. Mathlib does not register that:
Module ā (E āL[š] E) is not even inferable for a general RCLike š, so every consumer of the
modulus, the polar decomposition and the angle operators has been carrying
[Algebra ā (E āL[š] E)] [IsScalarTower ā š (E āL[š] E)]
as hypotheses. They are not hypotheses. They are restriction of scalars along
algebraMap ā š, and this file registers them.
Why these are defs and not instances #
They agree with everything already in place: Algebra.complexToReal ā which is what
Algebra ā (E āL[ā] E) already resolves to ā is RestrictScalars.algebra ā ā, and
RestrictScalars.algebra ā ā reduces to ContinuousLinearMap.algebra. Both facts are checked
by rfl, so there is no diamond.
Registering them globally is nevertheless wrong, and was tried on 2026-09-03. The damage is
not a diamond, it is elaboration. With SMul ā (E āL[š] E) in scope, Lean's ⢠elaborator
prefers the homogeneous reading and discards a scalar coercion the author wrote:
((r : ā) : š) ⢠ContinuousLinearMap.id š E elaborates to r ⢠ContinuousLinearMap.id š E
with r : ā. The two are propositionally equal and definitionally equal, but not the same
term, so every simp lemma about š-scalar multiplication of operators silently stops firing
in files that never asked for a real algebra structure. Three proofs in
Sources/DavisKahan1970/SineTheta/CommonDomainSymmetric.lean broke that way.
So a consumer activates them deliberately:
attribute [local instance 100] ContinuousLinearMap.realAlgebra
ContinuousLinearMap.realIsScalarTower
The low priority keeps Mathlib's answer at š = ā and Algebra.complexToReal at š = ā, so
activating them changes nothing at the two concrete fields; they only fill the gap at an
abstract RCLike š. A definition elaborated under them ā the angle operators of
DavisKahan/Geometry/Angle/OperatorAngleGeneric.lean, say ā carries them in its body, so its
consumers need nothing.
Provenance #
- Original repository: Davis--Kahan/DKPS formalization (Kitware, Inc.).
- Original module: none. Written directly here, 2026-09-03, to remove the two-instance hypothesis block from the scalar-generic operator API.
- Extraction class: new. It depends on nothing outside Mathlib.
- Namespace:
ContinuousLinearMap, matching the object it structures. - Original authors / copyright: Jon Crall, Claude Opus 5; Copyright (c) 2026 Kitware, Inc.; Apache 2.0.
- Spectra influence: none.
The operator algebra over an RCLike field is a real algebra, by restriction of
scalars along algebraMap ā š. Not an instance; see the module docstring.
Equations
- ContinuousLinearMap.realAlgebra = RestrictScalars.algebra ā š (E āL[š] E)
Instances For
The real action on operators factors through the š-action. Not an instance; see the
module docstring.
What this already unlocks #
At š = ā these two are the whole gap between Mathlib's complex Cā-algebra structure on
E āL[ā] E and its real continuous functional calculus: with them active the calculus is found
by synthesis, with no scoped instance and no explicit term. The general RCLike case is
ForTauCeti/Analysis/RCLike/ScalarTransportFunctionalCalculus.lean, which transports this one.
The example is deliberate: it adds no name and fails loudly if the chain ever breaks.