l3lab/ntp-mathlib huggingface dataset:
/-- If `s` is a convex neighborhood of the origin in a topological real vector space, then `gauge s`
is continuous. If the ambient space is a normed space, then `gauge s` is Lipschitz continuous, see
`Convex.lipschitz_gauge`. -/
theorem continuous_gauge (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) : Continuous (gauge s) := by
  have ha : Absorbent ℝ s := absorbent_nhds_zero hs₀
  simp only [continuous_iff_continuousAt, ContinuousAt, (nhds_basis_Icc_pos _).tendsto_right_iff]
  intro x ε hε₀
  rw [← map_add_left_nhds_zero, eventually_map]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousSMul ℝ E
hc : Convex ℝ s
hs₀ : s ∈ 𝓝 0
ha : Absorbent ℝ s
x : E
ε : ℝ
hε₀ : 0 < ε
⊢ ∀ᶠ (a : E) in 𝓝 0, gauge s (x + a) ∈ Icc (gauge s x - ε) (gauge s x + ε)

Next tactic:
have : ε • s ∩ -(ε • s) ∈ 𝓝 0
/-- If `s` is a convex neighborhood of the origin in a topological real vector space, then `gauge s`
is continuous. If the ambient space is a normed space, then `gauge s` is Lipschitz continuous, see
`Convex.lipschitz_gauge`. -/
theorem continuous_gauge (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) : Continuous (gauge s) := by
  have ha : Absorbent ℝ s := absorbent_nhds_zero hs₀
  simp only [continuous_iff_continuousAt, ContinuousAt, (nhds_basis_Icc_pos _).tendsto_right_iff]
  intro x ε hε₀
  rw [← map_add_left_nhds_zero, eventually_map]
  have : ε • s ∩ -(ε • s) ∈ 𝓝 0
  · 

Proof state:
case this
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousSMul ℝ E
hc : Convex ℝ s
hs₀ : s ∈ 𝓝 0
ha : Absorbent ℝ s
x : E
ε : ℝ
hε₀ : 0 < ε
⊢ ε • s ∩ -(ε • s) ∈ 𝓝 0

Next tactic:
exact inter_mem ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀)
      (neg_mem_nhds_zero _ ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀))
/-- If `s` is a convex neighborhood of the origin in a topological real vector space, then `gauge s`
is continuous. If the ambient space is a normed space, then `gauge s` is Lipschitz continuous, see
`Convex.lipschitz_gauge`. -/
theorem continuous_gauge (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) : Continuous (gauge s) := by
  have ha : Absorbent ℝ s := absorbent_nhds_zero hs₀
  simp only [continuous_iff_continuousAt, ContinuousAt, (nhds_basis_Icc_pos _).tendsto_right_iff]
  intro x ε hε₀
  rw [← map_add_left_nhds_zero, eventually_map]
  have : ε • s ∩ -(ε • s) ∈ 𝓝 0
  · exact inter_mem ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀)
      (neg_mem_nhds_zero _ ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀))
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousSMul ℝ E
hc : Convex ℝ s
hs₀ : s ∈ 𝓝 0
ha : Absorbent ℝ s
x : E
ε : ℝ
hε₀ : 0 < ε
this : ε • s ∩ -(ε • s) ∈ 𝓝 0
⊢ ∀ᶠ (a : E) in 𝓝 0, gauge s (x + a) ∈ Icc (gauge s x - ε) (gauge s x + ε)

Next tactic:
filter_upwards [this] with y hy
/-- If `s` is a convex neighborhood of the origin in a topological real vector space, then `gauge s`
is continuous. If the ambient space is a normed space, then `gauge s` is Lipschitz continuous, see
`Convex.lipschitz_gauge`. -/
theorem continuous_gauge (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) : Continuous (gauge s) := by
  have ha : Absorbent ℝ s := absorbent_nhds_zero hs₀
  simp only [continuous_iff_continuousAt, ContinuousAt, (nhds_basis_Icc_pos _).tendsto_right_iff]
  intro x ε hε₀
  rw [← map_add_left_nhds_zero, eventually_map]
  have : ε • s ∩ -(ε • s) ∈ 𝓝 0
  · exact inter_mem ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀)
      (neg_mem_nhds_zero _ ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀))
  filter_upwards [this] with y hy
  

