AFTD Auto-Formalizing Theoretical Domains

op874_disjoint_matching_palettes_force_bad_same_bit_edge

theoremverified

For the displayed factor interfaces, two disjoint matching palettes force equal external color triples on a same-bit factor edge, contradicting local exposed-pair compatibility.

Statement

theorem op874_disjoint_matching_palettes_force_bad_same_bit_edge
    (w : Fin 8 → Fin 4)
    (h27 : Function.Injective ![w 1,w 2,w 6,w 7])
    (h60 : Function.Injective ![w 5,w 6,w 7,w 0])
    (hp : w 0 ≠ w 1)
    (x y u v : Fin 6)
    (hx : x ≠ 4 ∧ x ≠ Fin.castAdd 2 (w 0) ∧ x ≠ Fin.castAdd 2 (w 1))
    (hy : y ≠ 4 ∧ y ≠ Fin.castAdd 2 (w 0) ∧ y ≠ Fin.castAdd 2 (w 1))
    (hu : u ≠ 4 ∧ u ≠ Fin.castAdd 2 (w 2) ∧ u ≠ Fin.castAdd 2 (w 1))
    (hv : v ≠ 4 ∧ v ≠ Fin.castAdd 2 (w 2) ∧ v ≠ Fin.castAdd 2 (w 1))
    (hxy : x ≠ y) (huv : u ≠ v)
    (hdis : x ≠ u ∧ x ≠ v ∧ y ≠ u ∧ y ≠ v) : False
Source
Disjoint matching-palette obstruction for OP-874; https://arxiv.org/abs/2610.41950.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
Used by 1

The proof, explained

