betaFeedback

WorksMathematics

Small real projective codes

Abstract

We classify the arrangements of up to twelve lines through the origin in R3\mathbb{R}^3 that maximize the smallest angle between them, as well as eleven or twelve lines in R4\mathbb{R}^4, and we formalize the proofs using Lean. The cases that had not previously been classified are ten through twelve lines in R3\mathbb{R}^3 and eleven lines in R4\mathbb{R}^4.

This document is a progress report from our joint project on Lean verification of computer-assisted proofs, with code available at https://github.com/henrycohn/line-packings. We plan to describe our methodology and what we have learned from these experiments in a future paper.

All of the proofs developed for this project were found by artificial intelligence, specifically the GPT-6 Astra, GPT-6.1 Sol, GPT-6.2 Sol, and GPT-6.2 Astra models from OpenAI. The authors provided guidance and suggestions, but we did not carry out any of the detailed work ourselves. We have verified that the Lean theorems are correctly stated, and we understand the overall proof techniques, but we rely on Lean verification for our confidence in the enumeration and analysis of contact graphs.

Section 1 was written by the authors and reflects what we believe most human readers would want to learn from this document. Sections 2 through 13 were written entirely by artificial intelligence and are the AI models’ account of their work. We have not made any substantive edits to the AI-written sections and cannot ensure that they precisely correspond with the Lean proofs.

Introduction

How far apart can we make NN lines through the origin in Rd\mathbb{R}^d? Specifically, how large can we make the smallest angle between two of them? This problem is equivalent to separating NN points in RPd−1\mathbb{R}\mathrm{P}^{d-1} as much as possible under the Fubini–Study metric.

Suppose the lines are Rx1,…,RxN\mathbb{R}x_1,\ldots,\mathbb{R}x_N, where x1,…,xNx_1,\ldots,x_N are unit vectors in Rd\mathbb{R}^d. We define the coherence of the line configuration to be

max⁡i<j∣⟨xi,xj⟩∣,\max_{i<j}|\langle x_i,x_j\rangle|,

or 0 by convention if N=1N=1, and our goal is to minimize the coherence. The minimal coherence is of course 0 for N≤dN\le d, attained by orthogonal lines, and so we assume N≥d+1N\ge d+1.

In this document, we determine the optimal coherence for up to 12 lines in R3\mathbb{R}^3 and for 11 or 12 in R4\mathbb{R}^4, and we classify all the optimal line configurations (see below for which cases were previously known). The proofs are formalized end to end in Lean at https://github.com/henrycohn/line-packings. The optimal configurations are unique up to isometry, except in three cases: there are two optimal configurations of 9 lines in R3\mathbb{R}^3, a two-parameter family for 10 lines in R3\mathbb{R}^3 since one line is a rattler (i.e., it is not in contact with any other, except on the boundary of its allowed region), and two for 11 lines in R4\mathbb{R}^4.

Table 1.1 lists the coherence and the optimal line configurations, and Figure 1.1 through 1.5 (drawn by GPT-6.2 Astra) show the optimal three-dimensional configurations via a stereographic view of one hemisphere. In the figures, each dot represents one line, with arcs joining the closest pairs and continuing across the boundary with opposite points identified. The decimal expansions in Table 1.1 are roots of the polynomials 1537x9+677x8−584x7−80x6+146x5−78x4−80x3−8x2+5x+11537x^9+677x^8-584x^7-80x^6+146x^5-78x^4-80x^3-8x^2+5x+1 for 8 lines in R3\mathbb{R}^3, 13x3+x2−5x−113x^3+x^2-5x-1 for 9 lines in R3\mathbb{R}^3, and 5x6+200x5−115x4−40x3+15x2−15x^6+200x^5-115x^4-40x^3+15x^2-1 for 11 lines in R3\mathbb{R}^3.

