awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
⊢ Function.Injective.{u_1 + 1, u_3 + 1} (α := C((↑(spectrum R a) : Type u_1), R)) (β := A)
    (⇑(starAlgHom (cfcHom (p := q) ⋯) ⋯) : (a : C((↑(spectrum R a) : Type u_1), R)) → A)

Tactic:
exact ((h a).mp ha).2.starAlgHom_injective (cfcHom_injective ((h a).mp ha).1) halg.injective

Premises used: cfcHom_injective, Topology.IsClosedEmbedding.toIsEmbedding, And.right, And.left, Topology.IsEmbedding.injective, Iff.mp, SpectrumRestricts.starAlgHom_injective
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
⊢ Function.Injective.{u_1 + 1, u_3 + 1} (α := C((↑(spectrum R a) : Type u_1), R)) (β := A)
    (⇑(starAlgHom (cfcHom (p := q) ⋯) ⋯) : (a : C((↑(spectrum R a) : Type u_1), R)) → A)

Tactic:
case hom_injective =>
      exact ((h a).mp ha).2.starAlgHom_injective (cfcHom_injective ((h a).mp ha).1) halg.injective

Premises used: cfcHom_injective, Topology.IsClosedEmbedding.toIsEmbedding, And.right, And.left, Topology.IsEmbedding.injective, Iff.mp, SpectrumRestricts.starAlgHom_injective
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
⊢ (starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
      (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R)) =
    a

Tactic:
((h a).mp ha).2.starAlgHom_id <| cfcHom_id ((h a).mp ha).1

Premises used: cfcHom_id, And.right, And.left, Iff.mp, SpectrumRestricts.starAlgHom_id
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
⊢ (starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
      (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R)) =
    a

Tactic:
exact ((h a).mp ha).2.starAlgHom_id <| cfcHom_id ((h a).mp ha).1

Premises used: cfcHom_id, And.right, And.left, Iff.mp, SpectrumRestricts.starAlgHom_id
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
⊢ (starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
      (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R)) =
    a

Tactic:
case hom_id => exact ((h a).mp ha).2.starAlgHom_id <| cfcHom_id ((h a).mp ha).1

Premises used: cfcHom_id, And.right, And.left, Iff.mp, SpectrumRestricts.starAlgHom_id
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
simp :
  ∀ (f_1 : C((↑(spectrum R a) : Type u_1), R)) (x : R),
    (∃ (y : (↑(spectrum S a) : Type u_2)),
        (f_1 : (a : (↑(spectrum R a) : Type u_1)) → R)
            (Subtype.map (p := fun (x : S) ↦ x ∈ spectrum S a) (q := fun (x : R) ↦ x ∈ spectrum R a) (⇑f : (a : S) → R)
              ⋯ y) =
          x) ↔
      ∃ (y : (↑(spectrum R a) : Type u_1)), (f_1 : (a : (↑(spectrum R a) : Type u_1)) → R) y = x
⊢ ∀ (f_1 : C((↑(spectrum R a) : Type u_1), R)),
    spectrum.{u_1, u_3} R (A := A)
        ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) f_1 : A) =
      range (ι := (↑(spectrum R a) : Type u_1)) (⇑f_1 : (a : (↑(spectrum R a) : Type u_1)) → R)

Tactic:
simp only [SpectrumRestricts.starAlgHom_apply, ← @spectrum.preimage_algebraMap (R := R) S,
        cfcHom_map_spectrum, Set.ext_iff, Set.mem_preimage, Set.mem_range, ContinuousMap.comp_apply,
        ContinuousMap.coe_mk, StarAlgHom.ofId_apply, halg.injective.eq_iff]

Premises used: Set.mem_range, Function.Injective.eq_iff, ContinuousMap.comp_apply, spectrum.preimage_algebraMap, StarAlgHom.ofId_apply, Topology.IsClosedEmbedding.toIsEmbedding, SpectrumRestricts.starAlgHom_apply, ContinuousMap.coe_mk, Topology.IsEmbedding.injective, Set.ext_iff, cfcHom_map_spectrum, Set.mem_preimage
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
⊢ ∀ (f_1 : C((↑(spectrum R a) : Type u_1), R)) (x : R),
    (∃ (y : (↑(spectrum S a) : Type u_2)),
        (f_1 : (a : (↑(spectrum R a) : Type u_1)) → R)
            (Subtype.map (p := fun (x : S) ↦ x ∈ spectrum S a) (q := fun (x : R) ↦ x ∈ spectrum R a) (⇑f : (a : S) → R)
              ⋯ y) =
          x) ↔
      ∃ (y : (↑(spectrum R a) : Type u_1)), (f_1 : (a : (↑(spectrum R a) : Type u_1)) → R) y = x

Tactic:
fun _ _ ↦ ((h a).mp ha).2.homeomorph.exists_congr fun _ ↦ Iff.rfl

Premises used: Homeomorph.toEquiv, Iff.rfl, SpectrumRestricts.homeomorph, And.right, Iff.mp, Equiv.exists_congr
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
⊢ ∀ (f_1 : C((↑(spectrum R a) : Type u_1), R)) (x : R),
    (∃ (y : (↑(spectrum S a) : Type u_2)),
        (f_1 : (a : (↑(spectrum R a) : Type u_1)) → R)
            (Subtype.map (p := fun (x : S) ↦ x ∈ spectrum S a) (q := fun (x : R) ↦ x ∈ spectrum R a) (⇑f : (a : S) → R)
              ⋯ y) =
          x) ↔
      ∃ (y : (↑(spectrum R a) : Type u_1)), (f_1 : (a : (↑(spectrum R a) : Type u_1)) → R) y = x

