analysis.convex.strict_convex_betweenMathlib.Analysis.Convex.StrictConvexBetween

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -30,11 +30,11 @@ theorem Sbtw.dist_lt_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p
   by
   have hp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p := by simpa using h.left_ne_right
   rw [Sbtw, ← wbtw_vsub_const_iff p, Wbtw, affineSegment_eq_segment, ← insert_endpoints_openSegment,
-    Set.mem_insert_iff, Set.mem_insert_iff] at h 
+    Set.mem_insert_iff, Set.mem_insert_iff] at h
   rcases h with ⟨h | h | h, hp₂p₁, hp₂p₃⟩
-  · rw [vsub_left_cancel_iff] at h ; exact False.elim (hp₂p₁ h)
-  · rw [vsub_left_cancel_iff] at h ; exact False.elim (hp₂p₃ h)
-  · rw [openSegment_eq_image, Set.mem_image] at h 
+  · rw [vsub_left_cancel_iff] at h; exact False.elim (hp₂p₁ h)
+  · rw [vsub_left_cancel_iff] at h; exact False.elim (hp₂p₃ h)
+  · rw [openSegment_eq_image, Set.mem_image] at h
     rcases h with ⟨r, ⟨hr0, hr1⟩, hr⟩
     simp_rw [@dist_eq_norm_vsub V, ← hr]
     exact
@@ -65,12 +65,12 @@ theorem Collinear.wbtw_of_dist_eq_of_dist_le {p p₁ p₂ p₃ : P} {r : ℝ}
   · by_cases hp₃p₂ : p₃ = p₂; · simp [hp₃p₂]
     have hs : Sbtw ℝ p₂ p₃ p₁ := ⟨hw, hp₃p₂, hp₁p₃.symm⟩
     have hs' := hs.dist_lt_max_dist p
-    rw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, or_false_iff] at hs' 
+    rw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, or_false_iff] at hs'
     exact False.elim (hp₂.not_lt hs')
   · by_cases hp₁p₂ : p₁ = p₂; · simp [hp₁p₂]
     have hs : Sbtw ℝ p₃ p₁ p₂ := ⟨hw, hp₁p₃, hp₁p₂⟩
     have hs' := hs.dist_lt_max_dist p
-    rw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, false_or_iff] at hs' 
+    rw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, false_or_iff] at hs'
     exact False.elim (hp₂.not_lt hs')
 #align collinear.wbtw_of_dist_eq_of_dist_le Collinear.wbtw_of_dist_eq_of_dist_le
 -/
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Joseph Myers. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Joseph Myers
 -/
-import Mathbin.Analysis.Convex.Between
-import Mathbin.Analysis.Convex.StrictConvexSpace
+import Analysis.Convex.Between
+import Analysis.Convex.StrictConvexSpace
 
 #align_import analysis.convex.strict_convex_between from "leanprover-community/mathlib"@"38df578a6450a8c5142b3727e3ae894c2300cae0"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Joseph Myers. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Joseph Myers
-
-! This file was ported from Lean 3 source module analysis.convex.strict_convex_between
-! leanprover-community/mathlib commit 38df578a6450a8c5142b3727e3ae894c2300cae0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.Convex.Between
 import Mathbin.Analysis.Convex.StrictConvexSpace
 
+#align_import analysis.convex.strict_convex_between from "leanprover-community/mathlib"@"38df578a6450a8c5142b3727e3ae894c2300cae0"
+
 /-!
 # Betweenness in affine spaces for strictly convex spaces
 
Diff
@@ -27,8 +27,7 @@ variable {V P : Type _} [NormedAddCommGroup V] [NormedSpace ℝ V] [PseudoMetric
 
 variable [NormedAddTorsor V P] [StrictConvexSpace ℝ V]
 
-include V
-
+#print Sbtw.dist_lt_max_dist /-
 theorem Sbtw.dist_lt_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p₂ p₃) :
     dist p₂ p < max (dist p₁ p) (dist p₃ p) :=
   by
@@ -44,7 +43,9 @@ theorem Sbtw.dist_lt_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p
     exact
       norm_combo_lt_of_ne (le_max_left _ _) (le_max_right _ _) hp₁p₃ (sub_pos.2 hr1) hr0 (by abel)
 #align sbtw.dist_lt_max_dist Sbtw.dist_lt_max_dist
+-/
 
+#print Wbtw.dist_le_max_dist /-
 theorem Wbtw.dist_le_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Wbtw ℝ p₁ p₂ p₃) :
     dist p₂ p ≤ max (dist p₁ p) (dist p₃ p) :=
   by
@@ -53,7 +54,9 @@ theorem Wbtw.dist_le_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Wbtw ℝ p₁ p
   have hs : Sbtw ℝ p₁ p₂ p₃ := ⟨h, hp₁, hp₃⟩
   exact (hs.dist_lt_max_dist _).le
 #align wbtw.dist_le_max_dist Wbtw.dist_le_max_dist
+-/
 
+#print Collinear.wbtw_of_dist_eq_of_dist_le /-
 /-- Given three collinear points, two (not equal) with distance `r` from `p` and one with
 distance at most `r` from `p`, the third point is weakly between the other two points. -/
 theorem Collinear.wbtw_of_dist_eq_of_dist_le {p p₁ p₂ p₃ : P} {r : ℝ}
