Documentation

TauCeti.Combinatorics.SimpleGraph.Counting

Counting graph homomorphisms #

Cardinality bounds for homomorphisms and injective homomorphisms between finite simple graphs. These compare graph homomorphism counts with all vertex maps and embeddings, enabling the normalization and estimates used for finite homomorphism densities.

Main results #

theorem SimpleGraph.card_hom_eq_card_adjPreservingMaps {V : Type u_1} {W : Type u_2} (F : SimpleGraph V) (G : SimpleGraph W) :
Nat.card (F →g G) = Nat.card { ψ : V → W // ∀ (a b : V), F.Adj a b → G.Adj (ψ a) (ψ b) }

Homomorphisms and adjacency-preserving vertex maps are counted alike.

theorem SimpleGraph.card_hom_le {V : Type u_1} {W : Type u_2} [Fintype V] [Fintype W] (F : SimpleGraph V) (G : SimpleGraph W) :

The number of homomorphisms from F to G is bounded by the number of vertex maps.

The number of injective homomorphisms from F to G is bounded by the number of embeddings of the vertex types.

The number of injective homomorphisms from F to G is Mathlib's labelled copy count.

SimpleGraph.Copy F G is definitionally an injective homomorphism, so this is an equivalence of subtypes. Mathlib takes the host graph first: G.labelledCopyCount F counts copies of F inside G.

Deliberately not @[simp]: the left-hand side is not in simp normal form, since Nat.card of a Fintype rewrites to Fintype.card.

theorem SimpleGraph.card_injective_hom_eq_sum_map_le {V : Type u_1} {W : Type u_2} [Fintype V] [Fintype W] (F : SimpleGraph V) (G : SimpleGraph W) :
Nat.card { φ : F →g G // Function.Injective ⇑φ } = ∑ f : V ↪ W, if SimpleGraph.map (⇑f) F ≤ G then 1 else 0

Injective graph homomorphisms are counted by the vertex embeddings whose mapped graph lies below the host graph.