l3lab/ntp-mathlib huggingface dataset:
theorem gauge_smul_left [Module α E] [SMulCommClass α ℝ ℝ] [IsScalarTower α ℝ ℝ]
    [IsScalarTower α ℝ E] {s : Set E} (symmetric : ∀ x ∈ s, -x ∈ s) (a : α) :
    gauge (a • s) = |a|⁻¹ • gauge s := by
  rw [← gauge_smul_left_of_nonneg (abs_nonneg a)]
  obtain h | h := abs_choice a
  · rw [h]
  · rw [h, Set.neg_smul_set, ← Set.smul_set_neg]
    -- Porting note: was congr
    apply congr_arg
    apply congr_arg
    ext y
    refine' ⟨symmetric _, fun hy => _⟩
    

Proof state:
case inr.h.h.h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁸ : AddCommGroup E
inst✝⁷ : Module ℝ E
s✝ t : Set E
a✝ : ℝ
α : Type u_4
inst✝⁶ : LinearOrderedField α
inst✝⁵ : MulActionWithZero α ℝ
inst✝⁴ : OrderedSMul α ℝ
inst✝³ : Module α E
inst✝² : SMulCommClass α ℝ ℝ
inst✝¹ : IsScalarTower α ℝ ℝ
inst✝ : IsScalarTower α ℝ E
s : Set E
symmetric : ∀ x ∈ s, -x ∈ s
a : α
h : |a| = -a
y : E
hy : y ∈ -s
⊢ y ∈ s

Next tactic:
rw [← neg_neg y]
theorem gauge_smul_left [Module α E] [SMulCommClass α ℝ ℝ] [IsScalarTower α ℝ ℝ]
    [IsScalarTower α ℝ E] {s : Set E} (symmetric : ∀ x ∈ s, -x ∈ s) (a : α) :
    gauge (a • s) = |a|⁻¹ • gauge s := by
  rw [← gauge_smul_left_of_nonneg (abs_nonneg a)]
  obtain h | h := abs_choice a
  · rw [h]
  · rw [h, Set.neg_smul_set, ← Set.smul_set_neg]
    -- Porting note: was congr
    apply congr_arg
    apply congr_arg
    ext y
    refine' ⟨symmetric _, fun hy => _⟩
    rw [← neg_neg y]
    

Proof state:
case inr.h.h.h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁸ : AddCommGroup E
inst✝⁷ : Module ℝ E
s✝ t : Set E
a✝ : ℝ
α : Type u_4
inst✝⁶ : LinearOrderedField α
inst✝⁵ : MulActionWithZero α ℝ
inst✝⁴ : OrderedSMul α ℝ
inst✝³ : Module α E
inst✝² : SMulCommClass α ℝ ℝ
inst✝¹ : IsScalarTower α ℝ ℝ
inst✝ : IsScalarTower α ℝ E
s : Set E
symmetric : ∀ x ∈ s, -x ∈ s
a : α
h : |a| = -a
y : E
hy : y ∈ -s
⊢ - -y ∈ s

Next tactic:
exact symmetric _ hy
theorem gauge_norm_smul (hs : Balanced 𝕜 s) (r : 𝕜) (x : E) :
    gauge s (‖r‖ • x) = gauge s (r • x) := 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
r : 𝕜
x : E
⊢ gauge s (‖r‖ • x) = gauge s (r • x)

Next tactic:
unfold gauge
theorem gauge_norm_smul (hs : Balanced 𝕜 s) (r : 𝕜) (x : E) :
    gauge s (‖r‖ • x) = gauge s (r • x) := by
  unfold gauge
  

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
r : 𝕜
x : E
⊢ sInf {r_1 | 0 < r_1 ∧ ‖r‖ • x ∈ r_1 • s} = sInf {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}

Next tactic:
congr with θ
theorem gauge_norm_smul (hs : Balanced 𝕜 s) (r : 𝕜) (x : E) :
    gauge s (‖r‖ • x) = gauge s (r • x) := by
  unfold gauge
  congr with θ
  

Proof state:
case e_a.h
𝕜 : 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
r : 𝕜
x : E
θ : ℝ
⊢ θ ∈ {r_1 | 0 < r_1 ∧ ‖r‖ • x ∈ r_1 • s} ↔ θ ∈ {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}

