Finite box counts and value recurrence #
The canonical-box bijection counts boxes by a completed leaf and a number of stars.
card_boxes_le bounds their total by (m + 1) times the sum of the existing beta
counts. It needs only m ≤ L and t ≤ m; the source's stronger 10 * m ≤ L is unnecessary.
boxValue recursively replaces the highest star by each of the ten existing terms.
boxValue_eq_val proves that it computes the signed cube value when the supplied star
count is exact. This recurrence may recompute subproblems: it is neither a memoized table
nor a native program and carries no preprocessing-time or space theorem.
Adapted from [AlmanWilliams2026, Lemma 29] and
Lemma29.lean at
anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5.
The encodings, terms, leaf order and beta counts are the existing local notions.
All cubes satisfying the box conditions at the selected parameters.
Boxes whose star count is exactly e.
Membership combines the box conditions with an exact star count.
Boxes with a fixed combined star/P0 count correspond to completed leaves and star counts.
Replacing the highest star gives a box with one fewer star.
The finite recurrence agrees with the signed encoding-product sum of a box.