WorksMathematics
Three-colour solutions from four-colour cubes
Abstract
For every , any cubes, each using all four colours of a fixed palette, contain an frame whose exterior faces are monochromatic in exactly three colours; this bound is sharp. For a fixed palette, exactly two collections of cubes fail, and reflection exchanges them. For , every failure of size at least lies in one ordinary orientation class with four bounded colour buckets. This gives failures at size , for , of which are inclusion-maximal. The threshold for a complete cube is ; in particular, any source cubes suffice when . The case answers the threshold question in Problem 2 of Berkove, Eickemeyer and Schulman (2018). The proof combines their corner-containment reduction with orientation constraints and double counting.
Introduction
Berkove, Eickemeyer and Schulman (BES) [1 Problem 2] ask for the least number of four-colour cubes that guarantees a choice of eight cubes forming a three-colour corner solution: a cube whose exterior faces are monochromatic and use exactly three colours. Touching interior faces need not match. As in BES [1 Section 1], every source cube uses all four colours of one fixed palette; every target uses exactly three of them. A variety is a face colouring up to proper rotation. Collections are multisets of varieties, so repeated copies are allowed.
We prove a sharp threshold for every side length. An -frame consists of the corners and edges of an cube, using pieces. The least number of source cubes guaranteeing a three-colour -frame is (Theorem 4). Exactly two collections of cubes fail: copies of each of four varieties, one with a monochromatic corner of each colour, all in the same orientation class. Reflection or any odd colour permutation exchanges these collections. Figure 1 shows the first case, . More generally, every failure of size at least , for , is confined to one ordinary class with bounded buckets (Theorem 5). Counting pair multiplicities and bucket slacks gives explicit binomial formulas for a band of failures (Theorem 6). This includes the 32 failures of size , twenty-four of which cannot be enlarged; the same counts hold separately at (Theorem 7).

