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

tactic: use cfc Real.sqrt a, cfc_predicate Real.sqrt a
state_before: A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
⊢ ∃ x, IsSelfAdjoint x ∧ SpectrumRestricts x ⇑ContinuousMap.realToNNReal ∧ x ^ 2 = a
state_after: case right
A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
⊢ SpectrumRestricts (cfc Real.sqrt a) ⇑ContinuousMap.realToNNReal ∧ cfc Real.sqrt a ^ 2 = a

tactic: constructor
state_before: case right
A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
⊢ SpectrumRestricts (cfc Real.sqrt a) ⇑ContinuousMap.realToNNReal ∧ cfc Real.sqrt a ^ 2 = a
state_after: case right.left
A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
⊢ SpectrumRestricts (cfc Real.sqrt a) ⇑ContinuousMap.realToNNReal

case right.right
A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
⊢ cfc Real.sqrt a ^ 2 = a

tactic: simpa only [SpectrumRestricts.nnreal_iff, cfc_map_spectrum Real.sqrt a, Set.mem_image,
  forall_exists_index, and_imp, forall_apply_eq_imp_iff₂] using fun x _ ↦ Real.sqrt_nonneg x
state_before: case right.left
A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
⊢ SpectrumRestricts (cfc Real.sqrt a) ⇑ContinuousMap.realToNNReal
state_after: no goals

tactic: rw [← cfc_pow ..]
state_before: case right.right
A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
⊢ cfc Real.sqrt a ^ 2 = a
state_after: case right.right
A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
⊢ cfc (fun x => √x ^ 2) a = a

tactic: nth_rw 2 [← cfc_id ℝ a]
state_before: case right.right
A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
⊢ cfc (fun x => √x ^ 2) a = a
state_after: case right.right
A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
⊢ cfc (fun x => √x ^ 2) a = cfc id a

tactic: apply cfc_congr fun x hx ↦ ?_
state_before: case right.right
A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
⊢ cfc (fun x => √x ^ 2) a = cfc id a
state_after: A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
x : ℝ
hx : x ∈ σ ℝ a
⊢ √x ^ 2 = id x

tactic: rw [SpectrumRestricts.nnreal_iff] at ha₂
state_before: A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : SpectrumRestricts a ⇑ContinuousMap.realToNNReal
x : ℝ
hx : x ∈ σ ℝ a
⊢ √x ^ 2 = id x
state_after: A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : ∀ x ∈ σ ℝ a, 0 ≤ x
x : ℝ
hx : x ∈ σ ℝ a
⊢ √x ^ 2 = id x

tactic: apply ha₂ x at hx
state_before: A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : ∀ x ∈ σ ℝ a, 0 ≤ x
x : ℝ
hx : x ∈ σ ℝ a
⊢ √x ^ 2 = id x
state_after: A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : ∀ x ∈ σ ℝ a, 0 ≤ x
x : ℝ
hx : 0 ≤ x
⊢ √x ^ 2 = id x

tactic: simp [Real.sq_sqrt hx]
state_before: A : Type u_1
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : TopologicalSpace A
inst✝¹ : Algebra ℝ A
inst✝ : ContinuousFunctionalCalculus ℝ IsSelfAdjoint
a : A
ha₁ : IsSelfAdjoint a
ha₂ : ∀ x ∈ σ ℝ a, 0 ≤ x
x : ℝ
hx : 0 ≤ x
⊢ √x ^ 2 = id x
state_after: no goals