AFTD Auto-Formalizing Theoretical Domains

op309_girth9_block_ring_unchanged_block_keeps_pairs

theoremverified

In the k-block ring of the explicit 132-vertex girth-nine graph with its triple-star forest R, let qb and q be two port labellings that agree on whether the two ports of a pairing at a P3 a-b-c get one label, for every P3 whose centre b is not in a set changed. If no vertex of block j is in changed and qb gives each of the 88 listed base pairings of block j one label, then so does q.

Statement

theorem op309_girth9_block_ring_unchanged_block_keeps_pairs (k : ℕ)
    (G : SimpleGraph (Fin (132 * k))) [DecidableRel G.Adj]
    (hG : ∀ u v : Fin (132 * k), G.Adj u v ↔
      let outside : List (ℕ × ℕ) := [(0,34), (1,6), (1,67), (2,10), (2,91), (3,31), (4,29), (4,88), (5,23), (5,71), (7,21), (7,65), (8,30), (8,125), (9,31), (10,116), (11,13), (11,113), (12,37), (13,79), (14,16), (14,85), (15,35), (16,106), (17,18), (17,115), (19,28), (19,124), (20,22), (20,38), (22,46), (23,110), (24,32), (25,94), (25,97), (26,89), (26,104), (27,34), (28,112), (29,62), (32,35), (33,130), (36,39), (37,53), (38,88), (40,61), (40,71), (41,44), (41,116), (42,45), (43,62), (43,103), (44,73), (46,80), (47,95), (47,118), (48,51), (49,77), (49,115), (50,92), (50,98), (52,124), (52,128), (53,104), (54,57), (55,103), (55,119), (56,64), (56,113), (58,89), (58,127), (59,67), (59,76), (60,63), (61,128), (64,100), (65,85), (66,69), (68,109), (68,131), (70,80), (70,122), (72,75), (73,121), (74,119), (74,131), (76,94), (77,79), (78,81), (82,97), (82,110), (83,91), (83,127), (84,87), (86,92), (86,122), (90,93), (95,109), (96,99), (98,107), (100,130), (101,118), (101,125), (102,105), (106,121), (107,112), (108,111), (114,117), (120,123), (126,129)]
      let base : ℕ → ℕ → Prop := fun a b =>
        (a ≠ b ∧ a / 3 = b / 3 ∧ (a % 3 = 0 ∨ b % 3 = 0)) ∨ (a, b) ∈ outside ∨ (b, a) ∈ outside
      (u.val / 132 = v.val / 132 ∧ base (u.val % 132) (v.val % 132) ∧
        ¬ (u.val % 132 = 36 ∧ v.val % 132 = 39) ∧ ¬ (u.val % 132 = 39 ∧ v.val % 132 = 36)) ∨
      (u.val % 132 = 36 ∧ v.val % 132 = 39 ∧ v.val / 132 = (u.val / 132 + 1) % k) ∨
      (u.val % 132 = 39 ∧ v.val % 132 = 36 ∧ u.val / 132 = (v.val / 132 + 1) % k))
    (R : Finset G.edgeSet)
    (hR : ∀ e : G.edgeSet, e ∈ R ↔ ∃ a b : Fin (132 * k), e.1 = s(a,b) ∧ a ≠ b ∧
      a.val / 3 = b.val / 3 ∧ (a.val % 3 = 0 ∨ b.val % 3 = 0))
    {A B : Type*} (qb : Sum G.edgeSet (Fin (132 * k) × Fin 3) → A)
    (q : Sum G.edgeSet (Fin (132 * k) × Fin 3) → B) (changed : Finset (Fin (132 * k)))
    (hkeep : ∀ (a b c : Fin (132 * k)) (ea ec : Sum G.edgeSet (Fin (132 * k) × Fin 3)),
      [a,b,c].Nodup → s(a,b) ∈ R.image Subtype.val → s(b,c) ∈ R.image Subtype.val →
      (R.filter fun e => a ∈ e.1).card = 1 → (R.filter fun e => b ∈ e.1).card = 2 →
      (R.filter fun e => c ∈ e.1).card = 1 → b ∉ changed →
      op309_padded_boundary_port G R a ea → op309_padded_boundary_port G R c ec →
      (qb ea = qb ec ↔ q ea = q ec))
    (j : ℕ) (hj : j < k) (hfree : ∀ v ∈ changed, v.val / 132 ≠ j)
    (hpb : (let pairs : List (ℕ × ℕ × ℕ × ℕ) := [(1,6,2,10), (1,67,2,91), (4,29,5,23), (4,88,5,71), (7,21,8,30), (7,65,8,125), (2,10,11,13), (10,116,11,113), (11,13,14,16), (13,79,14,85), (14,16,17,18), (16,106,17,115), (19,28,20,22), (19,124,20,38), (20,22,5,23), (22,46,23,110), (25,94,26,104), (25,97,26,89), (19,28,4,29), (28,112,29,62), (3,31,32,35), (9,31,24,32), (0,34,32,35), (27,34,15,35), (12,37,38,88), (37,53,20,38), (40,61,41,44), (40,71,41,116), (43,62,44,73), (43,103,41,44), (22,46,47,95), (46,80,47,118), (49,77,50,92), (49,115,50,98), (52,124,53,104), (52,128,37,53), (55,103,56,113), (55,119,56,64), (58,89,59,76), (58,127,59,67), (40,61,29,62), (61,128,43,62), (56,64,7,65), (64,100,65,85), (1,67,68,109), (59,67,68,131), (70,80,5,71), (70,122,40,71), (44,73,74,119), (73,121,74,131), (59,76,49,77), (76,94,77,79), (13,79,70,80), (77,79,46,80), (82,97,83,127), (82,110,83,91), (14,85,86,122), (65,85,86,92), (4,88,58,89), (38,88,26,89), (2,91,50,92), (83,91,86,92), (25,94,47,95), (76,94,95,109), (25,97,50,98), (82,97,98,107), (64,100,101,125), (100,130,101,118), (43,103,26,104), (55,103,53,104), (16,106,98,107), (106,121,107,112), (68,109,23,110), (95,109,82,110), (28,112,11,113), (107,112,56,113), (17,115,10,116), (49,115,41,116), (47,118,74,119), (101,118,55,119), (73,121,86,122), (106,121,70,122), (19,124,8,125), (52,124,101,125), (58,127,61,128), (83,127,52,128), (33,130,68,131), (100,130,74,131)]
      ∀ t ∈ pairs, ∀ e e' : G.edgeSet, ∀ u w u' w' : Fin (132 * k),
        e.1 = s(u, w) → e'.1 = s(u', w') → u.val = 132 * j + t.1 → w.val = 132 * j + t.2.1 →
        u'.val = 132 * j + t.2.2.1 → w'.val = 132 * j + t.2.2.2 → qb (.inl e) = qb (.inl e'))) :
    (let pairs : List (ℕ × ℕ × ℕ × ℕ) := [(1,6,2,10), (1,67,2,91), (4,29,5,23), (4,88,5,71), (7,21,8,30), (7,65,8,125), (2,10,11,13), (10,116,11,113), (11,13,14,16), (13,79,14,85), (14,16,17,18), (16,106,17,115), (19,28,20,22), (19,124,20,38), (20,22,5,23), (22,46,23,110), (25,94,26,104), (25,97,26,89), (19,28,4,29), (28,112,29,62), (3,31,32,35), (9,31,24,32), (0,34,32,35), (27,34,15,35), (12,37,38,88), (37,53,20,38), (40,61,41,44), (40,71,41,116), (43,62,44,73), (43,103,41,44), (22,46,47,95), (46,80,47,118), (49,77,50,92), (49,115,50,98), (52,124,53,104), (52,128,37,53), (55,103,56,113), (55,119,56,64), (58,89,59,76), (58,127,59,67), (40,61,29,62), (61,128,43,62), (56,64,7,65), (64,100,65,85), (1,67,68,109), (59,67,68,131), (70,80,5,71), (70,122,40,71), (44,73,74,119), (73,121,74,131), (59,76,49,77), (76,94,77,79), (13,79,70,80), (77,79,46,80), (82,97,83,127), (82,110,83,91), (14,85,86,122), (65,85,86,92), (4,88,58,89), (38,88,26,89), (2,91,50,92), (83,91,86,92), (25,94,47,95), (76,94,95,109), (25,97,50,98), (82,97,98,107), (64,100,101,125), (100,130,101,118), (43,103,26,104), (55,103,53,104), (16,106,98,107), (106,121,107,112), (68,109,23,110), (95,109,82,110), (28,112,11,113), (107,112,56,113), (17,115,10,116), (49,115,41,116), (47,118,74,119), (101,118,55,119), (73,121,86,122), (106,121,70,122), (19,124,8,125), (52,124,101,125), (58,127,61,128), (83,127,52,128), (33,130,68,131), (100,130,74,131)]
      ∀ t ∈ pairs, ∀ e e' : G.edgeSet, ∀ u w u' w' : Fin (132 * k),
        e.1 = s(u, w) → e'.1 = s(u', w') → u.val = 132 * j + t.1 → w.val = 132 * j + t.2.1 →
        u'.val = 132 * j + t.2.2.1 → w'.val = 132 * j + t.2.2.2 → q (.inl e) = q (.inl e'))
Source
OP-309 girth-nine block-ring construction: helper for op309_girth9_acyclic_source_unbounded_switch_cost, the transfer of the base pairings to a repair that changes no P3 of a block.
Verified
28 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 6
Used by 1

Lean source view module on GitHub

def in1267_pairs : List (ℕ × ℕ × ℕ × ℕ) := [(1,6,2,10), (1,67,2,91), (4,29,5,23), (4,88,5,71), (7,21,8,30), (7,65,8,125), (2,10,11,13), (10,116,11,113), (11,13,14,16), (13,79,14,85), (14,16,17,18), (16,106,17,115), (19,28,20,22), (19,124,20,38), (20,22,5,23), (22,46,23,110), (25,94,26,104), (25,97,26,89), (19,28,4,29), (28,112,29,62), (3,31,32,35), (9,31,24,32), (0,34,32,35), (27,34,15,35), (12,37,38,88), (37,53,20,38), (40,61,41,44), (40,71,41,116), (43,62,44,73), (43,103,41,44), (22,46,47,95), (46,80,47,118), (49,77,50,92), (49,115,50,98), (52,124,53,104), (52,128,37,53), (55,103,56,113), (55,119,56,64), (58,89,59,76), (58,127,59,67), (40,61,29,62), (61,128,43,62), (56,64,7,65), (64,100,65,85), (1,67,68,109), (59,67,68,131), (70,80,5,71), (70,122,40,71), (44,73,74,119), (73,121,74,131), (59,76,49,77), (76,94,77,79), (13,79,70,80), (77,79,46,80), (82,97,83,127), (82,110,83,91), (14,85,86,122), (65,85,86,92), (4,88,58,89), (38,88,26,89), (2,91,50,92), (83,91,86,92), (25,94,47,95), (76,94,95,109), (25,97,50,98), (82,97,98,107), (64,100,101,125), (100,130,101,118), (43,103,26,104), (55,103,53,104), (16,106,98,107), (106,121,107,112), (68,109,23,110), (95,109,82,110), (28,112,11,113), (107,112,56,113), (17,115,10,116), (49,115,41,116), (47,118,74,119), (101,118,55,119), (73,121,86,122), (106,121,70,122), (19,124,8,125), (52,124,101,125), (58,127,61,128), (83,127,52,128), (33,130,68,131), (100,130,74,131)]

def in1267_O (x y z w : ℕ) : Bool :=
  decide (x < 132 ∧ y < 132 ∧ z < 132 ∧ w < 132 ∧ x % 3 ≠ 0 ∧ z % 3 ≠ 0 ∧ x ≠ z ∧ x / 3 = z / 3 ∧
    y / 3 ≠ x / 3 ∧ w / 3 ≠ z / 3)

theorem in1267_pairs_orient : ∀ t ∈ in1267_pairs,
    (in1267_O t.1 t.2.1 t.2.2.1 t.2.2.2 || in1267_O t.2.1 t.1 t.2.2.1 t.2.2.2 ||
      in1267_O t.1 t.2.1 t.2.2.2 t.2.2.1 || in1267_O t.2.1 t.1 t.2.2.2 t.2.2.1) = true := by
  decide +kernel

theorem in1267_keep_one {k : ℕ} {G : SimpleGraph (Fin (132 * k))} [DecidableRel G.Adj]
    {R : Finset G.edgeSet}
    (hR : ∀ e : G.edgeSet, e ∈ R ↔ ∃ a b : Fin (132 * k), e.1 = s(a,b) ∧ a ≠ b ∧
      a.val / 3 = b.val / 3 ∧ (a.val % 3 = 0 ∨ b.val % 3 = 0))
    (hstar : ∀ a b : Fin (132 * k), a ≠ b → a.val / 3 = b.val / 3 →
      (a.val % 3 = 0 ∨ b.val % 3 = 0) → G.Adj a b)
    {A B : Type*} {qb : Sum G.edgeSet (Fin (132 * k) × Fin 3) → A}
    {q : Sum G.edgeSet (Fin (132 * k) × Fin 3) → B} {changed : Finset (Fin (132 * k))}
    (hkeep : ∀ (a b c : Fin (132 * k)) (ea ec : Sum G.edgeSet (Fin (132 * k) × Fin 3)),
      [a,b,c].Nodup → s(a,b) ∈ R.image Subtype.val → s(b,c) ∈ R.image Subtype.val →
      (R.filter fun e => a ∈ e.1).card = 1 → (R.filter fun e => b ∈ e.1).card = 2 →
      (R.filter fun e => c ∈ e.1).card = 1 → b ∉ changed →
      op309_padded_boundary_port G R a ea → op309_padded_boundary_port G R c ec →
      (qb ea = qb ec ↔ q ea = q ec))
    {j : ℕ} (hj : j < k) (hfree : ∀ v ∈ changed, v.val / 132 ≠ j)
    {x y z w : ℕ} (hO : in1267_O x y z w = true)
    {e e' : G.edgeSet} {a y' c w' : Fin (132 * k)}
    (he : e.1 = s(a, y')) (he' : e'.1 = s(c, w')) (ha : a.val = 132 * j + x)
    (hy : y'.val = 132 * j + y) (hc : c.val = 132 * j + z) (hw : w'.val = 132 * j + w)
    (hq : qb (.inl e) = qb (.inl e')) : q (.inl e) = q (.inl e') := by
  simp only [in1267_O, decide_eq_true_eq] at hO
  obtain ⟨hx, hy0, hz, hw0, hx3, hz3, hxz, hxz3, hyx, hwz⟩ := hO
  have hdeg := op309_triple_star_forest_degrees (132 * k) ⟨44 * k, by ring⟩ G hstar R hR
  have hsel : ∀ u v : Fin (132 * k), u.val ≠ v.val → u.val / 3 = v.val / 3 →
      (u.val % 3 = 0 ∨ v.val % 3 = 0) → s(u, v) ∈ R.image Subtype.val := by
    intro u v hne h3 h0
    have hne' : u ≠ v := fun h => hne (congrArg Fin.val h)
    exact Finset.mem_image.2 ⟨⟨s(u, v), hstar u v hne' h3 h0⟩, (hR _).2 ⟨u, v, rfl, hne', h3, h0⟩, rfl⟩
  let b : Fin (132 * k) := ⟨132 * j + 3 * (x / 3), by omega⟩
  have hb : b.val = 132 * j + 3 * (x / 3) := rfl
  have hfb : b ∉ changed := fun hm => hfree b hm (by rw [hb]; omega)
  refine (hkeep a b c (.inl e) (.inl e') (in1267_nodup3 (by omega) (by omega) (by omega))
    (hsel a b (by omega) (by omega) (by omega)) (hsel b c (by omega) (by omega) (by omega))
    (by rw [hdeg, if_neg (by omega)]) (by rw [hdeg, if_pos (by omega)])
    (by rw [hdeg, if_neg (by omega)]) hfb
    ⟨in1267_notR hR he (by omega), by rw [he]; exact Sym2.mem_mk_left _ _⟩
    ⟨in1267_notR hR he' (by omega), by rw [he']; exact Sym2.mem_mk_left _ _⟩).1 hq

theorem op309_girth9_block_ring_unchanged_block_keeps_pairs (k : ℕ)
    (G : SimpleGraph (Fin (132 * k))) [DecidableRel G.Adj]
    (hG : ∀ u v : Fin (132 * k), G.Adj u v ↔
      let outside : List (ℕ × ℕ) := [(0,34), (1,6), (1,67), (2,10), (2,91), (3,31), (4,29), (4,88), (5,23), (5,71), (7,21), (7,65), (8,30), (8,125), (9,31), (10,116), (11,13), (11,113), (12,37), (13,79), (14,16), (14,85), (15,35), (16,106), (17,18), (17,115), (19,28), (19,124), (20,22), (20,38), (22,46), (23,110), (24,32), (25,94), (25,97), (26,89), (26,104), (27,34), (28,112), (29,62), (32,35), (33,130), (36,39), (37,53), (38,88), (40,61), (40,71), (41,44), (41,116), (42,45), (43,62), (43,103), (44,73), (46,80), (47,95), (47,118), (48,51), (49,77), (49,115), (50,92), (50,98), (52,124), (52,128), (53,104), (54,57), (55,103), (55,119), (56,64), (56,113), (58,89), (58,127), (59,67), (59,76), (60,63), (61,128), (64,100), (65,85), (66,69), (68,109), (68,131), (70,80), (70,122), (72,75), (73,121), (74,119), (74,131), (76,94), (77,79), (78,81), (82,97), (82,110), (83,91), (83,127), (84,87), (86,92), (86,122), (90,93), (95,109), (96,99), (98,107), (100,130), (101,118), (101,125), (102,105), (106,121), (107,112), (108,111), (114,117), (120,123), (126,129)]
      let base : ℕ → ℕ → Prop := fun a b =>
        (a ≠ b ∧ a / 3 = b / 3 ∧ (a % 3 = 0 ∨ b % 3 = 0)) ∨ (a, b) ∈ outside ∨ (b, a) ∈ outside
      (u.val / 132 = v.val / 132 ∧ base (u.val % 132) (v.val % 132) ∧
        ¬ (u.val % 132 = 36 ∧ v.val % 132 = 39) ∧ ¬ (u.val % 132 = 39 ∧ v.val % 132 = 36)) ∨
      (u.val % 132 = 36 ∧ v.val % 132 = 39 ∧ v.val / 132 = (u.val / 132 + 1) % k) ∨
      (u.val % 132 = 39 ∧ v.val % 132 = 36 ∧ u.val / 132 = (v.val / 132 + 1) % k))
    (R : Finset G.edgeSet)
    (hR : ∀ e : G.edgeSet, e ∈ R ↔ ∃ a b : Fin (132 * k), e.1 = s(a,b) ∧ a ≠ b ∧
      a.val / 3 = b.val / 3 ∧ (a.val % 3 = 0 ∨ b.val % 3 = 0))
    {A B : Type*} (qb : Sum G.edgeSet (Fin (132 * k) × Fin 3) → A)
    (q : Sum G.edgeSet (Fin (132 * k) × Fin 3) → B) (changed : Finset (Fin (132 * k)))
    (hkeep : ∀ (a b c : Fin (132 * k)) (ea ec : Sum G.edgeSet (Fin (132 * k) × Fin 3)),
      [a,b,c].Nodup → s(a,b) ∈ R.image Subtype.val → s(b,c) ∈ R.image Subtype.val →
      (R.filter fun e => a ∈ e.1).card = 1 → (R.filter fun e => b ∈ e.1).card = 2 →
      (R.filter fun e => c ∈ e.1).card = 1 → b ∉ changed →
      op309_padded_boundary_port G R a ea → op309_padded_boundary_port G R c ec →
      (qb ea = qb ec ↔ q ea = q ec))
    (j : ℕ) (hj : j < k) (hfree : ∀ v ∈ changed, v.val / 132 ≠ j)
    (hpb : (let pairs : List (ℕ × ℕ × ℕ × ℕ) := [(1,6,2,10), (1,67,2,91), (4,29,5,23), (4,88,5,71), (7,21,8,30), (7,65,8,125), (2,10,11,13), (10,116,11,113), (11,13,14,16), (13,79,14,85), (14,16,17,18), (16,106,17,115), (19,28,20,22), (19,124,20,38), (20,22,5,23), (22,46,23,110), (25,94,26,104), (25,97,26,89), (19,28,4,29), (28,112,29,62), (3,31,32,35), (9,31,24,32), (0,34,32,35), (27,34,15,35), (12,37,38,88), (37,53,20,38), (40,61,41,44), (40,71,41,116), (43,62,44,73), (43,103,41,44), (22,46,47,95), (46,80,47,118), (49,77,50,92), (49,115,50,98), (52,124,53,104), (52,128,37,53), (55,103,56,113), (55,119,56,64), (58,89,59,76), (58,127,59,67), (40,61,29,62), (61,128,43,62), (56,64,7,65), (64,100,65,85), (1,67,68,109), (59,67,68,131), (70,80,5,71), (70,122,40,71), (44,73,74,119), (73,121,74,131), (59,76,49,77), (76,94,77,79), (13,79,70,80), (77,79,46,80), (82,97,83,127), (82,110,83,91), (14,85,86,122), (65,85,86,92), (4,88,58,89), (38,88,26,89), (2,91,50,92), (83,91,86,92), (25,94,47,95), (76,94,95,109), (25,97,50,98), (82,97,98,107), (64,100,101,125), (100,130,101,118), (43,103,26,104), (55,103,53,104), (16,106,98,107), (106,121,107,112), (68,109,23,110), (95,109,82,110), (28,112,11,113), (107,112,56,113), (17,115,10,116), (49,115,41,116), (47,118,74,119), (101,118,55,119), (73,121,86,122), (106,121,70,122), (19,124,8,125), (52,124,101,125), (58,127,61,128), (83,127,52,128), (33,130,68,131), (100,130,74,131)]
      ∀ t ∈ pairs, ∀ e e' : G.edgeSet, ∀ u w u' w' : Fin (132 * k),
        e.1 = s(u, w) → e'.1 = s(u', w') → u.val = 132 * j + t.1 → w.val = 132 * j + t.2.1 →
        u'.val = 132 * j + t.2.2.1 → w'.val = 132 * j + t.2.2.2 → qb (.inl e) = qb (.inl e'))) :
    (let pairs : List (ℕ × ℕ × ℕ × ℕ) := [(1,6,2,10), (1,67,2,91), (4,29,5,23), (4,88,5,71), (7,21,8,30), (7,65,8,125), (2,10,11,13), (10,116,11,113), (11,13,14,16), (13,79,14,85), (14,16,17,18), (16,106,17,115), (19,28,20,22), (19,124,20,38), (20,22,5,23), (22,46,23,110), (25,94,26,104), (25,97,26,89), (19,28,4,29), (28,112,29,62), (3,31,32,35), (9,31,24,32), (0,34,32,35), (27,34,15,35), (12,37,38,88), (37,53,20,38), (40,61,41,44), (40,71,41,116), (43,62,44,73), (43,103,41,44), (22,46,47,95), (46,80,47,118), (49,77,50,92), (49,115,50,98), (52,124,53,104), (52,128,37,53), (55,103,56,113), (55,119,56,64), (58,89,59,76), (58,127,59,67), (40,61,29,62), (61,128,43,62), (56,64,7,65), (64,100,65,85), (1,67,68,109), (59,67,68,131), (70,80,5,71), (70,122,40,71), (44,73,74,119), (73,121,74,131), (59,76,49,77), (76,94,77,79), (13,79,70,80), (77,79,46,80), (82,97,83,127), (82,110,83,91), (14,85,86,122), (65,85,86,92), (4,88,58,89), (38,88,26,89), (2,91,50,92), (83,91,86,92), (25,94,47,95), (76,94,95,109), (25,97,50,98), (82,97,98,107), (64,100,101,125), (100,130,101,118), (43,103,26,104), (55,103,53,104), (16,106,98,107), (106,121,107,112), (68,109,23,110), (95,109,82,110), (28,112,11,113), (107,112,56,113), (17,115,10,116), (49,115,41,116), (47,118,74,119), (101,118,55,119), (73,121,86,122), (106,121,70,122), (19,124,8,125), (52,124,101,125), (58,127,61,128), (83,127,52,128), (33,130,68,131), (100,130,74,131)]
      ∀ t ∈ pairs, ∀ e e' : G.edgeSet, ∀ u w u' w' : Fin (132 * k),
        e.1 = s(u, w) → e'.1 = s(u', w') → u.val = 132 * j + t.1 → w.val = 132 * j + t.2.1 →
        u'.val = 132 * j + t.2.2.1 → w'.val = 132 * j + t.2.2.2 → q (.inl e) = q (.inl e')) := by
  have hA := in1267_ring_hA k G hG
  have hm : ∀ v : Fin (132 * k), v.val % 132 < 132 := fun v => Nat.mod_lt _ (by norm_num)
  have hstar : ∀ a b : Fin (132 * k), a ≠ b → a.val / 3 = b.val / 3 →
      (a.val % 3 = 0 ∨ b.val % 3 = 0) → G.Adj a b := by
    intro a b hab h3 h0
    have hab' : a.val ≠ b.val := fun h => hab (Fin.ext h)
    rw [hA]
    refine Or.inl ⟨by omega, ?_, by omega, by omega⟩
    exact in1267_blk_fwd _ (hm a) _ (hm b) ⟨by omega, by omega, by omega⟩
  dsimp only at hpb ⊢
  intro t ht e e' u w u' w' he he' hu hw hu' hw'
  have hq := hpb t ht e e' u w u' w' he he' hu hw hu' hw'
  have hor := in1267_pairs_orient t ht
  simp only [Bool.or_eq_true] at hor
  have he2 : e.1 = s(w, u) := by rw [he, Sym2.eq_swap]
  have he2' : e'.1 = s(w', u') := by rw [he', Sym2.eq_swap]
  rcases hor with ((h | h) | h) | h
  · exact in1267_keep_one hR hstar hkeep hj hfree h he he' hu hw hu' hw' hq
  · exact in1267_keep_one hR hstar hkeep hj hfree h he2 he' hw hu hu' hw' hq
  · exact in1267_keep_one hR hstar hkeep hj hfree h he he2' hu hw hw' hu' hq
  · exact in1267_keep_one hR hstar hkeep hj hfree h he2 he2' hw hu hw' hu' hq
See it in the graphDiscuss this resultChallenge it