Documentation

Complexity.Computability.Circuit.Clique

The clique function #

A Boolean function of the possible edges of a graph on n vertices, the unordered pairs of distinct vertices (Cslib.Circuits.Clique.Edge), reads its input as a graph (Cslib.Circuits.Clique.graph). The k-clique function Cslib.Circuits.clique n k says whether that graph has a clique of k vertices.

Two families of inputs are used to prove lower bounds for it: the complete graph on a set of k vertices (Cslib.Circuits.Clique.ofFinset), which has a k-clique, and the complete multipartite graph of a colouring with fewer than k colours (Cslib.Circuits.Clique.ofColoring), which has none.

Main definitions #

Main results #

@[reducible, inline]

The possible edges of a graph on n vertices: unordered pairs of distinct vertices.

Instances For
    @[reducible, inline]

    The number of possible edges of a graph on n vertices.

    Instances For
      noncomputable def Cslib.Circuits.Clique.edgeEquiv (n : ℕ) :

      A numbering of the possible edges by the inputs of a circuit.

      Instances For

        The graph of an input: its edges are the possible edges set to true.

        Instances For
          def Cslib.Circuits.Clique.Contains {n : ℕ} (x : Fin (edgeCount n) → Bool) (s : Finset (Fin n)) :

          The input x contains all edges between the vertices of s.

          Instances For
            @[instance_reducible]
            noncomputable instance Cslib.Circuits.Clique.instDecidableContains {n : ℕ} (x : Fin (edgeCount n) → Bool) (s : Finset (Fin n)) :
            def Cslib.Circuits.Clique.edge {n : ℕ} {u v : Fin n} (h : u ≠ v) :

            The edge between two distinct vertices.

            Instances For
              @[simp]
              theorem Cslib.Circuits.Clique.toFinset_edge {n : ℕ} {u v : Fin n} (h : u ≠ v) :
              (↑(edge h)).toFinset = {u, v}
              theorem Cslib.Circuits.Clique.Contains.mono {n : ℕ} {x : Fin (edgeCount n) → Bool} {s t : Finset (Fin n)} (hst : s ⊆ t) (h : Contains x t) :

              Containing all edges inside s is being a clique of the graph.

              noncomputable def Cslib.Circuits.Clique.ofFinset {n : ℕ} (s : Finset (Fin n)) :

              The complete graph on s, as an input.

              Instances For
                @[simp]
                theorem Cslib.Circuits.Clique.ofFinset_edgeEquiv {n : ℕ} (s : Finset (Fin n)) (e : Edge n) :
                ofFinset s ((edgeEquiv n) e) = decide ((↑e).toFinset ⊆ s)
                theorem Cslib.Circuits.Clique.subset_of_contains_ofFinset {n : ℕ} {s t : Finset (Fin n)} (ht : 2 ≤ t.card) (h : Contains (ofFinset s) t) :
                t ⊆ s

                In the complete graph on s, the sets of at least two vertices with all edges inside are the subsets of s.

                noncomputable def Cslib.Circuits.Clique.ofColoring {n r : ℕ} (c : Fin n → Fin r) :

                The complete multipartite graph of a colouring, as an input: two vertices are adjacent when they have different colours.

                Instances For
                  theorem Cslib.Circuits.Clique.contains_ofColoring_iff {n r : ℕ} {c : Fin n → Fin r} {s : Finset (Fin n)} :

                  In the graph of a colouring, the sets with all edges inside are those coloured injectively.

                  theorem Cslib.Circuits.Clique.card_le_of_contains_ofColoring {n r : ℕ} {c : Fin n → Fin r} {s : Finset (Fin n)} (h : Contains (ofColoring c) s) :
                  s.card ≤ r

                  A set with all edges inside in the graph of a colouring with r colours has at most r vertices.

                  @[reducible, inline]

                  The sets of k vertices.

                  Instances For
                    @[reducible, inline]

                    The colourings of n vertices with r colours.

                    Instances For

                      The k-clique function on graphs with n vertices: whether the graph of the input has a clique of k vertices.

                      Instances For
                        theorem Cslib.Circuits.clique_ofFinset {n k : ℕ} {s : Finset (Fin n)} (hs : s.card = k) :

                        The complete graph on k vertices has a k-clique.

                        theorem Cslib.Circuits.clique_ofColoring {n k r : ℕ} (hr : r < k) (c : Fin n → Fin r) :

                        The complete multipartite graph of a colouring with fewer than k colours has no k-clique.

                        theorem Cslib.Circuits.clique_le_clique {n k : ℕ} {x y : Fin (Clique.edgeCount n) → Bool} (h : ∀ (i : Fin (Clique.edgeCount n)), x i ≤ y i) :
                        clique n k x ≤ clique n k y

                        The clique function is monotone.