Alphabeta Math
Pipeline-generated
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.

✓ 5 results · all verified · 4 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full and owner-audited; the judge is an additional, independent cross-model AI review of the proofs. The 1 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Sparse matrix models and kernel costs

1 · Prerequisites

2 · Summary

This page defines a zero-based compressed sparse row (CSR) record, including empty rows, repeated column indices, and explicitly stored zeros. The stored entry count s is kept distinct from the mathematical nonzero count nnz⁡(A) until the representation is canonical. It proves the validated exact-arithmetic matrix-vector routine's termination, correctness, storage, and operation counts; it makes no finite-precision or convergence claim.

For sparse direct elimination, the page defines the symmetric structural graph and its ordered clique updates. The Schur-complement argument proves that the filled graph contains each numerical Schur complement's off-diagonal support, while allowing cancellations. The published matrix-free interface The matrix-free access model for Krylov methods and triangular-substitution result Forward and backward substitution are correct, unique, and quadratic in scalar operations remain at their canonical Krylov and direct-factorization pages; neither is used as a CSR cost or general fill bound.

3 · Logical flowchart

4 · Definitions, theorems and proofs

DefinitionDefinition: AI-adaptedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Compressed sparse row matrices with stored-entry semantics

Definition

Let F be a field, and let m,n,s∈N, where N includes 0. A compressed sparse row (CSR) record for an m by n matrix over F consists of integer arrays r=(r0,…,rm) and c=(c0,…,cs−1), and a value array v=(v0,…,vs−1)∈Fs, satisfying

r0=0,0=r0≤r1≤⋯≤rm=s,0≤ct<n(0≤t<s).

For each row i<m, its stored entries are the indices t with ri≤t<ri+1. The row is empty exactly when ri=ri+1. Repeated column indices within one row and stored values vt=0F are permitted; each such entry remains a separate stored entry.

The represented matrix A∈Mm×n(F) is defined entrywise by

Aij:=∑ri≤t<ri+11ct=jvt(0≤i<m, 0≤j<n),

where 1ct=j is 1F when ct=j and 0F otherwise, and an empty sum is 0F. Repeated entries in column j are therefore added. The number s is the stored-entry count; it is not in general the number of nonzero entries of A.

A CSR record is canonical when no row repeats a column and no stored value is zero. In that case every nonzero matrix entry is stored exactly once and s=nnz⁡(A), where nnz⁡(A) denotes the number of nonzero entries of A. If m=0, the endpoint conditions force s=0 and the row-pointer array has its single entry r0=0. If n=0, the column-index condition forces s=0 as well.

DefinitionDefinition: AI-adaptedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Structural graphs and ordered symmetric elimination

Definition

Let F be a field, let n∈N (including 0), and let A∈Mn×n(F) satisfy Aij=Aji for every i,j<n (that is, A is symmetric). Its structural graph is the simple undirected graph G0=(V,E0) with vertex set V={0,…,n−1} and edge set

E0:={{i,j}:0≤i<j<n, Aij≠0}.

An elimination ordering is a listing v0,…,vn−1 in which every vertex of V occurs exactly once. Define the current vertex set by Vk={vℓ:k≤ℓ<n}, starting with the structural graph G0. At step k, the later neighbors of vk are

Nk(vk):={u∈Vk∖{vk}:{u,vk}∈Ek}.

The filled graph Gk+1=(Vk+1,Ek+1) is obtained by deleting vk and its incident edges, retaining all edges between remaining vertices, and adding every edge between two distinct vertices of Nk(vk). An edge added at step k that was not already in Ek is a fill edge. Repeating this rule defines the symbolic elimination pattern for the ordering; it is defined from the initial graph and ordering alone, without numerical pivot values.

If Nk(vk) is nonempty, the parent of vk is the later neighbor vℓ with least position ℓ>k in the ordering. If Nk(vk) is empty, vk is a root. Each non-root has a unique parent, and positions strictly increase along parent edges, so there is no directed cycle. If the underlying undirected graph had a cycle with q vertices, orient its q edges from child to parent. Each vertex has at most one outgoing parent edge, so these q edges force every cycle vertex to have one outgoing edge along the cycle; following them gives a directed cycle, contradicting strict increase. Thus the parent relation is an elimination forest.

AlgorithmAlgorithm: AI-adaptedProof: Not applicableprecheck pendingjudge pass (gpt-6-luna)Open item page →

Validated compressed sparse row matrix-vector product

Definition

