-- Mathlib/Analysis/CStarAlgebra/ContinuousFunctionalCalculus/Restrict.lean
theorem cfc (f : C(S, R)) (halg : IsUniformEmbedding (algebraMap R S)) (h0 : p 0)
    (h : ∀ a, p a ↔ q a ∧ QuasispectrumRestricts a f) :
    NonUnitalContinuousFunctionalCalculus R p where
  predicate_zero := h0
  compactSpace_quasispectrum 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
f : C(S, R)
halg : IsUniformEmbedding ⇑(algebraMap R S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ QuasispectrumRestricts a ⇑f
a : A
ha : p a
g : C(↑(σₙ R a), R)₀
⊢ p ((nonUnitalStarAlgHom (cfcₙHom ⋯) ⋯) g)

Tactic:
rw [h]

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
f : C(S, R)
halg : IsUniformEmbedding ⇑(algebraMap R S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ QuasispectrumRestricts a ⇑f
a : A
ha : p a
g : C(↑(σₙ R a), R)₀
⊢ q ((nonUnitalStarAlgHom (cfcₙHom ⋯) ⋯) g) ∧ QuasispectrumRestricts ((nonUnitalStarAlgHom (cfcₙHom ⋯) ⋯) g) ⇑f

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
f : C(S, R)
halg : IsUniformEmbedding ⇑(algebraMap R S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ QuasispectrumRestricts a ⇑f
a : A
ha : p a
⊢ ∀ (f_1 : C(↑(σₙ R a), R)₀), σₙ R ((nonUnitalStarAlgHom (cfcₙHom ⋯) ⋯) f_1) = range ⇑f_1

Tactic:
intro g

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
f : C(S, R)
halg : IsUniformEmbedding ⇑(algebraMap R S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ QuasispectrumRestricts a ⇑f
a : A
ha : p a
g : C(↑(σₙ R a), R)₀
⊢ σₙ R ((nonUnitalStarAlgHom (cfcₙHom ⋯) ⋯) g) = range ⇑g

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
f : C(S, R)
halg : IsUniformEmbedding ⇑(algebraMap R S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ QuasispectrumRestricts a ⇑f
a : A
ha : p a
⊢ IsClosedEmbedding ⇑(nonUnitalStarAlgHom (cfcₙHom ⋯) ⋯)

Tactic:
exact ((h a).mp ha).2.isClosedEmbedding_nonUnitalStarAlgHom
  (cfcₙHom_isClosedEmbedding ((h a).mp ha).1) halg

Result:
no goals

Proof state:
case h.mp.intro
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
f : C(S, R)
halg : IsUniformEmbedding ⇑(algebraMap R S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ QuasispectrumRestricts a ⇑f
a : A
ha : p a
g : C(↑(σₙ R a), R)₀
x : R
y : ↑(σₙ S a)
hy :
  ({ toFun := ⇑(StarAlgHom.ofId R S), continuous_toFun := ⋯, map_zero' := ⋯ }.comp
        (g.comp { toFun := Subtype.map ⇑f ⋯, continuous_toFun := ⋯, map_zero' := ⋯ }))
      y =
    (algebraMap R S) x
⊢ x ∈ range ⇑g

Tactic:
have := congr_arg f hy

Result:
case h.mp.intro
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
f : C(S, R)
halg : IsUniformEmbedding ⇑(algebraMap R S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ QuasispectrumRestricts a ⇑f
a : A
ha : p a
g : C(↑(σₙ R a), R)₀
x : R
y : ↑(σₙ S a)
hy :
  ({ toFun := ⇑(StarAlgHom.ofId R S), continuous_toFun := ⋯, map_zero' := ⋯ }.comp
        (g.comp { toFun := Subtype.map ⇑f ⋯, continuous_toFun := ⋯, map_zero' := ⋯ }))
      y =
    (algebraMap R S) x
this :
  f
      (({ toFun := ⇑(StarAlgHom.ofId R S), continuous_toFun := ⋯, map_zero' := ⋯ }.comp
          (g.comp { toFun := Subtype.map ⇑f ⋯, continuous_toFun := ⋯, map_zero' := ⋯ }))
        y) =
    f ((algebraMap R S) x)
⊢ x ∈ range ⇑g