l3lab/ntp-mathlib huggingface dataset:
@[to_additive]
instance [CommGroup β] [TopologicalGroup β] : TopologicalGroup C(α, β) where
  continuous_mul := by
    letI : UniformSpace β := TopologicalGroup.toUniformSpace β
    have : UniformGroup β := comm_topologicalGroup_is_uniform
    rw [continuous_iff_continuousAt]
    rintro ⟨f, g⟩
    rw [ContinuousAt, tendsto_iff_forall_compact_tendstoUniformlyOn, nhds_prod_eq]
    exact fun K hK =>
      uniformContinuous_mul.comp_tendstoUniformlyOn
        ((tendsto_iff_forall_compact_tendstoUniformlyOn.mp Filter.tendsto_id K hK).prod
          (tendsto_iff_forall_compact_tendstoUniformlyOn.mp Filter.tendsto_id K hK))
  continuous_inv := by
    letI : UniformSpace β := TopologicalGroup.toUniformSpace β
    have : UniformGroup β := comm_topologicalGroup_is_uniform
    rw [continuous_iff_continuousAt]
    intro f
    rw [ContinuousAt, tendsto_iff_forall_compact_tendstoUniformlyOn]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : CommGroup β
inst✝ : TopologicalGroup β
this✝ : UniformSpace β := TopologicalGroup.toUniformSpace β
this : UniformGroup β
f : C(α, β)
⊢ ∀ (K : Set α), IsCompact K → TendstoUniformlyOn (fun i a => i⁻¹ a) (⇑f⁻¹) (nhds f) K

Next tactic:
exact fun K hK =>
      uniformContinuous_inv.comp_tendstoUniformlyOn
        (tendsto_iff_forall_compact_tendstoUniformlyOn.mp Filter.tendsto_id K hK)
/-- If `α` is locally compact, and an infinite sum of functions in `C(α, β)`
converges to `g` (for the compact-open topology), then the pointwise sum converges to `g x` for
all `x ∈ α`. -/
theorem hasSum_apply {γ : Type*} [AddCommMonoid β] [ContinuousAdd β]
    {f : γ → C(α, β)} {g : C(α, β)} (hf : HasSum f g) (x : α) :
    HasSum (fun i : γ => f i x) (g x) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
γ : Type u_3
inst✝¹ : AddCommMonoid β
inst✝ : ContinuousAdd β
f : γ → C(α, β)
g : C(α, β)
hf : HasSum f g
x : α
⊢ HasSum (fun i => (f i) x) (g x)

Next tactic:
let ev : C(α, β) →+ β := (Pi.evalAddMonoidHom _ x).comp coeFnAddMonoidHom
/-- If `α` is locally compact, and an infinite sum of functions in `C(α, β)`
converges to `g` (for the compact-open topology), then the pointwise sum converges to `g x` for
all `x ∈ α`. -/
theorem hasSum_apply {γ : Type*} [AddCommMonoid β] [ContinuousAdd β]
    {f : γ → C(α, β)} {g : C(α, β)} (hf : HasSum f g) (x : α) :
    HasSum (fun i : γ => f i x) (g x) := by
  let ev : C(α, β) →+ β := (Pi.evalAddMonoidHom _ x).comp coeFnAddMonoidHom
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
γ : Type u_3
inst✝¹ : AddCommMonoid β
inst✝ : ContinuousAdd β
f : γ → C(α, β)
g : C(α, β)
hf : HasSum f g
x : α
ev : C(α, β) →+ β := AddMonoidHom.comp (Pi.evalAddMonoidHom (fun a => β) x) coeFnAddMonoidHom
⊢ HasSum (fun i => (f i) x) (g x)

Next tactic:
exact hf.map ev (ContinuousMap.continuous_eval_const x)
@[to_additive]
instance [LocallyCompactSpace α] [TopologicalSpace R] [SMul R M] [ContinuousSMul R M] :
    ContinuousSMul R C(α, M) :=
  ⟨by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁷ : TopologicalSpace α
