/-- The algebra map from `R[X]` to continuous functions `C(X, R)`, for any subset `X` of `R`.
-/
@[simps]
def toContinuousMapOnAlgHom (X : Set R) : R[X] →ₐ[R] C(X, R) where
  toFun p := p.toContinuousMapOn X
  map_zero' := by
    ext
    simp
  map_add' _ _ := by
    ext
    

Proof state:
case h
R : Type u_1
inst✝² : CommSemiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
X : Set R
x✝¹ x✝ : R[X]
a✝ : ↑X
⊢ (OneHom.toFun
        (↑{
            toOneHom :=
              { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },
            map_mul' :=
              (_ :
                ∀ (x x_1 : R[X]),
                  OneHom.toFun
                      { toFun := fun p => toContinuousMapOn p X,
                        map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }
                      (x * x_1) =
                    OneHom.toFun
                        { toFun := fun p => toContinuousMapOn p X,
                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }
                        x *
                      OneHom.toFun
                        { toFun := fun p => toContinuousMapOn p X,
                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }
                        x_1) })
        (x✝¹ + x✝))
      a✝ =
    (OneHom.toFun
          (↑{
              toOneHom :=
                { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },
              map_mul' :=
                (_ :
                  ∀ (x x_1 : R[X]),
                    OneHom.toFun
                        { toFun := fun p => toContinuousMapOn p X,
                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }
                        (x * x_1) =
                      OneHom.toFun
                          { toFun := fun p => toContinuousMapOn p X,
                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }
                          x *
                        OneHom.toFun
                          { toFun := fun p => toContinuousMapOn p X,
                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }
                          x_1) })
          x✝¹ +
        OneHom.toFun
          (↑{
              toOneHom :=
                { toFun := fun p => toContinuousMapOn p X, map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) },
              map_mul' :=
                (_ :
                  ∀ (x x_1 : R[X]),
                    OneHom.toFun
                        { toFun := fun p => toContinuousMapOn p X,
                          map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }
                        (x * x_1) =
                      OneHom.toFun
                          { toFun := fun p => toContinuousMapOn p X,
                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }
                          x *
                        OneHom.toFun
                          { toFun := fun p => toContinuousMapOn p X,
                            map_one' := (_ : (fun p => toContinuousMapOn p X) 1 = 1) }
                          x_1) })
          x✝)
      a✝

Next tactic:
simp