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 #
SimpleGraph.card_hom_lebounds homomorphisms by all vertex maps.SimpleGraph.card_injective_hom_lebounds injective homomorphisms by vertex embeddings.SimpleGraph.card_injective_hom_eq_sum_map_lecounts injective homomorphisms by the vertex embeddings whose mapped graph lies below the target.SimpleGraph.card_hom_eq_card_adjPreservingMapscounts homomorphisms by the adjacency-preserving vertex maps.SimpleGraph.card_injective_hom_eq_labelledCopyCountidentifies the number of injective homomorphisms with Mathlib'sSimpleGraph.labelledCopyCount, so injective homomorphism counts and labelled copy counts are one counting convention, not two.
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.
Injective graph homomorphisms are counted by the vertex embeddings whose mapped graph lies below the host graph.