k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
⊢ (∀ (s1 s2 : Finset ι) (w1 w2 : ι → k),
      ∑ i in s1, w1 i = 1 →
        ∑ i in s2, w2 i = 1 →
          ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2 →
            Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2) ↔
    ∀ (w1 w2 : ι → k),
      ∑ i : ι, w1 i = 1 →
        ∑ i : ι, w2 i = 1 →
          ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
⊢ AffineIndependent k p ↔
    ∀ (w1 w2 : ι → k),
      ∑ i : ι, w1 i = 1 →
        ∑ i : ι, w2 i = 1 →
          ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2
rw [affineIndependent_iff_indicator_eq_of_affineCombination_eq]
case mp
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
⊢ (∀ (s1 s2 : Finset ι) (w1 w2 : ι → k),
      ∑ i in s1, w1 i = 1 →
        ∑ i in s2, w2 i = 1 →
          ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2 →
            Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2) →
    ∀ (w1 w2 : ι → k),
      ∑ i : ι, w1 i = 1 →
        ∑ i : ι, w2 i = 1 →
          ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2

case mpr
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
⊢ (∀ (w1 w2 : ι → k),
      ∑ i : ι, w1 i = 1 →
        ∑ i : ι, w2 i = 1 →
          ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2) →
    ∀ (s1 s2 : Finset ι) (w1 w2 : ι → k),
      ∑ i in s1, w1 i = 1 →
        ∑ i in s2, w2 i = 1 →
          ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2 →
            Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
⊢ (∀ (s1 s2 : Finset ι) (w1 w2 : ι → k),
      ∑ i in s1, w1 i = 1 →
        ∑ i in s2, w2 i = 1 →
          ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2 →
            Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2) ↔
    ∀ (w1 w2 : ι → k),
      ∑ i : ι, w1 i = 1 →
        ∑ i : ι, w2 i = 1 →
          ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2
constructor
case mp
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
h :
  ∀ (s1 s2 : Finset ι) (w1 w2 : ι → k),
    ∑ i in s1, w1 i = 1 →
      ∑ i in s2, w2 i = 1 →
        ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2 →
          Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2
w1 w2 : ι → k
hw1 : ∑ i : ι, w1 i = 1
hw2 : ∑ i : ι, w2 i = 1
hweq : ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2
⊢ w1 = w2
case mp
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
⊢ (∀ (s1 s2 : Finset ι) (w1 w2 : ι → k),
      ∑ i in s1, w1 i = 1 →
        ∑ i in s2, w2 i = 1 →
          ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2 →
            Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2) →
    ∀ (w1 w2 : ι → k),
      ∑ i : ι, w1 i = 1 →
        ∑ i : ι, w2 i = 1 →
          ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2
intro h w1 w2 hw1 hw2 hweq
no goals
case mp
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
h :
  ∀ (s1 s2 : Finset ι) (w1 w2 : ι → k),
    ∑ i in s1, w1 i = 1 →
      ∑ i in s2, w2 i = 1 →
        ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2 →
          Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2
w1 w2 : ι → k
hw1 : ∑ i : ι, w1 i = 1
hw2 : ∑ i : ι, w2 i = 1
hweq : ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2
⊢ w1 = w2
simpa only [Set.indicator_univ, Finset.coe_univ] using h _ _ w1 w2 hw1 hw2 hweq
case mpr
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
h :
  ∀ (w1 w2 : ι → k),
    ∑ i : ι, w1 i = 1 →
      ∑ i : ι, w2 i = 1 →
        ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2
s1 s2 : Finset ι
w1 w2 : ι → k
hw1 : ∑ i in s1, w1 i = 1
hw2 : ∑ i in s2, w2 i = 1
hweq : ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2
⊢ Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2
case mpr
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
⊢ (∀ (w1 w2 : ι → k),
      ∑ i : ι, w1 i = 1 →
        ∑ i : ι, w2 i = 1 →
          ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2) →
    ∀ (s1 s2 : Finset ι) (w1 w2 : ι → k),
      ∑ i in s1, w1 i = 1 →
        ∑ i in s2, w2 i = 1 →
          ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2 →
            Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2
intro h s1 s2 w1 w2 hw1 hw2 hweq
case mpr
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
h :
  ∀ (w1 w2 : ι → k),
    ∑ i : ι, w1 i = 1 →
      ∑ i : ι, w2 i = 1 →
        ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2
s1 s2 : Finset ι
w1 w2 : ι → k
hw1 : ∑ i in s1, w1 i = 1
hw2 : ∑ i in s2, w2 i = 1
hweq : ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2
hw1' : ∑ i : ι, Set.indicator (↑s1) w1 i = 1
⊢ Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2
case mpr
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
h :
  ∀ (w1 w2 : ι → k),
    ∑ i : ι, w1 i = 1 →
      ∑ i : ι, w2 i = 1 →
        ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2
s1 s2 : Finset ι
w1 w2 : ι → k
hw1 : ∑ i in s1, w1 i = 1
hw2 : ∑ i in s2, w2 i = 1
hweq : ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2
⊢ Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2
have hw1' : (∑ i, (s1 : Set ι).indicator w1 i) = 1 := by
  rwa [Set.sum_indicator_subset _ (Finset.subset_univ s1)] at hw1
