l3lab/ntp-mathlib huggingface dataset:
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    

Proof state:
case mk
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
⊢ ∃ δ > 0, ∀ (a_1 : α × β), dist a_1 (a, b) < δ → dist (a_1.1 • a_1.2) ((a, b).1 • (a, b).2) < ε

Next tactic:
obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
⊢ ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε

Next tactic:
have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by continuity
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
⊢ Continuous fun δ => δ * (δ + dist b 0) + dist a 0 * δ

Next tactic:
continuity
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by continuity
      

Proof state:
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
this : Continuous fun δ => δ * (δ + dist b 0) + dist a 0 * δ
⊢ ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε

Next tactic:
refine ((this.tendsto' _ _ ?_).eventually (gt_mem_nhds ε0)).exists_gt
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by continuity
      refine ((this.tendsto' _ _ ?_).eventually (gt_mem_nhds ε0)).exists_gt
      

Proof state:
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
this : Continuous fun δ => δ * (δ + dist b 0) + dist a 0 * δ
⊢ 0 * (0 + dist b 0) + dist a 0 * 0 = 0

Next tactic:
simp
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by continuity
      refine ((this.tendsto' _ _ ?_).eventually (gt_mem_nhds ε0)).exists_gt
      simp
    

Proof state:
case mk.intro.intro
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδε : δ * (δ + dist b 0) + dist a 0 * δ < ε
⊢ ∃ δ > 0, ∀ (a_1 : α × β), dist a_1 (a, b) < δ → dist (a_1.1 • a_1.2) ((a, b).1 • (a, b).2) < ε

Next tactic:
refine ⟨δ, δ0, fun (a', b') hab' => ?_⟩
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by continuity
      refine ((this.tendsto' _ _ ?_).eventually (gt_mem_nhds ε0)).exists_gt
      simp
    refine ⟨δ, δ0, fun (a', b') hab' => ?_⟩
    

Proof state:
case mk.intro.intro
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδε : δ * (δ + dist b 0) + dist a 0 * δ < ε
x✝ : α × β
a' : α
b' : β
hab' : dist (a', b') (a, b) < δ
⊢ dist ((a', b').1 • (a', b').2) ((a, b).1 • (a, b).2) < ε

Next tactic:
obtain ⟨ha, hb⟩ := max_lt_iff.1 hab'
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by continuity
      refine ((this.tendsto' _ _ ?_).eventually (gt_mem_nhds ε0)).exists_gt
      simp
    refine ⟨δ, δ0, fun (a', b') hab' => ?_⟩
    obtain ⟨ha, hb⟩ := max_lt_iff.1 hab'
    

Proof state:
case mk.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδε : δ * (δ + dist b 0) + dist a 0 * δ < ε
x✝ : α × β
a' : α
b' : β
hab' : dist (a', b') (a, b) < δ
ha : dist (a', b').1 (a, b).1 < δ
hb : dist (a', b').2 (a, b).2 < δ
⊢ dist ((a', b').1 • (a', b').2) ((a, b).1 • (a, b).2) < ε

Next tactic:
calc dist (a' • b') (a • b)
        ≤ dist (a' • b') (a • b') + dist (a • b') (a • b) := dist_triangle ..
      _ ≤ dist a' a * dist b' 0 + dist a 0 * dist b' b :=
        add_le_add (dist_pair_smul _ _ _) (dist_smul_pair _ _ _)
      _ ≤ δ * (δ + dist b 0) + dist a 0 * δ := by
          have : dist b' 0 ≤ δ + dist b 0 := (dist_triangle _ _ _).trans <| add_le_add_right hb.le _
          mono* <;> apply_rules [dist_nonneg, le_of_lt]
      _ < ε := hδε
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by continuity
      refine ((this.tendsto' _ _ ?_).eventually (gt_mem_nhds ε0)).exists_gt
      simp
    refine ⟨δ, δ0, fun (a', b') hab' => ?_⟩
    obtain ⟨ha, hb⟩ := max_lt_iff.1 hab'
    calc dist (a' • b') (a • b)
        ≤ dist (a' • b') (a • b') + dist (a • b') (a • b) := dist_triangle ..
      _ ≤ dist a' a * dist b' 0 + dist a 0 * dist b' b :=
        add_le_add (dist_pair_smul _ _ _) (dist_smul_pair _ _ _)
      _ ≤ δ * (δ + dist b 0) + dist a 0 * δ := by
          

Proof state:
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδε : δ * (δ + dist b 0) + dist a 0 * δ < ε
x✝ : α × β
a' : α
b' : β
hab' : dist (a', b') (a, b) < δ
ha : dist (a', b').1 (a, b).1 < δ
hb : dist (a', b').2 (a, b).2 < δ
⊢ dist a' a * dist b' 0 + dist a 0 * dist b' b ≤ δ * (δ + dist b 0) + dist a 0 * δ

Next tactic:
have : dist b' 0 ≤ δ + dist b 0 := (dist_triangle _ _ _).trans <| add_le_add_right hb.le _
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by continuity
      refine ((this.tendsto' _ _ ?_).eventually (gt_mem_nhds ε0)).exists_gt
      simp
    refine ⟨δ, δ0, fun (a', b') hab' => ?_⟩
    obtain ⟨ha, hb⟩ := max_lt_iff.1 hab'
    calc dist (a' • b') (a • b)
        ≤ dist (a' • b') (a • b') + dist (a • b') (a • b) := dist_triangle ..
      _ ≤ dist a' a * dist b' 0 + dist a 0 * dist b' b :=
        add_le_add (dist_pair_smul _ _ _) (dist_smul_pair _ _ _)
      _ ≤ δ * (δ + dist b 0) + dist a 0 * δ := by
          have : dist b' 0 ≤ δ + dist b 0 := (dist_triangle _ _ _).trans <| add_le_add_right hb.le _
          

Proof state:
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδε : δ * (δ + dist b 0) + dist a 0 * δ < ε
x✝ : α × β
a' : α
b' : β
hab' : dist (a', b') (a, b) < δ
ha : dist (a', b').1 (a, b).1 < δ
hb : dist (a', b').2 (a, b).2 < δ
this : dist b' 0 ≤ δ + dist b 0
⊢ dist a' a * dist b' 0 + dist a 0 * dist b' b ≤ δ * (δ + dist b 0) + dist a 0 * δ

Next tactic:
mono*
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by continuity
      refine ((this.tendsto' _ _ ?_).eventually (gt_mem_nhds ε0)).exists_gt
      simp
    refine ⟨δ, δ0, fun (a', b') hab' => ?_⟩
    obtain ⟨ha, hb⟩ := max_lt_iff.1 hab'
    calc dist (a' • b') (a • b)
        ≤ dist (a' • b') (a • b') + dist (a • b') (a • b) := dist_triangle ..
      _ ≤ dist a' a * dist b' 0 + dist a 0 * dist b' b :=
        add_le_add (dist_pair_smul _ _ _) (dist_smul_pair _ _ _)
      _ ≤ δ * (δ + dist b 0) + dist a 0 * δ := by
          have : dist b' 0 ≤ δ + dist b 0 := (dist_triangle _ _ _).trans <| add_le_add_right hb.le _
          mono* <;> 

Proof state:
case h₁.h₁
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδε : δ * (δ + dist b 0) + dist a 0 * δ < ε
x✝ : α × β
a' : α
b' : β
hab' : dist (a', b') (a, b) < δ
ha : dist (a', b').1 (a, b).1 < δ
hb : dist (a', b').2 (a, b).2 < δ
this : dist b' 0 ≤ δ + dist b 0
⊢ dist a' a ≤ δ

Next tactic:
apply_rules [dist_nonneg, le_of_lt]
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by continuity
      refine ((this.tendsto' _ _ ?_).eventually (gt_mem_nhds ε0)).exists_gt
      simp
    refine ⟨δ, δ0, fun (a', b') hab' => ?_⟩
    obtain ⟨ha, hb⟩ := max_lt_iff.1 hab'
    calc dist (a' • b') (a • b)
        ≤ dist (a' • b') (a • b') + dist (a • b') (a • b) := dist_triangle ..
      _ ≤ dist a' a * dist b' 0 + dist a 0 * dist b' b :=
        add_le_add (dist_pair_smul _ _ _) (dist_smul_pair _ _ _)
      _ ≤ δ * (δ + dist b 0) + dist a 0 * δ := by
          have : dist b' 0 ≤ δ + dist b 0 := (dist_triangle _ _ _).trans <| add_le_add_right hb.le _
          mono* <;> 

Proof state:
case h₁.c0
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδε : δ * (δ + dist b 0) + dist a 0 * δ < ε
x✝ : α × β
a' : α
b' : β
hab' : dist (a', b') (a, b) < δ
ha : dist (a', b').1 (a, b).1 < δ
hb : dist (a', b').2 (a, b).2 < δ
this : dist b' 0 ≤ δ + dist b 0
⊢ 0 ≤ dist b' 0

Next tactic:
apply_rules [dist_nonneg, le_of_lt]
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by continuity
      refine ((this.tendsto' _ _ ?_).eventually (gt_mem_nhds ε0)).exists_gt
      simp
    refine ⟨δ, δ0, fun (a', b') hab' => ?_⟩
    obtain ⟨ha, hb⟩ := max_lt_iff.1 hab'
    calc dist (a' • b') (a • b)
        ≤ dist (a' • b') (a • b') + dist (a • b') (a • b) := dist_triangle ..
      _ ≤ dist a' a * dist b' 0 + dist a 0 * dist b' b :=
        add_le_add (dist_pair_smul _ _ _) (dist_smul_pair _ _ _)
      _ ≤ δ * (δ + dist b 0) + dist a 0 * δ := by
          have : dist b' 0 ≤ δ + dist b 0 := (dist_triangle _ _ _).trans <| add_le_add_right hb.le _
          mono* <;> 

Proof state:
case h₁.b0
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδε : δ * (δ + dist b 0) + dist a 0 * δ < ε
x✝ : α × β
a' : α
b' : β
hab' : dist (a', b') (a, b) < δ
ha : dist (a', b').1 (a, b).1 < δ
hb : dist (a', b').2 (a, b).2 < δ
this : dist b' 0 ≤ δ + dist b 0
⊢ 0 ≤ δ

Next tactic:
apply_rules [dist_nonneg, le_of_lt]
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by continuity
      refine ((this.tendsto' _ _ ?_).eventually (gt_mem_nhds ε0)).exists_gt
      simp
    refine ⟨δ, δ0, fun (a', b') hab' => ?_⟩
    obtain ⟨ha, hb⟩ := max_lt_iff.1 hab'
    calc dist (a' • b') (a • b)
        ≤ dist (a' • b') (a • b') + dist (a • b') (a • b) := dist_triangle ..
      _ ≤ dist a' a * dist b' 0 + dist a 0 * dist b' b :=
        add_le_add (dist_pair_smul _ _ _) (dist_smul_pair _ _ _)
      _ ≤ δ * (δ + dist b 0) + dist a 0 * δ := by
          have : dist b' 0 ≤ δ + dist b 0 := (dist_triangle _ _ _).trans <| add_le_add_right hb.le _
          mono* <;> 

Proof state:
case h₂.h₂
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδε : δ * (δ + dist b 0) + dist a 0 * δ < ε
x✝ : α × β
a' : α
b' : β
hab' : dist (a', b') (a, b) < δ
ha : dist (a', b').1 (a, b).1 < δ
hb : dist (a', b').2 (a, b).2 < δ
this : dist b' 0 ≤ δ + dist b 0
⊢ dist b' b ≤ δ

Next tactic:
apply_rules [dist_nonneg, le_of_lt]
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by continuity
      refine ((this.tendsto' _ _ ?_).eventually (gt_mem_nhds ε0)).exists_gt
      simp
    refine ⟨δ, δ0, fun (a', b') hab' => ?_⟩
    obtain ⟨ha, hb⟩ := max_lt_iff.1 hab'
    calc dist (a' • b') (a • b)
        ≤ dist (a' • b') (a • b') + dist (a • b') (a • b) := dist_triangle ..
      _ ≤ dist a' a * dist b' 0 + dist a 0 * dist b' b :=
        add_le_add (dist_pair_smul _ _ _) (dist_smul_pair _ _ _)
      _ ≤ δ * (δ + dist b 0) + dist a 0 * δ := by
          have : dist b' 0 ≤ δ + dist b 0 := (dist_triangle _ _ _).trans <| add_le_add_right hb.le _
          mono* <;> 

Proof state:
case h₂.c0
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδε : δ * (δ + dist b 0) + dist a 0 * δ < ε
x✝ : α × β
a' : α
b' : β
hab' : dist (a', b') (a, b) < δ
ha : dist (a', b').1 (a, b).1 < δ
hb : dist (a', b').2 (a, b).2 < δ
this : dist b' 0 ≤ δ + dist b 0
⊢ 0 ≤ dist b' b

Next tactic:
apply_rules [dist_nonneg, le_of_lt]
/-- The typeclass `BoundedSMul` on a metric-space scalar action implies continuity of the action. -/
instance (priority := 100) BoundedSMul.continuousSMul : ContinuousSMul α β where
  continuous_smul := by
    rw [Metric.continuous_iff]
    rintro ⟨a, b⟩ ε ε0
    obtain ⟨δ, δ0, hδε⟩ : ∃ δ > 0, δ * (δ + dist b 0) + dist a 0 * δ < ε
    · have : Continuous fun δ ↦ δ * (δ + dist b 0) + dist a 0 * δ := by continuity
      refine ((this.tendsto' _ _ ?_).eventually (gt_mem_nhds ε0)).exists_gt
      simp
    refine ⟨δ, δ0, fun (a', b') hab' => ?_⟩
    obtain ⟨ha, hb⟩ := max_lt_iff.1 hab'
    calc dist (a' • b') (a • b)
        ≤ dist (a' • b') (a • b') + dist (a • b') (a • b) := dist_triangle ..
      _ ≤ dist a' a * dist b' 0 + dist a 0 * dist b' b :=
        add_le_add (dist_pair_smul _ _ _) (dist_smul_pair _ _ _)
      _ ≤ δ * (δ + dist b 0) + dist a 0 * δ := by
          have : dist b' 0 ≤ δ + dist b 0 := (dist_triangle _ _ _).trans <| add_le_add_right hb.le _
          mono* <;> 

Proof state:
case h₂.b0
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
a : α
b : β
ε : ℝ
ε0 : ε > 0
δ : ℝ
δ0 : δ > 0
hδε : δ * (δ + dist b 0) + dist a 0 * δ < ε
x✝ : α × β
a' : α
b' : β
hab' : dist (a', b') (a, b) < δ
ha : dist (a', b').1 (a, b).1 < δ
hb : dist (a', b').2 (a, b).2 < δ
this : dist b' 0 ≤ δ + dist b 0
⊢ 0 ≤ dist a 0

Next tactic:
apply_rules [dist_nonneg, le_of_lt]
instance Real.boundedSMul : BoundedSMul ℝ ℝ where
  dist_smul_pair' x y₁ y₂ := by 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
x y₁ y₂ : ℝ
⊢ dist (x • y₁) (x • y₂) ≤ dist x 0 * dist y₁ y₂

Next tactic:
simpa [Real.dist_eq, mul_sub] using (abs_mul x (y₁ - y₂)).le
instance Real.boundedSMul : BoundedSMul ℝ ℝ where
  dist_smul_pair' x y₁ y₂ := by simpa [Real.dist_eq, mul_sub] using (abs_mul x (y₁ - y₂)).le
  dist_pair_smul' x₁ x₂ y := by 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
x₁ x₂ y : ℝ
⊢ dist (x₁ • y) (x₂ • y) ≤ dist x₁ x₂ * dist y 0

Next tactic:
simpa [Real.dist_eq, sub_mul] using (abs_mul (x₁ - x₂) y).le
instance NNReal.boundedSMul : BoundedSMul ℝ≥0 ℝ≥0 where
  dist_smul_pair' x y₁ y₂ := by 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
x y₁ y₂ : ℝ≥0
⊢ dist (x • y₁) (x • y₂) ≤ dist x 0 * dist y₁ y₂

Next tactic:
convert dist_smul_pair (x : ℝ) (y₁ : ℝ) y₂ using 1
instance NNReal.boundedSMul : BoundedSMul ℝ≥0 ℝ≥0 where
  dist_smul_pair' x y₁ y₂ := by convert dist_smul_pair (x : ℝ) (y₁ : ℝ) y₂ using 1
  dist_pair_smul' x₁ x₂ y := by 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : PseudoMetricSpace β
inst✝³ : Zero α
inst✝² : Zero β
inst✝¹ : SMul α β
inst✝ : BoundedSMul α β
x₁ x₂ y : ℝ≥0
⊢ dist (x₁ • y) (x₂ • y) ≤ dist x₁ x₂ * dist y 0

Next tactic:
convert dist_pair_smul (x₁ : ℝ) x₂ (y : ℝ) using 1
/-- If a scalar is central, then its right action is bounded when its left action is. -/
instance BoundedSMul.op [SMul αᵐᵒᵖ β] [IsCentralScalar α β] : BoundedSMul αᵐᵒᵖ β where
  dist_smul_pair' :=
    MulOpposite.rec' fun x y₁ y₂ => by 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁷ : PseudoMetricSpace α
inst✝⁶ : PseudoMetricSpace β
inst✝⁵ : Zero α
inst✝⁴ : Zero β
inst✝³ : SMul α β
inst✝² : BoundedSMul α β
inst✝¹ : SMul αᵐᵒᵖ β
inst✝ : IsCentralScalar α β
x : α
y₁ y₂ : β
⊢ dist (MulOpposite.op x • y₁) (MulOpposite.op x • y₂) ≤ dist (MulOpposite.op x) 0 * dist y₁ y₂

Next tactic:
simpa only [op_smul_eq_smul] using dist_smul_pair x y₁ y₂
/-- If a scalar is central, then its right action is bounded when its left action is. -/
instance BoundedSMul.op [SMul αᵐᵒᵖ β] [IsCentralScalar α β] : BoundedSMul αᵐᵒᵖ β where
  dist_smul_pair' :=
    MulOpposite.rec' fun x y₁ y₂ => by simpa only [op_smul_eq_smul] using dist_smul_pair x y₁ y₂
  dist_pair_smul' :=
    MulOpposite.rec' fun x₁ =>
      MulOpposite.rec' fun x₂ y => by 

Proof state:
α : Type u_1
β : Type u_2
inst✝⁷ : PseudoMetricSpace α
inst✝⁶ : PseudoMetricSpace β
inst✝⁵ : Zero α
inst✝⁴ : Zero β
inst✝³ : SMul α β
inst✝² : BoundedSMul α β
inst✝¹ : SMul αᵐᵒᵖ β
inst✝ : IsCentralScalar α β
x₁ x₂ : α
y : β
⊢ dist (MulOpposite.op x₁ • y) (MulOpposite.op x₂ • y) ≤ dist (MulOpposite.op x₁) (MulOpposite.op x₂) * dist y 0

Next tactic:
simpa only [op_smul_eq_smul] using dist_pair_smul x₁ x₂ y
instance Pi.instBoundedSMul {α : Type*} {β : ι → Type*} [PseudoMetricSpace α]
    [∀ i, PseudoMetricSpace (β i)] [Zero α] [∀ i, Zero (β i)] [∀ i, SMul α (β i)]
    [∀ i, BoundedSMul α (β i)] : BoundedSMul α (∀ i, β i) where
  dist_smul_pair' x y₁ y₂ :=
    (dist_pi_le_iff <| by 

Proof state:
α✝ : Type u_1
β✝ : Type u_2
inst✝⁸ : PseudoMetricSpace α✝
inst✝⁷ : PseudoMetricSpace β✝
ι : Type u_3
inst✝⁶ : Fintype ι
α : Type u_4
β : ι → Type u_5
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : (i : ι) → PseudoMetricSpace (β i)
inst✝³ : Zero α
inst✝² : (i : ι) → Zero (β i)
inst✝¹ : (i : ι) → SMul α (β i)
inst✝ : ∀ (i : ι), BoundedSMul α (β i)
x : α
y₁ y₂ : (i : ι) → β i
⊢ 0 ≤ dist x 0 * dist y₁ y₂

Next tactic:
positivity
instance Pi.instBoundedSMul {α : Type*} {β : ι → Type*} [PseudoMetricSpace α]
    [∀ i, PseudoMetricSpace (β i)] [Zero α] [∀ i, Zero (β i)] [∀ i, SMul α (β i)]
    [∀ i, BoundedSMul α (β i)] : BoundedSMul α (∀ i, β i) where
  dist_smul_pair' x y₁ y₂ :=
    (dist_pi_le_iff <| by positivity).2 fun i ↦
      (dist_smul_pair _ _ _).trans <| mul_le_mul_of_nonneg_left (dist_le_pi_dist _ _ _) dist_nonneg
  dist_pair_smul' x₁ x₂ y :=
    (dist_pi_le_iff <| by 

Proof state:
α✝ : Type u_1
β✝ : Type u_2
inst✝⁸ : PseudoMetricSpace α✝
inst✝⁷ : PseudoMetricSpace β✝
ι : Type u_3
inst✝⁶ : Fintype ι
α : Type u_4
β : ι → Type u_5
inst✝⁵ : PseudoMetricSpace α
inst✝⁴ : (i : ι) → PseudoMetricSpace (β i)
inst✝³ : Zero α
inst✝² : (i : ι) → Zero (β i)
inst✝¹ : (i : ι) → SMul α (β i)
inst✝ : ∀ (i : ι), BoundedSMul α (β i)
x₁ x₂ : α
y : (i : ι) → β i
⊢ 0 ≤ dist x₁ x₂ * dist y 0

Next tactic:
positivity