l3lab/ntp-mathlib huggingface dataset:
instance functorCategoryPreadditive : Preadditive (C ⥤ D)
    where
  homGroup F G :=
    { add := fun α β => { app := fun X => α.app X + β.app X }
      zero := { app := fun X => 0 }
      neg := fun α => { app := fun X => -α.app X }
      sub := fun α β => { app := fun X => α.app X - β.app X }
      add_assoc := by
        intros
        ext
        apply add_assoc
      zero_add := by
        intros
        ext
        apply zero_add
      add_zero := by
        intros
        ext
        apply add_zero
      add_comm := by
        intros
        ext
        

Proof state:
case w.h
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.38, u_1} C
inst✝¹ : Category.{?u.42, u_2} D
inst✝ : Preadditive D
F G : C ⥤ D
a✝ b✝ : F ⟶ G
x✝ : C
⊢ (a✝ + b✝).app x✝ = (b✝ + a✝).app x✝

Next tactic:
apply add_comm
instance functorCategoryPreadditive : Preadditive (C ⥤ D)
    where
  homGroup F G :=
    { add := fun α β => { app := fun X => α.app X + β.app X }
      zero := { app := fun X => 0 }
      neg := fun α => { app := fun X => -α.app X }
      sub := fun α β => { app := fun X => α.app X - β.app X }
      add_assoc := by
        intros
        ext
        apply add_assoc
      zero_add := by
        intros
        ext
        apply zero_add
      add_zero := by
        intros
        ext
        apply add_zero
      add_comm := by
        intros
        ext
        apply add_comm
      sub_eq_add_neg := by
        intros
        ext
        apply sub_eq_add_neg
      add_left_neg := by
        intros
        ext
        apply add_left_neg }
  add_comp := by
    

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.38, u_1} C
inst✝¹ : Category.{?u.42, u_2} D
inst✝ : Preadditive D
⊢ ∀ (P Q R : C ⥤ D) (f f' : P ⟶ Q) (g : Q ⟶ R), (f + f') ≫ g = f ≫ g + f' ≫ g

Next tactic:
intros
instance functorCategoryPreadditive : Preadditive (C ⥤ D)
    where
  homGroup F G :=
    { add := fun α β => { app := fun X => α.app X + β.app X }
      zero := { app := fun X => 0 }
      neg := fun α => { app := fun X => -α.app X }
      sub := fun α β => { app := fun X => α.app X - β.app X }
      add_assoc := by
        intros
        ext
        apply add_assoc
      zero_add := by
        intros
        ext
        apply zero_add
      add_zero := by
        intros
        ext
        apply add_zero
      add_comm := by
        intros
        ext
        apply add_comm
      sub_eq_add_neg := by
        intros
        ext
        apply sub_eq_add_neg
      add_left_neg := by
        intros
        ext
        apply add_left_neg }
  add_comp := by
    intros
    

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.38, u_1} C
inst✝¹ : Category.{?u.42, u_2} D
inst✝ : Preadditive D
P✝ Q✝ R✝ : C ⥤ D
f✝ f'✝ : P✝ ⟶ Q✝
g✝ : Q✝ ⟶ R✝
⊢ (f✝ + f'✝) ≫ g✝ = f✝ ≫ g✝ + f'✝ ≫ g✝

Next tactic:
ext
instance functorCategoryPreadditive : Preadditive (C ⥤ D)
    where
  homGroup F G :=
    { add := fun α β => { app := fun X => α.app X + β.app X }
      zero := { app := fun X => 0 }
      neg := fun α => { app := fun X => -α.app X }
      sub := fun α β => { app := fun X => α.app X - β.app X }
      add_assoc := by
        intros
        ext
        apply add_assoc
      zero_add := by
        intros
        ext
        apply zero_add
      add_zero := by
        intros
        ext
        apply add_zero
      add_comm := by
        intros
        ext
        apply add_comm
      sub_eq_add_neg := by
        intros
        ext
        apply sub_eq_add_neg
      add_left_neg := by
        intros
        ext
        apply add_left_neg }
  add_comp := by
    intros
    ext
    

Proof state:
case w.h
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.38, u_1} C
inst✝¹ : Category.{?u.42, u_2} D
inst✝ : Preadditive D
P✝ Q✝ R✝ : C ⥤ D
f✝ f'✝ : P✝ ⟶ Q✝
g✝ : Q✝ ⟶ R✝
x✝ : C
⊢ ((f✝ + f'✝) ≫ g✝).app x✝ = (f✝ ≫ g✝ + f'✝ ≫ g✝).app x✝

Next tactic:
apply add_comp
instance functorCategoryPreadditive : Preadditive (C ⥤ D)
    where
  homGroup F G :=
    { add := fun α β => { app := fun X => α.app X + β.app X }
      zero := { app := fun X => 0 }
      neg := fun α => { app := fun X => -α.app X }
      sub := fun α β => { app := fun X => α.app X - β.app X }
      add_assoc := by
        intros
        ext
        apply add_assoc
      zero_add := by
        intros
        ext
        apply zero_add
      add_zero := by
        intros
        ext
        apply add_zero
      add_comm := by
        intros
        ext
        apply add_comm
      sub_eq_add_neg := by
        intros
        ext
        apply sub_eq_add_neg
      add_left_neg := by
        intros
        ext
        apply add_left_neg }
  add_comp := by
    intros
    ext
    apply add_comp
  comp_add := by
    

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.38, u_1} C
inst✝¹ : Category.{?u.42, u_2} D
inst✝ : Preadditive D
⊢ ∀ (P Q R : C ⥤ D) (f : P ⟶ Q) (g g' : Q ⟶ R), f ≫ (g + g') = f ≫ g + f ≫ g'

