AFTD Auto-Formalizing Theoretical Domains

simple_graph_cycle_power_seven_cover_four_tight_alternate

theoremverified

In a tight cover of C_n^7 (n >= 22) by 4 equivalence subgraphs in which every class starting at i (the class of the distance-7 pair (i, i+7)) contains i+1 exactly when it contains i+6, the classes alternate: the class starting at i contains i+1 if and only if the class starting at i+1 does not contain i+2. So classes {i, i+7} and larger classes alternate along the cycle.

Statement

theorem simple_graph_cycle_power_seven_cover_four_tight_alternate (n : ℕ) [NeZero n]
    (hn : 22 ≤ n) (c : Fin 4 → ZMod n → ZMod n)
    (hc : ∀ s u v, u ≠ v → c s u = c s v → (simple_graph_cycle_power n 7).Adj u v)
    (hcov : ∀ u v, (simple_graph_cycle_power n 7).Adj u v → ∃ s, c s u = c s v)
    (h7 : ∀ i, ∃! s, c s i = c s (i + 7)) (h6 : ∀ i, ∃! s, c s i = c s (i + 6))
    (h4 : ∀ i, ∃! s, c s i = c s (i + 4))
    (hspan : ∀ s i, ∃ d : ℕ, d ≤ 7 ∧ c s (i - d) = c s (i - d + 7) ∧ c s (i - d) = c s i)
    (h16 : ∀ s i, c s i = c s (i + 7) → (c s i = c s (i + 1) ↔ c s i = c s (i + 6)))
    (i : ZMod n) :
    (∃ s, c s i = c s (i + 7) ∧ c s i = c s (i + 1)) ↔
      ¬ ∃ s, c s (i + 1) = c s (i + 1 + 7) ∧ c s (i + 1) = c s (i + 1 + 1)
Source
for RT-1 (simple_graph_cycle_power_seven_cover_four_tight_dvd): the alternation rule seen in all 288 rigid windows (exp 1947); h16 holds for the five class types that occur (exp 1554)
Verified
20 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3

The proof, explained