NNddCoherenceOptimal configurations
431/31/3Cube diagonals
531/51/\sqrt{5}Five icosahedron diagonals
631/51/\sqrt{5}All six icosahedron diagonals
731/31/\sqrt{3}Cube diagonals and facet normals
830.647588…0.647588\ldots
930.669362…0.669362\ldotstwo configurations
1036/(3+33)6/(3+\sqrt{33})two-parameter family of configurations
1130.714434…0.714434\ldots
1231/(7−42)1/(7-4\sqrt{2})Rhombicuboctahedron diagonals
1141/21/2Eleven 24-cell diagonals or Cohn–Woo configuration [9]
1241/21/2All twelve 24-cell diagonals

Table 1.1. The optimal line configurations. Here a diagonal always connects opposite vertices, and the configurations without explicit descriptions are defined in the text or figures.

Optimal configurations of four lines and six lines

Figure 1.1. Optimal configurations of four lines (left) and six lines (right). The optimal configuration of five lines can be obtained by deleting any one of the six lines.

For R3\mathbb{R}^3, the answers were previously known for N≤9N\le9: Fejes Tóth [17] dealt with N≤6N\le6, Conway, Hardin, and Sloane [11] proved optimality for N=7N=7 while Cohn and Woo [9] proved uniqueness, Mixon and Parshall [26] dealt with N=8N=8, and van den Berg [5] dealt with N=9N=9. For R4\mathbb{R}^4, Levenšteĭn [22] proved optimality for N=12N=12, Conway, Hardin, and Sloane [11] proved optimality for N=11N=11, and Anstreicher [1] proved uniqueness for N=12N=12. The optimal configurations for N=8N=8 through 12 in R3\mathbb{R}^3 were constructed by Conway, Hardin, and Sloane [11], and Cohn and Woo [9] found the 11-line configuration in R4\mathbb{R}^4 that does not consist of 24-cell diagonals.

Our proofs take two different approaches. The three-dimensional proofs work by exhaustive enumeration of contact graphs (except for 4 and 6 lines, for which more direct proofs were already known, and 7 lines, for which we give a simple proof), and the four-dimensional proofs are based on analyzing the orthoplex bound of Conway, Hardin, and Sloane [11].

In three dimensions, enumeration of contact graphs was previously employed by Mixon and Parshall [26] to solve the 8-line problem, inspired by work of Musin and Tarasov [29, 30, 31, 32] on spherical codes. In our initial investigation, our AI agents used the program surfttri developed by Sulanke [38] to generate candidate contact maps and wrote Python code to rule out infeasible cases. For the final proof, the agents formalized the geometric reduction in Lean, implemented a direct enumeration of signed contact maps, and verified the case analysis. Our only substantial contribution to the formalization was to suggest storing adjacency data as integer bit masks, which made the enumeration practical in Lean (see Subsection 7.4).

By contrast, the four-dimensional arguments and the seven-line argument in R3\mathbb{R}^{3} can be checked by hand, and the Lean verification in these cases is just for the sake of completeness. In the remainder of this introduction, we will explain these proofs.

The orthoplex bound used in these proofs is based on an embedding of RPd−1\mathbb{RP}^{d-1} into the space of d×dd \times d symmetric matrices under the trace inner product ⟨A,B⟩=tr⁡(AB)\langle A, B\rangle= \operatorname{tr}(AB), which takes a unit vector xix_i spanning a line to the matrix Mi=xixiT−Id/dM_i = x_i x_i^{T} - I_d/d. Then

⟨Mi,Mj⟩=⟨xi,xj⟩2−1d\langle M_i, M_j\rangle= \langle x_i, x_j\rangle^2 - \frac{1}{d}
Optimal configurations of seven lines (left) and eight lines (right)

Figure 1.2. Optimal configurations of seven lines (left) and eight lines (right).

The two inequivalent optimal configurations of nine lines

Figure 1.3. The two inequivalent optimal configurations of nine lines.

Optimal configurations of ten lines (left) and eleven lines (right)

Figure 1.4. Optimal configurations of ten lines (left) and eleven lines (right). The shaded region shows where the ten-line rattler can move with the other nine lines fixed.

The optimal configuration of twelve lines

Figure 1.5. The optimal configuration of twelve lines.

and the matrices M1,…,MNM_1,\ldots,M_N are contained in the subspace of matrices with trace zero, which has dimension

