The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V22. Affine, Euclidean and convex geometry

Mathlib.Geometry.Euclidean.SignedDist

54 declarations. Mathlib docs · Source

Signed distance to an affine subspace in a Euclidean space.

This file defines the signed distance between two points, in the direction of a given vector, and the signed distance between an affine subspace and a point, in the direction of a given reference point.

Main definitions

  • signedDist is the signed distance between two points
  • AffineSubspace.signedInfDist is the signed distance between an affine subspace and a point.
  • Affine.Simplex.signedInfDist is the signed distance between a face of a simplex and a point. In the case of a triangle, these distances are trilinear coordinates.

References

  • https://en.wikipedia.org/wiki/Trilinear_coordinates

theorem AffineSubspace.signedInfDist.congr_simp E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (s s_1 : AffineSubspace ℝ P) (e_s : s = s_1) [inst_4 : Nonempty ↥s]
  [inst_5 : s.direction.HasOrthogonalProjection] (p p_1 : P), p = p_1 → s.signedInfDist p = s_1.signedInfDist p_1

theorem Affine.Simplex.signedInfDist.congr_simp E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] {n : ℕ} [inst_4 : NeZero n] (s s_1 : Affine.Simplex ℝ P n),
  s = s_1 → ∀ (i i_1 : Fin (n + 1)), i = i_1 → s.signedInfDist i = s_1.signedInfDist i_1

def signedDist E3 #

{V : Type u_1} →
  {P : Type u_2} →
    [inst : NormedAddCommGroup V] →
      [inst_1 : InnerProductSpace ℝ V] →
        [inst_2 : MetricSpace P] → [inst_3 : NormedAddTorsor V P] → V → P →ᴬ[ℝ] P →ᴬ[ℝ] ℝ

The signed distance between two points p and q, in the direction of a reference vector v. It is the size of q - p in the direction of v. In the degenerate case v = 0, it returns 0.

theorem signedDist_apply E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p : P),
  (signedDist v) p =
    ((innerSL ℝ) (NormedSpace.normalize v)).toContinuousAffineMap.comp
      (ContinuousAffineMap.id ℝ P -ᵥ ContinuousAffineMap.const ℝ P p)

theorem signedDist_apply_apply E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P), ((signedDist v) p) q = inner ℝ (NormedSpace.normalize v) (q -ᵥ p)

theorem signedDist_apply_linear E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p : P), (↑((signedDist v) p)).linear = (innerₗ V) (NormedSpace.normalize v)

theorem signedDist_apply_linear_apply E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v w : V) (p : P), (↑((signedDist v) p)).linear w = inner ℝ (NormedSpace.normalize v) w

theorem signedDist_linear_apply E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v w : V),
  (↑(signedDist v)).linear w = ContinuousAffineMap.const ℝ P (inner ℝ (-NormedSpace.normalize v) w)

theorem signedDist_linear_apply_apply E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v w : V) (p : P),
  ((↑(signedDist v)).linear w) p = inner ℝ (-NormedSpace.normalize v) w

theorem signedDist_smul E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P) (r : ℝ),
  ((signedDist (r • v)) p) q = ↑(SignType.sign r) * ((signedDist v) p) q

theorem signedDist_smul_of_pos E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P) {r : ℝ}, 0 < r → ((signedDist (r • v)) p) q = ((signedDist v) p) q

theorem signedDist_smul_of_neg E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P) {r : ℝ}, r < 0 → ((signedDist (r • v)) p) q = -((signedDist v) p) q

theorem signedDist_zero E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (p q : P), ((signedDist 0) p) q = 0

theorem signedDist_neg E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P), ((signedDist (-v)) p) q = -((signedDist v) p) q

theorem signedDist_congr E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v w : V), (∃ r > 0, r • v = w) → signedDist v = signedDist w

theorem signedDist_self E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p : P), ((signedDist v) p) p = 0

theorem signedDist_anticomm E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P), -((signedDist v) p) q = ((signedDist v) q) p

theorem signedDist_triangle E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q r : P), ((signedDist v) p) q + ((signedDist v) q) r = ((signedDist v) p) r

theorem signedDist_triangle_left E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q r : P), ((signedDist v) p) q - ((signedDist v) p) r = ((signedDist v) r) q

theorem signedDist_triangle_right E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q r : P), ((signedDist v) p) r - ((signedDist v) q) r = ((signedDist v) p) q

theorem signedDist_vadd_left E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v w : V) (p q : P),
  ((signedDist v) (w +ᵥ p)) q = -inner ℝ (NormedSpace.normalize v) w + ((signedDist v) p) q

theorem signedDist_vadd_right E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v w : V) (p q : P),
  ((signedDist v) p) (w +ᵥ q) = inner ℝ (NormedSpace.normalize v) w + ((signedDist v) p) q