@@ -73,7 +76,9 @@ theorem Collinear.wbtw_of_dist_eq_of_dist_le {p p₁ p₂ p₃ : P} {r : ℝ}
     rw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, false_or_iff] at hs' 
     exact False.elim (hp₂.not_lt hs')
 #align collinear.wbtw_of_dist_eq_of_dist_le Collinear.wbtw_of_dist_eq_of_dist_le
+-/
 
+#print Collinear.sbtw_of_dist_eq_of_dist_lt /-
 /-- Given three collinear points, two (not equal) with distance `r` from `p` and one with
 distance less than `r` from `p`, the third point is strictly between the other two points. -/
 theorem Collinear.sbtw_of_dist_eq_of_dist_lt {p p₁ p₂ p₃ : P} {r : ℝ}
@@ -84,4 +89,5 @@ theorem Collinear.sbtw_of_dist_eq_of_dist_lt {p p₁ p₂ p₃ : P} {r : ℝ}
   · rintro rfl; exact hp₂.ne hp₁
   · rintro rfl; exact hp₂.ne hp₃
 #align collinear.sbtw_of_dist_eq_of_dist_lt Collinear.sbtw_of_dist_eq_of_dist_lt
+-/
 
Diff
@@ -34,11 +34,11 @@ theorem Sbtw.dist_lt_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p
   by
   have hp₁p₃ : p₁ -ᵥ p ≠ p₃ -ᵥ p := by simpa using h.left_ne_right
   rw [Sbtw, ← wbtw_vsub_const_iff p, Wbtw, affineSegment_eq_segment, ← insert_endpoints_openSegment,
-    Set.mem_insert_iff, Set.mem_insert_iff] at h
+    Set.mem_insert_iff, Set.mem_insert_iff] at h 
   rcases h with ⟨h | h | h, hp₂p₁, hp₂p₃⟩
-  · rw [vsub_left_cancel_iff] at h; exact False.elim (hp₂p₁ h)
-  · rw [vsub_left_cancel_iff] at h; exact False.elim (hp₂p₃ h)
-  · rw [openSegment_eq_image, Set.mem_image] at h
+  · rw [vsub_left_cancel_iff] at h ; exact False.elim (hp₂p₁ h)
+  · rw [vsub_left_cancel_iff] at h ; exact False.elim (hp₂p₃ h)
+  · rw [openSegment_eq_image, Set.mem_image] at h 
     rcases h with ⟨r, ⟨hr0, hr1⟩, hr⟩
     simp_rw [@dist_eq_norm_vsub V, ← hr]
     exact
@@ -65,12 +65,12 @@ theorem Collinear.wbtw_of_dist_eq_of_dist_le {p p₁ p₂ p₃ : P} {r : ℝ}
   · by_cases hp₃p₂ : p₃ = p₂; · simp [hp₃p₂]
     have hs : Sbtw ℝ p₂ p₃ p₁ := ⟨hw, hp₃p₂, hp₁p₃.symm⟩
     have hs' := hs.dist_lt_max_dist p
-    rw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, or_false_iff] at hs'
+    rw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, or_false_iff] at hs' 
     exact False.elim (hp₂.not_lt hs')
   · by_cases hp₁p₂ : p₁ = p₂; · simp [hp₁p₂]
     have hs : Sbtw ℝ p₃ p₁ p₂ := ⟨hw, hp₁p₃, hp₁p₂⟩
     have hs' := hs.dist_lt_max_dist p
-    rw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, false_or_iff] at hs'
+    rw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, false_or_iff] at hs' 
     exact False.elim (hp₂.not_lt hs')
 #align collinear.wbtw_of_dist_eq_of_dist_le Collinear.wbtw_of_dist_eq_of_dist_le
 
Diff
@@ -29,12 +29,6 @@ variable [NormedAddTorsor V P] [StrictConvexSpace ℝ V]
 
 include V
 
-/- warning: sbtw.dist_lt_max_dist -> Sbtw.dist_lt_max_dist is a dubious translation:
-lean 3 declaration is
-  forall {V : Type.{u1}} {P : Type.{u2}} [_inst_1 : NormedAddCommGroup.{u1} V] [_inst_2 : NormedSpace.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u2} P] [_inst_4 : NormedAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u1} Real V Real.normedLinearOrderedField _inst_1 _inst_2] (p : P) {p₁ : P} {p₂ : P} {p₃ : P}, (Sbtw.{0, u1, u2} Real V P Real.orderedRing (SeminormedAddCommGroup.toAddCommGroup.{u1} V (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)) (NormedSpace.toModule.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃) -> (LT.lt.{0} Real Real.hasLt (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₂ p) (LinearOrder.max.{0} Real Real.linearOrder (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₁ p) (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₃ p)))
-but is expected to have type
-  forall {V : Type.{u2}} {P : Type.{u1}} [_inst_1 : NormedAddCommGroup.{u2} V] [_inst_2 : NormedSpace.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u1} P] [_inst_4 : NormedAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u2} Real V Real.normedLinearOrderedField _inst_1 _inst_2] (p : P) {p₁ : P} {p₂ : P} {p₃ : P}, (Sbtw.{0, u2, u1} Real V P Real.orderedRing (NormedAddCommGroup.toAddCommGroup.{u2} V _inst_1) (NormedSpace.toModule.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃) -> (LT.lt.{0} Real Real.instLTReal (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₂ p) (Max.max.{0} Real (LinearOrderedRing.toMax.{0} Real Real.instLinearOrderedRingReal) (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₁ p) (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₃ p)))
-Case conversion may be inaccurate. Consider using '#align sbtw.dist_lt_max_dist Sbtw.dist_lt_max_distₓ'. -/
 theorem Sbtw.dist_lt_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p₂ p₃) :
     dist p₂ p < max (dist p₁ p) (dist p₃ p) :=
   by
@@ -51,12 +45,6 @@ theorem Sbtw.dist_lt_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p
       norm_combo_lt_of_ne (le_max_left _ _) (le_max_right _ _) hp₁p₃ (sub_pos.2 hr1) hr0 (by abel)
 #align sbtw.dist_lt_max_dist Sbtw.dist_lt_max_dist
 