D=d(d+1)2−1.D = \frac{d(d+1)}{2} - 1.

Now suppose the line configuration has coherence at most 1/d1/\sqrt{d}, as is the case for the optimal configurations of 7 lines in R3\mathbb{R}^3 and 11 or 12 lines in R4\mathbb{R}^4. We turn the lines into vertices of a graph by placing an edge between each pair with ∣⟨xi,xj⟩∣<1/d\lvert\langle x_i,x_j\rangle\rvert< 1/\sqrt{d} (i.e., for i≠ji \ne j, there is an edge when ⟨Mi,Mj⟩<0\langle M_i,M_j\rangle< 0 and no edge when ⟨Mi,Mj⟩=0\langle M_i,M_j\rangle= 0). When we refer to the Gram matrix of a set of lines in this section, we will mean the Gram matrix of the corresponding matrices MiM_i (later sections use a different convention).

Lemma 1.1. Let GG be the Gram matrix of a connected component of the graph formed by the lines, and suppose GG is singular. Then dim⁡ker⁡G=1\dim\ker G = 1, the kernel is spanned by a vector with positive entries, and there exist positive weights αi\alpha_i such that

∑iαixixiT=Id,\sum_i \alpha_i x_i x_i^{\mathsf{T}} = I_d,

where the sum is over ii for which Rxi\mathbb{R}x_i is in the connected component. The connected component must have size at least dd, and if it has size dd, then it consists of dd orthogonal lines.

Proof. Suppose v∈ker⁡G∖{0}v \in\ker G \setminus\{0\}, and let ww have entries wi=∣vi∣w_i = \lvert v_i\rvert for ii in the index set of vv (i.e., the indices of lines contained in the connected component). Then wTGw≤vTGv=0w^{\mathsf{T}}Gw \le v^{\mathsf{T}}Gv = 0, because GG has nonpositive entries outside the diagonal, and so Gw=0Gw = 0 since GG is symmetric and positive semidefinite. If wi=0w_i = 0 for some ii, then

∑j≠iGi,jwj=(Gw)i=0,\sum_{j \ne i} G_{i,j}w_j = (Gw)_i = 0,

and all the terms in the sum are nonpositive. Thus, wj=0w_j = 0 whenever wi=0w_i = 0 and Gi,j<0G_{i,j} < 0, and connectedness implies that w=0w = 0 if any entry wiw_i vanishes. We conclude that ker⁡G\ker G must be one-dimensional, since otherwise it would contain a nonzero vector that vanishes in some coordinate, and it is generated by a positive vector ww. Setting αi=dwi/∑jwj\alpha_i = dw_i/\sum_j w_j turns Gw=0Gw = 0 into

∑iαixixiT=Id.(1)\sum_i \alpha_i x_i x_i^{\mathsf{T}} = I_d. \tag*{(1)}

The rank of ∑iαixixiT\sum_i \alpha_i x_i x_i^{\mathsf{T}} is therefore dd, and so the connected component must have size at least dd. If it has size dd, then the lines in the connected component must be orthogonal: if we let the matrix AA have columns αixi\sqrt{\alpha_i}x_i, then AAT=IdAA^{\mathsf{T}} = I_d by (1), and therefore ATA=IdA^{\mathsf{T}}A = I_d, which implies that the columns of AA are orthonormal. □

The Gram matrix of the entire line configuration is an N×NN \times N matrix with rank at most DD, and it has a block decomposition into blocks corresponding to the connected components. Thus, there must be at least N−DN - D connected components that have singular Gram matrices, which we will call singular connected components.

We can now prove the orthoplex bound for the special case of projective space. If the coherence were strictly less than 1/d1/\sqrt{d} with N>D+1N > D + 1, then the graph would be complete, which would contradict having at least N−DN - D singular connected components. The inequality N>D+1N > D + 1 holds for (N,d)∈{(7,3),(11,4),(12,4)}(N,d) \in\{(7,3), (11,4), (12,4)\} so the optimal coherence in each of these cases is 1/d1/\sqrt{d}, and all that remains is to classify the configurations that achieve coherence 1/d1/\sqrt{d}.