Figure 1. Why one exceptional 28-cube collection fails for three-colour targets. (A) Seven copies of each variety, with monochromatic corners marked. (B) Targets with a trichromatic corner need both orientations; the example’s bottom face is hidden. (C) Targets without trichromatic corners require eight cubes with the same repeated colour, but only seven are available; , , are distinct. Reflection gives the other obstruction.
Filling the face interiors gives the complete-cube threshold (Corollary 3). In particular, any 64 cubes, each using all four colours of a fixed palette, can all be assembled into a cube with monochromatic faces using exactly three colours. Four is the smallest side length for which this guarantee holds without spare cubes; it holds for every larger side length as well.
For comparison, BES [1 Theorem 5] show that any four-colour cubes build a four-colour -frame when . Requiring exactly three exterior colours raises the sharp threshold to .1 Their completion argument [1 Section 1] gives a four-colour complete cube from any sources when ; our result guarantees exactly three exterior colours when .
The classification explains the form . Mixing orientation classes allows new corner matches, while repeated-colour demands limit the capacity of each colour bucket. Together these restrictions force an extremal collection into one orientation class and then force the four multiplicities to be equal. We first prove the corner case, including its restricted-target corollary, and then extend the argument to frames.
Model and geometric facts
Reflections are not allowed as moves. Only exterior faces must match the target; internal faces are unrestricted.
A corner type is a cyclically ordered triple of face colours, read counterclockwise when viewed from outside along the corner’s body diagonal. Equivalently, order the three outward face normals to form a positively oriented basis. A trichromatic corner has three distinct colours and two orientations, and . BES [1 Section 2] use clockwise order; our convention reverses every triple, preserving containment and matching. A source cube fits a target corner by a proper rotation if and only if it has the same cyclic corner type: the cyclic alignments of two corner frames are exactly those realised by proper rotations of the cube. Only the presence of a corner type on a source matters: a physical copy occupies one position. Target occurrences remain separate requirements. For the corner problem (), a target is represented by its multiset of eight corner types. A collection builds a corner solution modelled on that target exactly when these eight occurrences can be matched to distinct cubes having the required types.
For distinct colours , , , write for a target whose and faces are opposite and whose other four faces have colour . Its corner multiset is . Write for the analogous target with and adjacent; its corners are
Finally, write for the target with opposite pairs , , ; it has four corners of each orientation on . These three families suffice for the corner argument. § 5 introduces one further target for larger frames.
Lemma 1. In a cube using exactly three colours, the two orientations of a trichromatic corner occur equally often. If no trichromatic corner occurs, the cube is for some distinct , , .
Proof. For any cube coloured from a palette , let count corners of cyclic type . Read the three directed transitions around each corner in the chosen cyclic order. Each edge between an face and a face contributes at one endpoint and at the other, so the total counts of these transitions agree. Corners with repeated colours contribute equally to both counts. The remaining contributions give
If only , , occur, the last two terms vanish, proving the balance.
For the second assertion, if a colour occurs on only one face, its four neighbours must all have the same colour : a change from to around this face would produce a trichromatic corner. The opposite face is then the sole face. Otherwise each colour occurs twice. If the two faces are opposite, the four neighbours of either contain both and , forcing a change. If they are adjacent, the other three neighbours form a path containing both and , since each occurs only twice. Again a change is forced. Both cases produce a trichromatic corner.
The target families test complementary constraints:
| Target | Role |
| Detects the availability of both orientations | |
| Bounds the capacity of a colour bucket | |
| Eliminates minority cubes in the corner case | |
| Eliminates minority cubes in larger frames |
The two ordinary classes below supply opposite cyclic orientations. The balance lemma explains why confining a collection to one class obstructs all targets with trichromatic corners.
If every corner type of a variety occurs on a variety , replacing a copy of by cannot create a solution to any target. In particular, it preserves unsolvability. Table 1 records the reduction. Face tuples use the order , , , , , . The rows represent the seven orbits under colour permutations, with rotations already identified. They cover all 68 varieties; four orbits are retained.
| Representative | Orbit size | Retained type | Replacement |
| 001123 | 6 | checkerboard | — |
| 010203 | 8 | monochromatic-corner | — |
| 010213 | 12 | pair type | — |
| 010223 | 12 | pair type | — |
| 000123 | 12 | — | 001123 |
| 001213 | 12 | — | 001123 |
| 010123 | 6 | — | 001123 |
Table 1. The 68 varieties reduce to 38.
A reduced variety belongs to bucket if it has at least two of the three corner types with . The reduction, 38 minimal varieties, orientation classes, checkerboards and buckets below are from BES [1 Section 2, Table 8 and Definition 3]; we count each bucket’s seven mirror pairs as fourteen individual varieties.
Lemma 2 (Finite geometry). Every non-retained variety in Table 1 contains the corner types of a checkerboard, so every variety reduces to one of the 38 retained varieties. Their bucket incidences are:
There are eight varieties. Each has a repeated colour , corners and for every , and belongs only to bucket .
The 24 varieties belong to two buckets, one for each repeated colour.
The six checkerboards belong to no bucket. Their repeated colours occupy opposite face pairs; with repeated colours , , a checkerboard has both orientations on and .
The 32 ordinary varieties ( and ) split into two classes of 16, corresponding to BES’s and (up to interchanging the names). Every member of a class has exactly the same four trichromatic corner types, one for each three-element colour set. The two classes have opposite orientations. In our convention one class has the trichromatic corner set
one set of BES’s universal corners. Each class contains exactly one variety for each repeated colour. Even colour permutations preserve the classes; odd colour permutations and reflection exchange them.
Proof. The face-colour multiplicities are 3 + 1 + 1 + 1 or 2 + 2 + 1 + 1. In the first case, the three equal faces either meet at a vertex or contain an opposite pair, giving two orbits. In the second case, both repeated pairs can be opposite, exactly one can be opposite, or both can be adjacent. In the last case, the two monochromatic edges either have perpendicular directions, giving two mirror configurations represented by 010213 and 010223, or are parallel, represented by 010123. These cases cover all varieties. The orbit sizes in Table 1 sum to 68, the total number of varieties [1], so the seven orbits are distinct. The three non-retained representatives contain the corner types of 001123; colour permutations transport these containments to their whole orbits. Table 2 gives the corner sets of the retained representatives. All three ordinary representatives in Table 2 belong to the class of . Even colour permutations preserve and odd ones reverse it, with triples read cyclically. Applying colour permutations to Table 2 gives the stated incidences and orientation classes. The eight varieties split evenly between the classes, and even permutations act transitively on the four colours, so each class contains exactly one variety for each repeated colour. Reflection reverses every trichromatic corner.
| Representative | Corner-type set |
| 001123 | {012, 013, 021, 031} |
| 010203 | {000, 001, 002, 003, 012, 023, 031, 132} |
| 010213 | {001, 003, 011, 012, 023, 031, 112, 132} |
| 010223 | {002, 003, 012, 022, 023, 031, 122, 132} |
Table 2. Corner-type sets of the retained representatives, with cyclic triples written in lexicographically least form.
Lemma 3 (Bucket bound). Eight reduced cubes in bucket can build a target for some . Consequently, a reduced collection with no target has at most seven cubes in each bucket.
Proof. Each of the eight cubes misses at most one of the three types . Thus at most one type is missed by five or more cubes. Choose two types, and , each missed by at most four cubes. Assign cubes missing to positions, and cubes missing to positions. These groups are disjoint and each has size at most four. Every remaining cube has both types, so they fill the remaining positions of .
The extremal collections
Theorem 1. A collection of 28 four-colour cubes that builds no target of type , or consists of seven copies of each of the four varieties in one ordinary orientation class.
Proof. Replace each non-retained cube by a checkerboard using Lemma 2, leaving retained cubes unchanged. This preserves avoidance of all three target families. Let count the cubes belonging to the two ordinary orientation classes, and let count checkerboards, so . Call the class with cubes the majority class (either one if equal). Call the remaining cubes minority cubes. A minority cube supports a three-element colour set if it has the orientation on opposite to the majority class. Smaller-class cubes support every ; a checkerboard supports two.
(i) At most six minority cubes: . For , let count checkerboards supporting . If , those eight checkerboards build the target . Thus for each , and, since each checkerboard supports two triples, . It follows that , so . There are minority cubes supporting . If , four such cubes and four majority cubes build . Hence for every . Summing gives
(ii) No minority cubes: . Let and count only majority-class and cubes in bucket , and let , be their respective totals, so . By Lemma 3, . Each cube belongs to one bucket and each cube to two. This is BES’s double-count [1 equation (1)]; summing the bucket bounds and using gives
We use the following construction. If six majority cubes supply and a minority cube supports , then the minority cube supplies the opposite trichromatic orientation and an unused majority cube supplies the other. Such a cube is available since . This builds .
Suppose . We claim that forces . Otherwise choose six majority cubes in bucket , including at least four cubes. Any minority cube supports some triple containing , say , since a checkerboard’s two supported triples together contain every colour. Each of the at most two cubes has two of the three types , so it has or ; since needs two of each, each cube can take a position of a type it has. The cubes have and every type , so they fill the remaining positions of , and the construction above gives a solution, a contradiction. In particular, for every .
If , the bucket bound gives . If , the claim gives . Thus in all cases. Each majority cube contributes two through its single bucket, and each majority cube contributes one through each of its two buckets. Summing gives
contradicting from (2). Therefore .
(iii) Equal multiplicities: . With , (3) forces . All 28 cubes are majority-class cubes, and the four bucket bounds force each .
Since the reduced collection contains no checkerboards, no replacement occurred: the original collection was already reduced.
Theorem 2. Every collection of 29 four-colour cubes contains a three-colour corner solution.
Proof. Otherwise every 28-cube subcollection would have the form in Theorem 1. Take one such subcollection and let be the remaining cube. Remove from a cube of a variety different from , and insert . The multiplicity of ’s variety is now 1 or 8, whereas every variety in a collection described by Theorem 1 has multiplicity 0 or 7, a contradiction.
Sharpness
Theorem 3. The threshold 29 in Theorem 2 is best possible. For a fixed palette, exactly two 28-cube collections fail, and they are mirror images. Up to colour permutation, there is a single obstruction.
Proof. Take seven copies of each of the following four face tuples (Figure 1):
010203, 011213, 021223, 031323.
These are cubes with repeated colours 0, 1, 2, 3, respectively, all in the same ordinary orientation class. A target with any trichromatic corner requires both orientations by Lemma 1, whereas the collection supplies only one. A target without one is ; every one of its eight corners has colour twice, so only the seven cubes of repeated colour are usable. No three-colour target is possible. Reflection gives the analogous example in the other orientation class. Theorem 1 excludes all other collections. Every odd colour permutation exchanges the two orientation classes and hence these two collections. □
Remark (Allowing fewer colours). If targets may use at most three colours, 28 cubes suffice. In either exceptional collection, four cubes of repeated colour and four of repeated colour supply . These are the corners of a two-colour cube whose three faces meet at one vertex and whose three faces meet at the opposite vertex. Every other 28-cube collection builds a three-colour target by Theorem 3. This gives an upper bound, not an exact threshold, for that variant.
Corollary 1 (Restricted targets). Every collection of 29 four-colour cubes, and every solvable collection of 28, builds a target of type , or . These families contain just 28 of the 120 target varieties.2
Proof. By Theorems 1 and 3, a 28-cube collection avoiding these families is unsolvable. The swap in the proof of Theorem 2 rules out a 29-cube collection avoiding them. There are varieties each of and : choose and the unordered pair . There are varieties of , one for each three-colour set.
Remark. For the palette , write . Applying (1) to the different colour pairs gives
This common integer is the cube’s degree, relative to . Reflection negates the degree, as does each transposition of colour labels; thus even colour permutations preserve it and odd ones negate it. Each ordinary representative in Table 2 has eight distinct corner types, so each occurs once; the two ordinary classes therefore have degrees and . The checkerboard representative has neither 023 nor 032, so its degree, and that of every checkerboard, is zero.
Frames of arbitrary side length
An -frame consists of the eight corner cubes and the further cubes on each of the twelve edges of an cube. Thus it contains cubes. Its six exterior faces are monochromatic and use exactly three colours; face interiors are not part of the frame. This is the frame model of BES [1 Section 1], with three target colours instead of four.
Theorem 4 (Frame threshold and classification). For every , every collection of four-colour cubes contains a three-colour -frame. For a fixed palette, exactly two collections of cubes fail: copies of each of the four varieties in one orientation class, or their reflections. Consequently the sharp frame threshold is .
The corner-containment reduction also preserves edge availability: an edge occurs in a corner, so containment of corner types implies containment of edge types [1 Section 2, after Definition 2]. An edge type is an unordered pair of colours, allowing repetition. Every ordinary variety has all six bichromatic edge types. A checkerboard has five, missing precisely the pair of its singleton colours; different checkerboards miss different pairs. These facts follow from the representatives in Table 2, and also appear in BES’s frame arguments [1 proofs of Lemmas 7–8 and Table 5]. A reduced cube has an edge if and only if it belongs to bucket .
Lemma 4. Let . A reduced collection with a corner solution has an -frame whenever its size satisfies
Proof. If a checkerboard variety occurs at least times, use eight copies for a supported corner solution. Its remaining copies supply at least neighbours for each required edge type. Otherwise every checkerboard variety occurs at most times. Remove any corner solution. Each of its three bichromatic edge types then has at least
available suppliers. In either case, the union of the supplier sets for two edge types is the entire residual collection, since no reduced cube misses two bichromatic types. There are at least remaining cubes, so Hall’s inequalities hold for all edge positions.
One more target supplies the growing repeated-colour demands. For distinct , let have face tuple . Its corner and edge multisets are respectively
Write for the variety with repeated colour in a given ordinary class. Thus an ordinary class supplies a -frame using of its cubes, of its cubes, and other cubes, together with one minority cube supporting . The cubes fill four corners and the monochromatic edge positions; the cubes fill two corners and the monochromatic positions. The minority cube and one further cube from the same ordinary class fill the two trichromatic corners. Every remaining edge is bichromatic and can use any ordinary cube.
Theorem 5 (Stability). Let and . A collection of four-colour cubes fails to build a three-colour -frame if and only if all its cubes are ordinary varieties in one orientation class and each colour bucket contains at most cubes.
Proof. Reduce a failing collection as before. Let count the two ordinary classes, let count checkerboards, and put . Write for the majority-class counts. Lemma 4 excludes a corner solution. The orientation count from Theorem 1 therefore gives
A majority bucket of size would build a -frame: eight of its cubes supply the corners, supply the monochromatic edge positions, and other majority cubes supply the bichromatic positions. There are enough since . Thus
Some . At most one colour has fewer than majority cubes, since two such colours would give
If , a minority cube supports a triple containing and another colour with . The construction then applies. After its majority corner and monochromatic-edge cubes have been selected, at least ordinary cubes remain. This contradiction gives . No checkerboards remain, so the reduction made no replacements in the original collection.
Conversely, one ordinary class cannot supply both orientations of a trichromatic corner. Lemma 1 leaves only targets. Their corners and monochromatic edges require cubes from one bucket, exceeding its capacity .
:::
Proof of Theorem 4. For , use Theorem 3. For , apply Theorem 5. At size , purity and force , and all four multiplicities equal . Both collections fail by the converse. At size the bucket inequalities are impossible, proving the upper bound.
Theorem 6 (Counting stable failures). For and , exactly
fixed-palette collections of cubes fail to build a three-colour -frame. Exactly of them are inclusion-maximal.
Proof. The size is at least , so Theorem 5 applies. Fix an orientation class. Write for its multiplicities, for their incidences in bucket , and for the four bucket slacks. Double counting gives
Conversely, any nonnegative solution determines a failing collection by . These values satisfy , so there are no additional feasibility constraints and the two orientation classes give disjoint collections. Stars and bars, followed by the two choices of orientation, gives the first count.
A positive slack permits adding the corresponding . If all slacks vanish, adding any ordinary cube in the same class overfills a bucket; adding any other cube violates purity. The stability theorem applies to the enlarged collection, so these and only these failures are inclusion-maximal. Setting the four slacks to zero leaves twelve nonnegative variables summing to , giving the second count.
Theorem 7 (One cube below the extremal size). For every , exactly 32 fixed-palette collections of cubes fail to contain a three-colour -frame. Put . They are:
the eight collections
one for each choice of ordinary orientation class and colour ;
the twenty-four collections
one for each ordinary variety, where are its bucket colours and the four varieties belong to its orientation class.
Each collection in the second family is inclusion-maximal among failures: adding any cube makes it solvable.
Proof. Let and retain the majority notation from the stability proof. For , Theorem 5 gives immediately.
For , the orientation count at gives and . If , the argument in Theorem 1 still implies for every colour. Summing yields , a contradiction. Thus here too.
Now . If , four bucket capacities of and total leave exactly one multiplicity at , giving the eight deletion cases. If , every bucket must have size , since . The unique cube fills two buckets, giving the stated multiplicities and twenty-four cases. No checkerboards remain, so the reduction made no replacements in the original collection.
Conversely, each listed collection lies in one ordinary orientation class. Orientation balance excludes every target with a trichromatic corner. A remaining target requires $4n
distinct cubes with an edge for its corners and monochromatic edges, while bucket has at most cubes. Every listed collection therefore fails. Finally, adding any cube to a pair case produces a collection of size still containing a cube; Theorem 4 excludes it from the failing collections of that size.
Corollary 2. For , every collection of at least source cubes has an -frame modelled on one of the targets of types .
Proof. The frame counting argument uses only these three types: avoiding them forces purity and four bucket capacities of , hence at most cubes. There are twelve targets and four targets. The ordered choice of three distinct colours in gives varieties: their face multiplicities recover , respectively. These families are disjoint.
Corollary 3 (Complete cubes). For every integer , the sharp threshold for a complete cube with exactly three exterior colours is
In particular, , , and for .
Proof. Both terms are necessary: an assembly uses pieces, and contains an -frame. Conversely, construct a frame using Theorem 4. Each face-interior position prescribes just one colour, which every unused source cube has; interior positions prescribe none. Thus arbitrary unused cubes complete the assembly whenever at least pieces are available.
Formal verification and computation
The frame and complete-cube thresholds and restricted-target corollaries are formalised in Lean 4 and mathlib [2, 3], both at v4.35.0, for arbitrary indexed families of four-colour cubes. Solutions select distinct copies and proper rotations matching the exposed faces at every required position. The frame statements cover every side length . The threshold and sharpness statements, and the corner restricted-target statements, use no catalogue indices. The forty-target extension specifies its target by a canonical index. The classifications and their counts concern multisets of rotation classes over a fixed palette. Kernel checks establish the catalogue and finite geometry; a palette-independent lemma equates cyclic corner matching with physical placement.
The stability criterion has a physical-family statement. Its counting proof constructs a bijection between failing multisets and the twelve pair multiplicities with four bucket slacks, then applies stars and bars. Inclusion-maximality is formalised using the pointwise order on all source multiplicities. The original comparator challenge covers thirty-five earlier results; the stability, near-extremal and forty-target extensions have library proofs and axiom guards, but are outside that challenge. Appendix § 9 describes the verification scope.
The Lean proof uses counting and finite Hall certificates. Its corner-case proof of the extremal classification treats checkerboards and the smaller ordinary class separately. The stability proof combines them and supplies the larger-frame and near-extremal classifications. Finite checks establish each target’s corner and edge requirements, while the allocation and counting proofs are symbolic in the side length. Neither the written proof nor the formalisation enumerates all source collections.
A computational search found the corner obstruction and agreed with the corner threshold; separate scripts check the geometric tables, incidences, edge constructions and sample frame obstructions. The correctness of these external computations is not assumed in either the written proof or the formalisation.
In the guaranteed range, an assembly can be found by testing just 28 targets when (Corollary 1), or 40 targets when (Corollary 2), using capacitated bipartite matching. Testing all 120 targets decides feasibility for arbitrary smaller collections; the restricted-target guarantee alone does not do so. Source varieties have capacities equal to their available multiplicities; corner and edge requirements have capacities equal to their demands. A source is adjacent to a requirement when it has the required corner or edge type. Grouping identical requirements keeps the number of vertices and edges bounded independently of the side length; only the capacities vary. An integral flow meeting all demands determines a frame, and compatible proper rotations can then be chosen. Unused cubes complete the assembly whenever at least pieces are available.
Further questions
Classifying failures below the stability range would extend Theorem 5. Cuboids pose a separate problem: for each , take copies of each of the six checkerboards. These cubes cannot fill a box in exactly three colours. Every target corner must be trichromatic, forcing a target. Every position then demands the same bichromatic edge type along the long axis, including the corners. One checkerboard lacks that type, so only cubes are usable for positions. Thus assembly from exactly the volume fails for arbitrarily large cuboids, even though it holds for cubes of side length at least four.
Declaration of AI-generated research and review
GPT-6-Astra (OpenAI), used through Codex, developed the original research argument, computational search, Lean formalisation and manuscript under the author’s direction. Claude Opus 5.5 (Anthropic), used through Claude Code, contributed the minority-cube argument, balance proof, further mathematical simplifications, illustrations and review. Subsequent Codex revisions incorporated and extended these contributions. Detailed attribution and review scope are recorded in the repository’s formalization.yaml. The human author initiated and directed the research and accepts responsibility for the paper’s content and the accuracy of this disclosure.
Verification details
Thirty-five results and the required definitions are restated in a standalone verification file (the comparator challenge) importing only mathlib. The stability and near-extremal classifications, their counts and the forty-target extension are additional library theorems, with physical-family interfaces where appropriate and explicit axiom audits; they are not yet added to that challenge. Automated checks compare the challenge statements with the proof library and replay the proofs through the Lean, NanoDa and con-ron kernels.
The audit reports three standard axioms: propext, Classical.choice and Quot.sound. No proof uses holes or native_decide. The repository3 provides sources, reproduction commands and details of the statement checks. The physical model and palette-independent geometry come from the shared colour-cubes-core library [4]. The challenge restates its definitions locally.
References
References
- [1]E. Berkove, A. Eickemeyer and M. Schulman, The 4-Color Cubes Puzzle, Integers 18 (2018), A68. Journal PDF.DOI
- [2]L. de Moura and S. Ullrich, The Lean 4 Theorem Prover and Programming Language, in Automated Deduction—CADE 28, LNCS 12699, Springer (2021), 625–635. doi:10.1007/978-3-030-79876-5_37.
- [3]The mathlib Community, The Lean Mathematical Library, in Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs (CPP 2020), ACM (2020), 367–381. doi:10.1145/3372885.3373824. arXiv:1910.09336.DOI
- [4]J. Davies, colour-cubes-core: palette-independent Lean definitions and proofs for face-coloured cubes, Lean library (2026). Release v1.0.0, https://github.com/jasondavies/colour-cubes-core.