-/- warning: wbtw.dist_le_max_dist -> Wbtw.dist_le_max_dist is a dubious translation:
-lean 3 declaration is
-  forall {V : Type.{u1}} {P : Type.{u2}} [_inst_1 : NormedAddCommGroup.{u1} V] [_inst_2 : NormedSpace.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u2} P] [_inst_4 : NormedAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u1} Real V Real.normedLinearOrderedField _inst_1 _inst_2] (p : P) {p₁ : P} {p₂ : P} {p₃ : P}, (Wbtw.{0, u1, u2} Real V P Real.orderedRing (SeminormedAddCommGroup.toAddCommGroup.{u1} V (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)) (NormedSpace.toModule.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₂ p) (LinearOrder.max.{0} Real Real.linearOrder (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₁ p) (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₃ p)))
-but is expected to have type
-  forall {V : Type.{u2}} {P : Type.{u1}} [_inst_1 : NormedAddCommGroup.{u2} V] [_inst_2 : NormedSpace.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u1} P] [_inst_4 : NormedAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u2} Real V Real.normedLinearOrderedField _inst_1 _inst_2] (p : P) {p₁ : P} {p₂ : P} {p₃ : P}, (Wbtw.{0, u2, u1} Real V P Real.orderedRing (NormedAddCommGroup.toAddCommGroup.{u2} V _inst_1) (NormedSpace.toModule.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₂ p) (Max.max.{0} Real (LinearOrderedRing.toMax.{0} Real Real.instLinearOrderedRingReal) (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₁ p) (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₃ p)))
-Case conversion may be inaccurate. Consider using '#align wbtw.dist_le_max_dist Wbtw.dist_le_max_distₓ'. -/
 theorem Wbtw.dist_le_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Wbtw ℝ p₁ p₂ p₃) :
     dist p₂ p ≤ max (dist p₁ p) (dist p₃ p) :=
   by
@@ -66,12 +54,6 @@ theorem Wbtw.dist_le_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Wbtw ℝ p₁ p
   exact (hs.dist_lt_max_dist _).le
 #align wbtw.dist_le_max_dist Wbtw.dist_le_max_dist
 
