Skip to content

Commit 6212c09

Browse files
committed
refactor: generalize instances of the continuous functional calculus (#11944)
This refactors instances of the continuous functional calculus slightly. In particular, the derived instances for `IsSelfAdjoint` and `0 ≤ ·` will now trigger automatically once the type class conditions are satisfied, and these are generic, not specific to C⋆-algebras. For nonnegative elements, this utilizes the new type class `NonnegSpectrumClass`. In addition, we show that the restricted continuous functional calculi are equal to their non-restricted counterparts.
1 parent 029ba76 commit 6212c09

File tree

1 file changed

+104
-36
lines changed
  • Mathlib/Analysis/NormedSpace/Star/ContinuousFunctionalCalculus

1 file changed

+104
-36
lines changed

Mathlib/Analysis/NormedSpace/Star/ContinuousFunctionalCalculus/Instances.lean

Lines changed: 104 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,26 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Jireh Loreaux
55
-/
66
import Mathlib.Analysis.NormedSpace.Star.ContinuousFunctionalCalculus.Restrict
7-
import Mathlib.Analysis.NormedSpace.Star.Spectrum
87
import Mathlib.Analysis.NormedSpace.Star.ContinuousFunctionalCalculus
8+
import Mathlib.Analysis.NormedSpace.Star.Spectrum
9+
import Mathlib.Topology.ContinuousFunction.UniqueCFC
910

1011
/-! # Instances of the continuous functional calculus
1112
12-
## Main definitions
13+
## Main theorems
1314
1415
* `IsStarNormal.instContinuousFunctionalCalculus`: the continuous functional calculus for normal
1516
elements in a unital C⋆-algebra over `ℂ`.
1617
* `IsSelfAdjoint.instContinuousFunctionalCalculus`: the continuous functional calculus for
17-
selfadjoint elements in a unital C⋆-algebra over `ℂ`.
18+
selfadjoint elements in a `ℂ`-algebra with a continuous functional calculus for normal elements
19+
and where every element has compact spectrum. In particular, this includes unital C⋆-algebras
20+
over `ℂ`.
1821
* `Nonneg.instContinuousFunctionalCalculus`: the continuous functional calculus for nonnegative
19-
elements in a unital C⋆-algebra over `ℂ`, which is also a `StarOrderedRing`.
22+
elements in an `ℝ`-algebra with a continuous functional calculus for selfadjoint elements,
23+
where every element has compact spectrum, and where nonnegative elements have nonnegative
24+
spectrum. In particular, this includes unital C⋆-algebras over `ℝ`.
25+
* `CstarRing.instNonnegSpectrumClass`: In a unital C⋆-algebra over `ℂ` which is also a
26+
`StarOrderedRing`, the spectrum of a nonnegative element is nonnegative.
2027
2128
## Tags
2229
@@ -84,17 +91,11 @@ lemma SpectrumRestricts.isSelfAdjoint (a : A) (ha : SpectrumRestricts a Complex.
8491
[IsStarNormal a] : IsSelfAdjoint a :=
8592
isSelfAdjoint_iff_isStarNormal_and_spectrumRestricts.mpr ⟨‹_›, ha⟩
8693

87-
theorem IsSelfAdjoint.continuousFunctionalCalculus_of_compactSpace_spectrum
88-
[h : ∀ x : A, CompactSpace (spectrum ℂ x)] :
94+
instance IsSelfAdjoint.instContinuousFunctionalCalculus [∀ x : A, CompactSpace (spectrum ℂ x)] :
8995
ContinuousFunctionalCalculus ℝ (IsSelfAdjoint : A → Prop) :=
9096
SpectrumRestricts.cfc (q := IsStarNormal) (p := IsSelfAdjoint) Complex.reCLM
9197
Complex.isometry_ofReal (fun _ ↦ isSelfAdjoint_iff_isStarNormal_and_spectrumRestricts)
92-
(fun _ _ ↦ h _)
93-
94-
instance IsSelfAdjoint.instContinuousFunctionalCalculus {A : Type*} [NormedRing A] [StarRing A]
95-
[CstarRing A] [CompleteSpace A] [NormedAlgebra ℂ A] [StarModule ℂ A] :
96-
ContinuousFunctionalCalculus ℝ (IsSelfAdjoint : A → Prop) :=
97-
IsSelfAdjoint.continuousFunctionalCalculus_of_compactSpace_spectrum
98+
(fun _ _ ↦ inferInstance)
9899

99100
lemma unitary_iff_isStarNormal_and_spectrum_subset_circle {u : A} :
100101
u ∈ unitary A ↔ IsStarNormal u ∧ spectrum ℂ u ⊆ circle := by
@@ -128,6 +129,42 @@ lemma spectrum_subset_circle_of_mem_unitary {u : A} (hu : u ∈ unitary A) :
128129

129130
end Normal
130131

132+
section Nonneg
133+
134+
lemma CFC.exists_sqrt_of_isSelfAdjoint_of_spectrumRestricts {A : Type*} [Ring A] [StarRing A]
135+
[TopologicalSpace A] [Algebra ℝ A] [ContinuousFunctionalCalculus ℝ (IsSelfAdjoint : A → Prop)]
136+
{a : A} (ha₁ : IsSelfAdjoint a) (ha₂ : SpectrumRestricts a ContinuousMap.realToNNReal) :
137+
∃ x : A, IsSelfAdjoint x ∧ SpectrumRestricts x ContinuousMap.realToNNReal ∧ x ^ 2 = a := by
138+
use cfc Real.sqrt a, cfc_predicate Real.sqrt a
139+
constructor
140+
· simpa only [SpectrumRestricts.nnreal_iff, cfc_map_spectrum Real.sqrt a, Set.mem_image,
141+
forall_exists_index, and_imp, forall_apply_eq_imp_iff₂] using fun x _ ↦ Real.sqrt_nonneg x
142+
· rw [← cfc_pow ..]
143+
nth_rw 2 [← cfc_id ℝ a]
144+
apply cfc_congr fun x hx ↦ ?_
145+
rw [SpectrumRestricts.nnreal_iff] at ha₂
146+
apply ha₂ x at hx
147+
simp [Real.sq_sqrt hx]
148+
149+
variable {A : Type*} [Ring A] [PartialOrder A] [StarRing A] [StarOrderedRing A] [TopologicalSpace A]
150+
variable [Algebra ℝ A] [ContinuousFunctionalCalculus ℝ (IsSelfAdjoint : A → Prop)]
151+
variable [NonnegSpectrumClass ℝ A] [UniqueContinuousFunctionalCalculus ℝ A]
152+
153+
lemma nonneg_iff_isSelfAdjoint_and_spectrumRestricts {a : A} :
154+
0 ≤ a ↔ IsSelfAdjoint a ∧ SpectrumRestricts a ContinuousMap.realToNNReal := by
155+
refine ⟨fun ha ↦ ⟨.of_nonneg ha, .nnreal_of_nonneg ha⟩, ?_⟩
156+
rintro ⟨ha₁, ha₂⟩
157+
obtain ⟨x, hx, -, rfl⟩ := CFC.exists_sqrt_of_isSelfAdjoint_of_spectrumRestricts ha₁ ha₂
158+
simpa [sq, hx.star_eq] using star_mul_self_nonneg x
159+
160+
open NNReal in
161+
instance Nonneg.instContinuousFunctionalCalculus [∀ a : A, CompactSpace (spectrum ℝ a)] :
162+
ContinuousFunctionalCalculus ℝ≥0 (fun x : A ↦ 0 ≤ x) :=
163+
SpectrumRestricts.cfc (q := IsSelfAdjoint) ContinuousMap.realToNNReal
164+
isometry_subtype_coe (fun _ ↦ nonneg_iff_isSelfAdjoint_and_spectrumRestricts)
165+
(fun _ _ ↦ inferInstance)
166+
167+
end Nonneg
131168
section SpectrumRestricts
132169

133170
open NNReal ENNReal
@@ -245,43 +282,74 @@ lemma spectrum_star_mul_self_nonneg {b : A} : ∀ x ∈ spectrum ℝ (star b * b
245282

246283
end SpectrumRestricts
247284

248-
section Nonneg
285+
section NonnegSpectrumClass
249286

250287
variable {A : Type*} [NormedRing A] [CompleteSpace A]
251288
variable [PartialOrder A] [StarRing A] [StarOrderedRing A] [CstarRing A]
252289
variable [NormedAlgebra ℂ A] [StarModule ℂ A]
253290

254-
lemma nonneg_iff_isSelfAdjoint_and_spectrumRestricts {a : A} :
255-
0 ≤ a ↔ IsSelfAdjoint a ∧ SpectrumRestricts a ContinuousMap.realToNNReal := by
256-
rw [SpectrumRestricts.nnreal_iff]
257-
refine ⟨fun ha ↦ ?_, ?_⟩
258-
· rw [StarOrderedRing.nonneg_iff] at ha
291+
instance CstarRing.instNonnegSpectrumClass : NonnegSpectrumClass ℝ A :=
292+
.of_spectrum_nonneg fun a ha ↦ by
293+
rw [StarOrderedRing.nonneg_iff] at ha
259294
induction ha using AddSubmonoid.closure_induction' with
260295
| mem x hx =>
261296
obtain ⟨b, rfl⟩ := hx
262-
exact ⟨IsSelfAdjoint.star_mul_self b, spectrum_star_mul_self_nonneg
297+
exact spectrum_star_mul_self_nonneg
263298
| one =>
264299
nontriviality A
265300
simp
266-
| mul x _ y _ hx hy =>
301+
| mul x x_mem y y_mem hx hy =>
267302
rw [← SpectrumRestricts.nnreal_iff] at hx hy ⊢
268-
exact ⟨hx.1.add hy.1, hx.2.nnreal_add hx.1 hy.1 hy.2
269-
· rintro ⟨ha₁, ha₂⟩
270-
let s := cfc Real.sqrt a
271-
have : a = star s * s := by
272-
rw [← cfc_id a (R := ℝ), ← cfc_star (R := ℝ) _ a, ← cfc_mul ..]
273-
apply cfc_congr
274-
peel ha₂ with x hx _
275-
simp [Real.mul_self_sqrt this]
276-
exact this ▸ star_mul_self_nonneg s
303+
rw [← StarOrderedRing.nonneg_iff] at x_mem y_mem
304+
exact hx.nnreal_add (.of_nonneg x_mem) (.of_nonneg y_mem) hy
277305

278-
open NNReal in
279-
instance Nonneg.instContinuousFunctionalCalculus :
280-
ContinuousFunctionalCalculus ℝ≥0 (fun x : A ↦ 0 ≤ x) :=
281-
SpectrumRestricts.cfc (q := IsSelfAdjoint) ContinuousMap.realToNNReal
282-
isometry_subtype_coe (fun _ ↦ nonneg_iff_isSelfAdjoint_and_spectrumRestricts)
283-
(fun _ _ ↦ inferInstance)
306+
end NonnegSpectrumClass
284307

285-
end Nonneg
308+
section RealEqComplex
309+
310+
variable {A : Type*} [TopologicalSpace A] [Ring A] [StarRing A] [Algebra ℂ A]
311+
[StarModule ℂ A] [ContinuousFunctionalCalculus ℂ (IsStarNormal : A → Prop)]
312+
[ContinuousFunctionalCalculus ℝ (IsSelfAdjoint : A → Prop)]
313+
[UniqueContinuousFunctionalCalculus ℝ A]
314+
[UniqueContinuousFunctionalCalculus ℂ A]
315+
316+
lemma cfcHom_real_eq_restrict {a : A} (ha : IsSelfAdjoint a) :
317+
cfcHom ha = ha.spectrumRestricts.starAlgHom (cfcHom ha.isStarNormal) (f := Complex.reCLM) :=
318+
have := UniqueContinuousFunctionalCalculus.compactSpace_spectrum a (R := ℂ)
319+
ha.spectrumRestricts.cfcHom_eq_restrict Complex.isometry_ofReal ha ha.isStarNormal
320+
321+
lemma cfc_real_eq_complex {a : A} (f : ℝ → ℝ) (ha : IsSelfAdjoint a := by cfc_tac) :
322+
cfc f a = cfc (fun x ↦ f x.re : ℂ → ℂ) a := by
323+
have := UniqueContinuousFunctionalCalculus.compactSpace_spectrum a (R := ℂ)
324+
replace ha : IsSelfAdjoint a := ha -- hack to avoid issues caused by autoParam
325+
exact ha.spectrumRestricts.cfc_eq_restrict (f := Complex.reCLM) Complex.isometry_ofReal ha
326+
ha.isStarNormal f
327+
328+
end RealEqComplex
329+
330+
section NNRealEqReal
331+
332+
open NNReal
333+
334+
variable {A : Type*} [TopologicalSpace A] [Ring A] [PartialOrder A] [StarRing A]
335+
[StarOrderedRing A] [Algebra ℝ A] [TopologicalRing A] [ContinuousStar A] [StarModule ℝ A]
336+
[ContinuousFunctionalCalculus ℝ (IsSelfAdjoint : A → Prop)]
337+
[ContinuousFunctionalCalculus ℝ≥0 ((0 : A) ≤ ·)] [UniqueContinuousFunctionalCalculus ℝ A]
338+
[NonnegSpectrumClass ℝ A]
339+
340+
lemma cfcHom_nnreal_eq_restrict {a : A} (ha : 0 ≤ a) :
341+
cfcHom ha = (SpectrumRestricts.nnreal_of_nonneg ha).starAlgHom
342+
(cfcHom (IsSelfAdjoint.of_nonneg ha)) := by
343+
have := UniqueContinuousFunctionalCalculus.compactSpace_spectrum a (R := ℝ)
344+
apply (SpectrumRestricts.nnreal_of_nonneg ha).cfcHom_eq_restrict isometry_subtype_coe
345+
346+
lemma cfc_nnreal_eq_real {a : A} (f : ℝ≥0 → ℝ≥0) (ha : 0 ≤ a := by cfc_tac) :
347+
cfc f a = cfc (fun x ↦ f x.toNNReal : ℝ → ℝ) a := by
348+
have := UniqueContinuousFunctionalCalculus.compactSpace_spectrum a (R := ℝ)
349+
replace ha : 0 ≤ a := ha -- hack to avoid issues caused by autoParam
350+
apply (SpectrumRestricts.nnreal_of_nonneg ha).cfc_eq_restrict
351+
isometry_subtype_coe ha (.of_nonneg ha)
352+
353+
end NNRealEqReal
286354

287355
end

0 commit comments

Comments
 (0)