The proof derives a contradiction by showing that two disjoint matching palettes force an impossible overlap among the exposed interface colors. First, the injectivity of the factor interface coloring implies that w 1, w 2, w 6, w 7 exhaust all four colors of Fin 4; since w 0 differs from w 1, w 6, and w 7, it is forced to equal w 2. Substituting w 2 = w 0, the two disjoint exposed color pairs {x, y} and {u, v} must both be drawn from the complement of the same three-element external triple in Fin 6. But a three-element set cannot contain two disjoint two-element subsets, so the exposed pairs must share a color, contradicting their assumed disjointness.

  1. The factor interface colors w 1, w 2, w 6, and w 7 are pairwise distinct.

    The sequence ⟨w 1, w 2, w 6, w 7⟩ is injective (hypothesis h27). For each of the six index pairs, assuming the corresponding colors are equal implies an equality between distinct numerals in Fin 4 via injectivity, which is directly refuted by finite computation (decide). This establishes w 1 ≠ w 2, w 1 ≠ w 6, w 1 ≠ w 7, w 2 ≠ w 6, w 2 ≠ w 7, and w 6 ≠ w 7.

    lines 13–36

      have h12 : w 1 ≠ w 2 := by
        intro h
        have hh : (0 : Fin 4) = 1 := h27 (by simpa using h)
        exact (by decide : (0 : Fin 4) ≠ 1) hh
      have h16 : w 1 ≠ w 6 := by
        intro h
        have hh : (0 : Fin 4) = 2 := h27 (by simpa using h)
        exact (by decide : (0 : Fin 4) ≠ 2) hh
      have h17 : w 1 ≠ w 7 := by
        intro h
        have hh : (0 : Fin 4) = 3 := h27 (by simpa using h)
        exact (by decide : (0 : Fin 4) ≠ 3) hh
      have h26 : w 2 ≠ w 6 := by
        intro h
        have hh : (1 : Fin 4) = 2 := h27 (by simpa using h)
        exact (by decide : (1 : Fin 4) ≠ 2) hh
      have h27' : w 2 ≠ w 7 := by
        intro h
        have hh : (1 : Fin 4) = 3 := h27 (by simpa using h)
        exact (by decide : (1 : Fin 4) ≠ 3) hh
      have h67 : w 6 ≠ w 7 := by
        intro h
        have hh : (2 : Fin 4) = 3 := h27 (by simpa using h)
        exact (by decide : (2 : Fin 4) ≠ 3) hh
  2. The color w 0 is distinct from w 6 and w 7.

    Similarly, the sequence ⟨w 5, w 6, w 7, w 0⟩ is injective (hypothesis h60). If w 0 = w 6, injectivity would force index 3 to equal index 1 in Fin 4; if w 0 = w 7, injectivity would force index 3 to equal index 2. Both equalities are refuted by decide, yielding w 0 ≠ w 6 and w 0 ≠ w 7.

    lines 37–44

      have h06 : w 0 ≠ w 6 := by
        intro h
        have hh : (3 : Fin 4) = 1 := h60 (by simpa using h)
        exact (by decide : (3 : Fin 4) ≠ 1) hh
      have h07 : w 0 ≠ w 7 := by
        intro h
        have hh : (3 : Fin 4) = 2 := h60 (by simpa using h)
        exact (by decide : (3 : Fin 4) ≠ 2) hh
  3. w 0 = w 2.

    Since Fin 4 has four elements and w 1, w 2, w 6, w 7 are pairwise distinct, they exhaust all four colors. The color w 0 is distinct from w 1 (by hp), from w 6 (h06), and from w 7 (h07). By op874_contraction_forces_equal_factor_palette, w 0 must equal the unique remaining color, w 2.

    lines 45–47

    uses op874_contraction_forces_equal_factor_palette

      have heq : w 0 = w 2 :=
        op874_contraction_forces_equal_factor_palette (w 1) (w 2) (w 6) (w 7) (w 0)
          h12 h16 h17 h26 h27' h67 hp h06 h07
  4. The three external colors 4, Fin.castAdd 2 (w 0), and Fin.castAdd 2 (w 1) in Fin 6 are pairwise distinct.

    For any element c in Fin 4, its value is strictly less than 4, while Fin.castAdd 2 c preserves that value in Fin 6 via Fin.val_castAdd. Assuming 4 equals Fin.castAdd 2 (w 0) or Fin.castAdd 2 (w 1) would equate 4 to a value strictly less than 4, which is refuted by linear arithmetic (omega). Furthermore, if Fin.castAdd 2 (w 0) = Fin.castAdd 2 (w 1), applying congrArg Fin.val and Fin.ext would imply w 0 = w 1, contradicting hp.

    lines 48–64

    uses congrArg, Fin.val, Fin.val_castAdd, Fin.ext

      have hlow0 : (4 : Fin 6) ≠ Fin.castAdd 2 (w 0) := by
        intro h
        have hv := congrArg Fin.val h
        have hw := (w 0).isLt
        simp only [Fin.val_castAdd] at hv
        omega
      have hlow1 : (4 : Fin 6) ≠ Fin.castAdd 2 (w 1) := by
        intro h
        have hv := congrArg Fin.val h
        have hw := (w 1).isLt
        simp only [Fin.val_castAdd] at hv
        omega
      have hhigh : Fin.castAdd 2 (w 0) ≠ Fin.castAdd 2 (w 1) := by
        intro h
        apply hp
        apply Fin.ext
        simpa only [Fin.val_castAdd] using congrArg Fin.val h
  5. Contradiction: the exposed pairs {x, y} and {u, v} must share a color, contradicting their disjointness.

    Rewriting w 2 to w 0 in hu and hv using the equality heq (w 0 = w 2), both exposed pairs {x, y} and {u, v} consist of distinct elements of Fin 6 avoiding the exact same three pairwise distinct external colors {4, Fin.castAdd 2 (w 0), Fin.castAdd 2 (w 1)}. In Fin 6, removing three colors leaves only three available. By equal_external_triple_forces_shared_exposed_color (the pigeonhole principle for 2-element subsets of a 3-element set), the pairs must overlap: x = u, x = v, y = u, or y = v. Each case directly contradicts one conjunct of the disjointness hypothesis hdis.

    lines 65–72

    uses equal_external_triple_forces_shared_exposed_color

      rw [← heq] at hu hv
      rcases equal_external_triple_forces_shared_exposed_color 4
          (Fin.castAdd 2 (w 0)) (Fin.castAdd 2 (w 1)) x y u v
          hlow0 hlow1 hhigh hx hy hu hv hxy huv with h | h | h | h
      · exact hdis.1 h
      · exact hdis.2.1 h
      · exact hdis.2.2.1 h
      · exact hdis.2.2.2 h
