@@ -165,20 +165,20 @@ def spectral_dimension(eigvals: np.ndarray) -> float:
165165 return - 2.0 * float (np .median (slope [k // 4 :k - k // 4 ]))
166166
167167
168- def _canonical_anchor_ok (G ) -> bool :
169- """Anchor: hand-built L_sym spectrum == canonical engine spectrum."""
168+ def _canonical_anchor_ok (G ) -> bool | None :
169+ """Anchor: hand-built spectrum equals the canonical engine spectrum."""
170170 try :
171171 from tnfr .physics .structural_diffusion import structural_eigenmodes
172172 except Exception :
173- return True # engine spectrum unavailable; L_sym stands alone
173+ return None
174174 try :
175175 out = structural_eigenmodes (G )
176176 ev = np .asarray (out [0 ] if isinstance (out , tuple ) else out , float )
177177 mine = np .sort (l_sym_eigvals (G ))
178178 ev = np .sort (ev [: len (mine )])
179179 return bool (np .allclose (ev , mine , atol = 1e-8 ))
180180 except Exception :
181- return True
181+ return None
182182
183183
184184def main () -> None :
@@ -197,7 +197,8 @@ def main() -> None:
197197 G3 , _ = sierpinski_simplex (3 , 3 )
198198 anchor = _canonical_anchor_ok (G3 )
199199 print (f" node-count recurrence N(m,k)=m*N(m,k-1)-C(m,2): { m1_ok } " )
200- print (f" L_sym spectrum == canonical structural_eigenmodes: { anchor } " )
200+ anchor_label = "UNAVAILABLE" if anchor is None else str (anchor )
201+ print (f" L_sym spectrum == canonical structural_eigenmodes: { anchor_label } " )
201202 assert m1_ok , "self-similar construction node counts are wrong"
202203
203204 # M2 -- DEFINITE similarity dimension, SET BY THE LOCAL GRADE.
0 commit comments