op874_six_cycle_hook_forces_matching_ports
Compatibility at the 5–0 factor interface and the 1–5 matching interface, together with the two indicated low ports, forces three hidden matching/factor colors on the six-cycle.
Statement
theorem op874_six_cycle_hook_forces_matching_ports (w : Fin 6 → Fin 4) (h : Fin 6 → Fin 3 → Fin 6) (hproper : ∀ i, w (i-1) ≠ w i) (hinj : ∀ i, Function.Injective (h i)) (havoid : ∀ 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)) (hcycle : h 5 0 ≠ h 0 1 ∧ h 5 0 ≠ h 0 2 ∧ h 5 2 ≠ h 0 1 ∧ h 5 2 ≠ h 0 2) (hmatch : h 1 0 ≠ h 5 0 ∧ h 1 0 ≠ h 5 1 ∧ h 1 1 ≠ h 5 0 ∧ h 1 1 ≠ h 5 1) (hfixed0 : h 0 0 = 5) (hfixed5 : h 5 0 = 4) : h 5 2 = Fin.castAdd 2 (w 0) ∧ h 1 2 = 4 ∧ h 5 1 = Fin.castAdd 2 (w 1)
- Source
- Palette steps for the six-cycle low-port obstruction in OP-874; https://arxiv.org/abs/2610.41950.
- Verified
- 26 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Used by 1
- op874_six_cycle_five_interface_low_port_obstructionOn a six-cycle with bit word 011011 and a matching interface joining positions 1 and 5, the three indicated low-port selections already…
The proof, explained
The proof establishes that three specific ports on a 6-cycle are uniquely determined by using a 6-element pigeonhole principle (`six_frame`): since Fin 6 has cardinality 6, any element distinct from five elements of a complete frame must equal the sixth. For each of the three targets—$h(5,2)$, $h(1,2)$, and $h(5,1)$—the proof constructs a frame of six pairwise distinct colors using the shifted edge colors $a = w(0)$, $b = w(1)$, $f = w(5)$, the high colors $4$ and $5$, and known port values. The avoidance conditions, port injectivity, and cycle/matching interface compatibilities rule out five of the frame colors in each case, forcing $h(5,2) = a$, $h(1,2) = 4$, and $h(5,1) = b$ sequentially.
A 6-tuple of pairwise distinct elements in Fin 6 defines an injective function from Fin 6 to itself.
We show that if six elements $a, b, c, d, x, y \in \text{Fin } 6$ are pairwise distinct, the vector function $q = ![a, b, c, d, x, y]$ is injective. Exhausting all 36 pairs of indices $(i, j) \in \text{Fin } 6 \times \text{Fin } 6$ via `fin_cases`, the diagonal cases $i = j$ hold reflexively, while off-diagonal cases reduce by vector component evaluation (`simp only`) to equating distinct elements, which contradicts the pairwise distinctness hypotheses.
uses
Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_succ,Fin.reduceEqprivate theorem six_vec_inj (a b c d x y : Fin 6) (hab : a ≠ b) (hac : a ≠ c) (had : a ≠ d) (hax : a ≠ x) (hay : a ≠ y) (hbc : b ≠ c) (hbd : b ≠ d) (hbx : b ≠ x) (hby : b ≠ y) (hcd : c ≠ d) (hcx : c ≠ x) (hcy : c ≠ y) (hdx : d ≠ x) (hdy : d ≠ y) (hxy : x ≠ y) : Function.Injective ![a,b,c,d,x,y] := by intro i j he fin_cases i <;> fin_cases j <;> simp only [Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_succ, Fin.reduceEq] at he ⊢ <;> aesop
If an injective 6-tuple enumerates Fin 6, any element distinct from five of its components must equal the remaining one.
Let $q = ![a, b, c, d, x, y]$. Since $q$ is injective, the cardinality of its image on $\text{Fin } 6$ is 6 (`Finset.card_image_iff.mpr`, `Set.injOn_of_injective`), so its image equals all of $\text{Fin } 6$ (`Finset.eq_univ_of_card`). Thus any $z \in \text{Fin } 6$ must be in the image (`Finset.mem_univ`), meaning $z = q(i)$ for some $i$ (`Finset.mem_image.mp`). Exhausting all possibilities for $i$, the hypothesis that $z$ is distinct from $b, c, d, x, y$ eliminates every index except $i = 0$, forcing $z = a$.
uses
Finset.card_image_iff.mpr,Set.injOn_of_injective,Finset.eq_univ_of_card,Finset.mem_univ,Finset.mem_image.mpprivate theorem six_frame (a b c d x y z : Fin 6) (hi : Function.Injective ![a,b,c,d,x,y]) (hz : z ≠ b ∧ z ≠ c ∧ z ≠ d ∧ z ≠ x ∧ z ≠ y) : z = a := by let q : Fin 6 → Fin 6 := ![a,b,c,d,x,y] have hcard : (Finset.univ.image q).card = Fintype.card (Fin 6) := by rw [Finset.card_image_iff.mpr (Set.injOn_of_injective hi)] simp have hall : Finset.univ.image q = Finset.univ := Finset.eq_univ_of_card _ hcard have hm : z ∈ Finset.univ.image q := by rw [hall]; exact Finset.mem_univ _ obtain ⟨i, _, hiq⟩ := Finset.mem_image.mp hm fin_cases i <;> simp_all [q]
The embedding of Fin 4 into Fin 6 via Fin.castAdd 2 never yields 4.
Since every element $t \in \text{Fin } 4$ has numerical value at most 3, its value under `Fin.castAdd 2` is strictly less than 4. The claim is verified by case exhaustion on $t$ followed by computation.
private theorem high_ne_four (t : Fin 4) : Fin.castAdd 2 t ≠ (4 : Fin 6) := by fin_cases t <;> decide
The embedding of Fin 4 into Fin 6 via Fin.castAdd 2 never yields 5.
Similarly, every element $t \in \text{Fin } 4$ has value at most 3 under `Fin.castAdd 2`, so it cannot equal 5. The claim holds by case exhaustion and direct computation.
private theorem high_ne_five (t : Fin 4) : Fin.castAdd 2 t ≠ (5 : Fin 6) := by fin_cases t <;> decide
The embedding Fin.castAdd 2 from Fin 4 to Fin 6 is injective.
Given $\text{Fin.castAdd } 2(s) = \text{Fin.castAdd } 2(t)$, applying equality of underlying natural values (`Fin.val_castAdd`, `congrArg`) shows that $s$ and $t$ have the same numerical value. By extensionality (`Fin.ext`), $s = t$, which contradicts the assumption $s \ne t$.
uses
Fin.ext,Fin.val_castAdd,congrArg,Fin.valprivate theorem 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
The shifted colors a = w(0), b = w(1), and f = w(5) are mutually distinct and distinct from 4 and 5.
We define $a = \text{castAdd } 2(w(0))$, $b = \text{castAdd } 2(w(1))$, and $f = \text{castAdd } 2(w(5))$. Because $w$ is a proper 4-coloring along the 6-cycle and $-1 \equiv 5 \pmod 6$, we have $w(0) \ne w(5)$ and $w(0) \ne w(1)$, so $a \ne f$ and $a \ne b$ by injectivity (`high_inj`). Furthermore, $a, b, f$ all lie in $\{0, 1, 2, 3\}$, so none can equal 4 or 5 by `high_ne_four` and `high_ne_five`.
uses
high_inj,high_ne_four,high_ne_fivetheorem op874_six_cycle_hook_forces_matching_ports (w : Fin 6 → Fin 4) (h : Fin 6 → Fin 3 → Fin 6) (hproper : ∀ i, w (i-1) ≠ w i) (hinj : ∀ i, Function.Injective (h i)) (havoid : ∀ 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)) (hcycle : h 5 0 ≠ h 0 1 ∧ h 5 0 ≠ h 0 2 ∧ h 5 2 ≠ h 0 1 ∧ h 5 2 ≠ h 0 2) (hmatch : h 1 0 ≠ h 5 0 ∧ h 1 0 ≠ h 5 1 ∧ h 1 1 ≠ h 5 0 ∧ h 1 1 ≠ h 5 1) (hfixed0 : h 0 0 = 5) (hfixed5 : h 5 0 = 4) : h 5 2 = Fin.castAdd 2 (w 0) ∧ h 1 2 = 4 ∧ h 5 1 = Fin.castAdd 2 (w 1) := by let a : Fin 6 := Fin.castAdd 2 (w 0) let b : Fin 6 := Fin.castAdd 2 (w 1) let f : Fin 6 := Fin.castAdd 2 (w 5) have hm6 : (-1 : Fin 6) = 5 := by decide have haf : a ≠ f := by apply high_inj have hp := hproper 0 simpa [hm6] using hp.symm have hab : a ≠ b := by apply high_inj simpa using hproper 1 have ha4 : a ≠ 4 := high_ne_four _ have ha5 : a ≠ 5 := high_ne_five _ have hb4 : b ≠ 4 := high_ne_four _ have hb5 : b ≠ 5 := high_ne_five _ have hf4 : f ≠ 4 := high_ne_four _ have hf5 : f ≠ 5 := high_ne_five _
Ports at vertex 0 and port 2 at vertex 5 are distinct from their prohibited colors and from each other.
By the vertex avoidance hypothesis `havoid`, ports $h(0, 1)$ and $h(0, 2)$ avoid color 4 (since the mask at 0 is false) and avoid the incident edge colors $f = w(5)$ and $a = w(0)$. Injectivity of $h(0)$ together with $h(0, 0) = 5$ implies $h(0, 1) \ne 5$, $h(0, 2) \ne 5$, and $h(0, 1) \ne h(0, 2)$. Similarly, injectivity of $h(5)$ together with $h(5, 0) = 4$ implies $h(5, 2) \ne 4$.
have hx := havoid 0 1 have hy := havoid 0 2 have hz := havoid 5 2 have hxy : h 0 1 ≠ h 0 2 := fun he => (by decide : (1 : Fin 3) ≠ 2) (hinj 0 he) have hx5 : h 0 1 ≠ 5 := by intro he exact (by decide : (1 : Fin 3) ≠ 0) (hinj 0 (he.trans hfixed0.symm)) have hy5 : h 0 2 ≠ 5 := by intro he exact (by decide : (2 : Fin 3) ≠ 0) (hinj 0 (he.trans hfixed0.symm)) have hz4 : h 5 2 ≠ 4 := by intro he exact (by decide : (2 : Fin 3) ≠ 0) (hinj 5 (he.trans hfixed5.symm)) have hx4 : h 0 1 ≠ 4 := by simpa using hx.1 have hy4 : h 0 2 ≠ 4 := by simpa using hy.1 have hxf : h 0 1 ≠ f := by simpa [f,hm6] using hx.2.1 have hyf : h 0 2 ≠ f := by simpa [f,hm6] using hy.2.1 have hxa : h 0 1 ≠ a := by simpa [a] using hx.2.2 have hya : h 0 2 ≠ a := by simpa [a] using hy.2.2
Port 2 at vertex 5 is forced to equal a = w(0).
The six elements $a, f, 4, 5, h(0, 1), h(0, 2)$ are pairwise distinct, forming an injective frame via `six_vec_inj`. The color $h(5, 2)$ cannot equal $f$ (avoided at vertex 5), $4$ (since $h(5, 0) = 4$ and $h(5)$ is injective), $5$ (avoided at vertex 5), or $h(0, 1), h(0, 2)$ (by cycle interface compatibility `hcycle`). Being distinct from all five other elements of the frame, $h(5, 2)$ must equal $a$ by `six_frame`.
uses
six_frame,six_vec_injhave h5a : h 5 2 = a := by apply six_frame a f 4 5 (h 0 1) (h 0 2) (h 5 2) · exact six_vec_inj a f 4 5 (h 0 1) (h 0 2) haf ha4 ha5 hxa.symm hya.symm hf4 hf5 hxf.symm hyf.symm (by decide) hx4.symm hy4.symm hx5.symm hy5.symm hxy · refine ⟨?_, hz4, ?_, hcycle.2.2.1, hcycle.2.2.2⟩ · simpa [f] using hz.2.2 · simpa using hz.1
Ports 0 and 1 at vertex 1 avoid 4, 5, a, and b, and are mutually distinct.
By the avoidance hypothesis at vertex 1 (where the mask is true), ports $h(1, 0)$ and $h(1, 1)$ avoid 5, as well as incident edge colors $a = w(0)$ and $b = w(1)$. Matching interface compatibility `hmatch` against $h(5, 0) = 4$ ensures that neither port equals 4. Finally, injectivity of $h(1)$ implies $h(1, 0) \ne h(1, 1)$ and separates them from $h(1, 2)$.
have h10 := havoid 1 0 have h11 := havoid 1 1 have h12 := havoid 1 2 have h104 : h 1 0 ≠ 4 := by simpa [hfixed5] using hmatch.1 have h114 : h 1 1 ≠ 4 := by simpa [hfixed5] using hmatch.2.2.1 have h1011 : h 1 0 ≠ h 1 1 := fun he => (by decide : (0 : Fin 3) ≠ 1) (hinj 1 he) have h12x : h 1 2 ≠ h 1 0 := fun he => (by decide : (2 : Fin 3) ≠ 0) (hinj 1 he) have h12y : h 1 2 ≠ h 1 1 := fun he => (by decide : (2 : Fin 3) ≠ 1) (hinj 1 he) have h105 : h 1 0 ≠ 5 := by simpa using h10.1 have h115 : h 1 1 ≠ 5 := by simpa using h11.1 have h10a : h 1 0 ≠ a := by simpa [a] using h10.2.1 have h11a : h 1 1 ≠ a := by simpa [a] using h11.2.1 have h10b : h 1 0 ≠ b := by simpa [b] using h10.2.2 have h11b : h 1 1 ≠ b := by simpa [b] using h11.2.2
Port 2 at vertex 1 is forced to equal 4.
The elements $4, 5, a, b, h(1, 0), h(1, 1)$ form an injective frame of Fin 6 by `six_vec_inj`. By the avoidance conditions at vertex 1, $h(1, 2)$ avoids 5, $a$, and $b$, and by injectivity of $h(1)$ it differs from $h(1, 0)$ and $h(1, 1)$. Hence by `six_frame`, $h(1, 2)$ must equal 4.
uses
six_frame,six_vec_injhave h14 : h 1 2 = 4 := by apply six_frame 4 5 a b (h 1 0) (h 1 1) (h 1 2) · exact six_vec_inj 4 5 a b (h 1 0) (h 1 1) (by decide) ha4.symm hb4.symm h104.symm h114.symm ha5.symm hb5.symm h105.symm h115.symm hab h10a.symm h11a.symm h10b.symm h11b.symm h1011 · refine ⟨?_, ?_, ?_, h12x, h12y⟩ · simpa using h12.1 · simpa [a] using h12.2.1 · simpa [b] using h12.2.2
Port 1 at vertex 5 is distinct from a and from 4.
Because $h(5, 2) = a$ and $h(5, 0) = 4$, injectivity of $h(5)$ ensures that the remaining port $h(5, 1)$ is distinct from both $a$ and $4$.
have h51 := havoid 5 1 have h51a : h 5 1 ≠ a := by intro he exact (by decide : (1 : Fin 3) ≠ 2) (hinj 5 (he.trans h5a.symm)) have h514 : h 5 1 ≠ 4 := by intro he exact (by decide : (1 : Fin 3) ≠ 0) (hinj 5 (he.trans hfixed5.symm))
Port 1 at vertex 5 is forced to equal b = w(1).
We consider the frame $b, a, 4, 5, h(1, 0), h(1, 1)$, which is injective by `six_vec_inj`. The port color $h(5, 1)$ avoids $a$ and $4$ (by injectivity at vertex 5), avoids 5 (by vertex avoidance at vertex 5), and is distinct from $h(1, 0)$ and $h(1, 1)$ by matching interface compatibility `hmatch`. By `six_frame`, $h(5, 1)$ must equal $b$.
uses
six_frame,six_vec_injhave h5b : h 5 1 = b := by apply six_frame b a 4 5 (h 1 0) (h 1 1) (h 5 1) · exact six_vec_inj b a 4 5 (h 1 0) (h 1 1) hab.symm hb4 hb5 h10b.symm h11b.symm ha4 ha5 h10a.symm h11a.symm (by decide) h104.symm h114.symm h105.symm h115.symm h1011 · refine ⟨h51a, h514, ?_, hmatch.2.1.symm, hmatch.2.2.2.symm⟩ simpa using h51.1
All three matching port assignments hold simultaneously.
Combining the forced equalities $h(5, 2) = a = \text{castAdd } 2(w(0))$, $h(1, 2) = 4$, and $h(5, 1) = b = \text{castAdd } 2(w(1))$ proves the target conjunction.
exact ⟨by simpa [a] using h5a, h14, by simpa [b] using h5b⟩
congrArg- Applying a function to both sides of an equality preserves the equality.
Fin.ext- Two elements of Fin n are equal if and only if their underlying natural numbers are equal.
Fin.reduceEq- Simplification procedure that evaluates equality between literal values in Fin n.
Fin.val- The underlying natural number value of an element in Fin n.
Fin.val_castAdd- The underlying natural number of Fin.castAdd m i is equal to the underlying natural number of i.
Finset.card_image_iff.mpr- If a function is injective on a finite set s, the cardinality of its image under f equals the cardinality of s.
Finset.eq_univ_of_card- A subset of a finite type whose cardinality equals that of the entire type is the universal set.
Finset.mem_image.mp- An element y belongs to the image of s under f if and only if y = f(x) for some x in s.
Finset.mem_univ- Every element of a finite type belongs to the universal finset.
high_inj- The embedding of Fin 4 into Fin 6 via Fin.castAdd 2 is injective.
high_ne_four- The embedding of any element of Fin 4 into Fin 6 via Fin.castAdd 2 is never equal to 4.
high_ne_five- The embedding of any element of Fin 4 into Fin 6 via Fin.castAdd 2 is never equal to 5.
Matrix.cons_val_one- The 1-st component of a vector constructed with vecCons is the 0-th component of the tail.
Matrix.cons_val_succ- The successor index (i+1) of a vector with head x and tail u accesses the i-th entry of u.
Matrix.cons_val_zero- The 0-th component of a vector constructed by prepending x to u is x.
Set.injOn_of_injective- A globally injective function is injective when restricted to any subset of its domain.
six_frame- If six elements enumerate Fin 6 and an element z is distinct from five of them, then z must equal the sixth element.
six_vec_inj- A 6-tuple of pairwise distinct elements in Fin 6 defines an injective function from Fin 6 to itself.
- In `six_vec_inj` (lines 7–10), the 36-case exhaustion of index pairs $i, j \in \text{Fin } 6$ is handled automatically by `fin_cases` and `aesop`.
- In `op874_six_cycle_hook_forces_matching_ports`, modular arithmetic identity `-1 = 5` in `Fin 6` (line 55) accounts for wrapping around the 6-cycle to find the predecessor of vertex 0.
- The theorem relies on embedding `Fin 4` into `Fin 6` via `Fin.castAdd 2`, effectively mapping $\{0, 1, 2, 3\}$ into $\{0, 1, 2, 3\} \subset \text{Fin } 6$, leaving $4$ and $5$ as "high" colors.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
private theorem six_vec_inj (a b c d x y : Fin 6) (hab : a ≠ b) (hac : a ≠ c) (had : a ≠ d) (hax : a ≠ x) (hay : a ≠ y) (hbc : b ≠ c) (hbd : b ≠ d) (hbx : b ≠ x) (hby : b ≠ y) (hcd : c ≠ d) (hcx : c ≠ x) (hcy : c ≠ y) (hdx : d ≠ x) (hdy : d ≠ y) (hxy : x ≠ y) : Function.Injective ![a,b,c,d,x,y] := by intro i j he fin_cases i <;> fin_cases j <;> simp only [Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_succ, Fin.reduceEq] at he ⊢ <;> aesopprivate theorem six_frame (a b c d x y z : Fin 6) (hi : Function.Injective ![a,b,c,d,x,y]) (hz : z ≠ b ∧ z ≠ c ∧ z ≠ d ∧ z ≠ x ∧ z ≠ y) : z = a := by let q : Fin 6 → Fin 6 := ![a,b,c,d,x,y] have hcard : (Finset.univ.image q).card = Fintype.card (Fin 6) := by rw [Finset.card_image_iff.mpr (Set.injOn_of_injective hi)] simp have hall : Finset.univ.image q = Finset.univ := Finset.eq_univ_of_card _ hcard have hm : z ∈ Finset.univ.image q := by rw [hall]; exact Finset.mem_univ _ obtain ⟨i, _, hiq⟩ := Finset.mem_image.mp hm fin_cases i <;> simp_all [q]private theorem high_ne_four (t : Fin 4) : Fin.castAdd 2 t ≠ (4 : Fin 6) := by fin_cases t <;> decideprivate theorem high_ne_five (t : Fin 4) : Fin.castAdd 2 t ≠ (5 : Fin 6) := by fin_cases t <;> decideprivate theorem 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 hhtheorem op874_six_cycle_hook_forces_matching_ports (w : Fin 6 → Fin 4) (h : Fin 6 → Fin 3 → Fin 6) (hproper : ∀ i, w (i-1) ≠ w i) (hinj : ∀ i, Function.Injective (h i)) (havoid : ∀ 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)) (hcycle : h 5 0 ≠ h 0 1 ∧ h 5 0 ≠ h 0 2 ∧ h 5 2 ≠ h 0 1 ∧ h 5 2 ≠ h 0 2) (hmatch : h 1 0 ≠ h 5 0 ∧ h 1 0 ≠ h 5 1 ∧ h 1 1 ≠ h 5 0 ∧ h 1 1 ≠ h 5 1) (hfixed0 : h 0 0 = 5) (hfixed5 : h 5 0 = 4) : h 5 2 = Fin.castAdd 2 (w 0) ∧ h 1 2 = 4 ∧ h 5 1 = Fin.castAdd 2 (w 1) := by let a : Fin 6 := Fin.castAdd 2 (w 0) let b : Fin 6 := Fin.castAdd 2 (w 1) let f : Fin 6 := Fin.castAdd 2 (w 5) have hm6 : (-1 : Fin 6) = 5 := by decide have haf : a ≠ f := by apply high_inj have hp := hproper 0 simpa [hm6] using hp.symm have hab : a ≠ b := by apply high_inj simpa using hproper 1 have ha4 : a ≠ 4 := high_ne_four _ have ha5 : a ≠ 5 := high_ne_five _ have hb4 : b ≠ 4 := high_ne_four _ have hb5 : b ≠ 5 := high_ne_five _ have hf4 : f ≠ 4 := high_ne_four _ have hf5 : f ≠ 5 := high_ne_five _ have hx := havoid 0 1 have hy := havoid 0 2 have hz := havoid 5 2 have hxy : h 0 1 ≠ h 0 2 := fun he => (by decide : (1 : Fin 3) ≠ 2) (hinj 0 he) have hx5 : h 0 1 ≠ 5 := by intro he exact (by decide : (1 : Fin 3) ≠ 0) (hinj 0 (he.trans hfixed0.symm)) have hy5 : h 0 2 ≠ 5 := by intro he exact (by decide : (2 : Fin 3) ≠ 0) (hinj 0 (he.trans hfixed0.symm)) have hz4 : h 5 2 ≠ 4 := by intro he exact (by decide : (2 : Fin 3) ≠ 0) (hinj 5 (he.trans hfixed5.symm)) have hx4 : h 0 1 ≠ 4 := by simpa using hx.1 have hy4 : h 0 2 ≠ 4 := by simpa using hy.1 have hxf : h 0 1 ≠ f := by simpa [f,hm6] using hx.2.1 have hyf : h 0 2 ≠ f := by simpa [f,hm6] using hy.2.1 have hxa : h 0 1 ≠ a := by simpa [a] using hx.2.2 have hya : h 0 2 ≠ a := by simpa [a] using hy.2.2 have h5a : h 5 2 = a := by apply six_frame a f 4 5 (h 0 1) (h 0 2) (h 5 2) · exact six_vec_inj a f 4 5 (h 0 1) (h 0 2) haf ha4 ha5 hxa.symm hya.symm hf4 hf5 hxf.symm hyf.symm (by decide) hx4.symm hy4.symm hx5.symm hy5.symm hxy · refine ⟨?_, hz4, ?_, hcycle.2.2.1, hcycle.2.2.2⟩ · simpa [f] using hz.2.2 · simpa using hz.1 have h10 := havoid 1 0 have h11 := havoid 1 1 have h12 := havoid 1 2 have h104 : h 1 0 ≠ 4 := by simpa [hfixed5] using hmatch.1 have h114 : h 1 1 ≠ 4 := by simpa [hfixed5] using hmatch.2.2.1 have h1011 : h 1 0 ≠ h 1 1 := fun he => (by decide : (0 : Fin 3) ≠ 1) (hinj 1 he) have h12x : h 1 2 ≠ h 1 0 := fun he => (by decide : (2 : Fin 3) ≠ 0) (hinj 1 he) have h12y : h 1 2 ≠ h 1 1 := fun he => (by decide : (2 : Fin 3) ≠ 1) (hinj 1 he) have h105 : h 1 0 ≠ 5 := by simpa using h10.1 have h115 : h 1 1 ≠ 5 := by simpa using h11.1 have h10a : h 1 0 ≠ a := by simpa [a] using h10.2.1 have h11a : h 1 1 ≠ a := by simpa [a] using h11.2.1 have h10b : h 1 0 ≠ b := by simpa [b] using h10.2.2 have h11b : h 1 1 ≠ b := by simpa [b] using h11.2.2 have h14 : h 1 2 = 4 := by apply six_frame 4 5 a b (h 1 0) (h 1 1) (h 1 2) · exact six_vec_inj 4 5 a b (h 1 0) (h 1 1) (by decide) ha4.symm hb4.symm h104.symm h114.symm ha5.symm hb5.symm h105.symm h115.symm hab h10a.symm h11a.symm h10b.symm h11b.symm h1011 · refine ⟨?_, ?_, ?_, h12x, h12y⟩ · simpa using h12.1 · simpa [a] using h12.2.1 · simpa [b] using h12.2.2 have h51 := havoid 5 1 have h51a : h 5 1 ≠ a := by intro he exact (by decide : (1 : Fin 3) ≠ 2) (hinj 5 (he.trans h5a.symm)) have h514 : h 5 1 ≠ 4 := by intro he exact (by decide : (1 : Fin 3) ≠ 0) (hinj 5 (he.trans hfixed5.symm)) have h5b : h 5 1 = b := by apply six_frame b a 4 5 (h 1 0) (h 1 1) (h 5 1) · exact six_vec_inj b a 4 5 (h 1 0) (h 1 1) hab.symm hb4 hb5 h10b.symm h11b.symm ha4 ha5 h10a.symm h11a.symm (by decide) h104.symm h114.symm h105.symm h115.symm h1011 · refine ⟨h51a, h514, ?_, hmatch.2.1.symm, hmatch.2.2.2.symm⟩ simpa using h51.1 exact ⟨by simpa [a] using h5a, h14, by simpa [b] using h5b⟩