Documentation

MerLeanBpqc.Definitions.Def_8_CycleGraph

Definition 8: Cycle Graph #

The cycle graph C_ℓ (for ℓ ≥ 3) is a cell complex (Def_7) with 1-cells (edges) σ_1, ..., σ_ℓ and 0-cells (vertices) τ_1, ..., τ_ℓ such that ∂σ_i = {τ_i, τ_{i+1}} where indices are taken modulo .

Its chain complex is C_1 →[∂_1] C_0 where C_1 ≅ 𝔽₂^ℓ and C_0 ≅ 𝔽₂^ℓ, and ∂_1 is the ℓ × ℓ circulant matrix with two 1-entries per column.

The kernel ker(∂_1) is the repetition code span{(1,...,1)} of dimension 1. The homology satisfies dim H_1(C_ℓ) = 1 and dim H_0(C_ℓ) = 1.

Main Definitions #

The cycle graph differential as a linear map on Fin ℓ → 𝔽₂ #

noncomputable def CycleGraph.differential ( : ) [NeZero ] :

The differential ∂_1 : 𝔽₂^ℓ → 𝔽₂^ℓ of the cycle graph, defined by (∂_1 f)(i) = f(i) + f((i + ℓ - 1) % ℓ). On basis vectors e_j, ∂_1(e_j) = e_j + e_{(j+1) % ℓ}, so column j of the matrix has 1-entries in rows j and (j+1) % ℓ (the boundary relation ∂σ_j = {τ_j, τ_{j+1}}). The i-th entry of ∂_1(f) counts how many edges incident to vertex i have nonzero coefficient in f, modulo 2.