inst✝⁶ : TopologicalSpace β
R : Type u_3
R₁ : Type u_4
M : Type u_5
inst✝⁵ : TopologicalSpace M
M₂ : Type u_6
inst✝⁴ : TopologicalSpace M₂
inst✝³ : LocallyCompactSpace α
inst✝² : TopologicalSpace R
inst✝¹ : SMul R M
inst✝ : ContinuousSMul R M
⊢ Continuous fun p => p.1 • p.2

Next tactic:
refine' continuous_of_continuous_uncurry _ _
@[to_additive]
instance [LocallyCompactSpace α] [TopologicalSpace R] [SMul R M] [ContinuousSMul R M] :
    ContinuousSMul R C(α, M) :=
  ⟨by
    refine' continuous_of_continuous_uncurry _ _
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁷ : TopologicalSpace α
inst✝⁶ : TopologicalSpace β
R : Type u_3
R₁ : Type u_4
M : Type u_5
inst✝⁵ : TopologicalSpace M
M₂ : Type u_6
inst✝⁴ : TopologicalSpace M₂
inst✝³ : LocallyCompactSpace α
inst✝² : TopologicalSpace R
inst✝¹ : SMul R M
inst✝ : ContinuousSMul R M
⊢ Continuous (Function.uncurry fun x y => (x.1 • x.2) y)

Next tactic:
have h : Continuous fun x : (R × C(α, M)) × α => x.fst.snd x.snd :=
      continuous_eval'.comp (continuous_snd.prod_map continuous_id)
@[to_additive]
instance [LocallyCompactSpace α] [TopologicalSpace R] [SMul R M] [ContinuousSMul R M] :
    ContinuousSMul R C(α, M) :=
  ⟨by
    refine' continuous_of_continuous_uncurry _ _
    have h : Continuous fun x : (R × C(α, M)) × α => x.fst.snd x.snd :=
      continuous_eval'.comp (continuous_snd.prod_map continuous_id)
    

Proof state:
α : Type u_1
β : Type u_2
inst✝⁷ : TopologicalSpace α
inst✝⁶ : TopologicalSpace β
R : Type u_3
R₁ : Type u_4
M : Type u_5
inst✝⁵ : TopologicalSpace M
M₂ : Type u_6
inst✝⁴ : TopologicalSpace M₂
inst✝³ : LocallyCompactSpace α
inst✝² : TopologicalSpace R
inst✝¹ : SMul R M
inst✝ : ContinuousSMul R M
h : Continuous fun x => x.1.2 x.2
⊢ Continuous (Function.uncurry fun x y => (x.1 • x.2) y)

Next tactic:
exact (continuous_fst.comp continuous_fst).smul h
/-- Continuous constant functions as a `RingHom`. -/
def ContinuousMap.C : R →+* C(α, A) where
  toFun := fun c : R => ⟨fun _ : α => (algebraMap R A) c, continuous_const⟩
  map_one' := by 

Proof state:
α : Type u_1
inst✝⁹ : TopologicalSpace α
R : Type u_2
inst✝⁸ : CommSemiring R
A : Type u_3
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
A₂ : Type u_4
inst✝³ : TopologicalSpace A₂
inst✝² : Semiring A₂
inst✝¹ : Algebra R A₂
inst✝ : TopologicalSemiring A₂
⊢ (fun c => mk fun x => (algebraMap R A) c) 1 = 1

Next tactic:
ext _
/-- Continuous constant functions as a `RingHom`. -/
def ContinuousMap.C : R →+* C(α, A) where
  toFun := fun c : R => ⟨fun _ : α => (algebraMap R A) c, continuous_const⟩
  map_one' := by ext _; 