-/- warning: collinear.wbtw_of_dist_eq_of_dist_le -> Collinear.wbtw_of_dist_eq_of_dist_le is a dubious translation:
-lean 3 declaration is
-  forall {V : Type.{u1}} {P : Type.{u2}} [_inst_1 : NormedAddCommGroup.{u1} V] [_inst_2 : NormedSpace.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u2} P] [_inst_4 : NormedAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u1} Real V Real.normedLinearOrderedField _inst_1 _inst_2] {p : P} {p₁ : P} {p₂ : P} {p₃ : P} {r : Real}, (Collinear.{0, u1, u2} Real V P Real.divisionRing (SeminormedAddCommGroup.toAddCommGroup.{u1} V (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)) (NormedSpace.toModule.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3 _inst_4) (Insert.insert.{u2, u2} P (Set.{u2} P) (Set.hasInsert.{u2} P) p₁ (Insert.insert.{u2, u2} P (Set.{u2} P) (Set.hasInsert.{u2} P) p₂ (Singleton.singleton.{u2, u2} P (Set.{u2} P) (Set.hasSingleton.{u2} P) p₃)))) -> (Eq.{1} Real (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₁ p) r) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₂ p) r) -> (Eq.{1} Real (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₃ p) r) -> (Ne.{succ u2} P p₁ p₃) -> (Wbtw.{0, u1, u2} Real V P Real.orderedRing (SeminormedAddCommGroup.toAddCommGroup.{u1} V (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)) (NormedSpace.toModule.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃)
-but is expected to have type
-  forall {V : Type.{u2}} {P : Type.{u1}} [_inst_1 : NormedAddCommGroup.{u2} V] [_inst_2 : NormedSpace.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u1} P] [_inst_4 : NormedAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u2} Real V Real.normedLinearOrderedField _inst_1 _inst_2] {p : P} {p₁ : P} {p₂ : P} {p₃ : P} {r : Real}, (Collinear.{0, u2, u1} Real V P Real.instDivisionRingReal (NormedAddCommGroup.toAddCommGroup.{u2} V _inst_1) (NormedSpace.toModule.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3 _inst_4) (Insert.insert.{u1, u1} P (Set.{u1} P) (Set.instInsertSet.{u1} P) p₁ (Insert.insert.{u1, u1} P (Set.{u1} P) (Set.instInsertSet.{u1} P) p₂ (Singleton.singleton.{u1, u1} P (Set.{u1} P) (Set.instSingletonSet.{u1} P) p₃)))) -> (Eq.{1} Real (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₁ p) r) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₂ p) r) -> (Eq.{1} Real (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₃ p) r) -> (Ne.{succ u1} P p₁ p₃) -> (Wbtw.{0, u2, u1} Real V P Real.orderedRing (NormedAddCommGroup.toAddCommGroup.{u2} V _inst_1) (NormedSpace.toModule.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃)
-Case conversion may be inaccurate. Consider using '#align collinear.wbtw_of_dist_eq_of_dist_le Collinear.wbtw_of_dist_eq_of_dist_leₓ'. -/
 /-- Given three collinear points, two (not equal) with distance `r` from `p` and one with
 distance at most `r` from `p`, the third point is weakly between the other two points. -/
 theorem Collinear.wbtw_of_dist_eq_of_dist_le {p p₁ p₂ p₃ : P} {r : ℝ}
@@ -92,12 +74,6 @@ theorem Collinear.wbtw_of_dist_eq_of_dist_le {p p₁ p₂ p₃ : P} {r : ℝ}
     exact False.elim (hp₂.not_lt hs')
 #align collinear.wbtw_of_dist_eq_of_dist_le Collinear.wbtw_of_dist_eq_of_dist_le
 
-/- warning: collinear.sbtw_of_dist_eq_of_dist_lt -> Collinear.sbtw_of_dist_eq_of_dist_lt is a dubious translation:
-lean 3 declaration is
-  forall {V : Type.{u1}} {P : Type.{u2}} [_inst_1 : NormedAddCommGroup.{u1} V] [_inst_2 : NormedSpace.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u2} P] [_inst_4 : NormedAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u1} Real V Real.normedLinearOrderedField _inst_1 _inst_2] {p : P} {p₁ : P} {p₂ : P} {p₃ : P} {r : Real}, (Collinear.{0, u1, u2} Real V P Real.divisionRing (SeminormedAddCommGroup.toAddCommGroup.{u1} V (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)) (NormedSpace.toModule.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3 _inst_4) (Insert.insert.{u2, u2} P (Set.{u2} P) (Set.hasInsert.{u2} P) p₁ (Insert.insert.{u2, u2} P (Set.{u2} P) (Set.hasInsert.{u2} P) p₂ (Singleton.singleton.{u2, u2} P (Set.{u2} P) (Set.hasSingleton.{u2} P) p₃)))) -> (Eq.{1} Real (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₁ p) r) -> (LT.lt.{0} Real Real.hasLt (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₂ p) r) -> (Eq.{1} Real (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₃ p) r) -> (Ne.{succ u2} P p₁ p₃) -> (Sbtw.{0, u1, u2} Real V P Real.orderedRing (SeminormedAddCommGroup.toAddCommGroup.{u1} V (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)) (NormedSpace.toModule.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃)
-but is expected to have type
-  forall {V : Type.{u2}} {P : Type.{u1}} [_inst_1 : NormedAddCommGroup.{u2} V] [_inst_2 : NormedSpace.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u1} P] [_inst_4 : NormedAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u2} Real V Real.normedLinearOrderedField _inst_1 _inst_2] {p : P} {p₁ : P} {p₂ : P} {p₃ : P} {r : Real}, (Collinear.{0, u2, u1} Real V P Real.instDivisionRingReal (NormedAddCommGroup.toAddCommGroup.{u2} V _inst_1) (NormedSpace.toModule.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3 _inst_4) (Insert.insert.{u1, u1} P (Set.{u1} P) (Set.instInsertSet.{u1} P) p₁ (Insert.insert.{u1, u1} P (Set.{u1} P) (Set.instInsertSet.{u1} P) p₂ (Singleton.singleton.{u1, u1} P (Set.{u1} P) (Set.instSingletonSet.{u1} P) p₃)))) -> (Eq.{1} Real (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₁ p) r) -> (LT.lt.{0} Real Real.instLTReal (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₂ p) r) -> (Eq.{1} Real (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₃ p) r) -> (Ne.{succ u1} P p₁ p₃) -> (Sbtw.{0, u2, u1} Real V P Real.orderedRing (NormedAddCommGroup.toAddCommGroup.{u2} V _inst_1) (NormedSpace.toModule.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃)
-Case conversion may be inaccurate. Consider using '#align collinear.sbtw_of_dist_eq_of_dist_lt Collinear.sbtw_of_dist_eq_of_dist_ltₓ'. -/
 /-- Given three collinear points, two (not equal) with distance `r` from `p` and one with
 distance less than `r` from `p`, the third point is strictly between the other two points. -/
 theorem Collinear.sbtw_of_dist_eq_of_dist_lt {p p₁ p₂ p₃ : P} {r : ℝ}
Diff
@@ -42,10 +42,8 @@ theorem Sbtw.dist_lt_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p
   rw [Sbtw, ← wbtw_vsub_const_iff p, Wbtw, affineSegment_eq_segment, ← insert_endpoints_openSegment,
     Set.mem_insert_iff, Set.mem_insert_iff] at h
   rcases h with ⟨h | h | h, hp₂p₁, hp₂p₃⟩
-  · rw [vsub_left_cancel_iff] at h
-    exact False.elim (hp₂p₁ h)
-  · rw [vsub_left_cancel_iff] at h
-    exact False.elim (hp₂p₃ h)
+  · rw [vsub_left_cancel_iff] at h; exact False.elim (hp₂p₁ h)
+  · rw [vsub_left_cancel_iff] at h; exact False.elim (hp₂p₃ h)
   · rw [openSegment_eq_image, Set.mem_image] at h
     rcases h with ⟨r, ⟨hr0, hr1⟩, hr⟩
     simp_rw [@dist_eq_norm_vsub V, ← hr]
@@ -82,14 +80,12 @@ theorem Collinear.wbtw_of_dist_eq_of_dist_le {p p₁ p₂ p₃ : P} {r : ℝ}
   by
   rcases h.wbtw_or_wbtw_or_wbtw with (hw | hw | hw)
   · exact hw
-  · by_cases hp₃p₂ : p₃ = p₂
-    · simp [hp₃p₂]
+  · by_cases hp₃p₂ : p₃ = p₂; · simp [hp₃p₂]
     have hs : Sbtw ℝ p₂ p₃ p₁ := ⟨hw, hp₃p₂, hp₁p₃.symm⟩
     have hs' := hs.dist_lt_max_dist p
     rw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, or_false_iff] at hs'
     exact False.elim (hp₂.not_lt hs')
-  · by_cases hp₁p₂ : p₁ = p₂
-    · simp [hp₁p₂]
+  · by_cases hp₁p₂ : p₁ = p₂; · simp [hp₁p₂]
     have hs : Sbtw ℝ p₃ p₁ p₂ := ⟨hw, hp₁p₃, hp₁p₂⟩
     have hs' := hs.dist_lt_max_dist p
     rw [hp₁, hp₃, lt_max_iff, lt_self_iff_false, false_or_iff] at hs'
@@ -109,9 +105,7 @@ theorem Collinear.sbtw_of_dist_eq_of_dist_lt {p p₁ p₂ p₃ : P} {r : ℝ}
     (hp₃ : dist p₃ p = r) (hp₁p₃ : p₁ ≠ p₃) : Sbtw ℝ p₁ p₂ p₃ :=
   by
   refine' ⟨h.wbtw_of_dist_eq_of_dist_le hp₁ hp₂.le hp₃ hp₁p₃, _, _⟩
-  · rintro rfl
-    exact hp₂.ne hp₁
-  · rintro rfl
-    exact hp₂.ne hp₃
+  · rintro rfl; exact hp₂.ne hp₁
+  · rintro rfl; exact hp₂.ne hp₃
 #align collinear.sbtw_of_dist_eq_of_dist_lt Collinear.sbtw_of_dist_eq_of_dist_lt
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Joseph Myers
 
 ! This file was ported from Lean 3 source module analysis.convex.strict_convex_between
-! leanprover-community/mathlib commit e1730698f86560a342271c0471e4cb72d021aabf
+! leanprover-community/mathlib commit 38df578a6450a8c5142b3727e3ae894c2300cae0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Analysis.Convex.StrictConvexSpace
 /-!
 # Betweenness in affine spaces for strictly convex spaces
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file proves results about betweenness for points in an affine space for a strictly convex
 space.
 
Diff
@@ -26,6 +26,12 @@ variable [NormedAddTorsor V P] [StrictConvexSpace ℝ V]
 
 include V
 
+/- warning: sbtw.dist_lt_max_dist -> Sbtw.dist_lt_max_dist is a dubious translation:
+lean 3 declaration is
+  forall {V : Type.{u1}} {P : Type.{u2}} [_inst_1 : NormedAddCommGroup.{u1} V] [_inst_2 : NormedSpace.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u2} P] [_inst_4 : NormedAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u1} Real V Real.normedLinearOrderedField _inst_1 _inst_2] (p : P) {p₁ : P} {p₂ : P} {p₃ : P}, (Sbtw.{0, u1, u2} Real V P Real.orderedRing (SeminormedAddCommGroup.toAddCommGroup.{u1} V (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)) (NormedSpace.toModule.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃) -> (LT.lt.{0} Real Real.hasLt (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₂ p) (LinearOrder.max.{0} Real Real.linearOrder (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₁ p) (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₃ p)))
+but is expected to have type
+  forall {V : Type.{u2}} {P : Type.{u1}} [_inst_1 : NormedAddCommGroup.{u2} V] [_inst_2 : NormedSpace.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u1} P] [_inst_4 : NormedAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u2} Real V Real.normedLinearOrderedField _inst_1 _inst_2] (p : P) {p₁ : P} {p₂ : P} {p₃ : P}, (Sbtw.{0, u2, u1} Real V P Real.orderedRing (NormedAddCommGroup.toAddCommGroup.{u2} V _inst_1) (NormedSpace.toModule.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃) -> (LT.lt.{0} Real Real.instLTReal (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₂ p) (Max.max.{0} Real (LinearOrderedRing.toMax.{0} Real Real.instLinearOrderedRingReal) (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₁ p) (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₃ p)))
+Case conversion may be inaccurate. Consider using '#align sbtw.dist_lt_max_dist Sbtw.dist_lt_max_distₓ'. -/
 theorem Sbtw.dist_lt_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p₂ p₃) :
     dist p₂ p < max (dist p₁ p) (dist p₃ p) :=
   by