Fix a field F. The validated CSR matrix-vector product takes integer dimension candidates m,n, integer arrays r,c, a value array v of elements of F, and a vector candidate x of elements of F. All input arrays are finite; write s=length⁡(v).

  1. If m∉N, n∉N, length⁡(r)≠m+1, length⁡(c)≠s, or length⁡(x)≠n, return the status invalid-dimension.
  2. For i=0,…,m, check that ri∈{0,…,s}; return invalid-index if a check fails. Check r0=0 and rm=s, and for each i=0,…,m−1 check ri≤ri+1; return invalid-index if any check fails. For each t=0,…,s−1, check 0≤ct<n and return invalid-index if a check fails.
  3. Initialize yi=0F for 0≤i<m. For each row i=0,…,m−1, and then each stored index t=ri,…,ri+1−1, update yi←yi+vtxct.
  4. Return the status ok together with y∈Fm.

For valid CSR data, each update uses exact field arithmetic. This procedure makes no floating-point rounding, backward-stability, convergence, runtime, or memory-bandwidth claim.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passjudge pass (gpt-6-luna)Open item page →

The filled graph contains every off-diagonal Schur-complement nonzero

Statement

Let F be a field, let A∈Mn×n(F) satisfy Aij=Aji for all i,j<n, and fix an elimination ordering. Let Gk=(Vk,Ek) be its symbolic filled graphs from Structural graphs and ordered symmetric elimination. Put S0=A. Assume each pivot pk:=Svkvkk is nonzero, and for every pair of remaining vertices define the Schur update

Sijk+1:=Sijk−SivkkSvkjkpk.

Then for every stage k, each nonzero off-diagonal entry Sijk has {i,j}∈Ek. At each elimination step, the later neighbors of the eliminated vertex form a clique in the next filled graph. Thus the symbolic filled graph contains each numerical Schur complement's off-diagonal support; equality of these off-diagonal patterns is not asserted.

Facts & Assumptions

Given: A field F, a symmetric matrix in Mn×n(F), a fixed elimination ordering, nonzero pivots, and the Schur-complement update in the Statement.

[L1]

Structural graphs and ordered symmetric elimination: at step k, the graph deletes vk, retains edges between remaining vertices, and adds every edge between distinct vertices of Nk(vk).

[L2]

Field: division by a nonzero pivot means multiplication by its multiplicative inverse.

[L3]

Multiplication by zero: 0⋅a=0: in a field, 0⋅a=0 for every a.

[L4]

A field has no zero divisors: ab=0⇒a=0 or b=0: in a field, ab=0 implies a=0 or b=0.

[A1]

For every k<n, pk≠0 and Sijk+1=Sijk−SivkkSvkjk/pk for all i,j∈Vk+1.

Proof

1.1givenL1algebra

At stage 0, S0=A and the initial edge set consists exactly of the unordered off-diagonal pairs with nonzero matrix entry. Hence every nonzero off-diagonal entry of S0 corresponds to an edge of G0.

1.2A1L1L2L3L4inductionalgebra

Suppose the support inclusion holds at stage k. If Sijk+1≠0 for distinct i,j∈Vk+1, then at least one of Sijk and SivkkSvkjk/pk is nonzero. In the first case, the induction hypothesis gives {i,j}∈Ek, and the update retains that edge. In the second case, the numerator is nonzero because a zero numerator would give a zero quotient by [L2] and [L3]; then [L4] forces both pivot couplings to be nonzero. The induction hypothesis gives {i,vk},{vk,j}∈Ek, so i,j∈Nk(vk) and the update adds {i,j}. Thus every such nonzero is supported by an edge of Gk+1.

2.1step 1.1step 1.2L1induction∎

The base case and induction step prove the support inclusion at every stage. For any two distinct later neighbors of vk, the graph update inserts their pair by definition, so the later-neighbor set is a clique in Gk+1.

Remarks

The conclusion is a support inclusion, not equality: an arithmetic subtraction can cancel a nonzero entry while the symbolic edge remains. The companion page gives an explicit cancellation calculation in Numerical cancellation can zero an entry while the filled graph retains its edge ↗. No factorization-cost bound follows from this graph statement.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passOpen item page →

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.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passjudge pass (gpt-6-luna)Open item page →

CSR matrix-vector multiplication returns the represented product

Statement

Let F be a field, let m,n∈N, let a valid CSR record represent A∈Mm×n(F), and let x=(xj)j<n∈Fn. Let X∈Mn×1(F) be the column matrix with Xj0=xj for j<n, and define Ax∈Fm by (Ax)i:=(AX)i0=∑j<nAijxj(i<m), using Rectangular matrix multiplication and the identity matrix In, including zero-sized shapes. Then the algorithm Validated compressed sparse row matrix-vector product returns ok with output Ax in exact field arithmetic.

Facts & Assumptions

Given: A field F, m,n∈N, a valid CSR record representing A, and x∈Fn.

[L1]

Compressed sparse row matrices with stored-entry semantics: Aij=∑ri≤t<ri+11ct=jvt, with an empty sum equal to 0F.

[L2]

Validated compressed sparse row matrix-vector product: each row starts at 0F and accumulates vtxct once for every t=ri,…,ri+1−1.

[L3]

