Theorem: nonneg_iff_isSelfAdjoint_and_spectrumRestricts
File: Mathlib/Analysis/NormedSpace/Star/ContinuousFunctionalCalculus/Instances.lean

tactic: refine ⟨fun ha ↦ ⟨.of_nonneg ha, .nnreal_of_nonneg ha⟩, ?_⟩
state_before: A : Type u_1
inst✝⁸ : Ring A
inst✝⁷ : PartialOrder A
inst✝⁶ : StarRing A
inst✝⁵ : StarOrderedRing A
inst✝⁴ : TopologicalSpace A
inst✝³ : Algebra ℝ A
inst✝² : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
inst✝¹ : NonnegSpectrumClass ℝ A
inst✝ : UniqueContinuousFunctionalCalculus ℝ A
a : A
⊢ 0 ≤ a ↔ IsSelfAdjoint a ∧ SpectrumRestricts a ⇑ContinuousMap.realToNNReal
state_after: A : Type u_1
inst✝⁸ : Ring A
inst✝⁷ : PartialOrder A
inst✝⁶ : StarRing A
inst✝⁵ : StarOrderedRing A
inst✝⁴ : TopologicalSpace A
inst✝³ : Algebra ℝ A
inst✝² : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
inst✝¹ : NonnegSpectrumClass ℝ A
inst✝ : UniqueContinuousFunctionalCalculus ℝ A
a : A
⊢ IsSelfAdjoint a ∧ SpectrumRestricts a ⇑ContinuousMap.realToNNReal → 0 ≤ a

tactic: rintro ⟨ha₁, ha₂⟩
state_before: A : Type u_1
inst✝⁸ : Ring A
inst✝⁷ : PartialOrder A
inst✝⁶ : StarRing A
inst✝⁵ : StarOrderedRing A
inst✝⁴ : TopologicalSpace A
inst✝³ : Algebra ℝ A
inst✝² : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
inst✝¹ : NonnegSpectrumClass ℝ A
inst✝ : UniqueContinuousFunctionalCalculus ℝ A
a : A
⊢ IsSelfAdjoint a ∧ SpectrumRestricts a ⇑ContinuousMap.realToNNReal → 0 ≤ a
state_after: case intro
A : Type u_1
inst✝⁸ : Ring A
inst✝⁷ : PartialOrder A
inst✝⁶ : StarRing A
inst✝⁵ : StarOrderedRing A
inst✝⁴ : TopologicalSpace A
inst✝³ : Algebra ℝ A
inst✝² : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
inst✝¹ : NonnegSpectrumClass ℝ A
inst✝ : UniqueContinuousFunctionalCalculus ℝ A
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
⊢ 0 ≤ a

tactic: obtain ⟨x, hx, -, rfl⟩ := CFC.exists_sqrt_of_isSelfAdjoint_of_spectrumRestricts ha₁ ha₂
state_before: case intro
A : Type u_1
inst✝⁸ : Ring A
inst✝⁷ : PartialOrder A
inst✝⁶ : StarRing A
inst✝⁵ : StarOrderedRing A
inst✝⁴ : TopologicalSpace A
inst✝³ : Algebra ℝ A
inst✝² : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
inst✝¹ : NonnegSpectrumClass ℝ A
inst✝ : UniqueContinuousFunctionalCalculus ℝ A
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
⊢ 0 ≤ a
state_after: case intro.intro.intro.intro
A : Type u_1
inst✝⁸ : Ring A
inst✝⁷ : PartialOrder A
inst✝⁶ : StarRing A
inst✝⁵ : StarOrderedRing A
inst✝⁴ : TopologicalSpace A
inst✝³ : Algebra ℝ A
inst✝² : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
inst✝¹ : NonnegSpectrumClass ℝ A
inst✝ : UniqueContinuousFunctionalCalculus ℝ A
x : A
hx : IsSelfAdjoint x
ha₁ : IsSelfAdjoint (x ^ 2)
ha₂ : SpectrumRestricts (x ^ 2) ⇑ContinuousMap.realToNNReal
⊢ 0 ≤ x ^ 2

tactic: simpa [sq, hx.star_eq] using star_mul_self_nonneg x
state_before: case intro.intro.intro.intro
A : Type u_1
inst✝⁸ : Ring A
inst✝⁷ : PartialOrder A
inst✝⁶ : StarRing A
inst✝⁵ : StarOrderedRing A
inst✝⁴ : TopologicalSpace A
inst✝³ : Algebra ℝ A
inst✝² : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
inst✝¹ : NonnegSpectrumClass ℝ A
inst✝ : UniqueContinuousFunctionalCalculus ℝ A
x : A
hx : IsSelfAdjoint x
ha₁ : IsSelfAdjoint (x ^ 2)
ha₂ : SpectrumRestricts (x ^ 2) ⇑ContinuousMap.realToNNReal
⊢ 0 ≤ x ^ 2
state_after: no goals