# At most 36 cubes above the five-dimensional grid

Let F(N) denote the maximum number of sets t+λ{0,1}⁵, λ>0, contained in N arbitrary real five-dimensional points. Put Q(n)=Σ_{j=0}^{n−1} j⁵.

**Theorem.** For every integer n≥77,
    
    Q(n) ≤ F(n⁵) ≤ Q(n)+36.

Consequently F(n⁵)=n⁶/6−n⁵/2+5n⁴/12−n²/12+O(1), with a nonnegative error at most 36 for n≥77. The regular grid supplies the lower bound. Each positive side h<n gives (n−h)⁵ cubes. Earlier finite certificates give equality at widths 2 through 9. The exact result for all widths and the full five-cube case of Conjecture 1.4 remain open. Mou’s Theorem 1.1 gives F(n⁵)=n⁶/6+O(n⁵). [Mou, *Homothetic Copies of Polytopes and Binomial Barcodes*, v2](https://arxiv.org/html/2611.32429v2) · [Earlier finite five-cube proof](https://isitsolved.com/files/f0e87fc7f1b192fcbfb901ebd2d3ed03382b01fe88dee175cacf9d7a517e3676/five-cube-median-bounds.md)

## A window of gap counts with additive error 36

Write C(m,k)=binom(m,k), N=n⁵, A=n³C(n,2), B=Σ_{j<n}j³C(j,2), J=Σ_{j<n}j⁴, U=C(n+1,4) and W=C(n+1,5). Here N−2A=n⁴ and 2B+J=Q(n). Let f be the effective barcode for the half-cube H, a triangle times a three-cube, from the certificate p5_062. The half-cube has 24 vertices. Its order-four barcode uses the binomial clique function K=K₄. A bar of label m has capacity C(m,4), full score C(m,5), and partial score K(r). After n complete periods the capacity is A and the score B. The next 24 labels are n plus the word

    1 2 0 1 1 2 1 2 1 2 1 1 2 2 2 3 2 1 1 2 1 2 1 2.

Their capacities sum to n⁴ and their scores sum to J, by the binomial expansions for a four-cube. The last two labels before A are both n+1. The first two labels after A+n⁴ are n+2,n+3. The independent checker verifies these positions directly against the shared certificate. [Effective half-cube proof](https://isitsolved.com/files/b260822e9627b5967392452bfa066bc1be7e1f77568eae2244581d36a348586a/geometric-cuts.md)

We claim that for n≥13 the gap bound satisfies

    f(s)+f(N−s) ≤ Q(n)+36     whenever A−2U ≤ s ≤ N−A+2U.          (1)

For A≤s≤N−A it is at most Q(n). Indeed the displayed sequence can be changed into its reversal by 46 adjacent swaps moving a larger entry left. Such a swap can only increase a partial barcode score. Read one copy of the block forward and one backward. Their complementary budgets cover each bar once except for the bar split between the two, where superadditivity of K bounds the two partial scores by its full score. This proves the central assertion. [Mou, Lemmas 2.1 and 4.7](https://arxiv.org/html/2611.32429v2)

By symmetry consider s=A−x. For 0≤x≤U the lost tail of the last full bar has score at least K(x), by superadditivity, and the right side gains K(x). For x=U+t, 0≤t≤U, compare with the baseline Q(n). Put H=C(n+2,4)=U+D, where D=C(n+1,3). For 0≤t≤D the excess is

    K(U−t)+K(U+t)−2W.

Both loads are at most H and their total is 2U. Mou’s binomial endpoint inequality gives the upper bound K(H)+K(2U−H)−2W. For D≤t≤U the right barcode has completed its first bar and has partial load t−D in its next bar. The excess is K(U−t)+K(H)+K(t−D)−2W, bounded by the same expression by superadditivity. Thus the entire wing is controlled by one integer. For n≥13 its canonical expansion is

    U−D = C(n−1,4)+C(n−3,3)+C(n−6,2)+C(n−12,1).
    K(H)+K(U−D)−2W = 36.                                           (2)

The second identity follows by raising the lower indices in the first expansion and using K(H)=C(n+2,5). This proves (1). [Mou, Lemma 2.2 and the canonical expansion in Section 2](https://arxiv.org/html/2611.32429v2#S2)

A real gap after s points in the ordering by x₁−x₂ gives at most f(s)+f(N−s) full cubes by restricting each full cube to its half on the appropriate side. If there are at least Q(n)+37 cubes, no gap rank in (1) occurs. The cumulative counts must jump across that interval in one occupied level. Its two open populations a,b are both at most A−2U−1. In particular its plane has c=N−a−b≥X, where X=n⁴+4U. The same holds in every signed coordinate-pair direction. At the central threshold A−U≤s≤N−A+U the preceding proof even gives Q(n) with no error. Hence any strict challenger has c≥n⁴+2U+2 in each of the twenty diagonal directions.

Here is the corresponding finite-size extension for hosts of n⁵+r points, 0≤r≤4 and n≥4. From A−U through A+n⁴+U the half-cube score is given exactly by the 24-bar block above with one bar n+1 at each end, starting at score B−W. The final artificial bar has the actual partial score throughout its specified range. For two reversed words on the same block with total capacity V and budgets p+q=V+r, the total score is at most the full score plus K(r) whenever both budgets lie in the block. If the overlap of length r stays in one bar, apply the binomial endpoint inequality there. If it crosses a boundary, the two partial scores and the full intervening scores for that overlap sum to at most K(r) by superadditivity. The same argument applies when a word can be changed into its reversal by swaps moving larger entries left. Since K(r)=0, any host here with more than Q(n) cubes must have at least n⁴+2U−r+2 points in a median plane in every signed pair direction. In particular the grid prediction is an upper bound at every width for any host with fewer than this many points on every level in even one such direction.

## Counting stacked cubes in two median planes

Use the disjoint pairs (1,2) and (3,4), with median planes x₁−x₂=q₁ and x₃−x₄=q₂. Let cᵢ be their point populations. A cube is centered on plane i if its least vertex lies there. Write Zᵢ for its count and O for the number of host points off both planes. For a plane with open counts a,b, cubes centered strictly on either side contribute at most f(a)+f(b). A centered cube is recoverable from a specified off-diagonal corner on either side, so Z≤min(a,b). [Mou, proof of Lemma 3.1](https://arxiv.org/html/2611.32429v2#S3)

Let R(c) be the extremal count of the 24-point configuration {0,1}³×{0,1,2} in c points in four-space. We prove

    N−max(c₁,c₂) ≥ O ≥ 4(Z₁+Z₂)−2R(c₁)−2R(c₂).                  (3)

For a cube centered on at least one median, mark projections of its vertices onto the first four coordinates. In each pair put d equal to its least-vertex difference minus the corresponding median. Choose corner bits (1,0) if d>0 and (0,1) if d<0, and allow both if d=0. A singly centered cube gives two marks owned by its plane. A doubly centered cube gives four. Assign its two equal-sign choices to plane 1 and its two opposite-sign choices to plane 2. Thus each centered cube supplies exactly two marks to each plane on which it is centered. At a marked projection the magnitudes of the two differences from the medians are |dᵢ|+λ. Their minimum recovers the scale λ. Their signs recover the corner bits, hence the four lower coordinates and the owner. All marks in a fibre therefore have the same owner, projected lower corner and scale.

A mark with lower fifth coordinate u contributes the edge from u to u+λ in that fibre. The edges form a disjoint union of finite paths. If e edges include p consecutive pairs, their vertices number 2e−p. Two consecutive edges mean that the corresponding five-cubes stack along coordinate five with the same side and the same other four intervals. On an owner plane, identify its two equal-offset coordinates. The two cube sections now form a copy of {0,1}³×{0,1,2}, which recovers both original cubes. Each such stack can appear in at most two fibres owned by this plane, one per mark of its lower cube. There are thus at most 2R(cᵢ) consecutive pairs in its fibres. Summing the vertex count proves (3). [Earlier two-median fibre argument](https://isitsolved.com/files/f0e87fc7f1b192fcbfb901ebd2d3ed03382b01fe88dee175cacf9d7a517e3676/five-cube-median-bounds.md)

Write F₄ for the extremal unrestricted four-cube count. At an occupied median of the long coordinate of a stack, those with middle level strictly below restrict injectively to lower four-cubes on the lower open side. Those strictly above restrict to upper four-cubes. For stacks whose middle level equals the median, the all-low vertex gives the scale and translation. Consequently

    R(c) ≤ 2F₄(floor(c/2))+c/2.                                    (4)

## Numerical inequalities with an explicit threshold

For any m≥0 put k=floor(m^{1/4}) and Δ(k)=k⁵/5−Σ_{j<k}j⁴. The effective descending four-cube word yields

    F₄(m) ≤ m^{5/4}/5−Δ(k).                                       (5)

It starts the period at k⁴ with score Σ_{j<k}j⁴. Each bar of that period has label at most k+3. Its full or partial score per unit of capacity used is at most k/4. Indeed the colex triples in that bar live on at most k+3 elements and each triple has at most k extensions to a quadruple, with four triples per quadruple. The tangent to m^{5/4}/5 at k⁴ has slope k/4. This proves (5), including the initial empty case. The quantity Δ(k) is nonnegative and nondecreasing, by integrating x⁴ from k to k+1. [Effective four-cube word and proof](https://isitsolved.com/files/efaa74a17e8c1818fffa345fb2a3b9ba6a56786514c83edd40f4a2211a48423f/four-cube-effective-barcode.md)

Assume at least Q(n)+37 copies and n≥77. Each diagonal open count lies in the last period ending at A. Indeed consuming that whole period loses A(n−1)=(n−1)⁴(n−2)/2 in score. Then Z≥J+37+A(n−1)>N/2, contradicting Z≤min(a,b). For the displayed strict inequality, J≥n⁵/5−n⁴ by integral comparison, and A(n−1)>2N/5 for n≥77. Within this period each bar label m is at least n−1. Removing t units at the end of a full bar loses at least t(m−4)/5 in score. The remaining colex four-sets have at most m−4 extensions each and each five-set has five four-subsets. This also applies to a fully removed bar. For either plane this proves

    Z ≥ J+37+(n−5)(c−n⁴)/5 ≥ (n/5−1)c.
    Z ≥ Z₀+(n−5)(c−X)/5,     Z₀=J+37+4W.                           (6)

The second inequality charges the first two full removed bars on each side exactly. In particular c≤3n⁴ from Z≤N/2. Put Δ₀=Δ(floor((X/2)^{1/4})). By (3)–(6), a challenger requires H(c₁)+H(c₂)≤N, where

    H(c)=4[Z₀+(n−5)(c−X)/5]−(4/5)(c/2)^{5/4}+4Δ₀−c/2.

Here we used max(c₁,c₂)≥(c₁+c₂)/2. On X≤c≤3n⁴ its derivative is 4(n−5)/5−(c/2)^{1/4}/2−1/2>0 for n≥77. For every integer 77≤n<300 the checker verifies the opposite strict inequality at the smallest allowed c,

    8Z₀+8Δ₀−X−n⁵ > (8/5)(X/2)^{5/4}.                              (7)

It uses integer fourth powers after first checking the left side is positive.

For n≥300 use just the first bound in (6) and drop Δ in (5). Set x=c/n⁴ and g(x)=x[4−2(x/2)^{1/4}]/5. The contribution from each plane in (3), including half its plane population on the left, is at least n⁵[g(x)−9x/(2n)]. Throughout 1≤x≤3 this function in square brackets is increasing, since g′(x)=4/5−(x/2)^{1/4}/2. Also X/n⁴≥29/25 because 24U/n⁴≥1−3/n. The rational inequality (29/50)^{1/4}<7/8 therefore gives

    2g(29/25)−9(29/25)/300 > 1.

Thus the two contributions exceed N, again contradicting (3). This eliminates every host with Q(n)+37 cubes in the stated infinite range.

## Verification

Run `python3 verify.py` in the companion archive using Python 3.10 or later with assertions enabled. It replays the full five-dimensional half-cube certificate from simplex leaves, checks the 46 swaps, verifies (2) as polynomial identities, checks (7) at all 223 widths, and tests the fibre reconstruction and path counts by enumerating cubes and stacks. The numerical range ends at 299 because the last paragraph is a uniform inequality for all n≥300. The proof gives an upper error of 36. It supplies no point configuration attaining a positive error.
