Theorem: Subalgebra.SeparatesPoints.isROrC_to_real
File: Mathlib/Topology/ContinuousFunction/StoneWeierstrass.lean

tactic: intro x₁ x₂ hx
state_before: 𝕜 : Type u_1
X : Type u_2
inst✝¹ : IsROrC 𝕜
inst✝ : TopologicalSpace X
A : Subalgebra 𝕜 C(X, 𝕜)
hA : SeparatesPoints A
hA' : ConjInvariantSubalgebra (restrictScalars ℝ A)
⊢ SeparatesPoints (comap (AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (restrictScalars ℝ A))

tactic: obtain ⟨_, ⟨f, hfA, rfl⟩, hf⟩ := hA hx
state_before: 𝕜 : Type u_1
X : Type u_2
inst✝¹ : IsROrC 𝕜
inst✝ : TopologicalSpace X
A : Subalgebra 𝕜 C(X, 𝕜)
hA : SeparatesPoints A
hA' : ConjInvariantSubalgebra (restrictScalars ℝ A)
x₁ x₂ : X
hx : x₁ ≠ x₂
⊢ ∃ f,
    f ∈ (fun f => ↑f) '' ↑(comap (AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (restrictScalars ℝ A)) ∧
      f x₁ ≠ f x₂

tactic: let F : C(X, 𝕜) := f - const _ (f x₂)
state_before: case intro.intro.intro.intro
𝕜 : Type u_1
X : Type u_2
inst✝¹ : IsROrC 𝕜
inst✝ : TopologicalSpace X
A : Subalgebra 𝕜 C(X, 𝕜)
hA : SeparatesPoints A
hA' : ConjInvariantSubalgebra (restrictScalars ℝ A)
x₁ x₂ : X
hx : x₁ ≠ x₂
f : C(X, 𝕜)
hfA : f ∈ ↑A
hf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂
⊢ ∃ f,
    f ∈ (fun f => ↑f) '' ↑(comap (AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (restrictScalars ℝ A)) ∧
      f x₁ ≠ f x₂

tactic: refine' ⟨_, ⟨(⟨IsROrC.normSq, continuous_normSq⟩ : C(𝕜, ℝ)).comp F, _, rfl⟩, _⟩
state_before: case intro.intro.intro.intro
𝕜 : Type u_1
X : Type u_2
inst✝¹ : IsROrC 𝕜
inst✝ : TopologicalSpace X
A : Subalgebra 𝕜 C(X, 𝕜)
hA : SeparatesPoints A
hA' : ConjInvariantSubalgebra (restrictScalars ℝ A)
x₁ x₂ : X
hx : x₁ ≠ x₂
f : C(X, 𝕜)
hfA : f ∈ ↑A
hf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂
F : C(X, 𝕜) := f - const X (↑f x₂)
hFA : F ∈ A
⊢ ∃ f,
    f ∈ (fun f => ↑f) '' ↑(comap (AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (restrictScalars ℝ A)) ∧
      f x₁ ≠ f x₂

tactic: ext1
state_before: 𝕜 : Type u_1
X : Type u_2
inst✝¹ : IsROrC 𝕜
inst✝ : TopologicalSpace X
A : Subalgebra 𝕜 C(X, 𝕜)
hA : SeparatesPoints A
hA' : ConjInvariantSubalgebra (restrictScalars ℝ A)
x₁ x₂ : X
hx : x₁ ≠ x₂
f : C(X, 𝕜)
hfA : f ∈ ↑A
hf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂
F : C(X, 𝕜) := f - const X (↑f x₂)
⊢ ↑f x₂ • 1 = const X (↑f x₂)

tactic: simp only [coe_smul, coe_one, smul_apply, one_apply, Algebra.id.smul_eq_mul, mul_one,
  const_apply]
state_before: case h
𝕜 : Type u_1
X : Type u_2
inst✝¹ : IsROrC 𝕜
inst✝ : TopologicalSpace X
A : Subalgebra 𝕜 C(X, 𝕜)
hA : SeparatesPoints A
hA' : ConjInvariantSubalgebra (restrictScalars ℝ A)
x₁ x₂ : X
hx : x₁ ≠ x₂
f : C(X, 𝕜)
hfA : f ∈ ↑A
hf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂
F : C(X, 𝕜) := f - const X (↑f x₂)
a✝ : X
⊢ ↑(↑f x₂ • 1) a✝ = ↑(const X (↑f x₂)) a✝

tactic: rw [SetLike.mem_coe, Subalgebra.mem_comap]
state_before: case intro.intro.intro.intro.refine'_1
𝕜 : Type u_1
X : Type u_2
inst✝¹ : IsROrC 𝕜
inst✝ : TopologicalSpace X
A : Subalgebra 𝕜 C(X, 𝕜)
hA : SeparatesPoints A
hA' : ConjInvariantSubalgebra (restrictScalars ℝ A)
x₁ x₂ : X
hx : x₁ ≠ x₂
f : C(X, 𝕜)
hfA : f ∈ ↑A
hf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂
F : C(X, 𝕜) := f - const X (↑f x₂)
hFA : F ∈ A
⊢ comp (ContinuousMap.mk ↑normSq) F ∈
    ↑(comap (AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (restrictScalars ℝ A))

tactic: convert (A.restrictScalars ℝ).mul_mem (mem_conjInvariantSubalgebra hA' hFA) hFA
state_before: case intro.intro.intro.intro.refine'_1
𝕜 : Type u_1
X : Type u_2
inst✝¹ : IsROrC 𝕜
inst✝ : TopologicalSpace X
A : Subalgebra 𝕜 C(X, 𝕜)
hA : SeparatesPoints A
hA' : ConjInvariantSubalgebra (restrictScalars ℝ A)
x₁ x₂ : X
hx : x₁ ≠ x₂
f : C(X, 𝕜)
hfA : f ∈ ↑A
hf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂
F : C(X, 𝕜) := f - const X (↑f x₂)
hFA : F ∈ A
⊢ ↑(AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (comp (ContinuousMap.mk ↑normSq) F) ∈
    restrictScalars ℝ A

tactic: ext1
state_before: case h.e'_4
𝕜 : Type u_1
X : Type u_2
inst✝¹ : IsROrC 𝕜
inst✝ : TopologicalSpace X
A : Subalgebra 𝕜 C(X, 𝕜)
hA : SeparatesPoints A
hA' : ConjInvariantSubalgebra (restrictScalars ℝ A)
x₁ x₂ : X
hx : x₁ ≠ x₂
f : C(X, 𝕜)
hfA : f ∈ ↑A
hf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂
F : C(X, 𝕜) := f - const X (↑f x₂)
hFA : F ∈ A
⊢ ↑(AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (comp (ContinuousMap.mk ↑normSq) F) =
    ↑(AlgHom.compLeftContinuous ℝ ↑conjAe (_ : Continuous ↑conjCle)) F * F

tactic: rw [mul_comm]
state_before: case h.e'_4.h
𝕜 : Type u_1
X : Type u_2
inst✝¹ : IsROrC 𝕜
inst✝ : TopologicalSpace X
A : Subalgebra 𝕜 C(X, 𝕜)
hA : SeparatesPoints A
hA' : ConjInvariantSubalgebra (restrictScalars ℝ A)
x₁ x₂ : X
hx : x₁ ≠ x₂
f : C(X, 𝕜)
hfA : f ∈ ↑A
hf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂
F : C(X, 𝕜) := f - const X (↑f x₂)
hFA : F ∈ A
a✝ : X
⊢ ↑(↑(AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (comp (ContinuousMap.mk ↑normSq) F)) a✝ =
    ↑(↑(AlgHom.compLeftContinuous ℝ ↑conjAe (_ : Continuous ↑conjCle)) F * F) a✝

tactic: exact (IsROrC.mul_conj _).symm
state_before: case h.e'_4.h
𝕜 : Type u_1
X : Type u_2
inst✝¹ : IsROrC 𝕜
inst✝ : TopologicalSpace X
A : Subalgebra 𝕜 C(X, 𝕜)
hA : SeparatesPoints A
hA' : ConjInvariantSubalgebra (restrictScalars ℝ A)
x₁ x₂ : X
hx : x₁ ≠ x₂
f : C(X, 𝕜)
hfA : f ∈ ↑A
hf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂
F : C(X, 𝕜) := f - const X (↑f x₂)
hFA : F ∈ A
a✝ : X
⊢ ↑(↑(AlgHom.compLeftContinuous ℝ ofRealAm (_ : Continuous ofReal)) (comp (ContinuousMap.mk ↑normSq) F)) a✝ =
    ↑(F * ↑(AlgHom.compLeftContinuous ℝ ↑conjAe (_ : Continuous ↑conjCle)) F) a✝

tactic: have : f x₁ - f x₂ ≠ 0 := sub_ne_zero.mpr hf
state_before: case intro.intro.intro.intro.refine'_2
𝕜 : Type u_1
X : Type u_2
inst✝¹ : IsROrC 𝕜
inst✝ : TopologicalSpace X
A : Subalgebra 𝕜 C(X, 𝕜)
hA : SeparatesPoints A
hA' : ConjInvariantSubalgebra (restrictScalars ℝ A)
x₁ x₂ : X
hx : x₁ ≠ x₂
f : C(X, 𝕜)
hfA : f ∈ ↑A
hf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂
F : C(X, 𝕜) := f - const X (↑f x₂)
hFA : F ∈ A
⊢ (fun f => ↑f) (comp (ContinuousMap.mk ↑normSq) F) x₁ ≠ (fun f => ↑f) (comp (ContinuousMap.mk ↑normSq) F) x₂

tactic: simpa only [comp_apply, coe_sub, coe_const, sub_apply, coe_mk, sub_self, map_zero, Ne.def,
  normSq_eq_zero, const_apply] using this
state_before: case intro.intro.intro.intro.refine'_2
𝕜 : Type u_1
X : Type u_2
inst✝¹ : IsROrC 𝕜
inst✝ : TopologicalSpace X
A : Subalgebra 𝕜 C(X, 𝕜)
hA : SeparatesPoints A
hA' : ConjInvariantSubalgebra (restrictScalars ℝ A)
x₁ x₂ : X
hx : x₁ ≠ x₂
f : C(X, 𝕜)
hfA : f ∈ ↑A
hf : (fun f => ↑f) f x₁ ≠ (fun f => ↑f) f x₂
F : C(X, 𝕜) := f - const X (↑f x₂)
hFA : F ∈ A
this : ↑f x₁ - ↑f x₂ ≠ 0
⊢ (fun f => ↑f) (comp (ContinuousMap.mk ↑normSq) F) x₁ ≠ (fun f => ↑f) (comp (ContinuousMap.mk ↑normSq) F) x₂