This section takes a route different from the heat trace. Two discrete pictures of gravity, causal dynamical triangulations and loop quantum gravity, are brought to one place, the Regge action, and from there to four-dimensional de Sitter space and the Einstein–Hilbert action. The gauge group and one generation of the Standard Model are then read from \(\mathbb R\), \(\mathbb C\), \(\mathbb H\) and \(\mathbb O\).
Link 54: counting faces. The boundary of the \(m\)-simplex has \(m+1\) vertices, and its \(k\)-faces are the \((k+1)\)-element subsets:
For the four-sphere \(\partial \Delta ^5\):
In general, from \(\sum _i (-1)^i \binom {m+1}{i} = 0\),
A \(k\)-face of \(\partial \Delta ^m\) lies in \(m - k\) facets; a triangle of \(\partial \Delta ^5\) lies in \(3\) four-simplices.
Link 55: the angle and the deficit. Place the vertices of a regular \(n\)-simplex at unit vectors \(v_i\) with \(v_i \cdot v_j = -1/n\). The facet opposite \(v_i\) has outward normal \(-v_i\), so the dihedral angle \(\theta \) between two facets satisfies
At a triangle \(t\) met by \(n_t\) four-simplices the deficit is \(\varepsilon _t = 2\pi - n_t\,\theta \). Since
we have \(2\pi /5 < \theta < \pi /2\), and so
| \(n_t\) | \(\varepsilon _t\) | |
| \(\leq 4\) | \(> 0\) | positive curvature |
| \(\geq 5\) | \(< 0\) | negative curvature |
No equilateral triangle is flat: curvature is carried by the integer \(n_t\). On \(\partial \Delta ^5\), \(n_t = 3\) and \(\varepsilon _t = 2\pi - 3\theta > 0\) at every triangle.
Link 56: the Regge action.
With edge length \(a\), \(A_t = \frac {\sqrt 3}{4} a^2\) and \(V_\sigma = \frac {\sqrt 5}{96} a^4\). Each four-simplex has \(10\) triangles, so \(\sum _t n_t = 10\,N_4\) and
The action is linear in the counts \(N_2\), \(N_4\); with the Dehn–Sommerville relations it takes the form \(-k_0 N_0 + k_4 N_4\).
Link 57: from counts to de Sitter. Causal dynamical triangulations sum over equilateral triangulations with a time slicing [975]. There are two kinds of four-simplices, \((4,1)\) and \((3,2)\), and the Euclidean action is
The volume \(N_3(t)\) of the slices follows the effective action
In the continuum, put \(V = 2\pi ^2 a(t)^3\) for the metric \(dt^2 + a(t)^2\,d\Omega _3^2\):
These are, term by term, the three terms of the Einstein–Hilbert action on this metric, \(a\dot a^2\), \(a\) and \(\Lambda a^3\). With \(\Lambda = 3/R^2\) the solution is
This \(\cos ^3\) profile is the one measured in the causal sum.
Link 58: the spectral dimension. If the propagator goes as \(p^{-(2-\eta )}\), the return probability is
The second line is the non-Gaussian fixed point [977]; the causal sum measures the same flow from \(4\) to about \(2\) [976].
Link 59: the area spectrum. A surface cut by spin-network edges of spins \(j_i\) has area [853]
Counting horizon states gives \(S = A/4\ell _P^2\) when \(\gamma \) solves [855, 856]
Link 60: the meeting point. For large spins the EPRL four-simplex amplitude [978] becomes the Regge action [979]:
So spin foams reduce to Regge, and the causal sum is a sum of Regge actions. Take all spins equal and sum over the complexes instead of over the spins. Then the area quantum fixes the edge:
With equal spins the curvature lives in the integers \(n_t\) (link 55): \(\varepsilon _t = 2\pi - n_t\theta \neq 0\), so the sum over complexes does not force flatness.
The last arrow is the convergence of \(\sum _t A_t \varepsilon _t\) to \(\frac 12 \int \sqrt g\,R\) [974].
The complex \(2\times 2\) matrices are \(\mathbb C \otimes \mathbb H\). Their Hermitian part is four-dimensional:
For \(M \in \mathrm {SL}(2,\mathbb C)\), \(X \mapsto M X M^\dagger \) keeps \(\det X\): this is the Lorentz group, and its two spinor representations are the two Weyl spinors.
Link 62: the gauge group.
| Algebra | Group | Reading | Dimension |
| \(\mathbb C\) | \(\mathrm U(1)\) | unit complex numbers | \(1\) |
| \(\mathbb H\) | \(\mathrm {SU}(2)\) | unit quaternions | \(3\) |
| \(\mathbb O\) | \(\mathrm {SU}(3)\) | stabilizer of \(e_7\) in \(G_2 = \mathrm {Aut}(\mathbb O)\) | \(8\) |
\(G_2\)has dimension \(14\) and acts transitively on the unit imaginary octonions \(S^6\), so the stabilizer has dimension \(14 - 6 = 8\). In total \(1 + 3 + 8 = 12\).
Link 63: one generation from \(\mathbb C\otimes \mathbb O\). Left multiplications on \(\mathbb C \otimes \mathbb O\) generate \(C\ell (6)\), of complex dimension \(2^6 = 64\) [158, 980]. Choose a Witt basis \(\alpha _1, \alpha _2, \alpha _3\) from imaginary units orthogonal to \(e_7\):
The minimal left ideal has basis \(\alpha _{i_1}^\dagger \cdots \alpha _{i_k}^\dagger v\), and the number operator \(N := \sum _i \alpha _i^\dagger \alpha _i\) takes the value \(k\) on it. With \(Q := N/3\):
| \(N\) | Multiplicity \(\binom {3}{N}\) | \(Q\) | State |
| 0 | 1 | \(0\) | \(\nu \) |
| 1 | 3 | \(\tfrac 13\) | \(\bar d\) |
| 2 | 3 | \(\tfrac 23\) | \(u\) |
| 3 | 1 | \(1\) | \(e^{+}\) |
The operators \(\alpha _i^\dagger \alpha _j\) keep \(N\) and generate the \(\mathrm {SU}(3)\) of link 62 on the triplets; the conjugate ideal gives \(\bar \nu , d, \bar u, e^{-}\) with the opposite charges. This derives one generation; the number of generations is not derived here.
Link 64: the anomalies cancel. For the left-handed Weyl fields of one generation, with hypercharge written as \(6Y\):
| Field | \((\mathrm {SU}(3), \mathrm {SU}(2))\) | States \(m\) | \(6Y\) |
| \(Q\) | \((3, 2)\) | 6 | \(1\) |
| \(\bar u\) | \((\bar 3, 1)\) | 3 | \(-4\) |
| \(\bar d\) | \((\bar 3, 1)\) | 3 | \(2\) |
| \(L\) | \((1, 2)\) | 2 | \(-3\) |
| \(\bar e\) | \((1, 1)\) | 1 | \(6\) |
| Link | From | What appears |
| 54 | 53 | faces of \(\partial \Delta ^m\), \(\chi = 1 + (-1)^{m+1}\) |
| 55 | 54 | \(\cos \theta = \tfrac 14\), \(4\theta < 2\pi < 5\theta \) |
| 56 | 55 | the Regge action, linear in the counts |
| 57 | 56 | the causal sum: \(\cos ^3\) profile \(= S^4\) |
| 58 | 57 | spectral dimension \(2d/(2-\eta )\): \(4 \to 2\) |
| 59 | 56 | area spectrum, area gap, \(\gamma \) |
| 60 | 55, 57, 59 | spin foam \(\to \) Regge; \(a^2 = 16\pi \gamma \,\ell _P^2\) |
| 61 | 20 | \(\mathbb C\otimes \mathbb H\): four dimensions, Lorentz |
| 62 | 20 | \(\mathrm U(1)\times \mathrm {SU}(2)\times \mathrm {SU}(3)\), \(1+3+8\) |
| 63 | 62, 53 | one generation, \(Q = N/3\), multiplicities \(\binom 3N\) |
| 64 | 63 | anomaly cancellation |
The integer statements of this section are checked in two Lean 4 files, SimplexChain.lean and SMChain.lean, added to the library Work of Section 77 and built by the same lake build. They follow the same rules: Lean core only, hand-written terms, no omega, simp, ring or decide, and rfl only on concrete numbers. All \(18 + 10\) theorems report “does not depend on any axioms” (Listing 16). The statements about real numbers are checked numerically by numeric_gs.py, which uses the Python standard library only; its seven checks all pass (Listing 384).
| Link | Check | Scope |
| 54 | euler_char, euler_odd, euler_even | every \(m \geq 1\) |
| 54 | cofaces_eq | every \(m\), \(k < m\) |
| 54 | fvec5, chi5, triangle5 | \(\partial \Delta ^5\) |
| 55 | \(\theta = \arccos \frac 14\), \(4\theta < 2\pi < 5\theta \) | numerical |
| 57 | \(\int _{-\pi /2}^{\pi /2}\cos ^3 = \frac 43\), \(\mathrm {vol}(S^4) = \frac {8\pi ^2}{3}R^4\) | numerical |
| 58 | \(d_s = 2d/(2-\eta )\) at \(\eta = 0\) and \(\eta = 2-d\) | numerical |
| 59 | root \(\gamma \) of \(1 = \sum _k 2e^{-\pi \gamma \sqrt {k(k+2)}}\) | numerical, to \(10^{-12}\) |
| 60 | \(a^2 = 16\pi \gamma \,\ell _P^2\) | numerical |
| 62 | su_dims, gauge_dim | exact |
| 63, 64 | charge multiplicities \(\binom {3}{N}\); the four anomaly sums | exact |
What the check rests on. The Euler characteristic of \(\partial \Delta ^m\) is proved for every \(m\) as a natural-number identity, using the equality of the even and odd binomial sums proved in DefectChain.lean. In SMChain.lean the dimensions \(1 + 3 + 8 = 12\) and \(14 - 6 = 8\), the multiplicities \(\binom {3}{N}\) with total \(2^3\), and the anomaly sums over the integers \(6Y\) are exact computations; the identification of \(\mathrm {SU}(3)\) with the stabilizer of \(e_7\) in \(G_2\), and of the Witt basis inside \(\mathbb C \otimes \mathbb O\), are not formalized. Links 55 and 57–60 involve real numbers and are checked numerically, not in Lean. Link 61 is not in these files.
SimplexChain.lean
/-
SimplexChain.lean
Counting the faces of the boundary of a simplex (link 54).
Lean 4 core plus FTAChain, FrobChain (Pascal binomial `C`, `sumTo`) and
DefectChain (`even_eq_odd`). Proofs are hand-written terms and plain
rewriting; no omega / simp / ring / decide / norm_num / linarith.
Concrete numbers are checked with `rfl`.
∂Δ^m has `faces m k = C (m+1) (k+1)` faces of dimension k, for k < m.
The Euler characteristic χ = Σ_k (-1)^k faces m k is written without signs
as `chiEven m = chiOdd m + 2 * par (m + 1)`, i.e. χ = 1 + (-1)^(m+1).
Proved here:
par_dbl, par_dbl1, par_cases parity weight
sum_tail_zero vanishing tail terms
evenSum_w, oddSum_w DefectChain's halves as weighted sums
w_succ, v_succ peel off the i = 0 and i = m+1 terms
add_right_cancel' a + k = b + k → a = b
euler_char every m: χ(∂Δ^m) = 1 + (-1)^(m+1)
euler_odd, euler_even χ = 2 for odd m, χ = 0 for even m ≥ 2
fvec5, chi5 ∂Δ^5: (6,15,20,15,6), χ = 2
C_succ_self, cofaces_eq k < m: a k-face lies in m - k facets
triangle5 a triangle of ∂Δ^5 lies in 3 four-simplices
-/
import DefectChain
namespace SimplexChain
open FTAChain FrobChain DefectChain
/-! ## Faces -/
/-- Number of k-faces of ∂Δ^m (choose k+1 of the m+1 vertices). -/
def faces (m k : Nat) : Nat := C (m + 1) (k + 1)
/-- Parity weight: `par k = 1` for even k, `0` for odd k. -/
def par : Nat → Nat
| 0 => 1
| 1 => 0
| n + 2 => par n
/-- Σ over even dimensions k < m. -/
def chiEven (m : Nat) : Nat := sumTo m (fun k => par k * faces m k)
/-- Σ over odd dimensions k < m. -/
def chiOdd (m : Nat) : Nat := sumTo m (fun k => par (k + 1) * faces m k)
theorem par_dbl : ∀ j : Nat, par (j + j) = 1
| 0 => rfl
| j + 1 => by
rw [← Nat.add_assoc (j + 1) j 1, Nat.add_right_comm j 1 j]
show par (j + j) = 1
exact par_dbl j
theorem par_dbl1 : ∀ j : Nat, par (j + j + 1) = 0
| 0 => rfl
| j + 1 => by
rw [← Nat.add_assoc (j + 1) j 1, Nat.add_right_comm j 1 j]
show par (j + j + 1) = 0
exact par_dbl1 j
theorem par_cases : ∀ m : Nat, (par m = 1 ∧ par (m + 1) = 0) ∨ (par m = 0 ∧ par (m + 1) = 1)
| 0 => Or.inl ⟨rfl, rfl⟩
| 1 => Or.inr ⟨rfl, rfl⟩
| m + 2 => par_cases m
/-! ## Weighted binomial sums -/
theorem sum_tail_zero (n : Nat) (g : Nat → Nat) (h : ∀ j, g (n + j) = 0) :
∀ k : Nat, sumTo (n + k) g = sumTo n g
| 0 => rfl
| k + 1 => by
show sumTo (n + k) g + g (n + k) = sumTo n g
rw [sum_tail_zero n g h k, h k, Nat.add_zero]
/-- `Σ_{i ≤ l} par i * C l i`. -/
def W (l : Nat) : Nat := sumTo (l + 1) (fun i => par i * C l i)
/-- `Σ_{i ≤ l} par (i+1) * C l i`. -/
def V (l : Nat) : Nat := sumTo (l + 1) (fun i => par (i + 1) * C l i)
theorem tail_C (l : Nat) (w : Nat → Nat) (j : Nat) : w (l + 1 + j) * C l (l + 1 + j) = 0 := by
rw [Nat.add_right_comm l 1 j, C_gt l j, Nat.mul_zero]
theorem evenSum_w (l : Nat) : evenSum l = W l := by
show sumTo (l + 1) (fun j => C l (j + j)) = W l
have e : sumTo (l + 1) (fun j => C l (j + j))
= sumTo (l + 1) (fun j => par (j + j) * C l (j + j) + par (j + j + 1) * C l (j + j + 1)) :=
sum_ext _ _ _ (fun j _ => by rw [par_dbl, par_dbl1, Nat.one_mul, Nat.zero_mul, Nat.add_zero])
rw [e, ← sum_pairs (fun i => par i * C l i) (l + 1)]
exact sum_tail_zero (l + 1) _ (tail_C l par) (l + 1)
theorem oddSum_w (l : Nat) : oddSum l = V l := by
show sumTo (l + 1) (fun j => C l (j + j + 1)) = V l
have e : sumTo (l + 1) (fun j => C l (j + j + 1))
= sumTo (l + 1)
(fun j => par (j + j + 1) * C l (j + j) + par (j + j + 1 + 1) * C l (j + j + 1)) :=
sum_ext _ _ _ (fun j _ => by
rw [par_dbl1]
show C l (j + j + 1) = 0 * C l (j + j) + par (j + j) * C l (j + j + 1)
rw [par_dbl, Nat.one_mul, Nat.zero_mul, nzero_add])
rw [e, ← sum_pairs (fun i => par (i + 1) * C l i) (l + 1)]
exact sum_tail_zero (l + 1) _ (tail_C l (fun i => par (i + 1))) (l + 1)
theorem w_succ (m : Nat) : W (m + 1) = 1 + (chiOdd m + par (m + 1)) := by
show sumTo (m + 1 + 1) (fun i => par i * C (m + 1) i) = _
rw [sum_shift]
show 1 * 1 + (chiOdd m + par (m + 1) * C (m + 1) (m + 1)) = _
rw [C_self, Nat.mul_one (par (m + 1))]
theorem v_succ (m : Nat) : V (m + 1) = chiEven m + par m := by
show sumTo (m + 1 + 1) (fun i => par (i + 1) * C (m + 1) i) = _
rw [sum_shift]
show 0 * 1 + (chiEven m + par m * C (m + 1) (m + 1)) = _
rw [C_self, Nat.mul_one (par m)]
exact nzero_add _
/-! ## The Euler characteristic -/
/-- Right cancellation, by hand (the core lemma uses `propext`). -/
theorem add_right_cancel' {a b : Nat} : ∀ k : Nat, a + k = b + k → a = b
| 0, h => h
| k + 1, h => add_right_cancel' k (succ_inj' h)
/-- **χ(∂Δ^m) = 1 + (-1)^(m+1)**, written in natural numbers:
the even-dimensional count equals the odd-dimensional count plus
`2` if m is odd and plus `0` if m is even. -/
theorem euler_char (m : Nat) : chiEven m = chiOdd m + 2 * par (m + 1) := by
have h0 : evenSum (m + 1) = oddSum (m + 1) :=
even_eq_odd (m + 1) (Nat.succ_le_succ (Nat.zero_le m))
have h : 1 + (chiOdd m + par (m + 1)) = chiEven m + par m :=
(w_succ m).symm.trans ((evenSum_w _).symm.trans (h0.trans ((oddSum_w _).trans (v_succ m))))
cases par_cases m with
| inl hp =>
have h1 : 1 + (chiOdd m + 0) = chiEven m + 1 :=
(congrArg (fun t => 1 + (chiOdd m + t)) hp.2).symm.trans
(h.trans (congrArg (fun t => chiEven m + t) hp.1))
rw [hp.2]
exact (add_right_cancel' 1 ((Nat.add_comm 1 (chiOdd m)).symm.trans h1)).symm
| inr hp =>
have h1 : 1 + (chiOdd m + 1) = chiEven m + 0 :=
(congrArg (fun t => 1 + (chiOdd m + t)) hp.2).symm.trans
(h.trans (congrArg (fun t => chiEven m + t) hp.1))
rw [hp.2]
exact h1.symm.trans (Nat.add_comm 1 (chiOdd m + 1))
/-- Odd m = 2n+1: χ(∂Δ^m) = 2. -/
theorem euler_odd (n : Nat) : chiEven (n + n + 1) = chiOdd (n + n + 1) + 2 := by
rw [euler_char, Nat.add_assoc (n + n) 1 1]
show chiOdd (n + n + 1) + 2 * par (n + n) = _
rw [par_dbl]
/-- Even m = 2n+2 ≥ 2: χ(∂Δ^m) = 0. -/
theorem euler_even (n : Nat) : chiEven (n + n + 2) = chiOdd (n + n + 2) := by
rw [euler_char]
show chiOdd (n + n + 2) + 2 * par (n + n + 1) = _
rw [par_dbl1]
rfl
/-! ## ∂Δ^5 -/
def fvec (m : Nat) : List Nat := (List.range m).map (faces m)
theorem fvec5 : fvec 5 = [6, 15, 20, 15, 6] := rfl
theorem chi5 : chiEven 5 = 32 ∧ chiOdd 5 = 30 ∧ chiEven 5 = chiOdd 5 + 2 := ⟨rfl, rfl, rfl⟩
/-! ## Facets through a face -/
/-- Number of (m-1)-faces of ∂Δ^m containing a fixed k-face:
choose the missing m-1-k vertices among the other m-k. -/
def cofaces (m k : Nat) : Nat := C (m - k) (m - k - 1)
theorem C_succ_self : ∀ n : Nat, C (n + 1) n = n + 1
| 0 => rfl
| n + 1 => by
show C (n + 1) n + C (n + 1) (n + 1) = n + 1 + 1
rw [C_succ_self n, C_self]
/-- **k < m: a k-face of ∂Δ^m lies in exactly m - k facets.** -/
theorem cofaces_eq (m k : Nat) (h : k < m) : cofaces m k = m - k := by
show C (m - k) (m - k - 1) = m - k
rw [← sub_succ_add m k h]
exact C_succ_self (m - (k + 1))
/-- A triangle of ∂Δ^5 lies in 3 four-simplices. -/
theorem triangle5 : cofaces 5 2 = 3 ∧ faces 5 2 = 20 := ⟨rfl, rfl⟩
end SimplexChain
#print axioms SimplexChain.par_dbl
#print axioms SimplexChain.par_dbl1
#print axioms SimplexChain.par_cases
#print axioms SimplexChain.sum_tail_zero
#print axioms SimplexChain.tail_C
#print axioms SimplexChain.evenSum_w
#print axioms SimplexChain.oddSum_w
#print axioms SimplexChain.w_succ
#print axioms SimplexChain.v_succ
#print axioms SimplexChain.add_right_cancel'
#print axioms SimplexChain.euler_char
#print axioms SimplexChain.euler_odd
#print axioms SimplexChain.euler_even
#print axioms SimplexChain.fvec5
#print axioms SimplexChain.chi5
#print axioms SimplexChain.C_succ_self
#print axioms SimplexChain.cofaces_eq
#print axioms SimplexChain.triangle5
SMChain.lean
/-
SMChain.lean
Standard Model numbers (links 62-64).
Lean 4 core plus FTAChain, FrobChain and DefectChain (`sum_C`).
Concrete numbers are checked with `rfl`; the general count uses `sum_C`.
No omega / simp / ring / decide / norm_num / linarith.
Proved here:
gauge_dim dim U(1) + dim SU(2) + dim SU(3) = 1 + 3 + 8 = 12
su_dims dim SU(n) = n^2 - 1 for n = 2, 3
g2_minus_s6 dim G2 - dim S^6 = 14 - 6 = 8 = dim SU(3)
charge_mult multiplicity of N ∈ {0,1,2,3} is C 3 N = 1, 3, 3, 1
charge_total Σ_N C 3 N = 2^3 (from sum_C)
charge_total_8 ... = 8
anomaly_linear Σ m·(6Y) = 0
anomaly_cubic Σ m·(6Y)^3 = 0
anomaly_su3 2·1 + (-4) + 2 = 0
anomaly_su2 3·1 + (-3) = 0
-/
import DefectChain
namespace SMChain
open FTAChain FrobChain DefectChain
/-! ## Gauge dimensions -/
def dimSU (n : Nat) : Nat := n * n - 1
def dimU1 : Nat := 1
def dimG2 : Nat := 14
def dimS6 : Nat := 6
theorem su_dims : dimSU 2 = 3 ∧ dimSU 3 = 8 := ⟨rfl, rfl⟩
theorem gauge_dim : dimU1 + dimSU 2 + dimSU 3 = 12 := rfl
theorem g2_minus_s6 : dimG2 - dimS6 = 8 ∧ dimG2 - dimS6 = dimSU 3 := ⟨rfl, rfl⟩
/-! ## Charges in one generation -/
/-- Multiplicity of charge level N ∈ {0,1,2,3}. -/
def mult (N : Nat) : Nat := C 3 N
theorem charge_mult : mult 0 = 1 ∧ mult 1 = 3 ∧ mult 2 = 3 ∧ mult 3 = 1 :=
⟨rfl, rfl, rfl, rfl⟩
/-- **Σ_{N=0}^{3} C 3 N = 2^3**, from the general `sum_C`. -/
theorem charge_total : sumTo 4 mult = 2 ^ 3 := sum_C 3
theorem charge_total_8 : sumTo 4 mult = 8 := charge_total
/-! ## Anomaly cancellation -/
/-- One generation as a table of (multiplicity m, 6Y). -/
def table : List (Int × Int) := [(6, 1), (3, -4), (3, 2), (2, -3), (1, 6)]
def sumLin : List (Int × Int) → Int
| [] => 0
| (m, y) :: t => m * y + sumLin t
def sumCube : List (Int × Int) → Int
| [] => 0
| (m, y) :: t => m * y ^ 3 + sumCube t
theorem anomaly_linear : sumLin table = 0 := rfl
theorem anomaly_cubic : sumCube table = 0 := rfl
theorem anomaly_su3 : (2 : Int) * 1 + (-4) + 2 = 0 := rfl
theorem anomaly_su2 : (3 : Int) * 1 + (-3) = 0 := rfl
end SMChain
#print axioms SMChain.su_dims
#print axioms SMChain.gauge_dim
#print axioms SMChain.g2_minus_s6
#print axioms SMChain.charge_mult
#print axioms SMChain.charge_total
#print axioms SMChain.charge_total_8
#print axioms SMChain.anomaly_linear
#print axioms SMChain.anomaly_cubic
#print axioms SMChain.anomaly_su3
#print axioms SMChain.anomaly_su2
numeric_gs.py
#!/usr/bin/env python3
"""T8 numerical checks (Python standard library only).
Writes the results to work/NUMERIC_GS.txt next to this script.
"""
import math
import os
def meissner_sum(g):
"""Σ_{k≥1} 2·exp(-π γ √(k(k+2))), truncated once terms drop below 1e-20."""
s, k = 0.0, 1
while True:
t = 2.0 * math.exp(-math.pi * g * math.sqrt(k * (k + 2)))
s += t
if t < 1e-20:
return s
k += 1
def bisect(f, lo, hi, tol=1e-12):
flo = f(lo)
assert flo * f(hi) < 0
while hi - lo > tol:
mid = (lo + hi) / 2
fm = f(mid)
if (fm > 0) == (flo > 0):
lo, flo = mid, fm
else:
hi = mid
return (lo + hi) / 2, hi - lo
def simpson(f, a, b, n=2000):
h = (b - a) / n
s = f(a) + f(b)
for i in range(1, n):
s += (4 if i % 2 else 2) * f(a + i * h)
return s * h / 3
def main():
out = []
ok = True
def check(name, cond):
nonlocal ok
ok = ok and cond
out.append(f" [{'PASS' if cond else 'FAIL'}] {name}")
# 1. Meissner equation
gamma, width = bisect(lambda g: meissner_sum(g) - 1.0, 0.01, 1.0)
out.append("1. Meissner: 1 = Σ_{k≥1} 2·exp(-π γ √(k(k+2)))")
out.append(f" γ = {gamma:.13f} (bracket width {width:.2e})")
out.append(f" residual Σ - 1 = {meissner_sum(gamma) - 1.0:.3e}")
check("bracket width ≤ 1e-12", width <= 1e-12)
check("|Σ(γ) - 1| < 1e-11", abs(meissner_sum(gamma) - 1.0) < 1e-11)
# 2. Tetrahedral angle
theta = math.acos(0.25)
out.append("2. θ = arccos(1/4)")
out.append(f" θ = {theta:.15f} rad = {math.degrees(theta):.12f}°")
out.append(f" 2π/θ = {2 * math.pi / theta:.12f}")
out.append(f" 4θ = {4 * theta:.12f}, 2π = {2 * math.pi:.12f}, 5θ = {5 * theta:.12f}")
check("4θ < 2π < 5θ", 4 * theta < 2 * math.pi < 5 * theta)
# 3. Area ratio
a2 = 16 * math.pi * gamma
out.append("3. a²/ℓ_P² = 16πγ")
out.append(f" a²/ℓ_P² = {a2:.12f}")
out.append(f" a/ℓ_P = {math.sqrt(a2):.12f}")
# 4. ∫ cos³
I = simpson(lambda x: math.cos(x) ** 3, -math.pi / 2, math.pi / 2)
v = 2 * math.pi ** 2 * I
out.append("4. ∫_{-π/2}^{π/2} cos³ x dx (Simpson, n = 2000)")
out.append(f" integral = {I:.15f}, 4/3 = {4 / 3:.15f}, error = {I - 4 / 3:.2e}")
out.append(f" 2π²·I = {v:.12f}, 8π²/3 = {8 * math.pi ** 2 / 3:.12f}")
check("|I - 4/3| < 1e-12", abs(I - 4 / 3) < 1e-12)
check("|2π²·I - 8π²/3| < 1e-10", abs(v - 8 * math.pi ** 2 / 3) < 1e-10)
# 5. Spectral dimension
def ds(d, eta):
return 2 * d / (2 - eta)
out.append("5. d_s = 2d/(2-η)")
out.append(f" d=4, η=0 → {ds(4, 0)}")
out.append(f" d=4, η=-2 → {ds(4, -2)}")
check("d_s(4, 0) = 4", ds(4, 0) == 4)
check("d_s(4, -2) = 2", ds(4, -2) == 2)
out.append(f"ALL {'PASS' if ok else 'FAIL'}")
text = "\n".join(out) + "\n"
path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "NUMERIC_GS.txt")
with open(path, "w", encoding="utf-8") as fh:
fh.write(text)
print(text, end="")
return 0 if ok else 1
if __name__ == "__main__":
raise SystemExit(main())
NUMERIC_GS.txt
1. Meissner: 1 = Σ_{k≥1} 2·exp(-π γ √(k(k+2)))
γ = 0.2375329579663 (bracket width 9.00e-13)
residual Σ - 1 = -2.913e-12
[PASS] bracket width ≤ 1e-12
[PASS] |Σ(γ) - 1| < 1e-11
2. θ = arccos(1/4)
θ = 1.318116071652818 rad = 75.522487814070°
2π/θ = 4.766792122716
4θ = 5.272464286611, 2π = 6.283185307180, 5θ = 6.590580358264
[PASS] 4θ < 2π < 5θ
3. a²/ℓ_P² = 16πγ
a²/ℓ_P² = 11.939708731717
a/ℓ_P = 3.455388361924
4. ∫_{-π/2}^{π/2} cos³ x dx (Simpson, n = 2000)
integral = 1.333333333332926, 4/3 = 1.333333333333333, error = -4.07e-13
2π²·I = 26.318945069564, 8π²/3 = 26.318945069572
[PASS] |I - 4/3| < 1e-12
[PASS] |2π²·I - 8π²/3| < 1e-10
5. d_s = 2d/(2-η)
d=4, η=0 → 4.0
d=4, η=-2 → 2.0
[PASS] d_s(4, 0) = 4
[PASS] d_s(4, -2) = 2
ALL PASS