Documentation

Lightlike.Regge.Geodesic.Tests

Trust checks for the distance and the expansion of its square #

Checks of distJet, midJet and the fifth-order expansions IsRiemMetric.dist_sq_expansion and IsRiemMetric.dist_sq_expansion_midpoint (Lightlike/Regge/Geodesic/DistExpansion.lean), and of distJet5 and the sixth-order expansions IsRiemMetric.dist_sq_expansion6 and IsRiemMetric.dist_sq_expansion_midpoint6 (Lightlike/Regge/Geodesic/Quintic.lean, Lightlike/Regge/Geodesic/Sixth.lean), against exactly known distances, and wrong models shown to fail; and checks of the link with Mathlib's Riemannian distance (Lightlike/Regge/Geodesic/Riemannian.lean).

Sheared planes #

shearBy q is the metric [[1 + q(y₀)², q(y₀)], [q(y₀), 1]] on ℝ², the pullback of the Euclidean metric by the shear map φ(y) = (y₀, y₁ + p(y₀)) with p' = q (shearMapBy). It is flat, but in these coordinates it has an off-diagonal entry, non-zero first and second derivatives and the Christoffel symbol Γ¹₀₀ = q'(y₀) (christoffel_shearBy). Its distance is |φ(y) - φ(x)| (dist_shearBy): the preimage of the straight segment is admissible with that length, and every admissible curve maps to a curve at least that long. Both jets and the quintic term quint are computed in closed form for any q (jetWith_shearBy, midJetWith_shearBy, quint_shearBy).

Known values #

The coefficients are forced #

jetWith a b and midJetWith a b are the jets with free coefficients a of the second derivative of the metric and b of the Christoffel term (distJet = jetWith (1/6) (1/12), midJet = midJetWith (1/24) (1/12)). The quadratic shear alone fixes only 2a - b; together with the cubic shear the fifth-order bound forces a = 1/6, b = 1/12 (jetWith_coeffs_forced) and a = 1/24, b = 1/12 (midJetWith_coeffs_forced).

Wrong models #

Non-vacuity #

Mathlib's Riemannian distance #

Sheared planes #

def Lightlike.Geodesic.shearBy (q : ℝ → ℝ) :
(Fin 2 → ℝ) → Matrix (Fin 2) (Fin 2) ℝ

The sheared plane with shear p, written through q = p': the pullback of the Euclidean metric of ℝ² by φ(y) = (y₀, y₁ + p(y₀)), i.e. g = Dφᵀ Dφ = [[1 + q(y₀)², q(y₀)], [q(y₀), 1]].

