l3lab/ntp-mathlib huggingface dataset:
theorem le_gauge_of_not_mem (hs₀ : StarConvex ℝ 0 s) (hs₂ : Absorbs ℝ s {x}) (hx : x ∉ a • s) :
    a ≤ gauge s x := by
  rw [starConvex_zero_iff] at hs₀
  obtain ⟨r, hr, h⟩ := hs₂
  refine' le_csInf ⟨r, hr, singleton_subset_iff.1 <| h _ (Real.norm_of_nonneg hr.le).ge⟩ _
  rintro b ⟨hb, x, hx', rfl⟩
  refine' not_lt.1 fun hba => hx _
  have ha := hb.trans hba
  refine' ⟨(a⁻¹ * b) • x, hs₀ hx' (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 : ℝ
hs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s
r : ℝ
hr : 0 < r
b : ℝ
hb : 0 < b
x : E
hx' : x ∈ s
hx : (fun x => b • x) x ∉ a • s
h : ∀ (a : ℝ), r ≤ ‖a‖ → {(fun x => b • x) x} ⊆ a • s
hba : b < a
ha : 0 < a
⊢ 0 ≤ a⁻¹ * b

Next tactic:
positivity
theorem le_gauge_of_not_mem (hs₀ : StarConvex ℝ 0 s) (hs₂ : Absorbs ℝ s {x}) (hx : x ∉ a • s) :
    a ≤ gauge s x := by
  rw [starConvex_zero_iff] at hs₀
  obtain ⟨r, hr, h⟩ := hs₂
  refine' le_csInf ⟨r, hr, singleton_subset_iff.1 <| h _ (Real.norm_of_nonneg hr.le).ge⟩ _
  rintro b ⟨hb, x, hx', rfl⟩
  refine' not_lt.1 fun hba => hx _
  have ha := hb.trans hba
  refine' ⟨(a⁻¹ * b) • x, hs₀ hx' (by positivity) _, _⟩
  · 

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 : ℝ
hs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s
r : ℝ
hr : 0 < r
b : ℝ
hb : 0 < b
x : E
hx' : x ∈ s
hx : (fun x => b • x) x ∉ a • s
h : ∀ (a : ℝ), r ≤ ‖a‖ → {(fun x => b • x) x} ⊆ a • s
hba : b < a
ha : 0 < a
⊢ a⁻¹ * b ≤ 1

Next tactic:
rw [← div_eq_inv_mul]
theorem le_gauge_of_not_mem (hs₀ : StarConvex ℝ 0 s) (hs₂ : Absorbs ℝ s {x}) (hx : x ∉ a • s) :
    a ≤ gauge s x := by
  rw [starConvex_zero_iff] at hs₀
  obtain ⟨r, hr, h⟩ := hs₂
  refine' le_csInf ⟨r, hr, singleton_subset_iff.1 <| h _ (Real.norm_of_nonneg hr.le).ge⟩ _
  rintro b ⟨hb, x, hx', rfl⟩
  refine' not_lt.1 fun hba => hx _
  have ha := hb.trans hba
  refine' ⟨(a⁻¹ * b) • x, hs₀ hx' (by positivity) _, _⟩
  · rw [← div_eq_inv_mul]
    

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 : ℝ
hs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s
r : ℝ
hr : 0 < r
b : ℝ
hb : 0 < b
x : E
hx' : x ∈ s
hx : (fun x => b • x) x ∉ a • s
h : ∀ (a : ℝ), r ≤ ‖a‖ → {(fun x => b • x) x} ⊆ a • s
hba : b < a
ha : 0 < a
⊢ b / a ≤ 1

Next tactic:
exact div_le_one_of_le hba.le ha.le
theorem le_gauge_of_not_mem (hs₀ : StarConvex ℝ 0 s) (hs₂ : Absorbs ℝ s {x}) (hx : x ∉ a • s) :
    a ≤ gauge s x := by
  rw [starConvex_zero_iff] at hs₀
  obtain ⟨r, hr, h⟩ := hs₂
  refine' le_csInf ⟨r, hr, singleton_subset_iff.1 <| h _ (Real.norm_of_nonneg hr.le).ge⟩ _
  rintro b ⟨hb, x, hx', rfl⟩
  refine' not_lt.1 fun hba => hx _
  have ha := hb.trans hba
  refine' ⟨(a⁻¹ * b) • x, hs₀ hx' (by positivity) _, _⟩
  · rw [← div_eq_inv_mul]
    exact div_le_one_of_le hba.le ha.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 : ℝ
hs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s
r : ℝ
hr : 0 < r
b : ℝ
hb : 0 < b
x : E
hx' : x ∈ s
hx : (fun x => b • x) x ∉ a • s
h : ∀ (a : ℝ), r ≤ ‖a‖ → {(fun x => b • x) x} ⊆ a • s
hba : b < a
ha : 0 < a
⊢ (fun x => a • x) ((a⁻¹ * b) • x) = (fun x => b • x) x

Next tactic:
dsimp only
theorem le_gauge_of_not_mem (hs₀ : StarConvex ℝ 0 s) (hs₂ : Absorbs ℝ s {x}) (hx : x ∉ a • s) :
    a ≤ gauge s x := by
  rw [starConvex_zero_iff] at hs₀
  obtain ⟨r, hr, h⟩ := hs₂
  refine' le_csInf ⟨r, hr, singleton_subset_iff.1 <| h _ (Real.norm_of_nonneg hr.le).ge⟩ _
  rintro b ⟨hb, x, hx', rfl⟩
  refine' not_lt.1 fun hba => hx _
  have ha := hb.trans hba
  refine' ⟨(a⁻¹ * b) • x, hs₀ hx' (by positivity) _, _⟩
  · rw [← div_eq_inv_mul]
    exact div_le_one_of_le hba.le ha.le
  · dsimp only
    

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 : ℝ
hs₀ : ∀ ⦃x : E⦄, x ∈ s → ∀ ⦃a : ℝ⦄, 0 ≤ a → a ≤ 1 → a • x ∈ s
r : ℝ
hr : 0 < r
b : ℝ
hb : 0 < b
x : E
hx' : x ∈ s
hx : (fun x => b • x) x ∉ a • s
h : ∀ (a : ℝ), r ≤ ‖a‖ → {(fun x => b • x) x} ⊆ a • s
hba : b < a
ha : 0 < a
⊢ a • (a⁻¹ * b) • x = b • x

Next tactic:
rw [← mul_smul, mul_inv_cancel_left₀ ha.ne']
theorem one_le_gauge_of_not_mem (hs₁ : StarConvex ℝ 0 s) (hs₂ : Absorbs ℝ s {x}) (hx : x ∉ s) :
    1 ≤ gauge s x :=
  le_gauge_of_not_mem hs₁ hs₂ <| 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 : ℝ
x : E
hs₁ : StarConvex ℝ 0 s
hs₂ : Absorbs ℝ s {x}
hx : x ∉ s
⊢ x ∉ 1 • s

Next tactic:
rwa [one_smul]
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • 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✝ : ℝ
α : Type u_4
inst✝⁴ : LinearOrderedField α
inst✝³ : MulActionWithZero α ℝ
inst✝² : OrderedSMul α ℝ
inst✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
⊢ gauge s (a • x) = a • gauge s x

Next tactic:
obtain rfl | ha' := ha.eq_or_lt
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · 

Proof state:
case inl
𝕜 : 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✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
x : E
ha : 0 ≤ 0
⊢ gauge s (0 • x) = 0 • gauge s x

Next tactic:
rw [zero_smul, gauge_zero, zero_smul]
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  

Proof state:
case inr
𝕜 : 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✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
⊢ gauge s (a • x) = a • gauge s x

Next tactic:
rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  

Proof state:
case inr
𝕜 : 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✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
⊢ sInf {r | r ∈ Ioi 0 ∧ r⁻¹ • a • x ∈ s} = sInf (a • {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s})

Next tactic:
congr 1
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  

Proof state:
case inr.e_a
𝕜 : 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✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
⊢ {r | r ∈ Ioi 0 ∧ r⁻¹ • a • x ∈ s} = a • {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}

Next tactic:
ext r
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  ext r
  

Proof state:
case inr.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✝ : ℝ
α : Type u_4
inst✝⁴ : LinearOrderedField α
inst✝³ : MulActionWithZero α ℝ
inst✝² : OrderedSMul α ℝ
inst✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
r : ℝ
⊢ r ∈ {r | r ∈ Ioi 0 ∧ r⁻¹ • a • x ∈ s} ↔ r ∈ a • {r | r ∈ Ioi 0 ∧ r⁻¹ • x ∈ s}

Next tactic:
simp_rw [Set.mem_smul_set, Set.mem_sep_iff]
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  ext r
  simp_rw [Set.mem_smul_set, Set.mem_sep_iff]
  

Proof state:
case inr.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✝ : ℝ
α : Type u_4
inst✝⁴ : LinearOrderedField α
inst✝³ : MulActionWithZero α ℝ
inst✝² : OrderedSMul α ℝ
inst✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
r : ℝ
⊢ r ∈ Ioi 0 ∧ r⁻¹ • a • x ∈ s ↔ ∃ y, (y ∈ Ioi 0 ∧ y⁻¹ • x ∈ s) ∧ a • y = r

Next tactic:
constructor
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  ext r
  simp_rw [Set.mem_smul_set, Set.mem_sep_iff]
  constructor
  · 

Proof state:
case inr.e_a.h.mp
𝕜 : 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✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
r : ℝ
⊢ r ∈ Ioi 0 ∧ r⁻¹ • a • x ∈ s → ∃ y, (y ∈ Ioi 0 ∧ y⁻¹ • x ∈ s) ∧ a • y = r

Next tactic:
rintro ⟨hr, hx⟩
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  ext r
  simp_rw [Set.mem_smul_set, Set.mem_sep_iff]
  constructor
  · rintro ⟨hr, hx⟩
    

Proof state:
case inr.e_a.h.mp.intro
𝕜 : 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✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
r : ℝ
hr : r ∈ Ioi 0
hx : r⁻¹ • a • x ∈ s
⊢ ∃ y, (y ∈ Ioi 0 ∧ y⁻¹ • x ∈ s) ∧ a • y = r

Next tactic:
simp_rw [mem_Ioi] at hr ⊢
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  ext r
  simp_rw [Set.mem_smul_set, Set.mem_sep_iff]
  constructor
  · rintro ⟨hr, hx⟩
    simp_rw [mem_Ioi] at hr ⊢
    

Proof state:
case inr.e_a.h.mp.intro
𝕜 : 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✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
r : ℝ
hx : r⁻¹ • a • x ∈ s
hr : 0 < r
⊢ ∃ y, (0 < y ∧ y⁻¹ • x ∈ s) ∧ a • y = r

Next tactic:
rw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  ext r
  simp_rw [Set.mem_smul_set, Set.mem_sep_iff]
  constructor
  · rintro ⟨hr, hx⟩
    simp_rw [mem_Ioi] at hr ⊢
    rw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx
    

Proof state:
case inr.e_a.h.mp.intro
𝕜 : 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✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
r : ℝ
hx : a • x ∈ r • s
hr : 0 < r
⊢ ∃ y, (0 < y ∧ y⁻¹ • x ∈ s) ∧ a • y = r

Next tactic:
have := smul_pos (inv_pos.2 ha') hr
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  ext r
  simp_rw [Set.mem_smul_set, Set.mem_sep_iff]
  constructor
  · rintro ⟨hr, hx⟩
    simp_rw [mem_Ioi] at hr ⊢
    rw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx
    have := smul_pos (inv_pos.2 ha') hr
    

Proof state:
case inr.e_a.h.mp.intro
𝕜 : 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✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
r : ℝ
hx : a • x ∈ r • s
hr : 0 < r
this : 0 < a⁻¹ • r
⊢ ∃ y, (0 < y ∧ y⁻¹ • x ∈ s) ∧ a • y = r

Next tactic:
refine' ⟨a⁻¹ • r, ⟨this, _⟩, smul_inv_smul₀ ha'.ne' _⟩
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  ext r
  simp_rw [Set.mem_smul_set, Set.mem_sep_iff]
  constructor
  · rintro ⟨hr, hx⟩
    simp_rw [mem_Ioi] at hr ⊢
    rw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx
    have := smul_pos (inv_pos.2 ha') hr
    refine' ⟨a⁻¹ • r, ⟨this, _⟩, smul_inv_smul₀ ha'.ne' _⟩
    

Proof state:
case inr.e_a.h.mp.intro
𝕜 : 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✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
r : ℝ
hx : a • x ∈ r • s
hr : 0 < r
this : 0 < a⁻¹ • r
⊢ (a⁻¹ • r)⁻¹ • x ∈ s

Next tactic:
rwa [← mem_smul_set_iff_inv_smul_mem₀ this.ne', smul_assoc,
      mem_smul_set_iff_inv_smul_mem₀ (inv_ne_zero ha'.ne'), inv_inv]
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  ext r
  simp_rw [Set.mem_smul_set, Set.mem_sep_iff]
  constructor
  · rintro ⟨hr, hx⟩
    simp_rw [mem_Ioi] at hr ⊢
    rw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx
    have := smul_pos (inv_pos.2 ha') hr
    refine' ⟨a⁻¹ • r, ⟨this, _⟩, smul_inv_smul₀ ha'.ne' _⟩
    rwa [← mem_smul_set_iff_inv_smul_mem₀ this.ne', smul_assoc,
      mem_smul_set_iff_inv_smul_mem₀ (inv_ne_zero ha'.ne'), inv_inv]
  · 

Proof state:
case inr.e_a.h.mpr
𝕜 : 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✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
r : ℝ
⊢ (∃ y, (y ∈ Ioi 0 ∧ y⁻¹ • x ∈ s) ∧ a • y = r) → r ∈ Ioi 0 ∧ r⁻¹ • a • x ∈ s

Next tactic:
rintro ⟨r, ⟨hr, hx⟩, rfl⟩
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  ext r
  simp_rw [Set.mem_smul_set, Set.mem_sep_iff]
  constructor
  · rintro ⟨hr, hx⟩
    simp_rw [mem_Ioi] at hr ⊢
    rw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx
    have := smul_pos (inv_pos.2 ha') hr
    refine' ⟨a⁻¹ • r, ⟨this, _⟩, smul_inv_smul₀ ha'.ne' _⟩
    rwa [← mem_smul_set_iff_inv_smul_mem₀ this.ne', smul_assoc,
      mem_smul_set_iff_inv_smul_mem₀ (inv_ne_zero ha'.ne'), inv_inv]
  · rintro ⟨r, ⟨hr, hx⟩, rfl⟩
    

Proof state:
case inr.e_a.h.mpr.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✝ : ℝ
α : Type u_4
inst✝⁴ : LinearOrderedField α
inst✝³ : MulActionWithZero α ℝ
inst✝² : OrderedSMul α ℝ
inst✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
r : ℝ
hr : r ∈ Ioi 0
hx : r⁻¹ • x ∈ s
⊢ a • r ∈ Ioi 0 ∧ (a • r)⁻¹ • a • x ∈ s

Next tactic:
rw [mem_Ioi] at hr ⊢
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  ext r
  simp_rw [Set.mem_smul_set, Set.mem_sep_iff]
  constructor
  · rintro ⟨hr, hx⟩
    simp_rw [mem_Ioi] at hr ⊢
    rw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx
    have := smul_pos (inv_pos.2 ha') hr
    refine' ⟨a⁻¹ • r, ⟨this, _⟩, smul_inv_smul₀ ha'.ne' _⟩
    rwa [← mem_smul_set_iff_inv_smul_mem₀ this.ne', smul_assoc,
      mem_smul_set_iff_inv_smul_mem₀ (inv_ne_zero ha'.ne'), inv_inv]
  · rintro ⟨r, ⟨hr, hx⟩, rfl⟩
    rw [mem_Ioi] at hr ⊢
    

Proof state:
case inr.e_a.h.mpr.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✝ : ℝ
α : Type u_4
inst✝⁴ : LinearOrderedField α
inst✝³ : MulActionWithZero α ℝ
inst✝² : OrderedSMul α ℝ
inst✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
r : ℝ
hr : 0 < r
hx : r⁻¹ • x ∈ s
⊢ 0 < a • r ∧ (a • r)⁻¹ • a • x ∈ s

Next tactic:
rw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  ext r
  simp_rw [Set.mem_smul_set, Set.mem_sep_iff]
  constructor
  · rintro ⟨hr, hx⟩
    simp_rw [mem_Ioi] at hr ⊢
    rw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx
    have := smul_pos (inv_pos.2 ha') hr
    refine' ⟨a⁻¹ • r, ⟨this, _⟩, smul_inv_smul₀ ha'.ne' _⟩
    rwa [← mem_smul_set_iff_inv_smul_mem₀ this.ne', smul_assoc,
      mem_smul_set_iff_inv_smul_mem₀ (inv_ne_zero ha'.ne'), inv_inv]
  · rintro ⟨r, ⟨hr, hx⟩, rfl⟩
    rw [mem_Ioi] at hr ⊢
    rw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx
    

Proof state:
case inr.e_a.h.mpr.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✝ : ℝ
α : Type u_4
inst✝⁴ : LinearOrderedField α
inst✝³ : MulActionWithZero α ℝ
inst✝² : OrderedSMul α ℝ
inst✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
r : ℝ
hr : 0 < r
hx : x ∈ r • s
⊢ 0 < a • r ∧ (a • r)⁻¹ • a • x ∈ s

Next tactic:
have := smul_pos ha' hr
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  ext r
  simp_rw [Set.mem_smul_set, Set.mem_sep_iff]
  constructor
  · rintro ⟨hr, hx⟩
    simp_rw [mem_Ioi] at hr ⊢
    rw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx
    have := smul_pos (inv_pos.2 ha') hr
    refine' ⟨a⁻¹ • r, ⟨this, _⟩, smul_inv_smul₀ ha'.ne' _⟩
    rwa [← mem_smul_set_iff_inv_smul_mem₀ this.ne', smul_assoc,
      mem_smul_set_iff_inv_smul_mem₀ (inv_ne_zero ha'.ne'), inv_inv]
  · rintro ⟨r, ⟨hr, hx⟩, rfl⟩
    rw [mem_Ioi] at hr ⊢
    rw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx
    have := smul_pos ha' hr
    

Proof state:
case inr.e_a.h.mpr.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✝ : ℝ
α : Type u_4
inst✝⁴ : LinearOrderedField α
inst✝³ : MulActionWithZero α ℝ
inst✝² : OrderedSMul α ℝ
inst✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
r : ℝ
hr : 0 < r
hx : x ∈ r • s
this : 0 < a • r
⊢ 0 < a • r ∧ (a • r)⁻¹ • a • x ∈ s

Next tactic:
refine' ⟨this, _⟩
theorem gauge_smul_of_nonneg [MulActionWithZero α E] [IsScalarTower α ℝ (Set E)] {s : Set E} {a : α}
    (ha : 0 ≤ a) (x : E) : gauge s (a • x) = a • gauge s x := by
  obtain rfl | ha' := ha.eq_or_lt
  · rw [zero_smul, gauge_zero, zero_smul]
  rw [gauge_def', gauge_def', ← Real.sInf_smul_of_nonneg ha]
  congr 1
  ext r
  simp_rw [Set.mem_smul_set, Set.mem_sep_iff]
  constructor
  · rintro ⟨hr, hx⟩
    simp_rw [mem_Ioi] at hr ⊢
    rw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx
    have := smul_pos (inv_pos.2 ha') hr
    refine' ⟨a⁻¹ • r, ⟨this, _⟩, smul_inv_smul₀ ha'.ne' _⟩
    rwa [← mem_smul_set_iff_inv_smul_mem₀ this.ne', smul_assoc,
      mem_smul_set_iff_inv_smul_mem₀ (inv_ne_zero ha'.ne'), inv_inv]
  · rintro ⟨r, ⟨hr, hx⟩, rfl⟩
    rw [mem_Ioi] at hr ⊢
    rw [← mem_smul_set_iff_inv_smul_mem₀ hr.ne'] at hx
    have := smul_pos ha' hr
    refine' ⟨this, _⟩
    

Proof state:
case inr.e_a.h.mpr.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✝ : ℝ
α : Type u_4
inst✝⁴ : LinearOrderedField α
inst✝³ : MulActionWithZero α ℝ
inst✝² : OrderedSMul α ℝ
inst✝¹ : MulActionWithZero α E
inst✝ : IsScalarTower α ℝ (Set E)
s : Set E
a : α
ha : 0 ≤ a
x : E
ha' : 0 < a
r : ℝ
hr : 0 < r
hx : x ∈ r • s
this : 0 < a • r
⊢ (a • r)⁻¹ • a • x ∈ s

Next tactic:
rw [← mem_smul_set_iff_inv_smul_mem₀ this.ne', smul_assoc]