AFTD Auto-Formalizing Theoretical Domains

op874_tight_minority_disjoint_three_interface_obstruction

theoremverified

On the displayed six-cycle, requiring disjoint high palettes at the specified minority matching edge is incompatible with only the two indicated majority factor interfaces and one majority matching interface. Exact ownership, windows and the rest of the graph are not assumed.

Statement

theorem op874_tight_minority_disjoint_three_interface_obstruction :
    let bit : Fin 6 → Bool := ![false,true,true,true,false,true]
    ¬ ∃ (w : Fin 6 → Fin 4) (h : Fin 6 → Fin 3 → Fin 6),
      (∀ i, w (i-1) ≠ w i) ∧
      Function.Injective ![w 5,w 0,w 3,w 4] ∧
      (∀ i, Function.Injective (h i)) ∧
      (∀ i p, h i p ≠ (if bit i then 5 else 4) ∧
        h i p ≠ Fin.castAdd 2 (w (i-1)) ∧ h i p ≠ Fin.castAdd 2 (w i)) ∧
      (∀ i : Fin 6, (i = 1 ∨ i = 2) →
        h i 0 ≠ h (i+1) 1 ∧ h i 0 ≠ h (i+1) 2 ∧
        h i 2 ≠ h (i+1) 1 ∧ h i 2 ≠ h (i+1) 2) ∧
      h 2 0 ≠ h 5 0 ∧ h 2 0 ≠ h 5 1 ∧
      h 2 1 ≠ h 5 0 ∧ h 2 1 ≠ h 5 1
Source
Tight-cut minority-palette obstruction for OP-874; https://arxiv.org/abs/2610.41950.
Verified
27 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2

The proof, explained

