\documentclass[11pt,a4paper]{article} \usepackage[left=21mm,right=21mm,top=19mm,bottom=17mm]{geometry} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{amsmath,amssymb,amsthm} \usepackage{tikz} \usepackage{fancyhdr} \usepackage{hyperref} \definecolor{ink}{HTML}{172D3A} \definecolor{teal}{HTML}{126778} \definecolor{rust}{HTML}{9B4223} \definecolor{softteal}{HTML}{E3F2F2} \definecolor{softrust}{HTML}{FAE9E2} \hypersetup{colorlinks=true,linkcolor=teal,citecolor=teal,urlcolor=teal, pdftitle={Lexicographic Canonicity Is coNP-Complete on Square-Free Graphs}, pdfauthor={Chia Chuan Hsu}} \newtheorem{theorem}{Theorem} \newtheorem{lemma}[theorem]{Lemma} \newenvironment{papersummary}{\small\noindent\textbf{Abstract}\par}{\par\vspace{4pt}} \pagestyle{fancy} \fancyhf{} \fancyhead[L]{\small\color{teal}Lexicographic Canonicity on Square-Free Graphs} \fancyfoot[R]{\small\color{teal}\thepage} \setlength{\headheight}{14pt} \renewcommand{\headrulewidth}{0.35pt} \setlength{\parindent}{0pt} \setlength{\parskip}{2pt plus 0.6pt} \setlength{\emergencystretch}{2em} \setlength{\textfloatsep}{12pt plus 3pt minus 3pt} \setlength{\intextsep}{11pt plus 3pt minus 2pt} \raggedbottom \begin{document} \thispagestyle{plain} {\color{teal}\rule{\linewidth}{1.1pt}}\par\vspace{3pt} {\color{ink}\LARGE\bfseries Lexicographic Canonicity Is coNP-Complete\\ on Square-Free Graphs\par} \vspace{5pt} Chia Chuan Hsu\hfill December 4, 2026\par \vspace{8pt} \begin{papersummary} Arends, Ouaknine, and Wampler conjectured in 2011 that checking whether a labelled graph has the lexicographically greatest column-wise adjacency word is coNP-complete, both for arbitrary graphs and for graphs with no four-cycles. We prove both statements by reducing from binary matrix maximality under independent row and column permutations. The reduction produces connected bipartite graphs of radius at most three. We give distinct integer directions in three dimensions whose orthogonality graph is exactly the constructed graph. The reduction remains valid when these coordinates are supplied with the input. \end{papersummary} \href{https://github.com/easyvibecoding/math/tree/c591166f36b4e2d570bcd8d96514e66d7bd3a234/research/square-free-canonicity}{Lean 4 and reproduction materials} \section{The conjecture} For a simple graph \(G\) with an ordering \(v_1,\ldots,v_N\), write \[ W_G(v_1,\ldots,v_N)= (A_{12}\,A_{13}A_{23}\,A_{14}A_{24}A_{34}\,\cdots\, A_{1N}\cdots A_{N-1,N}), \qquad A_{ij}=\mathbf{1}_{v_i v_j\in E(G)}. \] Canonicity asks whether the input order attains the maximum of this word over all permutations, with \(0<1\). Arends, Ouaknine, and Wampler used this particular order to prune a search for small Kochen--Specker systems. They conjectured coNP-completeness for all graphs and for graphs without a four-cycle as a subgraph, following Theorem 8 of their full preprint~\cite{arends}. Ordinary graph canonization may choose any isomorphism-invariant representative. Here the representative is specified by the displayed order. \begin{theorem}\label{thm:main} Canonicity is coNP-complete. It remains coNP-complete for connected bipartite graphs without four-cycles and with radius at most three, even when a faithful three-dimensional integer ray realization is supplied. Faithfulness means that distinct vertices have distinct directions, with orthogonality exactly on the edges. \end{theorem} A certificate of noncanonicity is a permutation whose word is larger. One can check the promised graph properties and supplied integer coordinates in polynomial time. We reduce the complementary decision problem from improvement of a binary matrix in row order under independent row and column permutations. This problem is NP-complete by Crawford, Ginsberg, Luks, and Roy~\cite{crawford}, Appendix, Lemma 9.1, which proves hardness for vertex--edge incidence matrices. The supplied coordinates accompany the graph as auxiliary data. Every vertex permutation is eligible in the adjacency comparison. \section{Encoding the matrix as a graph} Let \(B\) be an input matrix. Appending zero rows gives an \(m\)-by-\(n\) matrix \(A\) with \(m>n\ge 1\). This preserves canonicity. For each column permutation, any all-zero rows can be moved to the end without decreasing the word, and padding the end preserves every strict comparison. Thus a permutation improves either input exactly when one improves the other. Construct a graph \(G(A)\) as follows. A root \(o\) has neighbors \(a,b\) and \(m\) leaves. The row hub \(a\) is adjacent to all \(m\) row vertices \(R_i\), and the column hub \(b\) to all \(n\) column vertices \(C_j\). Each cell \((i,j)\) has one vertex \(P_{ij}\), adjacent to \(R_i\) in every case and to \(C_j\) exactly when \(A_{ij}=1\). These are all the edges. A matrix order specifies a graph order by listing the root, the two hubs \(a,b\), the leaves, all rows, all columns, then the cells. In the last block, group cells by row order, then list the one cells in column order followed by the zero cells. Zero cells for a fixed row have identical neighborhoods. \begin{figure}[!ht] \centering \begin{tikzpicture}[thick, scale=0.94, v/.style={draw=teal,fill=softteal,rounded corners=2pt,inner sep=4pt,minimum width=22pt}, data/.style={draw=rust,fill=softrust,rounded corners=2pt,inner sep=4pt,minimum width=33pt}] \node[v] (root) at (0,2.8) {$o$}; \node[v] (a) at (-2,1.65) {$a$}; \node[v] (b) at (2,1.65) {$b$}; \node[v] (leaf) at (0,1.65) {$D_k$}; \node[v] (r) at (-2,0.55) {$R_i$}; \node[v] (c) at (2,0.55) {$C_j$}; \node[data] (p) at (0,-0.7) {$P_{ij}$}; \draw[teal] (a)--(root)--(b) (root)--(leaf) (a)--(r) (b)--(c) (r)--(p); \draw[rust,dashed] (p)--node[below right,inner sep=2pt] {\small $A_{ij}=1$} (c); \node[anchor=west,text=ink] at (3.4,2.8) {\small Root}; \node[anchor=west,text=ink] at (3.4,1.65) {\small Hubs and leaves}; \node[anchor=west,text=ink] at (3.4,0.55) {\small Rows and columns}; \node[anchor=west,text=ink] at (3.4,-0.7) {\small Matrix cells}; \end{tikzpicture} \caption{A subgraph of the construction showing one cell. The dashed edge records the bit. The root and matrix ports share one bipartition class.} \end{figure} The graph has \(3+2m+n+mn\) vertices and \(2+2m+n+mn+|A|_1\) edges. The displayed levels prove connectivity and the radius bound. The root, rows, and columns constitute one bipartition class. In that class a pair of rows shares only \(a\), a pair of columns shares only \(b\), and a row and a column share at most their own cell. A pair involving the root shares only the corresponding hub. Thus there is no four-cycle. \section{Why the construction preserves improvement} Given a fixed prefix of vertices, the next column is the list of a candidate vertex's adjacency bits to that prefix. Swapping in an unplaced vertex with a larger such column strictly improves the full word. Also, if two candidates first differ in their adjacency to the already placed prefix, no later adjacency bit can reverse that comparison. \begin{lemma}\label{lem:normal} Every maximal graph word has the block order described in Section 2, with some row and column orders and irrelevant permutations of leaves and zero cells. \end{lemma} \begin{proof} Starting at any vertex, a largest word for that start lists all its neighbors first. Since the graph has no triangles, these first neighbor columns each begin with one and have only zeros below it. At the first step after the smaller of two degrees, the larger degree therefore gives the larger word. The root has degree \(m+2\). The degrees of \(a,b,R_i,C_j,P_{ij},D_k\) are at most \(m+1,n+1,n+1,m+1,2,1\), respectively. Hence a maximum starts with the root and its entire neighborhood. Each unplaced port has a single one among the coordinates of this first block, at its own hub. A cell has all zeros there. Consequently the ports come before the cells, with each hub's ports contiguous and groups in hub order. The within-port edges are all absent. The largest prefix puts a hub in the first available neighbor position, then favors the row hub. Its \(m\) copies of the leading one-hot column exceed the column hub's \(n\) copies. With \(a\) first, placing \(b\) second maximizes the next one-hot group. This leaves the leaf order immaterial. Within the remaining cell block, the one at a row comes before any bit at a column. Earlier row slots dominate later ones. Within a fixed row, a one cell has a one at its column, and hence dominates any zero cell. The one cells appear in column order. These comparisons use only bits to the prefix, and cell vertices have no edges between them. \end{proof} \begin{lemma}\label{lem:order} For two orders of the rows and columns, their corresponding graph words compare in exactly the same way as their row-wise matrix words. \end{lemma} \begin{proof} The graph word through the two port blocks is independent of these orders. Each row's cell block has size \(n\), and only its list of one columns changes the word there. Two equal matrix rows yield identical cell columns. At the first differing bit of the first differing matrix row, the earlier one-column entries coincide. The matrix with a one at the differing bit supplies a cell with its additional one at that position. The other matrix supplies a later one or a zero cell. Their graph columns compare in the same direction. Cell-to-cell bits are all zero. Equal matrix words give equal graph words. \end{proof} An improving matrix permutation gives an improving graph permutation by Lemma~\ref{lem:order}. If the graph order can be improved, one of its global maxima improves it and has the stipulated form by Lemma~\ref{lem:normal}. Lemma~\ref{lem:order} then gives a strictly improving matrix permutation. The output graph and order can be constructed by scanning the matrix, with two scans of each row to list its one and zero cells. This is a polynomial many-one reduction. \section{A faithful integer realization} Index rows, columns, and leaves from one. Use the following vector representatives, where \(t_{ij}=2m+j+n(1-A_{ij})\). \[ \begin{array}{c|c@{\qquad}c|c} o &(0,0,1)&D_k&(k+1,1,0)\\ a &(1,0,0)&b&(1,1,0)\\ R_i &(0,1,i)&C_j&(-1,1,2m+j)\\ P_{ij} &(t_{ij}-i,-i,1)&& \end{array} \] All entries have absolute value at most \(2m+2n\). A cell has dot products \(i'-i\) with \(R_{i'}\) and \(2m+j'-t_{ij}\) with \(C_{j'}\), so its port adjacencies are exact. The first coordinates of the cell vectors are positive, their second coordinates negative, and their third coordinates one. Therefore cell pairs have positive dot products. For the two hubs the dot products with a cell are \(t_{ij}-i>0\) and \(t_{ij}-2i>0\). A leaf's dot product with a cell is \((k+1)(t_{ij}-i)-i>0\). The root is perpendicular to exactly its neighbors. The two hubs, leaves, and ports have the required remaining incidences: the unintended leaf--column products equal \(-k\), and all other nonedges among those vertices have nonzero dot products by the displayed coordinates. The vectors with last coordinate zero have different slopes in the first two coordinates, and all other representatives have a positive last coordinate. On the latter group, the signs of the first two coordinates separate the root, the rows, the columns, and the cells. The rows and columns are distinct within their groups by their last coordinates after fixing the second coordinate to one. A cell's second coordinate determines \(i\) and the first then determines \(t_{ij}\), which determines \(j\). Each cell already has third coordinate one. This proves distinctness up to nonzero scalar. The coordinates are computable in polynomial time, completing the proof of Theorem~\ref{thm:main}. \section{Verification} The Lean 4 file proves connectivity, bipartiteness, absence of four-cycles, and faithfulness of the coordinate formulas, including distinctness of rays. It also proves next-column greediness for maximal words, the comparison of row-major matrix words with the corresponding ordered cell signatures, and the formula for each cell's adjacency to the row and column vertices. The manuscript supplies the global block order in Lemma~\ref{lem:normal}, the zero-row padding argument, and the complexity transfer. The executable reproducer checks all 682 binary matrices whose two dimensions are between one and three. It compares an enumeration of matrix row and column permutations with a graph-order search that uses greedy next columns and identifies equal neighborhoods. It also checks the supplied integer vectors, connectivity, bipartiteness, and absence of four-cycles on every constructed graph. \paragraph{AI use disclosure.} GPT-6.2 Sol assisted with the mathematical derivation, the Lean 4 and Python verification code, and the writing of the original manuscript. \begin{thebibliography}{9} \bibitem{arends} F. Arends, J. Ouaknine, and C. W. Wampler. On searching for small Kochen--Specker vector systems. \emph{WG 2011}, LNCS 6986, 23--34. \href{https://arxiv.org/abs/1111.3301}{Full preprint, Section 4}. \bibitem{crawford} J. M. Crawford, M. L. Ginsberg, E. M. Luks, and A. Roy. Symmetry-breaking predicates for search problems. \emph{KR 1996}, 148--159. \href{https://www.cs.uoregon.edu/Reports/TR-1996-012.pdf}{Appendix, Lemma 9.1}. \end{thebibliography} \end{document}