Alphabeta Math
TheoremStatement: AI-adaptedProof: AI-generatedPipeline-generatedprecheck pass
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

Validated CSR matrix-vector multiplication terminates with a status

Statement

Let F be a field, let m,n∈Z, let r,c be finite integer arrays, and let v,x be finite arrays with entries in F. The algorithm Validated compressed sparse row matrix-vector product terminates on every such input. Its return status is invalid-dimension, invalid-index, or ok with a vector in Fm.

Facts & Assumptions

Given: A field F, integer dimension candidates m,n, finite integer arrays r,c, and finite arrays v,x with entries in F.

[L1]

Validated compressed sparse row matrix-vector product: with s=length⁡(v), the routine first returns invalid-dimension unless m,n∈N, length⁡(r)=m+1, length⁡(c)=s, and length⁡(x)=n.

[L2]

Validated compressed sparse row matrix-vector product: after the dimension checks, finite scans check 0≤ri≤s for 0≤i≤m, r0=0, rm=s, ri≤ri+1 for i<m, and 0≤ct<n for t<s; any failure returns invalid-index.

[L3]

Validated compressed sparse row matrix-vector product: after validation, the routine initializes yi=0F for i<m, traverses t=ri,…,ri+1−1 in each row, updates yi←yi+vtxct, and returns ok with y.

Proof

1.1givenL1L2algebra

The tests in [L1] are finite and either return invalid-dimension or establish natural dimensions and the required array lengths. Since the arrays are finite, s=length⁡(v) is also a finite natural. The pointer-bound, pointer-monotonicity, and column-index scans in [L2] have respectively m+1, m, and s iterations, with two additional endpoint tests; every accessed index exists by [L1]. Thus validation finishes, either returning invalid-index or establishing all conditions in [L2].

2.1givenL1L2L3step 1.1algebra∎

If validation passes, [L2] gives 0=r0≤⋯≤rm=s and 0≤ct<n. Hence the row ranges partition {0,…,s−1} and have total length ∑i<m(ri+1−ri)=s. The initialization and outer loop in [L3] each have m iterations, and the inner loops have s iterations in total. Every vt and xct accessed exists; field addition and multiplication keep each accumulator in F. The routine therefore returns ok with a vector in Fm. If m=0, validation forces s=0 and returns the empty vector; empty row ranges likewise require no updates. Together with step 1.1 this proves the claim.

Depends on

Used by

Nothing in the library uses this result yet.

Dependency tree · two levels

2 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.

Sources