Documentation

Lightlike.TuraevViro.Tests

Trust checks for the Turaev–Viro model #

Checks of TuraevViro/ against values computed by hand and by an independent script, each with a deliberately wrong model that gives a different answer.

Level r = 4 #

tvModel r uses the quantum 6j symbols qSixJ r and the quantum dimensions [J + 1] at q = e^{iπ/r} (doubled spins). The move invariance of turaevViro assumes qOrthogonality and qBiedenharnElliott, which the library proves at r = 3 only (Lightlike/TuraevViro/LevelOne.lean). The checks below evaluate both at r = 4, where [2] = √2, on explicit spins.

checkvaluefrom the identitycomputed
{1 1 0; 1 1 0}, {1 1 2; 1 1 0}, {1 2 1; 1 2 1}, {0 0 0; 1 1 1}²−√2/2, √2/2, √2/2, √2/2q6j4_110_110, q6j4_112_110, q6j4_121_121, q6j4_000_111_sq
orthogonality at (B, A, E, F, q) = (1, 2, 1, 2, 1)√2/2 = 1/[2]tv4_orth_predictstv4_orth_direct; together tv4_orth_instance
orthogonality at (1, 1, 1, 1, 0)1/2 + [3]/2 = 1tv4_orth_instance'
Biedenharn–Elliott at a = … = f = 1, p = q = r = 0√2/4 + √2/4 = √2/2tv4_be_predictstv4_be_direct; together tv4_be_instance

Wrong model: with the classical dimensions x + 1 in place of [x + 1], orthogonality at (1, 2, 1, 2, 1) gives 1 where that model's own identity asks for 1/(1 + 1) = 1/2, and Biedenharn–Elliott gives √2, not √2/2 (tv4_classical_dims_fail). These are instances, not a proof of either identity at r = 4. scripts/recoupling/intertwiner_check.py (section 10) repeats the values exactly and evaluates all 3⁵ orthogonality and 3⁹ Biedenharn–Elliott instances at r = 4 to 30 digits (numerical evidence, not proof).

S³ at r = 3 #

