Documentation

Lightlike.Regge.D4.Dihedral

Dihedral angles of a 4-simplex from its edge lengths #

In 4D Regge calculus curvature sits on triangles. Two tetrahedra of a 4-simplex meet in a triangle, and the dihedral angle there is the angle between the two tetrahedra, measured in the plane orthogonal to the triangle. This file computes it from the ten edge lengths and checks the formula against Euclidean geometry.

Let the 4-simplex have vertices p, q, r, s, u, the triangle be pqr, and the tetrahedra pqrs and pqru. With the edge vectors a = q - p, b = r - p, c = s - p, d = u - p, all inner products follow from the squared lengths by polarization, ⟨i - o, j - o⟩ = (ℓ_oi² + ℓ_oj² - ℓ_ij²)/2 (ip). The Gram determinants (gram2, gram3, gram4) are (k!)² times the squared k-volumes, as in the Cayley–Menger formula: gram2 = 4·area², gram3 = 36·vol₃², gram4 = 576·vol₄². The mixed determinant mixed has rows a, b, c and columns a, b, d. Then

cos θ = mixed / √(gram3(pqrs) · gram3(pqru)).

Definitions #

Main results #

Symbolic checks of these identities (and of the facet identity used for Schläfli's identity): scripts/regge/regge4_check.py.

Inner products and determinants from lengths #

def Lightlike.Regge4.det3 (a b c d e f g h i : ℝ) :

The determinant of the 3 × 3 matrix with rows (a, b, c), (d, e, f), (g, h, i).

Equations
Instances For
    noncomputable def Lightlike.Regge4.sq {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (a b : V) :

    The squared length of the edge ab, from the lengths ℓ of 2-element vertex sets; zero for a = b.

    Equations
    Instances For
      noncomputable def Lightlike.Regge4.ip {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (o a b : V) :

      The inner product ⟨a - o, b - o⟩ of two edge vectors from o, by polarization.

      Equations
      Instances For
        noncomputable def Lightlike.Regge4.gram2 {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r : V) :

        The Gram determinant of the edge vectors q - p, r - p of the triangle pqr: four times its squared area.

        Equations
        Instances For
          noncomputable def Lightlike.Regge4.gram3 {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s : V) :

          The Gram determinant of the edge vectors q - p, r - p, s - p of the tetrahedron pqrs: 36 times its squared volume.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            noncomputable def Lightlike.Regge4.mixed {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s u : V) :

            The mixed determinant at the triangle pqr of the 4-simplex pqrsu: rows q - p, r - p, s - p, columns q - p, r - p, u - p of the Gram matrix.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              noncomputable def Lightlike.Regge4.gram4 {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s u : V) :

              The Gram determinant of the edge vectors q - p, r - p, s - p, u - p of the 4-simplex pqrsu (expanded along the first row): 576 times its squared 4-volume.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                noncomputable def Lightlike.Regge4.cosDihedral4 {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s u : V) :

                Cosine of the dihedral angle of the 4-simplex pqrsu at its triangle pqr, between the tetrahedra pqrs and pqru.

                Equations
                Instances For
                  noncomputable def Lightlike.Regge4.dihedral4 {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s u : V) :

                  The dihedral angle of the 4-simplex pqrsu at its triangle pqr.

                  Equations
                  Instances For

                    Symmetry #

                    theorem Lightlike.Regge4.sq_comm {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (a b : V) :
                    sq ℓ a b = sq ℓ b a

                    Squared lengths are symmetric.

                    @[simp]
                    theorem Lightlike.Regge4.sq_self {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (a : V) :
                    sq ℓ a a = 0

                    The squared length of a degenerate edge is zero.

                    theorem Lightlike.Regge4.sq_of_ne {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) {a b : V} (h : a ≠ b) :
                    sq ℓ a b = ℓ {a, b} ^ 2

                    The squared length of an edge ab, a ≠ b.

                    Normalise squared lengths: remove sq ℓ a a, order the arguments, expand.

                    Equations
                    Instances For
                      theorem Lightlike.Regge4.mixed_swap_pq {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s u : V) :
                      mixed ℓ q p r s u = mixed ℓ p q r s u

                      The mixed determinant is symmetric in the first two vertices of the triangle.

                      theorem Lightlike.Regge4.mixed_swap_qr {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s u : V) :
                      mixed ℓ p r q s u = mixed ℓ p q r s u

                      The mixed determinant is symmetric in the last two vertices of the triangle.

                      theorem Lightlike.Regge4.mixed_swap_su {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s u : V) :
                      mixed ℓ p q r u s = mixed ℓ p q r s u

                      The mixed determinant is symmetric in the two opposite vertices.

                      theorem Lightlike.Regge4.gram3_swap_pq {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s : V) :
                      gram3 ℓ q p r s = gram3 ℓ p q r s

                      gram3 is symmetric in its first two points.

                      theorem Lightlike.Regge4.gram3_swap_qr {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s : V) :
                      gram3 ℓ p r q s = gram3 ℓ p q r s

                      gram3 is symmetric in its second and third points.

                      theorem Lightlike.Regge4.gram3_swap_rs {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s : V) :
                      gram3 ℓ p q s r = gram3 ℓ p q r s

                      gram3 is symmetric in its last two points.

                      theorem Lightlike.Regge4.gram2_swap_pq {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r : V) :
                      gram2 ℓ q p r = gram2 ℓ p q r

                      gram2 is symmetric in its first two points.

                      theorem Lightlike.Regge4.gram2_swap_qr {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r : V) :
                      gram2 ℓ p r q = gram2 ℓ p q r

                      gram2 is symmetric in its last two points.

                      theorem Lightlike.Regge4.dihedral4_swap_pq {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s u : V) :
                      dihedral4 ℓ q p r s u = dihedral4 ℓ p q r s u

                      The dihedral angle is symmetric in the first two vertices of the triangle.

                      theorem Lightlike.Regge4.dihedral4_swap_qr {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s u : V) :
                      dihedral4 ℓ p r q s u = dihedral4 ℓ p q r s u

                      The dihedral angle is symmetric in the last two vertices of the triangle.

                      theorem Lightlike.Regge4.dihedral4_swap_su {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s u : V) :
                      dihedral4 ℓ p q r u s = dihedral4 ℓ p q r s u

                      The dihedral angle is symmetric in the two opposite vertices.

                      theorem Lightlike.Regge4.desnanot_jacobi {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (p q r s u : V) :
                      gram3 ℓ p q r s * gram3 ℓ p q r u - mixed ℓ p q r s u ^ 2 = gram2 ℓ p q r * gram4 ℓ p q r s u

                      Desnanot–Jacobi: gram3(pqrs) · gram3(pqru) - mixed² = gram2(pqr) · gram4(pqrsu). Hence sin² θ = gram2 · gram4 / (gram3 · gram3).

                      Scaling and the regular 4-simplex #

                      theorem Lightlike.Regge4.sq_smul {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) (c : ℝ) (a b : V) :
                      sq (fun (e : Finset V) => c * ℓ e) a b = c ^ 2 * sq ℓ a b

                      Scaling all lengths by c scales squared lengths by c².

                      theorem Lightlike.Regge4.cosDihedral4_smul {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) {c : ℝ} (hc : c ≠ 0) (p q r s u : V) :
                      cosDihedral4 (fun (e : Finset V) => c * ℓ e) p q r s u = cosDihedral4 ℓ p q r s u

                      The cosine of the dihedral angle is invariant under scaling all lengths by c ≠ 0.

                      theorem Lightlike.Regge4.dihedral4_smul {V : Type u_1} [DecidableEq V] (ℓ : Finset V → ℝ) {c : ℝ} (hc : c ≠ 0) (p q r s u : V) :
                      dihedral4 (fun (e : Finset V) => c * ℓ e) p q r s u = dihedral4 ℓ p q r s u

                      The dihedral angle is invariant under scaling all lengths by c ≠ 0.

                      theorem Lightlike.Regge4.cosDihedral4_regular {V : Type u_1} [DecidableEq V] {a : ℝ} (ha : a ≠ 0) {p q r s u : V} (hpq : p ≠ q) (hpr : p ≠ r) (hps : p ≠ s) (hpu : p ≠ u) (hqr : q ≠ r) (hqs : q ≠ s) (hqu : q ≠ u) (hrs : r ≠ s) (hru : r ≠ u) (hsu : s ≠ u) :
                      cosDihedral4 (fun (x : Finset V) => a) p q r s u = 1 / 4

                      The regular 4-simplex: with all edge lengths a ≠ 0, the dihedral angle has cos θ = 1/4.

                      The length formula is Euclidean #

                      noncomputable def Lightlike.Regge4.perp2 {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (a b c : E) :
                      E

                      The component of c orthogonal to a and b: c minus its orthogonal projection onto the span of a and b, written with Cramer's rule (for linearly independent a, b).

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        theorem Lightlike.Regge4.inner_perp2_left {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {a b : E} (h : inner ℝ a a * inner ℝ b b - inner ℝ a b ^ 2 ≠ 0) (c : E) :
                        inner ℝ (perp2 a b c) a = 0

                        perp2 a b c is orthogonal to a.

                        theorem Lightlike.Regge4.inner_perp2_right {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {a b : E} (h : inner ℝ a a * inner ℝ b b - inner ℝ a b ^ 2 ≠ 0) (c : E) :
                        inner ℝ (perp2 a b c) b = 0

                        perp2 a b c is orthogonal to b.

                        theorem Lightlike.Regge4.inner_perp2_of_orth {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {a b y : E} (ha : inner ℝ y a = 0) (hb : inner ℝ y b = 0) (d : E) :
                        inner ℝ y (perp2 a b d) = inner ℝ y d

                        A vector orthogonal to a and b has the same inner product with perp2 a b d as with d.

                        theorem Lightlike.Regge4.perp2_mem_orthogonal {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {a b : E} (h : inner ℝ a a * inner ℝ b b - inner ℝ a b ^ 2 ≠ 0) (c : E) :

                        perp2 a b c lies in the orthogonal complement of the span of a and b.

                        c - perp2 a b c lies in the span of a and b; with perp2_mem_orthogonal, perp2 a b c is the orthogonal projection of c onto the orthogonal complement of that span.

                        theorem Lightlike.Regge4.inner_perp2_perp2 {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] {a b : E} (h : inner ℝ a a * inner ℝ b b - inner ℝ a b ^ 2 ≠ 0) (c d : E) :
                        inner ℝ (perp2 a b c) (perp2 a b d) = det3 (inner ℝ a a) (inner ℝ a b) (inner ℝ a d) (inner ℝ b a) (inner ℝ b b) (inner ℝ b d) (inner ℝ c a) (inner ℝ c b) (inner ℝ c d) / (inner ℝ a a * inner ℝ b b - inner ℝ a b ^ 2)

                        The inner product of two orthogonal components is the mixed determinant divided by the Gram determinant of a, b.

                        theorem Lightlike.Regge4.sq_eq_norm {V : Type u_1} [DecidableEq V] {E : Type u_2} [NormedAddCommGroup E] (x : V → E) {ℓ : Finset V → ℝ} (hℓ : ∀ (a b : V), a ≠ b → ℓ {a, b} = dist (x a) (x b)) (a b : V) :
                        sq ℓ a b = ‖x a - x b‖ ^ 2

                        For the lengths of a placement x, squared lengths are squared distances.

                        theorem Lightlike.Regge4.ip_eq_inner {V : Type u_1} [DecidableEq V] {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (x : V → E) {ℓ : Finset V → ℝ} (hℓ : ∀ (a b : V), a ≠ b → ℓ {a, b} = dist (x a) (x b)) (o a b : V) :
                        ip ℓ o a b = inner ℝ (x a - x o) (x b - x o)

                        For the lengths of a placement x, ip is the inner product of the edge vectors.

                        theorem Lightlike.Regge4.gram2_eq_inner {V : Type u_1} [DecidableEq V] {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (x : V → E) {ℓ : Finset V → ℝ} (hℓ : ∀ (a b : V), a ≠ b → ℓ {a, b} = dist (x a) (x b)) (p q r : V) :
                        gram2 ℓ p q r = inner ℝ (x q - x p) (x q - x p) * inner ℝ (x r - x p) (x r - x p) - inner ℝ (x q - x p) (x r - x p) ^ 2

                        For the lengths of a placement, gram2 is the Gram determinant of the edge vectors.

                        theorem Lightlike.Regge4.gram2_nonneg {V : Type u_1} [DecidableEq V] {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (x : V → E) {ℓ : Finset V → ℝ} (hℓ : ∀ (a b : V), a ≠ b → ℓ {a, b} = dist (x a) (x b)) (p q r : V) :
                        0 ≤ gram2 ℓ p q r

                        For the lengths of a placement, gram2 ≥ 0 (Cauchy–Schwarz).

                        theorem Lightlike.Regge4.gram3_eq_norm {V : Type u_1} [DecidableEq V] {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (x : V → E) {ℓ : Finset V → ℝ} (hℓ : ∀ (a b : V), a ≠ b → ℓ {a, b} = dist (x a) (x b)) {p q r : V} (h : gram2 ℓ p q r ≠ 0) (s : V) :
                        gram3 ℓ p q r s = gram2 ℓ p q r * ‖perp2 (x q - x p) (x r - x p) (x s - x p)‖ ^ 2

                        For the lengths of a placement with a non-degenerate triangle pqr, gram3(pqrs) is gram2 times the squared length of the component of s - p orthogonal to the triangle.

                        theorem Lightlike.Regge4.mixed_eq_inner {V : Type u_1} [DecidableEq V] {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (x : V → E) {ℓ : Finset V → ℝ} (hℓ : ∀ (a b : V), a ≠ b → ℓ {a, b} = dist (x a) (x b)) {p q r : V} (h : gram2 ℓ p q r ≠ 0) (s u : V) :
                        mixed ℓ p q r s u = gram2 ℓ p q r * inner ℝ (perp2 (x q - x p) (x r - x p) (x s - x p)) (perp2 (x q - x p) (x r - x p) (x u - x p))

                        For the lengths of a placement with a non-degenerate triangle pqr, the mixed determinant is gram2 times the inner product of the components of s - p and u - p orthogonal to the triangle.

                        theorem Lightlike.Regge4.cosDihedral4_dist {V : Type u_1} [DecidableEq V] {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (x : V → E) {ℓ : Finset V → ℝ} (hℓ : ∀ (a b : V), a ≠ b → ℓ {a, b} = dist (x a) (x b)) {p q r : V} (h : gram2 ℓ p q r ≠ 0) (s u : V) :
                        cosDihedral4 ℓ p q r s u = inner ℝ (perp2 (x q - x p) (x r - x p) (x s - x p)) (perp2 (x q - x p) (x r - x p) (x u - x p)) / (‖perp2 (x q - x p) (x r - x p) (x s - x p)‖ * ‖perp2 (x q - x p) (x r - x p) (x u - x p)‖)

                        The length formula is Euclidean. For points of a real inner product space with a non-degenerate triangle pqr (gram2 ≠ 0), cosDihedral4 of their distances is the cosine of the angle between the components of s - p and u - p orthogonal to the plane of the triangle.

                        theorem Lightlike.Regge4.dihedral4_dist {V : Type u_1} [DecidableEq V] {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace ℝ E] (x : V → E) {ℓ : Finset V → ℝ} (hℓ : ∀ (a b : V), a ≠ b → ℓ {a, b} = dist (x a) (x b)) {p q r : V} (h : gram2 ℓ p q r ≠ 0) (s u : V) :
                        dihedral4 ℓ p q r s u = InnerProductGeometry.angle (perp2 (x q - x p) (x r - x p) (x s - x p)) (perp2 (x q - x p) (x r - x p) (x u - x p))

                        The dihedral angle from lengths is the Euclidean dihedral angle: the angle between the components of s - p and u - p orthogonal to the plane of the triangle pqr.