case mpr
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
h :
  ∀ (w1 w2 : ι → k),
    ∑ i : ι, w1 i = 1 →
      ∑ i : ι, w2 i = 1 →
        ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2
s1 s2 : Finset ι
w1 w2 : ι → k
hw1 : ∑ i in s1, w1 i = 1
hw2 : ∑ i in s2, w2 i = 1
hweq : ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2
hw1' : ∑ i : ι, Set.indicator (↑s1) w1 i = 1
hw2' : ∑ i : ι, Set.indicator (↑s2) w2 i = 1
⊢ Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2
case mpr
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
h :
  ∀ (w1 w2 : ι → k),
    ∑ i : ι, w1 i = 1 →
      ∑ i : ι, w2 i = 1 →
        ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2
s1 s2 : Finset ι
w1 w2 : ι → k
hw1 : ∑ i in s1, w1 i = 1
hw2 : ∑ i in s2, w2 i = 1
hweq : ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2
hw1' : ∑ i : ι, Set.indicator (↑s1) w1 i = 1
⊢ Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2
have hw2' : (∑ i, (s2 : Set ι).indicator w2 i) = 1 := by
  rwa [Set.sum_indicator_subset _ (Finset.subset_univ s2)] at hw2
case mpr
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
h :
  ∀ (w1 w2 : ι → k),
    ∑ i : ι, w1 i = 1 →
      ∑ i : ι, w2 i = 1 →
        ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2
s1 s2 : Finset ι
w1 w2 : ι → k
hw1 : ∑ i in s1, w1 i = 1
hw2 : ∑ i in s2, w2 i = 1
hweq :
  ↑(Finset.affineCombination k Finset.univ p) (Set.indicator (↑s1) w1) =
    ↑(Finset.affineCombination k Finset.univ p) (Set.indicator (↑s2) w2)
hw1' : ∑ i : ι, Set.indicator (↑s1) w1 i = 1
hw2' : ∑ i : ι, Set.indicator (↑s2) w2 i = 1
⊢ Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2
case mpr
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
h :
  ∀ (w1 w2 : ι → k),
    ∑ i : ι, w1 i = 1 →
      ∑ i : ι, w2 i = 1 →
        ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2
s1 s2 : Finset ι
w1 w2 : ι → k
hw1 : ∑ i in s1, w1 i = 1
hw2 : ∑ i in s2, w2 i = 1
hweq : ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2
hw1' : ∑ i : ι, Set.indicator (↑s1) w1 i = 1
hw2' : ∑ i : ι, Set.indicator (↑s2) w2 i = 1
⊢ Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2
rw [Finset.affineCombination_indicator_subset w1 p (Finset.subset_univ s1),
  Finset.affineCombination_indicator_subset w2 p (Finset.subset_univ s2)] at hweq
no goals
case mpr
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
h :
  ∀ (w1 w2 : ι → k),
    ∑ i : ι, w1 i = 1 →
      ∑ i : ι, w2 i = 1 →
        ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2
s1 s2 : Finset ι
w1 w2 : ι → k
hw1 : ∑ i in s1, w1 i = 1
hw2 : ∑ i in s2, w2 i = 1
hweq :
  ↑(Finset.affineCombination k Finset.univ p) (Set.indicator (↑s1) w1) =
    ↑(Finset.affineCombination k Finset.univ p) (Set.indicator (↑s2) w2)
hw1' : ∑ i : ι, Set.indicator (↑s1) w1 i = 1
hw2' : ∑ i : ι, Set.indicator (↑s2) w2 i = 1
⊢ Set.indicator (↑s1) w1 = Set.indicator (↑s2) w2
exact h _ _ hw1' hw2' hweq
no goals
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
h :
  ∀ (w1 w2 : ι → k),
    ∑ i : ι, w1 i = 1 →
      ∑ i : ι, w2 i = 1 →
        ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2
s1 s2 : Finset ι
w1 w2 : ι → k
hw1 : ∑ i in s1, w1 i = 1
hw2 : ∑ i in s2, w2 i = 1
hweq : ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2
⊢ ∑ i : ι, Set.indicator (↑s1) w1 i = 1
rwa [Set.sum_indicator_subset _ (Finset.subset_univ s1)] at hw1
no goals
k : Type u_2
V : Type u_3
P : Type u_4
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_1
inst✝ : Fintype ι
p : ι → P
h :
  ∀ (w1 w2 : ι → k),
    ∑ i : ι, w1 i = 1 →
      ∑ i : ι, w2 i = 1 →
        ↑(Finset.affineCombination k Finset.univ p) w1 = ↑(Finset.affineCombination k Finset.univ p) w2 → w1 = w2
s1 s2 : Finset ι
w1 w2 : ι → k
hw1 : ∑ i in s1, w1 i = 1
hw2 : ∑ i in s2, w2 i = 1
hweq : ↑(Finset.affineCombination k s1 p) w1 = ↑(Finset.affineCombination k s2 p) w2
hw1' : ∑ i : ι, Set.indicator (↑s1) w1 i = 1
⊢ ∑ i : ι, Set.indicator (↑s2) w2 i = 1
rwa [Set.sum_indicator_subset _ (Finset.subset_univ s2)] at hw2