Equations
Instances For
    def CycleGraph.onesVec ( : ) :
    Fin 𝔽₂

    The all-ones vector (1, 1, ..., 1) ∈ 𝔽₂^ℓ.

    Equations
    Instances For
      theorem CycleGraph.differential_onesVec ( : ) [NeZero ] :
      (differential ) (onesVec ) = 0

      The differential maps the all-ones vector to zero.

      @[simp]
      theorem CycleGraph.differential_apply ( : ) [NeZero ] (f : Fin 𝔽₂) (i : Fin ) :
      (differential ) f i = f i + f (i + - 1) % ,

      Apply formula for the differential.

      Kernel of the differential equals span of the all-ones vector #

      theorem CycleGraph.ker_differential_succ ( : ) [NeZero ] (f : Fin 𝔽₂) (hf : (differential ) f = 0) (i : ) (hi : i + 1 < ) :
      f i + 1, hi = f i,

      Helper: from the kernel condition, f(i+1) = f(i) for i+1 < ℓ.

      theorem CycleGraph.ker_differential_const ( : ) [NeZero ] (f : Fin 𝔽₂) (hf : (differential ) f = 0) (i : Fin ) :
      f i = f 0,

      If f is in the kernel of the differential, then f i = f 0 for all i.

      The kernel of the differential is exactly span{onesVec}.

      theorem CycleGraph.onesVec_ne_zero ( : ) (hℓ1 : 1) :
      onesVec 0

      The all-ones vector is nonzero when ℓ ≥ 1.

      theorem CycleGraph.finrank_ker_differential ( : ) [NeZero ] (hℓ1 : 1) :

      The kernel of the differential has dimension 1 (assuming ℓ ≥ 1).

      The cycle graph as a cell complex (Def_7) #

      def CycleGraph.cellType ( : ) :
      Type

      The type of n-cells for the cycle graph: Fin in dimensions 0 and 1, PEmpty elsewhere. Uses match on the integer dimension.

      Equations
      Instances For
        def CycleGraph.cellBdry ( : ) [NeZero ] {n : } :
        cellType nFinset (cellType (n - 1))

        The boundary map for the cycle graph. For a 1-cell σ_i, ∂σ_i = {τ_i, τ_{(i+1) % ℓ}}. For all other cells, the boundary is empty.

        Equations
        Instances For
          theorem CycleGraph.cellBdry_bdry ( : ) [NeZero ] (n : ) (σ : cellType n) (ρ : cellType (n - 1 - 1)) :
          Even {τcellBdry σ | ρ cellBdry τ}.card

          The chain complex condition for the cycle graph is vacuously true since for the only nontrivial boundary (n=1), the target cells(n-1-1) = cells(-1) = PEmpty makes the condition vacuous.

          noncomputable def CycleGraph.cycleGraph ( : ) [NeZero ] :

          The cycle graph C_ℓ as a cell complex (Def_7). The 1-cells and 0-cells are both indexed by Fin, with boundary ∂σ_i = {τ_i, τ_{(i+1) % ℓ}}. All other cell sets are empty. The chain complex condition is vacuously true.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Cells of the cycle graph are Fin #

            theorem CycleGraph.cycleGraph_cells_one ( : ) [NeZero ] :
            (cycleGraph ).cells 1 = Fin

            The 1-cells of the cycle graph are Fin (definitionally).

            theorem CycleGraph.cycleGraph_cells_zero ( : ) [NeZero ] :
            (cycleGraph ).cells 0 = Fin

            The 0-cells of the cycle graph are Fin (definitionally).

            theorem CycleGraph.pred_mod_succ ( : ) (hℓ : 1) (i : Fin ) :
            ((i + - 1) % + 1) % = i

            Helper: ((i+ℓ-1)%ℓ + 1)%ℓ = i for i : Fin.

            theorem CycleGraph.fin_ne_succ_mod ( : ) (hℓ : 2) (x : Fin ) :
            x (x + 1) % ,

            For ℓ ≥ 2, an element x : Fin is never equal to (x+1) % ℓ.

            theorem CycleGraph.fin_ne_pred_mod ( : ) (hℓ : 2) (i : Fin ) :
            i (i + - 1) % ,

            For ℓ ≥ 2, i ≠ pred(i) mod ℓ.

            theorem CycleGraph.differentialMap_filter_eq ( : ) [NeZero ] (hℓ : 2) (i : Fin ) :
            have j := (i + - 1) % , ; {σ : (cycleGraph ).cells 1 | i (cycleGraph ).bdry σ} = {i, j}

            Helper: the filter set {σ | i ∈ bdry σ} for the cycle graph equals {i, pred(i)}.

            The cell complex differential ∂_1 from degree 1 to degree 0 agrees with CycleGraph.differential: both map f ↦ (i ↦ f(i) + f((i + ℓ - 1) % ℓ)). Requires ℓ ≥ 2 so that each edge has two distinct boundary vertices.

            Rank of the image and homology dimensions #

            The dimension of 𝔽₂^ℓ is .

            theorem CycleGraph.finrank_range_differential ( : ) [NeZero ] (hℓ1 : 1) :

            The rank of the image of ∂_1 is ℓ - 1, by rank-nullity.

            Homology dimensions #

            theorem CycleGraph.dim_H1_cycleGraph ( : ) [NeZero ] (hℓ1 : 1) :

            dim H_1(C_ℓ) = 1: Since there are no 2-cells, im(∂_2) = 0 and H_1 = ker(∂_1) / 0 ≅ ker(∂_1), which has dimension 1. Here we express this purely in terms of the differential, since the cycle graph has only degrees 0 and 1.

            theorem CycleGraph.dim_H0_cycleGraph ( : ) [NeZero ] (hℓ1 : 1) :

            dim H_0(C_ℓ) = 1: We have ker(∂_0) = C_0 = 𝔽₂^ℓ (since ∂_0 = 0) and im(∂_1) has dimension ℓ - 1, so H_0 = C_0 / im(∂_1) has dimension ℓ - (ℓ - 1) = 1. We express H_0 as the quotient (Fin ℓ → 𝔽₂) ⧸ im(∂_1).

            Classical code interpretation #

            noncomputable def CycleGraph.repetitionCode ( : ) [NeZero ] :

            The repetition code of length : the classical code with codeword space ker(∂_1) = span{(1,...,1)} ⊆ 𝔽₂^ℓ.

            Equations
            Instances For

              The repetition code equals ker(∂_1).

              theorem CycleGraph.repetitionCode_dimension ( : ) [NeZero ] (hℓ1 : 1) :

              The repetition code has dimension 1.