awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict (goal)
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
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
a : A
φ : C((↑(spectrum S a) : Type u_2), S) →⋆ₐ[S] A
f : C(S, R)
h : SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) a (⇑f : (a : S) → R)
h_id :
  (φ : (a : C((↑(spectrum S a) : Type u_2), S)) → A) (ContinuousMap.restrict (spectrum S a) (ContinuousMap.id S)) = a
⊢ Eq (α := C((↑(spectrum S a) : Type u_2), S))
    (ContinuousMap.comp { toFun := (⇑(StarAlgHom.ofId R S) : (a : R) → S), continuous_toFun := ⋯ }
      (ContinuousMap.comp (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R))
        {
          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.restrict (spectrum S a) (ContinuousMap.id S))
have h₁ : ∀ (x : (↑(spectrum S a) : Type u_2)),
  Eq (α := S)
    ((ContinuousMap.comp { toFun := (⇑(StarAlgHom.ofId R S) : (a : R) → S), continuous_toFun := sorry }
            (ContinuousMap.comp (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R))
              {
                toFun :=
                  Subtype.map (p := fun (x : S) ↦ x ∈ spectrum S a) (q := fun (x : R) ↦ x ∈ spectrum R a)
                    (⇑f : (a : S) → R) sorry,
                continuous_toFun := sorry }) :
          (a : (↑(spectrum S a) : Type u_2)) → S)
        x :
      S)
    ((ContinuousMap.restrict (spectrum S a) (ContinuousMap.id S) : (a : (↑(spectrum S a) : Type u_2)) → S) x : S)
Tactic: ext x
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict (hypothesis)
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
⊢ CompactSpace.{u_1} (↑(spectrum R a) : Type u_1)
have this : CompactSpace.{u_2} (↑(spectrum S a) : Type u_2)
Tactic: have := ContinuousFunctionalCalculus.compactSpace_spectrum (R := S) a
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict (goal)
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
this : CompactSpace.{u_2} (↑(spectrum S a) : Type u_2)
⊢ CompactSpace.{u_1} (↑(spectrum R a) : Type u_1)
have rw : ∀ (this : IsCompact (spectrum S a)), IsCompact (spectrum R a)
Tactic: rw [← isCompact_iff_compactSpace] at this ⊢
Cleared hypotheses: this
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict (goal)
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
⊢ ∃ (φ : C((↑(spectrum R a) : Type u_1), R) →⋆ₐ[R] A),
    Continuous[_, inst_18] (⇑φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) ∧
      Function.Injective.{u_1 + 1, u_3 + 1} (α := C((↑(spectrum R a) : Type u_1), R)) (β := A)
          (⇑φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) ∧
        (φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
              (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R)) =
            a ∧
          (∀ (f : C((↑(spectrum R a) : Type u_1), R)),
              spectrum.{u_1, u_3} R (A := A) ((φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) f : A) =
                range (ι := (↑(spectrum R a) : Type u_1)) (⇑f : (a : (↑(spectrum R a) : Type u_1)) → R)) ∧
            ∀ (f : C((↑(spectrum R a) : Type u_1), R)), p ((φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) f)