Fin.val_castAdd
Embedding an element i : Fin n into Fin (n + m) preserves its underlying natural number value: (Fin.castAdd m i).val = i.val.
Fin.ext
Two elements of Fin n are equal if and only if their underlying natural number values are equal.
congrArg
Functions respect equality: if a₁ = a₂, then f a₁ = f a₂.
Fin.val
Projects an element of Fin n to its underlying natural number in ℕ.
op874_contraction_forces_equal_factor_palette
If four elements a, b, c, d in Fin 4 are pairwise distinct, and e is distinct from a, c, and d, then e must equal b.
equal_external_triple_forces_shared_exposed_color
If two disjoint pairs of distinct elements {x, y} and {u, v} in Fin 6 both avoid the same three pairwise distinct elements, this is impossible: the two pairs must share at least one element (x = u, x = v, y = u, or y = v).

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_disjoint_matching_palettes_force_bad_same_bit_edge    (w : Fin 8 → Fin 4)    (h27 : Function.Injective ![w 1,w 2,w 6,w 7])    (h60 : Function.Injective ![w 5,w 6,w 7,w 0])    (hp : w 0 ≠ w 1)    (x y u v : Fin 6)    (hx : x ≠ 4 ∧ x ≠ Fin.castAdd 2 (w 0) ∧ x ≠ Fin.castAdd 2 (w 1))    (hy : y ≠ 4 ∧ y ≠ Fin.castAdd 2 (w 0) ∧ y ≠ Fin.castAdd 2 (w 1))    (hu : u ≠ 4 ∧ u ≠ Fin.castAdd 2 (w 2) ∧ u ≠ Fin.castAdd 2 (w 1))    (hv : v ≠ 4 ∧ v ≠ Fin.castAdd 2 (w 2) ∧ v ≠ Fin.castAdd 2 (w 1))    (hxy : x ≠ y) (huv : u ≠ v)    (hdis : x ≠ u ∧ x ≠ v ∧ y ≠ u ∧ y ≠ v) : False := by  have h12 : w 1 ≠ w 2 := by    intro h    have hh : (0 : Fin 4) = 1 := h27 (by simpa using h)    exact (by decide : (0 : Fin 4) ≠ 1) hh  have h16 : w 1 ≠ w 6 := by    intro h    have hh : (0 : Fin 4) = 2 := h27 (by simpa using h)    exact (by decide : (0 : Fin 4) ≠ 2) hh  have h17 : w 1 ≠ w 7 := by    intro h    have hh : (0 : Fin 4) = 3 := h27 (by simpa using h)    exact (by decide : (0 : Fin 4) ≠ 3) hh  have h26 : w 2 ≠ w 6 := by    intro h    have hh : (1 : Fin 4) = 2 := h27 (by simpa using h)    exact (by decide : (1 : Fin 4) ≠ 2) hh  have h27' : w 2 ≠ w 7 := by    intro h    have hh : (1 : Fin 4) = 3 := h27 (by simpa using h)    exact (by decide : (1 : Fin 4) ≠ 3) hh  have h67 : w 6 ≠ w 7 := by    intro h    have hh : (2 : Fin 4) = 3 := h27 (by simpa using h)    exact (by decide : (2 : Fin 4) ≠ 3) hh  have h06 : w 0 ≠ w 6 := by    intro h    have hh : (3 : Fin 4) = 1 := h60 (by simpa using h)    exact (by decide : (3 : Fin 4) ≠ 1) hh  have h07 : w 0 ≠ w 7 := by    intro h    have hh : (3 : Fin 4) = 2 := h60 (by simpa using h)    exact (by decide : (3 : Fin 4) ≠ 2) hh  have heq : w 0 = w 2 :=    op874_contraction_forces_equal_factor_palette (w 1) (w 2) (w 6) (w 7) (w 0)      h12 h16 h17 h26 h27' h67 hp h06 h07  have hlow0 : (4 : Fin 6) ≠ Fin.castAdd 2 (w 0) := by    intro h    have hv := congrArg Fin.val h    have hw := (w 0).isLt    simp only [Fin.val_castAdd] at hv    omega  have hlow1 : (4 : Fin 6) ≠ Fin.castAdd 2 (w 1) := by    intro h    have hv := congrArg Fin.val h    have hw := (w 1).isLt    simp only [Fin.val_castAdd] at hv    omega  have hhigh : Fin.castAdd 2 (w 0) ≠ Fin.castAdd 2 (w 1) := by    intro h    apply hp    apply Fin.ext    simpa only [Fin.val_castAdd] using congrArg Fin.val h  rw [← heq] at hu hv  rcases equal_external_triple_forces_shared_exposed_color 4      (Fin.castAdd 2 (w 0)) (Fin.castAdd 2 (w 1)) x y u v      hlow0 hlow1 hhigh hx hy hu hv hxy huv with h | h | h | h  · exact hdis.1 h  · exact hdis.2.1 h  · exact hdis.2.2.1 h  · exact hdis.2.2.2 h
See it in the graphDiscuss this resultChallenge it