-- Lean 4 proof step from Mathlib.Analysis.Convex.Between (goal)
Goal:
R : Type u_1
V : Type u_2
P : Type u_4
inst : Ring R
inst_1 : LinearOrder R
inst_2 : IsStrictOrderedRing R
inst_3 : AddCommGroup V
inst_4 : Module R V
inst_5 : AddTorsor V P
inst_6 : IsTorsionFree R V
t : Affine.Triangle R P
i₁ i₂ i₃ : Fin 3
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
h3 : ∀ (i : Fin 3), i = i₁ ∨ i = i₂ ∨ i = i₃
hu : Eq (α := Finset (Fin 3)) Finset.univ {i₁, i₂, i₃}
r₁ : R
hr₁0 : 0 < r₁
hr₁1 : r₁ < 1
h₁ : Sbtw R (t.points i₂) ((lineMap (t.points i₂) (t.points i₃) : (a : R) → P) r₁) (t.points i₃)
r₂ : R
hr₂0 : 0 < r₂
hr₂1 : r₂ < 1
h₂ : Sbtw R (t.points i₁) ((lineMap (t.points i₁) (t.points i₃) : (a : R) → P) r₂) (t.points i₃)
w : Fin (HAdd.hAdd (α := ℕ) 2 1) → R
hw : Eq.{u_1 + 1} (α := R) (∑ i ∈ {i₁, i₂, i₃}, w i) 1
hp :
  Membership.mem (α := P) (γ := AffineSubspace R P) (affineSpan R (Set.range t.points))
    ((Finset.affineCombination R Finset.univ t.points : (a : Fin (2 + 1) → R) → P) w : P)
h₁' :
  Membership.mem (α := P) (γ := AffineSubspace R P)
    (affineSpan R
      (insert (α := P)
        ((Finset.affineCombination R Finset.univ t.points : (a : Fin (2 + 1) → R) → P)
            (Pi.single (M := fun (a : Fin (HAdd.hAdd (α := ℕ) 2 1)) ↦ R) i₁ 1) :
          P)
        (singleton (α := P)
          ((Finset.affineCombination R Finset.univ t.points : (a : Fin (2 + 1) → R) → P)
              (Finset.affineCombinationLineMapWeights i₂ i₃ r₁) :
            P))))
    ((Finset.affineCombination R Finset.univ t.points : (a : Fin (2 + 1) → R) → P) w : P)
h₂' :
  Membership.mem (α := P) (γ := AffineSubspace R P)
    (affineSpan R
      (insert (t.points i₂) (singleton (α := P) ((lineMap (t.points i₁) (t.points i₃) : (a : R) → P) r₂ : P))))
    ((Finset.affineCombination R Finset.univ t.points : (a : Fin (2 + 1) → R) → P) w : P)
h₁s :
  Eq (α := SignType) ((SignType.sign : (a : R) → SignType) (w i₂) : SignType)
    ((SignType.sign : (a : R) → SignType) (w i₃) : SignType)
h₂s :
  Eq (α := SignType) ((SignType.sign : (a : R) → SignType) (w i₁) : SignType)
    ((SignType.sign : (a : R) → SignType) (w i₃) : SignType)
hss : Eq (α := SignType) ((SignType.sign : (a : R) → SignType) (w i₃) : SignType) (1 : SignType)
hs' :
  Eq (α := SignType) ((SignType.sign : (a : R) → SignType) (∑ i : Fin 3, w i) : SignType)
    ((SignType.sign : (a : R) → SignType) (w i₃) : SignType)
hs : ∀ (i : Fin 3), 0 < w i
⊢ w i₁ < 1
have rw : ∀ (hw : w i₁ + (w i₂ + w i₃) = 1)
  (hp :
    Membership.mem (α := P) (γ := AffineSubspace R P) (affineSpan R (Set.range t.points))
      ((Finset.affineCombination R Finset.univ t.points : (a : Fin (2 + 1) → R) → P) w : P))
  (h₁' :
    Membership.mem (α := P) (γ := AffineSubspace R P)
      (affineSpan R
        (insert (α := P)
          ((Finset.affineCombination R Finset.univ t.points : (a : Fin (2 + 1) → R) → P)
              (Pi.single (M := fun (a : Fin (HAdd.hAdd (α := ℕ) 2 1)) ↦ R) i₁ 1) :
            P)
          (singleton (α := P)
            ((Finset.affineCombination R Finset.univ t.points : (a : Fin (2 + 1) → R) → P)
                (Finset.affineCombinationLineMapWeights i₂ i₃ r₁) :
              P))))
      ((Finset.affineCombination R Finset.univ t.points : (a : Fin (2 + 1) → R) → P) w : P))
  (h₂' :
    Membership.mem (α := P) (γ := AffineSubspace R P)
      (affineSpan R
        (insert (t.points i₂) (singleton (α := P) ((lineMap (t.points i₁) (t.points i₃) : (a : R) → P) r₂ : P))))
      ((Finset.affineCombination R Finset.univ t.points : (a : Fin (2 + 1) → R) → P) w : P))
  (h₁s :
    Eq (α := SignType) ((SignType.sign : (a : R) → SignType) (w i₂) : SignType)
      ((SignType.sign : (a : R) → SignType) (w i₃) : SignType))
  (h₂s :
    Eq (α := SignType) ((SignType.sign : (a : R) → SignType) (w i₁) : SignType)
      ((SignType.sign : (a : R) → SignType) (w i₃) : SignType))
  (hss : Eq (α := SignType) ((SignType.sign : (a : R) → SignType) (w i₃) : SignType) (1 : SignType))
  (hs' :
    Eq (α := SignType) ((SignType.sign : (a : R) → SignType) (∑ i : Fin 3, w i) : SignType)
      ((SignType.sign : (a : R) → SignType) (w i₃) : SignType))
  (hs : ∀ (i : Fin 3), 0 < w i), w i₁ < 1
Tactic: rw [Finset.sum_insert, Finset.sum_insert, Finset.sum_singleton] at hw
Cleared hypotheses: hw, hp, h₁', h₂', h₁s, h₂s, hss, hs', hs