We argue by contradiction. Suppose there exist a proper 4-coloring w of the 6-cycle and 3-color exposed palettes h satisfying the forbidden-color constraints, the two factor interfaces at edges (1, 2) and (2, 3), and the matching interface between vertices 2 and 5. If w 2 = w 0 or w 1 = w 3, adjacent vertices along a factor interface would share identical forbidden triples of colors, forcing their exposed palettes to overlap and contradicting factor interface disjointness. With w 1, w 2 separated from {w 0, w 3}, the exhaustion of Fin 4 forces {w 1, w 2} = {w 5, w 4}, making the forbidden triple at vertex 2 identical to that at vertex 5. By the pigeonhole principle on the remaining colors in Fin 6, the exposed palettes at vertices 2 and 5 must share a color, contradicting the matching interface disjointness between 2 and 5.

  1. The color 5 in Fin 6 cannot be in the image of Fin.castAdd 2 from Fin 4.

    Suppose for contradiction that 5 = Fin.castAdd 2 c for some c in Fin 4. Taking the underlying natural numbers, the value of Fin.castAdd 2 c equals the value of c, which is strictly less than 4 because c is in Fin 4. This yields 5 = c < 4, a contradiction by linear arithmetic.

    lines 2–6

    uses congrArg, Fin.val_castAdd

      intro h
      have hv := congrArg Fin.val h
      have hw := c.isLt
      simp only [Fin.val_castAdd] at hv
      omega
  2. The embedding Fin.castAdd 2 from Fin 4 to Fin 6 is injective.

    Given Fin.castAdd 2 c = Fin.castAdd 2 d, applying Fin.ext reduces equality c = d in Fin 4 to equality of their underlying natural numbers. Projecting with Fin.val and rewriting with Fin.val_castAdd shows their natural values are indeed equal.

    lines 9–11

    uses Fin.ext, congrArg, Fin.val_castAdd

      apply Fin.ext
      have hv := congrArg Fin.val h
      simpa only [Fin.val_castAdd] using hv
  3. Any element of Fin 4 distinct from the two middle elements of an injective 4-tuple equals the first or the fourth element.

    Since the domain and codomain both have cardinality 4, an injective map from Fin 4 to Fin 4 is bijective by Fintype.bijective_iff_injective_and_card, and in particular surjective. Therefore any x in Fin 4 appears in the 4-tuple ![a, c, d, b]. Exhausting the index cases with fin_cases, the two middle cases x = c and x = d contradict the hypotheses, leaving x = a or x = b.

    lines 16–23

    uses Fintype.bijective_iff_injective_and_card

      have hsurj : Function.Surjective ![a, c, d, b] :=
        (Fintype.bijective_iff_injective_and_card ![a, c, d, b]).mpr ⟨hinj, rfl⟩ |>.2
      obtain ⟨i, hi⟩ := hsurj x
      fin_cases i
      · left; rw [← hi]; rfl
      · exfalso; apply hxc; rw [← hi]; rfl
      · exfalso; apply hxd; rw [← hi]; rfl
      · right; rw [← hi]; rfl
  4. Assume for contradiction that a valid cycle coloring w and palette assignment h exist, and evaluate the index shifts and bits.

    Assume a counterexample exists with cycle coloring w and palettes h satisfying all hypotheses: proper cycle coloring, distinct colors at vertices {5, 0, 3, 4}, injective exposed palettes, forbidden colors determined by bit i and incident edge colors, disjoint factor interfaces at edges (1, 2) and (2, 3), and a disjoint matching interface between vertices 2 and 5. Concrete evaluations in Fin 6 confirm that 1 - 1 = 0, 2 - 1 = 1, 3 - 1 = 2, 5 - 1 = 4, 1 + 1 = 2, and 2 + 1 = 3, while bit(1), bit(2), bit(3), and bit(5) all evaluate to true (so the forbidden low color is 5 at each of these vertices).

    lines 38–49

      intro bit hex
      obtain ⟨w, h, hproper, hmatch, hinj, hforbid, hinterface, hmatching⟩ := hex
      have hm1 : (1 : Fin 6) - 1 = 0 := by decide
      have hm2 : (2 : Fin 6) - 1 = 1 := by decide
      have hm3 : (3 : Fin 6) - 1 = 2 := by decide
      have hm5 : (5 : Fin 6) - 1 = 4 := by decide
      have hp1 : (1 : Fin 6) + 1 = 2 := by decide
      have hp2 : (2 : Fin 6) + 1 = 3 := by decide
      have hbit1 : bit 1 = true := rfl
      have hbit2 : bit 2 = true := rfl
      have hbit3 : bit 3 = true := rfl
      have hbit5 : bit 5 = true := rfl
  5. Adjacent cycle vertices receive distinct colors: w 1 ≠ w 0, w 1 ≠ w 2, and w 2 ≠ w 3.

    The hypothesis that w is a proper cycle coloring states that w(i - 1) ≠ w(i) for all i. Evaluating this at i = 1, 2, 3 immediately gives w 0 ≠ w 1, w 1 ≠ w 2, and w 2 ≠ w 3.

    lines 50–59

      have hxc : w 1 ≠ w 0 := by
        have := hproper 1
        rw [hm1] at this
        exact this.symm
      have hxy : w 1 ≠ w 2 := by
        have := hproper 2
        rwa [hm2] at this
      have hyd : w 2 ≠ w 3 := by
        have := hproper 3
        rwa [hm3] at this
  6. The colors at vertices 2 and 0 are distinct: w 2 ≠ w 0.

    Suppose w 2 = w 0. At vertex 1, the forbidden colors are 5 and the incident edge colors w 0, w 1. At vertex 2, the forbidden colors are 5 and the incident edge colors w 1, w 2 = w 0. Thus vertices 1 and 2 share the exact same forbidden triple {5, w 0, w 1}. By equal_external_triple_forces_shared_exposed_color, the exposed color pairs {h(1, 0), h(1, 2)} and {h(2, 1), h(2, 2)} must share an element. But the factor interface condition at edge (1, 2) asserts that these two pairs are disjoint. This contradiction establishes w 2 ≠ w 0.

    lines 60–89

    uses ite_true, op874_tight_minority_disjoint_three_interface_obstruction_castAdd_inj, equal_external_triple_forces_shared_exposed_color, op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five

      have hyc : w 2 ≠ w 0 := by
        intro hyc_eq
        have h1forbid (p : Fin 3) : h 1 p ≠ 5 ∧ h 1 p ≠ Fin.castAdd 2 (w 0) ∧ h 1 p ≠ Fin.castAdd 2 (w 1) := by
          have hp := hforbid 1 p
          rw [hbit1] at hp
          simp only [ite_true] at hp
          rw [hm1] at hp
          exact hp
        have h2forbid (p : Fin 3) : h 2 p ≠ 5 ∧ h 2 p ≠ Fin.castAdd 2 (w 0) ∧ h 2 p ≠ Fin.castAdd 2 (w 1) := by
          have hp := hforbid 2 p
          rw [hbit2] at hp
          simp only [ite_true] at hp
          rw [hm2] at hp
          rw [hyc_eq] at hp
          exact ⟨hp.1, hp.2.2, hp.2.1⟩
        have hint1 := hinterface 1 (Or.inl rfl)
        rw [hp1] at hint1
        have h1pair : h 1 0 ≠ h 1 2 := fun e => (by decide : (0 : Fin 3) ≠ 2) (hinj 1 e)
        have h2pair : h 2 1 ≠ h 2 2 := fun e => (by decide : (1 : Fin 3) ≠ 2) (hinj 2 e)
        have hab : Fin.castAdd 2 (w 0) ≠ Fin.castAdd 2 (w 1) := fun e => hxc (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_inj e).symm
        have hmatch1 := equal_external_triple_forces_shared_exposed_color 5
          (Fin.castAdd 2 (w 0)) (Fin.castAdd 2 (w 1)) (h 1 0) (h 1 2) (h 2 1) (h 2 2)
          (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five _)
          (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five _) hab
          (h1forbid 0) (h1forbid 2) (h2forbid 1) (h2forbid 2) h1pair h2pair
        rcases hmatch1 with hm | hm | hm | hm
        · exact hint1.1 hm
        · exact hint1.2.1 hm
        · exact hint1.2.2.1 hm
        · exact hint1.2.2.2 hm
  7. The colors at vertices 1 and 3 are distinct: w 1 ≠ w 3.

    Suppose w 1 = w 3. At vertex 2, the forbidden colors are 5 and the incident edge colors w 1 = w 3, w 2. At vertex 3, the forbidden colors are 5 and w 2, w 3. Thus vertices 2 and 3 share the same forbidden triple {5, w 3, w 2}. By equal_external_triple_forces_shared_exposed_color, the exposed pairs {h(2, 0), h(2, 2)} and {h(3, 1), h(3, 2)} must share an element. But the factor interface condition at edge (2, 3) requires them to be disjoint, giving a contradiction. Hence w 1 ≠ w 3.

    lines 90–119

    uses ite_true, op874_tight_minority_disjoint_three_interface_obstruction_castAdd_inj, equal_external_triple_forces_shared_exposed_color, op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five

      have hxd : w 1 ≠ w 3 := by
        intro hxd_eq
        have h2forbid (p : Fin 3) : h 2 p ≠ 5 ∧ h 2 p ≠ Fin.castAdd 2 (w 3) ∧ h 2 p ≠ Fin.castAdd 2 (w 2) := by
          have hp := hforbid 2 p
          rw [hbit2] at hp
          simp only [ite_true] at hp
          rw [hm2] at hp
          rw [hxd_eq] at hp
          exact hp
        have h3forbid (p : Fin 3) : h 3 p ≠ 5 ∧ h 3 p ≠ Fin.castAdd 2 (w 3) ∧ h 3 p ≠ Fin.castAdd 2 (w 2) := by
          have hp := hforbid 3 p
          rw [hbit3] at hp
          simp only [ite_true] at hp
          rw [hm3] at hp
          exact ⟨hp.1, hp.2.2, hp.2.1⟩
        have hint2 := hinterface 2 (Or.inr rfl)
        rw [hp2] at hint2
        have h2pair : h 2 0 ≠ h 2 2 := fun e => (by decide : (0 : Fin 3) ≠ 2) (hinj 2 e)
        have h3pair : h 3 1 ≠ h 3 2 := fun e => (by decide : (1 : Fin 3) ≠ 2) (hinj 3 e)
        have hab : Fin.castAdd 2 (w 3) ≠ Fin.castAdd 2 (w 2) := fun e => hyd (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_inj e).symm
        have hmatch2 := equal_external_triple_forces_shared_exposed_color 5
          (Fin.castAdd 2 (w 3)) (Fin.castAdd 2 (w 2)) (h 2 0) (h 2 2) (h 3 1) (h 3 2)
          (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five _)
          (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five _) hab
          (h2forbid 0) (h2forbid 2) (h3forbid 1) (h3forbid 2) h2pair h3pair
        rcases hmatch2 with hm | hm | hm | hm
        · exact hint2.1 hm
        · exact hint2.2.1 hm
        · exact hint2.2.2.1 hm
        · exact hint2.2.2.2 hm
  8. Both w 1 and w 2 belong to the two-element set {w 5, w 4}.

    The tuple ![w 5, w 4, w 0, w 3] is injective and therefore enumerates all four colors of Fin 4. Applying op874_tight_minority_disjoint_three_interface_obstruction_exhaust_four with w 1 ≠ w 0 and w 1 ≠ w 3 forces w 1 = w 5 or w 1 = w 4. Applying the same lemma with w 2 ≠ w 0 and w 2 ≠ w 3 forces w 2 = w 5 or w 2 = w 4.

    lines 120–121

    uses op874_tight_minority_disjoint_three_interface_obstruction_exhaust_four

      have hx_cases := op874_tight_minority_disjoint_three_interface_obstruction_exhaust_four (w 5) (w 4) (w 0) (w 3) (w 1) hmatch hxc hxd
      have hy_cases := op874_tight_minority_disjoint_three_interface_obstruction_exhaust_four (w 5) (w 4) (w 0) (w 3) (w 2) hmatch hyc hyd
  9. The colors w 5 and w 4 have distinct casts in Fin 6.

    If Fin.castAdd 2 (w 5) = Fin.castAdd 2 (w 4), then injectivity of Fin.castAdd 2 would imply w 5 = w 4. But w 5 and w 4 are the 0th and 3rd components of the injective tuple ![w 5, w 0, w 3, w 4], so w 5 = w 4 would force 0 = 3 in Fin 4, which is false.

    lines 122–126

    uses op874_tight_minority_disjoint_three_interface_obstruction_castAdd_inj

      have hab5 : Fin.castAdd 2 (w 5) ≠ Fin.castAdd 2 (w 4) := by
        intro e
        have eq := op874_tight_minority_disjoint_three_interface_obstruction_castAdd_inj e
        have h03 : (0 : Fin 4) = 3 := hmatch (by simpa using eq)
        exact (by decide : (0 : Fin 4) ≠ 3) h03
  10. Vertices 2 and 5 share the same forbidden triple of colors {5, w 5, w 4}.

    At vertex 5, bit(5) = true forbids 5, and the incident edges are w(5 - 1) = w 4 and w 5, so the forbidden triple is {5, w 5, w 4}. At vertex 2, bit(2) = true forbids 5, and the incident edges are w 1 and w 2. Since w 1, w 2 ∈ {w 5, w 4} but w 1 ≠ w 2, one must equal w 5 and the other w 4; case analysis eliminates the impossible branches w 1 = w 2, confirming that in both valid assignments the forbidden triple at vertex 2 is {5, w 5, w 4}.

    lines 127–144

    uses ite_true

      have h5forbid (p : Fin 3) : h 5 p ≠ 5 ∧ h 5 p ≠ Fin.castAdd 2 (w 5) ∧ h 5 p ≠ Fin.castAdd 2 (w 4) := by
        have hp := hforbid 5 p
        rw [hbit5] at hp
        simp only [ite_true] at hp
        rw [hm5] at hp
        exact ⟨hp.1, hp.2.2, hp.2.1⟩
      have h2forbid_5 (p : Fin 3) : h 2 p ≠ 5 ∧ h 2 p ≠ Fin.castAdd 2 (w 5) ∧ h 2 p ≠ Fin.castAdd 2 (w 4) := by
        have hp := hforbid 2 p
        rw [hbit2] at hp
        simp only [ite_true] at hp
        rw [hm2] at hp
        rcases hx_cases with hx5 | hx4 <;> rcases hy_cases with hy5 | hy4
        · exfalso; apply hxy; rw [hx5, hy5]
        · rw [hx5, hy4] at hp
          exact hp
        · rw [hx4, hy5] at hp
          exact ⟨hp.1, hp.2.2, hp.2.1⟩
        · exfalso; apply hxy; rw [hx4, hy4]
  11. The exposed palettes at vertices 2 and 5 must overlap, contradicting the matching interface condition.

    Because vertices 2 and 5 share the same forbidden triple {5, w 5, w 4}, applying equal_external_triple_forces_shared_exposed_color to the exposed pairs {h(2, 0), h(2, 1)} and {h(5, 0), h(5, 1)} implies that they must share at least one color. However, the matching interface hypothesis explicitly asserts that all four pairings between an element of {h(2, 0), h(2, 1)} and an element of {h(5, 0), h(5, 1)} are unequal. This contradiction rules out the existence of the assumed coloring and palettes.

    lines 145–156

    uses equal_external_triple_forces_shared_exposed_color, op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five

      have h2pair : h 2 0 ≠ h 2 1 := fun e => (by decide : (0 : Fin 3) ≠ 1) (hinj 2 e)
      have h5pair : h 5 0 ≠ h 5 1 := fun e => (by decide : (0 : Fin 3) ≠ 1) (hinj 5 e)
      have hmatch_final := equal_external_triple_forces_shared_exposed_color 5
        (Fin.castAdd 2 (w 5)) (Fin.castAdd 2 (w 4)) (h 2 0) (h 2 1) (h 5 0) (h 5 1)
        (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five _)
        (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five _) hab5
        (h2forbid_5 0) (h2forbid_5 1) (h5forbid 0) (h5forbid 1) h2pair h5pair
      rcases hmatch_final with hm | hm | hm | hm
      · exact hmatching.1 hm
      · exact hmatching.2.1 hm
      · exact hmatching.2.2.1 hm
      · exact hmatching.2.2.2 hm
