English
An indexed family that is injective on s has the same centroid as its image under p, i.e., equals the centroid of Set-image under p.
Русский
Инъктивная семействующаяся на s имеет тот же центр масс, что и её изображение через p.
LaTeX
$$$\\forall s\\, {p:\\ i\\to P}: \\mathrm{centroid}(k,s,p) = \\mathrm{centroid}(k, s, p)$$$
Lean4
/-- An indexed family of points that is injective on the given
`Finset` has the same centroid as the image of that `Finset`. This is
stated in terms of a set equal to the image to provide control of
definitional equality for the index type used for the centroid of the
image. -/
theorem centroid_eq_centroid_image_of_inj_on {p : ι → P} (hi : ∀ i ∈ s, ∀ j ∈ s, p i = p j → i = j) {ps : Set P}
[Fintype ps] (hps : ps = p '' ↑s) : s.centroid k p = (univ : Finset ps).centroid k fun x => (x : P) :=
by
let f : p '' ↑s → ι := fun x => x.property.choose
have hf : ∀ x, f x ∈ s ∧ p (f x) = x := fun x => x.property.choose_spec
let f' : ps → ι := fun x => f ⟨x, hps ▸ x.property⟩
have hf' : ∀ x, f' x ∈ s ∧ p (f' x) = x := fun x => hf ⟨x, hps ▸ x.property⟩
have hf'i : Function.Injective f' := by
intro x y h
rw [Subtype.ext_iff, ← (hf' x).2, ← (hf' y).2, h]
let f'e : ps ↪ ι := ⟨f', hf'i⟩
have hu : Finset.univ.map f'e = s := by
ext x
rw [mem_map]
constructor
· rintro ⟨i, _, rfl⟩
exact (hf' i).1
· intro hx
use ⟨p x, hps.symm ▸ Set.mem_image_of_mem _ hx⟩, mem_univ _
refine hi _ (hf' _).1 _ hx ?_
rw [(hf' _).2]
rw [← hu, centroid_map]
congr with x
change p (f' x) = ↑x
rw [(hf' x).2]