Proof state:
case h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousSMul ℝ E
hc : Convex ℝ s
hs₀ : s ∈ 𝓝 0
ha : Absorbent ℝ s
x : E
ε : ℝ
hε₀ : 0 < ε
this : ε • s ∩ -(ε • s) ∈ 𝓝 0
y : E
hy : y ∈ ε • s ∩ -(ε • s)
⊢ gauge s (x + y) ∈ Icc (gauge s x - ε) (gauge s x + ε)

Next tactic:
constructor
/-- If `s` is a convex neighborhood of the origin in a topological real vector space, then `gauge s`
is continuous. If the ambient space is a normed space, then `gauge s` is Lipschitz continuous, see
`Convex.lipschitz_gauge`. -/
theorem continuous_gauge (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) : Continuous (gauge s) := by
  have ha : Absorbent ℝ s := absorbent_nhds_zero hs₀
  simp only [continuous_iff_continuousAt, ContinuousAt, (nhds_basis_Icc_pos _).tendsto_right_iff]
  intro x ε hε₀
  rw [← map_add_left_nhds_zero, eventually_map]
  have : ε • s ∩ -(ε • s) ∈ 𝓝 0
  · exact inter_mem ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀)
      (neg_mem_nhds_zero _ ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀))
  filter_upwards [this] with y hy
  constructor
  · 

Proof state:
case h.left
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousSMul ℝ E
hc : Convex ℝ s
hs₀ : s ∈ 𝓝 0
ha : Absorbent ℝ s
x : E
ε : ℝ
hε₀ : 0 < ε
this : ε • s ∩ -(ε • s) ∈ 𝓝 0
y : E
hy : y ∈ ε • s ∩ -(ε • s)
⊢ gauge s x - ε ≤ gauge s (x + y)

Next tactic:
rw [sub_le_iff_le_add]
/-- If `s` is a convex neighborhood of the origin in a topological real vector space, then `gauge s`
is continuous. If the ambient space is a normed space, then `gauge s` is Lipschitz continuous, see
`Convex.lipschitz_gauge`. -/
theorem continuous_gauge (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) : Continuous (gauge s) := by
  have ha : Absorbent ℝ s := absorbent_nhds_zero hs₀
  simp only [continuous_iff_continuousAt, ContinuousAt, (nhds_basis_Icc_pos _).tendsto_right_iff]
  intro x ε hε₀
  rw [← map_add_left_nhds_zero, eventually_map]
  have : ε • s ∩ -(ε • s) ∈ 𝓝 0
  · exact inter_mem ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀)
      (neg_mem_nhds_zero _ ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀))
  filter_upwards [this] with y hy
  constructor
  · rw [sub_le_iff_le_add]
    

Proof state:
case h.left
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousSMul ℝ E
hc : Convex ℝ s
hs₀ : s ∈ 𝓝 0
ha : Absorbent ℝ s
x : E
ε : ℝ
hε₀ : 0 < ε
this : ε • s ∩ -(ε • s) ∈ 𝓝 0
y : E
hy : y ∈ ε • s ∩ -(ε • s)
⊢ gauge s x ≤ gauge s (x + y) + ε

Next tactic:
calc
      gauge s x = gauge s (x + y + (-y)) := by simp
      _ ≤ gauge s (x + y) + gauge s (-y) := gauge_add_le hc ha _ _
      _ ≤ gauge s (x + y) + ε := add_le_add_left (gauge_le_of_mem hε₀.le (mem_neg.1 hy.2)) _
