Documentation

Atlas.ProbabilisticMethodsInCombinatorics.code.Chapter6.DirectedCycles

inductive DirectedCycles.DirectedWalk {V : Type u_1} (G : Digraph V) :
VVType u_1

A directed walk in a digraph $G$ from vertex $u$ to vertex $v$: either the empty walk at $u$, or a step along a directed edge followed by another walk.

Instances For
    def DirectedCycles.DirectedWalk.length {V : Type u_1} {G : Digraph V} {u v : V} :
    DirectedWalk G u v

    The length (number of edges) of a directed walk.

    Instances For
      def DirectedCycles.DirectedWalk.support {V : Type u_1} {G : Digraph V} {u v : V} :
      DirectedWalk G u vList V

      The list of vertices visited by a directed walk, in order.

      Instances For
        def DirectedCycles.DirectedWalk.append {V : Type u_1} {G : Digraph V} {u v w : V} :
        DirectedWalk G u vDirectedWalk G v wDirectedWalk G u w

        Concatenation of two directed walks meeting at a common vertex.

        Instances For
          def DirectedCycles.DirectedWalk.cast {V : Type u_1} {G : Digraph V} {u v u' v' : V} (hu : u = u') (hv : v = v') :
          DirectedWalk G u vDirectedWalk G u' v'

          Recast a directed walk along propositional equalities of its endpoints.

          Instances For
            theorem DirectedCycles.DirectedWalk.length_cast {V : Type u_1} {G : Digraph V} {u v u' v' : V} (hu : u = u') (hv : v = v') (p : DirectedWalk G u v) :
            (cast hu hv p).length = p.length

            Casting along endpoint equalities preserves the length of a directed walk.

            structure DirectedCycles.DirectedWalk.IsCycle {V : Type u_1} {G : Digraph V} {u : V} (p : DirectedWalk G u u) :

            A directed walk from a vertex to itself is a cycle if it has positive length and visits each vertex at most once (no repeated vertices apart from the start/end).

            Instances For

              The digraph $G$ contains a directed cycle whose length is divisible by $k$.

              Instances For
                def DirectedCycles.outDegree {V : Type u_1} (G : Digraph V) [Fintype V] [DecidableRel G.Adj] (v : V) :

                Out-degree of a vertex $v$ in a digraph: the number of vertices $w$ with $v \to w$.

                Instances For
                  def DirectedCycles.inDegree {V : Type u_1} (G : Digraph V) [Fintype V] [DecidableRel G.Adj] (v : V) :

                  In-degree of a vertex $v$ in a digraph: the number of vertices $w$ with $w \to v$.

                  Instances For
                    def DirectedCycles.IsRegular {V : Type u_1} (G : Digraph V) [Fintype V] [DecidableRel G.Adj] (d : ) :

                    A digraph is $d$-regular if every vertex has in-degree and out-degree both equal to $d$.

                    Instances For
                      def DirectedCycles.IsSuccessorLabeling {V : Type u_1} (G : Digraph V) (k : ) [NeZero k] (f : VZMod k) :

                      A successor labeling $f : V \to \mathbb{Z}/k\mathbb{Z}$ assigns each vertex $v$ an out-neighbor $w$ whose label is $f(v) + 1$; following such successors produces a cycle of length divisible by $k$.

                      Instances For
                        noncomputable def DirectedCycles.consWalk {V : Type u_1} (G : Digraph V) (seq : V) (hadj : ∀ (n : ), G.Adj (seq n) (seq (n + 1))) (m : ) :
                        DirectedWalk G (seq 0) (seq m)

                        Build the directed walk along the first $m$ steps of a vertex sequence whose consecutive elements are adjacent.

                        Instances For
                          theorem DirectedCycles.consWalk_length {V : Type u_1} (G : Digraph V) (seq : V) (hadj : ∀ (n : ), G.Adj (seq n) (seq (n + 1))) (m : ) :
                          (consWalk G seq hadj m).length = m

                          The walk consWalk G seq hadj m has length $m$.

                          theorem DirectedCycles.mem_consWalk_support {V : Type u_1} (G : Digraph V) (seq : V) (hadj : ∀ (n : ), G.Adj (seq n) (seq (n + 1))) (m : ) (v : V) :
                          v (consWalk G seq hadj m).support im, v = seq i

                          Membership characterization: $v$ is in the support of consWalk G seq hadj m iff $v = $ seq i for some $i \le m$.

                          theorem DirectedCycles.consWalk_support_nodup {V : Type u_1} (G : Digraph V) (seq : V) (hadj : ∀ (n : ), G.Adj (seq n) (seq (n + 1))) (m : ) (hinj : ∀ (i j : ), i mj mseq i = seq ji = j) :
                          (consWalk G seq hadj m).support.Nodup

                          If seq is injective on indices $\le m$, then the support of consWalk G seq hadj m has no duplicate vertices.

                          theorem DirectedCycles.consWalk_tail_nodup {V : Type u_1} (G : Digraph V) (seq : V) (hadj : ∀ (n : ), G.Adj (seq n) (seq (n + 1))) (m : ) (hm : 0 < m) (hinj : ∀ (i j : ), 1 ii m1 jj mseq i = seq ji = j) :
                          (consWalk G seq hadj m).support.tail.Nodup

                          Tail-version of consWalk_support_nodup: if seq is injective on indices $1 \le i \le m$, then the tail of the walk's support has no duplicates (used for proving the cycle property).

                          theorem DirectedCycles.DirectedWalk.support_cast {V : Type u_1} {u v u' v' : V} {G : Digraph V} (hu : u = u') (hv : v = v') (p : DirectedWalk G u v) :
                          (cast hu hv p).support = p.support

                          Casting along endpoint equalities preserves the support of a directed walk.

                          A successor labeling $f : V \to \mathbb{Z}/k\mathbb{Z}$ yields a directed cycle in $G$ whose length is divisible by $k$, obtained by following successors from any starting vertex.

                          theorem DirectedCycles.successor_labeling_exists {V : Type u_2} (G : Digraph V) [Fintype V] [DecidableRel G.Adj] [DecidableEq V] [Nonempty V] (k δ Δ : ) [NeZero k] ( : ∀ (v : V), δ outDegree G v) ( : ∀ (v : V), inDegree G v Δ) (hbound : k δ / (1 + Real.log (1 + δ * Δ))) :
                          ∃ (f : VZMod k), IsSuccessorLabeling G k f

                          LLL-based existence of a successor labeling: if minimum out-degree $\delta$ and maximum in-degree $\Delta$ satisfy $k \le \delta / (1 + \log(1 + \delta\Delta))$, then a random labeling yields a successor labeling with positive probability (Theorem 6.4.3, Alon-Linial).

                          theorem DirectedCycles.hasDirectedCycleDivisibleBy_of_degree_bound {V : Type u_1} (G : Digraph V) [Fintype V] [DecidableRel G.Adj] [DecidableEq V] [Nonempty V] (k δ Δ : ) (hk : k 1) ( : ∀ (v : V), δ outDegree G v) ( : ∀ (v : V), inDegree G v Δ) (hbound : k δ / (1 + Real.log (1 + δ * Δ))) :

                          Combining successor_labeling_exists and cycle_of_successor_labeling: any digraph with minimum out-degree $\delta$ and maximum in-degree $\Delta$ satisfying the LLL bound has a directed cycle of length divisible by $k$.

                          theorem DirectedCycles.exists_nat_le_div_one_add_log (k : ) (hk : k 1) :
                          d1, k d / (1 + Real.log (1 + d * d))

                          Existence of a degree $d \ge 1$ (here taken to be $25k^2$) satisfying the LLL bound $k \le d / (1 + \log(1 + d^2))$, used to convert the bound into a concrete regularity hypothesis.

                          theorem DirectedCycles.exists_regular_degree_hasDirectedCycleDivisibleBy (k : ) (hk : k 1) :
                          ∃ (d : ), ∀ (V : Type) (G : Digraph V) [inst : Fintype V] [inst_1 : DecidableRel G.Adj] [DecidableEq V] [Nonempty V], IsRegular G dHasDirectedCycleDivisibleBy G k

                          Theorem 6.4.1 (Alon-Linial 1989): for every $k \ge 1$ there exists $d$ such that every $d$-regular digraph contains a directed cycle of length divisible by $k$.

                          A simple graph $G$ contains a cycle whose length is divisible by $k$.

                          Instances For

                            Bridge from the directed to the undirected setting: any $2d$-regular simple graph admits an Eulerian orientation that is $d$-regular as a digraph, so existence of a directed cycle of length divisible by $k$ in the orientation yields an undirected cycle of the same length.

                            theorem DirectedCycles.exists_even_regular_hasCycleDivisibleBy (k : ) (hk : k 1) :
                            ∃ (d : ), ∀ (V : Type) (G : SimpleGraph V) [inst : Fintype V] [DecidableEq V] [Nonempty V] [inst_3 : DecidableRel G.Adj], G.IsRegularOfDegree (2 * d)HasCycleDivisibleBy G k

                            Corollary 6.4.2 (undirected version of Alon-Linial): for every $k \ge 1$ there exists $d$ such that every $2d$-regular simple graph contains a cycle of length divisible by $k$.