theorem signedDist_vadd_left_swap E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v w : V) (p q : P), ((signedDist v) (w +ᵥ p)) q = ((signedDist v) p) (-w +ᵥ q)

theorem signedDist_vadd_right_swap E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v w : V) (p q : P), ((signedDist v) p) (w +ᵥ q) = ((signedDist v) (-w +ᵥ p)) q

theorem signedDist_vadd_vadd E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v w : V) (p q : P), ((signedDist v) (w +ᵥ p)) (w +ᵥ q) = ((signedDist v) p) q

theorem signedDist_left_congr E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] {v : V} {p q : P}, inner ℝ v (p -ᵥ q) = 0 → (signedDist v) p = (signedDist v) q

theorem signedDist_right_congr E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] {v : V} (p : P) {q r : P},
  inner ℝ v (q -ᵥ r) = 0 → ((signedDist v) p) q = ((signedDist v) p) r

theorem signedDist_eq_zero_of_orthogonal E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] {v : V} {p q : P}, inner ℝ v (q -ᵥ p) = 0 → ((signedDist v) p) q = 0

theorem abs_signedDist_le_dist E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P), |((signedDist v) p) q| ≤ dist p q

theorem signedDist_le_dist E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P), ((signedDist v) p) q ≤ dist p q

theorem abs_signedDist_eq_dist_iff_vsub_mem_span E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P), |((signedDist v) p) q| = dist p q ↔ q -ᵥ p ∈ ℝ ∙ v

theorem signedDist_eq_dist_iff_vsub_mem_span E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P), ((signedDist v) p) q = dist p q ↔ q -ᵥ p ∈ NNReal ∙ v

theorem signedDist_vsub_self E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (p q : P), ((signedDist (q -ᵥ p)) p) q = dist p q

theorem signedDist_vsub_self_rev E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (p q : P), ((signedDist (p -ᵥ q)) p) q = -dist p q

theorem signedDist_lineMap_lineMap E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P) (c₁ c₂ : ℝ),
  ((signedDist v) ((AffineMap.lineMap p q) c₁)) ((AffineMap.lineMap p q) c₂) = (c₂ - c₁) * ((signedDist v) p) q

theorem signedDist_lineMap_left E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P) (c : ℝ),
  ((signedDist v) ((AffineMap.lineMap p q) c)) p = -c * ((signedDist v) p) q

theorem signedDist_left_lineMap E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P) (c : ℝ),
  ((signedDist v) p) ((AffineMap.lineMap p q) c) = c * ((signedDist v) p) q

theorem signedDist_lineMap_right E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P) (c : ℝ),
  ((signedDist v) ((AffineMap.lineMap p q) c)) q = (1 - c) * ((signedDist v) p) q

theorem signedDist_right_lineMap E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (v : V) (p q : P) (c : ℝ),
  ((signedDist v) q) ((AffineMap.lineMap p q) c) = (c - 1) * ((signedDist v) p) q

def AffineSubspace.signedInfDist E3 #

{V : Type u_1} →
  {P : Type u_2} →
    [inst : NormedAddCommGroup V] →
      [inst_1 : InnerProductSpace ℝ V] →
        [inst_2 : MetricSpace P] →
          [inst_3 : NormedAddTorsor V P] →
            (s : AffineSubspace ℝ P) → [Nonempty ↥s] → [s.direction.HasOrthogonalProjection] → P → P →ᴬ[ℝ] ℝ

The signed distance between s and a point, in the direction of the reference point p. This is expected to be used when p does not lie in s (in the degenerate case where p lies in s, this yields 0) and when the point at which the distance is evaluated lies in the affine span of s and p (any component of the distance orthogonal to that span is disregarded).

theorem AffineSubspace.signedInfDist_def E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (s : AffineSubspace ℝ P) [inst_4 : Nonempty ↥s]
  [inst_5 : s.direction.HasOrthogonalProjection] (p : P),
  s.signedInfDist p = (signedDist (p -ᵥ ↑((EuclideanGeometry.orthogonalProjection s) p))) ↑Classical.ofNonempty

theorem AffineSubspace.signedInfDist_eq_signedDist_of_mem E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] {s : AffineSubspace ℝ P} [inst_4 : Nonempty ↥s]
  [inst_5 : s.direction.HasOrthogonalProjection] {p q : P},
  q ∈ s → s.signedInfDist p = (signedDist (p -ᵥ ↑((EuclideanGeometry.orthogonalProjection s) p))) q