Equations
Instances For
    def Lightlike.Geodesic.shearMapBy (p : ℝ → ℝ) (y : Fin 2 → ℝ) :
    Fin 2 → ℝ

    The shear map φ(y) = (y₀, y₁ + p(y₀)), an isometry from shearBy p' to the Euclidean plane (dist_shearBy).

    Equations
    Instances For
      theorem Lightlike.Geodesic.shearBy_inv (q : ℝ → ℝ) (y : Fin 2 → ℝ) :
      (shearBy q y)⁻¹ = !![1, -q (y 0); -q (y 0), 1 + q (y 0) ^ 2]

      The inverse of the sheared metric: [[1, -q], [-q, 1 + q²]] (its determinant is 1).

      A sheared plane with smooth q is a Riemannian metric on the whole plane.

      def Lightlike.Geodesic.dshearBy (q q₁ : ℝ → ℝ) (k : Fin 2) (y : Fin 2 → ℝ) :
      Matrix (Fin 2) (Fin 2) ℝ

      The first partial derivatives of shearBy q (with q₁ = q'): ∂₀ g = [[2 q q₁, q₁], [q₁, 0]], ∂₁ g = 0.

      Equations
      Instances For
        def Lightlike.Geodesic.ddshearBy (q q₁ q₂ : ℝ → ℝ) (k l : Fin 2) (y : Fin 2 → ℝ) :
        Matrix (Fin 2) (Fin 2) ℝ

        The second partial derivatives of shearBy q (with q₁ = q', q₂ = q''): only ∂₀∂₀ g = [[2 (q₁² + q q₂), q₂], [q₂, 0]] is non-zero.

        Equations
        Instances For
          theorem Lightlike.Geodesic.pd_shearBy {q q₁ : ℝ → ℝ} (hq : ∀ (s : ℝ), HasDerivAt q (q₁ s) s) (i j k : Fin 2) (x : Fin 2 → ℝ) :
          pd k (fun (y : Fin 2 → ℝ) => shearBy q y i j) x = dshearBy q q₁ k x i j

          ∂_k g_ij of the sheared metric.

          theorem Lightlike.Geodesic.pd_pd_shearBy {q q₁ q₂ : ℝ → ℝ} (hq : ∀ (s : ℝ), HasDerivAt q (q₁ s) s) (hq₁ : ∀ (s : ℝ), HasDerivAt q₁ (q₂ s) s) (i j k l : Fin 2) (x : Fin 2 → ℝ) :
          pd l (pd k fun (y : Fin 2 → ℝ) => shearBy q y i j) x = ddshearBy q q₁ q₂ k l x i j

          ∂_l ∂_k g_ij of the sheared metric.

          theorem Lightlike.Geodesic.christoffel_shearBy {q q₁ : ℝ → ℝ} (hq : ∀ (s : ℝ), HasDerivAt q (q₁ s) s) (i j k : Fin 2) (x : Fin 2 → ℝ) :
          christoffel (shearBy q) i j k x = if i = 1 ∧ j = 0 ∧ k = 0 then q₁ (x 0) else 0

          The Christoffel symbols of the sheared metric: Γ¹₀₀ = q'(x₀), all others vanish.

          theorem Lightlike.Geodesic.chr_shearBy {q q₁ : ℝ → ℝ} (hq : ∀ (s : ℝ), HasDerivAt q (q₁ s) s) (x u v : Fin 2 → ℝ) :
          chr (shearBy q) x u v = ![0, q₁ (x 0) * u 0 * v 0]

          The Christoffel contraction of the sheared metric: Γ(u, v) = (0, q'(x₀) u₀ v₀).

          The jets with free coefficients #

          noncomputable def Lightlike.Geodesic.jetWith {n : ℕ} (a b : ℝ) (g : (Fin n → ℝ) → Matrix (Fin n) (Fin n) ℝ) (x w : Fin n → ℝ) :

          The jet family g(w, w) + ½ ∂_w g(w, w) + a ∂_w ∂_w g(w, w) - b g(Γ(w, w), Γ(w, w)) at x; distJet is jetWith (1/6) (1/12) (jetWith_distJet).

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            noncomputable def Lightlike.Geodesic.midJetWith {n : ℕ} (a b : ℝ) (g : (Fin n → ℝ) → Matrix (Fin n) (Fin n) ℝ) (m Δ : Fin n → ℝ) :

            The midpoint jet family g(Δ, Δ) + a ∂_Δ ∂_Δ g(Δ, Δ) - b g(Γ(Δ, Δ), Γ(Δ, Δ)) at m; midJet is midJetWith (1/24) (1/12) (midJetWith_midJet).

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              theorem Lightlike.Geodesic.jetWith_distJet {n : ℕ} (g : (Fin n → ℝ) → Matrix (Fin n) (Fin n) ℝ) (x w : Fin n → ℝ) :
              jetWith (1 / 6) (1 / 12) g x w = distJet g x w

              distJet is the member a = 1/6, b = 1/12 of the family.

              theorem Lightlike.Geodesic.midJetWith_midJet {n : ℕ} (g : (Fin n → ℝ) → Matrix (Fin n) (Fin n) ℝ) (m Δ : Fin n → ℝ) :
              midJetWith (1 / 24) (1 / 12) g m Δ = midJet g m Δ

              midJet is the member a = 1/24, b = 1/12 of the family.

              theorem Lightlike.Geodesic.jetWith_shearBy {q q₁ q₂ : ℝ → ℝ} (hq : ∀ (s : ℝ), HasDerivAt q (q₁ s) s) (hq₁ : ∀ (s : ℝ), HasDerivAt q₁ (q₂ s) s) (a b : ℝ) (x w : Fin 2 → ℝ) :
              jetWith a b (shearBy q) x w = w 0 ^ 2 + (w 1 + q (x 0) * w 0) ^ 2 + q₁ (x 0) * w 0 ^ 2 * (w 1 + q (x 0) * w 0) + 2 * a * w 0 ^ 3 * (q₁ (x 0) ^ 2 * w 0 + q₂ (x 0) * (w 1 + q (x 0) * w 0)) - b * q₁ (x 0) ^ 2 * w 0 ^ 4

              The jet family on a sheared plane, in closed form.

              theorem Lightlike.Geodesic.midJetWith_shearBy {q q₁ q₂ : ℝ → ℝ} (hq : ∀ (s : ℝ), HasDerivAt q (q₁ s) s) (hq₁ : ∀ (s : ℝ), HasDerivAt q₁ (q₂ s) s) (a b : ℝ) (m Δ : Fin 2 → ℝ) :
              midJetWith a b (shearBy q) m Δ = Δ 0 ^ 2 + (Δ 1 + q (m 0) * Δ 0) ^ 2 + 2 * a * Δ 0 ^ 3 * (q₁ (m 0) ^ 2 * Δ 0 + q₂ (m 0) * (Δ 1 + q (m 0) * Δ 0)) - b * q₁ (m 0) ^ 2 * Δ 0 ^ 4

              The midpoint jet family on a sheared plane, in closed form.

              The distance of a sheared plane #

              The shear map is C¹ if p is.

              theorem Lightlike.Geodesic.normSq_shearBy_deriv {p q : ℝ → ℝ} (hp : ∀ (s : ℝ), HasDerivAt p (q s) s) {c : ℝ → Fin 2 → ℝ} {t : ℝ} (hc : DifferentiableAt ℝ c t) :
              normSq (shearBy q) (c t) (deriv c t) = eNormSq (deriv (shearMapBy p ∘ c) t)

              Along a differentiable curve the squared speed in the sheared metric is the Euclidean squared speed of the image under the shear map.

              theorem Lightlike.Geodesic.length_shearBy {p q : ℝ → ℝ} (hp : ∀ (s : ℝ), HasDerivAt p (q s) s) {c : ℝ → Fin 2 → ℝ} (hc : ContDiff ℝ 1 c) :
              length (shearBy q) c 0 1 = ∫ (t : ℝ) in 0..1, √(eNormSq (deriv (shearMapBy p ∘ c) t))

              The length of a C¹ curve in a sheared plane is the Euclidean length of its image.

              theorem Lightlike.Geodesic.dist_shearBy {p q : ℝ → ℝ} (hp : ∀ (s : ℝ), HasDerivAt p (q s) s) (hp₁ : ContDiff ℝ 1 p) (x y : Fin 2 → ℝ) :

              Known value. The distance of a sheared plane is the Euclidean distance of the images under the shear map: the preimage of the straight segment is admissible with that length, and every admissible curve is at least that long.

              The quadratic and the cubic shear #

              @[reducible, inline]
              abbrev Lightlike.Geodesic.shear :
              (Fin 2 → ℝ) → Matrix (Fin 2) (Fin 2) ℝ

              The quadratic shear: p(s) = s²/2, q(s) = s, i.e. g = [[1 + y₀², y₀], [y₀, 1]], with Γ¹₀₀ = 1.

              Equations
              Instances For
                @[reducible, inline]
                noncomputable abbrev Lightlike.Geodesic.cubicShear :
                (Fin 2 → ℝ) → Matrix (Fin 2) (Fin 2) ℝ

                The cubic shear: p(s) = s³/6, q(s) = s²/2, i.e. g = [[1 + y₀⁴/4, y₀²/2], [y₀²/2, 1]], with Γ¹₀₀ = y₀.

                Equations
                Instances For
                  theorem Lightlike.Geodesic.hasDerivAt_half_sq (s : ℝ) :
                  HasDerivAt (fun (s : ℝ) => s ^ 2 / 2) s s

                  (s²/2)' = s.

                  theorem Lightlike.Geodesic.hasDerivAt_sixth_cube (s : ℝ) :
                  HasDerivAt (fun (s : ℝ) => s ^ 3 / 6) (s ^ 2 / 2) s

                  (s³/6)' = s²/2.

                  The quadratic shear is a Riemannian metric on the plane.

                  theorem Lightlike.Geodesic.dist_sq_shear_eq (x y : Fin 2 → ℝ) :
                  dist shear Set.univ x y ^ 2 = (y 0 - x 0) ^ 2 + (y 1 - x 1 + (y 0 ^ 2 - x 0 ^ 2) / 2) ^ 2

                  The squared distance of the quadratic shear: (y₀ - x₀)² + (y₁ - x₁ + (y₀² - x₀²)/2)².

                  theorem Lightlike.Geodesic.dist_sq_cubicShear_eq (x y : Fin 2 → ℝ) :
                  dist cubicShear Set.univ x y ^ 2 = (y 0 - x 0) ^ 2 + (y 1 - x 1 + (y 0 ^ 3 - x 0 ^ 3) / 6) ^ 2

                  The squared distance of the cubic shear: (y₀ - x₀)² + (y₁ - x₁ + (y₀³ - x₀³)/6)².

                  theorem Lightlike.Geodesic.dist_sq_shear (x w : Fin 2 → ℝ) :

                  Trust check (exact). On the quadratic shear the squared distance equals the jet distJet for every x and w: the remainder of IsRiemMetric.dist_sq_expansion vanishes identically.

                  theorem Lightlike.Geodesic.dist_sq_shear_midpoint (m Δ : Fin 2 → ℝ) :
                  dist shear Set.univ (m - (1 / 2) • Δ) (m + (1 / 2) • Δ) ^ 2 = midJet shear m Δ

                  Trust check (exact). On the quadratic shear the squared distance between m ∓ Δ/2 equals the midpoint jet midJet (the remainder of IsRiemMetric.dist_sq_expansion_midpoint vanishes identically).

                  Trust check (exact). On the cubic shear at the origin, where Γ = 0 but the second derivatives of the metric do not vanish, the remainder of the jet is exactly w₀⁶/36.

                  theorem Lightlike.Geodesic.dist_sq_cubicShear_midpoint_zero (Δ : Fin 2 → ℝ) :
                  dist cubicShear Set.univ (0 - (1 / 2) • Δ) (0 + (1 / 2) • Δ) ^ 2 = midJet cubicShear 0 Δ + Δ 0 ^ 6 / 576

                  Trust check (exact). On the cubic shear about the origin the remainder of the midpoint jet is exactly Δ₀⁶/576.

                  The coefficients are forced #

                  theorem Lightlike.Geodesic.not_quartic_le_quintic {a : ℝ} (ha : a ≠ 0) :
                  ¬∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ (t : ℝ), |t| ≤ r → |a * t ^ 4| ≤ C * |t| ^ 5

                  A non-zero quartic a t⁴ is not O(|t|⁵) near 0.

                  theorem Lightlike.Geodesic.eq_zero_of_quartic_le_quintic {a e : ℝ} (h : ∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ (t : ℝ), |t| ≤ r → |a * t ^ 4 + e * t ^ 6| ≤ C * |t| ^ 5) :
                  a = 0

                  If a t⁴ + e t⁶ = O(|t|⁵) near 0, then a = 0.

                  The direction (t, 0) has sup norm |t|.

                  theorem Lightlike.Geodesic.norm_diag (t : ℝ) :
                  ‖fun (x : Fin 2) => t‖ = |t|

                  The direction (t, t) has sup norm |t|.

                  theorem Lightlike.Geodesic.jetWith_coeffs_forced {a b : ℝ} (h₁ : ∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ (w : Fin 2 → ℝ), ‖w‖ ≤ r → |dist shear Set.univ 0 (0 + w) ^ 2 - jetWith a b shear 0 w| ≤ C * ‖w‖ ^ 5) (h₂ : ∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ (w : Fin 2 → ℝ), ‖w‖ ≤ r → |dist cubicShear Set.univ 0 (0 + w) ^ 2 - jetWith a b cubicShear 0 w| ≤ C * ‖w‖ ^ 5) :
                  a = 1 / 6 ∧ b = 1 / 12

                  The coefficients of distJet are forced. If a jet jetWith a b satisfies the fifth-order bound at the origin of both the quadratic and the cubic shear, then a = 1/6 and b = 1/12. The quadratic shear along (t, 0) gives 2a - b = 1/4; the cubic shear along (t, t) gives 2a = 1/3.

                  theorem Lightlike.Geodesic.midJetWith_coeffs_forced {a b : ℝ} (h₁ : ∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ (Δ : Fin 2 → ℝ), ‖Δ‖ ≤ r → |dist shear Set.univ (0 - (1 / 2) • Δ) (0 + (1 / 2) • Δ) ^ 2 - midJetWith a b shear 0 Δ| ≤ C * ‖Δ‖ ^ 5) (h₂ : ∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ (Δ : Fin 2 → ℝ), ‖Δ‖ ≤ r → |dist cubicShear Set.univ (0 - (1 / 2) • Δ) (0 + (1 / 2) • Δ) ^ 2 - midJetWith a b cubicShear 0 Δ| ≤ C * ‖Δ‖ ^ 5) :
                  a = 1 / 24 ∧ b = 1 / 12

                  The coefficients of midJet are forced. If a midpoint jet midJetWith a b satisfies the fifth-order bound about the origin of both the quadratic and the cubic shear, then a = 1/24 and b = 1/12. The quadratic shear along (t, 0) gives b = 2a; the cubic shear along (t, t) gives 2a = 1/12.

                  Wrong models #

                  theorem Lightlike.Geodesic.jetWith_noChr_shear_fails (x : Fin 2 → ℝ) :
                  ¬∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ (w : Fin 2 → ℝ), ‖w‖ ≤ r → |dist shear Set.univ x (x + w) ^ 2 - jetWith (1 / 6) 0 shear x w| ≤ C * ‖w‖ ^ 5

                  Wrong model fails. Without its Christoffel term (b = 0) the jet is off by t⁴/12 along w = (t, 0) on the quadratic shear, so the fifth-order expansion fails at every point.

                  theorem Lightlike.Geodesic.midJetWith_noChr_shear_fails (m : Fin 2 → ℝ) :
                  ¬∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ (Δ : Fin 2 → ℝ), ‖Δ‖ ≤ r → |dist shear Set.univ (m - (1 / 2) • Δ) (m + (1 / 2) • Δ) ^ 2 - midJetWith (1 / 24) 0 shear m Δ| ≤ C * ‖Δ‖ ^ 5

                  Wrong model fails. Without its Christoffel term (b = 0) the midpoint jet is off by t⁴/12 along Δ = (t, 0) on the quadratic shear, so the fifth-order midpoint expansion fails at every point.

                  The Euclidean metric and non-vacuity #

                  theorem Lightlike.Geodesic.euclid_jets_eq_zero {n : ℕ} (x u v : Fin n → ℝ) :
                  dmat euclid x u = 0 ∧ ddmat euclid x u v = 0 ∧ chr euclid x u v = 0

                  For the Euclidean metric every derivative of the metric and every Christoffel symbol vanishes, so dmat, ddmat and chr are 0.

                  theorem Lightlike.Geodesic.distJet_euclid {n : ℕ} (x w : Fin n → ℝ) :

                  Known value. For the Euclidean metric the jet is |w|².

                  theorem Lightlike.Geodesic.midJet_euclid {n : ℕ} (m Δ : Fin n → ℝ) :

                  Known value. For the Euclidean metric the midpoint jet is |Δ|².

                  theorem Lightlike.Geodesic.dist_sq_euclid {n : ℕ} (x w : Fin n → ℝ) :

                  Trust check (exact). For the Euclidean metric on ℝⁿ the squared distance equals the jet: both are |w|².

                  theorem Lightlike.Geodesic.shear_dist_sq_expansion :
                  ∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ x ∈ Metric.closedBall 0 1, ∀ (w : Fin 2 → ℝ), ‖w‖ ≤ r → |dist shear Set.univ x (x + w) ^ 2 - distJet shear x w| ≤ C * ‖w‖ ^ 5

                  Non-vacuity. The hypotheses of IsRiemMetric.dist_sq_expansion hold for the quadratic shear and the closed unit ball.

                  theorem Lightlike.Geodesic.shear_dist_sq_expansion_midpoint :
                  ∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ m ∈ Metric.closedBall 0 1, ∀ (Δ : Fin 2 → ℝ), ‖Δ‖ ≤ r → |dist shear Set.univ (m - (1 / 2) • Δ) (m + (1 / 2) • Δ) ^ 2 - midJet shear m Δ| ≤ C * ‖Δ‖ ^ 5

                  Non-vacuity. The hypotheses of IsRiemMetric.dist_sq_expansion_midpoint hold for the quadratic shear and the closed unit ball.

                  The expansions to sixth order #

                  def Lightlike.Geodesic.dddshearBy (q q₁ q₂ q₃ : ℝ → ℝ) (k l p : Fin 2) (y : Fin 2 → ℝ) :
                  Matrix (Fin 2) (Fin 2) ℝ

                  The third partial derivatives of shearBy q (with q₁ = q', q₂ = q'', q₃ = q'''): only ∂₀∂₀∂₀ g = [[2 (3 q₁ q₂ + q q₃), q₃], [q₃, 0]] is non-zero.

                  Equations
                  Instances For
                    theorem Lightlike.Geodesic.pd_pd_pd_shearBy {q q₁ q₂ q₃ : ℝ → ℝ} (hq : ∀ (s : ℝ), HasDerivAt q (q₁ s) s) (hq₁ : ∀ (s : ℝ), HasDerivAt q₁ (q₂ s) s) (hq₂ : ∀ (s : ℝ), HasDerivAt q₂ (q₃ s) s) (i j k l p : Fin 2) (x : Fin 2 → ℝ) :
                    pd p (pd l (pd k fun (y : Fin 2 → ℝ) => shearBy q y i j)) x = dddshearBy q q₁ q₂ q₃ k l p x i j

                    ∂_p ∂_l ∂_k g_ij of the sheared metric.

                    theorem Lightlike.Geodesic.quint_shearBy {q q₁ q₂ q₃ : ℝ → ℝ} (hq : ∀ (s : ℝ), HasDerivAt q (q₁ s) s) (hq₁ : ∀ (s : ℝ), HasDerivAt q₁ (q₂ s) s) (hq₂ : ∀ (s : ℝ), HasDerivAt q₂ (q₃ s) s) (x w : Fin 2 → ℝ) :
                    quint (shearBy q) x w = q₁ (x 0) * q₂ (x 0) * w 0 ^ 5 / 6 + q₃ (x 0) * w 0 ^ 4 * (w 1 + q (x 0) * w 0) / 12

                    The quintic term quint on a sheared plane, in closed form: q₁ q₂ w₀⁵/6 + q₃ w₀⁴ (w₁ + q w₀)/12 at x₀. It is the term of order five of the exact squared distance w₀² + (w₁ + p(x₀ + w₀) - p(x₀))².

                    @[reducible, inline]
                    noncomputable abbrev Lightlike.Geodesic.quarticShear :
                    (Fin 2 → ℝ) → Matrix (Fin 2) (Fin 2) ℝ

                    The quartic shear: p(s) = s⁴/24, q(s) = s³/6, with Γ¹₀₀ = y₀²/2. At the origin the metric is Euclidean to second order and only its third derivative ∂₀³ g₀₁ = 1 is non-zero.

                    Equations
                    Instances For
                      theorem Lightlike.Geodesic.hasDerivAt_quartic (s : ℝ) :
                      HasDerivAt (fun (s : ℝ) => s ^ 4 / 24) (s ^ 3 / 6) s

                      (s⁴/24)' = s³/6.

                      theorem Lightlike.Geodesic.dist_sq_quarticShear_eq (x y : Fin 2 → ℝ) :
                      dist quarticShear Set.univ x y ^ 2 = (y 0 - x 0) ^ 2 + (y 1 - x 1 + (y 0 ^ 4 - x 0 ^ 4) / 24) ^ 2

                      The squared distance of the quartic shear: (y₀ - x₀)² + (y₁ - x₁ + (y₀⁴ - x₀⁴)/24)².

                      Trust check (exact). On the cubic shear the remainder of the sixth-order expansion IsRiemMetric.dist_sq_expansion6 is exactly w₀⁶/36, at every point x. Here quint = x₀ w₀⁵/6 is non-zero away from x₀ = 0, and the Christoffel symbols and the first two derivatives of the metric all enter.

                      Trust check (exact). On the quartic shear at the origin, where only the third derivative of the metric is non-zero, the remainder of IsRiemMetric.dist_sq_expansion6 is exactly w₀⁸/576: the term (1/24) ∂_w ∂_w ∂_w g(w, w) = w₀⁴ w₁/12 of quint is the whole term of order five of the squared distance.

                      theorem Lightlike.Geodesic.dist_sq_cubicShear_midpoint (m Δ : Fin 2 → ℝ) :
                      dist cubicShear Set.univ (m - (1 / 2) • Δ) (m + (1 / 2) • Δ) ^ 2 = midJet cubicShear m Δ + Δ 0 ^ 6 / 576

                      Trust check (exact). On the cubic shear the remainder of the midpoint expansion IsRiemMetric.dist_sq_expansion_midpoint6 is exactly Δ₀⁶/576, at every midpoint m: the terms of order three and five vanish about the midpoint although the Christoffel symbols and the first derivatives of the metric do not vanish at m when m₀ ≠ 0.

                      theorem Lightlike.Geodesic.not_pow_le_pow_succ {a : ℝ} (ha : a ≠ 0) (k : ℕ) :
                      ¬∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ (t : ℝ), |t| ≤ r → |a * t ^ k| ≤ C * |t| ^ (k + 1)

                      A non-zero monomial a tᵏ is not O(|t|ᵏ⁺¹) near 0.

                      theorem Lightlike.Geodesic.dist_sq_expansion6_sharp (x : Fin 2 → ℝ) :
                      ¬∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ (w : Fin 2 → ℝ), ‖w‖ ≤ r → |dist cubicShear Set.univ x (x + w) ^ 2 - distJet5 cubicShear x w| ≤ C * ‖w‖ ^ 7

                      The order six is sharp. On the cubic shear the remainder of IsRiemMetric.dist_sq_expansion6 is not O(‖w‖⁷) at any point (it is t⁶/36 along w = (t, 0)).

                      theorem Lightlike.Geodesic.dist_sq_expansion_midpoint6_sharp (m : Fin 2 → ℝ) :
                      ¬∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ (Δ : Fin 2 → ℝ), ‖Δ‖ ≤ r → |dist cubicShear Set.univ (m - (1 / 2) • Δ) (m + (1 / 2) • Δ) ^ 2 - midJet cubicShear m Δ| ≤ C * ‖Δ‖ ^ 7

                      The order six is sharp about the midpoint. On the cubic shear the remainder of IsRiemMetric.dist_sq_expansion_midpoint6 is not O(‖Δ‖⁷) at any midpoint (it is t⁶/576 along Δ = (t, 0)).

                      theorem Lightlike.Geodesic.distJet_cubicShear_not_sixth {x : Fin 2 → ℝ} (hx : x 0 ≠ 0) :
                      ¬∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ (w : Fin 2 → ℝ), ‖w‖ ≤ r → |dist cubicShear Set.univ x (x + w) ^ 2 - distJet cubicShear x w| ≤ C * ‖w‖ ^ 6

                      Wrong model fails. Without its quintic term the jet distJet does not give the sixth-order expansion: on the cubic shear at a point with x₀ ≠ 0 the remainder along w = (t, 0) is x₀ t⁵/6 + t⁶/36, which is not O(‖w‖⁶).

                      The cubic shear is a Riemannian metric on the plane.

                      Non-vacuity. The hypotheses of IsRiemMetric.exists_localJet3 hold for the cubic shear and the closed unit ball.

                      theorem Lightlike.Geodesic.cubicShear_dist_sq_expansion6 :
                      ∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ x ∈ Metric.closedBall 0 1, ∀ (w : Fin 2 → ℝ), ‖w‖ ≤ r → |dist cubicShear Set.univ x (x + w) ^ 2 - distJet5 cubicShear x w| ≤ C * ‖w‖ ^ 6

                      Non-vacuity. The hypotheses of IsRiemMetric.dist_sq_expansion6 hold for the cubic shear and the closed unit ball, where the remainder is not zero (dist_sq_cubicShear_sixth).

                      theorem Lightlike.Geodesic.cubicShear_dist_sq_expansion_midpoint6 :
                      ∃ (C : ℝ) (r : ℝ), 0 < r ∧ ∀ m ∈ Metric.closedBall 0 1, ∀ (Δ : Fin 2 → ℝ), ‖Δ‖ ≤ r → |dist cubicShear Set.univ (m - (1 / 2) • Δ) (m + (1 / 2) • Δ) ^ 2 - midJet cubicShear m Δ| ≤ C * ‖Δ‖ ^ 6

                      Non-vacuity. The hypotheses of IsRiemMetric.dist_sq_expansion_midpoint6 hold for the cubic shear and the closed unit ball, where the remainder is not zero (dist_sq_cubicShear_midpoint).

                      Mathlib's Riemannian distance #

                      The Euclidean metric on ℝⁿ, viewed as the open set ⊤.

                      Known value (Mathlib). For the Euclidean metric on ℝⁿ, Mathlib's Riemannian distance of our bundle is Mathlib's Riemannian distance of the inner product space EuclideanSpace ℝ (Fin n) between the same points, i.e. the Euclidean distance.

                      The quadratic shear on the plane, viewed as the open set ⊤.

                      Known value. For the quadratic shear, Mathlib's Riemannian distance from 0 to (1, 0) is √5/2: the shear map sends the two points to 0 and (1, 1/2).

                      Wrong input gives a different answer. The Euclidean metric gives Mathlib's Riemannian distance 1 between the same two points, not the value √5/2 of the shear.

                      The punctured line {x ∈ ℝ¹ | x₀ ≠ 0}, an open set with two components.

                      Equations
                      Instances For

                        -1 lies in the punctured line.

                        1 lies in the punctured line.

                        theorem Lightlike.Geodesic.not_exists_isAdmissible_puncturedLine :
                        ¬∃ (c : ℝ → Fin 1 → ℝ), IsAdmissible (↑puncturedLine) c (fun (x : Fin 1) => -1) fun (x : Fin 1) => 1

                        No admissible curve in the punctured line joins -1 and 1: by the intermediate value theorem every continuous curve from -1 to 1 passes through 0.

                        The hypothesis of IsRiemMetric.riemannianEDist_eq is needed. On the punctured line no admissible curve joins -1 and 1, so Mathlib's Riemannian distance is ⊤ while dist is the junk value 0.