Module docstring
{"# Torsors of normed space actions.
This file contains lemmas about normed additive torsors over normed spaces. "}
{"# Torsors of normed space actions.
This file contains lemmas about normed additive torsors over normed spaces. "}
AffineSubspace.isClosed_direction_iff
theorem
(s : AffineSubspace π Q) : IsClosed (s.direction : Set W) β IsClosed (s : Set Q)
theorem AffineSubspace.isClosed_direction_iff (s : AffineSubspace π Q) :
IsClosedIsClosed (s.direction : Set W) β IsClosed (s : Set Q) := by
rcases s.eq_bot_or_nonempty with (rfl | β¨x, hxβ©); Β· simp [isClosed_singleton]
rw [β (IsometryEquiv.vaddConst x).toHomeomorph.symm.isClosed_image,
AffineSubspace.coe_direction_eq_vsub_set_right hx]
rfl
dist_center_homothety
theorem
(pβ pβ : P) (c : π) : dist pβ (homothety pβ c pβ) = βcβ * dist pβ pβ
@[simp]
theorem dist_center_homothety (pβ pβ : P) (c : π) :
dist pβ (homothety pβ c pβ) = βcβ * dist pβ pβ := by
simp [homothety_def, norm_smul, β dist_eq_norm_vsub, dist_comm]
nndist_center_homothety
theorem
(pβ pβ : P) (c : π) : nndist pβ (homothety pβ c pβ) = βcββ * nndist pβ pβ
@[simp]
theorem nndist_center_homothety (pβ pβ : P) (c : π) :
nndist pβ (homothety pβ c pβ) = βcββ * nndist pβ pβ :=
NNReal.eq <| dist_center_homothety _ _ _
dist_homothety_center
theorem
(pβ pβ : P) (c : π) : dist (homothety pβ c pβ) pβ = βcβ * dist pβ pβ
@[simp]
theorem dist_homothety_center (pβ pβ : P) (c : π) :
dist (homothety pβ c pβ) pβ = βcβ * dist pβ pβ := by rw [dist_comm, dist_center_homothety]
nndist_homothety_center
theorem
(pβ pβ : P) (c : π) : nndist (homothety pβ c pβ) pβ = βcββ * nndist pβ pβ
@[simp]
theorem nndist_homothety_center (pβ pβ : P) (c : π) :
nndist (homothety pβ c pβ) pβ = βcββ * nndist pβ pβ :=
NNReal.eq <| dist_homothety_center _ _ _
dist_lineMap_lineMap
theorem
(pβ pβ : P) (cβ cβ : π) : dist (lineMap pβ pβ cβ) (lineMap pβ pβ cβ) = dist cβ cβ * dist pβ pβ
@[simp]
theorem dist_lineMap_lineMap (pβ pβ : P) (cβ cβ : π) :
dist (lineMap pβ pβ cβ) (lineMap pβ pβ cβ) = dist cβ cβ * dist pβ pβ := by
rw [dist_comm pβ pβ]
simp only [lineMap_apply, dist_eq_norm_vsub, vadd_vsub_vadd_cancel_right,
β sub_smul, norm_smul, vsub_eq_sub]
nndist_lineMap_lineMap
theorem
(pβ pβ : P) (cβ cβ : π) : nndist (lineMap pβ pβ cβ) (lineMap pβ pβ cβ) = nndist cβ cβ * nndist pβ pβ
@[simp]
theorem nndist_lineMap_lineMap (pβ pβ : P) (cβ cβ : π) :
nndist (lineMap pβ pβ cβ) (lineMap pβ pβ cβ) = nndist cβ cβ * nndist pβ pβ :=
NNReal.eq <| dist_lineMap_lineMap _ _ _ _
lipschitzWith_lineMap
theorem
(pβ pβ : P) : LipschitzWith (nndist pβ pβ) (lineMap pβ pβ : π β P)
theorem lipschitzWith_lineMap (pβ pβ : P) : LipschitzWith (nndist pβ pβ) (lineMap pβ pβ : π β P) :=
LipschitzWith.of_dist_le_mul fun cβ cβ =>
((dist_lineMap_lineMap pβ pβ cβ cβ).trans (mul_comm _ _)).le
dist_lineMap_left
theorem
(pβ pβ : P) (c : π) : dist (lineMap pβ pβ c) pβ = βcβ * dist pβ pβ
@[simp]
theorem dist_lineMap_left (pβ pβ : P) (c : π) : dist (lineMap pβ pβ c) pβ = βcβ * dist pβ pβ := by
simpa only [lineMap_apply_zero, dist_zero_right] using dist_lineMap_lineMap pβ pβ c 0
nndist_lineMap_left
theorem
(pβ pβ : P) (c : π) : nndist (lineMap pβ pβ c) pβ = βcββ * nndist pβ pβ
@[simp]
theorem nndist_lineMap_left (pβ pβ : P) (c : π) :
nndist (lineMap pβ pβ c) pβ = βcββ * nndist pβ pβ :=
NNReal.eq <| dist_lineMap_left _ _ _
dist_left_lineMap
theorem
(pβ pβ : P) (c : π) : dist pβ (lineMap pβ pβ c) = βcβ * dist pβ pβ
@[simp]
theorem dist_left_lineMap (pβ pβ : P) (c : π) : dist pβ (lineMap pβ pβ c) = βcβ * dist pβ pβ :=
(dist_comm _ _).trans (dist_lineMap_left _ _ _)
nndist_left_lineMap
theorem
(pβ pβ : P) (c : π) : nndist pβ (lineMap pβ pβ c) = βcββ * nndist pβ pβ
@[simp]
theorem nndist_left_lineMap (pβ pβ : P) (c : π) :
nndist pβ (lineMap pβ pβ c) = βcββ * nndist pβ pβ :=
NNReal.eq <| dist_left_lineMap _ _ _
dist_lineMap_right
theorem
(pβ pβ : P) (c : π) : dist (lineMap pβ pβ c) pβ = β1 - cβ * dist pβ pβ
@[simp]
theorem dist_lineMap_right (pβ pβ : P) (c : π) :
dist (lineMap pβ pβ c) pβ = β1 - cβ * dist pβ pβ := by
simpa only [lineMap_apply_one, dist_eq_norm'] using dist_lineMap_lineMap pβ pβ c 1
nndist_lineMap_right
theorem
(pβ pβ : P) (c : π) : nndist (lineMap pβ pβ c) pβ = β1 - cββ * nndist pβ pβ
@[simp]
theorem nndist_lineMap_right (pβ pβ : P) (c : π) :
nndist (lineMap pβ pβ c) pβ = β1 - cββ * nndist pβ pβ :=
NNReal.eq <| dist_lineMap_right _ _ _
dist_right_lineMap
theorem
(pβ pβ : P) (c : π) : dist pβ (lineMap pβ pβ c) = β1 - cβ * dist pβ pβ
@[simp]
theorem dist_right_lineMap (pβ pβ : P) (c : π) : dist pβ (lineMap pβ pβ c) = β1 - cβ * dist pβ pβ :=
(dist_comm _ _).trans (dist_lineMap_right _ _ _)
nndist_right_lineMap
theorem
(pβ pβ : P) (c : π) : nndist pβ (lineMap pβ pβ c) = β1 - cββ * nndist pβ pβ
@[simp]
theorem nndist_right_lineMap (pβ pβ : P) (c : π) :
nndist pβ (lineMap pβ pβ c) = β1 - cββ * nndist pβ pβ :=
NNReal.eq <| dist_right_lineMap _ _ _
dist_homothety_self
theorem
(pβ pβ : P) (c : π) : dist (homothety pβ c pβ) pβ = β1 - cβ * dist pβ pβ
@[simp]
theorem dist_homothety_self (pβ pβ : P) (c : π) :
dist (homothety pβ c pβ) pβ = β1 - cβ * dist pβ pβ := by
rw [homothety_eq_lineMap, dist_lineMap_right]
nndist_homothety_self
theorem
(pβ pβ : P) (c : π) : nndist (homothety pβ c pβ) pβ = β1 - cββ * nndist pβ pβ
@[simp]
theorem nndist_homothety_self (pβ pβ : P) (c : π) :
nndist (homothety pβ c pβ) pβ = β1 - cββ * nndist pβ pβ :=
NNReal.eq <| dist_homothety_self _ _ _
dist_self_homothety
theorem
(pβ pβ : P) (c : π) : dist pβ (homothety pβ c pβ) = β1 - cβ * dist pβ pβ
@[simp]
theorem dist_self_homothety (pβ pβ : P) (c : π) :
dist pβ (homothety pβ c pβ) = β1 - cβ * dist pβ pβ := by rw [dist_comm, dist_homothety_self]
nndist_self_homothety
theorem
(pβ pβ : P) (c : π) : nndist pβ (homothety pβ c pβ) = β1 - cββ * nndist pβ pβ
@[simp]
theorem nndist_self_homothety (pβ pβ : P) (c : π) :
nndist pβ (homothety pβ c pβ) = β1 - cββ * nndist pβ pβ :=
NNReal.eq <| dist_self_homothety _ _ _
dist_left_midpoint
theorem
(pβ pβ : P) : dist pβ (midpoint π pβ pβ) = β(2 : π)ββ»ΒΉ * dist pβ pβ
@[simp]
theorem dist_left_midpoint (pβ pβ : P) : dist pβ (midpoint π pβ pβ) = β(2 : π)ββ(2 : π)ββ»ΒΉ * dist pβ pβ := by
rw [midpoint, dist_comm, dist_lineMap_left, invOf_eq_inv, β norm_inv]
nndist_left_midpoint
theorem
(pβ pβ : P) : nndist pβ (midpoint π pβ pβ) = β(2 : π)βββ»ΒΉ * nndist pβ pβ
@[simp]
theorem nndist_left_midpoint (pβ pβ : P) :
nndist pβ (midpoint π pβ pβ) = β(2 : π)βββ(2 : π)βββ»ΒΉ * nndist pβ pβ :=
NNReal.eq <| dist_left_midpoint _ _
dist_midpoint_left
theorem
(pβ pβ : P) : dist (midpoint π pβ pβ) pβ = β(2 : π)ββ»ΒΉ * dist pβ pβ
@[simp]
theorem dist_midpoint_left (pβ pβ : P) : dist (midpoint π pβ pβ) pβ = β(2 : π)ββ(2 : π)ββ»ΒΉ * dist pβ pβ := by
rw [dist_comm, dist_left_midpoint]
nndist_midpoint_left
theorem
(pβ pβ : P) : nndist (midpoint π pβ pβ) pβ = β(2 : π)βββ»ΒΉ * nndist pβ pβ
@[simp]
theorem nndist_midpoint_left (pβ pβ : P) :
nndist (midpoint π pβ pβ) pβ = β(2 : π)βββ(2 : π)βββ»ΒΉ * nndist pβ pβ :=
NNReal.eq <| dist_midpoint_left _ _
dist_midpoint_right
theorem
(pβ pβ : P) : dist (midpoint π pβ pβ) pβ = β(2 : π)ββ»ΒΉ * dist pβ pβ
@[simp]
theorem dist_midpoint_right (pβ pβ : P) :
dist (midpoint π pβ pβ) pβ = β(2 : π)ββ(2 : π)ββ»ΒΉ * dist pβ pβ := by
rw [midpoint_comm, dist_midpoint_left, dist_comm]
nndist_midpoint_right
theorem
(pβ pβ : P) : nndist (midpoint π pβ pβ) pβ = β(2 : π)βββ»ΒΉ * nndist pβ pβ
@[simp]
theorem nndist_midpoint_right (pβ pβ : P) :
nndist (midpoint π pβ pβ) pβ = β(2 : π)βββ(2 : π)βββ»ΒΉ * nndist pβ pβ :=
NNReal.eq <| dist_midpoint_right _ _
dist_right_midpoint
theorem
(pβ pβ : P) : dist pβ (midpoint π pβ pβ) = β(2 : π)ββ»ΒΉ * dist pβ pβ
@[simp]
theorem dist_right_midpoint (pβ pβ : P) :
dist pβ (midpoint π pβ pβ) = β(2 : π)ββ(2 : π)ββ»ΒΉ * dist pβ pβ := by
rw [dist_comm, dist_midpoint_right]
nndist_right_midpoint
theorem
(pβ pβ : P) : nndist pβ (midpoint π pβ pβ) = β(2 : π)βββ»ΒΉ * nndist pβ pβ
@[simp]
theorem nndist_right_midpoint (pβ pβ : P) :
nndist pβ (midpoint π pβ pβ) = β(2 : π)βββ(2 : π)βββ»ΒΉ * nndist pβ pβ :=
NNReal.eq <| dist_right_midpoint _ _
dist_left_midpoint_eq_dist_right_midpoint
theorem
(pβ pβ : P) : dist pβ (midpoint π pβ pβ) = dist pβ (midpoint π pβ pβ)
/-- The midpoint of the segment AB is the same distance from A as it is from B. -/
theorem dist_left_midpoint_eq_dist_right_midpoint (pβ pβ : P) :
dist pβ (midpoint π pβ pβ) = dist pβ (midpoint π pβ pβ) := by
rw [dist_left_midpoint pβ pβ, dist_right_midpoint pβ pβ]
dist_midpoint_midpoint_le'
theorem
(pβ pβ pβ pβ : P) : dist (midpoint π pβ pβ) (midpoint π pβ pβ) β€ (dist pβ pβ + dist pβ pβ) / β(2 : π)β
theorem dist_midpoint_midpoint_le' (pβ pβ pβ pβ : P) :
dist (midpoint π pβ pβ) (midpoint π pβ pβ) β€ (dist pβ pβ + dist pβ pβ) / β(2 : π)β := by
rw [dist_eq_norm_vsub V, dist_eq_norm_vsub V, dist_eq_norm_vsub V, midpoint_vsub_midpoint]
rw [midpoint_eq_smul_add, norm_smul, invOf_eq_inv, norm_inv, β div_eq_inv_mul]
exact div_le_div_of_nonneg_right (norm_add_le _ _) (norm_nonneg _)
nndist_midpoint_midpoint_le'
theorem
(pβ pβ pβ pβ : P) : nndist (midpoint π pβ pβ) (midpoint π pβ pβ) β€ (nndist pβ pβ + nndist pβ pβ) / β(2 : π)ββ
theorem nndist_midpoint_midpoint_le' (pβ pβ pβ pβ : P) :
nndist (midpoint π pβ pβ) (midpoint π pβ pβ) β€ (nndist pβ pβ + nndist pβ pβ) / β(2 : π)ββ :=
dist_midpoint_midpoint_le' _ _ _ _
dist_pointReflection_left
theorem
(p q : P) : dist (Equiv.pointReflection p q) p = dist p q
@[simp] theorem dist_pointReflection_left (p q : P) :
dist (Equiv.pointReflection p q) p = dist p q := by
simp [dist_eq_norm_vsub V, Equiv.pointReflection_vsub_left (G := V)]
dist_left_pointReflection
theorem
(p q : P) : dist p (Equiv.pointReflection p q) = dist p q
@[simp] theorem dist_left_pointReflection (p q : P) :
dist p (Equiv.pointReflection p q) = dist p q :=
(dist_comm _ _).trans (dist_pointReflection_left _ _)
dist_pointReflection_right
theorem
(p q : P) : dist (Equiv.pointReflection p q) q = β(2 : π)β * dist p q
theorem dist_pointReflection_right (p q : P) :
dist (Equiv.pointReflection p q) q = β(2 : π)β * dist p q := by
simp [dist_eq_norm_vsub V, Equiv.pointReflection_vsub_right (G := V), β Nat.cast_smul_eq_nsmul π,
norm_smul]
dist_right_pointReflection
theorem
(p q : P) : dist q (Equiv.pointReflection p q) = β(2 : π)β * dist p q
theorem dist_right_pointReflection (p q : P) :
dist q (Equiv.pointReflection p q) = β(2 : π)β * dist p q :=
(dist_comm _ _).trans (dist_pointReflection_right π _ _)
antilipschitzWith_lineMap
theorem
{pβ pβ : Q} (h : pβ β pβ) : AntilipschitzWith (nndist pβ pβ)β»ΒΉ (lineMap pβ pβ : π β Q)
theorem antilipschitzWith_lineMap {pβ pβ : Q} (h : pβ β pβ) :
AntilipschitzWith (nndist pβ pβ)β»ΒΉ (lineMap pβ pβ : π β Q) :=
AntilipschitzWith.of_le_mul_dist fun cβ cβ => by
rw [dist_lineMap_lineMap, NNReal.coe_inv, β dist_nndist, mul_left_comm,
inv_mul_cancelβ (dist_ne_zero.2 h), mul_one]
eventually_homothety_mem_of_mem_interior
theorem
(x : Q) {s : Set Q} {y : Q} (hy : y β interior s) : βαΆ Ξ΄ in π (1 : π), homothety x Ξ΄ y β s
theorem eventually_homothety_mem_of_mem_interior (x : Q) {s : Set Q} {y : Q} (hy : y β interior s) :
βαΆ Ξ΄ in π (1 : π), homothety x Ξ΄ y β s := by
rw [(NormedAddCommGroup.nhds_basis_norm_lt (1 : π)).eventually_iff]
rcases eq_or_ne y x with h | h
Β· use 1
simp [h.symm, interior_subset hy]
have hxy : 0 < βy -α΅₯ xβ := by rwa [norm_pos_iff, vsub_ne_zero]
obtain β¨u, huβ, huβ, huββ© := mem_interior.mp hy
obtain β¨Ξ΅, hΞ΅, hyΞ΅β© := Metric.isOpen_iff.mp huβ y huβ
refine β¨Ξ΅ / βy -α΅₯ xβ, div_pos hΞ΅ hxy, fun Ξ΄ (hΞ΄ : βΞ΄ - 1β < Ξ΅ / βy -α΅₯ xβ) => huβ (hyΞ΅ ?_)β©
rw [lt_div_iffβ hxy, β norm_smul, sub_smul, one_smul] at hΞ΄
rwa [homothety_apply, Metric.mem_ball, dist_eq_norm_vsub W, vadd_vsub_eq_sub_vsub]
eventually_homothety_image_subset_of_finite_subset_interior
theorem
(x : Q) {s : Set Q} {t : Set Q} (ht : t.Finite) (h : t β interior s) : βαΆ Ξ΄ in π (1 : π), homothety x Ξ΄ '' t β s
theorem eventually_homothety_image_subset_of_finite_subset_interior (x : Q) {s : Set Q} {t : Set Q}
(ht : t.Finite) (h : t β interior s) : βαΆ Ξ΄ in π (1 : π), homothety x Ξ΄ '' t β s := by
suffices β y β t, βαΆ Ξ΄ in π (1 : π), homothety x Ξ΄ y β s by
simp_rw [Set.image_subset_iff]
exact (Filter.eventually_all_finite ht).mpr this
intro y hy
exact eventually_homothety_mem_of_mem_interior π x (h hy)
dist_midpoint_midpoint_le
theorem
(pβ pβ pβ pβ : V) : dist (midpoint β pβ pβ) (midpoint β pβ pβ) β€ (dist pβ pβ + dist pβ pβ) / 2
theorem dist_midpoint_midpoint_le (pβ pβ pβ pβ : V) :
dist (midpoint β pβ pβ) (midpoint β pβ pβ) β€ (dist pβ pβ + dist pβ pβ) / 2 := by
simpa using dist_midpoint_midpoint_le' (π := β) pβ pβ pβ pβ
nndist_midpoint_midpoint_le
theorem
(pβ pβ pβ pβ : V) : nndist (midpoint β pβ pβ) (midpoint β pβ pβ) β€ (nndist pβ pβ + nndist pβ pβ) / 2
theorem nndist_midpoint_midpoint_le (pβ pβ pβ pβ : V) :
nndist (midpoint β pβ pβ) (midpoint β pβ pβ) β€ (nndist pβ pβ + nndist pβ pβ) / 2 :=
dist_midpoint_midpoint_le _ _ _ _
AffineMap.ofMapMidpoint
definition
(f : P β Q) (h : β x y, f (midpoint β x y) = midpoint β (f x) (f y)) (hfc : Continuous f) : P βα΅[β] Q
/-- A continuous map between two normed affine spaces is an affine map provided that
it sends midpoints to midpoints. -/
def AffineMap.ofMapMidpoint (f : P β Q) (h : β x y, f (midpoint β x y) = midpoint β (f x) (f y))
(hfc : Continuous f) : P βα΅[β] Q :=
let c := Classical.arbitrary P
AffineMap.mk' f (β((AddMonoidHom.ofMapMidpoint β β
((AffineEquiv.vaddConst β (f <| c)).symm β f β AffineEquiv.vaddConst β c) (by simp)
fun x y => by simp [h]).toRealLinearMap <| by
apply_rules [Continuous.vadd, Continuous.vsub, continuous_const, hfc.comp, continuous_id]))
c fun p => by simp
DilationEquiv.smulTorsor
definition
(c : P) {k : π} (hk : k β 0) : E βα΅ P
/-- Scaling by an element `k` of the scalar ring as a `DilationEquiv` with ratio `βkββ`, mapping
from a normed space to a normed torsor over that space sending `0` to `c`. -/
@[simps]
def DilationEquiv.smulTorsor (c : P) {k : π} (hk : k β 0) : E βα΅ P where
toFun := (k β’ Β· +α΅₯ c)
invFun := kβ»ΒΉ β’ (Β· -α΅₯ c)
left_inv x := by simp [inv_smul_smulβ hk]
right_inv p := by simp [smul_inv_smulβ hk]
edist_eq' := β¨βkββ, nnnorm_ne_zero_iff.mpr hk, fun x y β¦ by
rw [show edist (k β’ x +α΅₯ c) (k β’ y +α΅₯ c) = _ from (IsometryEquiv.vaddConst c).isometry ..]
exact edist_smulβ ..β©
DilationEquiv.smulTorsor_ratio
theorem
{c : P} {k : π} (hk : k β 0) {x y : E} (h : dist x y β 0) : ratio (smulTorsor c hk) = βkββ
@[simp]
lemma DilationEquiv.smulTorsor_ratio {c : P} {k : π} (hk : k β 0) {x y : E}
(h : distdist x y β 0) : ratio (smulTorsor c hk) = βkββ :=
Eq.symm <| ratio_unique_of_dist_ne_zero h <| by simp [dist_eq_norm, β smul_sub, norm_smul]
DilationEquiv.smulTorsor_preimage_ball
theorem
{c : P} {k : π} (hk : k β 0) : smulTorsor c hk β»ΒΉ' (Metric.ball c βkβ) = Metric.ball (0 : E) 1
@[simp]
lemma DilationEquiv.smulTorsor_preimage_ball {c : P} {k : π} (hk : k β 0) :
smulTorsorsmulTorsor c hk β»ΒΉ' (Metric.ball c βkβ) = Metric.ball (0 : E) 1 := by
aesop (add simp norm_smul)