op874_two_component_swaps_cannot_separate_example
For the displayed 24-vertex graph with 36 indexed edges and displayed six-color edge assignment, the assignment is proper on the edge conflict graph, and indexed edges 16 and 21 have the same color. After any two swaps of the two colors on a connected component of their induced subgraph in the edge conflict graph, edges 16 and 21 still have the same color. Conflict means distance at most two in the line graph.
Statement
theorem op874_two_component_swaps_cannot_separate_example : let L : Fin 36 → Fin 24 := ![0,0,0,1,1,2,3,3,3,4,4,5,6,6,7,7,8,9,9,10,10,11,12,12,13,14,15,15,16,17,18,18,19,21,21,22] let R : Fin 36 → Fin 24 := ![1,2,6,2,15,18,4,5,9,5,12,21,7,8,8,16,22,10,11,11,13,19,13,14,14,23,16,17,17,20,19,20,20,22,23,23] let color : Fin 36 → Fin 6 := ![2,3,1,4,0,5,3,4,0,1,2,5,0,5,4,2,3,2,5,4,1,3,5,0,3,4,5,1,3,4,1,0,2,0,2,1] let meet := fun i j : Fin 36 => L i = L j ∨ L i = R j ∨ R i = L j ∨ R i = R j let conflict := fun i j : Fin 36 => i ≠ j ∧ (meet i j ∨ ∃ k : Fin 36, meet i k ∧ meet k j) let valid := fun (d : Fin 36 → Fin 6) (a b : Fin 6) (S : Finset (Fin 36)) => a ≠ b ∧ S.Nonempty ∧ (∀ i ∈ S, d i = a ∨ d i = b) ∧ (∀ i ∈ S, ∀ j, conflict i j → (d j = a ∨ d j = b) → j ∈ S) ∧ (∀ i ∈ S, ∀ j ∈ S, Relation.ReflTransGen (fun x y : Fin 36 => x ∈ S ∧ y ∈ S ∧ conflict x y) i j) let swap := fun (d : Fin 36 → Fin 6) (a b : Fin 6) (S : Finset (Fin 36)) i => if i ∈ S then (if d i = a then b else a) else d i (∀ i j, conflict i j → color i ≠ color j) ∧ color 16 = color 21 ∧ ∀ a b d e (S T : Finset (Fin 36)), valid color a b S → valid (swap color a b S) d e T → swap (swap color a b S) d e T 16 = swap (swap color a b S) d e T 21
- Source
- Two-component-swap obstruction for OP-874; experiments 43631, 43634 and 43638.
- Verified
- 28 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext
The proof, explained
The proof establishes that for a specific 24-vertex, 36-edge graph, a given 6-coloring is a proper coloring of the line-graph distance-2 conflict graph, with edges 16 and 21 having the same color. Exhaustive kernel computation (`decide +kernel`) verifies that the two-color subgraphs possess spanning forest structures and that swapping any two-color component preserves the color agreement of edges 16 and 21. For any second swap with another color, precomputed alternating two-color chains connect edges 16 and 21, forcing both edges to belong to the same component (or neither), so a second Kempe swap also preserves their color agreement.
The edge adjacency and conflict relations are decidable.
The edge adjacency relation and the line-graph distance at most 2 conflict relation are defined by finite disjunctions of endpoint equalities and existential quantification over the finite set of 36 edges. Unfolding their definitions allows typeclass synthesis (`infer_instance`) to synthesize decidability instances.
instance in1299_meet_dec (i j : Fin 36) : Decidable (in1299_meet i j) := by unfold in1299_meet; infer_instance instance in1299_conflict_dec (i j : Fin 36) : Decidable (in1299_conflict i j) := by unfold in1299_conflict; infer_instance
The conflict relation matches the precomputed adjacency table, the coloring is proper on the conflict graph, and conflict adjacency is symmetric. automation
Kernel evaluation (`decide +kernel`) verifies by exhaustive computation over all pairs of edges that the geometric conflict relation coincides with the adjacency list table `in1299_confl`, that no two adjacent edges in this graph share a color under `in1299_col`, and that the adjacency table is symmetric.
theorem in1299_conf_iff : ∀ i j, in1299_conflict i j ↔ j ∈ in1299_confl i := by decide +kernel theorem in1299_proper : ∀ i, ∀ j ∈ in1299_confl i, in1299_col i ≠ in1299_col j := by decide +kernel theorem in1299_symm : ∀ i, ∀ j ∈ in1299_confl i, i ∈ in1299_confl j := by decide +kernel
The precomputed tables define valid rooted spanning trees for every two-colored subgraph, and the component root function is locally constant and idempotent. automation
For every pair of distinct colors a, b, the lemmas `in1299_T1`, `in1299_T2`, and `in1299_T3` are verified by kernel computation (`decide +kernel`). They establish that `in1299_par` and `in1299_dep` define a spanning forest whose roots are depth-0 vertices, that conflicting edges of the given colors share the same root, and that taking the root is idempotent and preserves colors in {a, b}.
theorem in1299_T1 : ∀ a b j, a ≠ b → (in1299_col j = a ∨ in1299_col j = b) → (in1299_dep a b j = 0 → in1299_root a b j = j) ∧ (in1299_dep a b j ≠ 0 → in1299_par a b j ∈ in1299_confl j ∧ (in1299_col (in1299_par a b j) = a ∨ in1299_col (in1299_par a b j) = b) ∧ in1299_dep a b (in1299_par a b j) + 1 = in1299_dep a b j ∧ in1299_root a b (in1299_par a b j) = in1299_root a b j) := by decide +kernel set_option maxRecDepth 10000 in theorem in1299_T2 : ∀ a b x, a ≠ b → ∀ y ∈ in1299_confl x, (in1299_col x = a ∨ in1299_col x = b) → (in1299_col y = a ∨ in1299_col y = b) → in1299_root a b x = in1299_root a b y := by decide +kernel theorem in1299_T3 : ∀ a b j, a ≠ b → (in1299_col j = a ∨ in1299_col j = b) → in1299_root a b (in1299_root a b j) = in1299_root a b j ∧ (in1299_col (in1299_root a b j) = a ∨ in1299_col (in1299_root a b j) = b) := by decide +kernel
After any two-color component swap, edges 16 and 21 still have the same color, and valid alternating chains connect them for every other color. automation
Kernel computation (`decide +kernel`) verifies `in1299_T4`. For all color pairs a, b and component roots r, the functional swap `in1299_swapF` assigns the same color to edges 16 and 21. Furthermore, for every choice of a second color y distinct from c(16), the precomputed certificate list `in1299_cert` contains valid bidirectional alternating chains in colors {c(16), y} connecting edge 16 to edge 21.
theorem in1299_T4 : ∀ a b r, a ≠ b → (in1299_col r = a ∨ in1299_col r = b) → in1299_root a b r = r → in1299_swapF a b r 16 = in1299_swapF a b r 21 ∧ ∀ y, y ≠ in1299_swapF a b r 16 → in1299_certOK a b r y = true := by decide +kernel
Alternating chains in two colors preserve membership in any conflict-closed component of those colors.
By induction on the list of intermediate edges in the chain. The base case of an empty chain is trivial because the start and end edges coincide. In the inductive step, the next edge k in the chain is a conflict neighbor of the current edge s with one of the two active colors; since T is closed under conflict neighbors of those colors and s ∈ T, k must also belong to T. The inductive hypothesis then guarantees that the destination edge t belongs to T.
uses
in1299_conf_iff,decide_eq_true_eq,Bool.and_eq_true,Bool.or_eq_truetheorem in1299_chain_sound (c : Fin 36 → Fin 6) (x y : Fin 6) (T : Finset (Fin 36)) (hcl : ∀ i ∈ T, ∀ j, in1299_conflict i j → (c j = x ∨ c j = y) → j ∈ T) : ∀ s l t, in1299_chainOK c x y s l t = true → s ∈ T → t ∈ T := by intro s l induction l generalizing s with | nil => intro t h hs; simp only [in1299_chainOK, decide_eq_true_eq] at h; exact h ▸ hs | cons k l ih => intro t h hs simp only [in1299_chainOK, Bool.and_eq_true, Bool.or_eq_true, decide_eq_true_eq] at h exact ih k t h.2 (hcl s hs k ((in1299_conf_iff s k).2 h.1.1) h.1.2)
An edge with color a or b belongs to the Kempe component S if and only if its component root belongs to S.
The hypotheses of hS (that S is a nonempty, conflict-closed, connected component of colors a and b) are unpacked. By induction on depth n = in1299_dep a b j, if the depth is 0 then j is its own root by `in1299_T1`. For positive depth, `in1299_T1` provides a parent edge p of depth n sharing the same root. Because p is adjacent to j in the conflict graph (via `in1299_conf_iff` and symmetry `in1299_symm`) and has color a or b, the closure condition of S ensures j ∈ S ↔ p ∈ S. The induction hypothesis for p completes the equivalence.
uses
in1299_T1,in1299_conf_iff,in1299_symmobtain ⟨hab, ⟨i, hi⟩, hS3, hS4, hS5⟩ := hS have key : ∀ n j, in1299_dep a b j = n → (in1299_col j = a ∨ in1299_col j = b) → (j ∈ S ↔ in1299_root a b j ∈ S) := by intro n induction n with | zero => intro j hd hc; rw [(in1299_T1 a b j hab hc).1 hd] | succ n ih => intro j hd hc obtain ⟨hp, hpc, hpd, hpr⟩ := (in1299_T1 a b j hab hc).2 (by omega) have h1 := ih (in1299_par a b j) (by omega) hpc rw [hpr] at h1 rw [← h1] constructor · intro hj; exact hS4 j hj _ ((in1299_conf_iff _ _).2 hp) hpc · intro hp'; exact hS4 _ hp' j ((in1299_conf_iff _ _).2 (in1299_symm _ _ hp)) hc
The component S consists of all edges sharing the root of a witness element, so the first swap matches the functional swap in1299_swapF, after which edges 16 and 21 have the same color.
Using reflexivity and transitivity of the connected component relation and `in1299_T2`, every edge in S shares the same root as the witness i ∈ S. Conversely, any edge of color a or b sharing this root belongs to S by the depth equivalence. Thus S coincides with the component defined by root r = in1299_root a b i, making `in1299_swap` equal to `in1299_swapF`. Rewriting with this equality and applying `in1299_T3` and `in1299_T4` shows that in the new coloring c, edges 16 and 21 have the same color c(16) = c(21), and certificate chains exist connecting them for all other colors.
uses
in1299_T2,in1299_conf_iff,in1299_T3,in1299_T4have hSeq : ∀ j, j ∈ S ↔ ((in1299_col j = a ∨ in1299_col j = b) ∧ in1299_root a b j = in1299_root a b i) := by intro j constructor · intro hj refine ⟨hS3 j hj, ?_⟩ have hr := hS5 i hi j hj induction hr with | refl => rfl | tail _ hyz ih => obtain ⟨hy, hz, hc⟩ := hyz rw [← ih hy] exact (in1299_T2 a b _ hab _ ((in1299_conf_iff _ _).1 hc) (hS3 _ hy) (hS3 _ hz)).symm · rintro ⟨hc, hr⟩ rw [key _ j rfl hc, hr, ← key _ i rfl (hS3 i hi)] exact hi have hsw : in1299_swap in1299_col a b S = in1299_swapF a b (in1299_root a b i) := by funext j simp only [in1299_swap, in1299_swapF, hSeq] rw [hsw] at hT ⊢ obtain ⟨hr1, hr2⟩ := in1299_T3 a b i hab (hS3 i hi) have h4 := in1299_T4 a b (in1299_root a b i) hab hr2 hr1 set c := in1299_swapF a b (in1299_root a b i) with hc obtain ⟨hde, -, hT3, hT4, -⟩ := hT
The second Kempe component swap preserves the color equality of edges 16 and 21.
An auxiliary lemma shows that if s ∈ T has color c(16) and there is an alternating chain in colors {c(16), y} to t, where y ∈ {d, e} is the second color of T, then t ∈ T by `in1299_chain_sound`. Applying this with the certificate chains from `in1299_T4` in both directions yields 16 ∈ T ↔ 21 ∈ T. Finally, by case analysis on whether 16 ∈ T, either both edges swap together to the other color (using `if_pos`), or neither edge swaps (using `if_neg`). In both cases, their colors remain equal.
uses
in1299_chain_sound,Bool.and_eq_true,if_pos,if_neghave hiff : 16 ∈ T ↔ 21 ∈ T := by have aux : ∀ s t : Fin 36, c s = c 16 → s ∈ T → (∀ y, y ≠ c 16 → ∃ l, in1299_chainOK c (c 16) y s l t = true) → t ∈ T := by intro s t hs hsT hch have hx := hT3 s hsT rw [hs] at hx let y : Fin 6 := if c 16 = d then e else d have hy : y ≠ c 16 := by simp only [y]; split_ifs with h · rw [h]; exact fun h' => hde h'.symm · exact fun h' => h h'.symm obtain ⟨l, hl⟩ := hch y hy apply in1299_chain_sound c (c 16) y T _ s l t hl hsT intro i' hi' j hj hcj apply hT4 i' hi' j hj rcases hcj with h | h · rw [h]; exact hx · rw [h]; simp only [y]; split_ifs with h' · right; rfl · left; rfl have hcert : ∀ y, y ≠ c 16 → in1299_certOK a b (in1299_root a b i) y = true := h4.2 constructor · intro h16 refine aux 16 21 rfl h16 (fun y hy => ?_) have := hcert y hy unfold in1299_certOK at this split at this · simp only [Bool.and_eq_true] at this exact ⟨_, this.1⟩ · exact absurd this (by simp) · intro h21 refine aux 21 16 h4.1.symm h21 (fun y hy => ?_) have := hcert y hy unfold in1299_certOK at this split at this · simp only [Bool.and_eq_true] at this exact ⟨_, this.2⟩ · exact absurd this (by simp) unfold in1299_swap by_cases h16 : 16 ∈ T · rw [if_pos h16, if_pos (hiff.1 h16), h4.1] · rw [if_neg h16, if_neg (fun h => h16 (hiff.2 h)), h4.1]
The initial coloring is proper, edges 16 and 21 share a color, and two component swaps cannot separate edges 16 and 21.
The local definitions are introduced, and the goal is split into three parts: properness of the coloring follows from `in1299_proper` and `in1299_conf_iff`; equality of the initial colors of 16 and 21 holds by definition (`rfl`); and invariance under two component swaps follows immediately from `in1299_main`.
uses
in1299_main,in1299_proper,in1299_conf_iffintro L R color meet conflict valid swap refine ⟨fun i j h => ?_, rfl, fun a b d e S T hS hT => in1299_main a b d e S T hS hT⟩ exact in1299_proper i j ((in1299_conf_iff i j).1 h)
in1299_conf_iff- Two edges are in conflict if and only if the second edge appears in the precomputed conflict adjacency list of the first.
in1299_proper- Any two conflicting edges have different colors under in1299_col, so the coloring is proper on the conflict graph.
in1299_symm- The conflict relation given by the adjacency table in1299_confl is symmetric.
in1299_T1- For an edge colored a or b, depth 0 indicates a component root; positive depth steps to a parent edge of color a or b with depth decremented by 1 and having the same root.
in1299_T2- Any two conflicting edges colored a or b have the same component root.
in1299_T3- The root operation for colors a and b is idempotent, and the root of an edge of color a or b itself has color a or b.
in1299_T4- After swapping colors a and b on the component rooted at r, edges 16 and 21 have the same color, and for every other color y, an alternating two-color path certificate connects edges 16 and 21 in both directions.
in1299_chain_sound- If T is closed under conflict neighbors of colors x and y, and an alternating chain in colors {x, y} connects s to t, then s ∈ T implies t ∈ T.
in1299_main- Starting from in1299_col, after any valid Kempe component swap on S followed by a valid Kempe component swap on T, edges 16 and 21 have the same color.
decide_eq_true_eq- A decidable proposition evaluates to true under decide if and only if the proposition holds.
Bool.and_eq_true- A boolean conjunction is true if and only if both boolean operands are true.
Bool.or_eq_true- A boolean disjunction is true if and only if at least one boolean operand is true.
if_pos- An if-then-else expression evaluates to the then-branch when the condition is true.
if_neg- An if-then-else expression evaluates to the else-branch when the condition is false.
- Several key combinatorial lemmas (in1299_conf_iff, in1299_proper, in1299_symm, in1299_T1, in1299_T2, in1299_T3, in1299_T4) are verified entirely by exhaustive computation in the Lean kernel (`decide +kernel`) over the 36 edges and the look-up tables.
- Conflict between two edges is defined as distance at most 2 in the line graph, which corresponds to the edges sharing a vertex or both sharing a vertex with a common third edge.
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.
def in1299_root : Fin 6 → Fin 6 → Fin 36 → Fin 36 := ![![![0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],![0,1,2,3,2,5,6,7,8,8,10,11,2,13,14,15,16,17,18,19,8,21,22,8,24,25,26,2,28,29,2,2,32,8,34,8],![0,1,2,3,0,5,6,7,8,9,8,11,0,13,14,0,16,8,18,19,20,21,22,8,24,25,26,27,28,29,30,31,31,8,8,35],![0,1,2,3,1,5,1,7,1,9,10,11,1,13,14,15,1,17,18,19,20,1,22,1,1,25,26,27,1,29,30,1,32,1,34,35],![0,1,2,3,3,5,6,7,7,9,10,11,7,13,7,15,16,17,18,7,20,21,22,7,24,7,26,27,28,3,30,3,32,7,34,35],![0,1,2,3,4,4,6,7,4,9,10,4,4,4,14,15,16,17,4,19,20,21,22,22,24,25,4,27,28,29,30,4,32,4,34,35]],![![0,1,2,3,2,5,6,7,8,8,10,11,2,13,14,15,16,17,18,19,8,21,22,8,24,25,26,2,28,29,2,2,32,8,34,8],![0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],![0,1,0,3,4,5,6,7,8,9,9,11,12,13,14,0,16,9,18,19,9,21,22,23,24,25,26,0,28,29,0,31,0,33,9,9],![0,1,1,3,4,5,6,7,8,6,10,11,12,13,14,15,1,17,18,19,1,1,22,23,1,25,26,27,27,29,1,31,32,33,34,1],![0,1,2,2,4,5,6,7,8,7,10,11,12,13,2,15,16,17,18,2,2,21,22,23,24,2,26,2,28,2,2,31,32,33,34,2],![0,1,2,3,4,2,6,7,8,2,10,2,12,2,14,15,16,17,2,19,2,21,2,23,24,25,26,26,28,29,2,31,32,33,34,2]],![![0,1,2,3,0,5,6,7,8,9,8,11,0,13,14,0,16,8,18,19,20,21,22,8,24,25,26,27,28,29,30,31,31,8,8,35],![0,1,0,3,4,5,6,7,8,9,9,11,12,13,14,0,16,9,18,19,9,21,22,23,24,25,26,0,28,29,0,31,0,33,9,9],![0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],![0,0,2,3,4,5,6,7,8,9,6,11,12,13,14,6,6,6,18,19,20,6,22,23,6,25,26,27,6,29,30,31,6,33,6,35],![0,1,2,0,4,5,6,7,8,9,7,11,12,13,7,7,16,7,18,7,20,21,22,23,24,7,26,27,28,7,30,31,7,33,7,35],![0,1,2,3,4,0,6,7,8,9,0,0,12,0,14,0,16,0,0,19,20,21,0,23,24,25,0,27,28,29,30,31,0,33,0,35]],![![0,1,2,3,1,5,1,7,1,9,10,11,1,13,14,15,1,17,18,19,20,1,22,1,1,25,26,27,1,29,30,1,32,1,34,35],![0,1,1,3,4,5,6,7,8,6,10,11,12,13,14,15,1,17,18,19,1,1,22,23,1,25,26,27,27,29,1,31,32,33,34,1],![0,0,2,3,4,5,6,7,8,9,6,11,12,13,14,6,6,6,18,19,20,6,22,23,6,25,26,27,6,29,30,31,6,33,6,35],![0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],![0,1,2,1,4,5,6,6,8,9,10,11,12,13,14,15,14,17,18,14,20,14,22,23,14,14,26,27,14,14,30,31,32,33,34,35],![0,1,2,3,4,1,1,7,8,9,10,1,12,1,14,15,1,17,1,19,20,1,1,23,1,25,26,27,26,29,30,31,32,33,34,35]],![![0,1,2,3,3,5,6,7,7,9,10,11,7,13,7,15,16,17,18,7,20,21,22,7,24,7,26,27,28,3,30,3,32,7,34,35],![0,1,2,2,4,5,6,7,8,7,10,11,12,13,2,15,16,17,18,2,2,21,22,23,24,2,26,2,28,2,2,31,32,33,34,2],![0,1,2,0,4,5,6,7,8,9,7,11,12,13,7,7,16,7,18,7,20,21,22,23,24,7,26,27,28,7,30,31,7,33,7,35],![0,1,2,1,4,5,6,6,8,9,10,11,12,13,14,15,14,17,18,14,20,14,22,23,14,14,26,27,14,14,30,31,32,33,34,35],![0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],![0,1,2,3,4,3,6,7,8,9,10,7,12,3,3,15,16,17,7,7,20,21,7,23,24,7,3,27,28,3,30,31,32,33,34,35]],![![0,1,2,3,4,4,6,7,4,9,10,4,4,4,14,15,16,17,4,19,20,21,22,22,24,25,4,27,28,29,30,4,32,4,34,35],![0,1,2,3,4,2,6,7,8,2,10,2,12,2,14,15,16,17,2,19,2,21,2,23,24,25,26,26,28,29,2,31,32,33,34,2],![0,1,2,3,4,0,6,7,8,9,0,0,12,0,14,0,16,0,0,19,20,21,0,23,24,25,0,27,28,29,30,31,0,33,0,35],![0,1,2,3,4,1,1,7,8,9,10,1,12,1,14,15,1,17,1,19,20,1,1,23,1,25,26,27,26,29,30,31,32,33,34,35],![0,1,2,3,4,3,6,7,8,9,10,7,12,3,3,15,16,17,7,7,20,21,7,23,24,7,3,27,28,3,30,31,32,33,34,35],![0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35]]]def in1299_par : Fin 6 → Fin 6 → Fin 36 → Fin 36 := ![![![0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],![0,1,2,3,2,5,6,7,8,8,10,11,2,13,14,15,16,17,18,19,8,21,22,9,24,25,26,4,28,29,31,27,32,9,34,23],![0,1,2,3,0,5,6,7,8,9,8,11,0,13,14,4,16,8,18,19,20,21,22,10,24,25,26,27,28,29,30,31,31,34,23,35],![0,1,2,3,1,5,8,7,21,9,10,11,1,13,14,15,12,17,18,19,20,31,22,6,23,25,26,27,4,29,30,1,32,16,34,35],![0,1,2,3,3,5,6,7,7,9,10,11,14,13,33,15,16,17,18,8,20,21,22,25,24,33,26,27,28,4,30,3,32,7,34,35],![0,1,2,3,4,4,6,7,11,9,10,33,26,12,14,15,16,17,8,19,20,21,22,22,24,25,4,27,28,29,30,5,32,13,34,35]],![![0,1,2,3,2,5,6,7,8,8,10,11,2,13,14,15,16,17,18,19,8,21,22,9,24,25,26,4,28,29,31,27,32,9,34,23],![0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],![0,1,0,3,4,5,6,7,8,9,9,11,12,13,14,2,16,20,18,19,10,21,22,23,24,25,26,0,28,29,32,31,27,33,9,34],![0,1,1,3,4,5,6,7,8,6,10,11,12,13,14,15,2,17,18,19,21,30,22,23,35,25,26,27,27,29,1,31,32,33,34,16],![0,1,2,2,4,5,6,7,8,7,10,11,12,13,2,15,16,17,18,30,19,21,22,23,24,35,26,3,28,27,3,31,32,33,34,14],![0,1,2,3,4,2,6,7,8,11,10,35,12,2,14,15,16,17,30,19,18,21,20,23,24,25,26,26,28,29,5,31,32,33,34,13]],![![0,1,2,3,0,5,6,7,8,9,8,11,0,13,14,4,16,8,18,19,20,21,22,10,24,25,26,27,28,29,30,31,31,34,23,35],![0,1,0,3,4,5,6,7,8,9,9,11,12,13,14,2,16,20,18,19,10,21,22,23,24,25,26,0,28,29,32,31,27,33,9,34],![0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],![0,0,2,3,4,5,6,7,8,9,6,11,12,13,14,16,34,6,18,19,20,17,22,23,10,25,26,27,32,29,30,31,21,33,24,35],![0,1,2,0,4,5,6,7,8,9,7,11,12,13,15,29,16,7,18,17,20,21,22,23,24,10,26,27,28,32,30,31,19,33,7,35],![0,1,2,3,4,0,6,7,8,9,22,10,12,0,14,13,16,18,32,19,20,21,17,23,24,25,0,27,28,29,30,31,5,33,11,35]],![![0,1,2,3,1,5,8,7,21,9,10,11,1,13,14,15,12,17,18,19,20,31,22,6,23,25,26,27,4,29,30,1,32,16,34,35],![0,1,1,3,4,5,6,7,8,6,10,11,12,13,14,15,2,17,18,19,21,30,22,23,35,25,26,27,27,29,1,31,32,33,34,16],![0,0,2,3,4,5,6,7,8,9,6,11,12,13,14,16,34,6,18,19,20,17,22,23,10,25,26,27,32,29,30,31,21,33,24,35],![0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],![0,1,2,1,4,5,6,6,8,9,10,11,12,13,14,15,14,17,18,24,20,29,22,23,25,16,26,27,14,28,30,31,32,33,34,35],![0,1,2,3,4,1,18,7,8,9,10,16,12,1,14,15,13,17,21,19,20,5,6,23,22,25,26,27,26,29,30,31,32,33,34,35]],![![0,1,2,3,3,5,6,7,7,9,10,11,14,13,33,15,16,17,18,8,20,21,22,25,24,33,26,27,28,4,30,3,32,7,34,35],![0,1,2,2,4,5,6,7,8,7,10,11,12,13,2,15,16,17,18,30,19,21,22,23,24,35,26,3,28,27,3,31,32,33,34,14],![0,1,2,0,4,5,6,7,8,9,7,11,12,13,15,29,16,7,18,17,20,21,22,23,24,10,26,27,28,32,30,31,19,33,7,35],![0,1,2,1,4,5,6,6,8,9,10,11,12,13,14,15,14,17,18,24,20,29,22,23,25,16,26,27,14,28,30,31,32,33,34,35],![0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],![0,1,2,3,4,3,6,7,8,9,10,7,12,14,26,15,16,17,7,18,20,21,25,23,24,11,3,27,28,5,30,31,32,33,34,35]],![![0,1,2,3,4,4,6,7,11,9,10,33,26,12,14,15,16,17,8,19,20,21,22,22,24,25,4,27,28,29,30,5,32,13,34,35],![0,1,2,3,4,2,6,7,8,11,10,35,12,2,14,15,16,17,30,19,18,21,20,23,24,25,26,26,28,29,5,31,32,33,34,13],![0,1,2,3,4,0,6,7,8,9,22,10,12,0,14,13,16,18,32,19,20,21,17,23,24,25,0,27,28,29,30,31,5,33,11,35],![0,1,2,3,4,1,18,7,8,9,10,16,12,1,14,15,13,17,21,19,20,5,6,23,22,25,26,27,26,29,30,31,32,33,34,35],![0,1,2,3,4,3,6,7,8,9,10,7,12,14,26,15,16,17,7,18,20,21,25,23,24,11,3,27,28,5,30,31,32,33,34,35],![0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35]]]def in1299_dep : Fin 6 → Fin 6 → Fin 36 → ℕ := ![![![0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],![0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,0,0,2,0,0,0,2,0,0,4,3,0,2,0,3],![0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,2,0,1,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,4,3,0],![0,0,0,0,1,0,4,0,3,0,0,0,1,0,0,0,2,0,0,0,0,2,0,5,6,0,0,0,2,0,0,1,0,3,0,0],![0,0,0,0,1,0,0,0,1,0,0,0,3,0,2,0,0,0,0,2,0,0,0,3,0,2,0,0,0,2,0,1,0,1,0,0],![0,0,0,0,0,1,0,0,6,0,0,5,2,3,0,0,0,0,7,0,0,0,0,1,0,0,1,0,0,0,0,2,0,4,0,0]],![![0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,0,0,2,0,0,0,2,0,0,4,3,0,2,0,3],![0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],![0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,2,0,3,0,0,2,0,0,0,0,0,0,1,0,0,3,0,2,0,1,2],![0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,3,2,0,0,4,0,0,0,1,0,1,0,0,0,0,3],![0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,3,4,0,0,0,0,3,0,2,0,3,2,0,0,0,0,2],![0,0,0,0,0,1,0,0,0,4,0,3,0,1,0,0,0,0,3,0,4,0,5,0,0,0,0,1,0,0,2,0,0,0,0,2]],![![0,0,0,0,1,0,0,0,0,0,1,0,1,0,0,2,0,1,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,4,3,0],![0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,2,0,3,0,0,2,0,0,0,0,0,0,1,0,0,3,0,2,0,1,2],![0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],![0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,5,4,1,0,0,0,2,0,0,2,0,0,0,4,0,0,0,3,0,3,0],![0,0,0,1,0,0,0,0,0,0,1,0,0,0,6,5,0,1,0,2,0,0,0,0,0,2,0,0,0,4,0,0,3,0,1,0],![0,0,0,0,0,1,0,0,0,0,6,7,0,1,0,2,0,4,3,0,0,0,5,0,0,0,1,0,0,0,0,0,2,0,8,0]],![![0,0,0,0,1,0,4,0,3,0,0,0,1,0,0,0,2,0,0,0,0,2,0,5,6,0,0,0,2,0,0,1,0,3,0,0],![0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,3,2,0,0,4,0,0,0,1,0,1,0,0,0,0,3],![0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,5,4,1,0,0,0,2,0,0,2,0,0,0,4,0,0,0,3,0,3,0],![0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],![0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,4,0,3,0,0,3,2,0,0,1,2,0,0,0,0,0,0],![0,0,0,0,0,1,4,0,0,0,0,3,0,1,0,0,2,0,3,0,0,2,5,0,6,0,0,0,1,0,0,0,0,0,0,0]],![![0,0,0,0,1,0,0,0,1,0,0,0,3,0,2,0,0,0,0,2,0,0,0,3,0,2,0,0,0,2,0,1,0,1,0,0],![0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,3,4,0,0,0,0,3,0,2,0,3,2,0,0,0,0,2],![0,0,0,1,0,0,0,0,0,0,1,0,0,0,6,5,0,1,0,2,0,0,0,0,0,2,0,0,0,4,0,0,3,0,1,0],![0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,4,0,3,0,0,3,2,0,0,1,2,0,0,0,0,0,0],![0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],![0,0,0,0,0,1,0,0,0,0,0,1,0,3,2,0,0,0,1,2,0,0,3,0,0,2,1,0,0,2,0,0,0,0,0,0]],![![0,0,0,0,0,1,0,0,6,0,0,5,2,3,0,0,0,0,7,0,0,0,0,1,0,0,1,0,0,0,0,2,0,4,0,0],![0,0,0,0,0,1,0,0,0,4,0,3,0,1,0,0,0,0,3,0,4,0,5,0,0,0,0,1,0,0,2,0,0,0,0,2],![0,0,0,0,0,1,0,0,0,0,6,7,0,1,0,2,0,4,3,0,0,0,5,0,0,0,1,0,0,0,0,0,2,0,8,0],![0,0,0,0,0,1,4,0,0,0,0,3,0,1,0,0,2,0,3,0,0,2,5,0,6,0,0,0,1,0,0,0,0,0,0,0],![0,0,0,0,0,1,0,0,0,0,0,1,0,3,2,0,0,0,1,2,0,0,3,0,0,2,1,0,0,2,0,0,0,0,0,0],![0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]]def in1299_confl : Fin 36 → List (Fin 36) := ![[1,2,3,4,5,12,13,26,27],[0,2,3,4,5,12,13,30,31],[0,1,3,4,5,12,13,14,15,16],[0,1,2,4,5,26,27,30,31],[0,1,2,3,5,15,26,27,28,29],[0,1,2,3,4,21,29,30,31,32],[7,8,9,10,11,17,18,22,23],[6,8,9,10,11,17,18,33,34],[6,7,9,10,11,17,18,19,20,21],[6,7,8,10,11,22,23,33,34],[6,7,8,9,11,20,22,23,24,25],[6,7,8,9,10,16,25,33,34,35],[0,1,2,13,14,15,16,26,28],[0,1,2,12,14,15,16,33,35],[2,12,13,15,16,26,28,33,35],[2,4,12,13,14,16,26,27,28,29],[2,11,12,13,14,15,25,33,34,35],[6,7,8,18,19,20,21,22,24],[6,7,8,17,19,20,21,30,32],[8,17,18,20,21,22,24,30,32],[8,10,17,18,19,21,22,23,24,25],[5,8,17,18,19,20,29,30,31,32],[6,9,10,17,19,20,23,24,25],[6,9,10,20,22,24,25,34,35],[10,17,19,20,22,23,25,34,35],[10,11,16,20,22,23,24,33,34,35],[0,3,4,12,14,15,27,28,29],[0,3,4,15,26,28,29,31,32],[4,12,14,15,26,27,29,31,32],[4,5,15,21,26,27,28,30,31,32],[1,3,5,18,19,21,29,31,32],[1,3,5,21,27,28,29,30,32],[5,18,19,21,27,28,29,30,31],[7,9,11,13,14,16,25,34,35],[7,9,11,16,23,24,25,33,35],[11,13,14,16,23,24,25,33,34]]def in1299_cert : List (Fin 6 × Fin 6 × Fin 36 × Fin 6 × List (Fin 36) × List (Fin 36)) := [(0,1,2,0,[2,1,30,21],[30,1,2,16]),(0,1,2,1,[12,1,31,21],[20,24,35,16]),(0,1,2,2,[15,28,32,21],[17,24,34,16]),(0,1,2,4,[14,28,29,21],[19,24,25,16]),(0,1,2,5,[11,6,18,21],[5,1,13,16]),(0,1,8,0,[12,1,31,21],[20,24,35,16]),(0,1,8,1,[2,1,30,21],[30,1,2,16]),(0,1,8,2,[15,28,32,21],[17,24,34,16]),(0,1,8,4,[14,28,29,21],[19,24,25,16]),(0,1,8,5,[11,6,18,21],[5,1,13,16]),(0,2,0,0,[15,28,31,21],[31,28,15,16]),(0,2,0,1,[2,1,30,21],[20,24,35,16]),(0,2,0,2,[12,28,32,21],[17,24,34,16]),(0,2,0,4,[14,28,29,21],[19,24,25,16]),(0,2,0,5,[11,6,18,21],[5,1,13,16]),(0,2,8,0,[12,1,31,21],[17,24,34,16]),(0,2,8,1,[2,1,30,21],[20,24,35,16]),(0,2,8,2,[15,28,32,21],[32,28,15,16]),(0,2,8,4,[14,28,29,21],[19,24,25,16]),(0,2,8,5,[11,6,18,21],[5,1,13,16]),(0,2,31,0,[12,28,32,21],[32,28,12,16]),(0,2,31,1,[2,1,30,21],[20,24,35,16]),(0,2,31,2,[15,28,31,21],[17,24,34,16]),(0,2,31,4,[14,28,29,21],[19,24,25,16]),(0,2,31,5,[11,6,18,21],[5,1,13,16]),(0,3,1,1,[2,1,30,21],[20,24,35,16]),(0,3,1,2,[15,28,32,21],[17,24,34,16]),(0,3,1,3,[12,1,31,21],[31,1,12,16]),(0,3,1,4,[14,28,29,21],[19,24,25,16]),(0,3,1,5,[11,6,18,21],[5,1,13,16]),(0,4,3,0,[12,28,29,21],[29,28,12,16]),(0,4,3,1,[2,1,30,21],[20,24,35,16]),(0,4,3,2,[15,28,32,21],[17,24,34,16]),(0,4,3,4,[14,28,31,21],[19,24,25,16]),(0,4,3,5,[11,6,18,21],[5,1,13,16]),(0,4,7,0,[14,28,31,21],[19,24,25,16]),(0,4,7,1,[2,1,30,21],[20,24,35,16]),(0,4,7,2,[15,28,32,21],[17,24,34,16]),(0,4,7,4,[12,28,29,21],[29,28,12,16]),(0,4,7,5,[11,6,18,21],[5,1,13,16]),(0,5,4,0,[11,6,18,21],[5,1,13,16]),(0,5,4,1,[2,1,30,21],[20,24,35,16]),(0,5,4,2,[15,28,32,21],[17,24,34,16]),(0,5,4,4,[14,28,29,21],[19,24,25,16]),(0,5,4,5,[12,1,31,21],[31,1,12,16]),(0,5,22,0,[12,1,31,21],[31,1,12,16]),(0,5,22,1,[2,1,30,21],[20,24,35,16]),(0,5,22,2,[15,28,32,21],[17,24,34,16]),(0,5,22,4,[14,28,29,21],[19,24,25,16]),(0,5,22,5,[11,6,18,21],[5,1,13,16]),(1,0,2,0,[2,1,30,21],[30,1,2,16]),(1,0,2,1,[12,1,31,21],[20,24,35,16]),(1,0,2,2,[15,28,32,21],[17,24,34,16]),(1,0,2,4,[14,28,29,21],[19,24,25,16]),(1,0,2,5,[11,6,18,21],[5,1,13,16]),(1,0,8,0,[12,1,31,21],[20,24,35,16]),(1,0,8,1,[2,1,30,21],[30,1,2,16]),(1,0,8,2,[15,28,32,21],[17,24,34,16]),(1,0,8,4,[14,28,29,21],[19,24,25,16]),(1,0,8,5,[11,6,18,21],[5,1,13,16]),(1,2,0,0,[12,1,31,21],[31,1,12,16]),(1,2,0,1,[15,28,32,21],[20,24,35,16]),(1,2,0,2,[2,1,30,21],[17,24,34,16]),(1,2,0,4,[14,28,29,21],[19,24,25,16]),(1,2,0,5,[11,6,18,21],[5,1,13,16]),(1,2,9,0,[12,1,31,21],[31,1,12,16]),(1,2,9,1,[2,1,30,21],[17,24,34,16]),(1,2,9,2,[15,28,32,21],[20,24,35,16]),(1,2,9,4,[14,28,29,21],[19,24,25,16]),(1,2,9,5,[11,6,18,21],[5,1,13,16]),(1,3,1,0,[12,1,31,21],[8,9,33,16]),(1,3,1,2,[15,27,32,21],[17,24,34,16]),(1,3,1,3,[2,1,30,21],[20,24,35,16]),(1,3,1,4,[25,24,19,21],[19,24,25,16]),(1,3,1,5,[13,1,5,21],[5,1,13,16]),(1,3,6,0,[12,1,31,21],[8,9,33,16]),(1,3,6,1,[2,1,30,21],[20,24,35,16]),(1,3,6,2,[15,28,32,21],[17,24,34,16]),(1,3,6,4,[14,28,29,21],[19,24,25,16]),(1,3,6,5,[13,1,5,21],[5,1,13,16]),(1,3,27,0,[12,1,31,21],[31,1,12,16]),(1,3,27,1,[2,1,30,21],[20,24,35,16]),(1,3,27,2,[15,27,32,21],[17,24,34,16]),(1,3,27,4,[25,24,19,21],[19,24,25,16]),(1,3,27,5,[11,6,18,21],[5,1,13,16]),(1,4,2,0,[12,1,31,21],[31,1,12,16]),(1,4,2,1,[14,28,29,21],[19,24,25,16]),(1,4,2,2,[15,28,32,21],[17,24,34,16]),(1,4,2,4,[2,1,30,21],[20,24,35,16]),(1,4,2,5,[11,6,18,21],[5,1,13,16]),(1,4,7,0,[12,1,31,21],[31,1,12,16]),(1,4,7,1,[2,1,30,21],[20,24,35,16]),(1,4,7,2,[15,28,32,21],[17,24,34,16]),(1,4,7,4,[14,28,29,21],[19,24,25,16]),(1,4,7,5,[11,6,18,21],[5,1,13,16]),(1,5,2,0,[12,1,31,21],[31,1,12,16]),(1,5,2,1,[11,6,18,21],[5,1,13,16]),(1,5,2,2,[15,28,32,21],[17,24,34,16]),(1,5,2,4,[14,28,29,21],[19,24,25,16]),(1,5,2,5,[2,1,30,21],[20,24,35,16]),(1,5,26,0,[12,1,31,21],[31,1,12,16]),(1,5,26,1,[2,1,30,21],[20,24,35,16]),(1,5,26,2,[15,28,32,21],[17,24,34,16]),(1,5,26,4,[14,28,29,21],[19,24,25,16]),(1,5,26,5,[11,6,18,21],[5,1,13,16]),(2,0,0,0,[15,28,31,21],[31,28,15,16]),(2,0,0,1,[2,1,30,21],[20,24,35,16]),(2,0,0,2,[12,28,32,21],[17,24,34,16]),(2,0,0,4,[14,28,29,21],[19,24,25,16]),(2,0,0,5,[11,6,18,21],[5,1,13,16]),(2,0,8,0,[12,1,31,21],[17,24,34,16]),(2,0,8,1,[2,1,30,21],[20,24,35,16]),(2,0,8,2,[15,28,32,21],[32,28,15,16]),(2,0,8,4,[14,28,29,21],[19,24,25,16]),(2,0,8,5,[11,6,18,21],[5,1,13,16]),(2,0,31,0,[12,28,32,21],[32,28,12,16]),(2,0,31,1,[2,1,30,21],[20,24,35,16]),(2,0,31,2,[15,28,31,21],[17,24,34,16]),(2,0,31,4,[14,28,29,21],[19,24,25,16]),(2,0,31,5,[11,6,18,21],[5,1,13,16]),(2,1,0,0,[12,1,31,21],[31,1,12,16]),(2,1,0,1,[15,28,32,21],[20,24,35,16]),(2,1,0,2,[2,1,30,21],[17,24,34,16]),(2,1,0,4,[14,28,29,21],[19,24,25,16]),(2,1,0,5,[11,6,18,21],[5,1,13,16]),(2,1,9,0,[12,1,31,21],[31,1,12,16]),(2,1,9,1,[2,1,30,21],[17,24,34,16]),(2,1,9,2,[15,28,32,21],[20,24,35,16]),(2,1,9,4,[14,28,29,21],[19,24,25,16]),(2,1,9,5,[11,6,18,21],[5,1,13,16]),(2,3,0,0,[12,28,31,21],[31,28,12,16]),(2,3,0,1,[35,24,20,21],[20,24,35,16]),(2,3,0,2,[15,28,32,21],[17,24,34,16]),(2,3,0,4,[14,28,29,21],[19,24,25,16]),(2,3,0,5,[11,6,18,21],[5,0,13,16]),(2,3,6,0,[12,28,31,21],[31,28,12,16]),(2,3,6,1,[35,24,20,21],[20,24,35,16]),(2,3,6,3,[15,28,32,21],[17,24,34,16]),(2,3,6,4,[14,28,29,21],[19,24,25,16]),(2,3,6,5,[11,6,18,21],[5,0,13,16]),(2,4,0,0,[12,1,31,21],[31,1,12,16]),(2,4,0,1,[2,1,30,21],[20,24,35,16]),(2,4,0,2,[15,28,32,21],[17,24,34,16]),(2,4,0,4,[14,28,29,21],[19,24,25,16]),(2,4,0,5,[11,6,18,21],[5,1,13,16]),(2,4,7,0,[12,1,31,21],[31,1,12,16]),(2,4,7,1,[2,1,30,21],[20,24,35,16]),(2,4,7,2,[14,28,29,21],[19,24,25,16]),(2,4,7,4,[15,28,32,21],[17,24,34,16]),(2,4,7,5,[11,6,18,21],[5,1,13,16]),(2,5,0,0,[12,1,31,21],[31,1,12,16]),(2,5,0,1,[2,1,30,21],[20,24,35,16]),(2,5,0,2,[11,6,18,21],[5,1,13,16]),(2,5,0,4,[14,28,29,21],[19,24,25,16]),(2,5,0,5,[15,28,32,21],[17,24,34,16]),(3,0,1,1,[2,1,30,21],[20,24,35,16]),(3,0,1,2,[15,28,32,21],[17,24,34,16]),(3,0,1,3,[12,1,31,21],[31,1,12,16]),(3,0,1,4,[14,28,29,21],[19,24,25,16]),(3,0,1,5,[11,6,18,21],[5,1,13,16]),(3,1,1,0,[12,1,31,21],[8,9,33,16]),(3,1,1,2,[15,27,32,21],[17,24,34,16]),(3,1,1,3,[2,1,30,21],[20,24,35,16]),(3,1,1,4,[25,24,19,21],[19,24,25,16]),(3,1,1,5,[13,1,5,21],[5,1,13,16]),(3,1,6,0,[12,1,31,21],[8,9,33,16]),(3,1,6,1,[2,1,30,21],[20,24,35,16]),(3,1,6,2,[15,28,32,21],[17,24,34,16]),(3,1,6,4,[14,28,29,21],[19,24,25,16]),(3,1,6,5,[13,1,5,21],[5,1,13,16]),(3,1,27,0,[12,1,31,21],[31,1,12,16]),(3,1,27,1,[2,1,30,21],[20,24,35,16]),(3,1,27,2,[15,27,32,21],[17,24,34,16]),(3,1,27,4,[25,24,19,21],[19,24,25,16]),(3,1,27,5,[11,6,18,21],[5,1,13,16]),(3,2,0,0,[12,28,31,21],[31,28,12,16]),(3,2,0,1,[35,24,20,21],[20,24,35,16]),(3,2,0,2,[15,28,32,21],[17,24,34,16]),(3,2,0,4,[14,28,29,21],[19,24,25,16]),(3,2,0,5,[11,6,18,21],[5,0,13,16]),(3,2,6,0,[12,28,31,21],[31,28,12,16]),(3,2,6,1,[35,24,20,21],[20,24,35,16]),(3,2,6,3,[15,28,32,21],[17,24,34,16]),(3,2,6,4,[14,28,29,21],[19,24,25,16]),(3,2,6,5,[11,6,18,21],[5,0,13,16]),(3,4,1,0,[12,28,31,21],[31,28,12,16]),(3,4,1,1,[2,3,30,21],[20,24,35,16]),(3,4,1,2,[15,28,32,21],[17,24,34,16]),(3,4,1,4,[14,28,29,21],[19,24,25,16]),(3,4,1,5,[11,6,18,21],[18,6,11,16]),(3,4,6,0,[12,1,31,21],[8,7,33,16]),(3,4,6,1,[2,1,30,21],[20,24,35,16]),(3,4,6,2,[15,28,32,21],[17,7,34,16]),(3,4,6,4,[14,28,29,21],[19,24,25,16]),(3,4,6,5,[11,7,18,21],[5,1,13,16]),(3,4,14,0,[12,28,31,21],[8,7,33,16]),(3,4,14,1,[2,3,30,21],[20,24,35,16]),(3,4,14,2,[15,28,32,21],[17,7,34,16]),(3,4,14,3,[14,28,29,21],[19,24,25,16]),(3,4,14,5,[11,7,18,21],[18,7,11,16]),(3,5,1,0,[12,1,31,21],[31,1,12,16]),(3,5,1,1,[2,1,30,21],[20,24,35,16]),(3,5,1,2,[34,24,17,21],[17,24,34,16]),(3,5,1,3,[11,6,18,21],[5,1,13,16]),(3,5,1,4,[14,26,29,21],[19,24,25,16]),(3,5,26,0,[12,1,31,21],[31,1,12,16]),(3,5,26,1,[2,1,30,21],[20,24,35,16]),(3,5,26,2,[34,24,17,21],[17,24,34,16]),(3,5,26,4,[14,26,29,21],[19,24,25,16]),(3,5,26,5,[11,6,18,21],[5,1,13,16]),(4,0,3,0,[12,28,29,21],[29,28,12,16]),(4,0,3,1,[2,1,30,21],[20,24,35,16]),(4,0,3,2,[15,28,32,21],[17,24,34,16]),(4,0,3,4,[14,28,31,21],[19,24,25,16]),(4,0,3,5,[11,6,18,21],[5,1,13,16]),(4,0,7,0,[14,28,31,21],[19,24,25,16]),(4,0,7,1,[2,1,30,21],[20,24,35,16]),(4,0,7,2,[15,28,32,21],[17,24,34,16]),(4,0,7,4,[12,28,29,21],[29,28,12,16]),(4,0,7,5,[11,6,18,21],[5,1,13,16]),(4,1,2,0,[12,1,31,21],[31,1,12,16]),(4,1,2,1,[14,28,29,21],[19,24,25,16]),(4,1,2,2,[15,28,32,21],[17,24,34,16]),(4,1,2,4,[2,1,30,21],[20,24,35,16]),(4,1,2,5,[11,6,18,21],[5,1,13,16]),(4,1,7,0,[12,1,31,21],[31,1,12,16]),(4,1,7,1,[2,1,30,21],[20,24,35,16]),(4,1,7,2,[15,28,32,21],[17,24,34,16]),(4,1,7,4,[14,28,29,21],[19,24,25,16]),(4,1,7,5,[11,6,18,21],[5,1,13,16]),(4,2,0,0,[12,1,31,21],[31,1,12,16]),(4,2,0,1,[2,1,30,21],[20,24,35,16]),(4,2,0,2,[15,28,32,21],[17,24,34,16]),(4,2,0,4,[14,28,29,21],[19,24,25,16]),(4,2,0,5,[11,6,18,21],[5,1,13,16]),(4,2,7,0,[12,1,31,21],[31,1,12,16]),(4,2,7,1,[2,1,30,21],[20,24,35,16]),(4,2,7,2,[14,28,29,21],[19,24,25,16]),(4,2,7,4,[15,28,32,21],[17,24,34,16]),(4,2,7,5,[11,6,18,21],[5,1,13,16]),(4,3,1,0,[12,28,31,21],[31,28,12,16]),(4,3,1,1,[2,3,30,21],[20,24,35,16]),(4,3,1,2,[15,28,32,21],[17,24,34,16]),(4,3,1,4,[14,28,29,21],[19,24,25,16]),(4,3,1,5,[11,6,18,21],[18,6,11,16]),(4,3,6,0,[12,1,31,21],[8,7,33,16]),(4,3,6,1,[2,1,30,21],[20,24,35,16]),(4,3,6,2,[15,28,32,21],[17,7,34,16]),(4,3,6,4,[14,28,29,21],[19,24,25,16]),(4,3,6,5,[11,7,18,21],[5,1,13,16]),(4,3,14,0,[12,28,31,21],[8,7,33,16]),(4,3,14,1,[2,3,30,21],[20,24,35,16]),(4,3,14,2,[15,28,32,21],[17,7,34,16]),(4,3,14,3,[14,28,29,21],[19,24,25,16]),(4,3,14,5,[11,7,18,21],[18,7,11,16]),(4,5,3,0,[12,1,31,21],[31,1,12,16]),(4,5,3,1,[2,1,30,21],[20,24,35,16]),(4,5,3,2,[15,28,32,21],[17,24,34,16]),(4,5,3,4,[13,1,5,21],[5,1,13,16]),(4,5,3,5,[11,6,18,21],[18,6,11,16]),(4,5,7,0,[12,1,31,21],[31,1,12,16]),(4,5,7,1,[2,1,30,21],[20,24,35,16]),(4,5,7,2,[15,28,32,21],[17,24,34,16]),(4,5,7,4,[11,6,18,21],[18,6,11,16]),(4,5,7,5,[13,1,5,21],[5,1,13,16]),(5,0,4,0,[11,6,18,21],[5,1,13,16]),(5,0,4,1,[2,1,30,21],[20,24,35,16]),(5,0,4,2,[15,28,32,21],[17,24,34,16]),(5,0,4,4,[14,28,29,21],[19,24,25,16]),(5,0,4,5,[12,1,31,21],[31,1,12,16]),(5,0,22,0,[12,1,31,21],[31,1,12,16]),(5,0,22,1,[2,1,30,21],[20,24,35,16]),(5,0,22,2,[15,28,32,21],[17,24,34,16]),(5,0,22,4,[14,28,29,21],[19,24,25,16]),(5,0,22,5,[11,6,18,21],[5,1,13,16]),(5,1,2,0,[12,1,31,21],[31,1,12,16]),(5,1,2,1,[11,6,18,21],[5,1,13,16]),(5,1,2,2,[15,28,32,21],[17,24,34,16]),(5,1,2,4,[14,28,29,21],[19,24,25,16]),(5,1,2,5,[2,1,30,21],[20,24,35,16]),(5,1,26,0,[12,1,31,21],[31,1,12,16]),(5,1,26,1,[2,1,30,21],[20,24,35,16]),(5,1,26,2,[15,28,32,21],[17,24,34,16]),(5,1,26,4,[14,28,29,21],[19,24,25,16]),(5,1,26,5,[11,6,18,21],[5,1,13,16]),(5,2,0,0,[12,1,31,21],[31,1,12,16]),(5,2,0,1,[2,1,30,21],[20,24,35,16]),(5,2,0,2,[11,6,18,21],[5,1,13,16]),(5,2,0,4,[14,28,29,21],[19,24,25,16]),(5,2,0,5,[15,28,32,21],[17,24,34,16]),(5,3,1,0,[12,1,31,21],[31,1,12,16]),(5,3,1,1,[2,1,30,21],[20,24,35,16]),(5,3,1,2,[34,24,17,21],[17,24,34,16]),(5,3,1,3,[11,6,18,21],[5,1,13,16]),(5,3,1,4,[14,26,29,21],[19,24,25,16]),(5,3,26,0,[12,1,31,21],[31,1,12,16]),(5,3,26,1,[2,1,30,21],[20,24,35,16]),(5,3,26,2,[34,24,17,21],[17,24,34,16]),(5,3,26,4,[14,26,29,21],[19,24,25,16]),(5,3,26,5,[11,6,18,21],[5,1,13,16]),(5,4,3,0,[12,1,31,21],[31,1,12,16]),(5,4,3,1,[2,1,30,21],[20,24,35,16]),(5,4,3,2,[15,28,32,21],[17,24,34,16]),(5,4,3,4,[13,1,5,21],[5,1,13,16]),(5,4,3,5,[11,6,18,21],[18,6,11,16]),(5,4,7,0,[12,1,31,21],[31,1,12,16]),(5,4,7,1,[2,1,30,21],[20,24,35,16]),(5,4,7,2,[15,28,32,21],[17,24,34,16]),(5,4,7,4,[11,6,18,21],[18,6,11,16]),(5,4,7,5,[13,1,5,21],[5,1,13,16])]def in1299_L : Fin 36 → Fin 24 := ![0,0,0,1,1,2,3,3,3,4,4,5,6,6,7,7,8,9,9,10,10,11,12,12,13,14,15,15,16,17,18,18,19,21,21,22]def in1299_R : Fin 36 → Fin 24 := ![1,2,6,2,15,18,4,5,9,5,12,21,7,8,8,16,22,10,11,11,13,19,13,14,14,23,16,17,17,20,19,20,20,22,23,23]def in1299_col : Fin 36 → Fin 6 := ![2,3,1,4,0,5,3,4,0,1,2,5,0,5,4,2,3,2,5,4,1,3,5,0,3,4,5,1,3,4,1,0,2,0,2,1]def in1299_meet (i j : Fin 36) : Prop := in1299_L i = in1299_L j ∨ in1299_L i = in1299_R j ∨ in1299_R i = in1299_L j ∨ in1299_R i = in1299_R jdef in1299_conflict (i j : Fin 36) : Prop := i ≠ j ∧ (in1299_meet i j ∨ ∃ k : Fin 36, in1299_meet i k ∧ in1299_meet k j)instance in1299_meet_dec (i j : Fin 36) : Decidable (in1299_meet i j) := by unfold in1299_meet; infer_instanceinstance in1299_conflict_dec (i j : Fin 36) : Decidable (in1299_conflict i j) := by unfold in1299_conflict; infer_instancedef in1299_valid (d : Fin 36 → Fin 6) (a b : Fin 6) (S : Finset (Fin 36)) : Prop := a ≠ b ∧ S.Nonempty ∧ (∀ i ∈ S, d i = a ∨ d i = b) ∧ (∀ i ∈ S, ∀ j, in1299_conflict i j → (d j = a ∨ d j = b) → j ∈ S) ∧ (∀ i ∈ S, ∀ j ∈ S, Relation.ReflTransGen (fun x y : Fin 36 => x ∈ S ∧ y ∈ S ∧ in1299_conflict x y) i j)def in1299_swap (d : Fin 36 → Fin 6) (a b : Fin 6) (S : Finset (Fin 36)) (i : Fin 36) : Fin 6 := if i ∈ S then (if d i = a then b else a) else d iset_option maxRecDepth 10000 intheorem in1299_conf_iff : ∀ i j, in1299_conflict i j ↔ j ∈ in1299_confl i := by decide +kerneltheorem in1299_proper : ∀ i, ∀ j ∈ in1299_confl i, in1299_col i ≠ in1299_col j := by decide +kerneltheorem in1299_symm : ∀ i, ∀ j ∈ in1299_confl i, i ∈ in1299_confl j := by decide +kernelset_option maxRecDepth 10000 intheorem in1299_T1 : ∀ a b j, a ≠ b → (in1299_col j = a ∨ in1299_col j = b) → (in1299_dep a b j = 0 → in1299_root a b j = j) ∧ (in1299_dep a b j ≠ 0 → in1299_par a b j ∈ in1299_confl j ∧ (in1299_col (in1299_par a b j) = a ∨ in1299_col (in1299_par a b j) = b) ∧ in1299_dep a b (in1299_par a b j) + 1 = in1299_dep a b j ∧ in1299_root a b (in1299_par a b j) = in1299_root a b j) := by decide +kernelset_option maxRecDepth 10000 intheorem in1299_T2 : ∀ a b x, a ≠ b → ∀ y ∈ in1299_confl x, (in1299_col x = a ∨ in1299_col x = b) → (in1299_col y = a ∨ in1299_col y = b) → in1299_root a b x = in1299_root a b y := by decide +kerneltheorem in1299_T3 : ∀ a b j, a ≠ b → (in1299_col j = a ∨ in1299_col j = b) → in1299_root a b (in1299_root a b j) = in1299_root a b j ∧ (in1299_col (in1299_root a b j) = a ∨ in1299_col (in1299_root a b j) = b) := by decide +kerneldef in1299_swapF (a b : Fin 6) (r : Fin 36) (j : Fin 36) : Fin 6 := if (in1299_col j = a ∨ in1299_col j = b) ∧ in1299_root a b j = r then (if in1299_col j = a then b else a) else in1299_col jdef in1299_chainOK (c : Fin 36 → Fin 6) (x y : Fin 6) : Fin 36 → List (Fin 36) → Fin 36 → Bool | s, [], t => decide (s = t) | s, k :: l, t => decide (k ∈ in1299_confl s) && (decide (c k = x) || decide (c k = y)) && in1299_chainOK c x y k l tdef in1299_certOK (a b : Fin 6) (r : Fin 36) (y : Fin 6) : Bool := match in1299_cert.find? (fun e => decide (e.1 = a ∧ e.2.1 = b ∧ e.2.2.1 = r ∧ e.2.2.2.1 = y)) with | some e => in1299_chainOK (in1299_swapF a b r) (in1299_swapF a b r 16) y 16 e.2.2.2.2.1 21 && in1299_chainOK (in1299_swapF a b r) (in1299_swapF a b r 16) y 21 e.2.2.2.2.2 16 | none => falseset_option maxRecDepth 100000 intheorem in1299_T4 : ∀ a b r, a ≠ b → (in1299_col r = a ∨ in1299_col r = b) → in1299_root a b r = r → in1299_swapF a b r 16 = in1299_swapF a b r 21 ∧ ∀ y, y ≠ in1299_swapF a b r 16 → in1299_certOK a b r y = true := by decide +kerneltheorem in1299_chain_sound (c : Fin 36 → Fin 6) (x y : Fin 6) (T : Finset (Fin 36)) (hcl : ∀ i ∈ T, ∀ j, in1299_conflict i j → (c j = x ∨ c j = y) → j ∈ T) : ∀ s l t, in1299_chainOK c x y s l t = true → s ∈ T → t ∈ T := by intro s l induction l generalizing s with | nil => intro t h hs; simp only [in1299_chainOK, decide_eq_true_eq] at h; exact h ▸ hs | cons k l ih => intro t h hs simp only [in1299_chainOK, Bool.and_eq_true, Bool.or_eq_true, decide_eq_true_eq] at h exact ih k t h.2 (hcl s hs k ((in1299_conf_iff s k).2 h.1.1) h.1.2)theorem in1299_main (a b d e : Fin 6) (S T : Finset (Fin 36)) (hS : in1299_valid in1299_col a b S) (hT : in1299_valid (in1299_swap in1299_col a b S) d e T) : in1299_swap (in1299_swap in1299_col a b S) d e T 16 = in1299_swap (in1299_swap in1299_col a b S) d e T 21 := by obtain ⟨hab, ⟨i, hi⟩, hS3, hS4, hS5⟩ := hS have key : ∀ n j, in1299_dep a b j = n → (in1299_col j = a ∨ in1299_col j = b) → (j ∈ S ↔ in1299_root a b j ∈ S) := by intro n induction n with | zero => intro j hd hc; rw [(in1299_T1 a b j hab hc).1 hd] | succ n ih => intro j hd hc obtain ⟨hp, hpc, hpd, hpr⟩ := (in1299_T1 a b j hab hc).2 (by omega) have h1 := ih (in1299_par a b j) (by omega) hpc rw [hpr] at h1 rw [← h1] constructor · intro hj; exact hS4 j hj _ ((in1299_conf_iff _ _).2 hp) hpc · intro hp'; exact hS4 _ hp' j ((in1299_conf_iff _ _).2 (in1299_symm _ _ hp)) hc have hSeq : ∀ j, j ∈ S ↔ ((in1299_col j = a ∨ in1299_col j = b) ∧ in1299_root a b j = in1299_root a b i) := by intro j constructor · intro hj refine ⟨hS3 j hj, ?_⟩ have hr := hS5 i hi j hj induction hr with | refl => rfl | tail _ hyz ih => obtain ⟨hy, hz, hc⟩ := hyz rw [← ih hy] exact (in1299_T2 a b _ hab _ ((in1299_conf_iff _ _).1 hc) (hS3 _ hy) (hS3 _ hz)).symm · rintro ⟨hc, hr⟩ rw [key _ j rfl hc, hr, ← key _ i rfl (hS3 i hi)] exact hi have hsw : in1299_swap in1299_col a b S = in1299_swapF a b (in1299_root a b i) := by funext j simp only [in1299_swap, in1299_swapF, hSeq] rw [hsw] at hT ⊢ obtain ⟨hr1, hr2⟩ := in1299_T3 a b i hab (hS3 i hi) have h4 := in1299_T4 a b (in1299_root a b i) hab hr2 hr1 set c := in1299_swapF a b (in1299_root a b i) with hc obtain ⟨hde, -, hT3, hT4, -⟩ := hT have hiff : 16 ∈ T ↔ 21 ∈ T := by have aux : ∀ s t : Fin 36, c s = c 16 → s ∈ T → (∀ y, y ≠ c 16 → ∃ l, in1299_chainOK c (c 16) y s l t = true) → t ∈ T := by intro s t hs hsT hch have hx := hT3 s hsT rw [hs] at hx let y : Fin 6 := if c 16 = d then e else d have hy : y ≠ c 16 := by simp only [y]; split_ifs with h · rw [h]; exact fun h' => hde h'.symm · exact fun h' => h h'.symm obtain ⟨l, hl⟩ := hch y hy apply in1299_chain_sound c (c 16) y T _ s l t hl hsT intro i' hi' j hj hcj apply hT4 i' hi' j hj rcases hcj with h | h · rw [h]; exact hx · rw [h]; simp only [y]; split_ifs with h' · right; rfl · left; rfl have hcert : ∀ y, y ≠ c 16 → in1299_certOK a b (in1299_root a b i) y = true := h4.2 constructor · intro h16 refine aux 16 21 rfl h16 (fun y hy => ?_) have := hcert y hy unfold in1299_certOK at this split at this · simp only [Bool.and_eq_true] at this exact ⟨_, this.1⟩ · exact absurd this (by simp) · intro h21 refine aux 21 16 h4.1.symm h21 (fun y hy => ?_) have := hcert y hy unfold in1299_certOK at this split at this · simp only [Bool.and_eq_true] at this exact ⟨_, this.2⟩ · exact absurd this (by simp) unfold in1299_swap by_cases h16 : 16 ∈ T · rw [if_pos h16, if_pos (hiff.1 h16), h4.1] · rw [if_neg h16, if_neg (fun h => h16 (hiff.2 h)), h4.1]theorem op874_two_component_swaps_cannot_separate_example : let L : Fin 36 → Fin 24 := ![0,0,0,1,1,2,3,3,3,4,4,5,6,6,7,7,8,9,9,10,10,11,12,12,13,14,15,15,16,17,18,18,19,21,21,22] let R : Fin 36 → Fin 24 := ![1,2,6,2,15,18,4,5,9,5,12,21,7,8,8,16,22,10,11,11,13,19,13,14,14,23,16,17,17,20,19,20,20,22,23,23] let color : Fin 36 → Fin 6 := ![2,3,1,4,0,5,3,4,0,1,2,5,0,5,4,2,3,2,5,4,1,3,5,0,3,4,5,1,3,4,1,0,2,0,2,1] let meet := fun i j : Fin 36 => L i = L j ∨ L i = R j ∨ R i = L j ∨ R i = R j let conflict := fun i j : Fin 36 => i ≠ j ∧ (meet i j ∨ ∃ k : Fin 36, meet i k ∧ meet k j) let valid := fun (d : Fin 36 → Fin 6) (a b : Fin 6) (S : Finset (Fin 36)) => a ≠ b ∧ S.Nonempty ∧ (∀ i ∈ S, d i = a ∨ d i = b) ∧ (∀ i ∈ S, ∀ j, conflict i j → (d j = a ∨ d j = b) → j ∈ S) ∧ (∀ i ∈ S, ∀ j ∈ S, Relation.ReflTransGen (fun x y : Fin 36 => x ∈ S ∧ y ∈ S ∧ conflict x y) i j) let swap := fun (d : Fin 36 → Fin 6) (a b : Fin 6) (S : Finset (Fin 36)) i => if i ∈ S then (if d i = a then b else a) else d i (∀ i j, conflict i j → color i ≠ color j) ∧ color 16 = color 21 ∧ ∀ a b d e (S T : Finset (Fin 36)), valid color a b S → valid (swap color a b S) d e T → swap (swap color a b S) d e T 16 = swap (swap color a b S) d e T 21 := by intro L R color meet conflict valid swap refine ⟨fun i j h => ?_, rfl, fun a b d e S T hS hT => in1299_main a b d e S T hS hT⟩ exact in1299_proper i j ((in1299_conf_iff i j).1 h)