theorem AffineSubspace.signedInfDist_eq_signedDist_orthogonalProjection E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (s : AffineSubspace ℝ P) [inst_4 : Nonempty ↥s]
  [inst_5 : s.direction.HasOrthogonalProjection] (p : P) {x : P},
  (s.signedInfDist p) x =
    ((signedDist (p -ᵥ ↑((EuclideanGeometry.orthogonalProjection s) p)))
        ↑((EuclideanGeometry.orthogonalProjection s) x))
      x

theorem AffineSubspace.signedInfDist_apply_self E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (s : AffineSubspace ℝ P) [inst_4 : Nonempty ↥s]
  [inst_5 : s.direction.HasOrthogonalProjection] (p : P),
  (s.signedInfDist p) p = ‖p -ᵥ ↑((EuclideanGeometry.orthogonalProjection s) p)‖

theorem AffineSubspace.signedInfDist_apply_of_mem E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] {s : AffineSubspace ℝ P} [inst_4 : Nonempty ↥s]
  [inst_5 : s.direction.HasOrthogonalProjection] (p : P) {x : P}, x ∈ s → (s.signedInfDist p) x = 0

theorem AffineSubspace.signedInfDist_eq_const_of_mem E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] {s : AffineSubspace ℝ P} [inst_4 : Nonempty ↥s]
  [inst_5 : s.direction.HasOrthogonalProjection] {p : P}, p ∈ s → ↑(s.signedInfDist p) = AffineMap.const ℝ P 0

theorem AffineSubspace.abs_signedInfDist_eq_dist_of_mem_affineSpan_insert E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] {s : AffineSubspace ℝ P} [inst_4 : Nonempty ↥s]
  [inst_5 : s.direction.HasOrthogonalProjection] {p x : P},
  x ∈ affineSpan ℝ (insert p ↑s) → |(s.signedInfDist p) x| = dist x ↑((EuclideanGeometry.orthogonalProjection s) x)

theorem AffineSubspace.signedInfDist_singleton E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (p q : P), {q}.signedInfDist p = (signedDist (p -ᵥ q)) q

def Affine.Simplex.signedInfDist E3 #

{V : Type u_1} →
  {P : Type u_2} →
    [inst : NormedAddCommGroup V] →
      [inst_1 : InnerProductSpace ℝ V] →
        [inst_2 : MetricSpace P] →
          [inst_3 : NormedAddTorsor V P] → {n : ℕ} → [NeZero n] → Affine.Simplex ℝ P n → Fin (n + 1) → P →ᴬ[ℝ] ℝ

The signed distance between the face of s excluding point i of that simplex and a point, in the direction of the reference point i. This is expected to be used when the point at which the distance is evaluated lies in the affine span of the simplex (any component of the distance orthogonal to that span is disregarded). In the case of a triangle, these distances are trilinear coordinates; in a tetrahedron, they are quadriplanar coordinates.

theorem Affine.Simplex.signedInfDist_reindex E0 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] {n : ℕ} [inst_4 : NeZero n] (s : Affine.Simplex ℝ P n) {m : ℕ} [inst_5 : NeZero m]
  (e : Fin (n + 1) ≃ Fin (m + 1)) (j : Fin (m + 1)), (s.reindex e).signedInfDist j = s.signedInfDist (e.symm j)

theorem Affine.Simplex.signedInfDist_apply_self E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] {n : ℕ} [inst_4 : NeZero n] (s : Affine.Simplex ℝ P n) (i : Fin (n + 1)),
  (s.signedInfDist i) (s.points i) = ‖s.points i -ᵥ ↑((s.faceOpposite i).orthogonalProjectionSpan (s.points i))‖

theorem Affine.Simplex.signedInfDist_apply_of_ne E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] {n : ℕ} [inst_4 : NeZero n] (s : Affine.Simplex ℝ P n) {i j : Fin (n + 1)},
  j ≠ i → (s.signedInfDist i) (s.points j) = 0

theorem Affine.Simplex.signedInfDist_affineCombination E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] {n : ℕ} [inst_4 : NeZero n] (s : Affine.Simplex ℝ P n) (i : Fin (n + 1))
  {w : Fin (n + 1) → ℝ},
  ∑ i, w i = 1 →
    (s.signedInfDist i) ((Finset.affineCombination ℝ Finset.univ s.points) w) =
      w i * ‖s.points i -ᵥ ↑((s.faceOpposite i).orthogonalProjectionSpan (s.points i))‖

theorem Affine.Simplex.abs_signedInfDist_eq_dist_of_mem_affineSpan_range E1 #

∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] {n : ℕ} [inst_4 : NeZero n] {s : Affine.Simplex ℝ P n} (i : Fin (n + 1)) {p : P},
  p ∈ affineSpan ℝ (Set.range s.points) →
    |(s.signedInfDist i) p| = dist p ↑((s.faceOpposite i).orthogonalProjectionSpan p)