Next tactic:
rw [@IsROrC.real_smul_eq_coe_smul 𝕜]
theorem gauge_norm_smul (hs : Balanced 𝕜 s) (r : 𝕜) (x : E) :
    gauge s (‖r‖ • x) = gauge s (r • x) := by
  unfold gauge
  congr with θ
  rw [@IsROrC.real_smul_eq_coe_smul 𝕜]
  

Proof state:
case e_a.h
𝕜 : 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
r : 𝕜
x : E
θ : ℝ
⊢ θ ∈ {r_1 | 0 < r_1 ∧ ↑‖r‖ • x ∈ r_1 • s} ↔ θ ∈ {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}

Next tactic:
refine' and_congr_right fun hθ => (hs.smul _).mem_smul_iff _
theorem gauge_norm_smul (hs : Balanced 𝕜 s) (r : 𝕜) (x : E) :
    gauge s (‖r‖ • x) = gauge s (r • x) := by
  unfold gauge
  congr with θ
  rw [@IsROrC.real_smul_eq_coe_smul 𝕜]
  refine' and_congr_right fun hθ => (hs.smul _).mem_smul_iff _
  

Proof state:
case e_a.h
𝕜 : 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
r : 𝕜
x : E
θ : ℝ
hθ : 0 < θ
⊢ ‖↑‖r‖‖ = ‖r‖

Next tactic:
rw [IsROrC.norm_ofReal, abs_norm]
/-- If `s` is balanced, then the Minkowski functional is ℂ-homogeneous. -/
theorem gauge_smul (hs : Balanced 𝕜 s) (r : 𝕜) (x : E) : gauge s (r • x) = ‖r‖ * gauge s x := 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
r : 𝕜
x : E
⊢ gauge s (r • x) = ‖r‖ * gauge s x

Next tactic:
rw [← smul_eq_mul, ← gauge_smul_of_nonneg (norm_nonneg r), gauge_norm_smul hs]
open Filter in
theorem interior_subset_gauge_lt_one (s : Set E) : interior s ⊆ { x | gauge s x < 1 } := 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✝ : ContinuousSMul ℝ E
s : Set E
⊢ interior s ⊆ {x | gauge s x < 1}

Next tactic:
intro x hx
open Filter in
theorem interior_subset_gauge_lt_one (s : Set E) : interior s ⊆ { x | gauge s x < 1 } := by
  intro x hx
  

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✝ : ContinuousSMul ℝ E
s : Set E
x : E
hx : x ∈ interior s
⊢ x ∈ {x | gauge s x < 1}

Next tactic:
have H₁ : Tendsto (fun r : ℝ ↦ r⁻¹ • x) (𝓝[<] 1) (𝓝 ((1 : ℝ)⁻¹ • x)) :=
    ((tendsto_id.inv₀ one_ne_zero).smul tendsto_const_nhds).mono_left inf_le_left
open Filter in
theorem interior_subset_gauge_lt_one (s : Set E) : interior s ⊆ { x | gauge s x < 1 } := by
  intro x hx
  have H₁ : Tendsto (fun r : ℝ ↦ r⁻¹ • x) (𝓝[<] 1) (𝓝 ((1 : ℝ)⁻¹ • x)) :=
    ((tendsto_id.inv₀ one_ne_zero).smul tendsto_const_nhds).mono_left inf_le_left
  

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✝ : ContinuousSMul ℝ E
s : Set E
x : E
hx : x ∈ interior s
H₁ : Tendsto (fun r => r⁻¹ • x) (𝓝[<] 1) (𝓝 (1⁻¹ • x))
⊢ x ∈ {x | gauge s x < 1}

Next tactic:
rw [inv_one, one_smul] at H₁
open Filter in
theorem interior_subset_gauge_lt_one (s : Set E) : interior s ⊆ { x | gauge s x < 1 } := by
  intro x hx
  have H₁ : Tendsto (fun r : ℝ ↦ r⁻¹ • x) (𝓝[<] 1) (𝓝 ((1 : ℝ)⁻¹ • x)) :=
    ((tendsto_id.inv₀ one_ne_zero).smul tendsto_const_nhds).mono_left inf_le_left
  rw [inv_one, one_smul] at H₁
  

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✝ : ContinuousSMul ℝ E
s : Set E
x : E
hx : x ∈ interior s
H₁ : Tendsto (fun r => r⁻¹ • x) (𝓝[<] 1) (𝓝 x)
⊢ x ∈ {x | gauge s x < 1}

