LAProof.accuracy_proofs.gemv_acc
Matrix-Vector Multiplication Error Bounds
Error Factors
Main Results
- vec_vec_mul_mixed_error: Shows that the floating-point row-times-column
dot product can be expressed as an exact product of a componentwise-perturbed
row vector with the exact column vector, plus a small absolute residual.
- mat_vec_mul_mixed_error: Shows that the floating-point matrix-vector
product can be expressed as an exact product of a componentwise-perturbed
matrix with the exact input vector, plus a small absolute residual.
Proved by applying vec_vec_mul_mixed_error row by row.
- mat_vec_mul_forward_error: Bounds the absolute forward error of the floating-point matrix-vector product in the vector max-norm by \(g(n) \cdot \|A\| \cdot \|B\| + g_1(n,n)\), where \(\|A\|\) is the matrix infinity norm and \(\|B\|\) is the vector max-norm.
Dependencies
- preamble, common: basic setup and shared definitions
- dotprod_model, sum_model: relational models of dot product and summation
- dot_acc, float_acc_lems: accuracy lemmas
- mv_mathcomp: floating-point matrix/vector operations and norm definitions
From LAProof.accuracy_proofs Require Import preamble common
dotprod_model sum_model
dot_acc float_acc_lems mv_mathcomp.
From mathcomp.algebra_tactics Require Import ring.
Section WithNAN.
Context {NAN : FPCore.Nans} {t : type}.
Notation g := (@common.g t).
Notation g1 := (@common.g1 t).
Row-Vector Times Column-Vector: Mixed Error Bound
Lemma vec_vec_mul_mixed_error :
∀ [n] (A : 'M[ftype t]_(1,n)) (B : 'M[ftype t]_(n,1))
(Hfin : F.finitemx (F.mulmx A B)),
∃ (E : 'M[R]_(1,n)) (eta : 'M[R]_(1,1)),
map_mx FT2R (F.mulmx A B)
= ((map_mx FT2R A + E) ×m (map_mx FT2R B) + eta)%Ri
∧ (∀ i j, Rabs (E i j) ≤ g n × Rabs (map_mx FT2R A i j))
∧ (∀ i j, Rabs (eta i j) ≤ g1 n n).
General Matrix-Vector Product: Mixed Error Bound
Lemma mat_vec_mul_mixed_error :
∀ [m n] (A : 'M[ftype t]_(m,n)) (B : 'M[ftype t]_(n,1))
(Hfin : F.finitemx (F.mulmx A B)),
∃ (E : 'M[R]_(m,n)) (eta : 'M[R]_(m,1)),
map_mx FT2R (F.mulmx A B)
= ((map_mx FT2R A + E) ×m (map_mx FT2R B) + eta)%Ri
∧ (∀ i j, Rabs (E i j) ≤ g n × Rabs (map_mx FT2R A i j))
∧ (∀ i j, Rabs (eta i j) ≤ g1 n n).