l3lab/ntp-mathlib huggingface dataset:
instance : LipschitzAdd (α →ᵇ β) where
  lipschitz_add :=
    ⟨LipschitzAdd.C β, by
      have C_nonneg := (LipschitzAdd.C β).coe_nonneg
      rw [lipschitzWith_iff_dist_le_mul]
      rintro ⟨f₁, g₁⟩ ⟨f₂, g₂⟩
      

Proof state:
case mk.mk
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : AddMonoid β
inst✝ : LipschitzAdd β
f g : α →ᵇ β
x : α
C : ℝ
C_nonneg : 0 ≤ ↑(LipschitzAdd.C β)
f₁ g₁ f₂ g₂ : α →ᵇ β
⊢ dist ((f₁, g₁).1 + (f₁, g₁).2) ((f₂, g₂).1 + (f₂, g₂).2) ≤ ↑(LipschitzAdd.C β) * dist (f₁, g₁) (f₂, g₂)

Next tactic:
rw [dist_le (mul_nonneg C_nonneg dist_nonneg)]
instance : LipschitzAdd (α →ᵇ β) where
  lipschitz_add :=
    ⟨LipschitzAdd.C β, by
      have C_nonneg := (LipschitzAdd.C β).coe_nonneg
      rw [lipschitzWith_iff_dist_le_mul]
      rintro ⟨f₁, g₁⟩ ⟨f₂, g₂⟩
      rw [dist_le (mul_nonneg C_nonneg dist_nonneg)]
      

Proof state:
case mk.mk
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : AddMonoid β
inst✝ : LipschitzAdd β
f g : α →ᵇ β
x : α
C : ℝ
C_nonneg : 0 ≤ ↑(LipschitzAdd.C β)
f₁ g₁ f₂ g₂ : α →ᵇ β
⊢ ∀ (x : α),
    dist (((f₁, g₁).1 + (f₁, g₁).2) x) (((f₂, g₂).1 + (f₂, g₂).2) x) ≤ ↑(LipschitzAdd.C β) * dist (f₁, g₁) (f₂, g₂)

Next tactic:
intro x
instance : LipschitzAdd (α →ᵇ β) where
  lipschitz_add :=
    ⟨LipschitzAdd.C β, by
      have C_nonneg := (LipschitzAdd.C β).coe_nonneg
      rw [lipschitzWith_iff_dist_le_mul]
      rintro ⟨f₁, g₁⟩ ⟨f₂, g₂⟩
      rw [dist_le (mul_nonneg C_nonneg dist_nonneg)]
      intro x
      

Proof state:
case mk.mk
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : AddMonoid β
inst✝ : LipschitzAdd β
f g : α →ᵇ β
x✝ : α
C : ℝ
C_nonneg : 0 ≤ ↑(LipschitzAdd.C β)
f₁ g₁ f₂ g₂ : α →ᵇ β
x : α
⊢ dist (((f₁, g₁).1 + (f₁, g₁).2) x) (((f₂, g₂).1 + (f₂, g₂).2) x) ≤ ↑(LipschitzAdd.C β) * dist (f₁, g₁) (f₂, g₂)

Next tactic:
refine' le_trans (lipschitz_with_lipschitz_const_add ⟨f₁ x, g₁ x⟩ ⟨f₂ x, g₂ x⟩) _
instance : LipschitzAdd (α →ᵇ β) where
  lipschitz_add :=
    ⟨LipschitzAdd.C β, by
      have C_nonneg := (LipschitzAdd.C β).coe_nonneg
      rw [lipschitzWith_iff_dist_le_mul]
      rintro ⟨f₁, g₁⟩ ⟨f₂, g₂⟩
      rw [dist_le (mul_nonneg C_nonneg dist_nonneg)]
      intro x
      refine' le_trans (lipschitz_with_lipschitz_const_add ⟨f₁ x, g₁ x⟩ ⟨f₂ x, g₂ x⟩) _
      

