Lovász's theorem
Lax871432.LovaszTheorem · concepts/Lax871432/LovaszTheorem.lean · lax-871432
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
Lovász (1967): two finite graphs are isomorphic if and only if they are homomorphism indistinguishable over all graphs, i.e. if and only if for every graph .
It suffices to test the graphs on vertex set , since every finite graph is isomorphic to one of these and is an isomorphism invariant.
The theorem is deduced from the invertibility of the homomorphism matrix of a family of graphs. Let be pairwise non-isomorphic graphs on at most vertices which represent every isomorphism class of graphs on at most vertices. Then the matrix is invertible over .
Concept map
Evidence
Lean source view on GitHub
| 1 | import Mathlib.LinearAlgebra.Matrix.NonsingularInverse |
| 2 | import Lax871432.GraphFamilies |
| 3 | import Lax871432.HomomorphismCounts |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Lovász's theorem |
| 8 | type: theorem |
| 9 | --- |
| 10 | Lovász (1967): two finite graphs are isomorphic if and only if they are homomorphism |
| 11 | indistinguishable over all graphs, i.e. if and only if for every |
| 12 | graph . |
| 13 | |
| 14 | It suffices to test the graphs on vertex set , since every finite |
| 15 | graph is isomorphic to one of these and is an isomorphism invariant. |
| 16 | |
| 17 | The theorem is deduced from the invertibility of the *homomorphism matrix* of a family of |
| 18 | graphs. Let be pairwise non-isomorphic graphs on at most vertices which |
| 19 | represent every isomorphism class of graphs on at most vertices. Then the matrix |
| 20 | is invertible over . |
| 21 | |
| 22 | # Implementation notes |
| 23 | |
| 24 | The family is a `GraphFamily`, indexed by a type `ι` that then also indexes |
| 25 | the rows and columns of the matrix. |
| 26 | -/ |
| 27 | |
| 28 | open Lax871432.GraphFamilies Lax871432.HomomorphismCounts |
| 29 | |
| 30 | namespace Lax871432.LovaszTheorem |
| 31 | |
| 32 | variable {n : ℕ} {ι : Type*} |
| 33 | |
| 34 | /-- The *homomorphism matrix* of a graph family, `M i j = hom(F i, F j)`. -/ |
| 35 | noncomputable def homMatrix (F : GraphFamily n ι) : Matrix ι ι ℚ := |
| 36 | Matrix.of fun i j => (homCount (F.graph i) (F.graph j) : ℚ) |
| 37 | |
| 38 | /-- **Lovász's homomorphism matrix lemma.** For a finite family of pairwise non-isomorphic |
| 39 | graphs on at most `n` vertices which represents every isomorphism class of graphs on at most |
| 40 | `n` vertices, the matrix of homomorphism counts between its members is invertible. -/ |
| 41 | axiom homMatrix_isUnit [Fintype ι] [DecidableEq ι] (F : GraphFamily n ι) |
| 42 | (hni : F.PairwiseNonIso) (hF : F.IsExhaustive) : IsUnit (homMatrix F) |
| 43 | |
| 44 | /-- **Lovász's theorem.** Finite graphs with equal homomorphism counts from every graph are |
| 45 | isomorphic, and conversely. -/ |
| 46 | axiom nonempty_iso_iff_forall_homCount_eq {V W : Type} [Finite V] [Finite W] |
| 47 | (G : SimpleGraph V) (H : SimpleGraph W) : |
| 48 | (∀ (m : ℕ) (K : SimpleGraph (Fin m)), homCount K G = homCount K H) ↔ Nonempty (G ≃g H) |
| 49 | |
| 50 | end Lax871432.LovaszTheorem |
| 51 |
Implementation notes
The family is a , indexed by a type that then also indexes the rows and columns of the matrix.
Used by
none
From Mathlib
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments