-- Mathlib/Analysis/Convex/Gauge.lean
theorem gauge_closedBall (hr : 0 ≤ r) (x : E) : gauge (closedBall (0 : E) r) x = ‖x‖ / r

Proof state:
case inr.a
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
⊢ gauge (closedBall 0 r) x ≤ ‖x‖ / r

Tactic:
rw [← gauge_ball hr]

Result:
case inr.a
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
⊢ gauge (closedBall 0 r) x ≤ gauge (ball 0 r) x

Proof state:
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
this : ∀ᶠ (R : ℝ) in 𝓝[>] r, ‖x‖ / R ≤ gauge (closedBall 0 r) x
⊢ Filter.Tendsto (HDiv.hDiv ‖x‖) (𝓝[>] r) (𝓝 (‖x‖ / r))

Tactic:
exact tendsto_const_nhds.div inf_le_left hr'.ne'

Result:
no goals

Proof state:
case inl
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
hr : 0 ≤ 0
⊢ 0 x = 0

Tactic:
rfl

Result:
no goals

Proof state:
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
⊢ gauge (closedBall 0 r) x = ‖x‖ / r

Tactic:
rcases hr.eq_or_lt with rfl | hr'

Result:
case inl
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
hr : 0 ≤ 0
⊢ gauge (closedBall 0 0) x = ‖x‖ / 0

case inr
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
⊢ gauge (closedBall 0 r) x = ‖x‖ / r

Proof state:
case inr.a
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
⊢ gauge (closedBall 0 r) x ≤ gauge (ball 0 r) x

Tactic:
exact gauge_mono (absorbent_ball_zero hr') ball_subset_closedBall x

Result:
no goals

Proof state:
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
this : ∀ᶠ (R : ℝ) in 𝓝[>] r, ‖x‖ / R ≤ gauge (closedBall 0 r) x
⊢ ‖x‖ / r ≤ gauge (closedBall 0 r) x

Tactic:
refine le_of_tendsto ?_ this

Result:
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
this : ∀ᶠ (R : ℝ) in 𝓝[>] r, ‖x‖ / R ≤ gauge (closedBall 0 r) x
⊢ Filter.Tendsto (HDiv.hDiv ‖x‖) (𝓝[>] r) (𝓝 (‖x‖ / r))

Proof state:
case inr.a
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
⊢ ∀ᶠ (R : ℝ) in 𝓝[>] r, ‖x‖ / R ≤ gauge (closedBall 0 r) x

Tactic:
filter_upwards [self_mem_nhdsWithin] with R hR

Result:
case h
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
R : ℝ
hR : R ∈ Ioi r
⊢ ‖x‖ / R ≤ gauge (closedBall 0 r) x

Proof state:
case h
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
R : ℝ
hR : R ∈ Ioi r
⊢ Absorbent ℝ (closedBall 0 r)

Tactic:
exact (absorbent_ball_zero hr').mono ball_subset_closedBall

Result:
no goals

Proof state:
case inr
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
⊢ gauge (closedBall 0 r) x = ‖x‖ / r

Tactic:
apply le_antisymm

Result:
case inr.a
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
⊢ gauge (closedBall 0 r) x ≤ ‖x‖ / r

case inr.a
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
⊢ ‖x‖ / r ≤ gauge (closedBall 0 r) x

Proof state:
case inr.a
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
⊢ ‖x‖ / r ≤ gauge (closedBall 0 r) x

Tactic:
suffices ∀ᶠ R in 𝓝[>] r, ‖x‖ / R ≤ gauge (closedBall 0 r) x by
  refine le_of_tendsto ?_ this
  exact tendsto_const_nhds.div inf_le_left hr'.ne'

Result:
case inr.a
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
⊢ ∀ᶠ (R : ℝ) in 𝓝[>] r, ‖x‖ / R ≤ gauge (closedBall 0 r) x

Proof state:
case h
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
R : ℝ
hR : R ∈ Ioi r
⊢ gauge (ball 0 R) x ≤ gauge (closedBall 0 r) x

Tactic:
refine gauge_mono ?_ (closedBall_subset_ball hR) _

Result:
case h
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
R : ℝ
hR : R ∈ Ioi r
⊢ Absorbent ℝ (closedBall 0 r)

Proof state:
case h
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
R : ℝ
hR : R ∈ Ioi r
⊢ ‖x‖ / R ≤ gauge (closedBall 0 r) x

Tactic:
rw [← gauge_ball (hr.trans hR.out.le)]

Result:
case h
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
x : E
hr' : 0 < r
R : ℝ
hR : R ∈ Ioi r
⊢ gauge (ball 0 R) x ≤ gauge (closedBall 0 r) x

Proof state:
case inl
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
hr : 0 ≤ 0
⊢ gauge (closedBall 0 0) x = ‖x‖ / 0

Tactic:
rw [div_zero, closedBall_zero', singleton_zero, gauge_closure_zero]

Result:
case inl
E : Type u_2
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
hr : 0 ≤ 0
⊢ 0 x = 0