-- Mathlib/Analysis/CStarAlgebra/ContinuousFunctionalCalculus/Restrict.lean
lemma cfcₙ_eq_restrict (f : C(S, R)) (halg : IsUniformEmbedding (algebraMap R S)) {a : A}
    (hpa : p a) (hqa : q a) (h : QuasispectrumRestricts a f) (g : R → R) :
    cfcₙ g a = cfcₙ (fun x ↦ algebraMap R S (g (f x))) a

Proof state:
case neg.inl
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst✝²⁶ : Semifield R
inst✝²⁵ : StarRing R
inst✝²⁴ : MetricSpace R
inst✝²³ : IsTopologicalSemiring R
inst✝²² : ContinuousStar R
inst✝²¹ : Field S
inst✝²⁰ : StarRing S
inst✝¹⁹ : MetricSpace S
inst✝¹⁸ : IsTopologicalRing S
inst✝¹⁷ : ContinuousStar S
inst✝¹⁶ : NonUnitalRing A
inst✝¹⁵ : StarRing A
inst✝¹⁴ : Module S A
inst✝¹³ : IsScalarTower S A A
inst✝¹² : SMulCommClass S A A
inst✝¹¹ : Algebra R S
inst✝¹⁰ : Module R A
inst✝⁹ : IsScalarTower R S A
inst✝⁸ : StarModule R S
inst✝⁷ : ContinuousSMul R S
inst✝⁶ : TopologicalSpace A
inst✝⁵ : NonUnitalContinuousFunctionalCalculus S q
inst✝⁴ : CompleteSpace R
inst✝³ : IsScalarTower R A A
inst✝² : SMulCommClass R A A
inst✝¹ : NonUnitalContinuousFunctionalCalculus R p
inst✝ : UniqueHom R A
f : C(S, R)
halg : IsUniformEmbedding ⇑(algebraMap R S)
a : A
hpa : p a
hqa : q a
h : QuasispectrumRestricts a ⇑f
g : R → R
hg : ¬ContinuousOn g (σₙ R a)
this : ¬ContinuousOn (fun x => (algebraMap R S) (g (f x))) (σₙ S a)
⊢ cfcₙ g a = cfcₙ (fun x => (algebraMap R S) (g (f x))) a

Tactic:
rw [cfcₙ_apply_of_not_continuousOn a hg, cfcₙ_apply_of_not_continuousOn a this]

Result:
no goals

Proof state:
case neg
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst✝²⁶ : Semifield R
inst✝²⁵ : StarRing R
inst✝²⁴ : MetricSpace R
inst✝²³ : IsTopologicalSemiring R
inst✝²² : ContinuousStar R
inst✝²¹ : Field S
inst✝²⁰ : StarRing S
inst✝¹⁹ : MetricSpace S
inst✝¹⁸ : IsTopologicalRing S
inst✝¹⁷ : ContinuousStar S
inst✝¹⁶ : NonUnitalRing A
inst✝¹⁵ : StarRing A
inst✝¹⁴ : Module S A
inst✝¹³ : IsScalarTower S A A
inst✝¹² : SMulCommClass S A A
inst✝¹¹ : Algebra R S
inst✝¹⁰ : Module R A
inst✝⁹ : IsScalarTower R S A
inst✝⁸ : StarModule R S
inst✝⁷ : ContinuousSMul R S
inst✝⁶ : TopologicalSpace A
inst✝⁵ : NonUnitalContinuousFunctionalCalculus S q
inst✝⁴ : CompleteSpace R
inst✝³ : IsScalarTower R A A
inst✝² : SMulCommClass R A A
inst✝¹ : NonUnitalContinuousFunctionalCalculus R p
inst✝ : UniqueHom R A
f : C(S, R)
halg : IsUniformEmbedding ⇑(algebraMap R S)
a : A
hpa : p a
hqa : q a
h : QuasispectrumRestricts a ⇑f
g : R → R
hg : ¬ContinuousOn g (σₙ R a) ∨ ¬g 0 = 0
⊢ cfcₙ g a = cfcₙ (fun x => (algebraMap R S) (g (f x))) a

Tactic:
obtain (hg | hg) := hg

Result:
case neg.inl
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst✝²⁶ : Semifield R
inst✝²⁵ : StarRing R
inst✝²⁴ : MetricSpace R
inst✝²³ : IsTopologicalSemiring R
inst✝²² : ContinuousStar R
inst✝²¹ : Field S
inst✝²⁰ : StarRing S
inst✝¹⁹ : MetricSpace S
inst✝¹⁸ : IsTopologicalRing S
inst✝¹⁷ : ContinuousStar S
inst✝¹⁶ : NonUnitalRing A
inst✝¹⁵ : StarRing A
inst✝¹⁴ : Module S A
inst✝¹³ : IsScalarTower S A A
inst✝¹² : SMulCommClass S A A
inst✝¹¹ : Algebra R S
inst✝¹⁰ : Module R A
inst✝⁹ : IsScalarTower R S A
inst✝⁸ : StarModule R S
inst✝⁷ : ContinuousSMul R S
inst✝⁶ : TopologicalSpace A
inst✝⁵ : NonUnitalContinuousFunctionalCalculus S q
inst✝⁴ : CompleteSpace R
inst✝³ : IsScalarTower R A A
inst✝² : SMulCommClass R A A
inst✝¹ : NonUnitalContinuousFunctionalCalculus R p
inst✝ : UniqueHom R A
f : C(S, R)
halg : IsUniformEmbedding ⇑(algebraMap R S)
a : A
hpa : p a
hqa : q a
h : QuasispectrumRestricts a ⇑f
g : R → R
hg : ¬ContinuousOn g (σₙ R a)
⊢ cfcₙ g a = cfcₙ (fun x => (algebraMap R S) (g (f x))) a

