Theorem: cfc_comp
File: Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommSemiring R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalSemiring R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f✝ g✝ : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf✝ : autoParam (ContinuousOn f✝ (spectrum R a✝)) _auto✝
hg✝ : autoParam (ContinuousOn g✝ (spectrum R a✝)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
g f : R → R
a : A
ha : autoParam (p a) _auto✝
hg : autoParam (ContinuousOn g (f '' spectrum R a)) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
⊢ cfc (g ∘ f) a = cfc g (cfc f a)
state_after: R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommSemiring R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalSemiring R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f✝ g✝ : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf✝ : autoParam (ContinuousOn f✝ (spectrum R a✝)) _auto✝
hg✝ : autoParam (ContinuousOn g✝ (spectrum R a✝)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
g f : R → R
a : A
ha : autoParam (p a) _auto✝
hg : autoParam (ContinuousOn g (f '' spectrum R a)) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
this : ContinuousOn (g ∘ f) (spectrum R a)
⊢ cfc (g ∘ f) a = cfc g (cfc f a)
tactic: have := hg.comp hf <| (spectrum R a).mapsTo_image f
state_before: R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommSemiring R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalSemiring R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f✝ g✝ : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf✝ : autoParam (ContinuousOn f✝ (spectrum R a✝)) _auto✝
hg✝ : autoParam (ContinuousOn g✝ (spectrum R a✝)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
g f : R → R
a : A
ha : autoParam (p a) _auto✝
hg : autoParam (ContinuousOn g (f '' spectrum R a)) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
this : ContinuousOn (g ∘ f) (spectrum R a)
⊢ cfc (g ∘ f) a = cfc g (cfc f a)
state_after: R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommSemiring R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalSemiring R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f✝ g✝ : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf✝ : autoParam (ContinuousOn f✝ (spectrum R a✝)) _auto✝
hg✝ : autoParam (ContinuousOn g✝ (spectrum R a✝)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
g f : R → R
a : A
ha : autoParam (p a) _auto✝
hg : autoParam (ContinuousOn g (f '' spectrum R a)) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
this : ContinuousOn (g ∘ f) (spectrum R a)
sp_eq : spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ }) = f '' spectrum R a
⊢ cfc (g ∘ f) a = cfc g (cfc f a)
tactic: have sp_eq : spectrum R (cfcHom (show p a from ha) (ContinuousMap.mk _ hf.restrict)) =
      f '' (spectrum R a) := by
    rw [cfcHom_map_spectrum (by exact ha) _]
    ext
    simp
state_before: R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommSemiring R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalSemiring R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f✝ g✝ : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf✝ : autoParam (ContinuousOn f✝ (spectrum R a✝)) _auto✝
hg✝ : autoParam (ContinuousOn g✝ (spectrum R a✝)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
g f : R → R
a : A
ha : autoParam (p a) _auto✝
hg : autoParam (ContinuousOn g (f '' spectrum R a)) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
this : ContinuousOn (g ∘ f) (spectrum R a)
sp_eq : spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ }) = f '' spectrum R a
⊢ cfc (g ∘ f) a = cfc g (cfc f a)
state_after: R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommSemiring R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalSemiring R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f✝ g✝ : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf✝ : autoParam (ContinuousOn f✝ (spectrum R a✝)) _auto✝
hg✝ : autoParam (ContinuousOn g✝ (spectrum R a✝)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
g f : R → R
a : A
ha : autoParam (p a) _auto✝
hg : autoParam (ContinuousOn g (f '' spectrum R a)) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
this : ContinuousOn (g ∘ f) (spectrum R a)
sp_eq : spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ }) = f '' spectrum R a
⊢ (cfcHom ha) { toFun := (spectrum R a).restrict (g ∘ f), continuous_toFun := ⋯ } =
    (cfcHom ⋯)
      ({ toFun := (spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ })).restrict g,
            continuous_toFun := ⋯ }.comp
        ?f')

case f'
R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommSemiring R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalSemiring R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f✝ g✝ : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf✝ : autoParam (ContinuousOn f✝ (spectrum R a✝)) _auto✝
hg✝ : autoParam (ContinuousOn g✝ (spectrum R a✝)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
g f : R → R
a : A
ha : autoParam (p a) _auto✝
hg : autoParam (ContinuousOn g (f '' spectrum R a)) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
this : ContinuousOn (g ∘ f) (spectrum R a)
sp_eq : spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ }) = f '' spectrum R a
⊢ C(↑(spectrum R a), ↑(spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ })))