@@ -44,6 +50,12 @@ theorem Sbtw.dist_lt_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p
       norm_combo_lt_of_ne (le_max_left _ _) (le_max_right _ _) hp₁p₃ (sub_pos.2 hr1) hr0 (by abel)
 #align sbtw.dist_lt_max_dist Sbtw.dist_lt_max_dist
 
+/- warning: wbtw.dist_le_max_dist -> Wbtw.dist_le_max_dist is a dubious translation:
+lean 3 declaration is
+  forall {V : Type.{u1}} {P : Type.{u2}} [_inst_1 : NormedAddCommGroup.{u1} V] [_inst_2 : NormedSpace.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u2} P] [_inst_4 : NormedAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u1} Real V Real.normedLinearOrderedField _inst_1 _inst_2] (p : P) {p₁ : P} {p₂ : P} {p₃ : P}, (Wbtw.{0, u1, u2} Real V P Real.orderedRing (SeminormedAddCommGroup.toAddCommGroup.{u1} V (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)) (NormedSpace.toModule.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₂ p) (LinearOrder.max.{0} Real Real.linearOrder (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₁ p) (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₃ p)))
+but is expected to have type
+  forall {V : Type.{u2}} {P : Type.{u1}} [_inst_1 : NormedAddCommGroup.{u2} V] [_inst_2 : NormedSpace.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u1} P] [_inst_4 : NormedAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u2} Real V Real.normedLinearOrderedField _inst_1 _inst_2] (p : P) {p₁ : P} {p₂ : P} {p₃ : P}, (Wbtw.{0, u2, u1} Real V P Real.orderedRing (NormedAddCommGroup.toAddCommGroup.{u2} V _inst_1) (NormedSpace.toModule.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₂ p) (Max.max.{0} Real (LinearOrderedRing.toMax.{0} Real Real.instLinearOrderedRingReal) (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₁ p) (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₃ p)))
+Case conversion may be inaccurate. Consider using '#align wbtw.dist_le_max_dist Wbtw.dist_le_max_distₓ'. -/
 theorem Wbtw.dist_le_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Wbtw ℝ p₁ p₂ p₃) :
     dist p₂ p ≤ max (dist p₁ p) (dist p₃ p) :=
   by
@@ -53,6 +65,12 @@ theorem Wbtw.dist_le_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Wbtw ℝ p₁ p
   exact (hs.dist_lt_max_dist _).le
 #align wbtw.dist_le_max_dist Wbtw.dist_le_max_dist
 