case neg.inr
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst✝²⁶ : Semifield R
inst✝²⁵ : StarRing R
inst✝²⁴ : MetricSpace R
inst✝²³ : IsTopologicalSemiring R
inst✝²² : ContinuousStar R
inst✝²¹ : Field S
inst✝²⁰ : StarRing S
inst✝¹⁹ : MetricSpace S
inst✝¹⁸ : IsTopologicalRing S
inst✝¹⁷ : ContinuousStar S
inst✝¹⁶ : NonUnitalRing A
inst✝¹⁵ : StarRing A
inst✝¹⁴ : Module S A
inst✝¹³ : IsScalarTower S A A
inst✝¹² : SMulCommClass S A A
inst✝¹¹ : Algebra R S
inst✝¹⁰ : Module R A
inst✝⁹ : IsScalarTower R S A
inst✝⁸ : StarModule R S
inst✝⁷ : ContinuousSMul R S
inst✝⁶ : TopologicalSpace A
inst✝⁵ : NonUnitalContinuousFunctionalCalculus S q
inst✝⁴ : CompleteSpace R
inst✝³ : IsScalarTower R A A
inst✝² : SMulCommClass R A A
inst✝¹ : NonUnitalContinuousFunctionalCalculus R p
inst✝ : UniqueHom R A
f : C(S, R)
halg : IsUniformEmbedding ⇑(algebraMap R S)
a : A
hpa : p a
hqa : q a
h : QuasispectrumRestricts a ⇑f
g : R → R
hg : ¬g 0 = 0
⊢ cfcₙ g a = cfcₙ (fun x => (algebraMap R S) (g (f x))) a

Proof state:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst✝²⁶ : Semifield R
inst✝²⁵ : StarRing R
inst✝²⁴ : MetricSpace R
inst✝²³ : IsTopologicalSemiring R
inst✝²² : ContinuousStar R
inst✝²¹ : Field S
inst✝²⁰ : StarRing S
inst✝¹⁹ : MetricSpace S
inst✝¹⁸ : IsTopologicalRing S
inst✝¹⁷ : ContinuousStar S
inst✝¹⁶ : NonUnitalRing A
inst✝¹⁵ : StarRing A
inst✝¹⁴ : Module S A
inst✝¹³ : IsScalarTower S A A
inst✝¹² : SMulCommClass S A A
inst✝¹¹ : Algebra R S
inst✝¹⁰ : Module R A
inst✝⁹ : IsScalarTower R S A
inst✝⁸ : StarModule R S
inst✝⁷ : ContinuousSMul R S
inst✝⁶ : TopologicalSpace A
inst✝⁵ : NonUnitalContinuousFunctionalCalculus S q
inst✝⁴ : CompleteSpace R
inst✝³ : IsScalarTower R A A
inst✝² : SMulCommClass R A A
inst✝¹ : NonUnitalContinuousFunctionalCalculus R p
inst✝ : UniqueHom R A
f : C(S, R)
halg : IsUniformEmbedding ⇑(algebraMap R S)
a : A
hpa : p a
hqa : q a
h : QuasispectrumRestricts a ⇑f
g : R → R
hg : ¬ContinuousOn g (σₙ R a)
hg' : ContinuousOn (fun x => (algebraMap R S) (g (f x))) (σₙ S a)
⊢ ContinuousOn g (σₙ R a)

Tactic:
rw [halg.isEmbedding.continuousOn_iff]

Result:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst✝²⁶ : Semifield R
inst✝²⁵ : StarRing R
inst✝²⁴ : MetricSpace R
inst✝²³ : IsTopologicalSemiring R
inst✝²² : ContinuousStar R
inst✝²¹ : Field S
inst✝²⁰ : StarRing S
inst✝¹⁹ : MetricSpace S
inst✝¹⁸ : IsTopologicalRing S
inst✝¹⁷ : ContinuousStar S
inst✝¹⁶ : NonUnitalRing A
inst✝¹⁵ : StarRing A
inst✝¹⁴ : Module S A
inst✝¹³ : IsScalarTower S A A
inst✝¹² : SMulCommClass S A A
inst✝¹¹ : Algebra R S
inst✝¹⁰ : Module R A
inst✝⁹ : IsScalarTower R S A
inst✝⁸ : StarModule R S
inst✝⁷ : ContinuousSMul R S
inst✝⁶ : TopologicalSpace A
inst✝⁵ : NonUnitalContinuousFunctionalCalculus S q
inst✝⁴ : CompleteSpace R
inst✝³ : IsScalarTower R A A
inst✝² : SMulCommClass R A A
inst✝¹ : NonUnitalContinuousFunctionalCalculus R p
inst✝ : UniqueHom R A
f : C(S, R)
halg : IsUniformEmbedding ⇑(algebraMap R S)
a : A
hpa : p a
hqa : q a
h : QuasispectrumRestricts a ⇑f
g : R → R
hg : ¬ContinuousOn g (σₙ R a)
hg' : ContinuousOn (fun x => (algebraMap R S) (g (f x))) (σₙ S a)
⊢ ContinuousOn (⇑(algebraMap R S) ∘ g) (σₙ R a)