AFTD Auto-Formalizing Theoretical Domains

op874_six_cycle_five_interface_low_port_obstruction

theoremverified

On a six-cycle with bit word 011011 and a matching interface joining positions 1 and 5, the three indicated low-port selections already contradict compatibility on four cycle edges and that matching edge. All other interfaces, exact ownership and windows are irrelevant.

Statement

theorem op874_six_cycle_five_interface_low_port_obstruction :
    let b : Fin 6 → Bool := ![false,true,true,false,true,true]
    ¬ ∃ (w : Fin 6 → Fin 4) (h : Fin 6 → Fin 3 → Fin 6),
      (∀ i, w (i-1) ≠ w i) ∧
      (∀ i p q, p ≠ q → h i p ≠ h i q) ∧
      (∀ i p, h i p ≠ (if b 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 = 3 ∨ i = 4 ∨ i = 5) →
        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 1 0 ≠ h 5 0 ∧ h 1 0 ≠ h 5 1 ∧ h 1 1 ≠ h 5 0 ∧ h 1 1 ≠ h 5 1) ∧
      h 0 0 = 5 ∧ h 3 1 = 5 ∧ h 5 0 = 4
Source
Six-cycle open low-port kernel for OP-874; https://arxiv.org/abs/2610.41950.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3

The proof, explained

