|
|
|
|
Quelle AddTorsor.lean
Sprache: Lean
|
|
/-
Copyright (c) 2020 Joseph Myers. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Myers, Yury Kudryashov
-/
module
public import Mathlib.Algebra.CharP.Invertible
public import Mathlib.Analysis.Normed.Group.AddTorsor
public import Mathlib.Analysis.Normed.Module.Basic
public import Mathlib.LinearAlgebra.AffineSpace.Midpoint
public import Mathlib.Topology.Instances.RealVectorSpace
import Mathlib.Analysis.Normed.Module.Ball.Pointwise
set_option doc.verso true
set_option doc.verso.suggestions false
/-!
# Torsors of normed space actions.
This file contains lemmas about normed additive torsors over normed spaces.
-/
@[expose] public section
noncomputable section
open NNReal
variable {V P W Q : Type*} [SeminormedAddCommGroup V] [PseudoMetricSpace P] [NormedAddTorsor V P]
[NormedAddCommGroup W] [MetricSpace Q] [NormedAddTorsor W Q]
section NormedSpace
variable { : Type*} [NormedField ] [NormedSpace V] [NormedSpace W]
open AffineMap
@[simp]
theorem dist_homothety (p₁ p₂ p : P) (c : ) :
dist (homothety p c p₁) (homothety p c p₂) = ‖c‖ * dist p₁ p₂ := by
simp [dist_eq_norm_vsub, ← (homothety p c).linear_apply_vsub, homothety_linear, norm_smul]
@[simp]
theorem nndist_homothety (p₁ p₂ p : P) (c : ) :
nndist (homothety p c p₁) (homothety p c p₂) = ‖c‖₊ * nndist p₁ p₂ :=
NNReal.eq <| dist_homothety p₁ p₂ p c
theorem lipschitzWith_homothety (p : P) (c : ) : LipschitzWith ‖c‖₊ (homothety p c) :=
LipschitzWith.of_dist_le_mul fun p₁ p₂ ↦ (dist_homothety p₁ p₂ p c).le
@[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]
@[simp]
theorem nndist_center_homothety (p₁ p₂ : P) (c : ) :
nndist p₁ (homothety p₁ c p₂) = ‖c‖₊ * nndist p₁ p₂ :=
NNReal.eq <| dist_center_homothety _ _ _
@[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]
@[simp]
theorem nndist_homothety_center (p₁ p₂ : P) (c : ) :
nndist (homothety p₁ c p₂) p₁ = ‖c‖₊ * nndist p₁ p₂ :=
NNReal.eq <| dist_homothety_center _ _ _
@[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]
@[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 _ _ _ _
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
@[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
@[simp]
theorem nndist_lineMap_left (p₁ p₂ : P) (c : ) :
nndist (lineMap p₁ p₂ c) p₁ = ‖c‖₊ * nndist p₁ p₂ :=
NNReal.eq <| dist_lineMap_left _ _ _
@[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 _ _ _)
@[simp]
theorem nndist_left_lineMap (p₁ p₂ : P) (c : ) :
nndist p₁ (lineMap p₁ p₂ c) = ‖c‖₊ * nndist p₁ p₂ :=
NNReal.eq <| dist_left_lineMap _ _ _
@[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
@[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 _ _ _
@[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 _ _ _)
@[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 _ _ _
@[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]
@[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 _ _ _
@[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]
@[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 _ _ _
open scoped Pointwise in
private theorem image_homothety (c : P) (x : ) (s : Set P) :
homothety c x '' s =
IsometryEquiv.vaddConst c '' (x • ((IsometryEquiv.vaddConst c).symm '' s)) := by
simp [← Set.image_smul, ← Set.image_comp]; rfl
theorem Metric.image_homothety_ball (p c : P) (r : ℝ) {x : } (hx : x ≠ 0) :
homothety c x '' ball p r = ball (homothety c x p) (‖x‖ * r) := by
rw [image_homothety, IsometryEquiv.image_ball, smul_ball hx, IsometryEquiv.image_ball]
simp [homothety_apply]
theorem Metric.image_homothety_closedBall (p c : P) (r : ℝ) {x : } (hx : x ≠ 0) :
homothety c x '' closedBall p r = closedBall (homothety c x p) (‖x‖ * r) := by
rw [image_homothety, IsometryEquiv.image_closedBall, smul_closedBall' hx,
IsometryEquiv.image_closedBall]
simp [homothety_apply]
theorem Metric.image_homothety_closedBall_of_nonneg (p c : Q) {r : ℝ} (hr : 0 ≤ r) (x : ) :
homothety c x '' closedBall p r = closedBall (homothety c x p) (‖x‖ * r) := by
rw [image_homothety, IsometryEquiv.image_closedBall, smul_closedBall x _ hr,
IsometryEquiv.image_closedBall]
simp [homothety_apply]
theorem Metric.image_homothety_sphere (p c : P) (r : ℝ) {x : } (hx : x ≠ 0) :
homothety c x '' sphere p r = sphere (homothety c x p) (‖x‖ * r) := by
rw [← closedBall_sdiff_ball, ← closedBall_sdiff_ball, Set.image_sdiff (homothety_injective c hx),
image_homothety_ball p c r hx, image_homothety_closedBall p c r hx]
theorem Metric.image_homothety_sphere_of_nonneg [NormedSpace ℝ W] [Nontrivial W]
(p c : Q) {r : ℝ} (hr : 0 ≤ r) (x : ) :
homothety c x '' sphere p r = sphere (homothety c x p) (‖x‖ * r) := by
rw [image_homothety, IsometryEquiv.image_sphere, smul_sphere x _ hr,
IsometryEquiv.image_sphere]
simp [homothety_apply]
section invertibleTwo
variable [Invertible (2 : )]
@[simp]
theorem dist_left_midpoint (p₁ p₂ : P) : dist p₁ (midpoint p₁ p₂) = ‖(2 : )‖⁻¹ * dist p₁ p₂ := by
rw [midpoint, dist_comm, dist_lineMap_left, invOf_eq_inv, ← norm_inv]
@[simp]
theorem nndist_left_midpoint (p₁ p₂ : P) :
nndist p₁ (midpoint p₁ p₂) = ‖(2 : )‖₊⁻¹ * nndist p₁ p₂ :=
NNReal.eq <| dist_left_midpoint _ _
@[simp]
theorem dist_midpoint_left (p₁ p₂ : P) : dist (midpoint p₁ p₂) p₁ = ‖(2 : )‖⁻¹ * dist p₁ p₂ := by
rw [dist_comm, dist_left_midpoint]
@[simp]
theorem nndist_midpoint_left (p₁ p₂ : P) :
nndist (midpoint p₁ p₂) p₁ = ‖(2 : )‖₊⁻¹ * nndist p₁ p₂ :=
NNReal.eq <| dist_midpoint_left _ _
@[simp]
theorem dist_midpoint_right (p₁ p₂ : P) :
dist (midpoint p₁ p₂) p₂ = ‖(2 : )‖⁻¹ * dist p₁ p₂ := by
rw [midpoint_comm, dist_midpoint_left, dist_comm]
@[simp]
theorem nndist_midpoint_right (p₁ p₂ : P) :
nndist (midpoint p₁ p₂) p₂ = ‖(2 : )‖₊⁻¹ * nndist p₁ p₂ :=
NNReal.eq <| dist_midpoint_right _ _
@[simp]
theorem dist_right_midpoint (p₁ p₂ : P) :
dist p₂ (midpoint p₁ p₂) = ‖(2 : )‖⁻¹ * dist p₁ p₂ := by
rw [dist_comm, dist_midpoint_right]
@[simp]
theorem nndist_right_midpoint (p₁ p₂ : P) :
nndist p₂ (midpoint p₁ p₂) = ‖(2 : )‖₊⁻¹ * nndist p₁ p₂ :=
NNReal.eq <| dist_right_midpoint _ _
/-- 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₂]
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]
grw [norm_add_le]
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' _ _ _ _
end invertibleTwo
@[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)]
@[simp] theorem dist_left_pointReflection (p q : P) :
dist p (Equiv.pointReflection p q) = dist p q :=
(dist_comm _ _).trans (dist_pointReflection_left _ _)
variable () in
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]
variable () in
theorem dist_right_pointReflection (p q : P) :
dist q (Equiv.pointReflection p q) = ‖(2 : )‖ * dist p q :=
(dist_comm _ _).trans (dist_pointReflection_right _ _)
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]
end NormedSpace
variable [NormedSpace ℝ V] [NormedSpace ℝ W]
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₄
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 _ _ _ _
/-- 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
end
section
open Dilation
variable { E : Type*} [NormedDivisionRing ] [SeminormedAddCommGroup E]
variable [Module E] [NormSMulClass E] {P : Type*} [PseudoMetricSpace P] [NormedAddTorsor E P]
-- TODO: reimplement this as a `ContinuousAffineEquiv`.
/-- 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₀ ..⟩
-- Cannot be @[simp] because `x` and `y` cannot be inferred by `simp`.
lemma DilationEquiv.smulTorsor_ratio {c : P} {k : } (hk : k ≠ 0) {x y : E}
(h : dist 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]
@[simp]
lemma DilationEquiv.smulTorsor_preimage_ball {c : P} {k : } (hk : k ≠ 0) :
smulTorsor c hk ⁻¹' (Metric.ball c ‖k‖) = Metric.ball (0 : E) 1 := by
aesop (add simp norm_smul)
end
¤ Dauer der Verarbeitung: 0.8 Sekunden
¤
*© Formatika GbR, Deutschland
|
|
2026-11-24
|
|
|
|
|