Tactic:
exact fun _ _ ↦ ((h a).mp ha).2.homeomorph.exists_congr fun _ ↦ Iff.rfl

Premises used: Homeomorph.toEquiv, Iff.rfl, SpectrumRestricts.homeomorph, And.right, Iff.mp, Equiv.exists_congr
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
⊢ ∀ (f_1 : C((↑(spectrum R a) : Type u_1), R)),
    spectrum.{u_1, u_3} R (A := A)
        ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) f_1 : A) =
      range (ι := (↑(spectrum R a) : Type u_1)) (⇑f_1 : (a : (↑(spectrum R a) : Type u_1)) → R)

Tactic:
case hom_map_spectrum =>
      simp only [SpectrumRestricts.starAlgHom_apply, ← @spectrum.preimage_algebraMap (R := R) S,
        cfcHom_map_spectrum, Set.ext_iff, Set.mem_preimage, Set.mem_range, ContinuousMap.comp_apply,
        ContinuousMap.coe_mk, StarAlgHom.ofId_apply, halg.injective.eq_iff]
      exact fun _ _ ↦ ((h a).mp ha).2.homeomorph.exists_congr fun _ ↦ Iff.rfl

Premises used: Set.mem_range, Homeomorph.toEquiv, Iff.rfl, Function.Injective.eq_iff, ContinuousMap.comp_apply, spectrum.preimage_algebraMap, StarAlgHom.ofId_apply, Topology.IsClosedEmbedding.toIsEmbedding, SpectrumRestricts.homeomorph, SpectrumRestricts.starAlgHom_apply, And.right, ContinuousMap.coe_mk, Topology.IsEmbedding.injective, Iff.mp, Set.ext_iff, cfcHom_map_spectrum, Set.mem_preimage, Equiv.exists_congr
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
g : C((↑(spectrum R a) : Type u_1), R)
rw :
  q ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g) ∧
    SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) (A := A)
      ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g : A) (⇑f : (a : S) → R)
⊢ p ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g)

Tactic:
rw [h]
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
g : C((↑(spectrum R a) : Type u_1), R)
⊢ q ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g) ∧
    SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) (A := A)
      ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g : A) (⇑f : (a : S) → R)

Tactic:
⟨cfcHom_predicate _ _, ?_⟩

Premises used: And.intro, cfcHom_predicate
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
g : C((↑(spectrum R a) : Type u_1), R)
refine :
  SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) (A := A)
    ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g : A) (⇑f : (a : S) → R)
⊢ q ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g) ∧
    SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) (A := A)
      ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g : A) (⇑f : (a : S) → R)

Tactic:
refine ⟨cfcHom_predicate _ _, ?_⟩
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
g : C((↑(spectrum R a) : Type u_1), R)
⊢ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) (A := A)
    ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g : A) (⇑f : (a : S) → R)

Tactic:
.of_rightInvOn (((h a).mp ha).2.left_inv) fun s hs ↦ ?_

Premises used: And.right, Iff.mp, SpectrumRestricts.of_rightInvOn, QuasispectrumRestricts.left_inv
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
g : C((↑(spectrum R a) : Type u_1), R)
refine :
  ∀ (s : S)
    (hs :
      s ∈
        spectrum.{u_2, u_3} S (A := A)
          ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g : A)),
    (algebraMap R S : (a : R) → S) ((f : (a : S) → R) s : R) = s
⊢ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) (A := A)
    ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g : A) (⇑f : (a : S) → R)

Tactic:
refine .of_rightInvOn (((h a).mp ha).2.left_inv) fun s hs ↦ ?_
-- Module: Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
p q : A → Prop
inst : Semifield R
inst_1 : StarRing R
inst_2 : MetricSpace R
inst_3 : IsTopologicalSemiring R
inst_4 : ContinuousStar R
inst_5 : Semifield S
inst_6 : StarRing S
inst_7 : MetricSpace S
inst_8 : IsTopologicalSemiring S
inst_9 : ContinuousStar S
inst_10 : Ring A
inst_11 : StarRing A
inst_12 : Algebra S A
inst_13 : Algebra R S
inst_14 : Algebra R A
inst_15 : IsScalarTower R S A
inst_16 : StarModule R S
inst_17 : ContinuousSMul R S
inst_18 : TopologicalSpace A
inst_19 : ContinuousFunctionalCalculus S A q
f : C(S, R)
halg : IsClosedEmbedding.{u_1, u_2} (X := R) (Y := S) (⇑(algebraMap R S) : (a : R) → S)
h0 : p 0
h : ∀ (a : A), p a ↔ q a ∧ SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
a : A
ha : p a
g : C((↑(spectrum R a) : Type u_1), R)
s : S
hs :
  s ∈
    spectrum.{u_2, u_3} S (A := A)
      ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g : A)
⊢ Membership.mem (γ := Set S)
    (range (ι := (↑(spectrum S a) : Type u_2))
      (⇑(ContinuousMap.comp { toFun := (⇑(StarAlgHom.ofId R S) : (a : R) → S), continuous_toFun := ⋯ }
            (g.comp
              {
                toFun :=
                  Subtype.map (p := fun (x : S) ↦ x ∈ spectrum S a) (q := fun (x : R) ↦ x ∈ spectrum R a)
                    (⇑f : (a : S) → R) ⋯,
                continuous_toFun := ⋯ :
                ContinuousMap.{u_2, u_1} (↑(spectrum S a) : Type u_2) (↑(spectrum R a) : Type u_1) })) :
        (a : (↑(spectrum S a) : Type u_2)) → S))
    s

Tactic:
rw [SpectrumRestricts.starAlgHom_apply, cfcHom_map_spectrum] at hs

Premises used: SpectrumRestricts.starAlgHom_apply, cfcHom_map_spectrum