Strassen: finite execution, represented result, fresh rows, and exact counters
ProvedCLRS.MatrixStrassenExecution.strassen_summary_rowsFor represented nested integer inputs in any initial heap and natural depth , the compiled Strassen call at size terminates. The returned outer array stores the recursively specified Strassen value, preserves all previously allocated heap storage, has a fresh outer reference, and has fresh allocated, pairwise distinct rows throughout the finite square. The same execution has exact counter increments
where , , , and . All other clocks are unchanged. Inputs may alias and initial counters may be nonzero. Value correctness separately identifies the returned Strassen value with ordinary matrix multiplication.
Platform namespace. The imported Chapter 4 source declarations live under CLRS in this upload to avoid collisions with independently published compiler versions. The immutable source reference retains the original declaration names.
Catalog organization (2026-10-11). This record was retired from the active Chapter 4 catalog to focus the presentation on three algorithms and four reusable recurrence results. Its mathematical statement and proof status are unchanged, and existing imports and links remain valid. The retained results are CLRS.Chapter4Publication.Strassen.correctness_and_running_time. Supporting lemmas needed by the retained results are included in their accepted proof files.
import Definitions.Def_CLRS_Chapter4_Algo2Lean import Definitions.Def_CLRS_Chapter4_Algo2LeanExamples_MatrixStrassen import Definitions.Def_CLRS_Chapter4_Algo2LeanExamples_MatrixStrassenGenerated import Definitions.Def_CLRS_Chapter4_Algo2LeanExamples_MatrixStrassenPoints import Definitions.Def_CLRS_Chapter4_Algo2LeanLib_MatrixHeap import Std set_option autoImplicit false set_option backward.isDefEq.respectTransparency false set_option backward.defeqAttrib.useBackward true namespace CLRS end CLRS open CLRS open MatrixStrassenLibrary MatrixStrassenLibrary.Algo2LeanGenerated open Algo2LeanCore Algo2LeanGenerated MatrixStrassenAnalysis MatrixStrassenHelpers open Algo2LeanCore.MatrixHeap open MatrixStrassenComposition namespace CLRS.MatrixStrassenExecution end CLRS.MatrixStrassenExecution open CLRS.MatrixStrassenExecution
theorem CLRS.MatrixStrassenExecution.strassen_summary_rows (depth : Nat) (heap : Heap) (a b : CollectionRef) (av bv : Values)
(sa : Stored heap a av) (sb : Stored heap b bv) :
∃ after result, strassen.Call heap (a,b,((2^depth:Nat):Int)) after result ∧
Extends heap after ∧ Stored after result (StrassenValues.strassenValue depth av bv) ∧
(∀ name, after.clocks name = heap.clocks name + costs depth name) ∧ heap.nextCollection ≤ result ∧ FreshRows heap after result (2^depth) := by sorry