Documentation

CslibFrontier.Algorithms.MatrixMultiplication.Schonhage.Boxes

Canonical boxes of tensor leaves #

A box has at most m - t stars or fixed P0 terms, with every star preceding every fixed P0 term. Thus its leaves all have order at least t. Every box is obtained uniquely from its P0 completion by turning an initial segment of its P0 coordinates into stars; Finset.lowest supplies that initial segment without a separate rank API.

This adapts [AlmanWilliams2026, Section 4.2] and the primary formal source Boxes.lean at anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5. The definitions have the source's natural truncated subtraction: claims about order explicitly require t ≤ m. These are finite statements, with no stored table or time bound.

A cube with a bounded number of stars/P0 symbols, stars preceding all fixed P0 symbols.

Instances For
    @[instance_reducible]
    theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.le_order_iff {L m t : ℕ} (ht : t ≤ m) (τ : Leaf L) :
    ↑t ≤ order m τ ↔ (P0Levels τ).card ≤ m - t

    A lower bound on order is an upper bound on the number of P0 terms.

    A matching leaf can use P0 only at a star or a coordinate fixed to P0.

    theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.le_order_of_mem_leaves {L m t : ℕ} (ht : t ≤ m) {π : Cube L} (hπ : IsBox m t π) {τ : Leaf L} (hτ : τ ∈ π.leaves) :
    ↑t ≤ order m τ

    Every leaf of a box has the required minimum order.

    The canonical cube made by starring the lowest P0 coordinates.

    The selected initial segment is exactly the star set.

    Unselected P0 coordinates remain fixed.

    Completion recovers the original leaf, including when selection saturates.

    theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.eq_starLowest_starsToP0 {L : ℕ} (π : Cube L) (h : ∀ ℓ ∈ π.starLevels, ∀ ℓ' ∈ π.P0Levels, ℓ < ℓ') :

    The star-order condition characterizes the canonical form of a cube.

    theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.isBox_starLowest {L : ℕ} (m t e : ℕ) (τ : Leaf L) (hτ : (P0Levels τ).card ≤ m - t) :
    IsBox m t (starLowest e τ)

    Starring any initial segment preserves the box count and order conditions.