AFTD Auto-Formalizing Theoretical Domains

cycle_power_aligned_terminal_blocks_endpoint_overlap

theoremverified

For the uniform nested block family with a three-quarter terminal class, every other class through the old endpoint intersects the class translated by 4R, in either global terminal orientation.

Statement

theorem cycle_power_aligned_terminal_blocks_endpoint_overlap
    (R a b p q c : ℤ) (side : Bool) (hR : 0 < R) (ha : 0 < a) (hb : 0 < b)
    (hA : a ≤ R) (hB : b ≤ R) (hDa : 2 * a ∣ 4 * R) (hDb : 2 * b ∣ 4 * R)
    (hchain : a = b ∨ 2 * a ∣ b ∨ 2 * b ∣ a)
    (hp : a ∣ p + c) (hpo : a < R → 2 * a ∣ p + c - a)
    (hq : b ∣ q + c) (hqo : b < R → 2 * b ∣ q + c - b)
    (hact : cycle_power_terminal_blocks R b q (p + 4 * R - 1) side) (hqp : q ≠ p) :
    ∃ u, cycle_power_terminal_blocks R b q u side ∧
      cycle_power_terminal_blocks R a (p + 4 * R) u side
Source
Uniform conditional colour-rigidity extension for OP-205 / RT-1, related to arXiv:2610.15635 Section 3. This remains a lemma to prove, not a classification of covers or a research advance.
Verified
27 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 4
Used by 1

The proof, explained

