Skip to content

Commit

Permalink
feat(topology/bounded_continuous_function): add coe_mul, mul_apply (
Browse files Browse the repository at this point in the history
#6867)

Partners of the extant `coe_smul`, `smul_apply` lemmas (see line 630).

These came up while working on the `replace_algebra_def` branch but
seem worth adding independently.
  • Loading branch information
ocfnash committed Mar 25, 2021
1 parent b670391 commit e6d01b8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/topology/bounded_continuous_function.lean
Expand Up @@ -511,9 +511,9 @@ instance : has_sub (α →ᵇ β) :=
exact le_trans (norm_add_le _ _) (add_le_add (f.norm_coe_le_norm x) $
trans_rel_right _ (norm_neg _) (g.norm_coe_le_norm x)) }⟩

@[simp] lemma coe_add : ⇑(f + g) = λ x, f x + g x := rfl
@[simp] lemma coe_add : ⇑(f + g) = f + g := rfl
lemma add_apply : (f + g) x = f x + g x := rfl
@[simp] lemma coe_neg : ⇑(-f) = λ x, - f x := rfl
@[simp] lemma coe_neg : ⇑(-f) = -f := rfl
lemma neg_apply : (-f) x = -f x := rfl

lemma forall_coe_zero_iff_zero : (∀x, f x = 0) ↔ f = 0 :=
Expand All @@ -531,7 +531,7 @@ instance : add_comm_group (α →ᵇ β) :=
..bounded_continuous_function.has_sub,
..bounded_continuous_function.has_zero }

@[simp] lemma coe_sub : ⇑(f - g) = λ x, f x - g x := rfl
@[simp] lemma coe_sub : ⇑(f - g) = f - g := rfl
lemma sub_apply : (f - g) x = f x - g x := rfl

/-- Coercion of a `normed_group_hom` is an `add_monoid_hom`. Similar to `add_monoid_hom.coe_fn` -/
Expand Down Expand Up @@ -672,6 +672,9 @@ instance : ring (α →ᵇ R) :=
right_distrib := λ f₁ f₂ f₃, ext $ λ x, right_distrib _ _ _,
.. bounded_continuous_function.add_comm_group }

@[simp] lemma coe_mul (f g : α →ᵇ R) : ⇑(f * g) = f * g := rfl
lemma mul_apply (f g : α →ᵇ R) (x : α) : (f * g) x = f x * g x := rfl

instance : normed_ring (α →ᵇ R) :=
{ norm_mul := λ f g, norm_of_normed_group_le _ (mul_nonneg (norm_nonneg _) (norm_nonneg _)) _,
.. bounded_continuous_function.normed_group }
Expand Down

0 comments on commit e6d01b8

Please sign in to comment.