Finite-set invariant of the native deduplicating scan #
Main definitions #
PrunedQuery.scanSet: the selected, shortened codes among a processed input prefix.
Main results #
PrunedQuery.scanSet_succ: the exact insertion made by one scan step.PrunedQuery.scanSet_child: agreement of the child scan withchildCodes.
These describe the native loop's mathematical invariant; they do not assume its execution.
def Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.PrunedQuery.selected (child : Bool) (term code : ℕ) :
Root scans retain every query; child scans retain exactly contributing first digits.
Instances For
def Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.PrunedQuery.shortened (child : Bool) (code : ℕ) :
Child requests discard one digit; root requests keep the supplied complete code.
Instances For
theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.PrunedQuery.scanSet_root (term : ℕ) (input : ℕ → ℕ) (k : ℕ) :
Root deduplication computes exactly the image of the input prefix.
theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.PrunedQuery.scanSet_child (term : ℕ) (input : ℕ → ℕ) (k : ℕ) :
A child scan uses the same selected quotient image as the finite pruning specification.
theorem Cslib.Algorithms.WordRAM.MatrixMultiplication.Schonhage.PrunedQuery.scanSet_bounded {child : Bool} {term k capacity : ℕ} {input : ℕ → ℕ} (h : ∀ i < k, selected child term (input i) → shortened child (input i) < capacity) (q : ℕ) :
Every stored code lies in the concrete destination capacity when each selected source does.