Documentation

LeanPool.DavisKahan.ForTauCeti.Analysis.InnerProductSpace.OperatorRealAlgebra

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 #

@[instance_reducible]
noncomputable def ContinuousLinearMap.realAlgebra {š•œ : Type u_1} [RCLike š•œ] {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace š•œ E] :
Algebra ā„ (E →L[š•œ] E)

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
Instances For
    theorem ContinuousLinearMap.realIsScalarTower {š•œ : Type u_1} [RCLike š•œ] {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace š•œ E] :
    IsScalarTower ā„ š•œ (E →L[š•œ] E)

    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.