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

tactic: refine ⟨fun hu ↦ ?_, ?_⟩
state_before: A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
⊢ u ∈ unitary A ↔ IsStarNormal u ∧ σ ℂ u ⊆ ↑circle
state_after: case refine_1
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
⊢ IsStarNormal u ∧ σ ℂ u ⊆ ↑circle

case refine_2
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
⊢ IsStarNormal u ∧ σ ℂ u ⊆ ↑circle → u ∈ unitary A

tactic: have h_normal := isStarNormal_of_mem_unitary hu
state_before: case refine_1
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
⊢ IsStarNormal u ∧ σ ℂ u ⊆ ↑circle
state_after: case refine_1
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
h_normal : IsStarNormal u
⊢ IsStarNormal u ∧ σ ℂ u ⊆ ↑circle

tactic: refine ⟨h_normal, ?_⟩
state_before: case refine_1
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
h_normal : IsStarNormal u
⊢ IsStarNormal u ∧ σ ℂ u ⊆ ↑circle
state_after: case refine_1
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
h_normal : IsStarNormal u
⊢ σ ℂ u ⊆ ↑circle

tactic: have h := unitary.star_mul_self_of_mem hu
state_before: case refine_1
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
h_normal : IsStarNormal u
⊢ σ ℂ u ⊆ ↑circle
state_after: case refine_1
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
h_normal : IsStarNormal u
h : star u * u = 1
⊢ σ ℂ u ⊆ ↑circle

tactic: rw [← cfc_id ℂ u, ← cfc_star id u, ← cfc_mul .., ← cfc_one ℂ u] at h
state_before: case refine_1
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
h_normal : IsStarNormal u
h : star u * u = 1
⊢ σ ℂ u ⊆ ↑circle
state_after: case refine_1
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
h_normal : IsStarNormal u
h : cfc (fun x => star (id x) * id x) u = cfc 1 u
⊢ σ ℂ u ⊆ ↑circle

tactic: have := eqOn_of_cfc_eq_cfc h
state_before: case refine_1
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
h_normal : IsStarNormal u
h : cfc (fun x => star (id x) * id x) u = cfc 1 u
⊢ σ ℂ u ⊆ ↑circle
state_after: case refine_1
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
h_normal : IsStarNormal u
h : cfc (fun x => star (id x) * id x) u = cfc 1 u
this : Set.EqOn (fun x => star (id x) * id x) 1 (σ ℂ u)
⊢ σ ℂ u ⊆ ↑circle

tactic: peel this with x hx _
state_before: case refine_1
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
h_normal : IsStarNormal u
h : cfc (fun x => star (id x) * id x) u = cfc 1 u
this : Set.EqOn (fun x => star (id x) * id x) 1 (σ ℂ u)
⊢ σ ℂ u ⊆ ↑circle
state_after: case refine_1.h.h
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
h_normal : IsStarNormal u
h : cfc (fun x => star (id x) * id x) u = cfc 1 u
this✝ : Set.EqOn (fun x => star (id x) * id x) 1 (σ ℂ u)
x : ℂ
hx : x ∈ σ ℂ u
this : (fun x => star (id x) * id x) x = 1 x
⊢ x ∈ ↑circle

tactic: rw [SetLike.mem_coe, mem_circle_iff_normSq]
state_before: case refine_1.h.h
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
h_normal : IsStarNormal u
h : cfc (fun x => star (id x) * id x) u = cfc 1 u
this✝ : Set.EqOn (fun x => star (id x) * id x) 1 (σ ℂ u)
x : ℂ
hx : x ∈ σ ℂ u
this : (fun x => star (id x) * id x) x = 1 x
⊢ x ∈ ↑circle
state_after: case refine_1.h.h
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
h_normal : IsStarNormal u
h : cfc (fun x => star (id x) * id x) u = cfc 1 u
this✝ : Set.EqOn (fun x => star (id x) * id x) 1 (σ ℂ u)
x : ℂ
hx : x ∈ σ ℂ u
this : (fun x => star (id x) * id x) x = 1 x
⊢ Complex.normSq x = 1

