Ramsey numbers #
Define edge labellings, monochromatic subsets and ramsey numbers, and prove basic properties of these.
An edge labelling of a simple graph G with labels in type K. Sometimes this is called an
edge-colouring, but we reserve that terminology for labellings where incident edges cannot share a
label.
Equations
- G.EdgeLabelling K = (↑G.edgeSet → K)
Instances For
Equations
- SimpleGraph.EdgeLabelling.uniqueOfSubsingleton = Pi.uniqueOfIsEmpty fun (a : ↑G.edgeSet) => K
An edge labelling of the complete graph on V with labels in type K. Sometimes this is called an
edge-colouring, but we reserve that terminology for labellings where incident edges cannot share a
label.
Equations
Instances For
Convenience function to get the colour of the edge x ~ y in the colouring of the complete graph
on V.
Instances For
Compose an edge-labelling with a function on the colour set.
Instances For
Compose an edge-labelling with a graph embedding.
Equations
- C.pullback f = C ∘ ⇑f.mapEdgeSet
Instances For
Construct an edge labelling from a symmetric function taking values everywhere except the diagonal.
Equations
- SimpleGraph.EdgeLabelling.mk f f_symm ⟨e, he⟩ = Quotient.hrecOn (motive := fun (x : Sym2 V) => x ∈ G.edgeSet → K) e (fun (xy : V × V) => f xy.1 xy.2) ⋯ he
Instances For
χ.MonochromaticOf m c says that every edge in m is assigned the colour c by m.
Equations
Instances For
Given an edge labelling and a choice of label k, construct the graph corresponding to the edges
labelled k.
Equations
Instances For
Equations
- SimpleGraph.EdgeLabelling.instDecidableRelAdjLabelGraphOfDecidableEq k x✝¹ x✝ = decidable_of_iff' (∃ (H : G.Adj x✝¹ x✝), C ⟨s(x✝¹, x✝), H⟩ = k) ⋯
Compose an edge-labelling, by an injection into the vertex type. This must be an injection, else
we don't know how to colour x ~ y in the case f x = f y.
Equations
- C.pullback f = SimpleGraph.EdgeLabelling.pullback C { toEmbedding := f, map_rel_iff' := ⋯ }
Instances For
From a simple graph on V, construct the edge labelling on the complete graph of V given where
edges are labelled 1 and non-edges are labelled 0.
Equations
- G.toTopEdgeLabelling = SimpleGraph.EdgeLabelling.mk (fun (x y : V) (x_1 : ⊤.Adj x y) => if G.Adj x y then 1 else 0) ⋯
Instances For
Equations
- SimpleGraph.instDecidableMonochromaticOfToSetOfDecidableEqOfDecidableRelAdj C m c = decidable_of_iff' ((↑m).Pairwise fun (x y : V) => ∀ (h : G.Adj x y), C.get x y h = c) ⋯
The predicate χ.MonochromaticBetween X Y k says every edge between X and Y is labelled
k by the labelling χ.
Equations
Instances For
The predicate is_ramsey_valid V n says that the type V is large enough to guarantee a
clique of size n k for some colour k : K.
Equations
- SimpleGraph.IsRamseyValid V n = ∀ (C : SimpleGraph.TopEdgeLabelling V K), ∃ (m : Finset V) (c : K), SimpleGraph.EdgeLabelling.MonochromaticOf C (↑m) c ∧ n c ≤ m.card
Instances For
Given a tuple n : K → ℕ of naturals indexed by K, define the ramsey number as the smallest
N such that any labelling of the complete graph on N vertices with K labels contains a
subset of size n k in which every edge is labelled k.
While this definition is computable, it is not at all efficient to compute.
Equations
Instances For
The diagonal ramsey number, defined by R(k, k).
Equations
Instances For
A good bound when i is small and j is large. For i = 1, 2 this is equality (as long as
j ≠ 0), and for i = 3 and i = 4 it is the best possible polynomial upper bound, although
lower order improvements are available.
A simplification of ramsey_number_le_right_pow_left which is more convenient for asymptotic
reasoning. A good bound when i is small and j is very large.