Documentation

CslibFrontier.Algorithms.MatrixMultiplication.Schonhage.BoxTradeoff

Finite preprocessing/query tradeoff for shared box tables #

A threshold trades a geometric tail of the completed-leaf counts beta against a weighted binomial prefix of the query counts alpha. The all-tile estimate charges one retained box value for each box of each tile, while the query estimate charges all requested occurrences separately. Neither estimate is a machine-running-time law.

Main definitions #

Main results #

References #

Adapted from [AlmanWilliams2026, equation (7) and Section 4.4], specifically Theorem30.lean lines 53–102 and 253–287, and ParameterSteps.lean lines 147–172, at the pinned primary formal source. Both files were checked against that revision. The tile estimate uses this library's padded dimension and therefore has factor 4*padN²; a separate band-size premise gives factor 16*N². This is a constant-factor weakening of the source's finer unpadded tile estimate. The source's analytic encoding-term domination, logarithmic estimates and final exponents are not claimed here. No source machine or execution semantics is imported.

Every threshold admits a fully fixed box with no P0 coordinates, even at depth zero.

The ratio envelope 9m/(L-m+1), with subtraction in the real numbers.

The decay rate is nonnegative whenever the total depth contains the inner depth.

The source's depth condition makes the geometric tail summable, including m = 0.

theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.BoxTradeoff.beta_le {L m : ℕ} (hm : m ≤ L) (d : ℕ) (hd : d ≤ m) :
↑(beta L m d) ≤ rho L m ^ d * ↑(M L m)

Equation (7): the order-d completed-leaf count decays from the order-zero count M. The inequality holds for every m ≤ L; summability is needed only for the tail theorem.

theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.BoxTradeoff.sum_beta_le {L m : ℕ} (t : ℕ) (hL : 10 * m ≤ L) :
∑ d ∈ Finset.Icc t m, ↑(beta L m d) ≤ ↑(M L m) * (rho L m ^ t / (1 - rho L m))

Theorem 30's retained-table estimate: all completed leaves through order m above a threshold are bounded by a convergent geometric tail. No threshold premise is required; an empty tail also satisfies this bound.

theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.BoxTradeoff.card_boxes_le_geometric {L m t : ℕ} (hL : 10 * m ≤ L) (ht : t ≤ m) :
↑(boxes L m t).card ≤ (↑m + 1) * (↑(M L m) * (rho L m ^ t / (1 - rho L m)))

A box table has at most m+1 descriptors for each completed-leaf choice. Combined with the geometric tail, this bounds its actual finite number of retained values.

theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.BoxTradeoff.total_boxes_le {L m t N : ℕ} (hL : 10 * m ≤ L) (ht : t ≤ m) :
↑(tiles L m N).card * ↑(boxes L m t).card ≤ 4 * (↑m + 1) * (rho L m ^ t / (1 - rho L m)) * ↑(padN L m N) ^ 2

All tiles share the same geometry but each computes its own retained values. This counts all those values against the actual padded outer dimension.

theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.BoxTradeoff.total_boxes_le_unpadded {L m t N : ℕ} (hL : 10 * m ≤ L) (ht : t ≤ m) (hN : K0 L m * N0 L m ≤ N) :
↑(tiles L m N).card * ↑(boxes L m t).card ≤ 16 * (↑m + 1) * (rho L m ^ t / (1 - rho L m)) * ↑N ^ 2

If one band fits the original outer dimension, the retained-table count is bounded by N² without using a source execution or asymptotic hypothesis.

theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.BoxTradeoff.sum_alpha_le {x : ℝ} (hx : 0 < x) (h9x : 1 ≤ 9 * x) {m t : ℕ} (ht : t ≤ m) :
∑ d ∈ Finset.range (t + 1), ↑(alpha m d) ≤ (9 * x) ^ t * (1 + 1 / x) ^ m

Weighted binomial-prefix estimate from Section 4.4. With x=8, this gives Σ(d≤t) alpha(m,d) ≤ 72^t*(9/8)^m; every wanted occurrence incurs this count.

theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.BoxTradeoff.sum_alpha_le_seventytwo {m t : ℕ} (ht : t ≤ m) :
∑ d ∈ Finset.range (t + 1), ↑(alpha m d) ≤ 72 ^ t * (9 / 8) ^ m

The Section 4.4 query-count estimate at the concrete rational weight x=8.

At the source's L=21m, the ratio is strictly below 9/20 and its tail factor below 2.

theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.BoxTradeoff.sum_beta_twentyone (m t : ℕ) :
∑ d ∈ Finset.Icc t m, ↑(beta (21 * m) m d) ≤ 2 * ↑(M (21 * m) m) * (9 / 20) ^ t

Concrete rational-base preprocessing decay at L=21m. The threshold remains explicit so an actual native parameter calculation can choose it independently.