Proof state:
case mk.mk
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : AddMonoid β
inst✝ : LipschitzAdd β
f g : α →ᵇ β
x✝ : α
C : ℝ
C_nonneg : 0 ≤ ↑(LipschitzAdd.C β)
f₁ g₁ f₂ g₂ : α →ᵇ β
x : α
⊢ ↑(LipschitzAdd.C β) * dist (f₁ x, g₁ x) (f₂ x, g₂ x) ≤ ↑(LipschitzAdd.C β) * dist (f₁, g₁) (f₂, g₂)

Next tactic:
refine' mul_le_mul_of_nonneg_left _ C_nonneg
instance : LipschitzAdd (α →ᵇ β) where
  lipschitz_add :=
    ⟨LipschitzAdd.C β, by
      have C_nonneg := (LipschitzAdd.C β).coe_nonneg
      rw [lipschitzWith_iff_dist_le_mul]
      rintro ⟨f₁, g₁⟩ ⟨f₂, g₂⟩
      rw [dist_le (mul_nonneg C_nonneg dist_nonneg)]
      intro x
      refine' le_trans (lipschitz_with_lipschitz_const_add ⟨f₁ x, g₁ x⟩ ⟨f₂ x, g₂ x⟩) _
      refine' mul_le_mul_of_nonneg_left _ C_nonneg
      

Proof state:
case mk.mk
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : AddMonoid β
inst✝ : LipschitzAdd β
f g : α →ᵇ β
x✝ : α
C : ℝ
C_nonneg : 0 ≤ ↑(LipschitzAdd.C β)
f₁ g₁ f₂ g₂ : α →ᵇ β
x : α
⊢ dist (f₁ x, g₁ x) (f₂ x, g₂ x) ≤ dist (f₁, g₁) (f₂, g₂)

Next tactic:
apply max_le_max
instance : LipschitzAdd (α →ᵇ β) where
  lipschitz_add :=
    ⟨LipschitzAdd.C β, by
      have C_nonneg := (LipschitzAdd.C β).coe_nonneg
      rw [lipschitzWith_iff_dist_le_mul]
      rintro ⟨f₁, g₁⟩ ⟨f₂, g₂⟩
      rw [dist_le (mul_nonneg C_nonneg dist_nonneg)]
      intro x
      refine' le_trans (lipschitz_with_lipschitz_const_add ⟨f₁ x, g₁ x⟩ ⟨f₂ x, g₂ x⟩) _
      refine' mul_le_mul_of_nonneg_left _ C_nonneg
      apply max_le_max <;> 

Proof state:
case mk.mk.a
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : AddMonoid β
inst✝ : LipschitzAdd β
f g : α →ᵇ β
x✝ : α
C : ℝ
C_nonneg : 0 ≤ ↑(LipschitzAdd.C β)
f₁ g₁ f₂ g₂ : α →ᵇ β
x : α
⊢ dist (f₁ x, g₁ x).1 (f₂ x, g₂ x).1 ≤ dist (f₁, g₁).1 (f₂, g₂).1

Next tactic:
exact dist_coe_le_dist x
instance : LipschitzAdd (α →ᵇ β) where
  lipschitz_add :=
    ⟨LipschitzAdd.C β, by
      have C_nonneg := (LipschitzAdd.C β).coe_nonneg
      rw [lipschitzWith_iff_dist_le_mul]
      rintro ⟨f₁, g₁⟩ ⟨f₂, g₂⟩
      rw [dist_le (mul_nonneg C_nonneg dist_nonneg)]
      intro x
      refine' le_trans (lipschitz_with_lipschitz_const_add ⟨f₁ x, g₁ x⟩ ⟨f₂ x, g₂ x⟩) _
      refine' mul_le_mul_of_nonneg_left _ C_nonneg
      apply max_le_max <;> 

Proof state:
case mk.mk.a
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : AddMonoid β
inst✝ : LipschitzAdd β
f g : α →ᵇ β
x✝ : α
C : ℝ
C_nonneg : 0 ≤ ↑(LipschitzAdd.C β)
f₁ g₁ f₂ g₂ : α →ᵇ β
x : α
⊢ dist (f₁ x, g₁ x).2 (f₂ x, g₂ x).2 ≤ dist (f₁, g₁).2 (f₂, g₂).2