+/- warning: collinear.wbtw_of_dist_eq_of_dist_le -> Collinear.wbtw_of_dist_eq_of_dist_le is a dubious translation:
+lean 3 declaration is
+  forall {V : Type.{u1}} {P : Type.{u2}} [_inst_1 : NormedAddCommGroup.{u1} V] [_inst_2 : NormedSpace.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u2} P] [_inst_4 : NormedAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u1} Real V Real.normedLinearOrderedField _inst_1 _inst_2] {p : P} {p₁ : P} {p₂ : P} {p₃ : P} {r : Real}, (Collinear.{0, u1, u2} Real V P Real.divisionRing (SeminormedAddCommGroup.toAddCommGroup.{u1} V (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)) (NormedSpace.toModule.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3 _inst_4) (Insert.insert.{u2, u2} P (Set.{u2} P) (Set.hasInsert.{u2} P) p₁ (Insert.insert.{u2, u2} P (Set.{u2} P) (Set.hasInsert.{u2} P) p₂ (Singleton.singleton.{u2, u2} P (Set.{u2} P) (Set.hasSingleton.{u2} P) p₃)))) -> (Eq.{1} Real (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₁ p) r) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₂ p) r) -> (Eq.{1} Real (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₃ p) r) -> (Ne.{succ u2} P p₁ p₃) -> (Wbtw.{0, u1, u2} Real V P Real.orderedRing (SeminormedAddCommGroup.toAddCommGroup.{u1} V (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)) (NormedSpace.toModule.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃)
+but is expected to have type
+  forall {V : Type.{u2}} {P : Type.{u1}} [_inst_1 : NormedAddCommGroup.{u2} V] [_inst_2 : NormedSpace.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u1} P] [_inst_4 : NormedAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u2} Real V Real.normedLinearOrderedField _inst_1 _inst_2] {p : P} {p₁ : P} {p₂ : P} {p₃ : P} {r : Real}, (Collinear.{0, u2, u1} Real V P Real.instDivisionRingReal (NormedAddCommGroup.toAddCommGroup.{u2} V _inst_1) (NormedSpace.toModule.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3 _inst_4) (Insert.insert.{u1, u1} P (Set.{u1} P) (Set.instInsertSet.{u1} P) p₁ (Insert.insert.{u1, u1} P (Set.{u1} P) (Set.instInsertSet.{u1} P) p₂ (Singleton.singleton.{u1, u1} P (Set.{u1} P) (Set.instSingletonSet.{u1} P) p₃)))) -> (Eq.{1} Real (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₁ p) r) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₂ p) r) -> (Eq.{1} Real (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₃ p) r) -> (Ne.{succ u1} P p₁ p₃) -> (Wbtw.{0, u2, u1} Real V P Real.orderedRing (NormedAddCommGroup.toAddCommGroup.{u2} V _inst_1) (NormedSpace.toModule.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃)
+Case conversion may be inaccurate. Consider using '#align collinear.wbtw_of_dist_eq_of_dist_le Collinear.wbtw_of_dist_eq_of_dist_leₓ'. -/
 /-- Given three collinear points, two (not equal) with distance `r` from `p` and one with
 distance at most `r` from `p`, the third point is weakly between the other two points. -/
 theorem Collinear.wbtw_of_dist_eq_of_dist_le {p p₁ p₂ p₃ : P} {r : ℝ}
@@ -75,6 +93,12 @@ theorem Collinear.wbtw_of_dist_eq_of_dist_le {p p₁ p₂ p₃ : P} {r : ℝ}
     exact False.elim (hp₂.not_lt hs')
 #align collinear.wbtw_of_dist_eq_of_dist_le Collinear.wbtw_of_dist_eq_of_dist_le
 
+/- warning: collinear.sbtw_of_dist_eq_of_dist_lt -> Collinear.sbtw_of_dist_eq_of_dist_lt is a dubious translation:
+lean 3 declaration is
+  forall {V : Type.{u1}} {P : Type.{u2}} [_inst_1 : NormedAddCommGroup.{u1} V] [_inst_2 : NormedSpace.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u2} P] [_inst_4 : NormedAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u1} Real V Real.normedLinearOrderedField _inst_1 _inst_2] {p : P} {p₁ : P} {p₂ : P} {p₃ : P} {r : Real}, (Collinear.{0, u1, u2} Real V P Real.divisionRing (SeminormedAddCommGroup.toAddCommGroup.{u1} V (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)) (NormedSpace.toModule.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3 _inst_4) (Insert.insert.{u2, u2} P (Set.{u2} P) (Set.hasInsert.{u2} P) p₁ (Insert.insert.{u2, u2} P (Set.{u2} P) (Set.hasInsert.{u2} P) p₂ (Singleton.singleton.{u2, u2} P (Set.{u2} P) (Set.hasSingleton.{u2} P) p₃)))) -> (Eq.{1} Real (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₁ p) r) -> (LT.lt.{0} Real Real.hasLt (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₂ p) r) -> (Eq.{1} Real (Dist.dist.{u2} P (PseudoMetricSpace.toHasDist.{u2} P _inst_3) p₃ p) r) -> (Ne.{succ u2} P p₁ p₃) -> (Sbtw.{0, u1, u2} Real V P Real.orderedRing (SeminormedAddCommGroup.toAddCommGroup.{u1} V (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1)) (NormedSpace.toModule.{0, u1} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u1, u2} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃)
+but is expected to have type
+  forall {V : Type.{u2}} {P : Type.{u1}} [_inst_1 : NormedAddCommGroup.{u2} V] [_inst_2 : NormedSpace.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1)] [_inst_3 : PseudoMetricSpace.{u1} P] [_inst_4 : NormedAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3] [_inst_5 : StrictConvexSpace.{0, u2} Real V Real.normedLinearOrderedField _inst_1 _inst_2] {p : P} {p₁ : P} {p₂ : P} {p₃ : P} {r : Real}, (Collinear.{0, u2, u1} Real V P Real.instDivisionRingReal (NormedAddCommGroup.toAddCommGroup.{u2} V _inst_1) (NormedSpace.toModule.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3 _inst_4) (Insert.insert.{u1, u1} P (Set.{u1} P) (Set.instInsertSet.{u1} P) p₁ (Insert.insert.{u1, u1} P (Set.{u1} P) (Set.instInsertSet.{u1} P) p₂ (Singleton.singleton.{u1, u1} P (Set.{u1} P) (Set.instSingletonSet.{u1} P) p₃)))) -> (Eq.{1} Real (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₁ p) r) -> (LT.lt.{0} Real Real.instLTReal (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₂ p) r) -> (Eq.{1} Real (Dist.dist.{u1} P (PseudoMetricSpace.toDist.{u1} P _inst_3) p₃ p) r) -> (Ne.{succ u1} P p₁ p₃) -> (Sbtw.{0, u2, u1} Real V P Real.orderedRing (NormedAddCommGroup.toAddCommGroup.{u2} V _inst_1) (NormedSpace.toModule.{0, u2} Real V Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_2) (NormedAddTorsor.toAddTorsor.{u2, u1} V P (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} V _inst_1) _inst_3 _inst_4) p₁ p₂ p₃)
+Case conversion may be inaccurate. Consider using '#align collinear.sbtw_of_dist_eq_of_dist_lt Collinear.sbtw_of_dist_eq_of_dist_ltₓ'. -/
 /-- Given three collinear points, two (not equal) with distance `r` from `p` and one with
 distance less than `r` from `p`, the third point is strictly between the other two points. -/
 theorem Collinear.sbtw_of_dist_eq_of_dist_lt {p p₁ p₂ p₃ : P} {r : ℝ}