Rectangular matrix multiplication and the identity matrix In, including zero-sized shapes: for the column matrix X with Xj0=xj, (AX)i0=∑j<nAijxj.

[L4]

A finite sum in a commutative monoid indexed by an arbitrary finite set: a finite sum is independent of its enumeration and an empty sum is its identity element.

[L5]

Field: multiplication distributes over addition.

[L6]

The vector space FX of all functions X→F with pointwise operations, and Fn as the case X=n={0,1,…,n−1}: Fm is the set of functions m→F; when m=0 it has exactly one element, the empty function.

[L7]

Multiplication by zero: 0⋅a=0: in a field, 0⋅a=0 for every a.

[L8]

Field: multiplication is commutative on all of F, and x⋅1=x for every x∈F; hence 1Fx=x.

Proof

1.1L2inductionalgebra

Fix a row i. Initially its output coordinate is 0F, the empty partial sum. After q entries of that row have been visited, induction on q gives yi=∑t=riri+q−1vtxct: the next algorithmic update adds exactly the next summand. Taking q=ri+1−ri yields yi=∑ri≤t<ri+1vtxct.

2.1L1L3L4L5L7L8step 1.1algebra

By [L1] and [L3], (Ax)i=∑j<n∑ri≤t<ri+11ct=jvtxj. Repeated application of [L5], by induction on the finite number of summands, distributes the products over these sums. Re-enumerating the resulting finite sum over pairs (j,t) as (t,j) is permitted by [L4]. For each fixed t, exactly the term j=ct survives, so the result is ∑ri≤t<ri+1vtxct. By step 1.1 this equals yi.

3.1L6step 2.1algebra∎

If m=0, both y and Ax are the unique empty vector by [L6]. If m>0, step 2.1 gives equality in every coordinate i<m, hence y=Ax.

TheoremStatement: AI-adaptedProof: AI-generatedprecheck passjudge pass (gpt-6-luna)Open item page →

CSR storage and exact matrix-vector operation counts

Statement

Let F be a field, let m,n∈N, and let a valid CSR record have s stored entries. Its input arrays use exactly s field-value slots, s integer column-index slots, and m+1 integer row-pointer slots, for a total of 2s+m+1 data slots. On valid input, the algorithm Validated compressed sparse row matrix-vector product performs exactly s field multiplications, s field additions, and m zero initializations. Its index validation and loop-control work is O(m+s+1). Counting the CSR arrays and returned output but excluding the supplied vector x and constant-size workspace, it uses exactly 2s+2m+1 data slots, hence O(m+s+1) slots; for m≥1 this is O(m+s). Here O(g) means bounded by Cg for a constant C independent of the dimensions and input values.

For a square record of order m≥1 with at least one stored entry in each row, s≥m, so the work and storage are O(s). For a canonical record as defined in Compressed sparse row matrices with stored-entry semantics, s=nnz⁡(A); without that convention, the cost is in terms of stored entries, not nnz⁡(A). These are arithmetic, index, and storage counts, not runtime, memory-bandwidth, convergence, or factorization-cost bounds.

Facts & Assumptions

Given: A valid CSR record with dimensions m,n∈N and s stored entries.

[L1]

Compressed sparse row matrices with stored-entry semantics: the arrays have lengths m+1, s, and s; the row pointers satisfy r0=0≤⋯≤rm=s.

[L2]

Compressed sparse row matrices with stored-entry semantics: a record is canonical when no row repeats a column and no stored value is zero; then s=nnz⁡(A).

[L3]

Validated compressed sparse row matrix-vector product: on a valid record the algorithm initializes m outputs and visits each row interval ri,…,ri+1−1, performing one multiply-add per visited index.

Proof

1.1L1algebra

The value, column-index, and row-pointer arrays have lengths s, s, and m+1, respectively, so their input representation contains exactly 2s+m+1 data slots.

1.2L1L3algebra

The number of visits in row i is ri+1−ri. Summing these lengths telescopes to rm−r0=s; monotonicity makes the intervals disjoint and their endpoints cover every stored index once. Thus the accumulation loop executes exactly s multiply-add updates, and the initialization loop executes exactly m times. The two validation scans examine at most m+1 pointers and s column indices, so validation and loop control take O(m+s+1) work.

1.3L1L3algebra

The returned vector occupies m additional field slots. Counting it with the CSR arrays, and excluding the supplied x and fixed workspace, gives exactly 2s+2m+1 data slots, hence O(m+s+1). If m≥1, then m+s≥1 and the additive constant is absorbed into a fixed multiple of m+s.

2.1L1L2step 1.2step 1.3algebra∎

For a square record of order m≥1 with every row storing at least one entry, summing its m row lengths gives s≥m; substituting into the preceding bounds yields O(s). By [L2], a canonical record has s=nnz⁡(A); no such equality is asserted when duplicate columns or explicit zeros are stored.

5 · Examples, counterexamples and false statements

None yet.

Sources