The areas / V22. Affine, Euclidean and convex geometry
Mathlib.LinearAlgebra.AffineSpace.Combination
92 declarations. Mathlib docs · Source
Affine combinations of points
This file defines affine combinations of points.
Main definitions
-
weightedVSubOfPointis a general weighted combination of subtractions with an explicit base point, yielding a vector. -
weightedVSubuses an arbitrary choice of base point and is intended to be used when the sum of weights is 0, in which case the result is independent of the choice of base point. -
affineCombinationadds the weighted combination to the arbitrary base point, yielding a point rather than a vector, and is intended to be used when the sum of weights is 1, in which case the result is independent of the choice of base point.
These definitions are for sums over a Finset; versions for a
Fintype may be obtained using Finset.univ, while versions for a
Finsupp may be obtained using Finsupp.support.
References
- https://en.wikipedia.org/wiki/Affine_space
theorem Finset.weightedVSubVSubWeights.congr_simp E1 #
∀ (k : Type u_1) [inst : Ring k] {ι : Type u_4} {inst_1 : DecidableEq ι} [inst_2 : DecidableEq ι] (i i_1 : ι),
i = i_1 →
∀ (j j_1 : ι),
j = j_1 →
∀ (a a_1 : ι), a = a_1 → Finset.weightedVSubVSubWeights k i j a = Finset.weightedVSubVSubWeights k i_1 j_1 a_1
theorem Finset.affineCombinationLineMapWeights.congr_simp E1 #
∀ {k : Type u_1} [inst : Ring k] {ι : Type u_4} {inst_1 : DecidableEq ι} [inst_2 : DecidableEq ι] (i i_1 : ι),
i = i_1 →
∀ (j j_1 : ι),
j = j_1 →
∀ (c c_1 : k),
c = c_1 →
∀ (a a_1 : ι),
a = a_1 →
Finset.affineCombinationLineMapWeights i j c a = Finset.affineCombinationLineMapWeights i_1 j_1 c_1 a_1
def Finset.weightedVSubOfPoint E3 #
{k : Type u_1} →
{V : Type u_2} →
{P : Type u_3} →
[inst : Ring k] →
[inst_1 : AddCommGroup V] →
[inst_2 : Module k V] → [S : AddTorsor V P] → {ι : Type u_4} → Finset ι → (ι → P) → P → (ι → k) →ₗ[k] V
A weighted sum of the results of subtracting a base point from the given points, as a linear map on the weights. The main cases of interest are where the sum of the weights is 0, in which case the sum is independent of the choice of base point, and where the sum of the weights is 1, in which case the sum added to the base point is independent of the choice of base point.
theorem Finset.weightedVSubOfPoint_apply E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P) (b : P),
(s.weightedVSubOfPoint p b) w = ∑ i ∈ s, w i • (p i -ᵥ b)
theorem Finset.weightedVSubOfPoint_apply_const E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p b : P),
(s.weightedVSubOfPoint (fun x ↦ p) b) w = (∑ i ∈ s, w i) • (p -ᵥ b)
The value of weightedVSubOfPoint, where the given points are equal.
theorem Finset.weightedVSubOfPoint_vadd E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P) (b : P) (v : V),
(s.weightedVSubOfPoint (v +ᵥ p) b) w = (s.weightedVSubOfPoint p (-v +ᵥ b)) w
theorem Finset.weightedVSubOfPoint_smul E1 #
∀ {k : Type u_1} {V : Type u_2} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V] {ι : Type u_4}
{G : Type u_6} [inst_3 : Group G] [inst_4 : DistribMulAction G V] [SMulCommClass G k V] (s : Finset ι) (w : ι → k)
(p : ι → V) (b : V) (a : G), (s.weightedVSubOfPoint (a • p) b) w = a • (s.weightedVSubOfPoint p (a⁻¹ • b)) w
theorem Finset.weightedVSubOfPoint_congr E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) {w₁ w₂ : ι → k},
(∀ i ∈ s, w₁ i = w₂ i) →
∀ {p₁ p₂ : ι → P},
(∀ i ∈ s, p₁ i = p₂ i) → ∀ (b : P), (s.weightedVSubOfPoint p₁ b) w₁ = (s.weightedVSubOfPoint p₂ b) w₂
weightedVSubOfPoint gives equal results for two families of weights and two families of
points that are equal on s.
theorem Finset.weightedVSubOfPoint_eq_of_weights_eq E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (p : ι → P) (j : ι) (w₁ w₂ : ι → k),
(∀ (i : ι), i ≠ j → w₁ i = w₂ i) → (s.weightedVSubOfPoint p (p j)) w₁ = (s.weightedVSubOfPoint p (p j)) w₂
Given a family of points, if we use a member of the family as a base point, the
weightedVSubOfPoint does not depend on the value of the weights at this point.
theorem Finset.weightedVSubOfPoint_eq_of_sum_eq_zero E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P),
∑ i ∈ s, w i = 0 → ∀ (b₁ b₂ : P), (s.weightedVSubOfPoint p b₁) w = (s.weightedVSubOfPoint p b₂) w
The weighted sum is independent of the base point when the sum of the weights is 0.
theorem Finset.weightedVSubOfPoint_vadd_eq_of_sum_eq_one E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P),
∑ i ∈ s, w i = 1 → ∀ (b₁ b₂ : P), (s.weightedVSubOfPoint p b₁) w +ᵥ b₁ = (s.weightedVSubOfPoint p b₂) w +ᵥ b₂
The weighted sum, added to the base point, is independent of the base point when the sum of the weights is 1.
theorem Finset.weightedVSubOfPoint_erase E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [inst_3 : DecidableEq ι] (w : ι → k) (p : ι → P) (i : ι),
((s.erase i).weightedVSubOfPoint p (p i)) w = (s.weightedVSubOfPoint p (p i)) w
The weighted sum is unaffected by removing the base point, if present, from the set of points.
theorem Finset.weightedVSubOfPoint_insert E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [inst_3 : DecidableEq ι] (w : ι → k) (p : ι → P) (i : ι),
((insert i s).weightedVSubOfPoint p (p i)) w = (s.weightedVSubOfPoint p (p i)) w
The weighted sum is unaffected by adding the base point, whether or not present, to the set of points.
theorem Finset.weightedVSubOfPoint_indicator_subset E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (w : ι → k) (p : ι → P) (b : P) {s₁ s₂ : Finset ι},
s₁ ⊆ s₂ → (s₁.weightedVSubOfPoint p b) w = (s₂.weightedVSubOfPoint p b) ((↑s₁).indicator w)
The weighted sum is unaffected by changing the weights to the corresponding indicator function and adding points to the set.
theorem Finset.weightedVSubOfPoint_map E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} {ι₂ : Type u_5} (s₂ : Finset ι₂) (e : ι₂ ↪ ι) (w : ι → k) (p : ι → P) (b : P),
((Finset.map e s₂).weightedVSubOfPoint p b) w = (s₂.weightedVSubOfPoint (p ∘ ⇑e) b) (w ∘ ⇑e)
A weighted sum, over the image of an embedding, equals a weighted
sum with the same points and weights over the original
Finset.
theorem Finset.sum_smul_vsub_eq_weightedVSubOfPoint_sub E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p₁ p₂ : ι → P) (b : P),
∑ i ∈ s, w i • (p₁ i -ᵥ p₂ i) = (s.weightedVSubOfPoint p₁ b) w - (s.weightedVSubOfPoint p₂ b) w
A weighted sum of pairwise subtractions, expressed as a subtraction of two
weightedVSubOfPoint expressions.
theorem Finset.sum_smul_vsub_const_eq_weightedVSubOfPoint_sub E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p₁ : ι → P) (p₂ b : P),
∑ i ∈ s, w i • (p₁ i -ᵥ p₂) = (s.weightedVSubOfPoint p₁ b) w - (∑ i ∈ s, w i) • (p₂ -ᵥ b)
A weighted sum of pairwise subtractions, where the point on the right is constant,
expressed as a subtraction involving a weightedVSubOfPoint expression.
theorem Finset.sum_smul_const_vsub_eq_sub_weightedVSubOfPoint E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p₂ : ι → P) (p₁ b : P),
∑ i ∈ s, w i • (p₁ -ᵥ p₂ i) = (∑ i ∈ s, w i) • (p₁ -ᵥ b) - (s.weightedVSubOfPoint p₂ b) w
A weighted sum of pairwise subtractions, where the point on the left is constant,
expressed as a subtraction involving a weightedVSubOfPoint expression.
theorem Finset.weightedVSubOfPoint_sdiff E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [inst_3 : DecidableEq ι] {s₂ : Finset ι},
s₂ ⊆ s →
∀ (w : ι → k) (p : ι → P) (b : P),
((s \ s₂).weightedVSubOfPoint p b) w + (s₂.weightedVSubOfPoint p b) w = (s.weightedVSubOfPoint p b) w
A weighted sum may be split into such sums over two subsets.
theorem Finset.weightedVSubOfPoint_sdiff_sub E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [inst_3 : DecidableEq ι] {s₂ : Finset ι},
s₂ ⊆ s →
∀ (w : ι → k) (p : ι → P) (b : P),
((s \ s₂).weightedVSubOfPoint p b) w - (s₂.weightedVSubOfPoint p b) (-w) = (s.weightedVSubOfPoint p b) w
A weighted sum may be split into a subtraction of such sums over two subsets.
theorem Finset.weightedVSubOfPoint_subtype_eq_filter E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P) (b : P) (pred : ι → Prop)
[inst_3 : DecidablePred pred],
(((Finset.subtype pred s).weightedVSubOfPoint (fun i ↦ p ↑i) b) fun i ↦ w ↑i) =
({x ∈ s | pred x}.weightedVSubOfPoint p b) w
A weighted sum over s.subtype pred equals one over {x ∈ s | pred x}.
theorem Finset.weightedVSubOfPoint_filter_of_ne E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P) (b : P) {pred : ι → Prop}
[inst_3 : DecidablePred pred],
(∀ i ∈ s, w i ≠ 0 → pred i) → ({x ∈ s | pred x}.weightedVSubOfPoint p b) w = (s.weightedVSubOfPoint p b) w
A weighted sum over {x ∈ s | pred x} equals one over s if all the weights at indices in s
not satisfying pred are zero.
theorem Finset.weightedVSubOfPoint_const_smul E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P) (b : P) (c : k),
(s.weightedVSubOfPoint p b) (c • w) = c • (s.weightedVSubOfPoint p b) w
A constant multiplier of the weights in weightedVSubOfPoint may be moved outside the
sum.
def Finset.weightedVSub E3 #
{k : Type u_1} →
{V : Type u_2} →
{P : Type u_3} →
[inst : Ring k] →
[inst_1 : AddCommGroup V] →
[inst_2 : Module k V] → [S : AddTorsor V P] → {ι : Type u_4} → Finset ι → (ι → P) → (ι → k) →ₗ[k] V
A weighted sum of the results of subtracting a default base point from the given points, as a linear map on the weights. This is intended to be used when the sum of the weights is 0; that condition is specified as a hypothesis on those lemmas that require it.
theorem Finset.weightedVSub_apply E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P),
(s.weightedVSub p) w = ∑ i ∈ s, w i • (p i -ᵥ Classical.choice ⋯)
Applying weightedVSub with given weights. This is for the case
where a result involving a default base point is OK (for example, when
that base point will cancel out later); a more typical use case for
weightedVSub would involve selecting a preferred base point with
weightedVSub_eq_weightedVSubOfPoint_of_sum_eq_zero and then
using weightedVSubOfPoint_apply.
theorem Finset.weightedVSub_eq_weightedVSubOfPoint_of_sum_eq_zero E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P),
∑ i ∈ s, w i = 0 → ∀ (b : P), (s.weightedVSub p) w = (s.weightedVSubOfPoint p b) w
weightedVSub gives the sum of the results of subtracting any
base point, when the sum of the weights is 0.
theorem Finset.weightedVSub_apply_const E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : P),
∑ i ∈ s, w i = 0 → (s.weightedVSub fun x ↦ p) w = 0
The value of weightedVSub, where the given points are equal and the sum of the weights
is 0.
theorem Finset.weightedVSub_empty E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (w : ι → k) (p : ι → P), (∅.weightedVSub p) w = 0
The weightedVSub for an empty set is 0.
theorem Finset.weightedVSub_vadd E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} {s : Finset ι} {w : ι → k},
∑ i ∈ s, w i = 0 → ∀ (p : ι → P) (v : V), (s.weightedVSub (v +ᵥ p)) w = (s.weightedVSub p) w
theorem Finset.weightedVSub_smul E1 #
∀ {k : Type u_1} {V : Type u_2} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V] {ι : Type u_4}
{G : Type u_6} [inst_3 : Group G] [inst_4 : DistribMulAction G V] [SMulCommClass G k V] {s : Finset ι} {w : ι → k},
∑ i ∈ s, w i = 0 → ∀ (p : ι → V) (a : G), (s.weightedVSub (a • p)) w = a • (s.weightedVSub p) w
theorem Finset.weightedVSub_congr E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) {w₁ w₂ : ι → k},
(∀ i ∈ s, w₁ i = w₂ i) → ∀ {p₁ p₂ : ι → P}, (∀ i ∈ s, p₁ i = p₂ i) → (s.weightedVSub p₁) w₁ = (s.weightedVSub p₂) w₂
weightedVSub gives equal results for two families of weights and two families of points
that are equal on s.
theorem Finset.weightedVSub_indicator_subset E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (w : ι → k) (p : ι → P) {s₁ s₂ : Finset ι},
s₁ ⊆ s₂ → (s₁.weightedVSub p) w = (s₂.weightedVSub p) ((↑s₁).indicator w)
The weighted sum is unaffected by changing the weights to the corresponding indicator function and adding points to the set.
theorem Finset.weightedVSub_map E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} {ι₂ : Type u_5} (s₂ : Finset ι₂) (e : ι₂ ↪ ι) (w : ι → k) (p : ι → P),
((Finset.map e s₂).weightedVSub p) w = (s₂.weightedVSub (p ∘ ⇑e)) (w ∘ ⇑e)
A weighted subtraction, over the image of an embedding, equals a
weighted subtraction with the same points and weights over the
original Finset.
theorem Finset.sum_smul_vsub_eq_weightedVSub_sub E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p₁ p₂ : ι → P),
∑ i ∈ s, w i • (p₁ i -ᵥ p₂ i) = (s.weightedVSub p₁) w - (s.weightedVSub p₂) w
A weighted sum of pairwise subtractions, expressed as a subtraction of two weightedVSub
expressions.
theorem Finset.sum_smul_vsub_const_eq_weightedVSub E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p₁ : ι → P) (p₂ : P),
∑ i ∈ s, w i = 0 → ∑ i ∈ s, w i • (p₁ i -ᵥ p₂) = (s.weightedVSub p₁) w
A weighted sum of pairwise subtractions, where the point on the right is constant and the sum of the weights is 0.
theorem Finset.sum_smul_const_vsub_eq_neg_weightedVSub E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p₂ : ι → P) (p₁ : P),
∑ i ∈ s, w i = 0 → ∑ i ∈ s, w i • (p₁ -ᵥ p₂ i) = -(s.weightedVSub p₂) w
A weighted sum of pairwise subtractions, where the point on the left is constant and the sum of the weights is 0.
theorem Finset.weightedVSub_sdiff E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [inst_3 : DecidableEq ι] {s₂ : Finset ι},
s₂ ⊆ s → ∀ (w : ι → k) (p : ι → P), ((s \ s₂).weightedVSub p) w + (s₂.weightedVSub p) w = (s.weightedVSub p) w
A weighted sum may be split into such sums over two subsets.
theorem Finset.weightedVSub_sdiff_sub E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [inst_3 : DecidableEq ι] {s₂ : Finset ι},
s₂ ⊆ s → ∀ (w : ι → k) (p : ι → P), ((s \ s₂).weightedVSub p) w - (s₂.weightedVSub p) (-w) = (s.weightedVSub p) w
A weighted sum may be split into a subtraction of such sums over two subsets.
theorem Finset.weightedVSub_subtype_eq_filter E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P) (pred : ι → Prop)
[inst_3 : DecidablePred pred],
(((Finset.subtype pred s).weightedVSub fun i ↦ p ↑i) fun i ↦ w ↑i) = ({x ∈ s | pred x}.weightedVSub p) w
A weighted sum over s.subtype pred equals one over {x ∈ s | pred x}.
theorem Finset.weightedVSub_filter_of_ne E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P) {pred : ι → Prop}
[inst_3 : DecidablePred pred],
(∀ i ∈ s, w i ≠ 0 → pred i) → ({x ∈ s | pred x}.weightedVSub p) w = (s.weightedVSub p) w
A weighted sum over {x ∈ s | pred x} equals one over s if all the weights at indices in s
not satisfying pred are zero.
theorem Finset.weightedVSub_const_smul E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P) (c : k),
(s.weightedVSub p) (c • w) = c • (s.weightedVSub p) w
A constant multiplier of the weights in weightedVSub_of may be moved outside the sum.
instance Finset.instAddTorsorForall E0 #
{k : Type u_1} → [inst : Ring k] → {ι : Type u_4} → AddTorsor (ι → k) (ι → k)
def Finset.affineCombination E3 #
(k : Type u_1) →
{V : Type u_2} →
{P : Type u_3} →
[inst : Ring k] →
[inst_1 : AddCommGroup V] →
[inst_2 : Module k V] → [S : AddTorsor V P] → {ι : Type u_4} → Finset ι → (ι → P) → (ι → k) →ᵃ[k] P
A weighted sum of the results of subtracting a default base point from the given points, added to that base point, as an affine map on the weights. This is intended to be used when the sum of the weights is 1, in which case it is an affine combination (barycenter) of the points with the given weights; that condition is specified as a hypothesis on those lemmas that require it.
theorem Finset.affineCombination_linear E0 #
∀ (k : Type u_1) {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (p : ι → P),
(Finset.affineCombination k s p).linear = s.weightedVSub p
The linear map corresponding to affineCombination is
weightedVSub.
theorem Finset.affineCombination_apply E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P),
(Finset.affineCombination k s p) w = (s.weightedVSubOfPoint p (Classical.choice ⋯)) w +ᵥ Classical.choice ⋯
Applying affineCombination with given weights. This is for the
case where a result involving a default base point is OK (for example,
when that base point will cancel out later); a more typical use case
for affineCombination would involve selecting a preferred base
point with
affineCombination_eq_weightedVSubOfPoint_vadd_of_sum_eq_one and
then using weightedVSubOfPoint_apply.
theorem Finset.affineCombination_apply_const E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : P),
∑ i ∈ s, w i = 1 → (Finset.affineCombination k s fun x ↦ p) w = p
The value of affineCombination, where the given points are equal.
theorem Finset.affineCombination_congr E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) {w₁ w₂ : ι → k},
(∀ i ∈ s, w₁ i = w₂ i) →
∀ {p₁ p₂ : ι → P},
(∀ i ∈ s, p₁ i = p₂ i) → (Finset.affineCombination k s p₁) w₁ = (Finset.affineCombination k s p₂) w₂
affineCombination gives equal results for two families of weights and two families of
points that are equal on s.
theorem Finset.affineCombination_eq_weightedVSubOfPoint_vadd_of_sum_eq_one E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P),
∑ i ∈ s, w i = 1 → ∀ (b : P), (Finset.affineCombination k s p) w = (s.weightedVSubOfPoint p b) w +ᵥ b
affineCombination gives the sum with any base point, when the
sum of the weights is 1.
theorem Finset.weightedVSub_vadd_affineCombination E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w₁ w₂ : ι → k) (p : ι → P),
(s.weightedVSub p) w₁ +ᵥ (Finset.affineCombination k s p) w₂ = (Finset.affineCombination k s p) (w₁ + w₂)
Adding a weightedVSub to an affineCombination.
theorem Finset.affineCombination_vsub E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w₁ w₂ : ι → k) (p : ι → P),
(Finset.affineCombination k s p) w₁ -ᵥ (Finset.affineCombination k s p) w₂ = (s.weightedVSub p) (w₁ - w₂)
Subtracting two affineCombinations.
theorem Finset.attach_affineCombination_of_injective E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] [inst_3 : DecidableEq P] (s : Finset P) (w : P → k) (f : ↥s → P),
Function.Injective f →
(Finset.affineCombination k s.attach f) (w ∘ f) = (Finset.affineCombination k (Finset.image f Finset.univ) id) w
theorem Finset.attach_affineCombination_coe E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] (s : Finset P) (w : P → k),
(Finset.affineCombination k s.attach Subtype.val) (w ∘ Subtype.val) = (Finset.affineCombination k s id) w
theorem Finset.weightedVSub_eq_linear_combination E0 #
∀ {k : Type u_1} {V : Type u_2} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V] {ι : Type u_6}
(s : Finset ι) {w : ι → k} {p : ι → V}, s.sum w = 0 → (s.weightedVSub p) w = ∑ i ∈ s, w i • p i
Viewing a module as an affine space modelled on itself, a weightedVSub is just a linear
combination.
theorem Finset.affineCombination_eq_linear_combination E0 #
∀ {k : Type u_1} {V : Type u_2} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V] {ι : Type u_4}
(s : Finset ι) (p : ι → V) (w : ι → k), ∑ i ∈ s, w i = 1 → (Finset.affineCombination k s p) w = ∑ i ∈ s, w i • p i
Viewing a module as an affine space modelled on itself, affine combinations are just linear combinations.
theorem Finset.affineCombination_of_eq_one_of_eq_zero E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P) {i : ι},
i ∈ s → w i = 1 → (∀ i2 ∈ s, i2 ≠ i → w i2 = 0) → (Finset.affineCombination k s p) w = p i
An affineCombination equals a point if that point is in the set
and has weight 1 and the other points in the set have weight 0.
theorem Finset.affineCombination_indicator_subset E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (w : ι → k) (p : ι → P) {s₁ s₂ : Finset ι},
s₁ ⊆ s₂ → (Finset.affineCombination k s₁ p) w = (Finset.affineCombination k s₂ p) ((↑s₁).indicator w)
An affine combination is unaffected by changing the weights to the corresponding indicator function and adding points to the set.
theorem Finset.affineCombination_map E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} {ι₂ : Type u_5} (s₂ : Finset ι₂) (e : ι₂ ↪ ι) (w : ι → k) (p : ι → P),
(Finset.affineCombination k (Finset.map e s₂) p) w = (Finset.affineCombination k s₂ (p ∘ ⇑e)) (w ∘ ⇑e)
An affine combination, over the image of an embedding, equals an
affine combination with the same points and weights over the original
Finset.
theorem Finset.sum_smul_vsub_eq_affineCombination_vsub E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p₁ p₂ : ι → P),
∑ i ∈ s, w i • (p₁ i -ᵥ p₂ i) = (Finset.affineCombination k s p₁) w -ᵥ (Finset.affineCombination k s p₂) w
A weighted sum of pairwise subtractions, expressed as a subtraction of two affineCombination
expressions.
theorem Finset.sum_smul_vsub_const_eq_affineCombination_vsub E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p₁ : ι → P) (p₂ : P),
∑ i ∈ s, w i = 1 → ∑ i ∈ s, w i • (p₁ i -ᵥ p₂) = (Finset.affineCombination k s p₁) w -ᵥ p₂
A weighted sum of pairwise subtractions, where the point on the right is constant and the sum of the weights is 1.
theorem Finset.sum_smul_const_vsub_eq_vsub_affineCombination E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p₂ : ι → P) (p₁ : P),
∑ i ∈ s, w i = 1 → ∑ i ∈ s, w i • (p₁ -ᵥ p₂ i) = p₁ -ᵥ (Finset.affineCombination k s p₂) w
A weighted sum of pairwise subtractions, where the point on the left is constant and the sum of the weights is 1.
theorem Finset.affineCombination_sdiff_sub E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [inst_3 : DecidableEq ι] {s₂ : Finset ι},
s₂ ⊆ s →
∀ (w : ι → k) (p : ι → P),
(Finset.affineCombination k (s \ s₂) p) w -ᵥ (Finset.affineCombination k s₂ p) (-w) = (s.weightedVSub p) w
A weighted sum may be split into a subtraction of affine combinations over two subsets.
theorem Finset.affineCombination_eq_of_weightedVSub_eq_zero_of_eq_neg_one E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) {w : ι → k} {p : ι → P},
(s.weightedVSub p) w = 0 →
∀ {i : ι} [inst_3 : DecidablePred fun x ↦ x ≠ i],
i ∈ s → w i = -1 → (Finset.affineCombination k ({x ∈ s | x ≠ i}) p) w = p i
If a weighted sum is zero and one of the weights is -1, the corresponding point is
the affine combination of the other points with the given weights.
theorem Finset.affineCombination_subtype_eq_filter E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P) (pred : ι → Prop)
[inst_3 : DecidablePred pred],
((Finset.affineCombination k (Finset.subtype pred s) fun i ↦ p ↑i) fun i ↦ w ↑i) =
(Finset.affineCombination k ({x ∈ s | pred x}) p) w
An affine combination over s.subtype pred equals one over {x ∈ s | pred x}.
theorem Finset.affineCombination_filter_of_ne E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ι → k) (p : ι → P) {pred : ι → Prop}
[inst_3 : DecidablePred pred],
(∀ i ∈ s, w i ≠ 0 → pred i) → (Finset.affineCombination k ({x ∈ s | pred x}) p) w = (Finset.affineCombination k s p) w
An affine combination over {x ∈ s | pred x} equals one over s if all the weights at indices
in s not satisfying pred are zero.
theorem Finset.map_affineCombination E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) {V₂ : Type u_6} {P₂ : Type u_7} [inst_3 : AddCommGroup V₂]
[inst_4 : Module k V₂] [inst_5 : AddTorsor V₂ P₂] (p : ι → P) (w : ι → k),
s.sum w = 1 → ∀ (f : P →ᵃ[k] P₂), f ((Finset.affineCombination k s p) w) = (Finset.affineCombination k s (⇑f ∘ p)) w
Affine maps commute with affine combinations.
theorem Finset.affineCombination_apply_eq_lineMap_sum E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [inst_3 : DecidableEq ι] (w : ι → k) (p : ι → P) (p₁ p₂ : P)
(s' : Finset ι),
∑ i ∈ s, w i = 1 →
(∀ i ∈ s ∩ s', p i = p₂) →
(∀ i ∈ s \ s', p i = p₁) → (Finset.affineCombination k s p) w = (AffineMap.lineMap p₁ p₂) (∑ i ∈ s ∩ s', w i)
The value of affineCombination, where the given points take only two values.
theorem Finset.lineMap_affineCombination E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w₁ w₂ : ι → k) (r : k) (p : ι → P),
(AffineMap.lineMap ((Finset.affineCombination k s p) w₁) ((Finset.affineCombination k s p) w₂)) r =
(Finset.affineCombination k s p) ((AffineMap.lineMap w₁ w₂) r)
Applying AffineMap.lineMap on two Finset.affineCombination over the same set of points
is equivalent to applying AffineMap.lineMap to the weights.
def Finset.weightedVSubVSubWeights E1 #
(k : Type u_1) → [Ring k] → {ι : Type u_4} → [DecidableEq ι] → ι → ι → ι → k
Weights for expressing the subtraction of two points as a weightedVSub.
theorem Finset.weightedVSubVSubWeights_self E0 #
∀ (k : Type u_1) [inst : Ring k] {ι : Type u_4} [inst_1 : DecidableEq ι] (i : ι),
Finset.weightedVSubVSubWeights k i i = 0
theorem Finset.weightedVSubVSubWeights_apply_left E0 #
∀ (k : Type u_1) [inst : Ring k] {ι : Type u_4} [inst_1 : DecidableEq ι] {i j : ι},
i ≠ j → Finset.weightedVSubVSubWeights k i j i = 1
theorem Finset.weightedVSubVSubWeights_apply_right E0 #
∀ (k : Type u_1) [inst : Ring k] {ι : Type u_4} [inst_1 : DecidableEq ι] {i j : ι},
i ≠ j → Finset.weightedVSubVSubWeights k i j j = -1
theorem Finset.weightedVSubVSubWeights_apply_of_ne E0 #
∀ (k : Type u_1) [inst : Ring k] {ι : Type u_4} [inst_1 : DecidableEq ι] {i j t : ι},
t ≠ i → t ≠ j → Finset.weightedVSubVSubWeights k i j t = 0
theorem Finset.sum_weightedVSubVSubWeights E0 #
∀ (k : Type u_1) [inst : Ring k] {ι : Type u_4} (s : Finset ι) [inst_1 : DecidableEq ι] {i j : ι},
i ∈ s → j ∈ s → ∑ t ∈ s, Finset.weightedVSubVSubWeights k i j t = 0
def Finset.affineCombinationLineMapWeights E1 #
{k : Type u_1} → [Ring k] → {ι : Type u_4} → [DecidableEq ι] → ι → ι → k → ι → k
Weights for expressing lineMap as an affine combination.
theorem Finset.affineCombinationLineMapWeights_self E0 #
∀ {k : Type u_1} [inst : Ring k] {ι : Type u_4} [inst_1 : DecidableEq ι] (i : ι) (c : k),
Finset.affineCombinationLineMapWeights i i c = Pi.single i 1
theorem Finset.affineCombinationLineMapWeights_apply_left E0 #
∀ {k : Type u_1} [inst : Ring k] {ι : Type u_4} [inst_1 : DecidableEq ι] {i j : ι},
i ≠ j → ∀ (c : k), Finset.affineCombinationLineMapWeights i j c i = 1 - c
theorem Finset.affineCombinationLineMapWeights_apply_right E0 #
∀ {k : Type u_1} [inst : Ring k] {ι : Type u_4} [inst_1 : DecidableEq ι] {i j : ι},
i ≠ j → ∀ (c : k), Finset.affineCombinationLineMapWeights i j c j = c
theorem Finset.affineCombinationLineMapWeights_apply_of_ne E0 #
∀ {k : Type u_1} [inst : Ring k] {ι : Type u_4} [inst_1 : DecidableEq ι] {i j t : ι},
t ≠ i → t ≠ j → ∀ (c : k), Finset.affineCombinationLineMapWeights i j c t = 0
theorem Finset.sum_affineCombinationLineMapWeights E0 #
∀ {k : Type u_1} [inst : Ring k] {ι : Type u_4} (s : Finset ι) [inst_1 : DecidableEq ι] {i j : ι},
i ∈ s → j ∈ s → ∀ (c : k), ∑ t ∈ s, Finset.affineCombinationLineMapWeights i j c t = 1
theorem Finset.affineCombination_piSingle E0 #
∀ (k : Type u_1) {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [inst_3 : DecidableEq ι] (p : ι → P) {i : ι},
i ∈ s → (Finset.affineCombination k s p) (Pi.single i 1) = p i
An affine combination with affineCombinationSingleWeights gives the specified point.
theorem Finset.weightedVSub_weightedVSubVSubWeights E0 #
∀ (k : Type u_1) {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [inst_3 : DecidableEq ι] (p : ι → P) {i j : ι},
i ∈ s → j ∈ s → (s.weightedVSub p) (Finset.weightedVSubVSubWeights k i j) = p i -ᵥ p j
A weighted subtraction with weightedVSubVSubWeights gives the result of subtracting the
specified points.
theorem Finset.affineCombination_affineCombinationLineMapWeights E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [inst_3 : DecidableEq ι] (p : ι → P) {i j : ι},
i ∈ s →
j ∈ s →
∀ (c : k),
(Finset.affineCombination k s p) (Finset.affineCombinationLineMapWeights i j c) =
(AffineMap.lineMap (p i) (p j)) c
An affine combination with affineCombinationLineMapWeights gives the result of
line_map.
theorem Finset.homothety_affineCombination E1 #
∀ {k : Type u_6} {V : Type u_7} {P : Type u_8} [inst : CommRing k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[inst_3 : AddTorsor V P] {ι : Type u_9} [inst_4 : DecidableEq ι] (s : Finset ι) (p : ι → P) (w : ι → k) {i : ι},
i ∈ s →
∀ (r : k),
(AffineMap.homothety (p i) r) ((Finset.affineCombination k s p) w) =
(Finset.affineCombination k s p) ((AffineMap.lineMap (Pi.single i 1) w) r)
Applying AffineMap.homothety on Finset.affineCombination towards one of the weighted points
is equivalent to moving the weights towards Finset.affineCombinationSingleWeights.
theorem weightedVSub_mem_vectorSpan E1 #
∀ {ι : Type u_1} {k : Type u_2} {V : Type u_3} {P : Type u_4} [inst : Ring k] [inst_1 : AddCommGroup V]
[inst_2 : Module k V] [inst_3 : AddTorsor V P] {s : Finset ι} {w : ι → k},
∑ i ∈ s, w i = 0 → ∀ (p : ι → P), (s.weightedVSub p) w ∈ vectorSpan k (Set.range p)
A weightedVSub with sum of weights 0 is in the vectorSpan of
an indexed family.
theorem affineCombination_mem_affineSpan E1 #
∀ {ι : Type u_1} {k : Type u_2} {V : Type u_3} {P : Type u_4} [inst : Ring k] [inst_1 : AddCommGroup V]
[inst_2 : Module k V] [inst_3 : AddTorsor V P] [Nontrivial k] {s : Finset ι} {w : ι → k},
∑ i ∈ s, w i = 1 → ∀ (p : ι → P), (Finset.affineCombination k s p) w ∈ affineSpan k (Set.range p)
An affineCombination with sum of weights 1 is in the
affineSpan of an indexed family, if the underlying ring is
nontrivial.
theorem affineCombination_mem_affineSpan_of_nonempty E1 #
∀ {ι : Type u_1} {k : Type u_2} {V : Type u_3} {P : Type u_4} [inst : Ring k] [inst_1 : AddCommGroup V]
[inst_2 : Module k V] [inst_3 : AddTorsor V P] [Nonempty ι] {s : Finset ι} {w : ι → k},
∑ i ∈ s, w i = 1 → ∀ (p : ι → P), (Finset.affineCombination k s p) w ∈ affineSpan k (Set.range p)
An affineCombination with sum of weights 1 is in the
affineSpan of an indexed family, if the family is nonempty.
theorem mem_vectorSpan_iff_eq_weightedVSub E0 #
∀ {ι : Type u_1} (k : Type u_2) {V : Type u_3} {P : Type u_4} [inst : Ring k] [inst_1 : AddCommGroup V]
[inst_2 : Module k V] [inst_3 : AddTorsor V P] {v : V} {p : ι → P},
v ∈ vectorSpan k (Set.range p) ↔ ∃ s w, ∑ i ∈ s, w i = 0 ∧ v = (s.weightedVSub p) w
A vector is in the vectorSpan of an indexed family if and only
if it is a weightedVSub with sum of weights 0.
theorem affineCombination_mem_affineSpan_image E1 #
∀ {ι : Type u_1} {k : Type u_2} {V : Type u_3} {P : Type u_4} [inst : Ring k] [inst_1 : AddCommGroup V]
[inst_2 : Module k V] [inst_3 : AddTorsor V P] [Nontrivial k] {s : Finset ι} {w : ι → k},
∑ i ∈ s, w i = 1 →
∀ {s' : Set ι},
(∀ i ∈ s, i ∉ s' → w i = 0) → ∀ (p : ι → P), (Finset.affineCombination k s p) w ∈ affineSpan k (p '' s')
theorem mem_affineSpan_iff_eq_affineCombination E0 #
∀ {ι : Type u_1} (k : Type u_2) (V : Type u_3) {P : Type u_4} [inst : Ring k] [inst_1 : AddCommGroup V]
[inst_2 : Module k V] [inst_3 : AddTorsor V P] [Nontrivial k] {p1 : P} {p : ι → P},
p1 ∈ affineSpan k (Set.range p) ↔ ∃ s w, ∑ i ∈ s, w i = 1 ∧ p1 = (Finset.affineCombination k s p) w
A point is in the affineSpan of an indexed family if and only
if it is an affineCombination with sum of weights 1, provided the
underlying ring is nontrivial.
theorem mem_affineSpan_iff_eq_weightedVSubOfPoint_vadd E0 #
∀ {ι : Type u_1} (k : Type u_2) (V : Type u_3) {P : Type u_4} [inst : Ring k] [inst_1 : AddCommGroup V]
[inst_2 : Module k V] [inst_3 : AddTorsor V P] [Nontrivial k] (p : ι → P) (j : ι) (q : P),
q ∈ affineSpan k (Set.range p) ↔ ∃ s w, q = (s.weightedVSubOfPoint p (p j)) w +ᵥ p j
Given a family of points together with a chosen base point in that family, membership of the
affine span of this family corresponds to an identity in terms of weightedVSubOfPoint, with
weights that are not required to sum to 1.
theorem affineSpan_eq_affineSpan_lineMap_units E1 #
∀ {k : Type u_2} {V : Type u_3} {P : Type u_4} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : Module k V]
[inst_3 : AddTorsor V P] [Nontrivial k] {s : Set P} {p : P},
p ∈ s → ∀ (w : ↑s → kˣ), affineSpan k (Set.range fun q ↦ (AffineMap.lineMap p ↑q) ↑(w q)) = affineSpan k s
Given a set of points, together with a chosen base point in this set, if we affinely transport all other members of the set along the line joining them to this base point, the affine span is unchanged.
def AffineMap.weightedVSubOfPoint E3 #
{k : Type u_1} →
{V : Type u_2} →
(P : Type u_3) →
[inst : CommRing k] →
[inst_1 : AddCommGroup V] →
[inst_2 : Module k V] → [inst_3 : AddTorsor V P] → {ι : Type u_4} → Finset ι → (ι → k) → (ι → P) × P →ᵃ[k] V
A weighted sum, as an affine map on the points involved.