Changes in mathlib4

mathlib3
mathlib4
chore: Rename mul-div cancellation lemmas (#11530)

Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero lemma name, the Group lemma, the AddGroup lemma name).

| Statement | New name | Old name | |

Diff
@@ -112,7 +112,7 @@ lemma eq_lineMap_of_dist_eq_mul_of_dist_eq_mul (hxy : dist x y = r * dist x z)
     (hyz : dist y z = (1 - r) * dist x z) : y = AffineMap.lineMap x z r := by
   have : y -ᵥ x ∈ [(0 : E) -[ℝ] z -ᵥ x] := by
     rw [mem_segment_iff_wbtw, ← dist_add_dist_eq_iff, dist_zero_left, dist_vsub_cancel_right,
-      ← dist_eq_norm_vsub', ← dist_eq_norm_vsub', hxy, hyz, ← add_mul, add_sub_cancel'_right,
+      ← dist_eq_norm_vsub', ← dist_eq_norm_vsub', hxy, hyz, ← add_mul, add_sub_cancel,
       one_mul]
   obtain rfl | hne := eq_or_ne x z
   · obtain rfl : y = x := by simpa
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -21,7 +21,6 @@ open Metric
 open scoped Convex
 
 variable {V P : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V]
-
 variable [StrictConvexSpace ℝ V]
 
 section PseudoMetricSpace