/-- If `s` is a convex neighborhood of the origin in a topological real vector space, then `gauge s`
is continuous. If the ambient space is a normed space, then `gauge s` is Lipschitz continuous, see
`Convex.lipschitz_gauge`. -/
theorem continuous_gauge (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) : Continuous (gauge s) := by
  have ha : Absorbent ℝ s := absorbent_nhds_zero hs₀
  simp only [continuous_iff_continuousAt, ContinuousAt, (nhds_basis_Icc_pos _).tendsto_right_iff]
  intro x ε hε₀
  rw [← map_add_left_nhds_zero, eventually_map]
  have : ε • s ∩ -(ε • s) ∈ 𝓝 0
  · exact inter_mem ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀)
      (neg_mem_nhds_zero _ ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀))
  filter_upwards [this] with y hy
  constructor
  · rw [sub_le_iff_le_add]
    calc
      gauge s x = gauge s (x + y + (-y)) := by 

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousSMul ℝ E
hc : Convex ℝ s
hs₀ : s ∈ 𝓝 0
ha : Absorbent ℝ s
x : E
ε : ℝ
hε₀ : 0 < ε
this : ε • s ∩ -(ε • s) ∈ 𝓝 0
y : E
hy : y ∈ ε • s ∩ -(ε • s)
⊢ gauge s x = gauge s (x + y + -y)