Next tactic:
exact dist_coe_le_dist x
/-- The additive map forgetting that a bounded continuous function is bounded. -/
@[simps]
def toContinuousMapAddHom : (α →ᵇ β) →+ C(α, β) where
  toFun := toContinuousMap
  map_zero' := rfl
  map_add' := by
    

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : AddMonoid β
inst✝ : LipschitzAdd β
f g : α →ᵇ β
x : α
C : ℝ
⊢ ∀ (x y : α →ᵇ β),
    ZeroHom.toFun { toFun := toContinuousMap, map_zero' := (_ : 0.toContinuousMap = 0.toContinuousMap) } (x + y) =
      ZeroHom.toFun { toFun := toContinuousMap, map_zero' := (_ : 0.toContinuousMap = 0.toContinuousMap) } x +
        ZeroHom.toFun { toFun := toContinuousMap, map_zero' := (_ : 0.toContinuousMap = 0.toContinuousMap) } y

Next tactic:
intros
/-- The additive map forgetting that a bounded continuous function is bounded. -/
@[simps]
def toContinuousMapAddHom : (α →ᵇ β) →+ C(α, β) where
  toFun := toContinuousMap
  map_zero' := rfl
  map_add' := by
    intros
    

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : AddMonoid β
inst✝ : LipschitzAdd β
f g : α →ᵇ β
x : α
C : ℝ
x✝ y✝ : α →ᵇ β
⊢ ZeroHom.toFun { toFun := toContinuousMap, map_zero' := (_ : 0.toContinuousMap = 0.toContinuousMap) } (x✝ + y✝) =
    ZeroHom.toFun { toFun := toContinuousMap, map_zero' := (_ : 0.toContinuousMap = 0.toContinuousMap) } x✝ +
      ZeroHom.toFun { toFun := toContinuousMap, map_zero' := (_ : 0.toContinuousMap = 0.toContinuousMap) } y✝

Next tactic:
ext
/-- The additive map forgetting that a bounded continuous function is bounded. -/
@[simps]
def toContinuousMapAddHom : (α →ᵇ β) →+ C(α, β) where
  toFun := toContinuousMap
  map_zero' := rfl
  map_add' := by
    intros
    ext
    

Proof state:
case h
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : AddMonoid β
inst✝ : LipschitzAdd β
f g : α →ᵇ β
x : α
C : ℝ
x✝ y✝ : α →ᵇ β
a✝ : α
⊢ (ZeroHom.toFun { toFun := toContinuousMap, map_zero' := (_ : 0.toContinuousMap = 0.toContinuousMap) } (x✝ + y✝)) a✝ =
    (ZeroHom.toFun { toFun := toContinuousMap, map_zero' := (_ : 0.toContinuousMap = 0.toContinuousMap) } x✝ +
        ZeroHom.toFun { toFun := toContinuousMap, map_zero' := (_ : 0.toContinuousMap = 0.toContinuousMap) } y✝)
      a✝

Next tactic:
simp
@[to_additive]
instance : AddCommMonoid (α →ᵇ β) :=
  { BoundedContinuousFunction.addMonoid with
    add_comm := fun f g => by 

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : AddCommMonoid β
inst✝ : LipschitzAdd β
src✝ : AddMonoid (α →ᵇ β) := addMonoid
f g : α →ᵇ β
⊢ f + g = g + f

Next tactic:
ext
@[to_additive]
instance : AddCommMonoid (α →ᵇ β) :=
  { BoundedContinuousFunction.addMonoid with
    add_comm := fun f g => by ext; 

Proof state:
case h
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : AddCommMonoid β
inst✝ : LipschitzAdd β
src✝ : AddMonoid (α →ᵇ β) := addMonoid
f g : α →ᵇ β
x✝ : α
⊢ (f + g) x✝ = (g + f) x✝

Next tactic:
simp [add_comm]
theorem sum_apply {ι : Type*} (s : Finset ι) (f : ι → α →ᵇ β) (a : α) :
    (∑ i in s, f i) a = ∑ i in s, f i a := by 

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : PseudoMetricSpace β
inst✝¹ : AddCommMonoid β
inst✝ : LipschitzAdd β
ι : Type u_2
s : Finset ι
f : ι → α →ᵇ β
a : α
⊢ (∑ i in s, f i) a = ∑ i in s, (f i) a

Next tactic:
simp
/-- The norm of a bounded continuous function is the supremum of `‖f x‖`.
We use `sInf` to ensure that the definition works if `α` has no elements. -/
theorem norm_eq (f : α →ᵇ β) : ‖f‖ = sInf { C : ℝ | 0 ≤ C ∧ ∀ x : α, ‖f x‖ ≤ C } := by
  

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f✝ g : α →ᵇ β
x : α
C : ℝ
f : α →ᵇ β
⊢ ‖f‖ = sInf {C | 0 ≤ C ∧ ∀ (x : α), ‖f x‖ ≤ C}

Next tactic:
simp [norm_def, BoundedContinuousFunction.dist_eq]
/-- When the domain is non-empty, we do not need the `0 ≤ C` condition in the formula for `‖f‖` as a
`sInf`. -/
theorem norm_eq_of_nonempty [h : Nonempty α] : ‖f‖ = sInf { C : ℝ | ∀ x : α, ‖f x‖ ≤ C } := by
  

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
h : Nonempty α
⊢ ‖f‖ = sInf {C | ∀ (x : α), ‖f x‖ ≤ C}

Next tactic:
obtain ⟨a⟩ := h
/-- When the domain is non-empty, we do not need the `0 ≤ C` condition in the formula for `‖f‖` as a
`sInf`. -/
theorem norm_eq_of_nonempty [h : Nonempty α] : ‖f‖ = sInf { C : ℝ | ∀ x : α, ‖f x‖ ≤ C } := by
  obtain ⟨a⟩ := h
  

Proof state:
case intro
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
a : α
⊢ ‖f‖ = sInf {C | ∀ (x : α), ‖f x‖ ≤ C}

Next tactic:
rw [norm_eq]
/-- When the domain is non-empty, we do not need the `0 ≤ C` condition in the formula for `‖f‖` as a
`sInf`. -/
theorem norm_eq_of_nonempty [h : Nonempty α] : ‖f‖ = sInf { C : ℝ | ∀ x : α, ‖f x‖ ≤ C } := by
  obtain ⟨a⟩ := h
  rw [norm_eq]
  

Proof state:
case intro
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
a : α
⊢ sInf {C | 0 ≤ C ∧ ∀ (x : α), ‖f x‖ ≤ C} = sInf {C | ∀ (x : α), ‖f x‖ ≤ C}

Next tactic:
congr
/-- When the domain is non-empty, we do not need the `0 ≤ C` condition in the formula for `‖f‖` as a
`sInf`. -/
theorem norm_eq_of_nonempty [h : Nonempty α] : ‖f‖ = sInf { C : ℝ | ∀ x : α, ‖f x‖ ≤ C } := by
  obtain ⟨a⟩ := h
  rw [norm_eq]
  congr
  

Proof state:
case intro.e_a
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
a : α
⊢ {C | 0 ≤ C ∧ ∀ (x : α), ‖f x‖ ≤ C} = {C | ∀ (x : α), ‖f x‖ ≤ C}

Next tactic:
ext
/-- When the domain is non-empty, we do not need the `0 ≤ C` condition in the formula for `‖f‖` as a
`sInf`. -/
theorem norm_eq_of_nonempty [h : Nonempty α] : ‖f‖ = sInf { C : ℝ | ∀ x : α, ‖f x‖ ≤ C } := by
  obtain ⟨a⟩ := h
  rw [norm_eq]
  congr
  ext
  

Proof state:
case intro.e_a.h
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
a : α
x✝ : ℝ
⊢ x✝ ∈ {C | 0 ≤ C ∧ ∀ (x : α), ‖f x‖ ≤ C} ↔ x✝ ∈ {C | ∀ (x : α), ‖f x‖ ≤ C}

Next tactic:
simp only [mem_setOf_eq, and_iff_right_iff_imp]
/-- When the domain is non-empty, we do not need the `0 ≤ C` condition in the formula for `‖f‖` as a
`sInf`. -/
theorem norm_eq_of_nonempty [h : Nonempty α] : ‖f‖ = sInf { C : ℝ | ∀ x : α, ‖f x‖ ≤ C } := by
  obtain ⟨a⟩ := h
  rw [norm_eq]
  congr
  ext
  simp only [mem_setOf_eq, and_iff_right_iff_imp]
  

Proof state:
case intro.e_a.h
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
a : α
x✝ : ℝ
⊢ (∀ (x : α), ‖f x‖ ≤ x✝) → 0 ≤ x✝

Next tactic:
exact fun h' => le_trans (norm_nonneg (f a)) (h' a)
theorem norm_coe_le_norm (x : α) : ‖f x‖ ≤ ‖f‖ :=
  calc
    ‖f x‖ = dist (f x) ((0 : α →ᵇ β) x) := by 

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x✝ : α
C : ℝ
x : α
⊢ ‖f x‖ = dist (f x) (0 x)

Next tactic:
simp [dist_zero_right]
/-- The norm of a function is controlled by the supremum of the pointwise norms. -/
theorem norm_le (C0 : (0 : ℝ) ≤ C) : ‖f‖ ≤ C ↔ ∀ x : α, ‖f x‖ ≤ C := by
  

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
C0 : 0 ≤ C
⊢ ‖f‖ ≤ C ↔ ∀ (x : α), ‖f x‖ ≤ C

Next tactic:
simpa using @dist_le _ _ _ _ f 0 _ C0
theorem norm_le_of_nonempty [Nonempty α] {f : α →ᵇ β} {M : ℝ} : ‖f‖ ≤ M ↔ ∀ x, ‖f x‖ ≤ M := by
  

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : SeminormedAddCommGroup β
f✝ g : α →ᵇ β
x : α
C : ℝ
inst✝ : Nonempty α
f : α →ᵇ β
M : ℝ
⊢ ‖f‖ ≤ M ↔ ∀ (x : α), ‖f x‖ ≤ M

Next tactic:
simp_rw [norm_def, ← dist_zero_right]
theorem norm_le_of_nonempty [Nonempty α] {f : α →ᵇ β} {M : ℝ} : ‖f‖ ≤ M ↔ ∀ x, ‖f x‖ ≤ M := by
  simp_rw [norm_def, ← dist_zero_right]
  

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : SeminormedAddCommGroup β
f✝ g : α →ᵇ β
x : α
C : ℝ
inst✝ : Nonempty α
f : α →ᵇ β
M : ℝ
⊢ dist f 0 ≤ M ↔ ∀ (x : α), dist (f x) 0 ≤ M

Next tactic:
exact dist_le_iff_of_nonempty
theorem norm_lt_iff_of_compact [CompactSpace α] {f : α →ᵇ β} {M : ℝ} (M0 : 0 < M) :
    ‖f‖ < M ↔ ∀ x, ‖f x‖ < M := by
  

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : SeminormedAddCommGroup β
f✝ g : α →ᵇ β
x : α
C : ℝ
inst✝ : CompactSpace α
f : α →ᵇ β
M : ℝ
M0 : 0 < M
⊢ ‖f‖ < M ↔ ∀ (x : α), ‖f x‖ < M

Next tactic:
simp_rw [norm_def, ← dist_zero_right]
theorem norm_lt_iff_of_compact [CompactSpace α] {f : α →ᵇ β} {M : ℝ} (M0 : 0 < M) :
    ‖f‖ < M ↔ ∀ x, ‖f x‖ < M := by
  simp_rw [norm_def, ← dist_zero_right]
  

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : SeminormedAddCommGroup β
f✝ g : α →ᵇ β
x : α
C : ℝ
inst✝ : CompactSpace α
f : α →ᵇ β
M : ℝ
M0 : 0 < M
⊢ dist f 0 < M ↔ ∀ (x : α), dist (f x) 0 < M

Next tactic:
exact dist_lt_iff_of_compact M0
theorem norm_lt_iff_of_nonempty_compact [Nonempty α] [CompactSpace α] {f : α →ᵇ β} {M : ℝ} :
    ‖f‖ < M ↔ ∀ x, ‖f x‖ < M := by
  

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : SeminormedAddCommGroup β
f✝ g : α →ᵇ β
x : α
C : ℝ
inst✝¹ : Nonempty α
inst✝ : CompactSpace α
f : α →ᵇ β
M : ℝ
⊢ ‖f‖ < M ↔ ∀ (x : α), ‖f x‖ < M

Next tactic:
simp_rw [norm_def, ← dist_zero_right]
theorem norm_lt_iff_of_nonempty_compact [Nonempty α] [CompactSpace α] {f : α →ᵇ β} {M : ℝ} :
    ‖f‖ < M ↔ ∀ x, ‖f x‖ < M := by
  simp_rw [norm_def, ← dist_zero_right]
  

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : SeminormedAddCommGroup β
f✝ g : α →ᵇ β
x : α
C : ℝ
inst✝¹ : Nonempty α
inst✝ : CompactSpace α
f : α →ᵇ β
M : ℝ
⊢ dist f 0 < M ↔ ∀ (x : α), dist (f x) 0 < M

Next tactic:
exact dist_lt_iff_of_nonempty_compact
@[simp]
theorem norm_normComp : ‖f.normComp‖ = ‖f‖ := by
  

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
⊢ ‖normComp f‖ = ‖f‖

Next tactic:
simp only [norm_eq, coe_normComp, norm_norm, Function.comp]
theorem norm_eq_iSup_norm : ‖f‖ = ⨆ x : α, ‖f x‖ := by
  

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
⊢ ‖f‖ = ⨆ x, ‖f x‖

Next tactic:
simp_rw [norm_def, dist_eq_iSup, coe_zero, Pi.zero_apply, dist_zero_right]
/-- If `‖(1 : β)‖ = 1`, then `‖(1 : α →ᵇ β)‖ = 1` if `α` is nonempty. -/
instance [Nonempty α] [One β] [NormOneClass β] : NormOneClass (α →ᵇ β) where
  norm_one := by 

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝⁴ : TopologicalSpace α
inst✝³ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
inst✝² : Nonempty α
inst✝¹ : One β
inst✝ : NormOneClass β
⊢ ‖1‖ = 1

Next tactic:
simp only [norm_eq_iSup_norm, coe_one, Pi.one_apply, norm_one, ciSup_const]
/-- The pointwise difference of two bounded continuous functions is again bounded continuous. -/
instance : Sub (α →ᵇ β) :=
  ⟨fun f g =>
    ofNormedAddCommGroup (f - g) (f.continuous.sub g.continuous) (‖f‖ + ‖g‖) fun x => by
      

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f✝ g✝ : α →ᵇ β
x✝ : α
C : ℝ
f g : α →ᵇ β
x : α
⊢ ‖(⇑f - ⇑g) x‖ ≤ ‖f‖ + ‖g‖

Next tactic:
simp only [sub_eq_add_neg]
/-- The pointwise difference of two bounded continuous functions is again bounded continuous. -/
instance : Sub (α →ᵇ β) :=
  ⟨fun f g =>
    ofNormedAddCommGroup (f - g) (f.continuous.sub g.continuous) (‖f‖ + ‖g‖) fun x => by
      simp only [sub_eq_add_neg]
      

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f✝ g✝ : α →ᵇ β
x✝ : α
C : ℝ
f g : α →ᵇ β
x : α
⊢ ‖(⇑f + -⇑g) x‖ ≤ ‖f‖ + ‖g‖

Next tactic:
exact le_trans (norm_add_le _ _)
        (add_le_add (f.norm_coe_le_norm x) <| norm_neg ((⇑g) x) ▸ g.norm_coe_le_norm x)
@[simp]
theorem coe_zsmulRec : ∀ z, ⇑(zsmulRec z f) = z • ⇑f
  | Int.ofNat n => by 

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
n : ℕ
⊢ ⇑(zsmulRec (Int.ofNat n) f) = Int.ofNat n • ⇑f

Next tactic:
rw [zsmulRec, Int.ofNat_eq_coe, coe_nsmulRec, coe_nat_zsmul]
@[simp]
theorem coe_zsmulRec : ∀ z, ⇑(zsmulRec z f) = z • ⇑f
  | Int.ofNat n => by rw [zsmulRec, Int.ofNat_eq_coe, coe_nsmulRec, coe_nat_zsmul]
  | Int.negSucc n => by 

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
n : ℕ
⊢ ⇑(zsmulRec (Int.negSucc n) f) = Int.negSucc n • ⇑f

Next tactic:
rw [zsmulRec, negSucc_zsmul, coe_neg, coe_nsmulRec]
instance hasIntScalar : SMul ℤ (α →ᵇ β) where
  smul n f :=
    { toContinuousMap := n • f.toContinuousMap
      map_bounded' := by 

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f✝ g : α →ᵇ β
x : α
C : ℝ
n : ℤ
f : α →ᵇ β
⊢ ∃ C,
    ∀ (x y : α),
      dist (ContinuousMap.toFun (n • f.toContinuousMap) x) (ContinuousMap.toFun (n • f.toContinuousMap) y) ≤ C

Next tactic:
simpa using (zsmulRec n f).map_bounded'
instance seminormedAddCommGroup : SeminormedAddCommGroup (α →ᵇ β) where
  dist_eq f g := by 

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f✝ g✝ : α →ᵇ β
x : α
C : ℝ
f g : α →ᵇ β
⊢ dist f g = ‖f - g‖

Next tactic:
simp only [norm_eq, dist_eq, dist_eq_norm, sub_apply]
theorem nnnorm_eq_iSup_nnnorm : ‖f‖₊ = ⨆ x : α, ‖f x‖₊ :=
  Subtype.ext <| (norm_eq_iSup_norm f).trans <| by 

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
⊢ ⨆ x, ‖f x‖ = ↑(⨆ x, ‖f x‖₊)

Next tactic:
simp_rw [val_eq_coe, NNReal.coe_iSup, coe_nnnorm]
theorem abs_diff_coe_le_dist : ‖f x - g x‖ ≤ dist f g := by
  

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
⊢ ‖f x - g x‖ ≤ dist f g

Next tactic:
rw [dist_eq_norm]
theorem abs_diff_coe_le_dist : ‖f x - g x‖ ≤ dist f g := by
  rw [dist_eq_norm]
  

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝¹ : TopologicalSpace α
inst✝ : SeminormedAddCommGroup β
f g : α →ᵇ β
x : α
C : ℝ
⊢ ‖f x - g x‖ ≤ ‖f - g‖

Next tactic:
exact (f - g).norm_coe_le_norm x
theorem norm_compContinuous_le [TopologicalSpace γ] (f : α →ᵇ β) (g : C(γ, α)) :
    ‖f.compContinuous g‖ ≤ ‖f‖ :=
  ((lipschitz_compContinuous g).dist_le_mul f 0).trans <| by
    

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
inst✝² : TopologicalSpace α
inst✝¹ : SeminormedAddCommGroup β
f✝ g✝ : α →ᵇ β
x : α
C : ℝ
inst✝ : TopologicalSpace γ
f : α →ᵇ β
g : C(γ, α)
⊢ ↑1 * dist f 0 ≤ ‖f‖

Next tactic:
rw [NNReal.coe_one, one_mul, dist_zero_right]
instance : SMul 𝕜 (α →ᵇ β) where
  smul c f :=
    { toContinuousMap := c • f.toContinuousMap
      map_bounded' :=
        let ⟨b, hb⟩ := f.bounded
        ⟨dist c 0 * b, fun x y => by
          

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
𝕜 : Type u_2
inst✝⁶ : PseudoMetricSpace 𝕜
inst✝⁵ : TopologicalSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero 𝕜
inst✝² : Zero β
inst✝¹ : SMul 𝕜 β
inst✝ : BoundedSMul 𝕜 β
c : 𝕜
f : α →ᵇ β
b : ℝ
hb : ∀ (x y : α), dist (f x) (f y) ≤ b
x y : α
⊢ dist (ContinuousMap.toFun (c • f.toContinuousMap) x) (ContinuousMap.toFun (c • f.toContinuousMap) y) ≤ dist c 0 * b

Next tactic:
refine' (dist_smul_pair c (f x) (f y)).trans _
instance : SMul 𝕜 (α →ᵇ β) where
  smul c f :=
    { toContinuousMap := c • f.toContinuousMap
      map_bounded' :=
        let ⟨b, hb⟩ := f.bounded
        ⟨dist c 0 * b, fun x y => by
          refine' (dist_smul_pair c (f x) (f y)).trans _
          

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
𝕜 : Type u_2
inst✝⁶ : PseudoMetricSpace 𝕜
inst✝⁵ : TopologicalSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero 𝕜
inst✝² : Zero β
inst✝¹ : SMul 𝕜 β
inst✝ : BoundedSMul 𝕜 β
c : 𝕜
f : α →ᵇ β
b : ℝ
hb : ∀ (x y : α), dist (f x) (f y) ≤ b
x y : α
⊢ dist c 0 * dist (f x) (f y) ≤ dist c 0 * b

Next tactic:
refine' mul_le_mul_of_nonneg_left _ dist_nonneg
instance : SMul 𝕜 (α →ᵇ β) where
  smul c f :=
    { toContinuousMap := c • f.toContinuousMap
      map_bounded' :=
        let ⟨b, hb⟩ := f.bounded
        ⟨dist c 0 * b, fun x y => by
          refine' (dist_smul_pair c (f x) (f y)).trans _
          refine' mul_le_mul_of_nonneg_left _ dist_nonneg
          

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
𝕜 : Type u_2
inst✝⁶ : PseudoMetricSpace 𝕜
inst✝⁵ : TopologicalSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero 𝕜
inst✝² : Zero β
inst✝¹ : SMul 𝕜 β
inst✝ : BoundedSMul 𝕜 β
c : 𝕜
f : α →ᵇ β
b : ℝ
hb : ∀ (x y : α), dist (f x) (f y) ≤ b
x y : α
⊢ dist (f x) (f y) ≤ b

Next tactic:
exact hb x y
instance : BoundedSMul 𝕜 (α →ᵇ β) where
  dist_smul_pair' c f₁ f₂ := by
    

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
𝕜 : Type u_2
inst✝⁶ : PseudoMetricSpace 𝕜
inst✝⁵ : TopologicalSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero 𝕜
inst✝² : Zero β
inst✝¹ : SMul 𝕜 β
inst✝ : BoundedSMul 𝕜 β
c : 𝕜
f₁ f₂ : α →ᵇ β
⊢ dist (c • f₁) (c • f₂) ≤ dist c 0 * dist f₁ f₂

Next tactic:
rw [dist_le (mul_nonneg dist_nonneg dist_nonneg)]
instance : BoundedSMul 𝕜 (α →ᵇ β) where
  dist_smul_pair' c f₁ f₂ := by
    rw [dist_le (mul_nonneg dist_nonneg dist_nonneg)]
    

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
𝕜 : Type u_2
inst✝⁶ : PseudoMetricSpace 𝕜
inst✝⁵ : TopologicalSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero 𝕜
inst✝² : Zero β
inst✝¹ : SMul 𝕜 β
inst✝ : BoundedSMul 𝕜 β
c : 𝕜
f₁ f₂ : α →ᵇ β
⊢ ∀ (x : α), dist ((c • f₁) x) ((c • f₂) x) ≤ dist c 0 * dist f₁ f₂

Next tactic:
intro x
instance : BoundedSMul 𝕜 (α →ᵇ β) where
  dist_smul_pair' c f₁ f₂ := by
    rw [dist_le (mul_nonneg dist_nonneg dist_nonneg)]
    intro x
    

Proof state:
F : Type u_1
α : Type u
β : Type v
γ : Type w
𝕜 : Type u_2
inst✝⁶ : PseudoMetricSpace 𝕜
inst✝⁵ : TopologicalSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero 𝕜
inst✝² : Zero β
inst✝¹ : SMul 𝕜 β
inst✝ : BoundedSMul 𝕜 β
c : 𝕜
f₁ f₂ : α →ᵇ β
x : α
⊢ dist ((c • f₁) x) ((c • f₂) x) ≤ dist c 0 * dist f₁ f₂

Next tactic:
refine' (dist_smul_pair c (f₁ x) (f₂ x)).trans _