The entropy counts the defect, and the defect fixes the curvature

Boltzmann and Planck: the entropy is the logarithm of the number of configurations. On a cut with M crossing links, k quanta give S = k log M. The 2g links of a surface of genus g all cross the cut after site 0, so the surface is one of those configurations, and Gauss–Bonnet turns its defect into curvature:

S(Σ_g) = (log M / 2π) · (4π − ∫K dA)

Σ_g on the cut after site 0

Entropy against curvature

M = crossing links at the cut after 0
0
S = log M^(2g)
0
∫K dA = 2π(2 − 2g)
0
(log M / 2π)(4π − ∫K dA)
0

The entropy of a cut counts its quanta

crossing links M (21 sites)
0
defect Ω = k·δ∞
0
S = k·log M = (log M/δ∞)·Ω
0
log #graphs = log C(M, k)
0

Top: handleLinks_mem (the 2g links of Σ_g are a configuration of 2g quanta on the cut at 0), entropy_eq_curvature and entropy_handle_step (one handle: +2 log M of entropy, −4π of curvature). δ∞ cancels in the ratio and stays positive in each link: the defect is not swept away. Bottom: k quanta on the M crossing links of a cut of a path with 21 sites have entropy k log M, proportional to the defect (entropy_counts_defect); k distinct links are the C(M, k) graphs with k new cycles, never above M log 2. A far site cannot tell them apart while the cone has not reached the cut (horizon_hides_entropy). Gauss–Bonnet is the declared hypothesis HGaussBonnet; the Bekenstein–Hawking factor 1/4 is a declared bridge, not derived. Values are computed in your browser. source.