1.1. Seven lines in R3\mathbb{R}^3. Lemma 1.1 is already enough to give a simple proof of optimality and uniqueness for the optimal configurations of seven lines in R3\mathbb{R}^3. There must be at least N−D=2N - D = 2 singular connected components, each containing at least three lines, and therefore there must be a singular connected component of size three. The corresponding vectors form an orthonormal basis, and all the other vectors have coordinates ±1/3\pm1/\sqrt{3} with respect to this basis, because the corresponding Gram matrix entries must be 0. The eight choices of signs yield a unique set of four lines, and the configuration is unique up to isometry.

1.2. Twelve lines in R4\mathbb{R}^4. The proof is equally simple for twelve lines in R4\mathbb{R}^4. There must be at least N−D=3N - D = 3 singular connected components, each of size at least four and therefore equal to four. If we choose one component to form an orthonormal basis, then all the remaining vectors must have coordinates ±1/2\pm1/2 with respect to this basis, and the sixteen choices of signs yield a unique set of eight lines. The resulting line configuration is the diagonals of a regular 24-cell.

1.3. Eleven lines in R4\mathbb{R}^4. The same argument works for eleven lines in R4\mathbb{R}^4, provided that there is a singular connected component of size four, and it yields eleven of the twelve 24-cell diagonals (all deletions are equivalent by symmetry). However, it is also possible that every singular connected component might have size five or greater. They cannot all have size six or greater, since there must be at least two of them and there are only eleven lines.

The remaining case of size five will give the Cohn–Woo configuration. We will number the lines so that x1,…,x5x_1,\ldots,x_5 correspond to a singular connected component, and we will call the other six lines external lines. By Lemma 1.1, there are positive weights αi\alpha_i with

∑i=15αixixiT=I4,(2)\sum_{i=1}^{5} \alpha_i x_i x_i^{\mathsf{T}} = I_4, \tag*{(2)}