The theorem is proved by first establishing an auxiliary lemma: any color class containing a distance-6 chord from j either extends backward to j - 1 or extends forward to both j + 1 and j + 7, deduced by bounding the span of the class via graph distance constraints. For the forward direction of the alternation theorem, if two consecutive classes both contained their forward neighbor, the unique color covering their shared distance-6 chord would contain both classes, forcing vertices at distance 8 to belong to the same class and thus be adjacent in C_n^7, which contradicts the graph's maximum step size of 7. For the backward direction, applying the auxiliary lemma to the unique color covering (i+1, i+7) shows that if it does not extend forward to i + 2, it must extend backward to i, producing the required class at i.

  1. In a color class s with c(s, j) = c(s, j+6), identify a distance-7 spanning edge containing j+6, and express the offset between j and its far endpoint as 13 - d.

    Using hypothesis hspan at vertex j+6, there exists an offset d ≤ 7 such that color class s contains both (j+6)-d and (j+6)-d+7, and connects (j+6)-d to j+6. Because c(s, j) = c(s, j+6), transitivity gives c(s, j) = c(s, (j+6)-d+7). In ZMod n, the difference between this endpoint and j simplifies algebraically to 13 - d.

    lines 8–11

      obtain ⟨d, hd7, hdA, hdB⟩ := hspan s (j + 6)
      have hchain : c s j = c s ((j + 6) - d + 7) := (hj.trans hdB.symm).trans hdA
      have hsub : (j + 6) - (d : ZMod n) + 7 - j = ((13 - (d : ℤ) : ℤ) : ZMod n) := by
        push_cast; ring
  2. The vertices j and (j+6)-d+7 are distinct.

    If j = (j+6)-d+7, then their difference 13 - d would be zero modulo n. Since 0 ≤ d ≤ 7, the integer absolute value |13 - d| ≤ 13 is strictly less than n (since n ≥ 22). By zmod_intCast_eq_intCast_iff_of_abs_sub_lt, this congruence lifts to an integer equality 13 - d = 0, which forces d = 13, contradicting d ≤ 7.

    lines 12–23

    uses sub_self, Int.cast_zero, abs_le, zmod_intCast_eq_intCast_iff_of_abs_sub_lt

      have hne : j ≠ (j + 6) - d + 7 := by
        intro heq
        have hzero : ((13 - (d : ℤ) : ℤ) : ZMod n) = ((0 : ℤ) : ZMod n) := by
          rw [← hsub, ← heq, sub_self, Int.cast_zero]
        have hlt : |(13 : ℤ) - (d : ℤ) - (0:ℤ)| < (n : ℤ) := by
          have h1 : |(13:ℤ) - (d:ℤ)| ≤ 13 := by
            rw [abs_le]; constructor <;> omega
          calc |(13:ℤ) - (d:ℤ) - 0| = |(13:ℤ) - (d:ℤ)| := by ring_nf
            _ ≤ 13 := h1
            _ < (n:ℤ) := by omega
        have := (zmod_intCast_eq_intCast_iff_of_abs_sub_lt n (13 - (d:ℤ)) 0 hlt).mp hzero
        omega
  3. The vertex (j+6)-d+7 equals j + e for some non-zero integer e with |e| ≤ 7, meaning 13 - d ≡ e (mod n).

    Because j and (j+6)-d+7 share color s and are distinct, hypothesis hc implies they are adjacent in C_n^7. By simple_graph_cycle_power_seven_adj_iff, this means (j+6)-d+7 = j + e for some non-zero integer e with |e| ≤ 7. Subtracting j on both sides shows that 13 - d and e reduce to the same value in ZMod n.

    lines 24–29

    uses simple_graph_cycle_power_seven_adj_iff

      have hadj : (simple_graph_cycle_power n 7).Adj j ((j + 6) - d + 7) := hc s j _ hne hchain
      obtain ⟨e, hene, heabs, hee⟩ :=
        (simple_graph_cycle_power_seven_adj_iff n hn j ((j + 6) - d + 7)).mp hadj
      have hcast : ((13 - (d:ℤ) : ℤ) : ZMod n) = ((e : ℤ) : ZMod n) := by
        have h2 : (j + (e : ZMod n)) - j = ((e : ℤ) : ZMod n) := by push_cast; ring
        exact hsub.symm.trans (by rw [hee]; exact h2)
  4. The equality 13 - d = e holds in ℤ, which forces d = 6 or d = 7.

    Since 0 ≤ d ≤ 7 and |e| ≤ 7, the difference |(13 - d) - e| is bounded by 13 - 0 - (-7) = 20 < 22 ≤ n. By zmod_intCast_eq_intCast_iff_of_abs_sub_lt, 13 - d = e holds in ℤ. Because |e| ≤ 7, we have -7 ≤ 13 - d ≤ 7, which gives 6 ≤ d ≤ 20. Together with d ≤ 7, this restricts d to either 6 or 7.

    lines 30–41

    uses abs_le.mp, abs_le, zmod_intCast_eq_intCast_iff_of_abs_sub_lt

      have hde : (13 : ℤ) - (d : ℤ) = e := by
        have hlt : |(13 : ℤ) - (d : ℤ) - e| < (n : ℤ) := by
          have hb := abs_le.mp heabs
          have hd7' : ((d:ℤ)) ≤ 7 := by omega
          have hd0' : (0:ℤ) ≤ (d:ℤ) := by omega
          have hle : |(13 : ℤ) - (d : ℤ) - e| ≤ 20 := by
            rw [abs_le]; constructor <;> omega
          omega
        exact (zmod_intCast_eq_intCast_iff_of_abs_sub_lt n (13 - (d:ℤ)) e hlt).mp hcast
      have hd67 : d = 6 ∨ d = 7 := by
        have hb := abs_le.mp heabs
        omega
  5. Either c(s, j-1) = c(s, j) or c(s, j) = c(s, j+1) ∧ c(s, j) = c(s, j+7).

    If d = 6, the spanning pair is (j, j+7), so c(s, j) = c(s, j+7). Using hypothesis h16 together with c(s, j) = c(s, j+6), this implies c(s, j) = c(s, j+1), giving the second alternative. If d = 7, the spanning pair starts at j-1, giving c(s, j-1) = c(s, j+6) = c(s, j), establishing the first alternative.

    lines 42–54

      rcases hd67 with hd | hd
      · have hAj : c s j = c s (j + 7) := by
          have hA := hdA
          rw [hd] at hA
          rw [show (j + 6) - (6:ℕ) = j by ring] at hA
          exact hA
        exact Or.inr ⟨(h16 s j hAj).mpr hj, hAj⟩
      · left
        have hA := hdA
        rw [hd] at hA
        rw [show (j + 6) - (7:ℕ) = j - 1 by ring] at hA
        rw [show j - 1 + 7 = j + 6 by ring] at hA
        exact hA.trans hj.symm
  6. In the forward direction, assuming consecutive classes at i and i+1 both contain their forward neighbor, their color indices s and t must be equal.

    Suppose class s contains i, i+1, i+7 and class t contains i+1, i+2, i+8. Hypothesis h16 implies that s also contains i+6, so c(s, i+1) = c(s, i+7). Applying h16 to t gives c(t, i+1) = c(t, i+7). By hypothesis h6, the chord of length 6 between i+1 and i+7 has a unique covering color, so s and t must coincide.

    lines 67–75

      constructor
      · rintro ⟨s, hs7, hs1⟩ ⟨t, ht8, ht2⟩
        have hs6 : c s i = c s (i + 6) := (h16 s i hs7).mp hs1
        have ht6 : c t (i + 1) = c t (i + 1 + 6) := (h16 t (i + 1) ht8).mp ht2
        obtain ⟨s6, -, huniq⟩ := h6 (i + 1)
        have hA : c s (i + 1) = c s (i + 1 + 6) := by
          rw [show (i + 1 + 6 : ZMod n) = i + 7 by ring]
          exact hs1.symm.trans hs7
        have hst : s = t := (huniq s hA).trans (huniq t ht6).symm
  7. The single color class s contains both i and i+8.

    Since s = t, we have c(s, i) = c(s, i+1) and c(s, i+1) = c(t, i+1) = c(t, i+8) = c(s, i+8). By transitivity of equality, c(s, i) = c(s, i+8).

    lines 76–81

        have h8t : c t i = c t (i + 8) := by
          have hs1' : c t i = c t (i + 1) := by rw [← hst]; exact hs1
          have ht8' : c t (i + 1) = c t (i + 8) := by
            rw [show (i + 1 + 7 : ZMod n) = i + 8 by ring] at ht8; exact ht8
          exact hs1'.trans ht8'
        have h8 : c s i = c s (i + 8) := by rw [hst]; exact h8t
  8. The vertices i and i+8 are distinct in ZMod n.

    If i = i+8, their difference 8 would be zero modulo n. Because |8 - 0| = 8 < 22 ≤ n, zmod_intCast_eq_intCast_iff_of_abs_sub_lt lifts this to 8 = 0 in ℤ, an impossibility.

    lines 82–92

    uses sub_self, Int.cast_zero, zmod_intCast_eq_intCast_iff_of_abs_sub_lt

        have hne : i ≠ i + 8 := by
          intro heq
          have hzero : ((8:ℤ) : ZMod n) = ((0:ℤ) : ZMod n) := by
            have h2 : (i + 8 : ZMod n) - i = ((8:ℤ):ZMod n) := by ring
            rw [← h2, ← heq, sub_self, Int.cast_zero]
          have hlt : |(8:ℤ) - (0:ℤ)| < (n:ℤ) := by
            have h3 : (22:ℤ) ≤ (n:ℤ) := by exact_mod_cast hn
            have h4 : |(8:ℤ) - (0:ℤ)| = 8 := by norm_num
            rw [h4]; omega
          have h8e : (8:ℤ) = 0 := (zmod_intCast_eq_intCast_iff_of_abs_sub_lt n 8 0 hlt).mp hzero
          omega
  9. Vertices i and i+8 cannot be adjacent in C_n^7, deriving a contradiction for the forward direction.

    Because i ≠ i+8 and c(s, i) = c(s, i+8), hypothesis hc requires them to be adjacent in C_n^7. By simple_graph_cycle_power_seven_adj_iff, i+8 = i+e for an integer e with |e| ≤ 7. Since |8 - e| ≤ 15 < 22 ≤ n, zmod_intCast_eq_intCast_iff_of_abs_sub_lt gives 8 = e. But |e| ≤ 7 implies 8 ≤ 7, a contradiction.

    lines 93–106

    uses simple_graph_cycle_power_seven_adj_iff, zmod_intCast_eq_intCast_iff_of_abs_sub_lt, abs_le.mp, abs_le

        have hadj : (simple_graph_cycle_power n 7).Adj i (i + 8) := hc s i (i + 8) hne h8
        obtain ⟨e, hene, heabs, hee⟩ := (simple_graph_cycle_power_seven_adj_iff n hn i (i + 8)).mp hadj
        have hcast : ((8:ℤ) : ZMod n) = ((e:ℤ) : ZMod n) := by
          have h1 : (i + 8 : ZMod n) - i = ((8:ℤ):ZMod n) := by ring
          have h2 : (i + (e : ZMod n)) - i = ((e:ℤ):ZMod n) := by ring
          rw [← h1, hee, h2]
        have h8e : (8:ℤ) = e := by
          apply (zmod_intCast_eq_intCast_iff_of_abs_sub_lt n 8 e ?_).mp hcast
          have hb := abs_le.mp heabs
          have hle : |(8:ℤ) - e| ≤ 15 := by rw [abs_le]; constructor <;> omega
          have h3 : (22:ℤ) ≤ (n:ℤ) := by exact_mod_cast hn
          omega
        have hb := abs_le.mp heabs
        omega
  10. For the backward direction, select the unique color s_6 covering the chord (i+1, i+7) and apply the auxiliary lemma.

    Assuming no class at i+1 contains i+2, let s_6 be the unique color covering the distance-6 chord between i+1 and i+7 provided by h6. Applying simple_graph_cycle_power_seven_cover_four_tight_alternate_side to s_6 at j = i+1 establishes that either c(s_6, i) = c(s_6, i+1) or s_6 contains both i+2 and i+8.

    lines 107–111

    uses simple_graph_cycle_power_seven_cover_four_tight_alternate_side

      · intro hnr
        obtain ⟨s6, hs6, -⟩ := h6 (i + 1)
        have hkey := simple_graph_cycle_power_seven_cover_four_tight_alternate_side
          n hn c hc hspan h16 s6 (i + 1) hs6
        rcases hkey with hl | ⟨hr1, hr7⟩
  11. The first alternative of the auxiliary lemma produces the required class at i, while the second is ruled out by assumption.

    If c(s_6, i) = c(s_6, i+1), then because c(s_6, i+1) = c(s_6, i+7), transitivity yields c(s_6, i) = c(s_6, i+7). Hence s_6 is the desired class at i containing both i+1 and i+7. The alternative that s_6 contains both i+2 and i+8 directly contradicts the assumption that no class at i+1 contains i+2, closed by absurd.

    lines 112–119

    uses absurd

        · have hl' : c s6 i = c s6 (i + 1) := by
            rw [show (i + 1 - 1 : ZMod n) = i by ring] at hl
            exact hl
          have h6' : c s6 (i + 1) = c s6 (i + 7) := by
            rw [show (i + 1 + 6 : ZMod n) = i + 7 by ring] at hs6
            exact hs6
          exact ⟨s6, hl'.trans h6', hl'⟩
        · exact absurd ⟨s6, hr7, hr1⟩ hnr
