Documentation

Linglib.Core.LinearAlgebra.AffineSpace.Centroid

Centroids under affine and linear maps #

[UPSTREAM] Affine maps commute with the centroids of nonempty finite families of points, the centroid case of Finset.map_affineCombination; so do linear maps, a module being an affine space over itself, and right multiplication by a matrix.

Main results #

Implementation notes #

Matrix.centroid_vecMul is LinearMap.map_centroid for Matrix.vecMulLinear, stated over an abstract index type: at a concrete Fin n, unifying x ᵥ* M with M.vecMulLinear x unfolds the sums of vecMul and exhausts the recursion limit.

theorem Finset.map_centroid_of_cast_card_ne_zero {k : Type u_1} {V : Type u_2} {P : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} {ι : Type u_6} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] [AddCommGroup V₂] [Module k V₂] [AddTorsor V₂ P₂] (s : Finset ι) (p : ι → P) (f : P →ᵃ[k] P₂) (h : ↑s.card ≠ 0) :
f (centroid k s p) = centroid k s (⇑f ∘ p)
theorem Finset.map_centroid_of_nonempty {k : Type u_1} {V : Type u_2} {P : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} {ι : Type u_6} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] [AddCommGroup V₂] [Module k V₂] [AddTorsor V₂ P₂] (s : Finset ι) [CharZero k] (p : ι → P) (f : P →ᵃ[k] P₂) (h : s.Nonempty) :
f (centroid k s p) = centroid k s (⇑f ∘ p)

In the characteristic zero case, affine maps commute with centroids of nonempty sets.

theorem LinearMap.map_centroid {k : Type u_1} {V : Type u_2} {V₂ : Type u_3} {ι : Type u_4} [DivisionRing k] [CharZero k] [AddCommGroup V] [Module k V] [AddCommGroup V₂] [Module k V₂] (f : V →ₗ[k] V₂) {s : Finset ι} (h : s.Nonempty) (p : ι → V) :
f (Finset.centroid k s p) = Finset.centroid k s (⇑f ∘ p)

In the characteristic zero case, linear maps commute with centroids of nonempty sets.

theorem Matrix.centroid_vecMul {k : Type u_1} {m : Type u_2} {n : Type u_3} {ι : Type u_4} [Field k] [CharZero k] [Fintype m] {s : Finset ι} (h : s.Nonempty) (p : ι → m → k) (M : Matrix m n k) :
vecMul (Finset.centroid k s p) M = Finset.centroid k s fun (i : ι) => vecMul (p i) M

In the characteristic zero case, right multiplication by a matrix commutes with centroids of nonempty sets.