References

  1. [1]K. M. Anstreicher, Improved linear programming bounds for antipodal spherical codes, Discrete Comput. Geom. 28 (2002), 107–114, doi:10.1007/s00454-001-0080-5.DOI
  2. [2]C. Bachoc and F. Vallentin, New upper bounds for kissing numbers from semidefinite programming, J. Amer. Math. Soc. 21 (2008), 909–924, doi:10.1090/S0894-0347-07-00589-9, arXiv:math/0608426.DOI
  3. [3]D. W. Barnette, Generating the triangulations of the projective plane, J. Combin. Theory Ser. B 33 (1982), 222–230, doi:10.1016/0095-8956(82)90041-7.DOI
  4. [4]E. A. Bender, E. R. Canfield, and R. W. Robinson, The enumeration of maps on the torus and the projective plane, Canad. Math. Bull. 31 (1988), 257–271, doi:10.4153/CMB-1988-039-4.DOI
  5. [5]F. G. A. van den Berg, The optimal packing of nine lines in R³, preprint, 2026, doi:10.5281/zenodo.24608928.
  6. [6]G. Brinkmann and B. D. McKay, Fast generation of planar graphs, MATCH Commun. Math. Comput. Chem. 58 (2007), 323–357, https://users.cecs.anu.edu.au/~bdm/plantri/.
  7. [7]A. R. Calderbank, P. J. Cameron, W. M. Kantor, and J. J. Seidel, Z₄-Kerdock codes, orthogonal spreads, and extremal Euclidean line-sets, Proc. London Math. Soc. (3) 75 (1997), 436–480, doi:10.1112/S0024611597000403.DOI
  8. [8]H. Cohn, Y. Jiao, A. Kumar, and S. Torquato, Rigidity of spherical codes, Geom. Topol. 15 (2011), 2235–2273, doi:10.2140/gt.2011.15.2235, arXiv:1102.5060.DOI
  9. [9]H. Cohn and J. Woo, Three-point bounds for energy minimization, J. Amer. Math. Soc. 25 (2012), 929–958, doi:10.1090/S0894-0347-2012-00737-1, arXiv:1103.0485.DOI
  10. [10]R. Connelly and W. Whiteley, Second-order rigidity and prestress stability for tensegrity frameworks, SIAM J. Discrete Math. 9 (1996), 453–491, doi:10.1137/S0895480192229236.DOI
  11. [11]J. H. Conway, R. H. Hardin, and N. J. A. Sloane, Packing lines, planes, etc.: packings in Grassmannian spaces, Experiment. Math. 5 (1996), 139–159, https://projecteuclid.org/euclid.em/1047565645, arXiv:math/0208004.
  12. [12]L. Danzer, Finite point-sets on S² with minimum distance as large as possible, Discrete Math. 60 (1986), 3–66, doi:10.1016/0012-365X(86)90002-6.DOI
  13. [13]D. de Laat, N. M. Leijenhorst, and W. H. H. de Muinck Keizer, Optimality and uniqueness of the D₄ root system, preprint, 2024, arXiv:2404.18794.arxiv.org/abs/2404.18794
  14. [14]P. Delsarte, J. M. Goethals, and J. J. Seidel, Bounds for systems of lines, and Jacobi polynomials, Philips Res. Rep. 30 (1975), 91*–105*, https://research.tue.nl/en/publications/bounds-for-systems-of-lines-and-jacobi-polynomials/.
  15. [15]P. Delsarte, J. M. Goethals, and J. J. Seidel, Spherical codes and designs, Geom. Dedicata 6 (1977), 363–388, doi:10.1007/BF03187604.DOI
  16. [16]L. de Moura and S. Ullrich, The Lean 4 theorem prover and programming language, in Automated Deduction—CADE 28, Lecture Notes in Comput. Sci. 12699, Springer, 2021, 625–635, doi:10.1007/978-3-030-79876-5_37.DOI
  17. [17]L. Fejes Tóth, Distribution of points in the elliptic plane, Acta Math. Acad. Sci. Hungar. 16 (1965), 437–440, doi:10.1007/BF01904849.DOI
  18. [18]M. Fickus, J. Jasper, and D. G. Mixon, Packings in real projective spaces, SIAM J. Appl. Algebra Geom. 2 (2018), 377–409, doi:10.1137/17M1137528, arXiv:1707.01858.DOI
  19. [19]I. Izmestiev, The Colin de Verdière number and graphs of polytopes, Israel J. Math. 178 (2010), 427–444, doi:10.1007/s11856-010-0070-5, arXiv:0704.0349.DOI
  20. [20]H. Knothe, Contributions to the theory of convex bodies, Michigan Math. J. 4 (1957), 39–52, doi:10.1307/mmj/1028990175.DOI
  21. [21]L. Kryvonos, L. Liehr, and M. A. Taylor, Energy minimization for eight points on the sphere, preprint, 2026, arXiv:2609.22077.arxiv.org/abs/2609.22077
  22. [22]V. I. Levenšteĭn, Bounds on the maximal cardinality of a code with bounded modules of the inner product, Soviet Math. Dokl. 25 (1982), 526–531.
  23. [23]H. Maehara, Isoperimetric theorem for spherical polygons and the problem of 13 spheres, Ryukyu Math. J. 14 (2001), 41–57.
  24. [24]The mathlib community, The Lean mathematical library, in Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs, ACM, 2020, 367–381, doi:10.1145/3372885.3373824, arXiv:1910.09336.DOI
  25. [25]D. G. Mixon and H. Parshall, Exact line packings from numerical solutions, paper presented at SampTA, Bordeaux, 2019, arXiv:1902.00552.arxiv.org/abs/1902.00552
  26. [26]D. G. Mixon and H. Parshall, The optimal packing of eight points in the real projective plane, Exp. Math. 31 (2022), 474–485, doi:10.1080/10586458.2019.1641767, arXiv:1902.10177.
  27. [27]mt0-svg, The Tammes problem for fifteen points, preprint, version 1.4.0, 2026, doi:10.5281/zenodo.23450670, https://github.com/mt0-svg/tammes-15.DOI
  28. [28]O. R. Musin, The kissing number in four dimensions, Ann. of Math. (2) 168 (2008), 1–32, doi:10.4007/annals.2008.168.1, arXiv:math/0309430.DOI
  29. [29]O. R. Musin and A. S. Tarasov, The strong thirteen spheres problem, Discrete Comput. Geom. 48 (2012), 128–141, doi:10.1007/s00454-011-9392-2, arXiv:1002.1439.DOI
  30. [30]O. R. Musin and A. S. Tarasov, Enumeration of irreducible contact graphs on the sphere, J. Math. Sci. (N.Y.) 203 (2014), 837–850, doi:10.1098-014-2174-7, arXiv:1312.5450.arxiv.org/abs/1312.5450
  31. [31]O. R. Musin and A. S. Tarasov, Extremal problems of circle packings on a sphere and irreducible contact graphs, Proc. Steklov Inst. Math. 288 (2015), 117–131, doi:10.1134/S0081543815010095, arXiv:1410.0744.DOI
  32. [32]O. R. Musin and A. S. Tarasov, The Tammes problem for N = 14, Exp. Math. 24 (2015), 460–468, doi:10.1080/10586458.2015.1022842, arXiv:1410.2536.DOI
  33. [33]T. Nipkow, Verified efficient enumeration of plane graphs modulo isomorphism, in Interactive Theorem Proving (ITP 2011), Lecture Notes in Comput. Sci. 6898, Springer, 2011, 281–296, doi:10.1007/978-3-642-22863-6_21.
  34. [34]T. Nipkow, G. Bauer, and P. Schultz, Fluspek: I tame graphs, in Automated Reasoning (IJCAR 2006), Lecture Notes in Comput. Sci. 4130, Springer, 2006, 21–35, doi:10.1007/11714611_4.
  35. [35]R. A. Rankin, The closest packing of spherical caps in n dimensions, Proc. Glasgow Math. Assoc. 2 (1955), 139–144, doi:10.1017/S2041385000033219.DOI
  36. [36]R. M. Robinson, Arrangement of 24 points on a sphere, Math. Ann. 144 (1961), 17–48, doi:10.1007/BF01396539.DOI
  37. [37]K. Schütte and B. L. van der Waerden, Auf welcher Kugel haben 5, 6, 7, 8 oder 9 Punkte mit Mindestabstand Eins Platz?, Math. Ann. 123 (1951), 96–124, doi:10.1007/BF02054944.
  38. [38]T. Sulanke, Generating maps on surfaces, Discrete Comput. Geom. 57 (2017), 335–356, doi:10.1007/s00454-016-9853-8, arXiv:1509.06412. The surftri software, version 0.989, is available at https://tsulanke.pages.iu.edu/graphs/surftri/.DOI
  39. [39]T. Sulanke and F. H. Lutz, Isomorphism-free lexicographic enumeration of triangulated surfaces and 3-manifolds, European J. Combin. 30 (2009), 1965–1979, doi:10.1016/j.ejc.2008.12.016, arXiv:math/0610022.
  40. [40]P. M. L. Tammes, On the origin of number and arrangement of the planes of exit on the surface of pollen-grains, Rec. Trav. Bot. Néerl. 27 (1930), 1–84, https://natuurtijdschriften.nl/pub/552640/.
  41. [41]T. Tarnai, Note on packings in Grassmannian space G(3,1), J. Math. Chem. 23 (1998), 415–419, doi:10.1023/A:1019193829804.DOI
  42. [42]W. T. Tutte, A census of planar maps, Canad. J. Math. 15 (1963), 249–271, doi:10.4153/CJM-1963-029-X.DOI
  43. [43]L. R. Welch, Lower bounds on the maximum cross correlation of signals, IEEE Trans. Inform. Theory 20 (1974), 397–399, doi:10.1109/TIT.1974.1055219.DOI

Paper details

vlnc:W_hb9v5gyn
Version
v1 · latest
Published
Fresh — published within the last 30 days
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

Not recorded for this paper

View statement
Looking for related papers…
Contents