The library normalises the state sum as Z(K) = W^{−#vertices} Σ_col weight(K, col) with W = Σ_{J < r − 1} [J + 1]², the edge factors [J + 1](−1)^J, the triangle signs triW and one 6j symbol per tetrahedron (Lightlike/TuraevViro/Model.lean). The textbook value is TV(S³) = 1/W (Turaev and Viro); that this normalisation is the textbook one is a convention match, stated here, not a theorem. The check evaluates Z on sphere3, the boundary ∂Δ⁴ of the 4-simplex (5 vertices, 10 edges, 10 triangles, 5 tetrahedra), at r = 3, where [1] = [2] = 1 and W = 2.

checkvaluefrom the normalisationcomputed
TV₃(∂Δ⁴)1/2tv3_W (1/W = 1/2)turaevViro3_sphere (2⁻⁵ · 16 over the 2¹⁰ colourings)

Z_sphere reduces the state sum of any two-colour model with the r = 3 6j symbols to a sum of integers, which the kernel evaluates (sphere3_count_tv). Wrong model: with the integer dimensions J + 1, W = 5 and Z = 721/3125, not 1/5 (classical3_sphere_fails). scripts/recoupling/intertwiner_check.py (section 11) evaluates the state sum directly from the 6j formula, the five tetrahedra and the ten triangles (an independent computation, not proof).

References #

[1] = 1 at r = 4.

[2] = √2 at r = 4.

[3] = [1] = 1 at r = 4.

[4] = 0 at r = 4.

theorem Lightlike.TV.Test.qfact4 (n : ℕ) :
qfact 4 n = if n ≤ 1 then 1 else if n ≤ 3 then √2 else 0

The quantum factorials at r = 4: 1, 1, √2, √2, 0, 0, ….

theorem Lightlike.TV.Test.invQFact4 (u : ℤ) :
invQFact 4 u = if 0 ≤ u ∧ u ≤ 1 then 1 else if 2 ≤ u ∧ u ≤ 3 then (√2)⁻¹ else 0

1/[u]! at r = 4.

√2² = 2.

1/√2 = √2/2.

The triangle coefficient Δ = (√2)^{-1/2}, written √((√2)⁻¹), squares to √2/2.

Δ⁴ = 1/2.

Δ(1, 1, 0) = (√2)^{-1/2} at r = 4.

Δ(0, 0, 0) = 1.

theorem Lightlike.TV.Test.q6j4_110_110 :
qSixJ 4 1 1 0 1 1 0 = -(√2 / 2)

Explicit value {1 1 0; 1 1 0}_q = -√2/2 at r = 4 (spins 1/2, 1/2, 0).

theorem Lightlike.TV.Test.q6j4_112_110 :
qSixJ 4 1 1 2 1 1 0 = √2 / 2

Explicit value {1 1 2; 1 1 0}_q = √2/2.

theorem Lightlike.TV.Test.q6j4_121_121 :
qSixJ 4 1 2 1 1 2 1 = √2 / 2

Explicit value {1 2 1; 1 2 1}_q = √2/2.

theorem Lightlike.TV.Test.q6j4_000_111_sq :
qSixJ 4 0 0 0 1 1 1 ^ 2 = √2 / 2

Explicit value {0 0 0; 1 1 1}_q² = √2/2 (the symbol itself is -2^{-1/4}).

theorem Lightlike.TV.Test.q6j4_120_121 :
qSixJ 4 1 2 0 1 2 1 = 0

An inadmissible symbol vanishes ((1, 2, 0) is not a triangle).

theorem Lightlike.TV.Test.q6j4_122_121 :
qSixJ 4 1 2 2 1 2 1 = 0

An inadmissible symbol vanishes ((1, 2, 2) has odd perimeter).

theorem Lightlike.TV.Test.q6j4_111_110 :
qSixJ 4 1 1 1 1 1 0 = 0

An inadmissible symbol vanishes ((1, 1, 1) has odd perimeter).

theorem Lightlike.TV.Test.tv4_orth_predicts :
(if qAdm 4 2 1 1 ∧ qAdm 4 1 1 2 then 1 / qnum 4 (1 + 1) else 0) = √2 / 2

Prediction (qOrthogonality at (B, A, E, F, q) = (1, 2, 1, 2, 1)): the right side is 1/[2] = √2/2.

theorem Lightlike.TV.Test.tv4_orth_direct :
∑ x ∈ Finset.range 3, qnum 4 (x + 1) * qSixJ 4 1 2 x 1 2 1 ^ 2 = √2 / 2

Direct computation: only x = 1 contributes, [2] · (√2/2)² = √2/2.

theorem Lightlike.TV.Test.tv4_orth_instance :
∑ x ∈ Finset.range (tvModel 4 ⋯).N, (tvModel 4 ⋯).dim x * (tvModel 4 ⋯).f 1 2 x 1 2 1 ^ 2 = if (tvModel 4 ⋯).ok 2 1 1 ∧ (tvModel 4 ⋯).ok 1 1 2 then 1 / (tvModel 4 ⋯).dim 1 else 0

The r = 4 orthogonality hypothesis holds at (1, 2, 1, 2, 1).

theorem Lightlike.TV.Test.tv4_orth_instance' :
∑ x ∈ Finset.range 3, qnum 4 (x + 1) * qSixJ 4 1 1 x 1 1 0 ^ 2 = 1 ∧ (if qAdm 4 1 1 0 ∧ qAdm 4 1 0 1 then 1 / qnum 4 (0 + 1) else 0) = 1

Second orthogonality instance, (1, 1, 1, 1, 0): [1] · 1/2 + [3] · 1/2 = 1 = 1/[1].

theorem Lightlike.TV.Test.tv4_be_predicts :
qSixJ 4 0 0 0 1 1 1 * qSixJ 4 0 0 0 1 1 1 = √2 / 2

Prediction (qBiedenharnElliott at a = … = f = 1, p = q = r = 0): the right side is {0 0 0; 1 1 1}² = √2/2.

theorem Lightlike.TV.Test.tv4_be_direct :
∑ x ∈ Finset.range 3, (-1) ^ ((1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + x) / 2) * qnum 4 (x + 1) * (qSixJ 4 1 1 x 1 1 0 * qSixJ 4 1 1 x 1 1 0 * qSixJ 4 1 1 x 1 1 0) = √2 / 2

Direct computation: the left side is x = 0 plus x = 2, √2/4 + √2/4.

theorem Lightlike.TV.Test.tv4_be_instance :
∑ x ∈ Finset.range (tvModel 4 ⋯).N, (-1) ^ ((1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + x) / 2) * (tvModel 4 ⋯).dim x * ((tvModel 4 ⋯).f 1 1 x 1 1 0 * (tvModel 4 ⋯).f 1 1 x 1 1 0 * (tvModel 4 ⋯).f 1 1 x 1 1 0) = (tvModel 4 ⋯).f 0 0 0 1 1 1 * (tvModel 4 ⋯).f 0 0 0 1 1 1

The r = 4 Biedenharn–Elliott hypothesis holds at (1, 1, 1, 1, 1, 1, 0, 0, 0).

theorem Lightlike.TV.Test.tv4_classical_dims_fail :
∑ x ∈ Finset.range 3, (↑x + 1) * qSixJ 4 1 2 x 1 2 1 ^ 2 ≠ 1 / (1 + 1) ∧ ∑ x ∈ Finset.range 3, (-1) ^ ((1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + x) / 2) * (↑x + 1) * (qSixJ 4 1 1 x 1 1 0 * qSixJ 4 1 1 x 1 1 0 * qSixJ 4 1 1 x 1 1 0) ≠ qSixJ 4 0 0 0 1 1 1 * qSixJ 4 0 0 0 1 1 1

Wrong model: classical dimensions x + 1 in place of [x + 1] break both identities: orthogonality gives 2 · 1/2 = 1 ≠ 1/2, Biedenharn–Elliott gives √2/4 + 3√2/4 = √2 ≠ √2/2.

The boundary of the 4-simplex, a triangulation of S³: the five 4-subsets of Fin 5.

Equations
Instances For

    The ten edges of ∂Δ⁴, in lexicographic order.

    Equations
    Instances For

      The ten triangles of ∂Δ⁴.

      Equations
      Instances For

        The five tetrahedra of ∂Δ⁴.

        Equations
        Instances For

          The edge list is the edge set of ∂Δ⁴, without repetition.

          The triangle list is the triangle set of ∂Δ⁴, without repetition.

          The tetrahedron list is the tetrahedron set of ∂Δ⁴, without repetition.

          ∂Δ⁴ has five vertices.

          theorem Lightlike.TV.Test.tri_facts (a b c : Fin 5) :
          a < b → b < c → Finset.powersetCard 2 {a, b, c} = [{a, b}, {a, c}, {b, c}].toFinset ∧ [{a, b}, {a, c}, {b, c}].Nodup

          The edges of a triangle a < b < c.

          theorem Lightlike.TV.Test.tet_facts (a b c d : Fin 5) :
          a < b → b < c → c < d → {a, b, c, d}.card = 4 ∧ Function.Injective ![a, b, c, d]

          A tetrahedron a < b < c < d has four vertices and ![a, b, c, d] enumerates it.

          theorem Lightlike.TV.Test.triW_sphere (col : PR.Colouring (Fin 5)) {a b c : Fin 5} (hab : a < b) (hbc : b < c) :
          PR.triW col {a, b, c} = (-1) ^ ((col {a, b} + col {a, c} + col {b, c}) / 2)

          The triangle sign of a < b < c.

          theorem Lightlike.TV.Test.tetW_sphere (M : Model) (hf : ∀ (j₁ j₂ j₃ j₄ j₅ j₆ : ℕ), M.f j₁ j₂ j₃ j₄ j₅ j₆ = qSixJ 3 j₁ j₂ j₃ j₄ j₅ j₆) (col : PR.Colouring (Fin 5)) {a b c d : Fin 5} (hab : a < b) (hbc : b < c) (hcd : c < d) :
          M.tetW col {a, b, c, d} = ↑(t3 (col {c, d}) (col {b, d}) (col {b, c}) (col {a, b}) (col {a, c}) (col {a, d}))

          The tetrahedron weight of a < b < c < d in a model whose 6j symbol is the r = 3 one.

          def Lightlike.TV.Test.w3 (ε : ℕ → ℤ) (c01 c02 c03 c04 c12 c13 c14 c23 c24 c34 : ℕ) :

          The weight of a colouring of ∂Δ⁴ with colours 0, 1, as an integer: edge factors ε, ten triangle signs, five r = 3 6j symbols.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Lightlike.TV.Test.weight_sphere (M : Model) (hf : ∀ (j₁ j₂ j₃ j₄ j₅ j₆ : ℕ), M.f j₁ j₂ j₃ j₄ j₅ j₆ = qSixJ 3 j₁ j₂ j₃ j₄ j₅ j₆) (ε : ℕ → ℤ) (hε : ∀ J < 2, M.edgeW J = ↑(ε J)) (col : PR.Colouring (Fin 5)) (hcol : ∀ (e : Finset (Fin 5)), col e < 2) :
            M.weight sphere3 col = ↑(w3 ε (col {0, 1}) (col {0, 2}) (col {0, 3}) (col {0, 4}) (col {1, 2}) (col {1, 3}) (col {1, 4}) (col {2, 3}) (col {2, 4}) (col {3, 4}))

            The weight of ∂Δ⁴ in a model with the r = 3 6j symbols and edge weights ε on {0, 1}.

            noncomputable def Lightlike.TV.Test.nestSum2 {V : Type u_1} [DecidableEq V] :
            List (Finset V) → (PR.Colouring V → ℝ) → ℝ

            Nested sum over the colours {0, 1} of a list of edges.

            Equations
            Instances For
              theorem Lightlike.TV.Test.sum_pi_eq_nestSum2 {V : Type u_1} [DecidableEq V] (l : List (Finset V)) :
              l.Nodup → ∀ (F G : PR.Colouring V → ℝ), (∀ (col : PR.Colouring V), (∀ (e : Finset V), col e < 2) → F col = G col) → ∑ σ ∈ l.toFinset.pi fun (x : Finset V) => Finset.range 2, F (PR.extS l.toFinset σ) = nestSum2 l G

              A state sum over colourings S → {0, 1} is a nested sum, edge by edge.

              theorem Lightlike.TV.Test.Z_sphere (M : Model) (hN : M.N = 2) (hf : ∀ (j₁ j₂ j₃ j₄ j₅ j₆ : ℕ), M.f j₁ j₂ j₃ j₄ j₅ j₆ = qSixJ 3 j₁ j₂ j₃ j₄ j₅ j₆) (ε : ℕ → ℤ) (hε : ∀ J < 2, M.edgeW J = ↑(ε J)) :
              M.Z sphere3 = M.W⁻¹ ^ 5 * ↑(∑ x₁₀ ∈ Finset.range 2, ∑ x₉ ∈ Finset.range 2, ∑ x₈ ∈ Finset.range 2, ∑ x₇ ∈ Finset.range 2, ∑ x₆ ∈ Finset.range 2, ∑ x₅ ∈ Finset.range 2, ∑ x₄ ∈ Finset.range 2, ∑ x₃ ∈ Finset.range 2, ∑ x₂ ∈ Finset.range 2, ∑ x₁ ∈ Finset.range 2, w3 ε x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ x₉ x₁₀)

              The state sum of ∂Δ⁴ in a two-colour model with the r = 3 6j symbols: Z = W^{-5} · Σ w3, the sum over the 2¹⁰ colourings.

              The Turaev–Viro edge factor at r = 3 on the colours {0, 1}: [J + 1](-1)^J = (-1)^J.

              Equations
              Instances For

                The classical edge factor (J + 1)(-1)^J (integer dimensions; wrong model).

                Equations
                Instances For
                  theorem Lightlike.TV.Test.sphere3_count_tv :
                  ∑ x₁₀ ∈ Finset.range 2, ∑ x₉ ∈ Finset.range 2, ∑ x₈ ∈ Finset.range 2, ∑ x₇ ∈ Finset.range 2, ∑ x₆ ∈ Finset.range 2, ∑ x₅ ∈ Finset.range 2, ∑ x₄ ∈ Finset.range 2, ∑ x₃ ∈ Finset.range 2, ∑ x₂ ∈ Finset.range 2, ∑ x₁ ∈ Finset.range 2, w3 epsTV x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ x₉ x₁₀ = 16

                  2¹⁰ colourings, 16 of weight +1 (the ℤ/2 coboundaries), all others 0.

                  theorem Lightlike.TV.Test.sphere3_count_cl :
                  ∑ x₁₀ ∈ Finset.range 2, ∑ x₉ ∈ Finset.range 2, ∑ x₈ ∈ Finset.range 2, ∑ x₇ ∈ Finset.range 2, ∑ x₆ ∈ Finset.range 2, ∑ x₅ ∈ Finset.range 2, ∑ x₄ ∈ Finset.range 2, ∑ x₃ ∈ Finset.range 2, ∑ x₂ ∈ Finset.range 2, ∑ x₁ ∈ Finset.range 2, w3 epsCl x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ x₉ x₁₀ = 721

                  The same sum with integer dimensions.

                  theorem Lightlike.TV.Test.tv3_W :
                  (tvModel 3 ⋯).W = 2

                  Prediction (the normalisation): at r = 3, W = [1]² + [2]² = 2, so a triangulation invariant with Z(S³) = 1/W must give 1/2.

                  Direct computation: TV₃(∂Δ⁴) = 2⁻⁵ · 16 = 1/2, over all 2¹⁰ colourings. With the library's normalisation Z = W^{-#vertices} Σ weight, this is the textbook TV(S³) = 1/W.

                  The two-colour model with the r = 3 6j symbols and integer dimensions J + 1.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    Wrong model: with integer dimensions, W = 1 + 4 = 5 but the state sum of ∂Δ⁴ is 721/3125, not 1/5.