congrArg
Applying a function to equal inputs produces equal outputs.
Fin.val_castAdd
Embedding an element of Fin n into Fin (n + m) preserves its underlying natural number value.
Fin.ext
Two elements of Fin n are equal if their underlying natural numbers are equal.
Fintype.bijective_iff_injective_and_card
A function between finite types of the same cardinality is bijective if and only if it is injective.
ite_true
An if-then-else expression whose condition is True evaluates to the then branch.
op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five
The value 5 in Fin 6 is not in the image of Fin.castAdd 2 from Fin 4.
op874_tight_minority_disjoint_three_interface_obstruction_castAdd_inj
The embedding Fin.castAdd 2 from Fin 4 into Fin 6 is injective.
op874_tight_minority_disjoint_three_interface_obstruction_exhaust_four
If an injective 4-tuple lists all elements of Fin 4, any element distinct from the middle two entries must equal the first or the fourth entry.
equal_external_triple_forces_shared_exposed_color
In a 6-element set, any two disjoint pairs of elements that both avoid the same three distinct elements must share at least one element.

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 op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five (c : Fin 4) : (5 : Fin 6) ≠ Fin.castAdd 2 c := by  intro h  have hv := congrArg Fin.val h  have hw := c.isLt  simp only [Fin.val_castAdd] at hv  omegatheorem op874_tight_minority_disjoint_three_interface_obstruction_castAdd_inj {c d : Fin 4} (h : Fin.castAdd 2 c = Fin.castAdd 2 d) : c = d := by  apply Fin.ext  have hv := congrArg Fin.val h  simpa only [Fin.val_castAdd] using hvtheorem op874_tight_minority_disjoint_three_interface_obstruction_exhaust_four (a b c d x : Fin 4)    (hinj : Function.Injective ![a, c, d, b])    (hxc : x ≠ c) (hxd : x ≠ d) : x = a ∨ x = b := by  have hsurj : Function.Surjective ![a, c, d, b] :=    (Fintype.bijective_iff_injective_and_card ![a, c, d, b]).mpr ⟨hinj, rfl⟩ |>.2  obtain ⟨i, hi⟩ := hsurj x  fin_cases i  · left; rw [← hi]; rfl  · exfalso; apply hxc; rw [← hi]; rfl  · exfalso; apply hxd; rw [← hi]; rfl  · right; rw [← hi]; rfltheorem op874_tight_minority_disjoint_three_interface_obstruction :    let bit : Fin 6 → Bool := ![false,true,true,true,false,true]    ¬ ∃ (w : Fin 6 → Fin 4) (h : Fin 6 → Fin 3 → Fin 6),      (∀ i, w (i-1) ≠ w i) ∧      Function.Injective ![w 5,w 0,w 3,w 4] ∧      (∀ i, Function.Injective (h i)) ∧      (∀ i p, h i p ≠ (if bit i then 5 else 4) ∧        h i p ≠ Fin.castAdd 2 (w (i-1)) ∧ h i p ≠ Fin.castAdd 2 (w i)) ∧      (∀ i : Fin 6, (i = 1 ∨ i = 2) →        h i 0 ≠ h (i+1) 1 ∧ h i 0 ≠ h (i+1) 2 ∧        h i 2 ≠ h (i+1) 1 ∧ h i 2 ≠ h (i+1) 2) ∧      h 2 0 ≠ h 5 0 ∧ h 2 0 ≠ h 5 1 ∧      h 2 1 ≠ h 5 0 ∧ h 2 1 ≠ h 5 1 := by  intro bit hex  obtain ⟨w, h, hproper, hmatch, hinj, hforbid, hinterface, hmatching⟩ := hex  have hm1 : (1 : Fin 6) - 1 = 0 := by decide  have hm2 : (2 : Fin 6) - 1 = 1 := by decide  have hm3 : (3 : Fin 6) - 1 = 2 := by decide  have hm5 : (5 : Fin 6) - 1 = 4 := by decide  have hp1 : (1 : Fin 6) + 1 = 2 := by decide  have hp2 : (2 : Fin 6) + 1 = 3 := by decide  have hbit1 : bit 1 = true := rfl  have hbit2 : bit 2 = true := rfl  have hbit3 : bit 3 = true := rfl  have hbit5 : bit 5 = true := rfl  have hxc : w 1 ≠ w 0 := by    have := hproper 1    rw [hm1] at this    exact this.symm  have hxy : w 1 ≠ w 2 := by    have := hproper 2    rwa [hm2] at this  have hyd : w 2 ≠ w 3 := by    have := hproper 3    rwa [hm3] at this  have hyc : w 2 ≠ w 0 := by    intro hyc_eq    have h1forbid (p : Fin 3) : h 1 p ≠ 5 ∧ h 1 p ≠ Fin.castAdd 2 (w 0) ∧ h 1 p ≠ Fin.castAdd 2 (w 1) := by      have hp := hforbid 1 p      rw [hbit1] at hp      simp only [ite_true] at hp      rw [hm1] at hp      exact hp    have h2forbid (p : Fin 3) : h 2 p ≠ 5 ∧ h 2 p ≠ Fin.castAdd 2 (w 0) ∧ h 2 p ≠ Fin.castAdd 2 (w 1) := by      have hp := hforbid 2 p      rw [hbit2] at hp      simp only [ite_true] at hp      rw [hm2] at hp      rw [hyc_eq] at hp      exact ⟨hp.1, hp.2.2, hp.2.1⟩    have hint1 := hinterface 1 (Or.inl rfl)    rw [hp1] at hint1    have h1pair : h 1 0 ≠ h 1 2 := fun e => (by decide : (0 : Fin 3) ≠ 2) (hinj 1 e)    have h2pair : h 2 1 ≠ h 2 2 := fun e => (by decide : (1 : Fin 3) ≠ 2) (hinj 2 e)    have hab : Fin.castAdd 2 (w 0) ≠ Fin.castAdd 2 (w 1) := fun e => hxc (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_inj e).symm    have hmatch1 := equal_external_triple_forces_shared_exposed_color 5      (Fin.castAdd 2 (w 0)) (Fin.castAdd 2 (w 1)) (h 1 0) (h 1 2) (h 2 1) (h 2 2)      (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five _)      (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five _) hab      (h1forbid 0) (h1forbid 2) (h2forbid 1) (h2forbid 2) h1pair h2pair    rcases hmatch1 with hm | hm | hm | hm    · exact hint1.1 hm    · exact hint1.2.1 hm    · exact hint1.2.2.1 hm    · exact hint1.2.2.2 hm  have hxd : w 1 ≠ w 3 := by    intro hxd_eq    have h2forbid (p : Fin 3) : h 2 p ≠ 5 ∧ h 2 p ≠ Fin.castAdd 2 (w 3) ∧ h 2 p ≠ Fin.castAdd 2 (w 2) := by      have hp := hforbid 2 p      rw [hbit2] at hp      simp only [ite_true] at hp      rw [hm2] at hp      rw [hxd_eq] at hp      exact hp    have h3forbid (p : Fin 3) : h 3 p ≠ 5 ∧ h 3 p ≠ Fin.castAdd 2 (w 3) ∧ h 3 p ≠ Fin.castAdd 2 (w 2) := by      have hp := hforbid 3 p      rw [hbit3] at hp      simp only [ite_true] at hp      rw [hm3] at hp      exact ⟨hp.1, hp.2.2, hp.2.1⟩    have hint2 := hinterface 2 (Or.inr rfl)    rw [hp2] at hint2    have h2pair : h 2 0 ≠ h 2 2 := fun e => (by decide : (0 : Fin 3) ≠ 2) (hinj 2 e)    have h3pair : h 3 1 ≠ h 3 2 := fun e => (by decide : (1 : Fin 3) ≠ 2) (hinj 3 e)    have hab : Fin.castAdd 2 (w 3) ≠ Fin.castAdd 2 (w 2) := fun e => hyd (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_inj e).symm    have hmatch2 := equal_external_triple_forces_shared_exposed_color 5      (Fin.castAdd 2 (w 3)) (Fin.castAdd 2 (w 2)) (h 2 0) (h 2 2) (h 3 1) (h 3 2)      (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five _)      (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five _) hab      (h2forbid 0) (h2forbid 2) (h3forbid 1) (h3forbid 2) h2pair h3pair    rcases hmatch2 with hm | hm | hm | hm    · exact hint2.1 hm    · exact hint2.2.1 hm    · exact hint2.2.2.1 hm    · exact hint2.2.2.2 hm  have hx_cases := op874_tight_minority_disjoint_three_interface_obstruction_exhaust_four (w 5) (w 4) (w 0) (w 3) (w 1) hmatch hxc hxd  have hy_cases := op874_tight_minority_disjoint_three_interface_obstruction_exhaust_four (w 5) (w 4) (w 0) (w 3) (w 2) hmatch hyc hyd  have hab5 : Fin.castAdd 2 (w 5) ≠ Fin.castAdd 2 (w 4) := by    intro e    have eq := op874_tight_minority_disjoint_three_interface_obstruction_castAdd_inj e    have h03 : (0 : Fin 4) = 3 := hmatch (by simpa using eq)    exact (by decide : (0 : Fin 4) ≠ 3) h03  have h5forbid (p : Fin 3) : h 5 p ≠ 5 ∧ h 5 p ≠ Fin.castAdd 2 (w 5) ∧ h 5 p ≠ Fin.castAdd 2 (w 4) := by    have hp := hforbid 5 p    rw [hbit5] at hp    simp only [ite_true] at hp    rw [hm5] at hp    exact ⟨hp.1, hp.2.2, hp.2.1⟩  have h2forbid_5 (p : Fin 3) : h 2 p ≠ 5 ∧ h 2 p ≠ Fin.castAdd 2 (w 5) ∧ h 2 p ≠ Fin.castAdd 2 (w 4) := by    have hp := hforbid 2 p    rw [hbit2] at hp    simp only [ite_true] at hp    rw [hm2] at hp    rcases hx_cases with hx5 | hx4 <;> rcases hy_cases with hy5 | hy4    · exfalso; apply hxy; rw [hx5, hy5]    · rw [hx5, hy4] at hp      exact hp    · rw [hx4, hy5] at hp      exact ⟨hp.1, hp.2.2, hp.2.1⟩    · exfalso; apply hxy; rw [hx4, hy4]  have h2pair : h 2 0 ≠ h 2 1 := fun e => (by decide : (0 : Fin 3) ≠ 1) (hinj 2 e)  have h5pair : h 5 0 ≠ h 5 1 := fun e => (by decide : (0 : Fin 3) ≠ 1) (hinj 5 e)  have hmatch_final := equal_external_triple_forces_shared_exposed_color 5    (Fin.castAdd 2 (w 5)) (Fin.castAdd 2 (w 4)) (h 2 0) (h 2 1) (h 5 0) (h 5 1)    (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five _)    (op874_tight_minority_disjoint_three_interface_obstruction_castAdd_ne_five _) hab5    (h2forbid_5 0) (h2forbid_5 1) (h5forbid 0) (h5forbid 1) h2pair h5pair  rcases hmatch_final with hm | hm | hm | hm  · exact hmatching.1 hm  · exact hmatching.2.1 hm  · exact hmatching.2.2.1 hm  · exact hmatching.2.2.2 hm
See it in the graphDiscuss this resultChallenge it