Next tactic:
have H₂ : ∀ᶠ r in 𝓝[<] (1 : ℝ), x ∈ r • s ∧ 0 < r ∧ r < 1
open Filter in
theorem interior_subset_gauge_lt_one (s : Set E) : interior s ⊆ { x | gauge s x < 1 } := by
  intro x hx
  have H₁ : Tendsto (fun r : ℝ ↦ r⁻¹ • x) (𝓝[<] 1) (𝓝 ((1 : ℝ)⁻¹ • x)) :=
    ((tendsto_id.inv₀ one_ne_zero).smul tendsto_const_nhds).mono_left inf_le_left
  rw [inv_one, one_smul] at H₁
  have H₂ : ∀ᶠ r in 𝓝[<] (1 : ℝ), x ∈ r • s ∧ 0 < r ∧ r < 1
  · 

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✝ : ContinuousSMul ℝ E
s : Set E
x : E
hx : x ∈ interior s
H₁ : Tendsto (fun r => r⁻¹ • x) (𝓝[<] 1) (𝓝 x)
⊢ ∀ᶠ (r : ℝ) in 𝓝[<] 1, x ∈ r • s ∧ 0 < r ∧ r < 1

Next tactic:
filter_upwards [H₁ (mem_interior_iff_mem_nhds.1 hx), Ioo_mem_nhdsWithin_Iio' one_pos]
open Filter in
theorem interior_subset_gauge_lt_one (s : Set E) : interior s ⊆ { x | gauge s x < 1 } := by
  intro x hx
  have H₁ : Tendsto (fun r : ℝ ↦ r⁻¹ • x) (𝓝[<] 1) (𝓝 ((1 : ℝ)⁻¹ • x)) :=
    ((tendsto_id.inv₀ one_ne_zero).smul tendsto_const_nhds).mono_left inf_le_left
  rw [inv_one, one_smul] at H₁
  have H₂ : ∀ᶠ r in 𝓝[<] (1 : ℝ), x ∈ r • s ∧ 0 < r ∧ r < 1
  · filter_upwards [H₁ (mem_interior_iff_mem_nhds.1 hx), Ioo_mem_nhdsWithin_Iio' one_pos]
    

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✝ : ContinuousSMul ℝ E
s : Set E
x : E
hx : x ∈ interior s
H₁ : Tendsto (fun r => r⁻¹ • x) (𝓝[<] 1) (𝓝 x)
⊢ ∀ a ∈ (fun r => r⁻¹ • x) ⁻¹' s, a ∈ Ioo 0 1 → x ∈ a • s ∧ 0 < a ∧ a < 1

Next tactic:
intro r h₁ h₂
open Filter in
theorem interior_subset_gauge_lt_one (s : Set E) : interior s ⊆ { x | gauge s x < 1 } := by
  intro x hx
  have H₁ : Tendsto (fun r : ℝ ↦ r⁻¹ • x) (𝓝[<] 1) (𝓝 ((1 : ℝ)⁻¹ • x)) :=
    ((tendsto_id.inv₀ one_ne_zero).smul tendsto_const_nhds).mono_left inf_le_left
  rw [inv_one, one_smul] at H₁
  have H₂ : ∀ᶠ r in 𝓝[<] (1 : ℝ), x ∈ r • s ∧ 0 < r ∧ r < 1
  · filter_upwards [H₁ (mem_interior_iff_mem_nhds.1 hx), Ioo_mem_nhdsWithin_Iio' one_pos]
    intro r h₁ h₂
    

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✝ : ContinuousSMul ℝ E
s : Set E
x : E
hx : x ∈ interior s
H₁ : Tendsto (fun r => r⁻¹ • x) (𝓝[<] 1) (𝓝 x)
r : ℝ
h₁ : r ∈ (fun r => r⁻¹ • x) ⁻¹' s
h₂ : r ∈ Ioo 0 1
⊢ x ∈ r • s ∧ 0 < r ∧ r < 1

Next tactic:
exact ⟨(mem_smul_set_iff_inv_smul_mem₀ h₂.1.ne' _ _).2 h₁, h₂⟩
open Filter in
theorem interior_subset_gauge_lt_one (s : Set E) : interior s ⊆ { x | gauge s x < 1 } := by
  intro x hx
  have H₁ : Tendsto (fun r : ℝ ↦ r⁻¹ • x) (𝓝[<] 1) (𝓝 ((1 : ℝ)⁻¹ • x)) :=
    ((tendsto_id.inv₀ one_ne_zero).smul tendsto_const_nhds).mono_left inf_le_left
  rw [inv_one, one_smul] at H₁
  have H₂ : ∀ᶠ r in 𝓝[<] (1 : ℝ), x ∈ r • s ∧ 0 < r ∧ r < 1
  · filter_upwards [H₁ (mem_interior_iff_mem_nhds.1 hx), Ioo_mem_nhdsWithin_Iio' one_pos]
    intro r h₁ h₂
    exact ⟨(mem_smul_set_iff_inv_smul_mem₀ h₂.1.ne' _ _).2 h₁, h₂⟩
  

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✝ : ContinuousSMul ℝ E
s : Set E
x : E
hx : x ∈ interior s
H₁ : Tendsto (fun r => r⁻¹ • x) (𝓝[<] 1) (𝓝 x)
H₂ : ∀ᶠ (r : ℝ) in 𝓝[<] 1, x ∈ r • s ∧ 0 < r ∧ r < 1
⊢ x ∈ {x | gauge s x < 1}

Next tactic:
rcases H₂.exists with ⟨r, hxr, hr₀, hr₁⟩
open Filter in
theorem interior_subset_gauge_lt_one (s : Set E) : interior s ⊆ { x | gauge s x < 1 } := by
  intro x hx
  have H₁ : Tendsto (fun r : ℝ ↦ r⁻¹ • x) (𝓝[<] 1) (𝓝 ((1 : ℝ)⁻¹ • x)) :=
    ((tendsto_id.inv₀ one_ne_zero).smul tendsto_const_nhds).mono_left inf_le_left
  rw [inv_one, one_smul] at H₁
  have H₂ : ∀ᶠ r in 𝓝[<] (1 : ℝ), x ∈ r • s ∧ 0 < r ∧ r < 1
  · filter_upwards [H₁ (mem_interior_iff_mem_nhds.1 hx), Ioo_mem_nhdsWithin_Iio' one_pos]
    intro r h₁ h₂
    exact ⟨(mem_smul_set_iff_inv_smul_mem₀ h₂.1.ne' _ _).2 h₁, h₂⟩
  rcases H₂.exists with ⟨r, hxr, hr₀, hr₁⟩
  

Proof state:
case 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✝ : ContinuousSMul ℝ E
s : Set E
x : E
hx : x ∈ interior s
H₁ : Tendsto (fun r => r⁻¹ • x) (𝓝[<] 1) (𝓝 x)
H₂ : ∀ᶠ (r : ℝ) in 𝓝[<] 1, x ∈ r • s ∧ 0 < r ∧ r < 1
r : ℝ
hxr : x ∈ r • s
hr₀ : 0 < r
hr₁ : r < 1
⊢ x ∈ {x | gauge s x < 1}

Next tactic:
exact (gauge_le_of_mem hr₀.le hxr).trans_lt hr₁
theorem gauge_lt_one_eq_self_of_isOpen (hs₁ : Convex ℝ s) (hs₀ : (0 : E) ∈ s) (hs₂ : IsOpen s) :
    { x | gauge s x < 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✝¹ : TopologicalSpace E
inst✝ : ContinuousSMul ℝ E
hs₁ : Convex ℝ s
hs₀ : 0 ∈ s
hs₂ : IsOpen s
⊢ {x | gauge s x < 1} = s

Next tactic:
refine' (gauge_lt_one_subset_self hs₁ ‹_› <| absorbent_nhds_zero <| hs₂.mem_nhds hs₀).antisymm _
theorem gauge_lt_one_eq_self_of_isOpen (hs₁ : Convex ℝ s) (hs₀ : (0 : E) ∈ s) (hs₂ : IsOpen s) :
    { x | gauge s x < 1 } = s := by
  refine' (gauge_lt_one_subset_self hs₁ ‹_› <| absorbent_nhds_zero <| hs₂.mem_nhds hs₀).antisymm _
  

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✝ : ContinuousSMul ℝ E
hs₁ : Convex ℝ s
hs₀ : 0 ∈ s
hs₂ : IsOpen s
⊢ s ⊆ {x | gauge s x < 1}

Next tactic:
convert interior_subset_gauge_lt_one s
theorem gauge_lt_one_eq_self_of_isOpen (hs₁ : Convex ℝ s) (hs₀ : (0 : E) ∈ s) (hs₂ : IsOpen s) :
    { x | gauge s x < 1 } = s := by
  refine' (gauge_lt_one_subset_self hs₁ ‹_› <| absorbent_nhds_zero <| hs₂.mem_nhds hs₀).antisymm _
  convert interior_subset_gauge_lt_one s
  

Proof state:
case h.e'_3
𝕜 : 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✝ : ContinuousSMul ℝ E
hs₁ : Convex ℝ s
hs₀ : 0 ∈ s
hs₂ : IsOpen s
⊢ s = interior s

Next tactic:
exact hs₂.interior_eq.symm
theorem gauge_lt_one_of_mem_of_isOpen (hs₂ : IsOpen s) {x : E} (hx : x ∈ s) :
    gauge s x < 1 :=
  interior_subset_gauge_lt_one 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✝ : ContinuousSMul ℝ E
hs₂ : IsOpen s
x : E
hx : x ∈ s
⊢ x ∈ interior s

Next tactic:
rwa [hs₂.interior_eq]
theorem gauge_lt_of_mem_smul (x : E) (ε : ℝ) (hε : 0 < ε) (hs₂ : IsOpen s) (hx : x ∈ ε • s) :
    gauge s x < ε := 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✝ : ContinuousSMul ℝ E
x : E
ε : ℝ
hε : 0 < ε
hs₂ : IsOpen s
hx : x ∈ ε • s
⊢ gauge s x < ε

Next tactic:
have : ε⁻¹ • x ∈ s := by rwa [← mem_smul_set_iff_inv_smul_mem₀ hε.ne']
theorem gauge_lt_of_mem_smul (x : E) (ε : ℝ) (hε : 0 < ε) (hs₂ : IsOpen s) (hx : x ∈ ε • s) :
    gauge s x < ε := by
  have : ε⁻¹ • x ∈ 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✝ : ContinuousSMul ℝ E
x : E
ε : ℝ
hε : 0 < ε
hs₂ : IsOpen s
hx : x ∈ ε • s
⊢ ε⁻¹ • x ∈ s

Next tactic:
rwa [← mem_smul_set_iff_inv_smul_mem₀ hε.ne']
theorem gauge_lt_of_mem_smul (x : E) (ε : ℝ) (hε : 0 < ε) (hs₂ : IsOpen s) (hx : x ∈ ε • s) :
    gauge s x < ε := by
  have : ε⁻¹ • x ∈ s := by rwa [← mem_smul_set_iff_inv_smul_mem₀ hε.ne']
  

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✝ : ContinuousSMul ℝ E
x : E
ε : ℝ
hε : 0 < ε
hs₂ : IsOpen s
hx : x ∈ ε • s
this : ε⁻¹ • x ∈ s
⊢ gauge s x < ε

Next tactic:
have h_gauge_lt := gauge_lt_one_of_mem_of_isOpen hs₂ this
theorem gauge_lt_of_mem_smul (x : E) (ε : ℝ) (hε : 0 < ε) (hs₂ : IsOpen s) (hx : x ∈ ε • s) :
    gauge s x < ε := by
  have : ε⁻¹ • x ∈ s := by rwa [← mem_smul_set_iff_inv_smul_mem₀ hε.ne']
  have h_gauge_lt := gauge_lt_one_of_mem_of_isOpen hs₂ this
  

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✝ : ContinuousSMul ℝ E
x : E
ε : ℝ
hε : 0 < ε
hs₂ : IsOpen s
hx : x ∈ ε • s
this : ε⁻¹ • x ∈ s
h_gauge_lt : gauge s (ε⁻¹ • x) < 1
⊢ gauge s x < ε

Next tactic:
rwa [gauge_smul_of_nonneg (inv_nonneg.2 hε.le), smul_eq_mul, inv_mul_lt_iff hε, mul_one]
    at h_gauge_lt
theorem mem_closure_of_gauge_le_one (hc : Convex ℝ s) (hs₀ : 0 ∈ s) (ha : Absorbent ℝ s)
    (h : gauge s x ≤ 1) : x ∈ closure 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✝ : ContinuousSMul ℝ E
x : E
hc : Convex ℝ s
hs₀ : 0 ∈ s
ha : Absorbent ℝ s
h : gauge s x ≤ 1
⊢ x ∈ closure s

Next tactic:
have : ∀ᶠ r : ℝ in 𝓝[<] 1, r • x ∈ s
theorem mem_closure_of_gauge_le_one (hc : Convex ℝ s) (hs₀ : 0 ∈ s) (ha : Absorbent ℝ s)
    (h : gauge s x ≤ 1) : x ∈ closure s := by
  have : ∀ᶠ r : ℝ in 𝓝[<] 1, r • x ∈ s
  · 

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✝ : ContinuousSMul ℝ E
x : E
hc : Convex ℝ s
hs₀ : 0 ∈ s
ha : Absorbent ℝ s
h : gauge s x ≤ 1
⊢ ∀ᶠ (r : ℝ) in 𝓝[<] 1, r • x ∈ s

Next tactic:
filter_upwards [Ico_mem_nhdsWithin_Iio' one_pos] with r ⟨hr₀, hr₁⟩
theorem mem_closure_of_gauge_le_one (hc : Convex ℝ s) (hs₀ : 0 ∈ s) (ha : Absorbent ℝ s)
    (h : gauge s x ≤ 1) : x ∈ closure s := by
  have : ∀ᶠ r : ℝ in 𝓝[<] 1, r • x ∈ s
  · filter_upwards [Ico_mem_nhdsWithin_Iio' one_pos] with r ⟨hr₀, hr₁⟩
    

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✝ : ContinuousSMul ℝ E
x : E
hc : Convex ℝ s
hs₀ : 0 ∈ s
ha : Absorbent ℝ s
h : gauge s x ≤ 1
r : ℝ
hr₀ : 0 ≤ r
hr₁ : r < 1
⊢ r • x ∈ s

Next tactic:
apply gauge_lt_one_subset_self hc hs₀ ha
theorem mem_closure_of_gauge_le_one (hc : Convex ℝ s) (hs₀ : 0 ∈ s) (ha : Absorbent ℝ s)
    (h : gauge s x ≤ 1) : x ∈ closure s := by
  have : ∀ᶠ r : ℝ in 𝓝[<] 1, r • x ∈ s
  · filter_upwards [Ico_mem_nhdsWithin_Iio' one_pos] with r ⟨hr₀, hr₁⟩
    apply gauge_lt_one_subset_self hc hs₀ ha
    

Proof state:
case h.a
𝕜 : 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✝ : ContinuousSMul ℝ E
x : E
hc : Convex ℝ s
hs₀ : 0 ∈ s
ha : Absorbent ℝ s
h : gauge s x ≤ 1
r : ℝ
hr₀ : 0 ≤ r
hr₁ : r < 1
⊢ r • x ∈ {x | gauge s x < 1}

Next tactic:
rw [mem_setOf_eq, gauge_smul_of_nonneg hr₀]
theorem mem_closure_of_gauge_le_one (hc : Convex ℝ s) (hs₀ : 0 ∈ s) (ha : Absorbent ℝ s)
    (h : gauge s x ≤ 1) : x ∈ closure s := by
  have : ∀ᶠ r : ℝ in 𝓝[<] 1, r • x ∈ s
  · filter_upwards [Ico_mem_nhdsWithin_Iio' one_pos] with r ⟨hr₀, hr₁⟩
    apply gauge_lt_one_subset_self hc hs₀ ha
    rw [mem_setOf_eq, gauge_smul_of_nonneg hr₀]
    

Proof state:
case h.a
𝕜 : 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✝ : ContinuousSMul ℝ E
x : E
hc : Convex ℝ s
hs₀ : 0 ∈ s
ha : Absorbent ℝ s
h : gauge s x ≤ 1
r : ℝ
hr₀ : 0 ≤ r
hr₁ : r < 1
⊢ r • gauge s x < 1

Next tactic:
exact mul_lt_one_of_nonneg_of_lt_one_left hr₀ hr₁ h
theorem mem_closure_of_gauge_le_one (hc : Convex ℝ s) (hs₀ : 0 ∈ s) (ha : Absorbent ℝ s)
    (h : gauge s x ≤ 1) : x ∈ closure s := by
  have : ∀ᶠ r : ℝ in 𝓝[<] 1, r • x ∈ s
  · filter_upwards [Ico_mem_nhdsWithin_Iio' one_pos] with r ⟨hr₀, hr₁⟩
    apply gauge_lt_one_subset_self hc hs₀ ha
    rw [mem_setOf_eq, gauge_smul_of_nonneg hr₀]
    exact mul_lt_one_of_nonneg_of_lt_one_left hr₀ hr₁ h
  

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✝ : ContinuousSMul ℝ E
x : E
hc : Convex ℝ s
hs₀ : 0 ∈ s
ha : Absorbent ℝ s
h : gauge s x ≤ 1
this : ∀ᶠ (r : ℝ) in 𝓝[<] 1, r • x ∈ s
⊢ x ∈ closure s

Next tactic:
refine mem_closure_of_tendsto ?_ this
theorem mem_closure_of_gauge_le_one (hc : Convex ℝ s) (hs₀ : 0 ∈ s) (ha : Absorbent ℝ s)
    (h : gauge s x ≤ 1) : x ∈ closure s := by
  have : ∀ᶠ r : ℝ in 𝓝[<] 1, r • x ∈ s
  · filter_upwards [Ico_mem_nhdsWithin_Iio' one_pos] with r ⟨hr₀, hr₁⟩
    apply gauge_lt_one_subset_self hc hs₀ ha
    rw [mem_setOf_eq, gauge_smul_of_nonneg hr₀]
    exact mul_lt_one_of_nonneg_of_lt_one_left hr₀ hr₁ h
  refine mem_closure_of_tendsto ?_ this
  

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✝ : ContinuousSMul ℝ E
x : E
hc : Convex ℝ s
hs₀ : 0 ∈ s
ha : Absorbent ℝ s
h : gauge s x ≤ 1
this : ∀ᶠ (r : ℝ) in 𝓝[<] 1, r • x ∈ s
⊢ Filter.Tendsto (fun x_1 => x_1 • x) (𝓝[<] 1) (𝓝 x)

Next tactic:
exact Filter.Tendsto.mono_left (Continuous.tendsto' (by continuity) _ _ (one_smul _ _))
    inf_le_left
theorem mem_closure_of_gauge_le_one (hc : Convex ℝ s) (hs₀ : 0 ∈ s) (ha : Absorbent ℝ s)
    (h : gauge s x ≤ 1) : x ∈ closure s := by
  have : ∀ᶠ r : ℝ in 𝓝[<] 1, r • x ∈ s
  · filter_upwards [Ico_mem_nhdsWithin_Iio' one_pos] with r ⟨hr₀, hr₁⟩
    apply gauge_lt_one_subset_self hc hs₀ ha
    rw [mem_setOf_eq, gauge_smul_of_nonneg hr₀]
    exact mul_lt_one_of_nonneg_of_lt_one_left hr₀ hr₁ h
  refine mem_closure_of_tendsto ?_ this
  exact Filter.Tendsto.mono_left (Continuous.tendsto' (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✝ : ContinuousSMul ℝ E
x : E
hc : Convex ℝ s
hs₀ : 0 ∈ s
ha : Absorbent ℝ s
h : gauge s x ≤ 1
this : ∀ᶠ (r : ℝ) in 𝓝[<] 1, r • x ∈ s
⊢ Continuous fun x_1 => x_1 • x

Next tactic:
continuity
/-- 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
  

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
⊢ Continuous (gauge s)

Next tactic:
have ha : Absorbent ℝ s := absorbent_nhds_zero 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₀
  

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
⊢ Continuous (gauge s)

Next tactic:
simp only [continuous_iff_continuousAt, ContinuousAt, (nhds_basis_Icc_pos _).tendsto_right_iff]
/-- 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]
  

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) (i : ℝ), 0 < i → ∀ᶠ (x_1 : E) in 𝓝 x, gauge s x_1 ∈ Icc (gauge s x - i) (gauge s x + i)

Next tactic:
intro x ε hε₀
/-- 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ε₀
  

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 < ε
⊢ ∀ᶠ (x_1 : E) in 𝓝 x, gauge s x_1 ∈ Icc (gauge s x - ε) (gauge s x + ε)

Next tactic:
rw [← map_add_left_nhds_zero, eventually_map]