@@ -3,8 +3,9 @@ Copyright (c) 2020 Joseph Myers. All rights reserved.
3
3
Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Joseph Myers, Yury Kudryashov.
5
5
-/
6
- import algebra.add_torsor
6
+ import linear_algebra.affine_space.midpoint
7
7
import topology.metric_space.isometry
8
+ import topology.instances.real_vector_space
8
9
9
10
/-!
10
11
# Torsors of additive normed group actions.
@@ -122,6 +123,14 @@ def vadd_const (p : P) : V ≃ᵢ P :=
122
123
123
124
@[simp] lemma vadd_const_to_equiv (p : P) : (vadd_const p).to_equiv = equiv.vadd_const p := rfl
124
125
126
+ /-- `p' ↦ p -ᵥ p'` as an equivalence. -/
127
+ def const_vsub (p : P) : P ≃ᵢ V :=
128
+ ⟨equiv.const_vsub p, isometry_emetric_iff_metric.2 $ λ p₁ p₂, dist_vsub_cancel_left _ _ _⟩
129
+
130
+ @[simp] lemma coe_const_vsub (p : P) : ⇑(const_vsub p) = (-ᵥ) p := rfl
131
+
132
+ @[simp] lemma coe_const_vsub_symm (p : P) : ⇑(const_vsub p).symm = λ v, -v +ᵥ p := rfl
133
+
125
134
variables (P)
126
135
127
136
/-- The map `p ↦ v +ᵥ p` as an isometric automorphism of `P`. -/
@@ -135,6 +144,57 @@ variable (V)
135
144
@[simp] lemma const_vadd_zero : const_vadd P (0 :V) = isometric.refl P :=
136
145
isometric.to_equiv_inj $ equiv.const_vadd_zero V P
137
146
147
+ variables {P V}
148
+
149
+ /-- Point reflection in `x` as an `isometric` homeomorphism. -/
150
+ def point_reflection (x : P) : P ≃ᵢ P :=
151
+ (const_vsub x).trans (vadd_const x)
152
+
153
+ lemma point_reflection_apply (x y : P) : point_reflection x y = x -ᵥ y +ᵥ x := rfl
154
+
155
+ @[simp] lemma point_reflection_to_equiv (x : P) :
156
+ (point_reflection x).to_equiv = equiv.point_reflection x := rfl
157
+
158
+ @[simp] lemma point_reflection_self (x : P) : point_reflection x x = x :=
159
+ equiv.point_reflection_self x
160
+
161
+ lemma point_reflection_involutive (x : P) : function.involutive (point_reflection x : P → P) :=
162
+ equiv.point_reflection_involutive x
163
+
164
+ @[simp] lemma point_reflection_symm (x : P) : (point_reflection x).symm = point_reflection x :=
165
+ to_equiv_inj $ equiv.point_reflection_symm x
166
+
167
+ @[simp] lemma dist_point_reflection_fixed (x y : P) :
168
+ dist (point_reflection x y) x = dist y x :=
169
+ by rw [← (point_reflection x).dist_eq y x, point_reflection_self]
170
+
171
+ lemma dist_point_reflection_self' (x y : P) :
172
+ dist (point_reflection x y) y = ∥bit0 (x -ᵥ y)∥ :=
173
+ by rw [point_reflection_apply, dist_eq_norm_vsub V, vadd_vsub_assoc, bit0]
174
+
175
+ lemma dist_point_reflection_self (𝕜 : Type *) [normed_field 𝕜] [normed_space 𝕜 V] (x y : P) :
176
+ dist (point_reflection x y) y = ∥(2 :𝕜)∥ * dist x y :=
177
+ by rw [dist_point_reflection_self', ← two_smul' 𝕜 (x -ᵥ y), norm_smul, ← dist_eq_norm_vsub V]
178
+
179
+ lemma point_reflection_fixed_iff (𝕜 : Type *) [normed_field 𝕜] [normed_space 𝕜 V] [invertible (2 :𝕜)]
180
+ {x y : P} :
181
+ point_reflection x y = y ↔ y = x :=
182
+ affine_equiv.point_reflection_fixed_iff_of_module 𝕜
183
+
184
+ variables [normed_space ℝ V]
185
+
186
+ lemma dist_point_reflection_self_real (x y : P) :
187
+ dist (point_reflection x y) y = 2 * dist x y :=
188
+ by { rw [dist_point_reflection_self ℝ, real.norm_two], apply_instance }
189
+
190
+ @[simp] lemma point_reflection_midpoint_left (x y : P) :
191
+ point_reflection (midpoint ℝ x y) x = y :=
192
+ affine_equiv.point_reflection_midpoint_left x y
193
+
194
+ @[simp] lemma point_reflection_midpoint_right (x y : P) :
195
+ point_reflection (midpoint ℝ x y) y = x :=
196
+ affine_equiv.point_reflection_midpoint_right x y
197
+
138
198
end isometric
139
199
140
200
lemma lipschitz_with.vadd [emetric_space α] {f : α → V} {g : α → P} {Kf Kg : ℝ≥0 }
@@ -225,3 +285,21 @@ begin
225
285
(hf.comp (isometric.vadd_const p).isometry),
226
286
exact funext hg
227
287
end
288
+
289
+ variables [normed_space ℝ V] [normed_space ℝ V']
290
+ include V'
291
+
292
+ /-- A continuous map between two normed affine spaces is an affine map provided that
293
+ it sends midpoints to midpoints. -/
294
+ def affine_map.of_map_midpoint (f : P → P')
295
+ (h : ∀ x y, f (midpoint ℝ x y) = midpoint ℝ (f x) (f y))
296
+ (hfc : continuous f) :
297
+ P →ᵃ[ℝ] P' :=
298
+ affine_map.mk' f
299
+ ↑((add_monoid_hom.of_map_midpoint ℝ ℝ
300
+ ((affine_equiv.vadd_const ℝ (f $ classical.arbitrary P)).symm ∘ f ∘
301
+ (affine_equiv.vadd_const ℝ (classical.arbitrary P))) (by simp)
302
+ (λ x y, by simp [h])).to_real_linear_map $ by apply_rules [continuous.vadd, continuous.vsub,
303
+ continuous_const, hfc.comp, continuous_id])
304
+ (classical.arbitrary P)
305
+ (λ p, by simp)
0 commit comments