Next tactic:
simp
/-- If `s` is a convex neighborhood of the origin in a topological real vector space, then `gauge s`
is continuous. If the ambient space is a normed space, then `gauge s` is Lipschitz continuous, see
`Convex.lipschitz_gauge`. -/
theorem continuous_gauge (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) : Continuous (gauge s) := by
  have ha : Absorbent ℝ s := absorbent_nhds_zero hs₀
  simp only [continuous_iff_continuousAt, ContinuousAt, (nhds_basis_Icc_pos _).tendsto_right_iff]
  intro x ε hε₀
  rw [← map_add_left_nhds_zero, eventually_map]
  have : ε • s ∩ -(ε • s) ∈ 𝓝 0
  · exact inter_mem ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀)
      (neg_mem_nhds_zero _ ((set_smul_mem_nhds_zero_iff hε₀.ne').2 hs₀))
  filter_upwards [this] with y hy
  constructor
  · rw [sub_le_iff_le_add]
    calc
      gauge s x = gauge s (x + y + (-y)) := by simp
      _ ≤ gauge s (x + y) + gauge s (-y) := gauge_add_le hc ha _ _
      _ ≤ gauge s (x + y) + ε := add_le_add_left (gauge_le_of_mem hε₀.le (mem_neg.1 hy.2)) _
  · 

Proof state:
case h.right
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousSMul ℝ E
hc : Convex ℝ s
hs₀ : s ∈ 𝓝 0
ha : Absorbent ℝ s
x : E
ε : ℝ
hε₀ : 0 < ε
this : ε • s ∩ -(ε • s) ∈ 𝓝 0
y : E
hy : y ∈ ε • s ∩ -(ε • s)
⊢ gauge s (x + y) ≤ gauge s x + ε

Next tactic:
calc
      gauge s (x + y) ≤ gauge s x + gauge s y := gauge_add_le hc ha _ _
      _ ≤ gauge s x + ε := add_le_add_left (gauge_le_of_mem hε₀.le hy.1) _
theorem gauge_lt_one_eq_interior (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) :
    { x | gauge s x < 1 } = interior s := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousSMul ℝ E
hc : Convex ℝ s
hs₀ : s ∈ 𝓝 0
⊢ {x | gauge s x < 1} = interior s

Next tactic:
refine Subset.antisymm (fun x hx ↦ ?_) (interior_subset_gauge_lt_one s)
theorem gauge_lt_one_eq_interior (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) :
    { x | gauge s x < 1 } = interior s := by
  refine Subset.antisymm (fun x hx ↦ ?_) (interior_subset_gauge_lt_one s)
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousSMul ℝ E
hc : Convex ℝ s
hs₀ : s ∈ 𝓝 0
x : E
hx : x ∈ {x | gauge s x < 1}
⊢ x ∈ interior s

Next tactic:
rcases mem_openSegment_of_gauge_lt_one (absorbent_nhds_zero hs₀) hx with ⟨y, hys, hxy⟩
theorem gauge_lt_one_eq_interior (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) :
    { x | gauge s x < 1 } = interior s := by
  refine Subset.antisymm (fun x hx ↦ ?_) (interior_subset_gauge_lt_one s)
  rcases mem_openSegment_of_gauge_lt_one (absorbent_nhds_zero hs₀) hx with ⟨y, hys, hxy⟩
  

Proof state:
case intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousSMul ℝ E
hc : Convex ℝ s
hs₀ : s ∈ 𝓝 0
x : E
hx : x ∈ {x | gauge s x < 1}
y : E
hys : y ∈ s
hxy : x ∈ openSegment ℝ 0 y
⊢ x ∈ interior s

Next tactic:
exact hc.openSegment_interior_self_subset_interior (mem_interior_iff_mem_nhds.2 hs₀) hys hxy
theorem gauge_eq_one_iff_mem_frontier (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) :
    gauge s x = 1 ↔ x ∈ frontier s := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousSMul ℝ E
x : E
hc : Convex ℝ s
hs₀ : s ∈ 𝓝 0
⊢ gauge s x = 1 ↔ x ∈ frontier s

Next tactic:
rw [eq_iff_le_not_lt, gauge_le_one_iff_mem_closure hc hs₀, gauge_lt_one_iff_mem_interior hc hs₀]
theorem gauge_eq_one_iff_mem_frontier (hc : Convex ℝ s) (hs₀ : s ∈ 𝓝 0) :
    gauge s x = 1 ↔ x ∈ frontier s := by
  rw [eq_iff_le_not_lt, gauge_le_one_iff_mem_closure hc hs₀, gauge_lt_one_iff_mem_interior hc hs₀]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
a : ℝ
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousSMul ℝ E
x : E
hc : Convex ℝ s
hs₀ : s ∈ 𝓝 0
⊢ x ∈ closure s ∧ x ∉ interior s ↔ x ∈ frontier s

Next tactic:
rfl
theorem gauge_eq_zero [T1Space E] (hs : Absorbent ℝ s) (hb : Bornology.IsVonNBounded ℝ s) :
    gauge s x = 0 ↔ x = 0 := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module ℝ E
s t : Set E
a : ℝ
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousSMul ℝ E
x : E
inst✝ : T1Space E
hs : Absorbent ℝ s
hb : Bornology.IsVonNBounded ℝ s
⊢ gauge s x = 0 ↔ x = 0

Next tactic:
refine ⟨not_imp_not.1 fun (h : x ≠ 0) ↦ ne_of_gt ?_, fun h ↦ h.symm ▸ gauge_zero⟩
theorem gauge_eq_zero [T1Space E] (hs : Absorbent ℝ s) (hb : Bornology.IsVonNBounded ℝ s) :
    gauge s x = 0 ↔ x = 0 := by
  refine ⟨not_imp_not.1 fun (h : x ≠ 0) ↦ ne_of_gt ?_, fun h ↦ h.symm ▸ gauge_zero⟩
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module ℝ E
s t : Set E
a : ℝ
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousSMul ℝ E
x : E
inst✝ : T1Space E
hs : Absorbent ℝ s
hb : Bornology.IsVonNBounded ℝ s
h : x ≠ 0
⊢ 0 < gauge s x

Next tactic:
rcases hb (isOpen_compl_singleton.mem_nhds h.symm) with ⟨c, hc₀, hc⟩
theorem gauge_eq_zero [T1Space E] (hs : Absorbent ℝ s) (hb : Bornology.IsVonNBounded ℝ s) :
    gauge s x = 0 ↔ x = 0 := by
  refine ⟨not_imp_not.1 fun (h : x ≠ 0) ↦ ne_of_gt ?_, fun h ↦ h.symm ▸ gauge_zero⟩
  rcases hb (isOpen_compl_singleton.mem_nhds h.symm) with ⟨c, hc₀, hc⟩
  

Proof state:
case intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module ℝ E
s t : Set E
a : ℝ
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousSMul ℝ E
x : E
inst✝ : T1Space E
hs : Absorbent ℝ s
hb : Bornology.IsVonNBounded ℝ s
h : x ≠ 0
c : ℝ
hc₀ : 0 < c
hc : ∀ (a : ℝ), c ≤ ‖a‖ → s ⊆ a • {x}ᶜ
⊢ 0 < gauge s x

Next tactic:
refine (inv_pos.2 hc₀).trans_le <| le_csInf hs.gauge_set_nonempty ?_
theorem gauge_eq_zero [T1Space E] (hs : Absorbent ℝ s) (hb : Bornology.IsVonNBounded ℝ s) :
    gauge s x = 0 ↔ x = 0 := by
  refine ⟨not_imp_not.1 fun (h : x ≠ 0) ↦ ne_of_gt ?_, fun h ↦ h.symm ▸ gauge_zero⟩
  rcases hb (isOpen_compl_singleton.mem_nhds h.symm) with ⟨c, hc₀, hc⟩
  refine (inv_pos.2 hc₀).trans_le <| le_csInf hs.gauge_set_nonempty ?_
  

Proof state:
case intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module ℝ E
s t : Set E
a : ℝ
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousSMul ℝ E
x : E
inst✝ : T1Space E
hs : Absorbent ℝ s
hb : Bornology.IsVonNBounded ℝ s
h : x ≠ 0
c : ℝ
hc₀ : 0 < c
hc : ∀ (a : ℝ), c ≤ ‖a‖ → s ⊆ a • {x}ᶜ
⊢ ∀ b ∈ {r | 0 < r ∧ x ∈ r • s}, c⁻¹ ≤ b

Next tactic:
rintro r ⟨hr₀, x, hx, rfl⟩
theorem gauge_eq_zero [T1Space E] (hs : Absorbent ℝ s) (hb : Bornology.IsVonNBounded ℝ s) :
    gauge s x = 0 ↔ x = 0 := by
  refine ⟨not_imp_not.1 fun (h : x ≠ 0) ↦ ne_of_gt ?_, fun h ↦ h.symm ▸ gauge_zero⟩
  rcases hb (isOpen_compl_singleton.mem_nhds h.symm) with ⟨c, hc₀, hc⟩
  refine (inv_pos.2 hc₀).trans_le <| le_csInf hs.gauge_set_nonempty ?_
  rintro r ⟨hr₀, x, hx, rfl⟩
  

Proof state:
case intro.intro.intro.intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module ℝ E
s t : Set E
a : ℝ
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : T1Space E
hs : Absorbent ℝ s
hb : Bornology.IsVonNBounded ℝ s
c : ℝ
hc₀ : 0 < c
r : ℝ
hr₀ : 0 < r
x : E
hx : x ∈ s
h : (fun x => r • x) x ≠ 0
hc : ∀ (a : ℝ), c ≤ ‖a‖ → s ⊆ a • {(fun x => r • x) x}ᶜ
⊢ c⁻¹ ≤ r

Next tactic:
contrapose! hc
theorem gauge_eq_zero [T1Space E] (hs : Absorbent ℝ s) (hb : Bornology.IsVonNBounded ℝ s) :
    gauge s x = 0 ↔ x = 0 := by
  refine ⟨not_imp_not.1 fun (h : x ≠ 0) ↦ ne_of_gt ?_, fun h ↦ h.symm ▸ gauge_zero⟩
  rcases hb (isOpen_compl_singleton.mem_nhds h.symm) with ⟨c, hc₀, hc⟩
  refine (inv_pos.2 hc₀).trans_le <| le_csInf hs.gauge_set_nonempty ?_
  rintro r ⟨hr₀, x, hx, rfl⟩
  contrapose! hc
  

Proof state:
case intro.intro.intro.intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module ℝ E
s t : Set E
a : ℝ
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : T1Space E
hs : Absorbent ℝ s
hb : Bornology.IsVonNBounded ℝ s
c : ℝ
hc₀ : 0 < c
r : ℝ
hr₀ : 0 < r
x : E
hx : x ∈ s
h : (fun x => r • x) x ≠ 0
hc : r < c⁻¹
⊢ ∃ a, c ≤ ‖a‖ ∧ ¬s ⊆ a • {r • x}ᶜ

Next tactic:
refine ⟨r⁻¹, ?_, fun h ↦ ?_⟩
theorem gauge_eq_zero [T1Space E] (hs : Absorbent ℝ s) (hb : Bornology.IsVonNBounded ℝ s) :
    gauge s x = 0 ↔ x = 0 := by
  refine ⟨not_imp_not.1 fun (h : x ≠ 0) ↦ ne_of_gt ?_, fun h ↦ h.symm ▸ gauge_zero⟩
  rcases hb (isOpen_compl_singleton.mem_nhds h.symm) with ⟨c, hc₀, hc⟩
  refine (inv_pos.2 hc₀).trans_le <| le_csInf hs.gauge_set_nonempty ?_
  rintro r ⟨hr₀, x, hx, rfl⟩
  contrapose! hc
  refine ⟨r⁻¹, ?_, fun h ↦ ?_⟩
  · 

Proof state:
case intro.intro.intro.intro.intro.refine_1
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module ℝ E
s t : Set E
a : ℝ
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : T1Space E
hs : Absorbent ℝ s
hb : Bornology.IsVonNBounded ℝ s
c : ℝ
hc₀ : 0 < c
r : ℝ
hr₀ : 0 < r
x : E
hx : x ∈ s
h : (fun x => r • x) x ≠ 0
hc : r < c⁻¹
⊢ c ≤ ‖r⁻¹‖

Next tactic:
rw [norm_inv, Real.norm_of_nonneg hr₀.le, le_inv hc₀ hr₀]
theorem gauge_eq_zero [T1Space E] (hs : Absorbent ℝ s) (hb : Bornology.IsVonNBounded ℝ s) :
    gauge s x = 0 ↔ x = 0 := by
  refine ⟨not_imp_not.1 fun (h : x ≠ 0) ↦ ne_of_gt ?_, fun h ↦ h.symm ▸ gauge_zero⟩
  rcases hb (isOpen_compl_singleton.mem_nhds h.symm) with ⟨c, hc₀, hc⟩
  refine (inv_pos.2 hc₀).trans_le <| le_csInf hs.gauge_set_nonempty ?_
  rintro r ⟨hr₀, x, hx, rfl⟩
  contrapose! hc
  refine ⟨r⁻¹, ?_, fun h ↦ ?_⟩
  · rw [norm_inv, Real.norm_of_nonneg hr₀.le, le_inv hc₀ hr₀]
    

Proof state:
case intro.intro.intro.intro.intro.refine_1
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module ℝ E
s t : Set E
a : ℝ
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : T1Space E
hs : Absorbent ℝ s
hb : Bornology.IsVonNBounded ℝ s
c : ℝ
hc₀ : 0 < c
r : ℝ
hr₀ : 0 < r
x : E
hx : x ∈ s
h : (fun x => r • x) x ≠ 0
hc : r < c⁻¹
⊢ r ≤ c⁻¹

Next tactic:
exact hc.le
theorem gauge_eq_zero [T1Space E] (hs : Absorbent ℝ s) (hb : Bornology.IsVonNBounded ℝ s) :
    gauge s x = 0 ↔ x = 0 := by
  refine ⟨not_imp_not.1 fun (h : x ≠ 0) ↦ ne_of_gt ?_, fun h ↦ h.symm ▸ gauge_zero⟩
  rcases hb (isOpen_compl_singleton.mem_nhds h.symm) with ⟨c, hc₀, hc⟩
  refine (inv_pos.2 hc₀).trans_le <| le_csInf hs.gauge_set_nonempty ?_
  rintro r ⟨hr₀, x, hx, rfl⟩
  contrapose! hc
  refine ⟨r⁻¹, ?_, fun h ↦ ?_⟩
  · rw [norm_inv, Real.norm_of_nonneg hr₀.le, le_inv hc₀ hr₀]
    exact hc.le
  · 

Proof state:
case intro.intro.intro.intro.intro.refine_2
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module ℝ E
s t : Set E
a : ℝ
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : T1Space E
hs : Absorbent ℝ s
hb : Bornology.IsVonNBounded ℝ s
c : ℝ
hc₀ : 0 < c
r : ℝ
hr₀ : 0 < r
x : E
hx : x ∈ s
h✝ : (fun x => r • x) x ≠ 0
hc : r < c⁻¹
h : s ⊆ r⁻¹ • {r • x}ᶜ
⊢ False

Next tactic:
rcases h hx with ⟨y, hy, rfl⟩
theorem gauge_eq_zero [T1Space E] (hs : Absorbent ℝ s) (hb : Bornology.IsVonNBounded ℝ s) :
    gauge s x = 0 ↔ x = 0 := by
  refine ⟨not_imp_not.1 fun (h : x ≠ 0) ↦ ne_of_gt ?_, fun h ↦ h.symm ▸ gauge_zero⟩
  rcases hb (isOpen_compl_singleton.mem_nhds h.symm) with ⟨c, hc₀, hc⟩
  refine (inv_pos.2 hc₀).trans_le <| le_csInf hs.gauge_set_nonempty ?_
  rintro r ⟨hr₀, x, hx, rfl⟩
  contrapose! hc
  refine ⟨r⁻¹, ?_, fun h ↦ ?_⟩
  · rw [norm_inv, Real.norm_of_nonneg hr₀.le, le_inv hc₀ hr₀]
    exact hc.le
  · rcases h hx with ⟨y, hy, rfl⟩
    

Proof state:
case intro.intro.intro.intro.intro.refine_2.intro.intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module ℝ E
s t : Set E
a : ℝ
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousSMul ℝ E
inst✝ : T1Space E
hs : Absorbent ℝ s
hb : Bornology.IsVonNBounded ℝ s
c : ℝ
hc₀ : 0 < c
r : ℝ
hr₀ : 0 < r
hc : r < c⁻¹
y : E
hx : (fun x => r⁻¹ • x) y ∈ s
h✝ : (fun x => r • x) ((fun x => r⁻¹ • x) y) ≠ 0
h : s ⊆ r⁻¹ • {r • (fun x => r⁻¹ • x) y}ᶜ
hy : y ∈ {r • (fun x => r⁻¹ • x) y}ᶜ
⊢ False

Next tactic:
simp [hr₀.ne'] at hy
theorem gauge_pos [T1Space E] (hs : Absorbent ℝ s) (hb : Bornology.IsVonNBounded ℝ s) :
    0 < gauge s x ↔ x ≠ 0 := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module ℝ E
s t : Set E
a : ℝ
inst✝³ : TopologicalSpace E
inst✝² : TopologicalAddGroup E
inst✝¹ : ContinuousSMul ℝ E
x : E
inst✝ : T1Space E
hs : Absorbent ℝ s
hb : Bornology.IsVonNBounded ℝ s
⊢ 0 < gauge s x ↔ x ≠ 0

Next tactic:
simp only [(gauge_nonneg _).gt_iff_ne, Ne.def, gauge_eq_zero hs hb]
theorem gaugeSeminorm_ball_one (hs : IsOpen s) : (gaugeSeminorm hs₀ hs₁ hs₂).ball 0 1 = s := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁶ : AddCommGroup E
inst✝⁵ : Module ℝ E
s t : Set E
a : ℝ
inst✝⁴ : IsROrC 𝕜
inst✝³ : Module 𝕜 E
inst✝² : IsScalarTower ℝ 𝕜 E
hs₀ : Balanced 𝕜 s
hs₁ : Convex ℝ s
hs₂ : Absorbent ℝ s
inst✝¹ : TopologicalSpace E
inst✝ : ContinuousSMul ℝ E
hs : IsOpen s
⊢ Seminorm.ball (gaugeSeminorm hs₀ hs₁ hs₂) 0 1 = s

Next tactic:
rw [Seminorm.ball_zero_eq]
theorem gaugeSeminorm_ball_one (hs : IsOpen s) : (gaugeSeminorm hs₀ hs₁ hs₂).ball 0 1 = s := by
  rw [Seminorm.ball_zero_eq]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁶ : AddCommGroup E
inst✝⁵ : Module ℝ E
s t : Set E
a : ℝ
inst✝⁴ : IsROrC 𝕜
inst✝³ : Module 𝕜 E
inst✝² : IsScalarTower ℝ 𝕜 E
hs₀ : Balanced 𝕜 s
hs₁ : Convex ℝ s
hs₂ : Absorbent ℝ s
inst✝¹ : TopologicalSpace E
inst✝ : ContinuousSMul ℝ E
hs : IsOpen s
⊢ {y | (gaugeSeminorm hs₀ hs₁ hs₂) y < 1} = s

Next tactic:
exact gauge_lt_one_eq_self_of_isOpen hs₁ hs₂.zero_mem hs
/-- Any seminorm arises as the gauge of its unit ball. -/
@[simp]
protected theorem Seminorm.gauge_ball (p : Seminorm ℝ E) : gauge (p.ball 0 1) = p := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s t : Set E
a : ℝ
p : Seminorm ℝ E
⊢ gauge (ball p 0 1) = ⇑p

Next tactic:
ext x
/-- Any seminorm arises as the gauge of its unit ball. -/
@[simp]
protected theorem Seminorm.gauge_ball (p : Seminorm ℝ E) : gauge (p.ball 0 1) = p := by
  ext x
  

Proof state:
case h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s t : Set E
a : ℝ
p : Seminorm ℝ E
x : E
⊢ gauge (ball p 0 1) x = p x

Next tactic:
obtain hp | hp := { r : ℝ | 0 < r ∧ x ∈ r • p.ball 0 1 }.eq_empty_or_nonempty
/-- Any seminorm arises as the gauge of its unit ball. -/
@[simp]
protected theorem Seminorm.gauge_ball (p : Seminorm ℝ E) : gauge (p.ball 0 1) = p := by
  ext x
  obtain hp | hp := { r : ℝ | 0 < r ∧ x ∈ r • p.ball 0 1 }.eq_empty_or_nonempty
  · 

Proof state:
case h.inl
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s t : Set E
a : ℝ
p : Seminorm ℝ E
x : E
hp : {r | 0 < r ∧ x ∈ r • ball p 0 1} = ∅
⊢ gauge (ball p 0 1) x = p x

Next tactic:
rw [gauge, hp, Real.sInf_empty]
/-- Any seminorm arises as the gauge of its unit ball. -/
@[simp]
protected theorem Seminorm.gauge_ball (p : Seminorm ℝ E) : gauge (p.ball 0 1) = p := by
  ext x
  obtain hp | hp := { r : ℝ | 0 < r ∧ x ∈ r • p.ball 0 1 }.eq_empty_or_nonempty
  · rw [gauge, hp, Real.sInf_empty]
    

Proof state:
case h.inl
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s t : Set E
a : ℝ
p : Seminorm ℝ E
x : E
hp : {r | 0 < r ∧ x ∈ r • ball p 0 1} = ∅
⊢ 0 = p x

Next tactic:
by_contra h