awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.Analysis.Convex.Between (hypothesis)
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 : Fin (2 + 1), 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 (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₂' :
  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)
⊢ Sbtw R (t.points i₁) ((Finset.affineCombination R Finset.univ t.points : (a : Fin (2 + 1) → R) → P) w)
    ((lineMap (t.points i₂) (t.points i₃) : (a : R) → P) r₁)
have h₂s : Eq (α := SignType) ((SignType.sign : (a : R) → SignType) (w i₁) : SignType)
  ((SignType.sign : (a : R) → SignType) (w i₃) : SignType)
Tactic: have h₂s :=
    sign_eq_of_affineCombination_mem_affineSpan_single_lineMap t.independent hw (Finset.mem_univ _)
      (Finset.mem_univ _) (Finset.mem_univ _) h₁₂.symm h₂₃ h₁₃ hr₂0 hr₂1 h₂'
-- 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 : Fin (2 + 1), 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)
⊢ Sbtw.{u_1, u_2, u_4} R (P := 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)
    ((Finset.affineCombination R Finset.univ t.points : (a : Fin (2 + 1) → R) → P) w : P)
    ((Finset.affineCombination R Finset.univ t.points : (a : Fin (2 + 1) → R) → P)
        (Finset.affineCombinationLineMapWeights i₂ i₃ r₁) :
      P)
have hw₁ : Sbtw R (Pi.single (M := fun (a : Fin (HAdd.hAdd (α := ℕ) 2 1)) ↦ R) i₁ 1 i₁) (w i₁)
  (Finset.affineCombinationLineMapWeights i₂ i₃ r₁ i₁)
Tactic: refine
    Sbtw.affineCombination_of_mem_affineSpan_pair t.independent hw (Fintype.sum_pi_single' _ _)
      (Finset.univ.sum_affineCombinationLineMapWeights (Finset.mem_univ _) (Finset.mem_univ _) _)
      h₁' (Finset.mem_univ i₁) ?_
-- 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 : Fin (2 + 1), 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)
⊢ Sbtw R (Pi.single (M := fun (a : Fin (HAdd.hAdd (α := ℕ) 2 1)) ↦ R) i₁ 1 i₁) (w i₁)
    (Finset.affineCombinationLineMapWeights i₂ i₃ r₁ i₁)
have rw : Membership.mem (γ := Set R) (Set.Ioo 0 1) (w i₁)
Tactic: rw [Pi.single_eq_same,
    Finset.affineCombinationLineMapWeights_apply_of_ne h₁₂ h₁₃, sbtw_one_zero_iff]
-- Lean 4 proof step from Mathlib.Analysis.Convex.Between (hypothesis)
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 : Fin (2 + 1), 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)
⊢ Membership.mem (γ := Set R) (Set.Ioo 0 1) (w i₁)
have hs : ∀ (i : Fin 3),
  Eq (α := SignType) ((SignType.sign : (a : R) → SignType) (w i) : SignType)
    ((SignType.sign : (a : R) → SignType) (w i₃) : SignType)
Tactic: have hs : ∀ i : Fin 3, SignType.sign (w i) = SignType.sign (w i₃) := by
    intro i
    rcases h3 i with (rfl | rfl | rfl)
    · exact h₂s
    · exact h₁s
    · rfl
-- Lean 4 proof step from Mathlib.Analysis.Convex.Between (hypothesis)
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 : Fin (2 + 1), 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)
hs :
  ∀ (i : Fin 3),
    Eq (α := SignType) ((SignType.sign : (a : R) → SignType) (w i) : SignType)
      ((SignType.sign : (a : R) → SignType) (w i₃) : SignType)
⊢ Membership.mem (γ := Set R) (Set.Ioo 0 1) (w i₁)
have hss : Eq (α := SignType) ((SignType.sign : (a : R) → SignType) (∑ i : Fin (2 + 1), w i) : SignType) (1 : SignType)
Tactic: have hss : SignType.sign (∑ i, w i) = 1 := by simp [hw]
-- Lean 4 proof step from Mathlib.Analysis.Convex.Between (hypothesis)
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 : Fin (2 + 1), 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)
hs :
  ∀ (i : Fin 3),
    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) (∑ i : Fin (2 + 1), w i) : SignType) (1 : SignType)
⊢ Membership.mem (γ := Set R) (Set.Ioo 0 1) (w i₁)
have hs' : Eq (α := SignType) ((SignType.sign : (a : R) → SignType) (∑ i : Fin 3, w i) : SignType)
  ((SignType.sign : (a : R) → SignType) (w i₃) : SignType)
Tactic: have hs' := sign_sum Finset.univ_nonempty (SignType.sign (w i₃)) fun i _ => hs i
-- Lean 4 proof step from Mathlib.Analysis.Convex.Between (hypothesis)
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 : Fin (2 + 1), 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)
hs :
  ∀ (i : Fin 3),
    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) (∑ i : Fin (2 + 1), 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)
⊢ Membership.mem (γ := Set R) (Set.Ioo 0 1) (w i₁)
have hss₁ : Eq (α := SignType) ((SignType.sign : (a : R) → SignType) (w i₃) : SignType) (1 : SignType)
Tactic: rw [hs'] at hss
Cleared hypotheses: hss, hs'
-- Lean 4 proof step from Mathlib.Analysis.Convex.Between (hypothesis)
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 : Fin (2 + 1), 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)
hs :
  ∀ (i : Fin 3),
    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)
⊢ Membership.mem (γ := Set R) (Set.Ioo 0 1) (w i₁)
have hs₁ : ∀ (i : Fin 3), 0 < w i
Tactic: simp_rw [hss, sign_eq_one_iff] at hs
Cleared hypotheses: hs
-- 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 : Fin (2 + 1), 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
⊢ Membership.mem (γ := Set R) (Set.Ioo 0 1) (w i₁)
have refine : w i₁ < 1
Tactic: refine ⟨hs i₁, ?_⟩