tactic: simpa using congr($(this).re)
state_before: case refine_1.h.h
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
hu : u ∈ unitary A
h_normal : IsStarNormal u
h : cfc (fun x => star (id x) * id x) u = cfc 1 u
this✝ : Set.EqOn (fun x => star (id x) * id x) 1 (σ ℂ u)
x : ℂ
hx : x ∈ σ ℂ u
this : (fun x => star (id x) * id x) x = 1 x
⊢ Complex.normSq x = 1
state_after: no goals

tactic: rintro ⟨_, hu⟩
state_before: case refine_2
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
⊢ IsStarNormal u ∧ σ ℂ u ⊆ ↑circle → u ∈ unitary A
state_after: case refine_2.intro
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
⊢ u ∈ unitary A

tactic: rw [unitary.mem_iff, ← cfc_id ℂ u, ← cfc_star, ← cfc_mul .., ← cfc_mul .., ← cfc_one ℂ u]
state_before: case refine_2.intro
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
⊢ u ∈ unitary A
state_after: case refine_2.intro
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
⊢ cfc (fun x => star (id x) * id x) u = cfc 1 u ∧ cfc (fun x => id x * star (id x)) u = cfc 1 u

tactic: simp only [id_eq]
state_before: case refine_2.intro
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
⊢ cfc (fun x => star (id x) * id x) u = cfc 1 u ∧ cfc (fun x => id x * star (id x)) u = cfc 1 u
state_after: case refine_2.intro
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
⊢ cfc (fun x => star x * x) u = cfc 1 u ∧ cfc (fun x => x * star x) u = cfc 1 u

tactic: constructor
state_before: case refine_2.intro
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
⊢ cfc (fun x => star x * x) u = cfc 1 u ∧ cfc (fun x => x * star x) u = cfc 1 u
state_after: case refine_2.intro.left
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
⊢ cfc (fun x => star x * x) u = cfc 1 u

case refine_2.intro.right
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
⊢ cfc (fun x => x * star x) u = cfc 1 u

tactic: all_goals
  apply cfc_congr (fun x hx ↦ ?_)
  simp only [RCLike.star_def, mul_comm x]
  apply hu at hx
  rwa [SetLike.mem_coe, mem_circle_iff_normSq, ← Complex.ofReal_injective.eq_iff,
    Complex.normSq_eq_conj_mul_self] at hx
state_before: case refine_2.intro.left
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
⊢ cfc (fun x => star x * x) u = cfc 1 u

case refine_2.intro.right
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
⊢ cfc (fun x => x * star x) u = cfc 1 u
state_after: no goals

tactic: apply cfc_congr (fun x hx ↦ ?_)
state_before: case refine_2.intro.right
A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
⊢ cfc (fun x => x * star x) u = cfc 1 u
state_after: A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
x : ℂ
hx : x ∈ σ ℂ u
⊢ x * star x = 1 x

tactic: simp only [RCLike.star_def, mul_comm x]
state_before: A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
x : ℂ
hx : x ∈ σ ℂ u
⊢ x * star x = 1 x
state_after: A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
x : ℂ
hx : x ∈ σ ℂ u
⊢ (starRingEnd ℂ) x * x = 1 x

tactic: apply hu at hx
state_before: A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
x : ℂ
hx : x ∈ σ ℂ u
⊢ (starRingEnd ℂ) x * x = 1 x
state_after: A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
x : ℂ
hx : x ∈ ↑circle
⊢ (starRingEnd ℂ) x * x = 1 x

tactic: rwa [SetLike.mem_coe, mem_circle_iff_normSq, ← Complex.ofReal_injective.eq_iff,
  Complex.normSq_eq_conj_mul_self] at hx
state_before: A : Type u_1
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra ℂ A
inst✝¹ : StarModule ℂ A
inst✝ : ContinuousFunctionalCalculus ℂ IsStarNormal
u : A
left✝ : IsStarNormal u
hu : σ ℂ u ⊆ ↑circle
x : ℂ
hx : x ∈ ↑circle
⊢ (starRingEnd ℂ) x * x = 1 x
state_after: no goals