Assuming for contradiction that a valid core and port configuration exists on the 6-cycle, a hook lemma first forces specific port values at positions 1 and 5, proving that the core values w(0), w(1), w(4), and w(5) exhaust all four available colors. A second transition lemma then propagates these constraints across positions 3 and 4 to force w(2) = w(0). Consequently, positions 1 and 2 must both avoid the same three colors, leaving only three available colors for their two-port selections; by the pigeonhole principle, they must share a color, contradicting cycle compatibility on edge (1, 2).

  1. For any t in Fin 4, castAdd 2 t ≠ 5 automation

    Case analysis on t in Fin 4 shows by computation that none of the values 0, 1, 2, 3 equal 5.

    lines 1–2

    private theorem core_high_ne_five (t : Fin 4) : Fin.castAdd 2 t ≠ (5 : Fin 6) := by
      fin_cases t <;> decide
  2. The embedding castAdd 2 from Fin 4 to Fin 6 is injective

    Assuming castAdd 2 s = castAdd 2 t, we extract the underlying natural numbers, which are equal, and by extensionality of Fin conclude s = t, contradicting s ≠ t.

    lines 4–9

    uses Fin.ext, Fin.val_castAdd, congrArg

    private theorem core_high_inj {s t : Fin 4} (h : s ≠ t) :
        Fin.castAdd 2 s ≠ Fin.castAdd 2 t := by
      intro hh
      apply h
      apply Fin.ext
      simpa only [Fin.val_castAdd] using congrArg Fin.val hh
  3. A vector of four pairwise distinct elements of Fin 4 is an injective function automation

    Exhaustive case analysis on indices i, j in Fin 4 resolves equal indices trivially and unequal indices by the pairwise inequality hypotheses.

    lines 12–17

    uses Fin.reduceEq

    private theorem core_four_vec_inj (a b c d : Fin 4)
        (hab : a ≠ b) (hac : a ≠ c) (had : a ≠ d)
        (hbc : b ≠ c) (hbd : b ≠ d) (hcd : c ≠ d) :
        Function.Injective ![a,b,c,d] := by
      intro i j he
      fin_cases i <;> fin_cases j <;> simp only [Fin.reduceEq] at he ⊢ <;> aesop
  4. Assume for contradiction that a valid configuration exists, unpack all hypotheses, and establish that each port map h(i) is injective and port 5 cycle compatibility holds

    We assume a counterexample w, h and unpack the hypotheses. The injectivity of each h(i) follows directly from pairwise distinctness of ports. We specialize the avoidance condition and cycle compatibility at position 5.

    lines 31–43

    uses Or.inr

      intro bit hex
      obtain ⟨w,h,hproper,hpair,havoid,hcycle,hmatch,hfix0,hfix3,hfix5⟩ := hex
      have hinj : ∀ i, Function.Injective (h i) := by
        intro i p q he
        by_contra hn
        exact hpair i p q hn he
      have hav : ∀ i p,
          h i p ≠ (if (![false,true,true,false,true,true] : Fin 6 → Bool) i then 5 else 4) ∧
          h i p ≠ Fin.castAdd 2 (w (i-1)) ∧ h i p ≠ Fin.castAdd 2 (w i) := by
        simpa [bit] using havoid
      have hc5 : h 5 0 ≠ h 0 1 ∧ h 5 0 ≠ h 0 2 ∧
          h 5 2 ≠ h 0 1 ∧ h 5 2 ≠ h 0 2 := by
        simpa using hcycle 5 (Or.inr (Or.inr (Or.inr rfl)))
  5. The hook at position 5 forces the ports h(5,2) = w(0), h(1,2) = 4, and h(5,1) = w(1), which implies that w(0), w(1), w(4), w(5) are all distinct

    Applying op874_six_cycle_hook_forces_matching_ports determines the three port values. Because position 5 must avoid the core values w(4) and w(5), neither w(0) nor w(1) can equal w(4) or w(5). Combining these with properness of the cycle edges shows that all six pairs among w(0), w(1), w(4), w(5) are distinct, so the vector ![w 0, w 1, w 4, w 5] is injective.

    lines 44–65

    uses op874_six_cycle_hook_forces_matching_ports, core_four_vec_inj

      have hook := op874_six_cycle_hook_forces_matching_ports
        w h hproper hinj hav hc5 hmatch hfix0 hfix5
      have h04 : w 0 ≠ w 4 := by
        intro he
        apply (hav 5 2).2.1
        simpa [he] using hook.1
      have h05 : w 0 ≠ w 5 := by
        intro he
        apply (hav 5 2).2.2
        simpa [he] using hook.1
      have h14 : w 1 ≠ w 4 := by
        intro he
        apply (hav 5 1).2.1
        simpa [he] using hook.2.2
      have h15 : w 1 ≠ w 5 := by
        intro he
        apply (hav 5 1).2.2
        simpa [he] using hook.2.2
      have h01 : w 0 ≠ w 1 := by simpa using hproper 1
      have h45 : w 4 ≠ w 5 := by simpa using hproper 5
      have hfour : Function.Injective ![w 0,w 1,w 4,w 5] :=
        core_four_vec_inj (w 0) (w 1) (w 4) (w 5) h01 h04 h05 h14 h15 h45
  6. Cycle constraints force the core value to repeat: w(2) = w(0)

    Using op874_six_cycle_next_block_forces_repeat together with the cycle compatibility conditions at positions 3 and 4, we deduce that w(2) must equal w(0).

    lines 66–87

    uses op874_six_cycle_next_block_forces_repeat, Or.inr, Or.inl

      have hc3 : h 3 0 ≠ h 4 1 ∧ h 3 0 ≠ h 4 2 ∧
          h 3 2 ≠ h 4 1 ∧ h 3 2 ≠ h 4 2 := by
        simpa using hcycle 3 (Or.inr (Or.inl rfl))
      have hc4 : h 4 0 ≠ h 5 1 ∧ h 4 0 ≠ h 5 2 ∧
          h 4 2 ≠ h 5 1 ∧ h 4 2 ≠ h 5 2 := by
        simpa using hcycle 4 (Or.inr (Or.inr (Or.inl rfl)))
      have hnext : w 2 = w 0 := by
        apply op874_six_cycle_next_block_forces_repeat (w 0) (w 1) (w 2) (w 3) (w 4) (w 5)
          (h 3) (h 4) hfour
        · simpa using hproper 2
        · simpa using hproper 3
        · simpa using hproper 4
        · exact hinj 3
        · exact hinj 4
        · intro p; simpa using hav 3 p
        · intro p; simpa using hav 4 p
        · exact hfix3
        · exact hc3
        · exact ⟨by simpa [hook.1] using hc4.2.1,
            by simpa [hook.2.2] using hc4.1,
            by simpa [hook.1] using hc4.2.2.2,
            by simpa [hook.2.2] using hc4.2.2.1⟩
  7. The ports at positions 1 and 2 avoid the same three colors, forcing a shared color that contradicts cycle edge compatibility

    Because w(2) = w(0), positions 1 and 2 both avoid the exact same triple of colors {5, w(0), w(1)}. Since the remaining available colors in Fin 6 number only three, the pairs of ports {h(1,0), h(1,2)} and {h(2,1), h(2,2)} must overlap by equal_external_triple_forces_shared_exposed_color. This directly contradicts the cycle compatibility requirement on edge (1,2).

    lines 88–115

    uses equal_external_triple_forces_shared_exposed_color, core_high_ne_five, core_high_inj, Or.inl

      have hx : h 1 0 ≠ 5 ∧ h 1 0 ≠ Fin.castAdd 2 (w 0) ∧
          h 1 0 ≠ Fin.castAdd 2 (w 1) := by simpa using hav 1 0
      have hy : h 1 2 ≠ 5 ∧ h 1 2 ≠ Fin.castAdd 2 (w 0) ∧
          h 1 2 ≠ Fin.castAdd 2 (w 1) := by simpa using hav 1 2
      have hu : h 2 1 ≠ 5 ∧ h 2 1 ≠ Fin.castAdd 2 (w 0) ∧
          h 2 1 ≠ Fin.castAdd 2 (w 1) := by
        have hh := hav 2 1
        simp only [hnext] at hh
        exact ⟨by simpa using hh.1, by simpa using hh.2.2, by simpa using hh.2.1⟩
      have hv : h 2 2 ≠ 5 ∧ h 2 2 ≠ Fin.castAdd 2 (w 0) ∧
          h 2 2 ≠ Fin.castAdd 2 (w 1) := by
        have hh := hav 2 2
        simp only [hnext] at hh
        exact ⟨by simpa using hh.1, by simpa using hh.2.2, by simpa using hh.2.1⟩
      have hxy : h 1 0 ≠ h 1 2 := hpair 1 0 2 (by decide)
      have huv : h 2 1 ≠ h 2 2 := hpair 2 1 2 (by decide)
      have hc1 : h 1 0 ≠ h 2 1 ∧ h 1 0 ≠ h 2 2 ∧
          h 1 2 ≠ h 2 1 ∧ h 1 2 ≠ h 2 2 := by
        simpa using hcycle 1 (Or.inl rfl)
      rcases 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)
          (core_high_ne_five _).symm (core_high_ne_five _).symm (core_high_inj h01)
          hx hy hu hv hxy huv with he | he | he | he
      · exact hc1.1 he
      · exact hc1.2.1 he
      · exact hc1.2.2.1 he
      · exact hc1.2.2.2 he
