Named source locations for Strassen matrix multiplication
DefinitionCLRS_Chapter4_Algo2LeanExamples_MatrixStrassenPointsalgo2leanalgo2lean-clrs-chapter4-fd33cf9algorithmsclrsrunning-timetextbook
These observations identify named source locations and local variables in one supplied configuration of the compiled Strassen matrix multiplication program. A location predicate expresses program position only: it does not imply reachability from function entry or fix a transcript. The interface supports local loop contracts while leaving the generated algorithm definitions independent of label changes.
Formalization Note. This content is transcribed from Algo2Lean development snapshot fd33cf959b39f9e4a9fcfda4ef31d5a36b784d41, with explicit platform import and namespace adaptation. It is not attributed to public compiler v0.1.4. The submitted definition bundle must be checked without unfinished-proof assumptions.
Definition code
import Definitions.Def_CLRS_Chapter4_Algo2Lean import Definitions.Def_CLRS_Chapter4_Algo2LeanExamples_MatrixStrassenGenerated import Std set_option autoImplicit false set_option backward.isDefEq.respectTransparency false set_option backward.defeqAttrib.useBackward true namespace CLRS -- Generated by Algo2Lean 0.1.1 https://github.com/lunjiah/algo2lean namespace «MatrixStrassenLibrary» open _root_.CLRS.Algo2LeanGenerated open Algo2LeanGenerated -- Named-line observations; changing labels leaves the imported algorithm unchanged. -- Before source line 9, column 5; location only, not reachability. def matrix_linear_row.At.loop : Configuration → Prop | .active _ (.fn_matrix_linear_row 4 _) _ => True | _ => False def matrix_linear_row.Local.a : Configuration → Option SeqRef | .active _ (.fn_matrix_linear_row pc s) _ => if pc = 4 then some s.v0 else none | _ => none def matrix_linear_row.Local.b : Configuration → Option SeqRef | .active _ (.fn_matrix_linear_row pc s) _ => if pc = 4 then some s.v1 else none | _ => none def matrix_linear_row.Local.count : Configuration → Option Int | .active _ (.fn_matrix_linear_row pc s) _ => if pc = 4 then some s.v2 else none | _ => none def matrix_linear_row.Local.sign : Configuration → Option Int | .active _ (.fn_matrix_linear_row pc s) _ => if pc = 4 then some s.v3 else none | _ => none def matrix_linear_row.Local.c : Configuration → Option SeqRef | .active _ (.fn_matrix_linear_row pc s) _ => if pc = 4 then some s.v4 else none | _ => none def matrix_linear_row.Local.i : Configuration → Option Int | .active _ (.fn_matrix_linear_row pc s) _ => if pc = 4 then some s.v5 else none | _ => none -- Before source line 20, column 5; location only, not reachability. -- Before source line 30, column 5; location only, not reachability. -- Before source line 41, column 5; location only, not reachability. -- Before source line 51, column 5; location only, not reachability. -- Before source line 63, column 5; location only, not reachability. end «MatrixStrassenLibrary» end CLRS
Source
Algo2Lean Chapter 4 development, module Algo2LeanExamples.MatrixStrassenPoints, immutable source fd33cf959b39f9e4a9fcfda4ef31d5a36b784d41: https://github.com/chutongyang98/Lean_formalization/blob/fd33cf959b39f9e4a9fcfda4ef31d5a36b784d41/examples/matrix_strassen.algo; https://github.com/chutongyang98/Lean_formalization/blob/fd33cf959b39f9e4a9fcfda4ef31d5a36b784d41/examples/analysis/matrix_strassen.lean