six_cycle_slack_nonneg_rank_bounds
The 24 × 39 six-cycle slack block matrix six_cycle_slack_matrix satisfies HasNonnegFactorization six_cycle_slack_matrix 14, and its 1-product with itself satisfies HasNonnegFactorization (oneProduct six_cycle_slack_matrix six_cycle_slack_matrix) 27.
Statement
theorem six_cycle_slack_nonneg_rank_bounds :
HasNonnegFactorization six_cycle_slack_matrix 14 ∧
HasNonnegFactorization (oneProduct six_cycle_slack_matrix six_cycle_slack_matrix) 27- Formalizes
- arXiv:2611.33631, Lemma 7
- Verified
- 29 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 9
- HasNonnegFactorizationA real matrix M has a nonnegative factorization of size r if M = A * B for nonnegative matrices A and B with inner dimension r.
- oneProductThe 1-product M₁ ⊗₁ M₂ of two real matrices M₁ and M₂ has columns formed by stacking each column of M₁ on top of each column of M₂.
- six_cycle_slack_matrixThe 24 × 39 real slack block matrix six_cycle_slack_matrix : Matrix (Fin 24) (Fin 39) ℝ whose (e, j) entry is indicator_types_consecutive…
- six_cycle_cluster_identityFor every t ∈ Fin 3 and edge e ∈ Fin 24, the indicator vector indicator_types_consecutive t evaluated at e equals indicator_type_even…
- six_cycle_slack_LThe real constant six_cycle_slack_L : ℝ defined as 10 ^ 6.
- cluster_nodesFor cluster index j ∈ Fin 6, the finite set cluster_nodes j : Finset (Fin 12) consisting of the two vertices in Fin 12 with indices 2 *…
- indicator_type_evenFor s ∈ Fin 3, the indicator vector indicator_type_even s : Fin 24 → ℝ taking value 1 on edge e : Fin 24 if e.val / 4 = 2 * s.val and 0…
- cluster_graph_incidence_matrixThe 24 × 12 unsigned edge-node incidence matrix R of the cluster graph G on 12 nodes and 24 edges, where each node of a 6-cycle is…
- indicator_types_consecutiveFor t ∈ Fin 3, the indicator vector indicator_types_consecutive t : Fin 24 → ℝ taking value 1 on edge e : Fin 24 if e.val / 4 equals (2 *…
Read back from the Lean
The declaration asserts that the 24 × 39 real matrix six_cycle_slack_matrix has a nonnegative matrix factorization of inner dimension 14, and the "one-product" of six_cycle_slack_matrix with itself (a (24 ⊕ 24) × (39 × 39) real matrix) has a nonnegative matrix factorization of inner dimension 27.
More explicitly:
1. There exist a 24 × 14 matrix A₁ and a 14 × 39 matrix B₁ with real entries such that:
- every entry of A₁ is nonnegative (0 ≤ A₁ i k for all i ∈ Fin 24, k ∈ Fin 14),
- every entry of B₁ is nonnegative (0 ≤ B₁ k j for all k ∈ Fin 14, j ∈ Fin 39), and
- six_cycle_slack_matrix = A₁ * B₁.
2. There exist a (Fin 24 ⊕ Fin 24) × 27 matrix A₂ and a 27 × (Fin 39 × Fin 39) matrix B₂ with real entries such that:
- every entry of A₂ is nonnegative,
- every entry of B₂ is nonnegative, and
- oneProduct six_cycle_slack_matrix six_cycle_slack_matrix = A₂ * B₂.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
The theorem proves that the 24 × 39 six-cycle slack block matrix S satisfies rank_+(S) ≤ 14, and its 1-product with itself satisfies rank_+(S ⊗₁ S) ≤ 27, exhibiting strict subadditivity since 27 < 14 + 14 = 28. For S, the rank-14 factorization S = A14 * B14 expresses each column as a nonnegative linear combination of 2 even-type edge indicator vectors and 12 cluster-graph incidence vectors, absorbing the column perturbation into the node coordinates. For the 1-product S ⊗₁ S, each pair of column blocks (t1, t2) selects a single shared even type s ∈ {0, 1, 2} distinct from both t1 and t2; both row blocks share the 3 even-type basis dimensions while retaining separate 12-dimensional node incidence spaces, achieving an inner dimension of 3 + 12 + 12 = 27.
A matrix M has a nonnegative factorization of rank r whenever it factorizes as M = A * B through an intermediate index type α of cardinality r with nonnegative factors A and B.
Lemma six_cycle_slack_nonneg_rank_bounds_hasNonnegFactorization_equiv pulls back the matrices A and B along an equivalence e : α ≃ Fin r by setting A'(i, k) = A(i, e.symm k) and B'(k, j) = B(e.symm k, j). Nonnegativity of A' and B' is inherited from A and B, and reindexing the summation over α shows that A' * B' = A * B = M.
uses
Matrix.mul_applylemma six_cycle_slack_nonneg_rank_bounds_hasNonnegFactorization_equiv {m n : Type*} (M : Matrix m n ℝ) {r : ℕ} {α : Type*} [Fintype α] (e : α ≃ Fin r) (A : Matrix m α ℝ) (B : Matrix α n ℝ) (hA : ∀ i a, 0 ≤ A i a) (hB : ∀ a j, 0 ≤ B a j) (hM : ∀ i j, (∑ a, A i a * B a j) = M i j) : HasNonnegFactorization M r := by let A' : Matrix m (Fin r) ℝ := fun i k => A i (e.symm k) let B' : Matrix (Fin r) n ℝ := fun k j => B (e.symm k) j use A', B' refine ⟨fun i k => hA i (e.symm k), fun k j => hB (e.symm k) j, ?_⟩ ext i j rw [Matrix.mul_apply, ← hM i j] exact (e.symm.sum_comp (fun a => A i a * B a j)).symm
A summation over Fin 12 of a function f weighted by an indicator of a cluster C plus a perturbation of weight L at vertex rem - 1 splits into ∑_{v ∈ C} f(v) plus [rem ≠ 0] * L * f(rem - 1).
Distributing f(v) across the sum via mul_add and Finset.sum_add_distrib separates the expression into an indicator sum over C and a perturbation sum. The indicator sum simplifies to ∑_{v ∈ C} f(v) using Finset.sum_filter. In the perturbation sum, when rem = 0 the term is identically 0, and when rem ≠ 0 the indicator isolates the unique vertex v = rem - 1, yielding L * f(rem - 1).
uses
mul_add,Finset.sum_add_distrib,Finset.sum_filterlemma six_cycle_slack_nonneg_rank_bounds_sum_split (f : Fin 12 → ℝ) (C : Finset (Fin 12)) (rem : ℕ) (hrem : rem < 13) (L : ℝ) : (∑ v : Fin 12, f v * ((if v ∈ C then 1 else 0) + (if rem ≠ 0 then (if v = ⟨rem - 1, by omega⟩ then L else 0) else 0))) = (∑ v ∈ C, f v) + (if rem ≠ 0 then L * f ⟨rem - 1, by omega⟩ else 0) := by simp_rw [mul_add] rw [Finset.sum_add_distrib] congr 1 · have h1 : ∀ v, f v * (if v ∈ C then 1 else 0) = if v ∈ C then f v else 0 := by intro v; split_ifs <;> ring simp_rw [h1] rw [← Finset.sum_filter] congr 1; ext x; simp · split_ifs with h · have h2 : ∀ v, f v * (if v = ⟨rem - 1, by omega⟩ then L else 0) = if v = ⟨rem - 1, by omega⟩ then L * f ⟨rem - 1, by omega⟩ else 0 := by intro v; split_ifs with hv · subst hv; ring · ring simp_rw [h2] simp · simp
For each block t ∈ Fin 3, the consecutive type indicator decomposes as an even type indicator at s(t) plus the sum of incidence vectors over cluster nodes c(t).
The helper functions s_of_t (mapping 0 to 1, and 1, 2 to 0) and c_of_t (mapping 0, 1, 2 to clusters 4, 5, 2) select the appropriate even type and cluster. Exhausting the three cases for t with fin_cases and applying the identity six_cycle_cluster_identity completes the decomposition.
uses
six_cycle_cluster_identitydef six_cycle_slack_nonneg_rank_bounds_s_of_t (t : Fin 3) : Fin 2 := if t.val = 0 then 1 else 0 def six_cycle_slack_nonneg_rank_bounds_c_of_t (t : Fin 3) : Fin 6 := if t.val = 0 then 4 else if t.val = 1 then 5 else 2 lemma six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_sum (t : Fin 3) (e : Fin 24) : indicator_types_consecutive t e = indicator_type_even ⟨(six_cycle_slack_nonneg_rank_bounds_s_of_t t).val, by omega⟩ e + ∑ v ∈ cluster_nodes (six_cycle_slack_nonneg_rank_bounds_c_of_t t), cluster_graph_incidence_matrix e v := by fin_cases t · have h := (six_cycle_cluster_identity 0 e).1; exact h · have h := (six_cycle_cluster_identity 1 e).2; exact h · have h := (six_cycle_cluster_identity 2 e).1; exact h
Candidate factor matrices A14 of size 24 × (Fin 2 ⊕ Fin 12) and B14 of size (Fin 2 ⊕ Fin 12) × 39 are defined.
The matrix A14 places the even type indicators in the first 2 columns and the cluster graph node incidence vectors in the remaining 12 columns. For column j with block index t = ⌊j / 13⌋ and remainder rem = j % 13, B14 places a 1 at even type s(t), indicators for the nodes of cluster c(t), and an additional perturbation of weight L at node rem - 1 whenever rem ≠ 0.
def six_cycle_slack_nonneg_rank_bounds_A14 : Matrix (Fin 24) (Fin 2 ⊕ Fin 12) ℝ | e, Sum.inl s => indicator_type_even ⟨s.val, by omega⟩ e | e, Sum.inr v => cluster_graph_incidence_matrix e v def six_cycle_slack_nonneg_rank_bounds_B14 : Matrix (Fin 2 ⊕ Fin 12) (Fin 39) ℝ | Sum.inl s, j => let t : Fin 3 := ⟨j.val / 13, by omega⟩ if s = six_cycle_slack_nonneg_rank_bounds_s_of_t t then 1 else 0 | Sum.inr v, j => let t : Fin 3 := ⟨j.val / 13, by omega⟩ let rem := j.val % 13 (if v ∈ cluster_nodes (six_cycle_slack_nonneg_rank_bounds_c_of_t t) then 1 else 0) + (if rem ≠ 0 then (if v = ⟨rem - 1, by omega⟩ then six_cycle_slack_L else 0) else 0)
All entries of the candidate factors A14 and B14 are nonnegative.
The entries of A14 are indicators of edge types and graph incidences, which are always 0 or 1. The entries of B14 on Fin 2 are 0 or 1, and on Fin 12 they are sums of indicators and nonnegative multiples of L = 10^6, all verified nonnegative by case analysis and linear arithmetic.
lemma six_cycle_slack_nonneg_rank_bounds_A14_nonneg (e : Fin 24) (a : Fin 2 ⊕ Fin 12) : 0 ≤ six_cycle_slack_nonneg_rank_bounds_A14 e a := by cases a with | inl s => dsimp [six_cycle_slack_nonneg_rank_bounds_A14, indicator_type_even]; split_ifs <;> norm_num | inr v => dsimp [six_cycle_slack_nonneg_rank_bounds_A14, cluster_graph_incidence_matrix]; split_ifs <;> norm_num lemma six_cycle_slack_nonneg_rank_bounds_B14_nonneg (a : Fin 2 ⊕ Fin 12) (j : Fin 39) : 0 ≤ six_cycle_slack_nonneg_rank_bounds_B14 a j := by cases a with | inl s => dsimp [six_cycle_slack_nonneg_rank_bounds_B14]; split_ifs <;> norm_num | inr v => dsimp [six_cycle_slack_nonneg_rank_bounds_B14, six_cycle_slack_L] have : 0 ≤ (10 : ℝ) ^ 6 := by positivity split_ifs <;> linarith
The matrix product A14 * B14 equals the six-cycle slack matrix.
Applying Fintype.sum_sum_type splits the inner sum over Fin 2 ⊕ Fin 12 into a sum over Fin 2 and a sum over Fin 12. The Fin 2 sum collapses to the even type indicator at s(t). The Fin 12 sum is evaluated by six_cycle_slack_nonneg_rank_bounds_sum_split into the cluster sum plus the perturbation term. Recombining the even type indicator and cluster sum with six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_sum reconstructs the consecutive type indicator, exactly matching the definition of the slack matrix in both the unperturbed (rem = 0) and perturbed (rem ≠ 0) cases.
uses
Fintype.sum_sum_type,six_cycle_slack_nonneg_rank_bounds_sum_split,add_assoc,six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_sum,add_zerolemma six_cycle_slack_nonneg_rank_bounds_sum_A14_B14 (e : Fin 24) (j : Fin 39) : (∑ a, six_cycle_slack_nonneg_rank_bounds_A14 e a * six_cycle_slack_nonneg_rank_bounds_B14 a j) = six_cycle_slack_matrix e j := by rw [Fintype.sum_sum_type] dsimp [six_cycle_slack_nonneg_rank_bounds_A14, six_cycle_slack_nonneg_rank_bounds_B14] let t : Fin 3 := ⟨j.val / 13, by omega⟩ let rem := j.val % 13 have h1 : (∑ s : Fin 2, indicator_type_even ⟨s.val, by omega⟩ e * (if s = six_cycle_slack_nonneg_rank_bounds_s_of_t t then 1 else 0)) = indicator_type_even ⟨(six_cycle_slack_nonneg_rank_bounds_s_of_t t).val, by omega⟩ e := by simp rw [h1] rw [six_cycle_slack_nonneg_rank_bounds_sum_split (cluster_graph_incidence_matrix e) (cluster_nodes (six_cycle_slack_nonneg_rank_bounds_c_of_t t)) rem (by omega) six_cycle_slack_L] rw [← add_assoc] rw [← six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_sum t e] unfold six_cycle_slack_matrix dsimp split_ifs with h · rw [add_zero] · rfl
For any pair of block indices t1, t2 ∈ Fin 3, the function shared_s selects an even type index strictly distinct from both t1 and t2. automation
The function shared_s explicitly maps each of the 9 pairs (t1, t2) ∈ (Fin 3) × (Fin 3) to an element of {0, 1, 2} avoiding both inputs. The lemmas six_cycle_slack_nonneg_rank_bounds_shared_s_ne_left and six_cycle_slack_nonneg_rank_bounds_shared_s_ne_right confirm this property by exhaustive evaluation over all finite cases using decide.
def six_cycle_slack_nonneg_rank_bounds_shared_s (t1 t2 : Fin 3) : Fin 3 := if t1.val = 0 then (if t2.val = 1 then 2 else 1) else if t1.val = 1 then (if t2.val = 2 then 0 else 2) else (if t2.val = 0 then 1 else 0) lemma six_cycle_slack_nonneg_rank_bounds_shared_s_ne_left (t1 t2 : Fin 3) : six_cycle_slack_nonneg_rank_bounds_shared_s t1 t2 ≠ t1 := by revert t1 t2; decide lemma six_cycle_slack_nonneg_rank_bounds_shared_s_ne_right (t1 t2 : Fin 3) : six_cycle_slack_nonneg_rank_bounds_shared_s t1 t2 ≠ t2 := by revert t1 t2; decide
For any distinct types s ≠ t in Fin 3, the consecutive type indicator at t decomposes into the even type indicator at s plus the cluster incidence sum for a suitable cluster c(t, s).
Case analysis on all 9 pairs (t, s) using fin_cases discharges the diagonal cases s = t by contradiction with the hypothesis s ≠ t, and resolves each of the remaining 6 off-diagonal pairs using the cluster identities from six_cycle_cluster_identity.
uses
six_cycle_cluster_identitydef six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s (t s : Fin 3) : Fin 6 := if t.val = 0 then (if s.val = 1 then 4 else 3) else if t.val = 1 then (if s.val = 2 then 0 else 5) else (if s.val = 0 then 2 else 1) lemma six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_cluster (t s : Fin 3) (hne : s ≠ t) (e : Fin 24) : indicator_types_consecutive t e = indicator_type_even s e + ∑ v ∈ cluster_nodes (six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s t s), cluster_graph_incidence_matrix e v := by revert hne fin_cases t <;> fin_cases s <;> intro hne · contradiction · exact (six_cycle_cluster_identity 0 e).1 · exact (six_cycle_cluster_identity 0 e).2 · exact (six_cycle_cluster_identity 1 e).2 · contradiction · exact (six_cycle_cluster_identity 1 e).1 · exact (six_cycle_cluster_identity 2 e).1 · exact (six_cycle_cluster_identity 2 e).2 · contradiction
Candidate factor matrices A27 of size (Fin 24 ⊕ Fin 24) × (Fin 3 ⊕ (Fin 12 ⊕ Fin 12)) and B27 of size (Fin 3 ⊕ (Fin 12 ⊕ Fin 12)) × (Fin 39 × Fin 39) are defined for the 1-product.
The inner dimension is Fin 3 ⊕ (Fin 12 ⊕ Fin 12), totaling 27. The matrix A27 provides all 3 even type indicators to both row blocks on Fin 3, while restricting the incidence vectors of the first row block to the first Fin 12 and those of the second row block to the second Fin 12. For column pair (j1, j2), B27 selects the shared even type s = shared_s(t1, t2) on Fin 3, and places the cluster nodes and perturbations for (t1, s) and (t2, s) on the first and second Fin 12 blocks respectively.
def six_cycle_slack_nonneg_rank_bounds_A27 : Matrix (Fin 24 ⊕ Fin 24) (Fin 3 ⊕ (Fin 12 ⊕ Fin 12)) ℝ | Sum.inl e, Sum.inl s => indicator_type_even s e | Sum.inr e, Sum.inl s => indicator_type_even s e | Sum.inl e, Sum.inr (Sum.inl v) => cluster_graph_incidence_matrix e v | Sum.inr _, Sum.inr (Sum.inl _) => 0 | Sum.inl _, Sum.inr (Sum.inr _) => 0 | Sum.inr e, Sum.inr (Sum.inr v) => cluster_graph_incidence_matrix e v def six_cycle_slack_nonneg_rank_bounds_B27 : Matrix (Fin 3 ⊕ (Fin 12 ⊕ Fin 12)) (Fin 39 × Fin 39) ℝ | Sum.inl s', (j1, j2) => let t1 : Fin 3 := ⟨j1.val / 13, by omega⟩ let t2 : Fin 3 := ⟨j2.val / 13, by omega⟩ if s' = six_cycle_slack_nonneg_rank_bounds_shared_s t1 t2 then 1 else 0 | Sum.inr (Sum.inl v1), (j1, j2) => let t1 : Fin 3 := ⟨j1.val / 13, by omega⟩ let t2 : Fin 3 := ⟨j2.val / 13, by omega⟩ let rem1 := j1.val % 13 let s := six_cycle_slack_nonneg_rank_bounds_shared_s t1 t2 (if v1 ∈ cluster_nodes (six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s t1 s) then 1 else 0) + (if rem1 ≠ 0 then (if v1 = ⟨rem1 - 1, by omega⟩ then six_cycle_slack_L else 0) else 0) | Sum.inr (Sum.inr v2), (j1, j2) => let t1 : Fin 3 := ⟨j1.val / 13, by omega⟩ let t2 : Fin 3 := ⟨j2.val / 13, by omega⟩ let rem2 := j2.val % 13 let s := six_cycle_slack_nonneg_rank_bounds_shared_s t1 t2 (if v2 ∈ cluster_nodes (six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s t2 s) then 1 else 0) + (if rem2 ≠ 0 then (if v2 = ⟨rem2 - 1, by omega⟩ then six_cycle_slack_L else 0) else 0)
All entries of the candidate factors A27 and B27 are nonnegative.
By case analysis on row and column components, the entries of A27 are 0, 1, or indicators, verified nonnegative by reflexivity (le_rfl) or norm_num. The entries of B27 are 0, 1, or linear combinations with L = 10^6 ≥ 0, which are verified nonnegative by linear arithmetic.
uses
le_rfllemma six_cycle_slack_nonneg_rank_bounds_A27_nonneg (row : Fin 24 ⊕ Fin 24) (col : Fin 3 ⊕ (Fin 12 ⊕ Fin 12)) : 0 ≤ six_cycle_slack_nonneg_rank_bounds_A27 row col := by rcases row with e | e <;> rcases col with s | (v | v) · dsimp [six_cycle_slack_nonneg_rank_bounds_A27, indicator_type_even]; split_ifs <;> norm_num · dsimp [six_cycle_slack_nonneg_rank_bounds_A27, cluster_graph_incidence_matrix]; split_ifs <;> norm_num · dsimp [six_cycle_slack_nonneg_rank_bounds_A27]; exact le_rfl · dsimp [six_cycle_slack_nonneg_rank_bounds_A27, indicator_type_even]; split_ifs <;> norm_num · dsimp [six_cycle_slack_nonneg_rank_bounds_A27]; exact le_rfl · dsimp [six_cycle_slack_nonneg_rank_bounds_A27, cluster_graph_incidence_matrix]; split_ifs <;> norm_num lemma six_cycle_slack_nonneg_rank_bounds_B27_nonneg (a : Fin 3 ⊕ (Fin 12 ⊕ Fin 12)) (c : Fin 39 × Fin 39) : 0 ≤ six_cycle_slack_nonneg_rank_bounds_B27 a c := by rcases a with s | (v | v) · dsimp [six_cycle_slack_nonneg_rank_bounds_B27]; split_ifs <;> norm_num · dsimp [six_cycle_slack_nonneg_rank_bounds_B27, six_cycle_slack_L] have : 0 ≤ (10 : ℝ) ^ 6 := by positivity split_ifs <;> linarith · dsimp [six_cycle_slack_nonneg_rank_bounds_B27, six_cycle_slack_L] have : 0 ≤ (10 : ℝ) ^ 6 := by positivity split_ifs <;> linarith
The matrix product A27 * B27 equals the 1-product oneProduct six_cycle_slack_matrix six_cycle_slack_matrix.
For column pair (j1, j2) and row index, we split into whether the row belongs to the first block (inl e1) or the second block (inr e2). In the first block, the second Fin 12 sum vanishes because A27 is zero there, the Fin 3 sum extracts even type s = shared_s(t1, t2), and the first Fin 12 sum simplifies via six_cycle_slack_nonneg_rank_bounds_sum_split. Because s ≠ t1 by six_cycle_slack_nonneg_rank_bounds_shared_s_ne_left, six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_cluster recombines the terms into the consecutive type indicator for t1, reproducing the slack matrix entry for (e1, j1). The second block argument is symmetric, using s ≠ t2 via six_cycle_slack_nonneg_rank_bounds_shared_s_ne_right.
uses
Fintype.sum_sum_type,add_zero,six_cycle_slack_nonneg_rank_bounds_sum_split,add_assoc,six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_cluster,six_cycle_slack_nonneg_rank_bounds_shared_s_ne_left,zero_add,six_cycle_slack_nonneg_rank_bounds_shared_s_ne_rightlemma six_cycle_slack_nonneg_rank_bounds_sum_A27_B27 (row : Fin 24 ⊕ Fin 24) (c : Fin 39 × Fin 39) : (∑ a, six_cycle_slack_nonneg_rank_bounds_A27 row a * six_cycle_slack_nonneg_rank_bounds_B27 a c) = oneProduct six_cycle_slack_matrix six_cycle_slack_matrix row c := by let (j1, j2) := c let t1 : Fin 3 := ⟨j1.val / 13, by omega⟩ let t2 : Fin 3 := ⟨j2.val / 13, by omega⟩ let rem1 := j1.val % 13 let rem2 := j2.val % 13 let s := six_cycle_slack_nonneg_rank_bounds_shared_s t1 t2 rcases row with e1 | e2 · unfold oneProduct; dsimp rw [Fintype.sum_sum_type, Fintype.sum_sum_type] dsimp [six_cycle_slack_nonneg_rank_bounds_A27, six_cycle_slack_nonneg_rank_bounds_B27] have h1 : (∑ s' : Fin 3, indicator_type_even s' e1 * (if s' = s then 1 else 0)) = indicator_type_even s e1 := by simp rw [h1] have h3 : (∑ v : Fin 12, (0 : ℝ) * ((if v ∈ cluster_nodes (six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s t2 s) then 1 else 0) + if rem2 ≠ 0 then if v = ⟨rem2 - 1, by omega⟩ then six_cycle_slack_L else 0 else 0)) = 0 := by simp rw [h3, add_zero] rw [six_cycle_slack_nonneg_rank_bounds_sum_split (cluster_graph_incidence_matrix e1) (cluster_nodes (six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s t1 s)) rem1 (by omega) six_cycle_slack_L] rw [← add_assoc] rw [← six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_cluster t1 s (six_cycle_slack_nonneg_rank_bounds_shared_s_ne_left t1 t2) e1] unfold six_cycle_slack_matrix; dsimp split_ifs with h · rw [add_zero] · rfl · unfold oneProduct; dsimp rw [Fintype.sum_sum_type, Fintype.sum_sum_type] dsimp [six_cycle_slack_nonneg_rank_bounds_A27, six_cycle_slack_nonneg_rank_bounds_B27] have h1 : (∑ s' : Fin 3, indicator_type_even s' e2 * (if s' = s then 1 else 0)) = indicator_type_even s e2 := by simp rw [h1] have h2 : (∑ v : Fin 12, (0 : ℝ) * ((if v ∈ cluster_nodes (six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s t1 s) then 1 else 0) + if rem1 ≠ 0 then if v = ⟨rem1 - 1, by omega⟩ then six_cycle_slack_L else 0 else 0)) = 0 := by simp rw [h2, zero_add] rw [six_cycle_slack_nonneg_rank_bounds_sum_split (cluster_graph_incidence_matrix e2) (cluster_nodes (six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s t2 s)) rem2 (by omega) six_cycle_slack_L] rw [← add_assoc] rw [← six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_cluster t2 s (six_cycle_slack_nonneg_rank_bounds_shared_s_ne_right t1 t2) e2] unfold six_cycle_slack_matrix; dsimp split_ifs with h · rw [add_zero] · rfl /-- Nonnegative rank bounds: rank_+(S) ≤ 14 and rank_+(S ⊗₁ S) ≤ 27 for the 6-cycle slack block S. -/
The six-cycle slack matrix has a nonnegative factorization of rank 14.
The equivalence finSumFinEquiv : Fin 2 ⊕ Fin 12 ≃ Fin 14 combined with lemma six_cycle_slack_nonneg_rank_bounds_hasNonnegFactorization_equiv, nonnegativity of A14 and B14 (six_cycle_slack_nonneg_rank_bounds_A14_nonneg, six_cycle_slack_nonneg_rank_bounds_B14_nonneg), and the factorization equality six_cycle_slack_nonneg_rank_bounds_sum_A14_B14 establishes HasNonnegFactorization six_cycle_slack_matrix 14.
uses
six_cycle_slack_nonneg_rank_bounds_hasNonnegFactorization_equiv,finSumFinEquiv,six_cycle_slack_nonneg_rank_bounds_A14_nonneg,six_cycle_slack_nonneg_rank_bounds_B14_nonneg,six_cycle_slack_nonneg_rank_bounds_sum_A14_B14theorem six_cycle_slack_nonneg_rank_bounds : HasNonnegFactorization six_cycle_slack_matrix 14 ∧ HasNonnegFactorization (oneProduct six_cycle_slack_matrix six_cycle_slack_matrix) 27 := by constructor · exact six_cycle_slack_nonneg_rank_bounds_hasNonnegFactorization_equiv six_cycle_slack_matrix finSumFinEquiv six_cycle_slack_nonneg_rank_bounds_A14 six_cycle_slack_nonneg_rank_bounds_B14 six_cycle_slack_nonneg_rank_bounds_A14_nonneg six_cycle_slack_nonneg_rank_bounds_B14_nonneg six_cycle_slack_nonneg_rank_bounds_sum_A14_B14
The 1-product of the six-cycle slack matrix with itself has a nonnegative factorization of rank 27.
Composing finSumFinEquiv on Fin 12 ⊕ Fin 12 with finSumFinEquiv on Fin 3 ⊕ Fin 24 via Equiv.sumCongr and Equiv.refl yields an equivalence Fin 3 ⊕ (Fin 12 ⊕ Fin 12) ≃ Fin 27. Applying six_cycle_slack_nonneg_rank_bounds_hasNonnegFactorization_equiv together with nonnegativity (six_cycle_slack_nonneg_rank_bounds_A27_nonneg, six_cycle_slack_nonneg_rank_bounds_B27_nonneg) and factorization correctness (six_cycle_slack_nonneg_rank_bounds_sum_A27_B27) completes the proof.
uses
finSumFinEquiv,Equiv.sumCongr,Equiv.refl,six_cycle_slack_nonneg_rank_bounds_hasNonnegFactorization_equiv,six_cycle_slack_nonneg_rank_bounds_A27_nonneg,six_cycle_slack_nonneg_rank_bounds_B27_nonneg,six_cycle_slack_nonneg_rank_bounds_sum_A27_B27· have e1 : Fin 12 ⊕ Fin 12 ≃ Fin 24 := finSumFinEquiv have e2 : Fin 3 ⊕ Fin 24 ≃ Fin 27 := finSumFinEquiv have e27 : Fin 3 ⊕ (Fin 12 ⊕ Fin 12) ≃ Fin 27 := (Equiv.sumCongr (Equiv.refl (Fin 3)) e1).trans e2 exact six_cycle_slack_nonneg_rank_bounds_hasNonnegFactorization_equiv (oneProduct six_cycle_slack_matrix six_cycle_slack_matrix) e27 six_cycle_slack_nonneg_rank_bounds_A27 six_cycle_slack_nonneg_rank_bounds_B27 six_cycle_slack_nonneg_rank_bounds_A27_nonneg six_cycle_slack_nonneg_rank_bounds_B27_nonneg six_cycle_slack_nonneg_rank_bounds_sum_A27_B27
Matrix.mul_apply- The (i, k)-th entry of a matrix product M * N is given by the sum ∑ j, M i j * N j k.
mul_add- Left distributivity of multiplication over addition: a * (b + c) = a * b + a * c.
Finset.sum_add_distrib- The sum of a sum of two functions over a finite set equals the sum of the two individual sums.
Finset.sum_filter- The sum of a function over elements of a finite set satisfying a predicate equals the sum over the entire set with terms not satisfying the predicate set to 0.
six_cycle_cluster_identity- For each consecutive type t ∈ Fin 3 and edge e, the consecutive type indicator decomposes into an even type indicator plus the sum of incidence values over either of two complementary 2-node clusters.
Fintype.sum_sum_type- A sum over a disjoint sum type α₁ ⊕ α₂ splits into the sum over α₁ plus the sum over α₂.
six_cycle_slack_nonneg_rank_bounds_sum_split- For a function f on Fin 12, a sum of f(v) weighted by an indicator of C plus an L-perturbation at rem - 1 separates into ∑_{v ∈ C} f(v) plus [rem ≠ 0] * L * f(rem - 1).
add_assoc- Addition in a semigroup is associative: (a + b) + c = a + (b + c).
six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_sum- For each block t ∈ Fin 3, the consecutive type indicator equals the even type indicator at s(t) plus the node incidence sum over the cluster c(t).
add_zero- Adding zero on the right leaves an element unchanged: a + 0 = a.
le_rfl- The order relation is reflexive: a ≤ a.
six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_cluster- For any distinct types s ≠ t in Fin 3, the consecutive type indicator at t decomposes as the even type indicator at s plus the incidence sum over cluster nodes for c(t, s).
six_cycle_slack_nonneg_rank_bounds_shared_s_ne_left- The chosen shared even type shared_s(t1, t2) is strictly distinct from t1.
zero_add- Adding zero on the left leaves an element unchanged: 0 + a = a.
six_cycle_slack_nonneg_rank_bounds_shared_s_ne_right- The chosen shared even type shared_s(t1, t2) is strictly distinct from t2.
six_cycle_slack_nonneg_rank_bounds_hasNonnegFactorization_equiv- If a matrix M factorizes as A * B with nonnegative matrices A and B indexed by a finite type α equivalent to Fin r, then M has a nonnegative factorization of rank r.
finSumFinEquiv- The canonical equivalence between the disjoint sum Fin m ⊕ Fin n and Fin (m + n).
six_cycle_slack_nonneg_rank_bounds_A14_nonneg- Every entry of the candidate factor matrix A14 is nonnegative.
six_cycle_slack_nonneg_rank_bounds_B14_nonneg- Every entry of the candidate factor matrix B14 is nonnegative.
six_cycle_slack_nonneg_rank_bounds_sum_A14_B14- The matrix product A14 * B14 equals the six-cycle slack matrix.
Equiv.sumCongr- Combines equivalences on components to produce an equivalence between the respective disjoint sum types.
Equiv.refl- The identity equivalence from any type to itself.
six_cycle_slack_nonneg_rank_bounds_A27_nonneg- Every entry of the candidate factor matrix A27 is nonnegative.
six_cycle_slack_nonneg_rank_bounds_B27_nonneg- Every entry of the candidate factor matrix B27 is nonnegative.
six_cycle_slack_nonneg_rank_bounds_sum_A27_B27- The matrix product A27 * B27 equals the 1-product of the six-cycle slack matrix with itself.
- The parameter L is a large constant (10^6) in the definition of the six-cycle slack matrix; its positivity ensures that all perturbed column entries remain nonnegative.
- Equivalence of finite sum types (such as Fin 3 ⊕ (Fin 12 ⊕ Fin 12) ≃ Fin 27) is used to reindex the factor matrices into standard Fin r indices without altering matrix products.
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.
lemma six_cycle_slack_nonneg_rank_bounds_hasNonnegFactorization_equiv {m n : Type*} (M : Matrix m n ℝ) {r : ℕ} {α : Type*} [Fintype α] (e : α ≃ Fin r) (A : Matrix m α ℝ) (B : Matrix α n ℝ) (hA : ∀ i a, 0 ≤ A i a) (hB : ∀ a j, 0 ≤ B a j) (hM : ∀ i j, (∑ a, A i a * B a j) = M i j) : HasNonnegFactorization M r := by let A' : Matrix m (Fin r) ℝ := fun i k => A i (e.symm k) let B' : Matrix (Fin r) n ℝ := fun k j => B (e.symm k) j use A', B' refine ⟨fun i k => hA i (e.symm k), fun k j => hB (e.symm k) j, ?_⟩ ext i j rw [Matrix.mul_apply, ← hM i j] exact (e.symm.sum_comp (fun a => A i a * B a j)).symmlemma six_cycle_slack_nonneg_rank_bounds_sum_split (f : Fin 12 → ℝ) (C : Finset (Fin 12)) (rem : ℕ) (hrem : rem < 13) (L : ℝ) : (∑ v : Fin 12, f v * ((if v ∈ C then 1 else 0) + (if rem ≠ 0 then (if v = ⟨rem - 1, by omega⟩ then L else 0) else 0))) = (∑ v ∈ C, f v) + (if rem ≠ 0 then L * f ⟨rem - 1, by omega⟩ else 0) := by simp_rw [mul_add] rw [Finset.sum_add_distrib] congr 1 · have h1 : ∀ v, f v * (if v ∈ C then 1 else 0) = if v ∈ C then f v else 0 := by intro v; split_ifs <;> ring simp_rw [h1] rw [← Finset.sum_filter] congr 1; ext x; simp · split_ifs with h · have h2 : ∀ v, f v * (if v = ⟨rem - 1, by omega⟩ then L else 0) = if v = ⟨rem - 1, by omega⟩ then L * f ⟨rem - 1, by omega⟩ else 0 := by intro v; split_ifs with hv · subst hv; ring · ring simp_rw [h2] simp · simpdef six_cycle_slack_nonneg_rank_bounds_s_of_t (t : Fin 3) : Fin 2 := if t.val = 0 then 1 else 0def six_cycle_slack_nonneg_rank_bounds_c_of_t (t : Fin 3) : Fin 6 := if t.val = 0 then 4 else if t.val = 1 then 5 else 2lemma six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_sum (t : Fin 3) (e : Fin 24) : indicator_types_consecutive t e = indicator_type_even ⟨(six_cycle_slack_nonneg_rank_bounds_s_of_t t).val, by omega⟩ e + ∑ v ∈ cluster_nodes (six_cycle_slack_nonneg_rank_bounds_c_of_t t), cluster_graph_incidence_matrix e v := by fin_cases t · have h := (six_cycle_cluster_identity 0 e).1; exact h · have h := (six_cycle_cluster_identity 1 e).2; exact h · have h := (six_cycle_cluster_identity 2 e).1; exact hdef six_cycle_slack_nonneg_rank_bounds_A14 : Matrix (Fin 24) (Fin 2 ⊕ Fin 12) ℝ | e, Sum.inl s => indicator_type_even ⟨s.val, by omega⟩ e | e, Sum.inr v => cluster_graph_incidence_matrix e vdef six_cycle_slack_nonneg_rank_bounds_B14 : Matrix (Fin 2 ⊕ Fin 12) (Fin 39) ℝ | Sum.inl s, j => let t : Fin 3 := ⟨j.val / 13, by omega⟩ if s = six_cycle_slack_nonneg_rank_bounds_s_of_t t then 1 else 0 | Sum.inr v, j => let t : Fin 3 := ⟨j.val / 13, by omega⟩ let rem := j.val % 13 (if v ∈ cluster_nodes (six_cycle_slack_nonneg_rank_bounds_c_of_t t) then 1 else 0) + (if rem ≠ 0 then (if v = ⟨rem - 1, by omega⟩ then six_cycle_slack_L else 0) else 0)lemma six_cycle_slack_nonneg_rank_bounds_A14_nonneg (e : Fin 24) (a : Fin 2 ⊕ Fin 12) : 0 ≤ six_cycle_slack_nonneg_rank_bounds_A14 e a := by cases a with | inl s => dsimp [six_cycle_slack_nonneg_rank_bounds_A14, indicator_type_even]; split_ifs <;> norm_num | inr v => dsimp [six_cycle_slack_nonneg_rank_bounds_A14, cluster_graph_incidence_matrix]; split_ifs <;> norm_numlemma six_cycle_slack_nonneg_rank_bounds_B14_nonneg (a : Fin 2 ⊕ Fin 12) (j : Fin 39) : 0 ≤ six_cycle_slack_nonneg_rank_bounds_B14 a j := by cases a with | inl s => dsimp [six_cycle_slack_nonneg_rank_bounds_B14]; split_ifs <;> norm_num | inr v => dsimp [six_cycle_slack_nonneg_rank_bounds_B14, six_cycle_slack_L] have : 0 ≤ (10 : ℝ) ^ 6 := by positivity split_ifs <;> linarithlemma six_cycle_slack_nonneg_rank_bounds_sum_A14_B14 (e : Fin 24) (j : Fin 39) : (∑ a, six_cycle_slack_nonneg_rank_bounds_A14 e a * six_cycle_slack_nonneg_rank_bounds_B14 a j) = six_cycle_slack_matrix e j := by rw [Fintype.sum_sum_type] dsimp [six_cycle_slack_nonneg_rank_bounds_A14, six_cycle_slack_nonneg_rank_bounds_B14] let t : Fin 3 := ⟨j.val / 13, by omega⟩ let rem := j.val % 13 have h1 : (∑ s : Fin 2, indicator_type_even ⟨s.val, by omega⟩ e * (if s = six_cycle_slack_nonneg_rank_bounds_s_of_t t then 1 else 0)) = indicator_type_even ⟨(six_cycle_slack_nonneg_rank_bounds_s_of_t t).val, by omega⟩ e := by simp rw [h1] rw [six_cycle_slack_nonneg_rank_bounds_sum_split (cluster_graph_incidence_matrix e) (cluster_nodes (six_cycle_slack_nonneg_rank_bounds_c_of_t t)) rem (by omega) six_cycle_slack_L] rw [← add_assoc] rw [← six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_sum t e] unfold six_cycle_slack_matrix dsimp split_ifs with h · rw [add_zero] · rfldef six_cycle_slack_nonneg_rank_bounds_shared_s (t1 t2 : Fin 3) : Fin 3 := if t1.val = 0 then (if t2.val = 1 then 2 else 1) else if t1.val = 1 then (if t2.val = 2 then 0 else 2) else (if t2.val = 0 then 1 else 0)lemma six_cycle_slack_nonneg_rank_bounds_shared_s_ne_left (t1 t2 : Fin 3) : six_cycle_slack_nonneg_rank_bounds_shared_s t1 t2 ≠ t1 := by revert t1 t2; decidelemma six_cycle_slack_nonneg_rank_bounds_shared_s_ne_right (t1 t2 : Fin 3) : six_cycle_slack_nonneg_rank_bounds_shared_s t1 t2 ≠ t2 := by revert t1 t2; decidedef six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s (t s : Fin 3) : Fin 6 := if t.val = 0 then (if s.val = 1 then 4 else 3) else if t.val = 1 then (if s.val = 2 then 0 else 5) else (if s.val = 0 then 2 else 1)lemma six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_cluster (t s : Fin 3) (hne : s ≠ t) (e : Fin 24) : indicator_types_consecutive t e = indicator_type_even s e + ∑ v ∈ cluster_nodes (six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s t s), cluster_graph_incidence_matrix e v := by revert hne fin_cases t <;> fin_cases s <;> intro hne · contradiction · exact (six_cycle_cluster_identity 0 e).1 · exact (six_cycle_cluster_identity 0 e).2 · exact (six_cycle_cluster_identity 1 e).2 · contradiction · exact (six_cycle_cluster_identity 1 e).1 · exact (six_cycle_cluster_identity 2 e).1 · exact (six_cycle_cluster_identity 2 e).2 · contradictiondef six_cycle_slack_nonneg_rank_bounds_A27 : Matrix (Fin 24 ⊕ Fin 24) (Fin 3 ⊕ (Fin 12 ⊕ Fin 12)) ℝ | Sum.inl e, Sum.inl s => indicator_type_even s e | Sum.inr e, Sum.inl s => indicator_type_even s e | Sum.inl e, Sum.inr (Sum.inl v) => cluster_graph_incidence_matrix e v | Sum.inr _, Sum.inr (Sum.inl _) => 0 | Sum.inl _, Sum.inr (Sum.inr _) => 0 | Sum.inr e, Sum.inr (Sum.inr v) => cluster_graph_incidence_matrix e vdef six_cycle_slack_nonneg_rank_bounds_B27 : Matrix (Fin 3 ⊕ (Fin 12 ⊕ Fin 12)) (Fin 39 × Fin 39) ℝ | Sum.inl s', (j1, j2) => let t1 : Fin 3 := ⟨j1.val / 13, by omega⟩ let t2 : Fin 3 := ⟨j2.val / 13, by omega⟩ if s' = six_cycle_slack_nonneg_rank_bounds_shared_s t1 t2 then 1 else 0 | Sum.inr (Sum.inl v1), (j1, j2) => let t1 : Fin 3 := ⟨j1.val / 13, by omega⟩ let t2 : Fin 3 := ⟨j2.val / 13, by omega⟩ let rem1 := j1.val % 13 let s := six_cycle_slack_nonneg_rank_bounds_shared_s t1 t2 (if v1 ∈ cluster_nodes (six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s t1 s) then 1 else 0) + (if rem1 ≠ 0 then (if v1 = ⟨rem1 - 1, by omega⟩ then six_cycle_slack_L else 0) else 0) | Sum.inr (Sum.inr v2), (j1, j2) => let t1 : Fin 3 := ⟨j1.val / 13, by omega⟩ let t2 : Fin 3 := ⟨j2.val / 13, by omega⟩ let rem2 := j2.val % 13 let s := six_cycle_slack_nonneg_rank_bounds_shared_s t1 t2 (if v2 ∈ cluster_nodes (six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s t2 s) then 1 else 0) + (if rem2 ≠ 0 then (if v2 = ⟨rem2 - 1, by omega⟩ then six_cycle_slack_L else 0) else 0)lemma six_cycle_slack_nonneg_rank_bounds_A27_nonneg (row : Fin 24 ⊕ Fin 24) (col : Fin 3 ⊕ (Fin 12 ⊕ Fin 12)) : 0 ≤ six_cycle_slack_nonneg_rank_bounds_A27 row col := by rcases row with e | e <;> rcases col with s | (v | v) · dsimp [six_cycle_slack_nonneg_rank_bounds_A27, indicator_type_even]; split_ifs <;> norm_num · dsimp [six_cycle_slack_nonneg_rank_bounds_A27, cluster_graph_incidence_matrix]; split_ifs <;> norm_num · dsimp [six_cycle_slack_nonneg_rank_bounds_A27]; exact le_rfl · dsimp [six_cycle_slack_nonneg_rank_bounds_A27, indicator_type_even]; split_ifs <;> norm_num · dsimp [six_cycle_slack_nonneg_rank_bounds_A27]; exact le_rfl · dsimp [six_cycle_slack_nonneg_rank_bounds_A27, cluster_graph_incidence_matrix]; split_ifs <;> norm_numlemma six_cycle_slack_nonneg_rank_bounds_B27_nonneg (a : Fin 3 ⊕ (Fin 12 ⊕ Fin 12)) (c : Fin 39 × Fin 39) : 0 ≤ six_cycle_slack_nonneg_rank_bounds_B27 a c := by rcases a with s | (v | v) · dsimp [six_cycle_slack_nonneg_rank_bounds_B27]; split_ifs <;> norm_num · dsimp [six_cycle_slack_nonneg_rank_bounds_B27, six_cycle_slack_L] have : 0 ≤ (10 : ℝ) ^ 6 := by positivity split_ifs <;> linarith · dsimp [six_cycle_slack_nonneg_rank_bounds_B27, six_cycle_slack_L] have : 0 ≤ (10 : ℝ) ^ 6 := by positivity split_ifs <;> linarithlemma six_cycle_slack_nonneg_rank_bounds_sum_A27_B27 (row : Fin 24 ⊕ Fin 24) (c : Fin 39 × Fin 39) : (∑ a, six_cycle_slack_nonneg_rank_bounds_A27 row a * six_cycle_slack_nonneg_rank_bounds_B27 a c) = oneProduct six_cycle_slack_matrix six_cycle_slack_matrix row c := by let (j1, j2) := c let t1 : Fin 3 := ⟨j1.val / 13, by omega⟩ let t2 : Fin 3 := ⟨j2.val / 13, by omega⟩ let rem1 := j1.val % 13 let rem2 := j2.val % 13 let s := six_cycle_slack_nonneg_rank_bounds_shared_s t1 t2 rcases row with e1 | e2 · unfold oneProduct; dsimp rw [Fintype.sum_sum_type, Fintype.sum_sum_type] dsimp [six_cycle_slack_nonneg_rank_bounds_A27, six_cycle_slack_nonneg_rank_bounds_B27] have h1 : (∑ s' : Fin 3, indicator_type_even s' e1 * (if s' = s then 1 else 0)) = indicator_type_even s e1 := by simp rw [h1] have h3 : (∑ v : Fin 12, (0 : ℝ) * ((if v ∈ cluster_nodes (six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s t2 s) then 1 else 0) + if rem2 ≠ 0 then if v = ⟨rem2 - 1, by omega⟩ then six_cycle_slack_L else 0 else 0)) = 0 := by simp rw [h3, add_zero] rw [six_cycle_slack_nonneg_rank_bounds_sum_split (cluster_graph_incidence_matrix e1) (cluster_nodes (six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s t1 s)) rem1 (by omega) six_cycle_slack_L] rw [← add_assoc] rw [← six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_cluster t1 s (six_cycle_slack_nonneg_rank_bounds_shared_s_ne_left t1 t2) e1] unfold six_cycle_slack_matrix; dsimp split_ifs with h · rw [add_zero] · rfl · unfold oneProduct; dsimp rw [Fintype.sum_sum_type, Fintype.sum_sum_type] dsimp [six_cycle_slack_nonneg_rank_bounds_A27, six_cycle_slack_nonneg_rank_bounds_B27] have h1 : (∑ s' : Fin 3, indicator_type_even s' e2 * (if s' = s then 1 else 0)) = indicator_type_even s e2 := by simp rw [h1] have h2 : (∑ v : Fin 12, (0 : ℝ) * ((if v ∈ cluster_nodes (six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s t1 s) then 1 else 0) + if rem1 ≠ 0 then if v = ⟨rem1 - 1, by omega⟩ then six_cycle_slack_L else 0 else 0)) = 0 := by simp rw [h2, zero_add] rw [six_cycle_slack_nonneg_rank_bounds_sum_split (cluster_graph_incidence_matrix e2) (cluster_nodes (six_cycle_slack_nonneg_rank_bounds_cluster_of_t_s t2 s)) rem2 (by omega) six_cycle_slack_L] rw [← add_assoc] rw [← six_cycle_slack_nonneg_rank_bounds_indicator_types_eq_A_plus_cluster t2 s (six_cycle_slack_nonneg_rank_bounds_shared_s_ne_right t1 t2) e2] unfold six_cycle_slack_matrix; dsimp split_ifs with h · rw [add_zero] · rfl/-- Nonnegative rank bounds: rank_+(S) ≤ 14 and rank_+(S ⊗₁ S) ≤ 27 for the 6-cycle slack block S. -/theorem six_cycle_slack_nonneg_rank_bounds : HasNonnegFactorization six_cycle_slack_matrix 14 ∧ HasNonnegFactorization (oneProduct six_cycle_slack_matrix six_cycle_slack_matrix) 27 := by constructor · exact six_cycle_slack_nonneg_rank_bounds_hasNonnegFactorization_equiv six_cycle_slack_matrix finSumFinEquiv six_cycle_slack_nonneg_rank_bounds_A14 six_cycle_slack_nonneg_rank_bounds_B14 six_cycle_slack_nonneg_rank_bounds_A14_nonneg six_cycle_slack_nonneg_rank_bounds_B14_nonneg six_cycle_slack_nonneg_rank_bounds_sum_A14_B14 · have e1 : Fin 12 ⊕ Fin 12 ≃ Fin 24 := finSumFinEquiv have e2 : Fin 3 ⊕ Fin 24 ≃ Fin 27 := finSumFinEquiv have e27 : Fin 3 ⊕ (Fin 12 ⊕ Fin 12) ≃ Fin 27 := (Equiv.sumCongr (Equiv.refl (Fin 3)) e1).trans e2 exact six_cycle_slack_nonneg_rank_bounds_hasNonnegFactorization_equiv (oneProduct six_cycle_slack_matrix six_cycle_slack_matrix) e27 six_cycle_slack_nonneg_rank_bounds_A27 six_cycle_slack_nonneg_rank_bounds_B27 six_cycle_slack_nonneg_rank_bounds_A27_nonneg six_cycle_slack_nonneg_rank_bounds_B27_nonneg six_cycle_slack_nonneg_rank_bounds_sum_A27_B27