core_high_ne_five
The canonical cast from Fin 4 to Fin 6 cannot equal 5
core_high_inj
The canonical cast from Fin 4 to Fin 6 is injective
core_four_vec_inj
A 4-element vector of pairwise distinct values in Fin 4 is injective
op874_six_cycle_hook_forces_matching_ports
Given the cycle and matching interface constraints, the hook forces specific port values at positions 1 and 5
op874_six_cycle_next_block_forces_repeat
Under the cycle constraints and a 4-element distinct vector, the core value at position 2 must repeat the value at position 0
equal_external_triple_forces_shared_exposed_color
Two disjoint 2-element subsets of a 3-element set of available colors must share a color

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

private theorem core_high_ne_five (t : Fin 4) : Fin.castAdd 2 t ≠ (5 : Fin 6) := by  fin_cases t <;> decideprivate theorem core_high_inj {s t : Fin 4} (h : s ≠ t) :    Fin.castAdd 2 s ≠ Fin.castAdd 2 t := by  intro hh  apply h  apply Fin.ext  simpa only [Fin.val_castAdd] using congrArg Fin.val hhprivate theorem core_four_vec_inj (a b c d : Fin 4)    (hab : a ≠ b) (hac : a ≠ c) (had : a ≠ d)    (hbc : b ≠ c) (hbd : b ≠ d) (hcd : c ≠ d) :    Function.Injective ![a,b,c,d] := by  intro i j he  fin_cases i <;> fin_cases j <;> simp only [Fin.reduceEq] at he ⊢ <;> aesoptheorem op874_six_cycle_five_interface_low_port_obstruction :    let b : Fin 6 → Bool := ![false,true,true,false,true,true]    ¬ ∃ (w : Fin 6 → Fin 4) (h : Fin 6 → Fin 3 → Fin 6),      (∀ i, w (i-1) ≠ w i) ∧      (∀ i p q, p ≠ q → h i p ≠ h i q) ∧      (∀ i p, h i p ≠ (if b 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 = 3 ∨ i = 4 ∨ i = 5) →        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 1 0 ≠ h 5 0 ∧ h 1 0 ≠ h 5 1 ∧ h 1 1 ≠ h 5 0 ∧ h 1 1 ≠ h 5 1) ∧      h 0 0 = 5 ∧ h 3 1 = 5 ∧ h 5 0 = 4 := by  intro bit hex  obtain ⟨w,h,hproper,hpair,havoid,hcycle,hmatch,hfix0,hfix3,hfix5⟩ := hex  have hinj : ∀ i, Function.Injective (h i) := by    intro i p q he    by_contra hn    exact hpair i p q hn he  have hav : ∀ i p,      h i p ≠ (if (![false,true,true,false,true,true] : Fin 6 → Bool) i then 5 else 4) ∧      h i p ≠ Fin.castAdd 2 (w (i-1)) ∧ h i p ≠ Fin.castAdd 2 (w i) := by    simpa [bit] using havoid  have hc5 : h 5 0 ≠ h 0 1 ∧ h 5 0 ≠ h 0 2 ∧      h 5 2 ≠ h 0 1 ∧ h 5 2 ≠ h 0 2 := by    simpa using hcycle 5 (Or.inr (Or.inr (Or.inr rfl)))  have hook := op874_six_cycle_hook_forces_matching_ports    w h hproper hinj hav hc5 hmatch hfix0 hfix5  have h04 : w 0 ≠ w 4 := by    intro he    apply (hav 5 2).2.1    simpa [he] using hook.1  have h05 : w 0 ≠ w 5 := by    intro he    apply (hav 5 2).2.2    simpa [he] using hook.1  have h14 : w 1 ≠ w 4 := by    intro he    apply (hav 5 1).2.1    simpa [he] using hook.2.2  have h15 : w 1 ≠ w 5 := by    intro he    apply (hav 5 1).2.2    simpa [he] using hook.2.2  have h01 : w 0 ≠ w 1 := by simpa using hproper 1  have h45 : w 4 ≠ w 5 := by simpa using hproper 5  have hfour : Function.Injective ![w 0,w 1,w 4,w 5] :=    core_four_vec_inj (w 0) (w 1) (w 4) (w 5) h01 h04 h05 h14 h15 h45  have hc3 : h 3 0 ≠ h 4 1 ∧ h 3 0 ≠ h 4 2 ∧      h 3 2 ≠ h 4 1 ∧ h 3 2 ≠ h 4 2 := by    simpa using hcycle 3 (Or.inr (Or.inl rfl))  have hc4 : h 4 0 ≠ h 5 1 ∧ h 4 0 ≠ h 5 2 ∧      h 4 2 ≠ h 5 1 ∧ h 4 2 ≠ h 5 2 := by    simpa using hcycle 4 (Or.inr (Or.inr (Or.inl rfl)))  have hnext : w 2 = w 0 := by    apply op874_six_cycle_next_block_forces_repeat (w 0) (w 1) (w 2) (w 3) (w 4) (w 5)      (h 3) (h 4) hfour    · simpa using hproper 2    · simpa using hproper 3    · simpa using hproper 4    · exact hinj 3    · exact hinj 4    · intro p; simpa using hav 3 p    · intro p; simpa using hav 4 p    · exact hfix3    · exact hc3    · exact ⟨by simpa [hook.1] using hc4.2.1,        by simpa [hook.2.2] using hc4.1,        by simpa [hook.1] using hc4.2.2.2,        by simpa [hook.2.2] using hc4.2.2.1⟩  have hx : h 1 0 ≠ 5 ∧ h 1 0 ≠ Fin.castAdd 2 (w 0) ∧      h 1 0 ≠ Fin.castAdd 2 (w 1) := by simpa using hav 1 0  have hy : h 1 2 ≠ 5 ∧ h 1 2 ≠ Fin.castAdd 2 (w 0) ∧      h 1 2 ≠ Fin.castAdd 2 (w 1) := by simpa using hav 1 2  have hu : h 2 1 ≠ 5 ∧ h 2 1 ≠ Fin.castAdd 2 (w 0) ∧      h 2 1 ≠ Fin.castAdd 2 (w 1) := by    have hh := hav 2 1    simp only [hnext] at hh    exact ⟨by simpa using hh.1, by simpa using hh.2.2, by simpa using hh.2.1⟩  have hv : h 2 2 ≠ 5 ∧ h 2 2 ≠ Fin.castAdd 2 (w 0) ∧      h 2 2 ≠ Fin.castAdd 2 (w 1) := by    have hh := hav 2 2    simp only [hnext] at hh    exact ⟨by simpa using hh.1, by simpa using hh.2.2, by simpa using hh.2.1⟩  have hxy : h 1 0 ≠ h 1 2 := hpair 1 0 2 (by decide)  have huv : h 2 1 ≠ h 2 2 := hpair 2 1 2 (by decide)  have hc1 : h 1 0 ≠ h 2 1 ∧ h 1 0 ≠ h 2 2 ∧      h 1 2 ≠ h 2 1 ∧ h 1 2 ≠ h 2 2 := by    simpa using hcycle 1 (Or.inl rfl)  rcases 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)      (core_high_ne_five _).symm (core_high_ne_five _).symm (core_high_inj h01)      hx hy hu hv hxy huv with he | he | he | he  · exact hc1.1 he  · exact hc1.2.1 he  · exact hc1.2.2.1 he  · exact hc1.2.2.2 he
See it in the graphDiscuss this resultChallenge it