Next tactic:
intros
instance functorCategoryPreadditive : Preadditive (C ⥤ D)
    where
  homGroup F G :=
    { add := fun α β => { app := fun X => α.app X + β.app X }
      zero := { app := fun X => 0 }
      neg := fun α => { app := fun X => -α.app X }
      sub := fun α β => { app := fun X => α.app X - β.app X }
      add_assoc := by
        intros
        ext
        apply add_assoc
      zero_add := by
        intros
        ext
        apply zero_add
      add_zero := by
        intros
        ext
        apply add_zero
      add_comm := by
        intros
        ext
        apply add_comm
      sub_eq_add_neg := by
        intros
        ext
        apply sub_eq_add_neg
      add_left_neg := by
        intros
        ext
        apply add_left_neg }
  add_comp := by
    intros
    ext
    apply add_comp
  comp_add := by
    intros
    

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.38, u_1} C
inst✝¹ : Category.{?u.42, u_2} D
inst✝ : Preadditive D
P✝ Q✝ R✝ : C ⥤ D
f✝ : P✝ ⟶ Q✝
g✝ g'✝ : Q✝ ⟶ R✝
⊢ f✝ ≫ (g✝ + g'✝) = f✝ ≫ g✝ + f✝ ≫ g'✝

Next tactic:
ext
instance functorCategoryPreadditive : Preadditive (C ⥤ D)
    where
  homGroup F G :=
    { add := fun α β => { app := fun X => α.app X + β.app X }
      zero := { app := fun X => 0 }
      neg := fun α => { app := fun X => -α.app X }
      sub := fun α β => { app := fun X => α.app X - β.app X }
      add_assoc := by
        intros
        ext
        apply add_assoc
      zero_add := by
        intros
        ext
        apply zero_add
      add_zero := by
        intros
        ext
        apply add_zero
      add_comm := by
        intros
        ext
        apply add_comm
      sub_eq_add_neg := by
        intros
        ext
        apply sub_eq_add_neg
      add_left_neg := by
        intros
        ext
        apply add_left_neg }
  add_comp := by
    intros
    ext
    apply add_comp
  comp_add := by
    intros
    ext
    

Proof state:
case w.h
C : Type u_1
D : Type u_2
inst✝² : Category.{?u.38, u_1} C
inst✝¹ : Category.{?u.42, u_2} D
inst✝ : Preadditive D
P✝ Q✝ R✝ : C ⥤ D
f✝ : P✝ ⟶ Q✝
g✝ g'✝ : Q✝ ⟶ R✝
x✝ : C
⊢ (f✝ ≫ (g✝ + g'✝)).app x✝ = (f✝ ≫ g✝ + f✝ ≫ g'✝).app x✝

Next tactic:
apply comp_add
@[simp]
theorem app_sum {ι : Type*} (s : Finset ι) (X : C) (α : ι → (F ⟶ G)) :
    (∑ i in s, α i).app X = ∑ i in s, (α i).app X := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝² : Category.{u_5, u_1} C
inst✝¹ : Category.{u_4, u_2} D
inst✝ : Preadditive D
F G : C ⥤ D
ι : Type u_3
s : Finset ι
X : C
α : ι → (F ⟶ G)
⊢ (∑ i in s, α i).app X = ∑ i in s, (α i).app X

Next tactic:
simp only [← appHom_apply, map_sum]
/-- A closed ball in a strictly convex space is strictly convex. -/
theorem strictConvex_closedBall [StrictConvexSpace 𝕜 E] (x : E) (r : ℝ) :
    StrictConvex 𝕜 (closedBall x r) := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : StrictConvexSpace 𝕜 E
x : E
r : ℝ
⊢ StrictConvex 𝕜 (closedBall x r)

Next tactic:
rcases le_or_lt r 0 with hr | hr
/-- A closed ball in a strictly convex space is strictly convex. -/
theorem strictConvex_closedBall [StrictConvexSpace 𝕜 E] (x : E) (r : ℝ) :
    StrictConvex 𝕜 (closedBall x r) := by
  rcases le_or_lt r 0 with hr | hr
  · 

Proof state:
case inl
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : StrictConvexSpace 𝕜 E
x : E
r : ℝ
hr : r ≤ 0
⊢ StrictConvex 𝕜 (closedBall x r)

Next tactic:
exact (subsingleton_closedBall x hr).strictConvex
/-- A closed ball in a strictly convex space is strictly convex. -/
theorem strictConvex_closedBall [StrictConvexSpace 𝕜 E] (x : E) (r : ℝ) :
    StrictConvex 𝕜 (closedBall x r) := by
  rcases le_or_lt r 0 with hr | hr
  · exact (subsingleton_closedBall x hr).strictConvex
  

Proof state:
case inr
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : StrictConvexSpace 𝕜 E
x : E
r : ℝ
hr : 0 < r
⊢ StrictConvex 𝕜 (closedBall x r)

Next tactic:
rw [← vadd_closedBall_zero]
/-- A closed ball in a strictly convex space is strictly convex. -/
theorem strictConvex_closedBall [StrictConvexSpace 𝕜 E] (x : E) (r : ℝ) :
    StrictConvex 𝕜 (closedBall x r) := by
  rcases le_or_lt r 0 with hr | hr
  · exact (subsingleton_closedBall x hr).strictConvex
  rw [← vadd_closedBall_zero]
  

Proof state:
case inr
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : StrictConvexSpace 𝕜 E
x : E
r : ℝ
hr : 0 < r
⊢ StrictConvex 𝕜 (x +ᵥ closedBall 0 r)

Next tactic:
exact (StrictConvexSpace.strictConvex_closedBall r hr).vadd _
/-- A real normed vector space is strictly convex provided that the unit ball is strictly convex. -/
theorem StrictConvexSpace.of_strictConvex_closed_unit_ball [LinearMap.CompatibleSMul E E 𝕜 ℝ]
    (h : StrictConvex 𝕜 (closedBall (0 : E) 1)) : StrictConvexSpace 𝕜 E :=
  ⟨fun r hr => by 

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝⁴ : NormedLinearOrderedField 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
inst✝¹ : NormedSpace ℝ E
inst✝ : LinearMap.CompatibleSMul E E 𝕜 ℝ
h : StrictConvex 𝕜 (closedBall 0 1)
r : ℝ
hr : 0 < r
⊢ StrictConvex 𝕜 (closedBall 0 r)

Next tactic:
simpa only [smul_closedUnitBall_of_nonneg hr.le] using h.smul r
/-- Strict convexity is equivalent to `‖a • x + b • y‖ < 1` for all `x` and `y` of norm at most `1`
and all strictly positive `a` and `b` such that `a + b = 1`. This lemma shows that it suffices to
check this for points of norm one and some `a`, `b` such that `a + b = 1`. -/
theorem StrictConvexSpace.of_norm_combo_lt_one
    (h : ∀ x y : E, ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b : ℝ, a + b = 1 ∧ ‖a • x + b • y‖ < 1) :
    StrictConvexSpace ℝ E := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b, a + b = 1 ∧ ‖a • x + b • y‖ < 1
⊢ StrictConvexSpace ℝ E

Next tactic:
refine'
    StrictConvexSpace.of_strictConvex_closed_unit_ball ℝ
      ((convex_closedBall _ _).strictConvex' fun x hx y hy hne => _)
/-- Strict convexity is equivalent to `‖a • x + b • y‖ < 1` for all `x` and `y` of norm at most `1`
and all strictly positive `a` and `b` such that `a + b = 1`. This lemma shows that it suffices to
check this for points of norm one and some `a`, `b` such that `a + b = 1`. -/
theorem StrictConvexSpace.of_norm_combo_lt_one
    (h : ∀ x y : E, ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b : ℝ, a + b = 1 ∧ ‖a • x + b • y‖ < 1) :
    StrictConvexSpace ℝ E := by
  refine'
    StrictConvexSpace.of_strictConvex_closed_unit_ball ℝ
      ((convex_closedBall _ _).strictConvex' fun x hx y hy hne => _)
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b, a + b = 1 ∧ ‖a • x + b • y‖ < 1
x : E
hx : x ∈ closedBall 0 1 \ interior (closedBall 0 1)
y : E
hy : y ∈ closedBall 0 1 \ interior (closedBall 0 1)
hne : x ≠ y
⊢ (fun x y => ∃ c, (AffineMap.lineMap x y) c ∈ interior (closedBall 0 1)) x y

Next tactic:
rw [interior_closedBall (0 : E) one_ne_zero, closedBall_diff_ball,
    mem_sphere_zero_iff_norm] at hx hy
/-- Strict convexity is equivalent to `‖a • x + b • y‖ < 1` for all `x` and `y` of norm at most `1`
and all strictly positive `a` and `b` such that `a + b = 1`. This lemma shows that it suffices to
check this for points of norm one and some `a`, `b` such that `a + b = 1`. -/
theorem StrictConvexSpace.of_norm_combo_lt_one
    (h : ∀ x y : E, ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b : ℝ, a + b = 1 ∧ ‖a • x + b • y‖ < 1) :
    StrictConvexSpace ℝ E := by
  refine'
    StrictConvexSpace.of_strictConvex_closed_unit_ball ℝ
      ((convex_closedBall _ _).strictConvex' fun x hx y hy hne => _)
  rw [interior_closedBall (0 : E) one_ne_zero, closedBall_diff_ball,
    mem_sphere_zero_iff_norm] at hx hy
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b, a + b = 1 ∧ ‖a • x + b • y‖ < 1
x : E
hx : ‖x‖ = 1
y : E
hy : ‖y‖ = 1
hne : x ≠ y
⊢ ∃ c, (AffineMap.lineMap x y) c ∈ interior (closedBall 0 1)

Next tactic:
rcases h x y hx hy hne with ⟨a, b, hab, hlt⟩
/-- Strict convexity is equivalent to `‖a • x + b • y‖ < 1` for all `x` and `y` of norm at most `1`
and all strictly positive `a` and `b` such that `a + b = 1`. This lemma shows that it suffices to
check this for points of norm one and some `a`, `b` such that `a + b = 1`. -/
theorem StrictConvexSpace.of_norm_combo_lt_one
    (h : ∀ x y : E, ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b : ℝ, a + b = 1 ∧ ‖a • x + b • y‖ < 1) :
    StrictConvexSpace ℝ E := by
  refine'
    StrictConvexSpace.of_strictConvex_closed_unit_ball ℝ
      ((convex_closedBall _ _).strictConvex' fun x hx y hy hne => _)
  rw [interior_closedBall (0 : E) one_ne_zero, closedBall_diff_ball,
    mem_sphere_zero_iff_norm] at hx hy
  rcases h x y hx hy hne with ⟨a, b, hab, hlt⟩
  

Proof state:
case intro.intro.intro
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b, a + b = 1 ∧ ‖a • x + b • y‖ < 1
x : E
hx : ‖x‖ = 1
y : E
hy : ‖y‖ = 1
hne : x ≠ y
a b : ℝ
hab : a + b = 1
hlt : ‖a • x + b • y‖ < 1
⊢ ∃ c, (AffineMap.lineMap x y) c ∈ interior (closedBall 0 1)

Next tactic:
use b
/-- Strict convexity is equivalent to `‖a • x + b • y‖ < 1` for all `x` and `y` of norm at most `1`
and all strictly positive `a` and `b` such that `a + b = 1`. This lemma shows that it suffices to
check this for points of norm one and some `a`, `b` such that `a + b = 1`. -/
theorem StrictConvexSpace.of_norm_combo_lt_one
    (h : ∀ x y : E, ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b : ℝ, a + b = 1 ∧ ‖a • x + b • y‖ < 1) :
    StrictConvexSpace ℝ E := by
  refine'
    StrictConvexSpace.of_strictConvex_closed_unit_ball ℝ
      ((convex_closedBall _ _).strictConvex' fun x hx y hy hne => _)
  rw [interior_closedBall (0 : E) one_ne_zero, closedBall_diff_ball,
    mem_sphere_zero_iff_norm] at hx hy
  rcases h x y hx hy hne with ⟨a, b, hab, hlt⟩
  use b
  

Proof state:
case h
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b, a + b = 1 ∧ ‖a • x + b • y‖ < 1
x : E
hx : ‖x‖ = 1
y : E
hy : ‖y‖ = 1
hne : x ≠ y
a b : ℝ
hab : a + b = 1
hlt : ‖a • x + b • y‖ < 1
⊢ (AffineMap.lineMap x y) b ∈ interior (closedBall 0 1)

Next tactic:
rwa [AffineMap.lineMap_apply_module, interior_closedBall (0 : E) one_ne_zero, mem_ball_zero_iff,
    sub_eq_iff_eq_add.2 hab.symm]
theorem StrictConvexSpace.of_norm_combo_ne_one
    (h :
      ∀ x y : E,
        ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b : ℝ, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ ‖a • x + b • y‖ ≠ 1) :
    StrictConvexSpace ℝ E := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ ‖a • x + b • y‖ ≠ 1
⊢ StrictConvexSpace ℝ E

Next tactic:
refine' StrictConvexSpace.of_strictConvex_closed_unit_ball ℝ
    ((convex_closedBall _ _).strictConvex _)
theorem StrictConvexSpace.of_norm_combo_ne_one
    (h :
      ∀ x y : E,
        ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b : ℝ, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ ‖a • x + b • y‖ ≠ 1) :
    StrictConvexSpace ℝ E := by
  refine' StrictConvexSpace.of_strictConvex_closed_unit_ball ℝ
    ((convex_closedBall _ _).strictConvex _)
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ ‖a • x + b • y‖ ≠ 1
⊢ Set.Pairwise (closedBall 0 1 \ interior (closedBall 0 1)) fun x y =>
    Set.Nonempty ([x-[ℝ]y] \ frontier (closedBall 0 1))

Next tactic:
simp only [interior_closedBall _ one_ne_zero, closedBall_diff_ball, Set.Pairwise,
    frontier_closedBall _ one_ne_zero, mem_sphere_zero_iff_norm]
theorem StrictConvexSpace.of_norm_combo_ne_one
    (h :
      ∀ x y : E,
        ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b : ℝ, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ ‖a • x + b • y‖ ≠ 1) :
    StrictConvexSpace ℝ E := by
  refine' StrictConvexSpace.of_strictConvex_closed_unit_ball ℝ
    ((convex_closedBall _ _).strictConvex _)
  simp only [interior_closedBall _ one_ne_zero, closedBall_diff_ball, Set.Pairwise,
    frontier_closedBall _ one_ne_zero, mem_sphere_zero_iff_norm]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ ‖a • x + b • y‖ ≠ 1
⊢ ∀ ⦃x : E⦄, ‖x‖ = 1 → ∀ ⦃y : E⦄, ‖y‖ = 1 → x ≠ y → Set.Nonempty ([x-[ℝ]y] \ sphere 0 1)

Next tactic:
intro x hx y hy hne
theorem StrictConvexSpace.of_norm_combo_ne_one
    (h :
      ∀ x y : E,
        ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b : ℝ, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ ‖a • x + b • y‖ ≠ 1) :
    StrictConvexSpace ℝ E := by
  refine' StrictConvexSpace.of_strictConvex_closed_unit_ball ℝ
    ((convex_closedBall _ _).strictConvex _)
  simp only [interior_closedBall _ one_ne_zero, closedBall_diff_ball, Set.Pairwise,
    frontier_closedBall _ one_ne_zero, mem_sphere_zero_iff_norm]
  intro x hx y hy hne
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ ‖a • x + b • y‖ ≠ 1
x : E
hx : ‖x‖ = 1
y : E
hy : ‖y‖ = 1
hne : x ≠ y
⊢ Set.Nonempty ([x-[ℝ]y] \ sphere 0 1)

Next tactic:
rcases h x y hx hy hne with ⟨a, b, ha, hb, hab, hne'⟩
theorem StrictConvexSpace.of_norm_combo_ne_one
    (h :
      ∀ x y : E,
        ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b : ℝ, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ ‖a • x + b • y‖ ≠ 1) :
    StrictConvexSpace ℝ E := by
  refine' StrictConvexSpace.of_strictConvex_closed_unit_ball ℝ
    ((convex_closedBall _ _).strictConvex _)
  simp only [interior_closedBall _ one_ne_zero, closedBall_diff_ball, Set.Pairwise,
    frontier_closedBall _ one_ne_zero, mem_sphere_zero_iff_norm]
  intro x hx y hy hne
  rcases h x y hx hy hne with ⟨a, b, ha, hb, hab, hne'⟩
  

Proof state:
case intro.intro.intro.intro.intro
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ∃ a b, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ ‖a • x + b • y‖ ≠ 1
x : E
hx : ‖x‖ = 1
y : E
hy : ‖y‖ = 1
hne : x ≠ y
a b : ℝ
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
hne' : ‖a • x + b • y‖ ≠ 1
⊢ Set.Nonempty ([x-[ℝ]y] \ sphere 0 1)

Next tactic:
exact ⟨_, ⟨a, b, ha, hb, hab, rfl⟩, mt mem_sphere_zero_iff_norm.1 hne'⟩
theorem StrictConvexSpace.of_norm_add_ne_two
    (h : ∀ ⦃x y : E⦄, ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ‖x + y‖ ≠ 2) : StrictConvexSpace ℝ E := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ ⦃x y : E⦄, ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ‖x + y‖ ≠ 2
⊢ StrictConvexSpace ℝ E

Next tactic:
refine'
    StrictConvexSpace.of_norm_combo_ne_one fun x y hx hy hne =>
      ⟨1 / 2, 1 / 2, one_half_pos.le, one_half_pos.le, add_halves _, _⟩
theorem StrictConvexSpace.of_norm_add_ne_two
    (h : ∀ ⦃x y : E⦄, ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ‖x + y‖ ≠ 2) : StrictConvexSpace ℝ E := by
  refine'
    StrictConvexSpace.of_norm_combo_ne_one fun x y hx hy hne =>
      ⟨1 / 2, 1 / 2, one_half_pos.le, one_half_pos.le, add_halves _, _⟩
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ ⦃x y : E⦄, ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ‖x + y‖ ≠ 2
x y : E
hx : ‖x‖ = 1
hy : ‖y‖ = 1
hne : x ≠ y
⊢ ‖(1 / 2) • x + (1 / 2) • y‖ ≠ 1

Next tactic:
rw [← smul_add, norm_smul, Real.norm_of_nonneg one_half_pos.le, one_div, ← div_eq_inv_mul, Ne.def,
    div_eq_one_iff_eq (two_ne_zero' ℝ)]
theorem StrictConvexSpace.of_norm_add_ne_two
    (h : ∀ ⦃x y : E⦄, ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ‖x + y‖ ≠ 2) : StrictConvexSpace ℝ E := by
  refine'
    StrictConvexSpace.of_norm_combo_ne_one fun x y hx hy hne =>
      ⟨1 / 2, 1 / 2, one_half_pos.le, one_half_pos.le, add_halves _, _⟩
  rw [← smul_add, norm_smul, Real.norm_of_nonneg one_half_pos.le, one_div, ← div_eq_inv_mul, Ne.def,
    div_eq_one_iff_eq (two_ne_zero' ℝ)]
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ ⦃x y : E⦄, ‖x‖ = 1 → ‖y‖ = 1 → x ≠ y → ‖x + y‖ ≠ 2
x y : E
hx : ‖x‖ = 1
hy : ‖y‖ = 1
hne : x ≠ y
⊢ ¬‖x + y‖ = 2

Next tactic:
exact h hx hy hne
/-- If `‖x + y‖ = ‖x‖ + ‖y‖` implies that `x y : E` are in the same ray, then `E` is a strictly
convex space. See also a more -/
theorem StrictConvexSpace.of_norm_add
    (h : ∀ x y : E, ‖x‖ = 1 → ‖y‖ = 1 → ‖x + y‖ = 2 → SameRay ℝ x y) : StrictConvexSpace ℝ E := by
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → ‖x + y‖ = 2 → SameRay ℝ x y
⊢ StrictConvexSpace ℝ E

Next tactic:
refine' StrictConvexSpace.of_pairwise_sphere_norm_ne_two fun x hx y hy => mt fun h₂ => _
/-- If `‖x + y‖ = ‖x‖ + ‖y‖` implies that `x y : E` are in the same ray, then `E` is a strictly
convex space. See also a more -/
theorem StrictConvexSpace.of_norm_add
    (h : ∀ x y : E, ‖x‖ = 1 → ‖y‖ = 1 → ‖x + y‖ = 2 → SameRay ℝ x y) : StrictConvexSpace ℝ E := by
  refine' StrictConvexSpace.of_pairwise_sphere_norm_ne_two fun x hx y hy => mt fun h₂ => _
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → ‖x + y‖ = 2 → SameRay ℝ x y
x : E
hx : x ∈ sphere 0 1
y : E
hy : y ∈ sphere 0 1
h₂ : ‖x + y‖ = 2
⊢ x = y

Next tactic:
rw [mem_sphere_zero_iff_norm] at hx hy
/-- If `‖x + y‖ = ‖x‖ + ‖y‖` implies that `x y : E` are in the same ray, then `E` is a strictly
convex space. See also a more -/
theorem StrictConvexSpace.of_norm_add
    (h : ∀ x y : E, ‖x‖ = 1 → ‖y‖ = 1 → ‖x + y‖ = 2 → SameRay ℝ x y) : StrictConvexSpace ℝ E := by
  refine' StrictConvexSpace.of_pairwise_sphere_norm_ne_two fun x hx y hy => mt fun h₂ => _
  rw [mem_sphere_zero_iff_norm] at hx hy
  

Proof state:
𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedLinearOrderedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
h : ∀ (x y : E), ‖x‖ = 1 → ‖y‖ = 1 → ‖x + y‖ = 2 → SameRay ℝ x y
x : E
hx : ‖x‖ = 1
y : E
hy : ‖y‖ = 1
h₂ : ‖x + y‖ = 2
⊢ x = y

Next tactic:
exact (sameRay_iff_of_norm_eq (hx.trans hy.symm)).1 (h x y hx hy h₂)