Proof state:
case h
α : Type u_1
inst✝⁹ : TopologicalSpace α
R : Type u_2
inst✝⁸ : CommSemiring R
A : Type u_3
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
A₂ : Type u_4
inst✝³ : TopologicalSpace A₂
inst✝² : Semiring A₂
inst✝¹ : Algebra R A₂
inst✝ : TopologicalSemiring A₂
a✝ : α
⊢ ((fun c => mk fun x => (algebraMap R A) c) 1) a✝ = 1 a✝

Next tactic:
exact (algebraMap R A).map_one
/-- Continuous constant functions as a `RingHom`. -/
def ContinuousMap.C : R →+* C(α, A) where
  toFun := fun c : R => ⟨fun _ : α => (algebraMap R A) c, continuous_const⟩
  map_one' := by ext _; exact (algebraMap R A).map_one
  map_mul' c₁ c₂ := by 

Proof state:
α : Type u_1
inst✝⁹ : TopologicalSpace α
R : Type u_2
inst✝⁸ : CommSemiring R
A : Type u_3
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
A₂ : Type u_4
inst✝³ : TopologicalSpace A₂
inst✝² : Semiring A₂
inst✝¹ : Algebra R A₂
inst✝ : TopologicalSemiring A₂
c₁ c₂ : R
⊢ OneHom.toFun
      { toFun := fun c => mk fun x => (algebraMap R A) c,
        map_one' := (_ : (fun c => mk fun x => (algebraMap R A) c) 1 = 1) }
      (c₁ * c₂) =
    OneHom.toFun
        { toFun := fun c => mk fun x => (algebraMap R A) c,
          map_one' := (_ : (fun c => mk fun x => (algebraMap R A) c) 1 = 1) }
        c₁ *
      OneHom.toFun
        { toFun := fun c => mk fun x => (algebraMap R A) c,
          map_one' := (_ : (fun c => mk fun x => (algebraMap R A) c) 1 = 1) }
        c₂

Next tactic:
ext _
/-- Continuous constant functions as a `RingHom`. -/
def ContinuousMap.C : R →+* C(α, A) where
  toFun := fun c : R => ⟨fun _ : α => (algebraMap R A) c, continuous_const⟩
  map_one' := by ext _; exact (algebraMap R A).map_one
  map_mul' c₁ c₂ := by ext _; 

Proof state:
case h
α : Type u_1
inst✝⁹ : TopologicalSpace α
R : Type u_2
inst✝⁸ : CommSemiring R
A : Type u_3
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
A₂ : Type u_4
inst✝³ : TopologicalSpace A₂
inst✝² : Semiring A₂
inst✝¹ : Algebra R A₂
inst✝ : TopologicalSemiring A₂
c₁ c₂ : R
a✝ : α
⊢ (OneHom.toFun
        { toFun := fun c => mk fun x => (algebraMap R A) c,
          map_one' := (_ : (fun c => mk fun x => (algebraMap R A) c) 1 = 1) }
        (c₁ * c₂))
      a✝ =
    (OneHom.toFun
          { toFun := fun c => mk fun x => (algebraMap R A) c,
            map_one' := (_ : (fun c => mk fun x => (algebraMap R A) c) 1 = 1) }
          c₁ *
        OneHom.toFun
          { toFun := fun c => mk fun x => (algebraMap R A) c,
            map_one' := (_ : (fun c => mk fun x => (algebraMap R A) c) 1 = 1) }
          c₂)
      a✝

Next tactic:
exact (algebraMap R A).map_mul _ _
/-- Continuous constant functions as a `RingHom`. -/
def ContinuousMap.C : R →+* C(α, A) where
  toFun := fun c : R => ⟨fun _ : α => (algebraMap R A) c, continuous_const⟩
  map_one' := by ext _; exact (algebraMap R A).map_one
  map_mul' c₁ c₂ := by ext _; exact (algebraMap R A).map_mul _ _
  map_zero' := by 

Proof state:
α : Type u_1
inst✝⁹ : TopologicalSpace α
R : Type u_2
inst✝⁸ : CommSemiring R
A : Type u_3
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
A₂ : Type u_4
inst✝³ : TopologicalSpace A₂
inst✝² : Semiring A₂
inst✝¹ : Algebra R A₂
inst✝ : TopologicalSemiring A₂
⊢ OneHom.toFun
      (↑{
          toOneHom :=
            { toFun := fun c => mk fun x => (algebraMap R A) c,
              map_one' := (_ : (fun c => mk fun x => (algebraMap R A) c) 1 = 1) },
          map_mul' :=
            (_ :
              ∀ (c₁ c₂ : R),
                OneHom.toFun
                    { toFun := fun c => mk fun x => (algebraMap R A) c,
                      map_one' := (_ : (fun c => mk fun x => (algebraMap R A) c) 1 = 1) }
                    (c₁ * c₂) =
                  OneHom.toFun
                      { toFun := fun c => mk fun x => (algebraMap R A) c,
                        map_one' := (_ : (fun c => mk fun x => (algebraMap R A) c) 1 = 1) }
                      c₁ *
                    OneHom.toFun
                      { toFun := fun c => mk fun x => (algebraMap R A) c,
                        map_one' := (_ : (fun c => mk fun x => (algebraMap R A) c) 1 = 1) }
                      c₂) })
      0 =
    0

Next tactic:
ext _
/-- Continuous constant functions as a `RingHom`. -/
def ContinuousMap.C : R →+* C(α, A) where
  toFun := fun c : R => ⟨fun _ : α => (algebraMap R A) c, continuous_const⟩
  map_one' := by ext _; exact (algebraMap R A).map_one
  map_mul' c₁ c₂ := by ext _; exact (algebraMap R A).map_mul _ _
  map_zero' := by ext _; 

Proof state:
case h
α : Type u_1
inst✝⁹ : TopologicalSpace α
R : Type u_2
inst✝⁸ : CommSemiring R
A : Type u_3
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
A₂ : Type u_4
inst✝³ : TopologicalSpace A₂
inst✝² : Semiring A₂
inst✝¹ : Algebra R A₂
inst✝ : TopologicalSemiring A₂
a✝ : α
⊢ (OneHom.toFun
        (↑{
            toOneHom :=
              { toFun := fun c => mk fun x => (algebraMap R A) c,
                map_one' := (_ : (fun c => mk fun x => (algebraMap R A) c) 1 = 1) },
            map_mul' :=
              (_ :
                ∀ (c₁ c₂ : R),
                  OneHom.toFun
                      { toFun := fun c => mk fun x => (algebraMap R A) c,
                        map_one' := (_ : (fun c => mk fun x => (algebraMap R A) c) 1 = 1) }
                      (c₁ * c₂) =
                    OneHom.toFun
                        { toFun := fun c => mk fun x => (algebraMap R A) c,
                          map_one' := (_ : (fun c => mk fun x => (algebraMap R A) c) 1 = 1) }
                        c₁ *
                      OneHom.toFun
                        { toFun := fun c => mk fun x => (algebraMap R A) c,
                          map_one' := (_ : (fun c => mk fun x => (algebraMap R A) c) 1 = 1) }
                        c₂) })
        0)
      a✝ =
    0 a✝

Next tactic:
exact (algebraMap R A).map_zero
instance ContinuousMap.algebra : Algebra R C(α, A) where
  toRingHom := ContinuousMap.C
  commutes' c f := by 

Proof state:
α : Type u_1
inst✝⁹ : TopologicalSpace α
R : Type u_2
inst✝⁸ : CommSemiring R
A : Type u_3
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
A₂ : Type u_4
inst✝³ : TopologicalSpace A₂
inst✝² : Semiring A₂
inst✝¹ : Algebra R A₂
inst✝ : TopologicalSemiring A₂
c : R
f : C(α, A)
⊢ C c * f = f * C c

Next tactic:
ext x
instance ContinuousMap.algebra : Algebra R C(α, A) where
  toRingHom := ContinuousMap.C
  commutes' c f := by ext x; 

Proof state:
case h
α : Type u_1
inst✝⁹ : TopologicalSpace α
R : Type u_2
inst✝⁸ : CommSemiring R
A : Type u_3
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
A₂ : Type u_4
inst✝³ : TopologicalSpace A₂
inst✝² : Semiring A₂
inst✝¹ : Algebra R A₂
inst✝ : TopologicalSemiring A₂
c : R
f : C(α, A)
x : α
⊢ (C c * f) x = (f * C c) x

Next tactic:
exact Algebra.commutes' _ _
instance ContinuousMap.algebra : Algebra R C(α, A) where
  toRingHom := ContinuousMap.C
  commutes' c f := by ext x; exact Algebra.commutes' _ _
  smul_def' c f := by 

Proof state:
α : Type u_1
inst✝⁹ : TopologicalSpace α
R : Type u_2
inst✝⁸ : CommSemiring R
A : Type u_3
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
A₂ : Type u_4
inst✝³ : TopologicalSpace A₂
inst✝² : Semiring A₂
inst✝¹ : Algebra R A₂
inst✝ : TopologicalSemiring A₂
c : R
f : C(α, A)
⊢ c • f = C c * f

Next tactic:
ext x
instance ContinuousMap.algebra : Algebra R C(α, A) where
  toRingHom := ContinuousMap.C
  commutes' c f := by ext x; exact Algebra.commutes' _ _
  smul_def' c f := by ext x; 

Proof state:
case h
α : Type u_1
inst✝⁹ : TopologicalSpace α
R : Type u_2
inst✝⁸ : CommSemiring R
A : Type u_3
inst✝⁷ : TopologicalSpace A
inst✝⁶ : Semiring A
inst✝⁵ : Algebra R A
inst✝⁴ : TopologicalSemiring A
A₂ : Type u_4
inst✝³ : TopologicalSpace A₂
inst✝² : Semiring A₂
inst✝¹ : Algebra R A₂
inst✝ : TopologicalSemiring A₂
c : R
f : C(α, A)
x : α
⊢ (c • f) x = (C c * f) x

Next tactic:
exact Algebra.smul_def' _ _
/-- Precomposition of functions into a normed ring by a continuous map is an algebra homomorphism.
-/
@[simps]
def ContinuousMap.compRightAlgHom {α β : Type*} [TopologicalSpace α] [TopologicalSpace β]
    (f : C(α, β)) : C(β, A) →ₐ[R] C(α, A) where
  toFun g := g.comp f
  map_zero' := by
    ext
    rfl
  map_add' g₁ g₂ := by
    ext
    rfl
  map_one' := by
    

Proof state:
α✝ : Type u_1
inst✝¹¹ : TopologicalSpace α✝
R : Type u_2
inst✝¹⁰ : CommSemiring R
A : Type u_3
inst✝⁹ : TopologicalSpace A
inst✝⁸ : Semiring A
inst✝⁷ : Algebra R A
inst✝⁶ : TopologicalSemiring A
A₂ : Type u_4
inst✝⁵ : TopologicalSpace A₂
inst✝⁴ : Semiring A₂
inst✝³ : Algebra R A₂
inst✝² : TopologicalSemiring A₂
α : Type u_5
β : Type u_6
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : C(α, β)
⊢ (fun g => comp g f) 1 = 1

Next tactic:
ext
/-- Precomposition of functions into a normed ring by a continuous map is an algebra homomorphism.
-/
@[simps]
def ContinuousMap.compRightAlgHom {α β : Type*} [TopologicalSpace α] [TopologicalSpace β]
    (f : C(α, β)) : C(β, A) →ₐ[R] C(α, A) where
  toFun g := g.comp f
  map_zero' := by
    ext
    rfl
  map_add' g₁ g₂ := by
    ext
    rfl
  map_one' := by
    ext
    

Proof state:
case h
α✝ : Type u_1
inst✝¹¹ : TopologicalSpace α✝
R : Type u_2
inst✝¹⁰ : CommSemiring R
A : Type u_3
inst✝⁹ : TopologicalSpace A
inst✝⁸ : Semiring A
inst✝⁷ : Algebra R A
inst✝⁶ : TopologicalSemiring A
A₂ : Type u_4
inst✝⁵ : TopologicalSpace A₂
inst✝⁴ : Semiring A₂
inst✝³ : Algebra R A₂
inst✝² : TopologicalSemiring A₂
α : Type u_5
β : Type u_6
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : C(α, β)
a✝ : α
⊢ ((fun g => comp g f) 1) a✝ = 1 a✝

Next tactic:
rfl
/-- Precomposition of functions into a normed ring by a continuous map is an algebra homomorphism.
-/
@[simps]
def ContinuousMap.compRightAlgHom {α β : Type*} [TopologicalSpace α] [TopologicalSpace β]
    (f : C(α, β)) : C(β, A) →ₐ[R] C(α, A) where
  toFun g := g.comp f
  map_zero' := by
    ext
    rfl
  map_add' g₁ g₂ := by
    ext
    rfl
  map_one' := by
    ext
    rfl
  map_mul' g₁ g₂ := by
    

Proof state:
α✝ : Type u_1
inst✝¹¹ : TopologicalSpace α✝
R : Type u_2
inst✝¹⁰ : CommSemiring R
A : Type u_3
inst✝⁹ : TopologicalSpace A
inst✝⁸ : Semiring A
inst✝⁷ : Algebra R A
inst✝⁶ : TopologicalSemiring A
A₂ : Type u_4
inst✝⁵ : TopologicalSpace A₂
inst✝⁴ : Semiring A₂
inst✝³ : Algebra R A₂
inst✝² : TopologicalSemiring A₂
α : Type u_5
β : Type u_6
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : C(α, β)
g₁ g₂ : C(β, A)
⊢ OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂) =
    OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *
      OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂

Next tactic:
ext
/-- Precomposition of functions into a normed ring by a continuous map is an algebra homomorphism.
-/
@[simps]
def ContinuousMap.compRightAlgHom {α β : Type*} [TopologicalSpace α] [TopologicalSpace β]
    (f : C(α, β)) : C(β, A) →ₐ[R] C(α, A) where
  toFun g := g.comp f
  map_zero' := by
    ext
    rfl
  map_add' g₁ g₂ := by
    ext
    rfl
  map_one' := by
    ext
    rfl
  map_mul' g₁ g₂ := by
    ext
    

Proof state:
case h
α✝ : Type u_1
inst✝¹¹ : TopologicalSpace α✝
R : Type u_2
inst✝¹⁰ : CommSemiring R
A : Type u_3
inst✝⁹ : TopologicalSpace A
inst✝⁸ : Semiring A
inst✝⁷ : Algebra R A
inst✝⁶ : TopologicalSemiring A
A₂ : Type u_4
inst✝⁵ : TopologicalSpace A₂
inst✝⁴ : Semiring A₂
inst✝³ : Algebra R A₂
inst✝² : TopologicalSemiring A₂
α : Type u_5
β : Type u_6
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : C(α, β)
g₁ g₂ : C(β, A)
a✝ : α
⊢ (OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂)) a✝ =
    (OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *
        OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂)
      a✝

Next tactic:
rfl
/-- Precomposition of functions into a normed ring by a continuous map is an algebra homomorphism.
-/
@[simps]
def ContinuousMap.compRightAlgHom {α β : Type*} [TopologicalSpace α] [TopologicalSpace β]
    (f : C(α, β)) : C(β, A) →ₐ[R] C(α, A) where
  toFun g := g.comp f
  map_zero' := by
    

Proof state:
α✝ : Type u_1
inst✝¹¹ : TopologicalSpace α✝
R : Type u_2
inst✝¹⁰ : CommSemiring R
A : Type u_3
inst✝⁹ : TopologicalSpace A
inst✝⁸ : Semiring A
inst✝⁷ : Algebra R A
inst✝⁶ : TopologicalSemiring A
A₂ : Type u_4
inst✝⁵ : TopologicalSpace A₂
inst✝⁴ : Semiring A₂
inst✝³ : Algebra R A₂
inst✝² : TopologicalSemiring A₂
α : Type u_5
β : Type u_6
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : C(α, β)
⊢ OneHom.toFun
      (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },
          map_mul' :=
            (_ :
              ∀ (g₁ g₂ : C(β, A)),
                OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂) =
                  OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *
                    OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂) })
      0 =
    0

Next tactic:
ext
/-- Precomposition of functions into a normed ring by a continuous map is an algebra homomorphism.
-/
@[simps]
def ContinuousMap.compRightAlgHom {α β : Type*} [TopologicalSpace α] [TopologicalSpace β]
    (f : C(α, β)) : C(β, A) →ₐ[R] C(α, A) where
  toFun g := g.comp f
  map_zero' := by
    ext
    

Proof state:
case h
α✝ : Type u_1
inst✝¹¹ : TopologicalSpace α✝
R : Type u_2
inst✝¹⁰ : CommSemiring R
A : Type u_3
inst✝⁹ : TopologicalSpace A
inst✝⁸ : Semiring A
inst✝⁷ : Algebra R A
inst✝⁶ : TopologicalSemiring A
A₂ : Type u_4
inst✝⁵ : TopologicalSpace A₂
inst✝⁴ : Semiring A₂
inst✝³ : Algebra R A₂
inst✝² : TopologicalSemiring A₂
α : Type u_5
β : Type u_6
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : C(α, β)
a✝ : α
⊢ (OneHom.toFun
        (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },
            map_mul' :=
              (_ :
                ∀ (g₁ g₂ : C(β, A)),
                  OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂) =
                    OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *
                      OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂) })
        0)
      a✝ =
    0 a✝

Next tactic:
rfl
/-- Precomposition of functions into a normed ring by a continuous map is an algebra homomorphism.
-/
@[simps]
def ContinuousMap.compRightAlgHom {α β : Type*} [TopologicalSpace α] [TopologicalSpace β]
    (f : C(α, β)) : C(β, A) →ₐ[R] C(α, A) where
  toFun g := g.comp f
  map_zero' := by
    ext
    rfl
  map_add' g₁ g₂ := by
    

Proof state:
α✝ : Type u_1
inst✝¹¹ : TopologicalSpace α✝
R : Type u_2
inst✝¹⁰ : CommSemiring R
A : Type u_3
inst✝⁹ : TopologicalSpace A
inst✝⁸ : Semiring A
inst✝⁷ : Algebra R A
inst✝⁶ : TopologicalSemiring A
A₂ : Type u_4
inst✝⁵ : TopologicalSpace A₂
inst✝⁴ : Semiring A₂
inst✝³ : Algebra R A₂
inst✝² : TopologicalSemiring A₂
α : Type u_5
β : Type u_6
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
f : C(α, β)
g₁ g₂ : C(β, A)
⊢ OneHom.toFun
      (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },
          map_mul' :=
            (_ :
              ∀ (g₁ g₂ : C(β, A)),
                OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂) =
                  OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *
                    OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂) })
      (g₁ + g₂) =
    OneHom.toFun
        (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },
            map_mul' :=
              (_ :
                ∀ (g₁ g₂ : C(β, A)),
                  OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂) =
                    OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *
                      OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂) })
        g₁ +
      OneHom.toFun
        (↑{ toOneHom := { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) },
            map_mul' :=
              (_ :
                ∀ (g₁ g₂ : C(β, A)),
                  OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } (g₁ * g₂) =
                    OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₁ *
                      OneHom.toFun { toFun := fun g => comp g f, map_one' := (_ : (fun g => comp g f) 1 = 1) } g₂) })
        g₂

Next tactic:
ext