Documentation

CslibFrontier.Algorithms.MatrixMultiplication.Schonhage.Cubes

Cubes of tensor leaves for the improved thin-product decomposition #

A cube fixes a term at some levels and permits every term at its star levels. It denotes a finite set of the existing tensor leaves. Its integer value sums the actual products of the existing two encodings. This is finite algebra; no cube is a native lookup or time certificate.

Main definitions #

Main results #

References #

Adapted from [AlmanWilliams2026, Section 4.2] and the primary formal source at anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5: PaperStatements.lean lines 1844–1901 and 1952–1954, and Boxes.lean. The local value expression uses encodeLeft and encodeRight, the existing versions of that source's two encoding forms. No source machine, native execution or cost law is imported.

A fixed multiplication label or an unrestricted level.

Instances For
    @[reducible, inline]

    Level-indexed term-or-star symbols over the existing tensor alphabets.

    A leaf agrees with every fixed term; stars impose no condition.

    Instances For
      @[instance_reducible]

      Finite leaf membership is executable in the specification.

      All leaves matching the fixed terms of the cube.

      Levels at which every term is allowed.

      Levels fixed to the distinguished multiplication term.

      Sum of the existing signed encoding products over the leaves of the cube.

      The cube fixing each level to the given leaf.

      Fix one level to a multiplication label.

      Replace the specified levels of a leaf with unrestricted stars.

      Complete every star with the distinguished term, retaining all fixed terms.

      @[simp]
      theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.Cube.mem_leaves {L : ℕ} {π : Cube L} {τ : Leaf L} :
      τ ∈ π.leaves ↔ ∀ (ℓ : Fin L), π ℓ = CubeSymbol.star ∨ π ℓ = CubeSymbol.term (τ ℓ)
      theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.Cube.eq_of_mem_leaves {L : ℕ} {π : Cube L} {τ : Leaf L} (hτ : τ ∈ π.leaves) {ℓ : Fin L} {lam : Term} (h : π ℓ = CubeSymbol.term lam) :
      τ ℓ = lam

      A fixed symbol determines the corresponding coordinate of every matching leaf.

      A level cannot be both a star and fixed to the distinguished term.

      Each star independently contributes ten possible labels, including at zero levels.

      @[simp]

      Fixing every coordinate gives a singleton leaf set.

      theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.Cube.mem_leaves_replace {L : ℕ} {π : Cube L} {ℓ : Fin L} (hℓ : π ℓ = CubeSymbol.star) (lam : Term) (τ : Leaf L) :
      τ ∈ (π.replace ℓ lam).leaves ↔ τ ∈ π.leaves ∧ τ ℓ = lam

      Replacing a star retains precisely the leaves that use the chosen term there.

      Inserting stars never removes the original leaf from the represented set.

      Completing inserted stars with P0 recovers leaves that originally use P0 there.

      Fixing a coordinate removes it from the remaining stars.

      Fixing a coordinate can introduce P0 only at that coordinate.

      Completing stars always gives one of the represented leaves.

      Completion followed by restoring the original stars recovers the cube.

      A cube with no stars fixes the leaf given by its completion.

      Completion chooses P0 precisely at the stars and the coordinates already fixed to P0.

      Completion turns the disjoint star and P0 sets into one P0 set.

      @[simp]

      A fully fixed cube has the product of its two original encoded values.

      theorem Cslib.Algorithms.MatrixMultiplication.Schonhage.Cube.val_eq_sum_replace {L : ℕ} (a : LeftStr L → ℤ) (b : RightStr L → ℤ) (π : Cube L) (ℓ : Fin L) (hℓ : π ℓ = CubeSymbol.star) :
      val a b π = ∑ lam : Term, val a b (π.replace ℓ lam)

      Partitioning a star by its term partitions the signed value, including cancellation.