have refine : Continuous[_, inst_18] (⇑(starAlgHom (cfcHom (p := q) sorry) sorry) : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
Tactic: refine ⟨((h a).mp ha).2.starAlgHom (cfcHom ((h a).mp ha).1 (R := S)),
      ?hom_continuous, ?hom_injective, ?hom_id, ?hom_map_spectrum, ?predicate_hom⟩
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict (goal)
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
refine : Continuous[_, inst_18] (⇑(starAlgHom (cfcHom (p := q) ⋯) ⋯) : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
⊢ ∃ (φ : C((↑(spectrum R a) : Type u_1), R) →⋆ₐ[R] A),
    Continuous[_, inst_18] (⇑φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) ∧
      Function.Injective.{u_1 + 1, u_3 + 1} (α := C((↑(spectrum R a) : Type u_1), R)) (β := A)
          (⇑φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) ∧
        (φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
              (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R)) =
            a ∧
          (∀ (f : C((↑(spectrum R a) : Type u_1), R)),
              spectrum.{u_1, u_3} R (A := A) ((φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) f : A) =
                range (ι := (↑(spectrum R a) : Type u_1)) (⇑f : (a : (↑(spectrum R a) : Type u_1)) → R)) ∧
            ∀ (f : C((↑(spectrum R a) : Type u_1), R)), p ((φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) f)
have refine₁ : Function.Injective.{u_1 + 1, u_3 + 1} (α := C((↑(spectrum R a) : Type u_1), R)) (β := A)
  (⇑(starAlgHom (cfcHom (p := q) sorry) sorry) : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
Tactic: refine ⟨((h a).mp ha).2.starAlgHom (cfcHom ((h a).mp ha).1 (R := S)),
      ?hom_continuous, ?hom_injective, ?hom_id, ?hom_map_spectrum, ?predicate_hom⟩
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict (goal)
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
refine : Continuous[_, inst_18] (⇑(starAlgHom (cfcHom (p := q) ⋯) ⋯) : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
refine₁ :
  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)
⊢ ∃ (φ : C((↑(spectrum R a) : Type u_1), R) →⋆ₐ[R] A),
    Continuous[_, inst_18] (⇑φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) ∧
      Function.Injective.{u_1 + 1, u_3 + 1} (α := C((↑(spectrum R a) : Type u_1), R)) (β := A)
          (⇑φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) ∧
        (φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
              (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R)) =
            a ∧
          (∀ (f : C((↑(spectrum R a) : Type u_1), R)),
              spectrum.{u_1, u_3} R (A := A) ((φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) f : A) =
                range (ι := (↑(spectrum R a) : Type u_1)) (⇑f : (a : (↑(spectrum R a) : Type u_1)) → R)) ∧
            ∀ (f : C((↑(spectrum R a) : Type u_1), R)), p ((φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) f)
have refine₂ : (starAlgHom (cfcHom (p := q) sorry) sorry : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
    (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R)) =
  a
Tactic: refine ⟨((h a).mp ha).2.starAlgHom (cfcHom ((h a).mp ha).1 (R := S)),
      ?hom_continuous, ?hom_injective, ?hom_id, ?hom_map_spectrum, ?predicate_hom⟩
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict (goal)
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
refine : Continuous[_, inst_18] (⇑(starAlgHom (cfcHom (p := q) ⋯) ⋯) : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
refine₁ :
  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)
refine₂ :
  (starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
      (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R)) =
    a
⊢ ∃ (φ : C((↑(spectrum R a) : Type u_1), R) →⋆ₐ[R] A),
    Continuous[_, inst_18] (⇑φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) ∧
      Function.Injective.{u_1 + 1, u_3 + 1} (α := C((↑(spectrum R a) : Type u_1), R)) (β := A)
          (⇑φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) ∧
        (φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
              (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R)) =
            a ∧
          (∀ (f : C((↑(spectrum R a) : Type u_1), R)),
              spectrum.{u_1, u_3} R (A := A) ((φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) f : A) =
                range (ι := (↑(spectrum R a) : Type u_1)) (⇑f : (a : (↑(spectrum R a) : Type u_1)) → R)) ∧
            ∀ (f : C((↑(spectrum R a) : Type u_1), R)), p ((φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) f)
have refine₃ : ∀ (f_1 : C((↑(spectrum R a) : Type u_1), R)),
  spectrum.{u_1, u_3} R (A := A)
      ((starAlgHom (cfcHom (p := q) sorry) sorry : (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: refine ⟨((h a).mp ha).2.starAlgHom (cfcHom ((h a).mp ha).1 (R := S)),
      ?hom_continuous, ?hom_injective, ?hom_id, ?hom_map_spectrum, ?predicate_hom⟩
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict (goal)
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
refine : Continuous[_, inst_18] (⇑(starAlgHom (cfcHom (p := q) ⋯) ⋯) : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
refine₁ :
  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)
refine₂ :
  (starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
      (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R)) =
    a
refine₃ :
  ∀ (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)
⊢ ∃ (φ : C((↑(spectrum R a) : Type u_1), R) →⋆ₐ[R] A),
    Continuous[_, inst_18] (⇑φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) ∧
      Function.Injective.{u_1 + 1, u_3 + 1} (α := C((↑(spectrum R a) : Type u_1), R)) (β := A)
          (⇑φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) ∧
        (φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A)
              (ContinuousMap.restrict (spectrum R a) (ContinuousMap.id R)) =
            a ∧
          (∀ (f : C((↑(spectrum R a) : Type u_1), R)),
              spectrum.{u_1, u_3} R (A := A) ((φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) f : A) =
                range (ι := (↑(spectrum R a) : Type u_1)) (⇑f : (a : (↑(spectrum R a) : Type u_1)) → R)) ∧
            ∀ (f : C((↑(spectrum R a) : Type u_1), R)), p ((φ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) f)
have refine₄ : ∀ (f_1 : C((↑(spectrum R a) : Type u_1), R)),
  p ((starAlgHom (cfcHom (p := q) sorry) sorry : (a : C((↑(spectrum R a) : Type u_1), R)) → A) f_1)
Tactic: refine ⟨((h a).mp ha).2.starAlgHom (cfcHom ((h a).mp ha).1 (R := S)),
      ?hom_continuous, ?hom_injective, ?hom_id, ?hom_map_spectrum, ?predicate_hom⟩
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict (goal)
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)
have 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) sorry
            y) =
        x) ↔
    ∃ (y : (↑(spectrum R a) : Type u_1)), (f_1 : (a : (↑(spectrum R a) : Type u_1)) → R) y = x
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]
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict (goal)
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)
⊢ p ((starAlgHom (cfcHom (p := q) ⋯) ⋯ : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g)
have rw : q ((starAlgHom (cfcHom (p := q) sorry) sorry : (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) sorry) sorry : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g : A) (⇑f : (a : S) → R)
Tactic: rw [h]
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict (goal)
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)
have refine : SpectrumRestricts.{u_1, u_2, u_3} (R := R) (S := S) (A := A)
  ((starAlgHom (cfcHom (p := q) sorry) sorry : (a : C((↑(spectrum R a) : Type u_1), R)) → A) g : A) (⇑f : (a : S) → R)
Tactic: refine ⟨cfcHom_predicate _ _, ?_⟩
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict (goal)
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)
have refine : ∀ (s : S)
  (hs :
    s ∈
      spectrum.{u_2, u_3} S (A := A)
        ((starAlgHom (cfcHom (p := q) sorry) sorry : (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
Tactic: refine .of_rightInvOn (((h a).mp ha).2.left_inv) fun s hs ↦ ?_
-- Lean 4 proof step from Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Restrict (hypothesis)
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)
⊢ (algebraMap R S : (a : R) → S) ((f : (a : S) → R) s : R) = s
have hs₁ : Membership.mem (γ := Set S)
  (range (ι := (↑(spectrum S a) : Type u_2))
    (⇑(ContinuousMap.comp { toFun := (⇑(StarAlgHom.ofId R S) : (a : R) → S), continuous_toFun := sorry }
          (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) sorry,
              continuous_toFun := sorry :
              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
Cleared hypotheses: hs