simple_graph_cycle_power_seven_adj_iff
Two vertices in C_n^7 (with n ≥ 22) are adjacent if and only if they differ by an integer offset e with 0 < |e| ≤ 7.
zmod_intCast_eq_intCast_iff_of_abs_sub_lt
For integers a and b with |a - b| < n, their modular reductions modulo n are equal if and only if a = b in ℤ.
simple_graph_cycle_power_seven_cover_four_tight_alternate_side
In a color class s containing a chord (j, j+6), either the class extends backward to j - 1 or it extends forward to contain both j + 1 and j + 7.
abs_le
The absolute value |a| is at most b if and only if -b ≤ a and a ≤ b.
abs_le.mp
If |a| ≤ b, then -b ≤ a and a ≤ b.
sub_self
Subtracting any group element from itself yields zero: a - a = 0.
Int.cast_zero
The integer zero casts to the zero element of any target ring.
absurd
From a proposition A and its negation ¬A, any desired proposition B follows by explosion (false elimination).

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

lemma simple_graph_cycle_power_seven_cover_four_tight_alternate_side    (n : ℕ) [NeZero n] (hn : 22 ≤ n) (c : Fin 4 → ZMod n → ZMod n)    (hc : ∀ s u v, u ≠ v → c s u = c s v → (simple_graph_cycle_power n 7).Adj u v)    (hspan : ∀ s i, ∃ d : ℕ, d ≤ 7 ∧ c s (i - d) = c s (i - d + 7) ∧ c s (i - d) = c s i)    (h16 : ∀ s i, c s i = c s (i + 7) → (c s i = c s (i + 1) ↔ c s i = c s (i + 6)))    (s : Fin 4) (j : ZMod n) (hj : c s j = c s (j + 6)) :    (c s (j - 1) = c s j) ∨ (c s j = c s (j + 1) ∧ c s j = c s (j + 7)) := by  obtain ⟨d, hd7, hdA, hdB⟩ := hspan s (j + 6)  have hchain : c s j = c s ((j + 6) - d + 7) := (hj.trans hdB.symm).trans hdA  have hsub : (j + 6) - (d : ZMod n) + 7 - j = ((13 - (d : ℤ) : ℤ) : ZMod n) := by    push_cast; ring  have hne : j ≠ (j + 6) - d + 7 := by    intro heq    have hzero : ((13 - (d : ℤ) : ℤ) : ZMod n) = ((0 : ℤ) : ZMod n) := by      rw [← hsub, ← heq, sub_self, Int.cast_zero]    have hlt : |(13 : ℤ) - (d : ℤ) - (0:ℤ)| < (n : ℤ) := by      have h1 : |(13:ℤ) - (d:ℤ)| ≤ 13 := by        rw [abs_le]; constructor <;> omega      calc |(13:ℤ) - (d:ℤ) - 0| = |(13:ℤ) - (d:ℤ)| := by ring_nf        _ ≤ 13 := h1        _ < (n:ℤ) := by omega    have := (zmod_intCast_eq_intCast_iff_of_abs_sub_lt n (13 - (d:ℤ)) 0 hlt).mp hzero    omega  have hadj : (simple_graph_cycle_power n 7).Adj j ((j + 6) - d + 7) := hc s j _ hne hchain  obtain ⟨e, hene, heabs, hee⟩ :=    (simple_graph_cycle_power_seven_adj_iff n hn j ((j + 6) - d + 7)).mp hadj  have hcast : ((13 - (d:ℤ) : ℤ) : ZMod n) = ((e : ℤ) : ZMod n) := by    have h2 : (j + (e : ZMod n)) - j = ((e : ℤ) : ZMod n) := by push_cast; ring    exact hsub.symm.trans (by rw [hee]; exact h2)  have hde : (13 : ℤ) - (d : ℤ) = e := by    have hlt : |(13 : ℤ) - (d : ℤ) - e| < (n : ℤ) := by      have hb := abs_le.mp heabs      have hd7' : ((d:ℤ)) ≤ 7 := by omega      have hd0' : (0:ℤ) ≤ (d:ℤ) := by omega      have hle : |(13 : ℤ) - (d : ℤ) - e| ≤ 20 := by        rw [abs_le]; constructor <;> omega      omega    exact (zmod_intCast_eq_intCast_iff_of_abs_sub_lt n (13 - (d:ℤ)) e hlt).mp hcast  have hd67 : d = 6 ∨ d = 7 := by    have hb := abs_le.mp heabs    omega  rcases hd67 with hd | hd  · have hAj : c s j = c s (j + 7) := by      have hA := hdA      rw [hd] at hA      rw [show (j + 6) - (6:ℕ) = j by ring] at hA      exact hA    exact Or.inr ⟨(h16 s j hAj).mpr hj, hAj⟩  · left    have hA := hdA    rw [hd] at hA    rw [show (j + 6) - (7:ℕ) = j - 1 by ring] at hA    rw [show j - 1 + 7 = j + 6 by ring] at hA    exact hA.trans hj.symmtheorem simple_graph_cycle_power_seven_cover_four_tight_alternate (n : ℕ) [NeZero n]    (hn : 22 ≤ n) (c : Fin 4 → ZMod n → ZMod n)    (hc : ∀ s u v, u ≠ v → c s u = c s v → (simple_graph_cycle_power n 7).Adj u v)    (hcov : ∀ u v, (simple_graph_cycle_power n 7).Adj u v → ∃ s, c s u = c s v)    (h7 : ∀ i, ∃! s, c s i = c s (i + 7)) (h6 : ∀ i, ∃! s, c s i = c s (i + 6))    (h4 : ∀ i, ∃! s, c s i = c s (i + 4))    (hspan : ∀ s i, ∃ d : ℕ, d ≤ 7 ∧ c s (i - d) = c s (i - d + 7) ∧ c s (i - d) = c s i)    (h16 : ∀ s i, c s i = c s (i + 7) → (c s i = c s (i + 1) ↔ c s i = c s (i + 6)))    (i : ZMod n) :    (∃ s, c s i = c s (i + 7) ∧ c s i = c s (i + 1)) ↔      ¬ ∃ s, c s (i + 1) = c s (i + 1 + 7) ∧ c s (i + 1) = c s (i + 1 + 1) := by  constructor  · rintro ⟨s, hs7, hs1⟩ ⟨t, ht8, ht2⟩    have hs6 : c s i = c s (i + 6) := (h16 s i hs7).mp hs1    have ht6 : c t (i + 1) = c t (i + 1 + 6) := (h16 t (i + 1) ht8).mp ht2    obtain ⟨s6, -, huniq⟩ := h6 (i + 1)    have hA : c s (i + 1) = c s (i + 1 + 6) := by      rw [show (i + 1 + 6 : ZMod n) = i + 7 by ring]      exact hs1.symm.trans hs7    have hst : s = t := (huniq s hA).trans (huniq t ht6).symm    have h8t : c t i = c t (i + 8) := by      have hs1' : c t i = c t (i + 1) := by rw [← hst]; exact hs1      have ht8' : c t (i + 1) = c t (i + 8) := by        rw [show (i + 1 + 7 : ZMod n) = i + 8 by ring] at ht8; exact ht8      exact hs1'.trans ht8'    have h8 : c s i = c s (i + 8) := by rw [hst]; exact h8t    have hne : i ≠ i + 8 := by      intro heq      have hzero : ((8:ℤ) : ZMod n) = ((0:ℤ) : ZMod n) := by        have h2 : (i + 8 : ZMod n) - i = ((8:ℤ):ZMod n) := by ring        rw [← h2, ← heq, sub_self, Int.cast_zero]      have hlt : |(8:ℤ) - (0:ℤ)| < (n:ℤ) := by        have h3 : (22:ℤ) ≤ (n:ℤ) := by exact_mod_cast hn        have h4 : |(8:ℤ) - (0:ℤ)| = 8 := by norm_num        rw [h4]; omega      have h8e : (8:ℤ) = 0 := (zmod_intCast_eq_intCast_iff_of_abs_sub_lt n 8 0 hlt).mp hzero      omega    have hadj : (simple_graph_cycle_power n 7).Adj i (i + 8) := hc s i (i + 8) hne h8    obtain ⟨e, hene, heabs, hee⟩ := (simple_graph_cycle_power_seven_adj_iff n hn i (i + 8)).mp hadj    have hcast : ((8:ℤ) : ZMod n) = ((e:ℤ) : ZMod n) := by      have h1 : (i + 8 : ZMod n) - i = ((8:ℤ):ZMod n) := by ring      have h2 : (i + (e : ZMod n)) - i = ((e:ℤ):ZMod n) := by ring      rw [← h1, hee, h2]    have h8e : (8:ℤ) = e := by      apply (zmod_intCast_eq_intCast_iff_of_abs_sub_lt n 8 e ?_).mp hcast      have hb := abs_le.mp heabs      have hle : |(8:ℤ) - e| ≤ 15 := by rw [abs_le]; constructor <;> omega      have h3 : (22:ℤ) ≤ (n:ℤ) := by exact_mod_cast hn      omega    have hb := abs_le.mp heabs    omega  · intro hnr    obtain ⟨s6, hs6, -⟩ := h6 (i + 1)    have hkey := simple_graph_cycle_power_seven_cover_four_tight_alternate_side      n hn c hc hspan h16 s6 (i + 1) hs6    rcases hkey with hl | ⟨hr1, hr7⟩    · have hl' : c s6 i = c s6 (i + 1) := by        rw [show (i + 1 - 1 : ZMod n) = i by ring] at hl        exact hl      have h6' : c s6 (i + 1) = c s6 (i + 7) := by        rw [show (i + 1 + 6 : ZMod n) = i + 7 by ring] at hs6        exact hs6      exact ⟨s6, hl'.trans h6', hl'⟩    · exact absurd ⟨s6, hr7, hr1⟩ hnr
See it in the graphDiscuss this resultChallenge it