Documentation

Lightlike.Regge.D4.Tests

Trust checks for 4D Regge calculus #

Checks of the definitions in Regge/D4/ against known values, and deliberately wrong formulas and inputs shown to fail.

Flat #

Curved #

Wrong formulas and inputs #

One 4-simplex #

A flat ring of three 4-simplices around a triangle #

Three 4-simplices {0, 1, 2, 3, 4}, {0, 1, 2, 4, 5}, {0, 1, 2, 5, 3} around the triangle {0, 1, 2}.

Equations
Instances For

    The placement of flatRing in ℝ⁴: the triangle at 0, e₀, e₁, the link vertices at e₀ + e₂, e₀ + e₃, e₀ - e₂ - e₃ (tilted out of the normal plane, which the dihedral angle must ignore).

    Equations
    Instances For
      theorem Lightlike.Regge4.Tests.ringLen_eq (u v : Fin 6) (h : u ≠ v) :

      ringLen gives each edge its Euclidean length.

      theorem Lightlike.Regge4.Tests.linIndep_e01 {x₀ x₁ a₂ a₃ y₀ y₁ b₂ b₃ : ℝ} (hd : a₂ * b₃ - a₃ * b₂ ≠ 0) :
      LinearIndependent ℝ ![!₂[1, 0, 0, 0], !₂[0, 1, 0, 0], !₂[x₀, x₁, a₂, a₃], !₂[y₀, y₁, b₂, b₃]]

      Four vectors e₀, e₁, a, b of ℝ⁴ are linearly independent when the components of a, b in the e₂ e₃-plane are.

      The three 4-simplices of flatRing placed in ℝ⁴ are non-degenerate.

      The open simplex of {0, 1, 2, 3, 4} lies in x₂ > 0, x₃ > 0.

      The open simplex of {0, 1, 2, 4, 5} lies in x₂ < 0, x₃ - x₂ > 0.

      The open simplex of {0, 1, 2, 5, 3} lies in x₃ < 0, x₂ - x₃ > 0.

      The flat ring placed in ℝ⁴ is a geometric triangulation: its 4-simplices are non-degenerate, and the interiors of their convex hulls (their open simplices) lie in the three regions ringRegion₁, ringRegion₂, ringRegion₃, which do not meet.

      Flat example. The triangle {0, 1, 2} of the flat ring has deficit angle zero, by the general theorem IsGeometric4.deficit4_eq_zero_of_cycleLink.

      The dihedral angles of the flat ring, from its lengths #

      Inner products of edge vectors from the vertex 0 (at the origin).

      theorem Lightlike.Regge4.Tests.flatRing_values :
      mixed ringLen 0 1 2 3 4 = 0 ∧ mixed ringLen 0 1 2 4 5 = -1 ∧ mixed ringLen 0 1 2 5 3 = -1 ∧ gram3 ringLen 0 1 2 3 = 1 ∧ gram3 ringLen 0 1 2 4 = 1 ∧ gram3 ringLen 0 1 2 5 = 2

      The mixed determinants and gram3 of the flat ring at the triangle {0, 1, 2}.

      The dihedral angles of the flat ring, from its lengths: π/2, 3π/4, 3π/4, adding up to 2π (independently of the winding argument of flatRing_deficit).

      Wrong formulas on the flat ring #

      noncomputable def Lightlike.Regge4.Tests.deficitWith (F : (Finset (Fin 6) → ℝ) → Fin 6 → Fin 6 → Fin 6 → Fin 6 → Fin 6 → ℝ) (K : FourD.Complex4 (Fin 6)) (ℓ : Finset (Fin 6) → ℝ) (t : Finset (Fin 6)) :

      The deficit at t computed with an angle formula F (through the same averaging over labellings as dihedralAt4).

      Equations
      Instances For
        noncomputable def Lightlike.Regge4.Tests.extAngle4 (ℓ : Finset (Fin 6) → ℝ) (p q r s u : Fin 6) :

        The exterior angle π - θ instead of the dihedral angle.

        Equations
        Instances For
          noncomputable def Lightlike.Regge4.Tests.noSqrt4 (ℓ : Finset (Fin 6) → ℝ) (p q r s u : Fin 6) :

          The cosine formula without its square root: arccos (mixed / (gram3 · gram3)).

          Equations
          Instances For

            The exterior-angle formula is symmetric, so its average is the formula in any labelling.

            The formula without the square root is symmetric.

            theorem Lightlike.Regge4.Tests.flatRing_sum {F : (Finset (Fin 6) → ℝ) → Fin 6 → Fin 6 → Fin 6 → Fin 6 → Fin 6 → ℝ} (hF : IsSymm4 F) (ℓ : Finset (Fin 6) → ℝ) :
            ∑ σ ∈ flatRing.star {0, 1, 2}, angleAvg4 F ℓ σ {0, 1, 2} = F ℓ 0 1 2 3 4 + F ℓ 0 1 2 4 5 + F ℓ 0 1 2 5 3

            The sum over the ring of a symmetric formula, labelled.

            Wrong formula: the exterior angle. Using π - θ instead of the dihedral angle reports the deficit π on the flat ring (on a triangle in n 4-simplices it reports (4 - n) π - δ, so a test needs a valence other than four).

            arccos (-1/2) = 2π/3.

            Wrong formula: no square root. arccos (mixed / (gram3 · gram3)) reports the deficit π/6 on the flat ring.

            The boundary of the 5-simplex: a curved closed 4-manifold #

            The boundary of the 5-simplex on Fin 6: the six 4-simplices, a triangulated 4-sphere.

            Equations
            Instances For

              Every triangle of sphere5 lies in three 4-simplices.

              sphere5 satisfies the manifold condition at triangles (decided by the kernel).

              arccos (1/4) < 2π/3: three regular 4-simplices leave a gap around a triangle.

              theorem Lightlike.Regge4.Tests.area4_one {t : Finset (Fin 6)} (ht : t.card = 3) :
              area4 (fun (x : Finset (Fin 6)) => 1) t = √3 / 4

              With all edge lengths 1 a triangle has area √3/4.

              theorem Lightlike.Regge4.Tests.sphere5_deficit {t : Finset (Fin 6)} (ht : t ∈ sphere5.tris) :
              deficit4 sphere5 (fun (x : Finset (Fin 6)) => 1) t = 2 * Real.pi - 3 * Real.arccos (1 / 4) ∧ 0 < deficit4 sphere5 (fun (x : Finset (Fin 6)) => 1) t

              Curved example. With unit lengths every triangle of the 4-sphere sphere5 has deficit 2π - 3 arccos(1/4), and this is positive.

              theorem Lightlike.Regge4.Tests.sphere5_reggeAction :
              (reggeAction4 sphere5 fun (x : Finset (Fin 6)) => 1) = 20 * (√3 / 4) * (2 * Real.pi - 3 * Real.arccos (1 / 4))

              The Regge action of the unit 4-sphere sphere5 is 20 (√3/4)(2π - 3 arccos(1/4)) > 0.

              theorem Lightlike.Regge4.Tests.sphere5_reggePartial {e : Finset (Fin 6)} (he : e ∈ sphere5.edges) :
              reggePartial4 sphere5 (fun (x : Finset (Fin 6)) => 1) e = 4 * (1 / (2 * √3)) * (2 * Real.pi - 3 * Real.arccos (1 / 4))

              On sphere5 with unit lengths every edge lies in four triangles, each with ∂A/∂ℓ = 1/(2√3), so ∂S/∂ℓ_e = 4 (1/(2√3)) (2π - 3 arccos(1/4)).

              theorem Lightlike.Regge4.Tests.sphere5_not_stationary :
              ¬HasDerivAt (fun (τ : ℝ) => reggeAction4 sphere5 (lineL (fun (x : Finset (Fin 6)) => 1) (fun (f : Finset (Fin 6)) => if f = {0, 1} then 1 else 0) τ)) 0 0

              The unit 4-sphere is not a solution of Regge's equations: varying the length of the edge {0, 1} changes the action at the rate ∂S/∂ℓ = 4 (1/(2√3)) (2π - 3 arccos(1/4)) ≠ 0.

              Regular 4-simplices never close up flat #

              arccos (1/4) > 2π/5: five regular 4-simplices overlap around a triangle.

              theorem Lightlike.Regge4.Tests.regular_never_flat (n : ℕ) :
              (n ≤ 4 → 0 < 2 * Real.pi - ↑n * Real.arccos (1 / 4)) ∧ (5 ≤ n → 2 * Real.pi - ↑n * Real.arccos (1 / 4) < 0)

              Regular 4-simplices never close up flat around a triangle: n of them leave a gap (n ≤ 4) or overlap (n ≥ 5), since 4 arccos(1/4) < 2π < 5 arccos(1/4).

              Junk values #

              Four 4-simplices around the triangle {0, 1, 2}.

              Equations
              Instances For
                theorem Lightlike.Regge4.Tests.ring4_zero :
                deficit4 ring4 (fun (x : Finset (Fin 7)) => 0) {0, 1, 2} = 0

                Junk values fake flatness. With all lengths 0 (degenerate), Lean's 0/0 = 0 makes every dihedral angle arccos 0 = π/2, and a triangle in four 4-simplices shows deficit 0.

                A non-manifold #

                Three 4-simplices sharing the tetrahedron {0, 1, 2, 3}.

                Equations
                Instances For

                  Non-manifold check. The link of the triangle {0, 1, 2} of tripleBook4 is a star with three arms (all three 4-simplices contain the vertex 3), neither a cycle nor a path.

                  One 4-simplex #

                  One regular 4-simplex: every triangle is on the boundary, in one 4-simplex, and the Regge action is the boundary term 10 (√3/4)(π - arccos(1/4)).

                  A subdivided 4-simplex: flat, with interior triangles and edges #

                  The 4-simplex {0, 1, 2, 3, 4} subdivided from an interior vertex 5 (the 1-5 Pachner move): the five 4-simplices {5} ∪ (facet).

                  Equations
                  Instances For

                    The placement of cone5: the corners 0, e₀, e₁, e₂, e₃ and the centroid at (1/5)(1,1,1,1).

                    Equations
                    Instances For

                      Linear independence of four explicit vectors of ℝ⁴, by solving the coordinate equations.

                      Equations
                      Instances For
                        theorem Lightlike.Regge4.Tests.cone5_nondeg (σ : Finset (Fin 6)) :
                        σ ∈ cone5.simps → AffineIndependent ℝ fun (v : ↥σ) => conePos ↑v

                        The five 4-simplices of cone5 are non-degenerate.

                        noncomputable def Lightlike.Regge4.Tests.bary (y : EuclideanSpace ℝ (Fin 4)) :
                        Fin 5 → ℝ

                        The barycentric coordinate of y at the corner k of the big simplex.

                        Equations
                        Instances For
                          theorem Lightlike.Regge4.Tests.coneRegion {k : Fin 5} {σ : Finset (Fin 6)} (hσ : σ ∈ cone5.simps) (hk : ⟨↑k, ⋯⟩ ∉ σ) {y : EuclideanSpace ℝ (Fin 4)} (hy : y ∈ Regge.openHull conePos σ) (j : Fin 5) :
                          j ≠ k → bary y k < bary y j

                          In the open simplex of the 4-simplex of cone5 opposite the corner k, the barycentric coordinate at k is the smallest.

                          theorem Lightlike.Regge4.Tests.cone5_simps_eq {σ : Finset (Fin 6)} (hσ : σ ∈ cone5.simps) :
                          ∃ (k : Fin 5), σ = Finset.univ.erase ⟨↑k, ⋯⟩

                          Each 4-simplex of cone5 is the vertex set without one corner k.

                          The subdivided 4-simplex placed in ℝ⁴ is a geometric triangulation: in the open 4-simplex opposite the corner k the barycentric coordinate at k is the smallest, so distinct open 4-simplices do not meet.

                          cone5 satisfies the manifold condition at triangles (decided by the kernel).

                          cone5 has ten interior triangles (those through the centre 5) and five interior edges.

                          Flat example with interior triangles. All ten interior triangles of the subdivided 4-simplex have deficit zero (IsGeometric4.deficit4_eq_zero).

                          theorem Lightlike.Regge4.Tests.cone5_stationary :
                          HasDerivAt (fun (τ : ℝ) => reggeAction4 cone5 (lineL coneLen (fun (f : Finset (Fin 6)) => if f = {0, 5} then 1 else 0) τ)) 0 0

                          Flat space solves Regge's equations (example). Moving the interior vertex 5 along the edge {0, 5}, i.e. varying the length of that interior edge alone, leaves the Regge action of the flat subdivided 4-simplex stationary.