|
| 1 | +/- |
| 2 | +Copyright (c) 2022 Joseph Myers. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Joseph Myers |
| 5 | +-/ |
| 6 | +import analysis.convex.between |
| 7 | +import analysis.convex.strict_convex_space |
| 8 | + |
| 9 | +/-! |
| 10 | +# Betweenness in affine spaces for strictly convex spaces |
| 11 | +
|
| 12 | +This file proves results about betweenness for points in an affine space for a strictly convex |
| 13 | +space. |
| 14 | +
|
| 15 | +-/ |
| 16 | + |
| 17 | +variables {V P : Type*} [normed_add_comm_group V] [normed_space ℝ V] [pseudo_metric_space P] |
| 18 | +variables [normed_add_torsor V P] [strict_convex_space ℝ V] |
| 19 | + |
| 20 | +include V |
| 21 | + |
| 22 | +lemma sbtw.dist_lt_max_dist (p : P) {p₁ p₂ p₃ : P} (h : sbtw ℝ p₁ p₂ p₃) : |
| 23 | + dist p₂ p < max (dist p₁ p) (dist p₃ p) := |
| 24 | +begin |
| 25 | + have hp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p, { by simpa using h.left_ne_right }, |
| 26 | + rw [sbtw, ←wbtw_vsub_const_iff p, wbtw, affine_segment_eq_segment, |
| 27 | + ←insert_endpoints_open_segment, set.mem_insert_iff, set.mem_insert_iff] at h, |
| 28 | + rcases h with ⟨h | h | h, hp₂p₁, hp₂p₃⟩, |
| 29 | + { rw vsub_left_cancel_iff at h, exact false.elim (hp₂p₁ h) }, |
| 30 | + { rw vsub_left_cancel_iff at h, exact false.elim (hp₂p₃ h) }, |
| 31 | + { rw [open_segment_eq_image, set.mem_image] at h, |
| 32 | + rcases h with ⟨r, ⟨hr0, hr1⟩, hr⟩, |
| 33 | + simp_rw [@dist_eq_norm_vsub V, ←hr], |
| 34 | + exact norm_combo_lt_of_ne (le_max_left _ _) (le_max_right _ _) hp₁p₃ (sub_pos.2 hr1) hr0 |
| 35 | + (by abel) } |
| 36 | +end |
| 37 | + |
| 38 | +lemma wbtw.dist_le_max_dist (p : P) {p₁ p₂ p₃ : P} (h : wbtw ℝ p₁ p₂ p₃) : |
| 39 | + dist p₂ p ≤ max (dist p₁ p) (dist p₃ p) := |
| 40 | +begin |
| 41 | + by_cases hp₁ : p₂ = p₁, { simp [hp₁] }, |
| 42 | + by_cases hp₃ : p₂ = p₃, { simp [hp₃] }, |
| 43 | + have hs : sbtw ℝ p₁ p₂ p₃ := ⟨h, hp₁, hp₃⟩, |
| 44 | + exact (hs.dist_lt_max_dist _).le |
| 45 | +end |
| 46 | + |
| 47 | +/-- Given three collinear points, two (not equal) with distance `r` from `p` and one with |
| 48 | +distance at most `r` from `p`, the third point is weakly between the other two points. -/ |
| 49 | +lemma collinear.wbtw_of_dist_eq_of_dist_le {p p₁ p₂ p₃ : P} {r : ℝ} |
| 50 | + (h : collinear ℝ ({p₁, p₂, p₃} : set P)) (hp₁ : dist p₁ p = r) (hp₂ : dist p₂ p ≤ r) |
| 51 | + (hp₃ : dist p₃ p = r) (hp₁p₃ : p₁ ≠ p₃) : wbtw ℝ p₁ p₂ p₃ := |
| 52 | +begin |
| 53 | + rcases h.wbtw_or_wbtw_or_wbtw with hw | hw | hw, |
| 54 | + { exact hw }, |
| 55 | + { by_cases hp₃p₂ : p₃ = p₂, { simp [hp₃p₂] }, |
| 56 | + have hs : sbtw ℝ p₂ p₃ p₁ := ⟨hw, hp₃p₂, hp₁p₃.symm⟩, |
| 57 | + have hs' := hs.dist_lt_max_dist p, |
| 58 | + rw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, or_false] at hs', |
| 59 | + exact false.elim (hp₂.not_lt hs') }, |
| 60 | + { by_cases hp₁p₂ : p₁ = p₂, { simp [hp₁p₂] }, |
| 61 | + have hs : sbtw ℝ p₃ p₁ p₂ := ⟨hw, hp₁p₃, hp₁p₂⟩, |
| 62 | + have hs' := hs.dist_lt_max_dist p, |
| 63 | + rw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, false_or] at hs', |
| 64 | + exact false.elim (hp₂.not_lt hs') } |
| 65 | +end |
| 66 | + |
| 67 | +/-- Given three collinear points, two (not equal) with distance `r` from `p` and one with |
| 68 | +distance less than `r` from `p`, the third point is strictly between the other two points. -/ |
| 69 | +lemma collinear.sbtw_of_dist_eq_of_dist_lt {p p₁ p₂ p₃ : P} {r : ℝ} |
| 70 | + (h : collinear ℝ ({p₁, p₂, p₃} : set P)) (hp₁ : dist p₁ p = r) (hp₂ : dist p₂ p < r) |
| 71 | + (hp₃ : dist p₃ p = r) (hp₁p₃ : p₁ ≠ p₃) : sbtw ℝ p₁ p₂ p₃ := |
| 72 | +begin |
| 73 | + refine ⟨h.wbtw_of_dist_eq_of_dist_le hp₁ hp₂.le hp₃ hp₁p₃, _, _⟩, |
| 74 | + { rintro rfl, exact hp₂.ne hp₁ }, |
| 75 | + { rintro rfl, exact hp₂.ne hp₃ } |
| 76 | +end |
0 commit comments