Theorem: sign_eq_of_affineCombination_mem_affineSpan_single_lineMap
File: Mathlib/LinearAlgebra/AffineSpace/Independent.lean

tactic: classical
  rw [← s.affineCombination_affineCombinationSingleWeights k p h₁, ←
    s.affineCombination_affineCombinationLineMapWeights p h₂ h₃ c] at hs
  refine
    sign_eq_of_affineCombination_mem_affineSpan_pair h hw
      (s.sum_affineCombinationSingleWeights k h₁)
      (s.sum_affineCombinationLineMapWeights h₂ h₃ c) hs h₂ h₃
      (Finset.affineCombinationSingleWeights_apply_of_ne k h₁₂.symm)
      (Finset.affineCombinationSingleWeights_apply_of_ne k h₁₃.symm) ?_
  rw [Finset.affineCombinationLineMapWeights_apply_left h₂₃,
    Finset.affineCombinationLineMapWeights_apply_right h₂₃]
  simp_all only [sub_pos, sign_pos]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : LinearOrderedRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
h : AffineIndependent k p
w : ι → k
s : Finset ι
hw : ∑ i ∈ s, w i = 1
i₁ i₂ i₃ : ι
h₁ : i₁ ∈ s
h₂ : i₂ ∈ s
h₃ : i₃ ∈ s
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
c : k
hc0 : 0 < c
hc1 : c < 1
hs : (affineCombination k s p) w ∈ affineSpan k {p i₁, (AffineMap.lineMap (p i₂) (p i₃)) c}
⊢ SignType.sign (w i₂) = SignType.sign (w i₃)
state_after: no goals

tactic: rw [← s.affineCombination_affineCombinationSingleWeights k p h₁, ←
  s.affineCombination_affineCombinationLineMapWeights p h₂ h₃ c] at hs
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : LinearOrderedRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
h : AffineIndependent k p
w : ι → k
s : Finset ι
hw : ∑ i ∈ s, w i = 1
i₁ i₂ i₃ : ι
h₁ : i₁ ∈ s
h₂ : i₂ ∈ s
h₃ : i₃ ∈ s
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
c : k
hc0 : 0 < c
hc1 : c < 1
hs : (affineCombination k s p) w ∈ affineSpan k {p i₁, (AffineMap.lineMap (p i₂) (p i₃)) c}
⊢ SignType.sign (w i₂) = SignType.sign (w i₃)
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : LinearOrderedRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
h : AffineIndependent k p
w : ι → k
s : Finset ι
hw : ∑ i ∈ s, w i = 1
i₁ i₂ i₃ : ι
h₁ : i₁ ∈ s
h₂ : i₂ ∈ s
h₃ : i₃ ∈ s
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
c : k
hc0 : 0 < c
hc1 : c < 1
hs :
  (affineCombination k s p) w ∈
    affineSpan k
      {(affineCombination k s p) (affineCombinationSingleWeights k i₁),
        (affineCombination k s p) (affineCombinationLineMapWeights i₂ i₃ c)}
⊢ SignType.sign (w i₂) = SignType.sign (w i₃)

tactic: refine
  sign_eq_of_affineCombination_mem_affineSpan_pair h hw
    (s.sum_affineCombinationSingleWeights k h₁)
    (s.sum_affineCombinationLineMapWeights h₂ h₃ c) hs h₂ h₃
    (Finset.affineCombinationSingleWeights_apply_of_ne k h₁₂.symm)
    (Finset.affineCombinationSingleWeights_apply_of_ne k h₁₃.symm) ?_
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : LinearOrderedRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
h : AffineIndependent k p
w : ι → k
s : Finset ι
hw : ∑ i ∈ s, w i = 1
i₁ i₂ i₃ : ι
h₁ : i₁ ∈ s
h₂ : i₂ ∈ s
h₃ : i₃ ∈ s
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
c : k
hc0 : 0 < c
hc1 : c < 1
hs :
  (affineCombination k s p) w ∈
    affineSpan k
      {(affineCombination k s p) (affineCombinationSingleWeights k i₁),
        (affineCombination k s p) (affineCombinationLineMapWeights i₂ i₃ c)}
⊢ SignType.sign (w i₂) = SignType.sign (w i₃)
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : LinearOrderedRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
h : AffineIndependent k p
w : ι → k
s : Finset ι
hw : ∑ i ∈ s, w i = 1
i₁ i₂ i₃ : ι
h₁ : i₁ ∈ s
h₂ : i₂ ∈ s
h₃ : i₃ ∈ s
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
c : k
hc0 : 0 < c
hc1 : c < 1
hs :
  (affineCombination k s p) w ∈
    affineSpan k
      {(affineCombination k s p) (affineCombinationSingleWeights k i₁),
        (affineCombination k s p) (affineCombinationLineMapWeights i₂ i₃ c)}
⊢ SignType.sign (affineCombinationLineMapWeights i₂ i₃ c i₂) =
    SignType.sign (affineCombinationLineMapWeights i₂ i₃ c i₃)

tactic: rw [Finset.affineCombinationLineMapWeights_apply_left h₂₃,
  Finset.affineCombinationLineMapWeights_apply_right h₂₃]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : LinearOrderedRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
h : AffineIndependent k p
w : ι → k
s : Finset ι
hw : ∑ i ∈ s, w i = 1
i₁ i₂ i₃ : ι
h₁ : i₁ ∈ s
h₂ : i₂ ∈ s
h₃ : i₃ ∈ s
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
c : k
hc0 : 0 < c
hc1 : c < 1
hs :
  (affineCombination k s p) w ∈
    affineSpan k
      {(affineCombination k s p) (affineCombinationSingleWeights k i₁),
        (affineCombination k s p) (affineCombinationLineMapWeights i₂ i₃ c)}
⊢ SignType.sign (affineCombinationLineMapWeights i₂ i₃ c i₂) =
    SignType.sign (affineCombinationLineMapWeights i₂ i₃ c i₃)
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : LinearOrderedRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
h : AffineIndependent k p
w : ι → k
s : Finset ι
hw : ∑ i ∈ s, w i = 1
i₁ i₂ i₃ : ι
h₁ : i₁ ∈ s
h₂ : i₂ ∈ s
h₃ : i₃ ∈ s
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
c : k
hc0 : 0 < c
hc1 : c < 1
hs :
  (affineCombination k s p) w ∈
    affineSpan k
      {(affineCombination k s p) (affineCombinationSingleWeights k i₁),
        (affineCombination k s p) (affineCombinationLineMapWeights i₂ i₃ c)}
⊢ SignType.sign (1 - c) = SignType.sign c

tactic: simp_all only [sub_pos, sign_pos]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : LinearOrderedRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
p : ι → P
h : AffineIndependent k p
w : ι → k
s : Finset ι
hw : ∑ i ∈ s, w i = 1
i₁ i₂ i₃ : ι
h₁ : i₁ ∈ s
h₂ : i₂ ∈ s
h₃ : i₃ ∈ s
h₁₂ : i₁ ≠ i₂
h₁₃ : i₁ ≠ i₃
h₂₃ : i₂ ≠ i₃
c : k
hc0 : 0 < c
hc1 : c < 1
hs :
  (affineCombination k s p) w ∈
    affineSpan k
      {(affineCombination k s p) (affineCombinationSingleWeights k i₁),
        (affineCombination k s p) (affineCombinationLineMapWeights i₂ i₃ c)}
⊢ SignType.sign (1 - c) = SignType.sign c
state_after: no goals