row_conflict_edges
For an n × m partial binary matrix P with entries in Option (Fin 2) and a finite set of columns C : Finset (Fin m), row_conflict_edges P C is the finite set of pairs (i₁, i₂) ∈ Finset (Fin n × Fin n) with i₁ < i₂ such that there exists a column j ∉ C with either P i₁ j = some 0 and P i₂ j = some 1, or P i₁ j = some 1 and P i₂ j = some 0.
Statement
def row_conflict_edges {n m : ℕ} (P : Matrix (Fin n) (Fin m) (Option (Fin 2))) (C : Finset (Fin m)) :
Finset (Fin n × Fin n)- Defined in
- arXiv:2611.14163, Lemma 4.1
- Verified
- 12 Nov 2026
- Axioms
- none listed
Read back from the Lean
Given natural numbers $n$ and $m$, an $n \times m$ matrix $P$ with entries in $\mathrm{Option}(\mathrm{Fin}\;2)$ (i.e., each entry is either none, some 0, or some 1), and a finite set of column indices $C \subseteq \mathrm{Fin}\;m$, row_conflict_edges P C is the finite set of pairs $(i, i') \in \mathrm{Fin}\;n \times \mathrm{Fin}\;n$ such that $i < i'$ and there exists a column $j \in \mathrm{Fin}\;m$ with $j \notin C$ such that either ($P_{i,j} = \mathrm{some}\;0$ and $P_{i',j} = \mathrm{some}\;1$) or ($P_{i,j} = \mathrm{some}\;1$ and $P_{i',j} = \mathrm{some}\;0$).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- The set of unordered row-conflict edge pairs (i₁, i₂) with i₁ < i₂ for rows of a partial binary matrix outside a set of columns C. -/ def row_conflict_edges {n m : ℕ} (P : Matrix (Fin n) (Fin m) (Option (Fin 2))) (C : Finset (Fin m)) : Finset (Fin n × Fin n) := (Finset.univ : Finset (Fin n × Fin n)).filter (fun p => p.1 < p.2 ∧ ∃ j, j ∉ C ∧ ((P p.1 j = some 0 ∧ P p.2 j = some 1) ∨ (P p.1 j = some 1 ∧ P p.2 j = some 0)))