The proof establishes that any distinct nested class q containing the old endpoint p + 4R - 1 overlaps the translated class at p + 4R, splitting by cases on whether the block scales a and b are strictly less than the terminal scale R. When both a < R and b < R, the terminal blocks reduce definitionally to standard end blocks of period 4R, and the result follows immediately from cycle_power_aligned_end_blocks_endpoint_overlap. When one or both scales equal R, the divisibility and chain conditions determine the exact relative position of q, and an explicit witness u (among p + 4R, p + 5R, p + 6R, or q + 4R - 1) is shown to fall in both terminal blocks in both orientations of side.

  1. When both a < R and b < R, terminal blocks reduce to end blocks and an overlap witness u exists.

    Because neither scale equals the terminal scale R, cycle_power_terminal_blocks reduces by definition to standard end blocks of period 4R. The hypotheses of cycle_power_aligned_end_blocks_endpoint_overlap are verified (the chain condition, divisibility, and bounds 2a ≤ 4R and 2b ≤ 4R), directly yielding an overlap point u.

    lines 10–24

    uses if_neg, cycle_power_aligned_end_blocks_endpoint_overlap

      by_cases haR : a < R
      · by_cases hbR : b < R
        · have ha_ne : a ≠ R := by omega
          have hb_ne : b ≠ R := by omega
          unfold cycle_power_terminal_blocks at hact ⊢
          rw [if_neg hb_ne] at hact
          have h1 : 2 * a ≤ 4 * R := by omega
          have h2 : 2 * b ≤ 4 * R := by omega
          have hpo' : 2 * a < 4 * R → 2 * a ∣ p + c - a := fun _ => hpo haR
          have hqo' : 2 * b < 4 * R → 2 * b ∣ q + c - b := fun _ => hqo hbR
          obtain ⟨u, hu1, hu2⟩ := cycle_power_aligned_end_blocks_endpoint_overlap
            (4 * R) a b p q c ha hb h1 h2 hDa hDb hchain hp hpo' hq hqo' hact hqp
          refine ⟨u, ?_⟩
          rw [if_neg hb_ne, if_neg ha_ne]
          exact ⟨hu1, hu2⟩
  2. When a < R and b = R, the divisibility conditions imply 2a ∣ R and rule out q = p + 2R and q = p + 3R.

    From b = R and a < R, the chain condition forces 2a ∣ R (as a = b is impossible and 2b ∣ a would force 2R ≤ a < R). Since a < R, 2a ∣ p + c - a; if 2a also divided p + c, it would divide their difference a, implying 2a ≤ a by Int.le_of_dvd, which contradicts a > 0. Thus 2a does not divide p + c. But R ∣ q + c implies 2a ∣ q + c. If q were p + 2R or p + 3R, then p + c = (q + c) - kR would be divisible by 2a via dvd_sub and dvd_mul_of_dvd_right, a contradiction.

    lines 25–53

    uses Int.le_of_dvd, dvd_sub, dvd_trans, dvd_mul_of_dvd_right

        · have hb : b = R := by omega
          have ha_ne : a ≠ R := by omega
          have h2aR : 2 * a ∣ R := by
            rcases hchain with heq | h1 | h2
            · omega
            · rwa [hb] at h1
            · have : 2 * b ≤ a := Int.le_of_dvd ha h2
              omega
          have hqR : R ∣ q + c := by rwa [hb] at hq
          have hpo' := hpo haR
          have hda_of_hdp : 2 * a ∣ p + c → False := by
            intro hdp
            have h1 : 2 * a ∣ (p + c) - (p + c - a) := dvd_sub hdp hpo'
            have heq : (p + c) - (p + c - a) = a := by ring
            rw [heq] at h1
            have : 2 * a ≤ a := Int.le_of_dvd ha h1
            omega
          have hno_end : ¬ (q = p + 2 * R ∨ q = p + 3 * R) := by
            intro hq_eq
            have hdq : 2 * a ∣ q + c := dvd_trans h2aR hqR
            rcases hq_eq with hq2 | hq3
            · apply hda_of_hdp
              have heq : p + c = (q + c) - 2 * R := by omega
              rw [heq]
              exact dvd_sub hdq (dvd_mul_of_dvd_right h2aR 2)
            · apply hda_of_hdp
              have heq : p + c = (q + c) - 3 * R := by omega
              rw [heq]
              exact dvd_sub hdq (dvd_mul_of_dvd_right h2aR 3)
  3. When a < R and b = R, u = p + 4R is an overlap witness in both terminal blocks.

    For a < R, the terminal block for a translated by 4R unfolds to end blocks, of which p + 4R is the first endpoint. For b = R, the terminal block is a union of two intervals. Since p + 4R - 1 lies in this union (by hact), the next point p + 4R can only exit if p + 4R - 1 was a right boundary point, which would require q = p (excluded by q ≠ p), q = p + 3R (for side = false), or q = p + 2R (for side = true), both of which were ruled out in the previous step.

    lines 54–82

    uses if_pos, if_neg, Or.inl, Or.inr

          refine ⟨p + 4 * R, ?_, ?_⟩
          · unfold cycle_power_terminal_blocks at hact ⊢
            rw [if_pos hb] at hact ⊢
            cases side
            · rcases hact with ⟨h1, h2⟩ | ⟨h1, h2⟩
              · have : p + 4 * R < q + R := by
                  by_contra!
                  have : q = p + 3 * R := by omega
                  exact hno_end (Or.inr this)
                exact Or.inl ⟨by omega, by omega⟩
              · have : p < q := by
                  by_contra!
                  have : p = q := by omega
                  exact hqp this.symm
                exact Or.inr ⟨by omega, by omega⟩
            · rcases hact with ⟨h1, h2⟩ | ⟨h1, h2⟩
              · have : p + 4 * R < q + 2 * R := by
                  by_contra!
                  have : q = p + 2 * R := by omega
                  exact hno_end (Or.inl this)
                exact Or.inl ⟨by omega, by omega⟩
              · have : p < q := by
                  by_contra!
                  have : p = q := by omega
                  exact hqp this.symm
                exact Or.inr ⟨by omega, by omega⟩
          · unfold cycle_power_terminal_blocks cycle_power_end_blocks
            rw [if_neg ha_ne]
            exact Or.inl ⟨by omega, by omega⟩
  4. When a = R and b < R, the divisibility conditions imply 2b ∣ R and 2b ∣ p + c.

    Since a ≤ R and ¬(a < R), a = R. With b < R, the chain condition forces 2b ∣ R using Int.le_of_dvd. Transitivity with R ∣ p + c then gives 2b ∣ p + c.

    lines 83–94

    uses Int.le_of_dvd, dvd_trans

      · have ha : a = R := by omega
        by_cases hbR : b < R
        · have hb_ne : b ≠ R := by omega
          have h2bR : 2 * b ∣ R := by
            rcases hchain with heq | h1 | h2
            · omega
            · have : 2 * a ≤ b := Int.le_of_dvd hb h1
              omega
            · rwa [ha] at h2
          have hpR : R ∣ p + c := by rwa [ha] at hp
          have h2bp : 2 * b ∣ p + c := dvd_trans h2bR hpR
          have hqo' := hqo hbR
  5. When a = R and b < R, an overlap witness exists in both subcases of hact.

    Here b has end blocks and a = R has terminal blocks. We case-split on which end block of q contains p + 4R - 1: if it lies in the first block [q, q + b), divisibility yields 2b ∣ q - p - 4R + b. The interval bounds imply 0 ≤ q - p - 4R + b < 2b, so Int.eq_zero_of_dvd_of_nonneg_of_lt forces q = p + 4R - b. Then u = q + 4R - 1 is verified to lie in both blocks for either orientation of side. If it lies in the second block [q + 4R - b, q + 4R), then p < q, and u = p + 4R lies in both blocks for either orientation.

    lines 95–122

    uses if_neg, if_pos, dvd_add, dvd_sub, dvd_refl, dvd_mul_of_dvd_right, Int.eq_zero_of_dvd_of_nonneg_of_lt, Or.inr

          unfold cycle_power_terminal_blocks at hact ⊢
          rw [if_neg hb_ne] at hact
          simp only [if_neg hb_ne, if_pos ha]
          unfold cycle_power_end_blocks at hact ⊢
          rcases hact with hfirst | hlast
          · have hz : 2 * b ∣ q - p - 4 * R + b := by
              have hh : 2 * b ∣ ((q + c - b) - (p + c)) - (4 * R) + (2 * b) := by
                refine dvd_add (dvd_sub (dvd_sub hqo' h2bp) ?_) (dvd_refl _)
                exact dvd_mul_of_dvd_right h2bR 4
              have heq : ((q + c - b) - (p + c)) - (4 * R) + (2 * b) = q - p - 4 * R + b := by ring
              rwa [heq] at hh
            have hzero := Int.eq_zero_of_dvd_of_nonneg_of_lt
              (by omega : 0 ≤ q - p - 4 * R + b)
              (by omega : q - p - 4 * R + b < 2 * b) hz
            have hqeq : q = p + 4 * R - b := by omega
            refine ⟨q + 4 * R - 1, Or.inr ⟨by omega, by omega⟩, ?_⟩
            cases side
            · right
              constructor <;> omega
            · right
              constructor <;> omega
          · have hpq : p < q := by omega
            refine ⟨p + 4 * R, Or.inr ⟨by omega, by omega⟩, ?_⟩
            cases side
            · left
              constructor <;> omega
            · left
              constructor <;> omega
  6. When a = R and b = R, the shift q - p is a multiple of R.

    Since b ≤ R and ¬(b < R), b = R. The divisibility hypotheses give R ∣ p + c and R ∣ q + c, so their difference q - p is divisible by R via dvd_sub.

    lines 123–129

    uses dvd_sub

        · have hb : b = R := by omega
          have hd : R ∣ q - p := by
            have hpR : R ∣ p + c := by rwa [ha] at hp
            have hqR : R ∣ q + c := by rwa [hb] at hq
            have hh : R ∣ (q + c) - (p + c) := dvd_sub hqR hpR
            have heq : (q + c) - (p + c) = q - p := by ring
            rwa [heq] at hh
  7. When a = R, b = R, and side = false, an overlap witness exists.

    For side = false, the terminal blocks are [x, x + R) ∪ [x + 2R, x + 4R). If p + 4R - 1 lies in the first interval [q, q + R), then R ∣ q - p - 3R with 0 ≤ q - p - 3R < R, forcing q = p + 3R by Int.eq_zero_of_dvd_of_nonneg_of_lt, and u = p + 6R works. If it lies in the second interval [q + 2R, q + 4R), then p < q, and u = p + 4R works.

    lines 130–151

    uses if_pos, dvd_sub, dvd_mul_of_dvd_right, dvd_refl, Int.eq_zero_of_dvd_of_nonneg_of_lt

          unfold cycle_power_terminal_blocks at hact ⊢
          simp only [if_pos ha, if_pos hb] at hact ⊢
          cases side
          · rcases hact with ⟨h1, h2⟩ | ⟨h1, h2⟩
            · have hz : R ∣ q - p - 3 * R := by
                have hh : R ∣ (q - p) - 3 * R := dvd_sub hd (dvd_mul_of_dvd_right (dvd_refl R) 3)
                exact hh
              have hzero := Int.eq_zero_of_dvd_of_nonneg_of_lt
                (by omega : 0 ≤ q - p - 3 * R)
                (by omega : q - p - 3 * R < R) hz
              have hqeq : q = p + 3 * R := by omega
              refine ⟨p + 6 * R, ?_, ?_⟩
              · right
                constructor <;> omega
              · right
                constructor <;> omega
            · have hpq : p < q := by omega
              refine ⟨p + 4 * R, ?_, ?_⟩
              · right
                constructor <;> omega
              · left
                constructor <;> omega
  8. When a = R, b = R, and side = true, an overlap witness exists.

    For side = true, the terminal blocks are [x, x + 2R) ∪ [x + 3R, x + 4R). If p + 4R - 1 lies in [q, q + 2R), then R ∣ q - p - 2R with 0 ≤ q - p - 2R < 2R. Splitting on whether q - p - 2R < R gives either q = p + 2R (witness u = p + 5R) or q = p + 3R (witness u = p + 4R) using Int.eq_zero_of_dvd_of_nonneg_of_lt. If p + 4R - 1 lies in [q + 3R, q + 4R), then p < q, and witness u = p + 4R works.

    lines 152–184

    uses dvd_sub, dvd_mul_of_dvd_right, dvd_refl, Int.eq_zero_of_dvd_of_nonneg_of_lt

          · rcases hact with ⟨h1, h2⟩ | ⟨h1, h2⟩
            · have hz : R ∣ q - p - 2 * R := by
                have hh : R ∣ (q - p) - 2 * R := dvd_sub hd (dvd_mul_of_dvd_right (dvd_refl R) 2)
                exact hh
              have hge : 0 ≤ q - p - 2 * R := by omega
              have hlt : q - p - 2 * R < 2 * R := by omega
              by_cases hcase : q - p - 2 * R < R
              · have hzero := Int.eq_zero_of_dvd_of_nonneg_of_lt hge hcase hz
                have hqeq : q = p + 2 * R := by omega
                refine ⟨p + 5 * R, ?_, ?_⟩
                · right
                  constructor <;> omega
                · left
                  constructor <;> omega
              · have hz2 : R ∣ q - p - 3 * R := by
                  have hh : R ∣ (q - p - 2 * R) - R := dvd_sub hz (dvd_refl R)
                  have heq : (q - p - 2 * R) - R = q - p - 3 * R := by ring
                  rwa [heq] at hh
                have hzero := Int.eq_zero_of_dvd_of_nonneg_of_lt
                  (by omega : 0 ≤ q - p - 3 * R)
                  (by omega : q - p - 3 * R < R) hz2
                have hqeq : q = p + 3 * R := by omega
                refine ⟨p + 4 * R, ?_, ?_⟩
                · left
                  constructor <;> omega
                · left
                  constructor <;> omega
            · have hpq : p < q := by omega
              refine ⟨p + 4 * R, ?_, ?_⟩
              · right
                constructor <;> omega
              · left
                constructor <;> omega
cycle_power_aligned_end_blocks_endpoint_overlap
For aligned end blocks of period D, if the class of q contains the endpoint p + D - 1 of p and q ≠ p, then the class of q intersects the class of a translated by D.
if_neg
An if-then-else expression evaluates to its false (else) branch when the condition is false.
if_pos
An if-then-else expression evaluates to its true (then) branch when the condition is true.
Int.le_of_dvd
If an integer a divides a positive integer b, then a ≤ b.
dvd_sub
If a divides b and c, then a divides their difference b - c.
dvd_add
If a divides b and c, then a divides their sum b + c.
dvd_trans
Divisibility is transitive: if a divides b and b divides c, then a divides c.
dvd_mul_of_dvd_right
If a divides b, then a divides any multiple c * b.
dvd_refl
Every integer divides itself.
Int.eq_zero_of_dvd_of_nonneg_of_lt
If an integer m is a multiple of n such that 0 ≤ m < n, then m = 0.
Or.inl
Constructs a proof of A ∨ B from a proof of A.
Or.inr
Constructs a proof of A ∨ B from a proof of B.

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

theorem cycle_power_aligned_terminal_blocks_endpoint_overlap    (R a b p q c : ℤ) (side : Bool) (hR : 0 < R) (ha : 0 < a) (hb : 0 < b)    (hA : a ≤ R) (hB : b ≤ R) (hDa : 2 * a ∣ 4 * R) (hDb : 2 * b ∣ 4 * R)    (hchain : a = b ∨ 2 * a ∣ b ∨ 2 * b ∣ a)    (hp : a ∣ p + c) (hpo : a < R → 2 * a ∣ p + c - a)    (hq : b ∣ q + c) (hqo : b < R → 2 * b ∣ q + c - b)    (hact : cycle_power_terminal_blocks R b q (p + 4 * R - 1) side) (hqp : q ≠ p) :    ∃ u, cycle_power_terminal_blocks R b q u side ∧      cycle_power_terminal_blocks R a (p + 4 * R) u side := by  by_cases haR : a < R  · by_cases hbR : b < R    · have ha_ne : a ≠ R := by omega      have hb_ne : b ≠ R := by omega      unfold cycle_power_terminal_blocks at hact ⊢      rw [if_neg hb_ne] at hact      have h1 : 2 * a ≤ 4 * R := by omega      have h2 : 2 * b ≤ 4 * R := by omega      have hpo' : 2 * a < 4 * R → 2 * a ∣ p + c - a := fun _ => hpo haR      have hqo' : 2 * b < 4 * R → 2 * b ∣ q + c - b := fun _ => hqo hbR      obtain ⟨u, hu1, hu2⟩ := cycle_power_aligned_end_blocks_endpoint_overlap        (4 * R) a b p q c ha hb h1 h2 hDa hDb hchain hp hpo' hq hqo' hact hqp      refine ⟨u, ?_⟩      rw [if_neg hb_ne, if_neg ha_ne]      exact ⟨hu1, hu2⟩    · have hb : b = R := by omega      have ha_ne : a ≠ R := by omega      have h2aR : 2 * a ∣ R := by        rcases hchain with heq | h1 | h2        · omega        · rwa [hb] at h1        · have : 2 * b ≤ a := Int.le_of_dvd ha h2          omega      have hqR : R ∣ q + c := by rwa [hb] at hq      have hpo' := hpo haR      have hda_of_hdp : 2 * a ∣ p + c → False := by        intro hdp        have h1 : 2 * a ∣ (p + c) - (p + c - a) := dvd_sub hdp hpo'        have heq : (p + c) - (p + c - a) = a := by ring        rw [heq] at h1        have : 2 * a ≤ a := Int.le_of_dvd ha h1        omega      have hno_end : ¬ (q = p + 2 * R ∨ q = p + 3 * R) := by        intro hq_eq        have hdq : 2 * a ∣ q + c := dvd_trans h2aR hqR        rcases hq_eq with hq2 | hq3        · apply hda_of_hdp          have heq : p + c = (q + c) - 2 * R := by omega          rw [heq]          exact dvd_sub hdq (dvd_mul_of_dvd_right h2aR 2)        · apply hda_of_hdp          have heq : p + c = (q + c) - 3 * R := by omega          rw [heq]          exact dvd_sub hdq (dvd_mul_of_dvd_right h2aR 3)      refine ⟨p + 4 * R, ?_, ?_⟩      · unfold cycle_power_terminal_blocks at hact ⊢        rw [if_pos hb] at hact ⊢        cases side        · rcases hact with ⟨h1, h2⟩ | ⟨h1, h2⟩          · have : p + 4 * R < q + R := by              by_contra!              have : q = p + 3 * R := by omega              exact hno_end (Or.inr this)            exact Or.inl ⟨by omega, by omega⟩          · have : p < q := by              by_contra!              have : p = q := by omega              exact hqp this.symm            exact Or.inr ⟨by omega, by omega⟩        · rcases hact with ⟨h1, h2⟩ | ⟨h1, h2⟩          · have : p + 4 * R < q + 2 * R := by              by_contra!              have : q = p + 2 * R := by omega              exact hno_end (Or.inl this)            exact Or.inl ⟨by omega, by omega⟩          · have : p < q := by              by_contra!              have : p = q := by omega              exact hqp this.symm            exact Or.inr ⟨by omega, by omega⟩      · unfold cycle_power_terminal_blocks cycle_power_end_blocks        rw [if_neg ha_ne]        exact Or.inl ⟨by omega, by omega⟩  · have ha : a = R := by omega    by_cases hbR : b < R    · have hb_ne : b ≠ R := by omega      have h2bR : 2 * b ∣ R := by        rcases hchain with heq | h1 | h2        · omega        · have : 2 * a ≤ b := Int.le_of_dvd hb h1          omega        · rwa [ha] at h2      have hpR : R ∣ p + c := by rwa [ha] at hp      have h2bp : 2 * b ∣ p + c := dvd_trans h2bR hpR      have hqo' := hqo hbR      unfold cycle_power_terminal_blocks at hact ⊢      rw [if_neg hb_ne] at hact      simp only [if_neg hb_ne, if_pos ha]      unfold cycle_power_end_blocks at hact ⊢      rcases hact with hfirst | hlast      · have hz : 2 * b ∣ q - p - 4 * R + b := by          have hh : 2 * b ∣ ((q + c - b) - (p + c)) - (4 * R) + (2 * b) := by            refine dvd_add (dvd_sub (dvd_sub hqo' h2bp) ?_) (dvd_refl _)            exact dvd_mul_of_dvd_right h2bR 4          have heq : ((q + c - b) - (p + c)) - (4 * R) + (2 * b) = q - p - 4 * R + b := by ring          rwa [heq] at hh        have hzero := Int.eq_zero_of_dvd_of_nonneg_of_lt          (by omega : 0 ≤ q - p - 4 * R + b)          (by omega : q - p - 4 * R + b < 2 * b) hz        have hqeq : q = p + 4 * R - b := by omega        refine ⟨q + 4 * R - 1, Or.inr ⟨by omega, by omega⟩, ?_⟩        cases side        · right          constructor <;> omega        · right          constructor <;> omega      · have hpq : p < q := by omega        refine ⟨p + 4 * R, Or.inr ⟨by omega, by omega⟩, ?_⟩        cases side        · left          constructor <;> omega        · left          constructor <;> omega    · have hb : b = R := by omega      have hd : R ∣ q - p := by        have hpR : R ∣ p + c := by rwa [ha] at hp        have hqR : R ∣ q + c := by rwa [hb] at hq        have hh : R ∣ (q + c) - (p + c) := dvd_sub hqR hpR        have heq : (q + c) - (p + c) = q - p := by ring        rwa [heq] at hh      unfold cycle_power_terminal_blocks at hact ⊢      simp only [if_pos ha, if_pos hb] at hact ⊢      cases side      · rcases hact with ⟨h1, h2⟩ | ⟨h1, h2⟩        · have hz : R ∣ q - p - 3 * R := by            have hh : R ∣ (q - p) - 3 * R := dvd_sub hd (dvd_mul_of_dvd_right (dvd_refl R) 3)            exact hh          have hzero := Int.eq_zero_of_dvd_of_nonneg_of_lt            (by omega : 0 ≤ q - p - 3 * R)            (by omega : q - p - 3 * R < R) hz          have hqeq : q = p + 3 * R := by omega          refine ⟨p + 6 * R, ?_, ?_⟩          · right            constructor <;> omega          · right            constructor <;> omega        · have hpq : p < q := by omega          refine ⟨p + 4 * R, ?_, ?_⟩          · right            constructor <;> omega          · left            constructor <;> omega      · rcases hact with ⟨h1, h2⟩ | ⟨h1, h2⟩        · have hz : R ∣ q - p - 2 * R := by            have hh : R ∣ (q - p) - 2 * R := dvd_sub hd (dvd_mul_of_dvd_right (dvd_refl R) 2)            exact hh          have hge : 0 ≤ q - p - 2 * R := by omega          have hlt : q - p - 2 * R < 2 * R := by omega          by_cases hcase : q - p - 2 * R < R          · have hzero := Int.eq_zero_of_dvd_of_nonneg_of_lt hge hcase hz            have hqeq : q = p + 2 * R := by omega            refine ⟨p + 5 * R, ?_, ?_⟩            · right              constructor <;> omega            · left              constructor <;> omega          · have hz2 : R ∣ q - p - 3 * R := by              have hh : R ∣ (q - p - 2 * R) - R := dvd_sub hz (dvd_refl R)              have heq : (q - p - 2 * R) - R = q - p - 3 * R := by ring              rwa [heq] at hh            have hzero := Int.eq_zero_of_dvd_of_nonneg_of_lt              (by omega : 0 ≤ q - p - 3 * R)              (by omega : q - p - 3 * R < R) hz2            have hqeq : q = p + 3 * R := by omega            refine ⟨p + 4 * R, ?_, ?_⟩            · left              constructor <;> omega            · left              constructor <;> omega        · have hpq : p < q := by omega          refine ⟨p + 4 * R, ?_, ?_⟩          · right            constructor <;> omega          · left            constructor <;> omega
See it in the graphDiscuss this resultChallenge it