Skip to content

Commit

Permalink
feat(topology/continuous/algebra) : giving C(α, M) a `has_continuou…
Browse files Browse the repository at this point in the history
…s_mul` and a `has_continuous_smul` structure (#11261)

Here, `α` is a locally compact space.



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
  • Loading branch information
laughinggas and eric-wieser committed Mar 28, 2022
1 parent 7711012 commit b7d6b3a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/topology/continuous_function/algebra.lean
Expand Up @@ -203,6 +203,19 @@ instance {α : Type*} {β : Type*} [topological_space α] [topological_space β]
[comm_monoid_with_zero β] [has_continuous_mul β] : comm_monoid_with_zero C(α, β) :=
coe_injective.comm_monoid_with_zero _ coe_zero coe_one coe_mul coe_pow

@[to_additive]
instance {α : Type*} {β : Type*} [topological_space α]
[locally_compact_space α] [topological_space β]
[has_mul β] [has_continuous_mul β] : has_continuous_mul C(α, β) :=
begin
refine continuous_of_continuous_uncurry _ _,
have h1 : continuous (λ x : (C(α, β) × C(α, β)) × α, x.fst.fst x.snd) :=
continuous_eval'.comp (continuous_fst.prod_map continuous_id),
have h2 : continuous (λ x : (C(α, β) × C(α, β)) × α, x.fst.snd x.snd) :=
continuous_eval'.comp (continuous_snd.prod_map continuous_id),
exact h1.mul h2,
end

/-- Coercion to a function as an `monoid_hom`. Similar to `monoid_hom.coe_fn`. -/
@[to_additive "Coercion to a function as an `add_monoid_hom`. Similar to `add_monoid_hom.coe_fn`.",
simps]
Expand Down Expand Up @@ -384,6 +397,21 @@ variables {α β : Type*} [topological_space α] [topological_space β]
instance [has_scalar R M] [has_continuous_const_smul R M] : has_scalar R C(α, M) :=
⟨λ r f, ⟨r • f, f.continuous.const_smul r⟩⟩

@[to_additive]
instance [locally_compact_space α] [has_scalar R M] [has_continuous_const_smul R M] :
has_continuous_const_smul R C(α, M) :=
⟨λ γ, continuous_of_continuous_uncurry _ (continuous_eval'.const_smul γ)⟩

@[to_additive]
instance [locally_compact_space α] [topological_space R] [has_scalar R M]
[has_continuous_smul R M] : has_continuous_smul R C(α, M) :=
begin
refine continuous_of_continuous_uncurry _ _,
have h : continuous (λ x : (R × C(α, M)) × α, x.fst.snd x.snd) :=
continuous_eval'.comp (continuous_snd.prod_map continuous_id),
exact (continuous_fst.comp continuous_fst).smul h,
end

@[simp, to_additive, norm_cast]
lemma coe_smul [has_scalar R M] [has_continuous_const_smul R M]
(c : R) (f : C(α, M)) : ⇑(c • f) = c • f := rfl
Expand Down

0 comments on commit b7d6b3a

Please sign in to comment.