Ziqing Xiang formalizes Haemers' conjecture for the generalized spectrum in Lean
The Mathlib-based formalization contains the accompanying paper's whole proof that the proportion of n-vertex graphs determined by their generalized spectrum (the spectra of the adjacency matrices of a graph and its complement) tends to 1 as n grows. It also proves the results the paper quotes from the literature, including Kneser's addition theorem.
Checked against: palomar-registry.orgziqingxiang/dgs