chore: reduce imports (#9830)

This uses the improved shake script from #9772 to reduce imports across mathlib. The corresponding noshake.json file has been added to #9772.

Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -5,6 +5,7 @@ Authors: Joseph Myers
 -/
 import Mathlib.Analysis.Convex.Between
 import Mathlib.Analysis.Convex.StrictConvexSpace
+import Mathlib.Analysis.NormedSpace.AffineIsometry
 
 #align_import analysis.convex.strict_convex_between from "leanprover-community/mathlib"@"e1730698f86560a342271c0471e4cb72d021aabf"
 
chore: space after (#8178)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -111,8 +111,9 @@ variable {E F PE PF : Type*} [NormedAddCommGroup E] [NormedAddCommGroup F] [Norm
 lemma eq_lineMap_of_dist_eq_mul_of_dist_eq_mul (hxy : dist x y = r * dist x z)
     (hyz : dist y z = (1 - r) * dist x z) : y = AffineMap.lineMap x z r := by
   have : y -ᵥ x ∈ [(0 : E) -[ℝ] z -ᵥ x] := by
-    rw [mem_segment_iff_wbtw, ←dist_add_dist_eq_iff, dist_zero_left, dist_vsub_cancel_right,
-      ←dist_eq_norm_vsub', ←dist_eq_norm_vsub', hxy, hyz, ←add_mul, add_sub_cancel'_right, one_mul]
+    rw [mem_segment_iff_wbtw, ← dist_add_dist_eq_iff, dist_zero_left, dist_vsub_cancel_right,
+      ← dist_eq_norm_vsub', ← dist_eq_norm_vsub', hxy, hyz, ← add_mul, add_sub_cancel'_right,
+      one_mul]
   obtain rfl | hne := eq_or_ne x z
   · obtain rfl : y = x := by simpa
     simp
feat: Flat triangles have aligned vertices (#7733)

In a normed torsor over a strictly convex space, if the triangle inequality dist a c ≤ dist a b + dist b c is an equality, then b lies between a and c.

Co-authored-by: Mario Carneiro <di.gama@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -16,10 +16,15 @@ space.
 
 -/
 
+open Metric
+open scoped Convex
 
-variable {V P : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] [PseudoMetricSpace P]
+variable {V P : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V]
 
-variable [NormedAddTorsor V P] [StrictConvexSpace ℝ V]
+variable [StrictConvexSpace ℝ V]
+
+section PseudoMetricSpace
+variable [PseudoMetricSpace P] [NormedAddTorsor V P]
 
 theorem Sbtw.dist_lt_max_dist (p : P) {p₁ p₂ p₃ : P} (h : Sbtw ℝ p₁ p₂ p₃) :
     dist p₂ p < max (dist p₁ p) (dist p₃ p) := by
@@ -78,3 +83,78 @@ theorem Collinear.sbtw_of_dist_eq_of_dist_lt {p p₁ p₂ p₃ : P} {r : ℝ}
   · rintro rfl
     exact hp₂.ne hp₃
 #align collinear.sbtw_of_dist_eq_of_dist_lt Collinear.sbtw_of_dist_eq_of_dist_lt
+
+end PseudoMetricSpace
+
+section MetricSpace
+variable [MetricSpace P] [NormedAddTorsor V P] {a b c : P}
+
+/-- In a strictly convex space, the triangle inequality turns into an equality if and only if the
+middle point belongs to the segment joining two other points. -/
+lemma dist_add_dist_eq_iff : dist a b + dist b c = dist a c ↔ Wbtw ℝ a b c := by
+  have :
+      dist (a -ᵥ a) (b -ᵥ a) + dist (b -ᵥ a) (c -ᵥ a) = dist (a -ᵥ a) (c -ᵥ a) ↔
+        b -ᵥ a ∈ segment ℝ (a -ᵥ a) (c -ᵥ a) := by
+    simp only [mem_segment_iff_sameRay, sameRay_iff_norm_add, dist_eq_norm', sub_add_sub_cancel',
+      eq_comm]
+  simp_rw [dist_vsub_cancel_right, ← affineSegment_eq_segment, ← affineSegment_vsub_const_image]
+    at this
+  rwa [(vsub_left_injective _).mem_set_image] at this
+#align dist_add_dist_eq_iff dist_add_dist_eq_iff
+
+end MetricSpace
+
+variable {E F PE PF : Type*} [NormedAddCommGroup E] [NormedAddCommGroup F] [NormedSpace ℝ E]
+  [NormedSpace ℝ F] [StrictConvexSpace ℝ E] [MetricSpace PE] [MetricSpace PF] [NormedAddTorsor E PE]
+  [NormedAddTorsor F PF] {r : ℝ} {f : PF → PE} {x y z : PE}
+
+lemma eq_lineMap_of_dist_eq_mul_of_dist_eq_mul (hxy : dist x y = r * dist x z)
+    (hyz : dist y z = (1 - r) * dist x z) : y = AffineMap.lineMap x z r := by
+  have : y -ᵥ x ∈ [(0 : E) -[ℝ] z -ᵥ x] := by
+    rw [mem_segment_iff_wbtw, ←dist_add_dist_eq_iff, dist_zero_left, dist_vsub_cancel_right,
+      ←dist_eq_norm_vsub', ←dist_eq_norm_vsub', hxy, hyz, ←add_mul, add_sub_cancel'_right, one_mul]
+  obtain rfl | hne := eq_or_ne x z
+  · obtain rfl : y = x := by simpa
+    simp
+  · rw [← dist_ne_zero] at hne
+    obtain ⟨a, b, _, hb, _, H⟩ := this
+    rw [smul_zero, zero_add] at H
+    have H' := congr_arg norm H
+    rw [norm_smul, Real.norm_of_nonneg hb, ← dist_eq_norm_vsub', ← dist_eq_norm_vsub', hxy,
+      mul_left_inj' hne] at H'
+    rw [AffineMap.lineMap_apply, ← H', H, vsub_vadd]
+#align eq_line_map_of_dist_eq_mul_of_dist_eq_mul eq_lineMap_of_dist_eq_mul_of_dist_eq_mul
+
+lemma eq_midpoint_of_dist_eq_half (hx : dist x y = dist x z / 2) (hy : dist y z = dist x z / 2) :
+    y = midpoint ℝ x z := by
+  apply eq_lineMap_of_dist_eq_mul_of_dist_eq_mul
+  · rwa [invOf_eq_inv, ← div_eq_inv_mul]
+  · rwa [invOf_eq_inv, ← one_div, sub_half, one_div, ← div_eq_inv_mul]
+#align eq_midpoint_of_dist_eq_half eq_midpoint_of_dist_eq_half
+
+namespace Isometry
+
+/-- An isometry of `NormedAddTorsor`s for real normed spaces, strictly convex in the case of the
+codomain, is an affine isometry.  Unlike Mazur-Ulam, this does not require the isometry to be
+surjective. -/
+noncomputable def affineIsometryOfStrictConvexSpace (hi : Isometry f) : PF →ᵃⁱ[ℝ] PE :=
+  { AffineMap.ofMapMidpoint f
+      (fun x y => by
+        apply eq_midpoint_of_dist_eq_half
+        · rw [hi.dist_eq, hi.dist_eq]
+          simp only [dist_left_midpoint, Real.norm_of_nonneg zero_le_two, div_eq_inv_mul]
+        · rw [hi.dist_eq, hi.dist_eq]
+          simp only [dist_midpoint_right, Real.norm_of_nonneg zero_le_two, div_eq_inv_mul])
+      hi.continuous with
+    norm_map := fun x => by simp [AffineMap.ofMapMidpoint, ← dist_eq_norm_vsub E, hi.dist_eq] }
+#align isometry.affine_isometry_of_strict_convex_space Isometry.affineIsometryOfStrictConvexSpace
+
+@[simp] lemma coe_affineIsometryOfStrictConvexSpace (hi : Isometry f) :
+    ⇑hi.affineIsometryOfStrictConvexSpace = f := rfl
+#align isometry.coe_affine_isometry_of_strict_convex_space Isometry.coe_affineIsometryOfStrictConvexSpace
+
+@[simp] lemma affineIsometryOfStrictConvexSpace_apply (hi : Isometry f) (p : PF) :
+    hi.affineIsometryOfStrictConvexSpace p = f p := rfl
+#align isometry.affine_isometry_of_strict_convex_space_apply Isometry.affineIsometryOfStrictConvexSpace_apply
+
+end Isometry
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -17,7 +17,7 @@ space.
 -/
 
 
-variable {V P : Type _} [NormedAddCommGroup V] [NormedSpace ℝ V] [PseudoMetricSpace P]
+variable {V P : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] [PseudoMetricSpace P]
 
 variable [NormedAddTorsor V P] [StrictConvexSpace ℝ V]
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Joseph Myers. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Joseph Myers
-
-! This file was ported from Lean 3 source module analysis.convex.strict_convex_between
-! leanprover-community/mathlib commit e1730698f86560a342271c0471e4cb72d021aabf
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.Convex.Between
 import Mathlib.Analysis.Convex.StrictConvexSpace
 
+#align_import analysis.convex.strict_convex_between from "leanprover-community/mathlib"@"e1730698f86560a342271c0471e4cb72d021aabf"
+
 /-!
 # Betweenness in affine spaces for strictly convex spaces
 
feat: port Analysis.Convex.StrictConvexBetween (#4220)

Dependencies 12 + 723

724 files ported (98.4%)
317548 lines ported (98.3%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file