case hff'
R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommSemiring R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalSemiring R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f✝ g✝ : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf✝ : autoParam (ContinuousOn f✝ (spectrum R a✝)) _auto✝
hg✝ : autoParam (ContinuousOn g✝ (spectrum R a✝)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
g f : R → R
a : A
ha : autoParam (p a) _auto✝
hg : autoParam (ContinuousOn g (f '' spectrum R a)) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
this : ContinuousOn (g ∘ f) (spectrum R a)
sp_eq : spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ }) = f '' spectrum R a
⊢ ∀ (x : ↑(spectrum R a)), { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ } x = ↑(?f' x)
tactic: rw [cfc_apply .., cfc_apply f a,
    cfc_apply _ _ (cfcHom_predicate (show p a from ha) _) (by convert hg), ← cfcHom_comp _ _]
state_before: R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommSemiring R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalSemiring R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f✝ g✝ : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf✝ : autoParam (ContinuousOn f✝ (spectrum R a✝)) _auto✝
hg✝ : autoParam (ContinuousOn g✝ (spectrum R a✝)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
g f : R → R
a : A
ha : autoParam (p a) _auto✝
hg : autoParam (ContinuousOn g (f '' spectrum R a)) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
this : ContinuousOn (g ∘ f) (spectrum R a)
sp_eq : spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ }) = f '' spectrum R a
⊢ (cfcHom ha) { toFun := (spectrum R a).restrict (g ∘ f), continuous_toFun := ⋯ } =
    (cfcHom ⋯)
      ({ toFun := (spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ })).restrict g,
            continuous_toFun := ⋯ }.comp
        ?f')

case f'
R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommSemiring R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalSemiring R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f✝ g✝ : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf✝ : autoParam (ContinuousOn f✝ (spectrum R a✝)) _auto✝
hg✝ : autoParam (ContinuousOn g✝ (spectrum R a✝)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
g f : R → R
a : A
ha : autoParam (p a) _auto✝
hg : autoParam (ContinuousOn g (f '' spectrum R a)) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
this : ContinuousOn (g ∘ f) (spectrum R a)
sp_eq : spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ }) = f '' spectrum R a
⊢ C(↑(spectrum R a), ↑(spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ })))

case hff'
R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommSemiring R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalSemiring R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f✝ g✝ : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf✝ : autoParam (ContinuousOn f✝ (spectrum R a✝)) _auto✝
hg✝ : autoParam (ContinuousOn g✝ (spectrum R a✝)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
g f : R → R
a : A
ha : autoParam (p a) _auto✝
hg : autoParam (ContinuousOn g (f '' spectrum R a)) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
this : ContinuousOn (g ∘ f) (spectrum R a)
sp_eq : spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ }) = f '' spectrum R a
⊢ ∀ (x : ↑(spectrum R a)), { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ } x = ↑(?f' x)
state_after: case f'
R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommSemiring R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalSemiring R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f✝ g✝ : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf✝ : autoParam (ContinuousOn f✝ (spectrum R a✝)) _auto✝
hg✝ : autoParam (ContinuousOn g✝ (spectrum R a✝)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
g f : R → R
a : A
ha : autoParam (p a) _auto✝
hg : autoParam (ContinuousOn g (f '' spectrum R a)) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
this : ContinuousOn (g ∘ f) (spectrum R a)
sp_eq : spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ }) = f '' spectrum R a
⊢ C(↑(spectrum R a), ↑(spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ })))

R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommSemiring R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalSemiring R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f✝ g✝ : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf✝ : autoParam (ContinuousOn f✝ (spectrum R a✝)) _auto✝
hg✝ : autoParam (ContinuousOn g✝ (spectrum R a✝)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
g f : R → R
a : A
ha : autoParam (p a) _auto✝
hg : autoParam (ContinuousOn g (f '' spectrum R a)) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
this : ContinuousOn (g ∘ f) (spectrum R a)
sp_eq : spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ }) = f '' spectrum R a
⊢ (cfcHom ha) { toFun := (spectrum R a).restrict (g ∘ f), continuous_toFun := ⋯ } =
    (cfcHom ⋯)
      ({ toFun := (spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ })).restrict g,
            continuous_toFun := ⋯ }.comp
        ?f')

case hff'
R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁰ : CommSemiring R
inst✝⁹ : StarRing R
inst✝⁸ : MetricSpace R
inst✝⁷ : TopologicalSemiring R
inst✝⁶ : ContinuousStar R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f✝ g✝ : R → R
a✝ : A
ha✝ : autoParam (p a✝) _auto✝
hf✝ : autoParam (ContinuousOn f✝ (spectrum R a✝)) _auto✝
hg✝ : autoParam (ContinuousOn g✝ (spectrum R a✝)) _auto✝
inst✝ : UniqueContinuousFunctionalCalculus R A
g f : R → R
a : A
ha : autoParam (p a) _auto✝
hg : autoParam (ContinuousOn g (f '' spectrum R a)) _auto✝
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
this : ContinuousOn (g ∘ f) (spectrum R a)
sp_eq : spectrum R ((cfcHom ⋯) { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ }) = f '' spectrum R a
⊢ ∀ (x : ↑(spectrum R a)), { toFun := (spectrum R a).restrict f, continuous_toFun := ⋯ } x = ↑(?f' x)
tactic: swap