|
| 1 | +/- |
| 2 | +Copyright (c) 2020 Joseph Myers. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Author: Joseph Myers. |
| 5 | +-/ |
| 6 | +import algebra.add_torsor |
| 7 | +import analysis.normed_space.basic |
| 8 | + |
| 9 | +noncomputable theory |
| 10 | + |
| 11 | +/-! |
| 12 | +# Torsors of additive normed group actions. |
| 13 | +
|
| 14 | +This file defines torsors of additive normed group actions, with a |
| 15 | +metric space structure. The motivating case is Euclidean affine |
| 16 | +spaces. |
| 17 | +
|
| 18 | +-/ |
| 19 | + |
| 20 | +universes u v |
| 21 | + |
| 22 | +section prio |
| 23 | +set_option default_priority 100 -- see Note [default priority] |
| 24 | +/-- A `normed_add_torsor V P` is a torsor of an additive normed group |
| 25 | +action by a `normed_group V` on points `P`. We bundle the metric space |
| 26 | +structure and require the distance to be the same as results from the |
| 27 | +norm (which in fact implies the distance yields a metric space, but |
| 28 | +bundling just the distance and using an instance for the metric space |
| 29 | +results in type class problems). -/ |
| 30 | +class normed_add_torsor (V : Type u) (P : Type v) [normed_group V] [metric_space P] |
| 31 | + extends add_torsor V P := |
| 32 | +(dist_eq_norm' : ∀ (x y : P), dist x y = ∥(x -ᵥ y : V)∥) |
| 33 | +end prio |
| 34 | + |
| 35 | +/-- The distance equals the norm of subtracting two points. This lemma |
| 36 | +is needed to make V an explicit rather than implicit argument. -/ |
| 37 | +lemma add_torsor.dist_eq_norm (V : Type u) {P : Type v} [normed_group V] [metric_space P] |
| 38 | + [normed_add_torsor V P] (x y : P) : |
| 39 | + dist x y = ∥(x -ᵥ y : V)∥ := |
| 40 | +normed_add_torsor.dist_eq_norm' x y |
| 41 | + |
| 42 | +/-- A `normed_group` is a `normed_add_torsor` over itself. -/ |
| 43 | +instance normed_group.normed_add_torsor (V : Type u) [normed_group V] : |
| 44 | + normed_add_torsor V V := |
| 45 | +{ dist_eq_norm' := dist_eq_norm } |
| 46 | + |
| 47 | +open add_torsor |
| 48 | + |
| 49 | +/-- The distance defines a metric space structure on the torsor. This |
| 50 | +is not an instance because it depends on `V` to define a `metric_space |
| 51 | +P`. -/ |
| 52 | +def metric_space_of_normed_group_of_add_torsor (V : Type u) (P : Type v) [normed_group V] |
| 53 | + [add_torsor V P] : metric_space P := |
| 54 | +{ dist := λ x y, ∥(x -ᵥ y : V)∥, |
| 55 | + dist_self := λ x, by simp, |
| 56 | + eq_of_dist_eq_zero := λ x y h, by simpa using h, |
| 57 | + dist_comm := λ x y, by simp only [←neg_vsub_eq_vsub_rev V y x, norm_neg], |
| 58 | + dist_triangle := begin |
| 59 | + intros x y z, |
| 60 | + change ∥x -ᵥ z∥ ≤ ∥x -ᵥ y∥ + ∥y -ᵥ z∥, |
| 61 | + rw ←vsub_add_vsub_cancel, |
| 62 | + apply norm_add_le |
| 63 | + end } |
0 commit comments