Alphabeta Math
TheoremStatement: Literature-sourcedProof: AI-generatedprecheck passaudited 2026-09-12
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.

Freivalds' one-trial matrix-product test has one-sided error

Statement

Let F be a field and let A,B,CMn(F). Choose a random vector r{0,1}n uniformly and accept exactly when A(Br)=Cr.

Then:

  1. if C=AB, the test accepts with probability 1; 2. if CAB, the test accepts with probability at most 1/2.

So one trial gives a one-sided-error randomized test for matrix products.

Facts & Assumptions

Given: a field F, matrices A,B,CMn(F), and a uniform random vector r{0,1}n.

[L1]

Matrix products and matrix-vector products are defined by finite sums over matching indices (Rectangular matrix multiplication and the identity matrix In, including zero-sized shapes).

[L2]

In a field, distinct scalars remain distinct and every nonzero scalar is invertible (Field).

Proof

technique · direct
1.1

If C=AB, then the equality Cr=(AB)r=A(Br) follows directly from the finite-sum definition in [L1]. So the test always accepts a correct product.

L1given
1.2

Assume CAB and put D:=CAB0. Then some row d=(d1,,dn) of D is nonzero. Choose the largest index j with dj0; this is possible because the row is finite.

L2choosealgebra
2.1

Fix all random bits of r except rj. The equation (Dr)i=0 for the chosen row has the form djrj=<jdr, because d=0 for >j. By [L2], dj is invertible, so at most one value of rj can satisfy this equation. Since rj is uniform on {0,1} and 01 in a field by [L2], the conditional probability that this row equation holds is at most 1/2. Therefore P(Dr=0)1/2, and hence the acceptance probability when CAB is at most 1/2.

L2step 1.2algebra
3.1

Steps 1.1 and 2.1 prove the one-sided error bound for a single trial of the test. Repeating with fresh random vectors multiplies the failure probability.

step 1.1step 2.1

Depends on

Used by

Nothing in the library uses this result yet.

Dependency tree · two levels

8 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