The areas / V22. Affine, Euclidean and convex geometry
Mathlib.LinearAlgebra.AffineSpace.AffineSubspace.Shift
15 declarations. Mathlib docs · Source
Shifting an affine subspace towards a point
This file introduces a "shift" transformation of affine subspace, where the subspace is translated
relatively to a point c. This is equivalent to AffineSubspace.map (AffineEquiv.constVAdd ..),
but hides the detail of arbitrarily choosing a point in the subspace.
Shifting is controlled by a parameter r, indicating how far the output space is to c. We set
r = 0 to mean the output space passes through c (See AffineSubspace.shift_zero),
while r = 1 means not moving the input space at all (See AffineSubspace.shift_one).
With this convention, this transformation is also equivalent to AffineSubspace.map (homothety c r)
when r is a unit.
Main declarations
AffineSubspace.shiftdefines the shift transformation.AffineSubspace.shift_eqshows the shift transformation is equivalent to translation.AffineSubspace.shift_eq_map_homothetyshows the shift transformation is equivalent to homothety.
def AffineSubspace.shift E3 #
{k : Type u_1} →
{V : Type u_2} →
{P : Type u_3} →
[inst : Ring k] →
[inst_1 : AddCommGroup V] →
[inst_2 : AddTorsor V P] → [inst_3 : Module k V] → AffineSubspace k P → P → k → AffineSubspace k P
AffineSubspace.shift s c r is an affine subspace parallel to s, where an arbitrary point on
s is moved towards c with linear interpolation by r. When r = 0, that point is moved onto
c. When r = 1, that point stays at the original position. A different choice of the point will
not affect the output (See AffineSubspace.shift_eq).
We define AffineSubspace.shift ⊥ c r = ⊥ (See AffineSubspace.shift_bot).
theorem AffineSubspace.direction_shift E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : AddTorsor V P]
[inst_3 : Module k V] (s : AffineSubspace k P) (c : P) (r : k), (s.shift c r).direction = s.direction
theorem AffineSubspace.shift_top E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : AddTorsor V P]
[inst_3 : Module k V] (c : P) (r : k), ⊤.shift c r = ⊤
theorem AffineSubspace.shift_bot E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : AddTorsor V P]
[inst_3 : Module k V] (c : P) (r : k), ⊥.shift c r = ⊥
theorem AffineSubspace.shift_eq E3 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : AddTorsor V P]
[inst_3 : Module k V] {s : AffineSubspace k P} (p : ↥s) (c : P) (r : k),
s.shift c r = AffineSubspace.map (↑(AffineEquiv.constVAdd k P ((1 - r) • (c -ᵥ ↑p)))) s
AffineSubspace.shift s c r can be represented by moving a point in the subspace
towards c.
theorem AffineSubspace.shift_zero E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : AddTorsor V P]
[inst_3 : Module k V] (s : AffineSubspace k P) [h : Nonempty ↥s] (c : P),
s.shift c 0 = AffineSubspace.mk' c s.direction
theorem AffineSubspace.shift_one E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : AddTorsor V P]
[inst_3 : Module k V] (s : AffineSubspace k P) (c : P), s.shift c 1 = s
theorem AffineSubspace.vadd_mem_shift E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : AddTorsor V P]
[inst_3 : Module k V] {s : AffineSubspace k P} {p : P},
p ∈ s → ∀ (c : P) (r : k), (1 - r) • (c -ᵥ p) +ᵥ p ∈ s.shift c r
theorem AffineSubspace.lineMap_mem_shift E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : AddTorsor V P]
[inst_3 : Module k V] {s : AffineSubspace k P} {p : P},
p ∈ s → ∀ (c : P) (r : k), (AffineMap.lineMap c p) r ∈ s.shift c r
theorem AffineSubspace.affineCombination_mem_shift E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : AddTorsor V P]
[inst_3 : Module k V] {ι : Type u_4} [inst_4 : Fintype ι] [Nontrivial ι] (p : ι → P) (i : ι) {w : ι → k},
∑ i, w i = 1 → (Finset.affineCombination k Finset.univ p) w ∈ (affineSpan k (p '' {i}ᶜ)).shift (p i) (1 - w i)
Consider a point A with barycentric coordinates associated to a collection of points P.
If the coordinate associated to one of the points Pᵢ is r, then the point A is on the span
of P \ {Pᵢ} shifted towards Pᵢ with parameter 1 - r.
theorem AffineIndependent.affineCombination_mem_shift_iff E0 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : AddCommGroup V] [inst_2 : AddTorsor V P]
[inst_3 : Module k V] {ι : Type u_4} [inst_4 : Fintype ι] [Nontrivial ι] {p : ι → P},
AffineIndependent k p →
∀ (i : ι) {w : ι → k},
∑ i, w i = 1 →
∀ (c : k), (Finset.affineCombination k Finset.univ p) w ∈ (affineSpan k (p '' {i}ᶜ)).shift (p i) c ↔ w i = 1 - c
The iff version of affineCombination_mem_shift for affine independent points.
theorem AffineSubspace.shift_eq_map_homothety E3 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : CommRing k] [inst_1 : AddCommGroup V] [inst_2 : AddTorsor V P]
[inst_3 : Module k V] (s : AffineSubspace k P) (c : P) {r : k},
IsUnit r → s.shift c r = AffineSubspace.map (AffineMap.homothety c r) s
For a unit parameter, shifting is the same as mapping by homothety.
theorem Affine.Simplex.closedInterior_inter_shift_zero E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : PartialOrder k] [IsOrderedAddMonoid k]
[inst_3 : AddCommGroup V] [inst_4 : AddTorsor V P] [inst_5 : Module k V] {n : ℕ} [NeZero n] (s : Affine.Simplex k P n)
(i : Fin (n + 1)) [ZeroLEOneClass k],
s.closedInterior ∩ ↑((affineSpan k (s.points '' {i}ᶜ)).shift (s.points i) 0) = {s.points i}
The base of a simplex shifted with parameter 0 intersects the closed interior only at the vertex.
theorem Affine.Simplex.disjoint_closedInterior_shift E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring k] [inst_1 : PartialOrder k] [IsOrderedAddMonoid k]
[inst_3 : AddCommGroup V] [inst_4 : AddTorsor V P] [inst_5 : Module k V] {n : ℕ} [NeZero n] (s : Affine.Simplex k P n)
(i : Fin (n + 1)) {x : k},
x < 0 ∨ 1 < x → Disjoint s.closedInterior ↑((affineSpan k (s.points '' {i}ᶜ)).shift (s.points i) x)
The base of a simplex shifted with parameter outside $[0, 1]$ does not intersect the closed interior.
theorem Affine.Simplex.closedInterior_inter_shift_eq_homothety E1 #
∀ {k : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Field k] [inst_1 : LinearOrder k] [IsOrderedRing k]
[inst_3 : AddCommGroup V] [inst_4 : Module k V] [inst_5 : AddTorsor V P] {n : ℕ} [inst_6 : NeZero n]
(s : Affine.Simplex k P n) (i : Fin (n + 1)) {x : k},
x ∈ Set.Icc 0 1 →
s.closedInterior ∩ ↑((affineSpan k (s.points '' {i}ᶜ)).shift (s.points i) x) =
⇑(AffineMap.homothety (s.points i) x) '' (s.faceOpposite i).closedInterior
A parallel cross-section of a simplex is the image of the base under a homothety.