Skip to main content

Verified Correctness, Accuracy, and Convergence of a Stationary Iterative Linear Solver: Jacobi Method

  • Conference paper
  • First Online:
Intelligent Computer Mathematics (CICM 2023)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 14101))

Included in the following conference series:

Abstract

Solving a sparse linear system of the form \(Ax=b\) is a common engineering task, e.g., as a step in approximating solutions of differential equations. Inverting a large matrix A is often too expensive, and instead engineers rely on iterative methods, which progressively approximate the solution x of the linear system in several iterations, where each iteration is a much less expensive (sparse) matrix-vector multiplication.

   We present a formal proof in the Coq proof assistant of the correctness, accuracy and convergence of one prominent iterative method, the Jacobi iteration. The accuracy and convergence properties of Jacobi iteration are well-studied, but most past analyses were performed in real arithmetic; instead, we study those properties, and prove our results, in floating-point arithmetic. We then show that our results are properly reflected in a concrete implementation in the C language. Finally, we show that the iteration will not overflow, under assumptions that we make explicit. Notably, our proofs are faithful to the details of the implementation, including C program semantics and floating-point arithmetic.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 74.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    A an \(n\times n\) matrix; b and x dimension n; \(0<n<2^{32}\); Abx all finite; Abx stored in memory in the right places—but nothing else about the values of Abx.

References

  1. Ahlberg, J.H., Nilson, E.N.: Convergence properties of the spline fit. J. Soc. Indust. Appl. Math. 11, 95–104 (1963)

    Article  MathSciNet  MATH  Google Scholar 

  2. Appel, A.W., Bertot, Y.: C-language floating-point proofs layered with VST and Flocq. J. Formalized Reason. 13(1), 1–16 (2020)

    MathSciNet  MATH  Google Scholar 

  3. Appel, A.W., Kellison, A.E.: VCFloat2: floating-point error analysis in Coq (2022). https://github.com/VeriNum/vcfloat/blob/master/doc/vcfloat2.pdf

  4. Barrett, R., et al.: Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods. SIAM (1994)

    Google Scholar 

  5. Boldo, S., Clément, F., Filliâtre, J.C., Mayero, M., Melquiond, G., Weis, P.: Wave equation numerical resolution: a comprehensive mechanized proof of a C program. J. Autom. Reason. 50(4), 423–456 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  6. Boldo, S., Clément, F., Filliâtre, J.C., Mayero, M., Melquiond, G., Weis, P.: Trusting computations: a mechanized proof from partial differential equations to actual program. Comput. Math. Appl. 68(3), 325–352 (2014)

    MathSciNet  MATH  Google Scholar 

  7. Boldo, S., Lelay, C., Melquiond, G.: Coquelicot: a user-friendly library of real analysis for Coq. Math. Comput. Sci. 9(1), 41–62 (2015)

    Article  MathSciNet  MATH  Google Scholar 

  8. Boldo, S., Melquiond, G.: Flocq: a unified library for proving floating-point algorithms in Coq. In: 2011 IEEE 20th Symposium on Computer Arithmetic, pp. 243–252. IEEE (2011)

    Google Scholar 

  9. Cano, G., Dénès, M.: Matrices à blocs et en forme canonique. In: Pous, D., Tasson, C. (eds.) JFLA - Journées francophones des langages applicatifs. Aussois, France (2013). https://hal.inria.fr/hal-00779376

  10. Cao, Q., Beringer, L., Gruetter, S., Dodds, J., Appel, A.W.: VST-Floyd: a separation logic tool to verify correctness of C programs. J. Autom. Reason. 61(1–4), 367–422 (2018)

    Article  MathSciNet  MATH  Google Scholar 

  11. Garillot, F., Gonthier, G., Mahboubi, A., Rideau, L.: Packaging mathematical structures. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 327–342. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-03359-9_23

    Chapter  Google Scholar 

  12. Gleich, D.F.: Pagerank beyond the web. SIAM Rev. 57(3), 321–363 (2015)

    Article  MathSciNet  MATH  Google Scholar 

  13. Higham, N.J.: Accuracy and Stability of Numerical Algorithms. SIAM (2002)

    Google Scholar 

  14. Higham, N.J., Knight, P.A.: Componentwise error analysis for stationary iterative methods. In: Meyer, C.D., Plemmons, R.J. (eds.) Linear Algebra, Markov Chains, and Queueing Models, pp. 29–46. Springer, New York (1993). https://doi.org/10.1007/978-1-4613-8351-2_3

    Chapter  Google Scholar 

  15. Immler, F.: A Verified ODE Solver and Smale’s 14th Problem. Dissertation, Technische Universität München, München (2018)

    Google Scholar 

  16. Immler, F., Hölzl, J.: Numerical analysis of ordinary differential equations in Isabelle/HOL. In: Beringer, L., Felty, A. (eds.) ITP 2012. LNCS, vol. 7406, pp. 377–392. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-32347-8_26

    Chapter  Google Scholar 

  17. Immler, F., Traut, C.: The flow of ODEs: formalization of variational equation and Poincaré map. J. Autom. Reason. 62(2), 215–236 (2019)

    Article  MATH  Google Scholar 

  18. Katz, L.: A new status index derived from sociometric analysis. Psychometrika 18(1), 39–43 (1953)

    Article  MATH  Google Scholar 

  19. Kellison, A., Tekriwal, M., Jeannin, J.B., Hulette, G.: Towards verified rounding error analysis for stationary iterative methods. In: 2022 IEEE/ACM Sixth International Workshop on Software Correctness for HPC Applications (Correctness), pp. 10–17 (2022). https://doi.org/10.1109/Correctness56720.2022.00007

  20. Kellison, A.E., Appel, A.W.: Verified numerical methods for ordinary differential equations. In: 15th International Workshop on Numerical Software Verification (2022)

    Google Scholar 

  21. Kellison, A.E., Appel, A.W., Tekriwal, M., Bindel, D.: LAProof: a library of formal accuracy and correctness proofs for sparse linear algebra programs (2023). https://www.cs.princeton.edu/~appel/papers/LAProof.pdf

  22. Mahboubi, A., Tassi, E.: Mathematical components. Online book (2021)

    Google Scholar 

  23. Martin-Dorel, É., Rideau, L., Théry, L., Mayero, M., Pasca, I.: Certified, efficient and sharp univariate Taylor models in Coq. In: 15th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing, pp. 193–200. IEEE (2013)

    Google Scholar 

  24. McKenzie, L.: Matrices with dominant diagonals and economic theory. In: Arroa, K., Karlin, S., Puppes, S. (eds.) Mathematical Methods in the Social Sciences, pp. 47–60. Stanford University Press (1960)

    Google Scholar 

  25. O’Connor, R.: Certified exact transcendental real number computation in Coq. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 246–261. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-71067-7_21

    Chapter  MATH  Google Scholar 

  26. Pasca, I.: Formal verification for numerical methods. Ph.D. thesis, Université Nice Sophia Antipolis (2010)

    Google Scholar 

  27. Saad, Y.: Iterative Methods for Sparse Linear Systems. SIAM (2003)

    Google Scholar 

  28. Tekriwal, M., Duraisamy, K., Jeannin, J.-B.: A formal proof of the lax equivalence theorem for finite difference schemes. In: Dutle, A., Moscato, M.M., Titolo, L., Muñoz, C.A., Perez, I. (eds.) NFM 2021. LNCS, vol. 12673, pp. 322–339. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-76384-8_20

    Chapter  Google Scholar 

  29. Tekriwal, M., Miller, J., Jeannin, J.B.: Formal verification of iterative convergence of numerical algorithms (2022). https://doi.org/10.48550/arXiv.2202.05587

  30. Thiemann, R.: A Perron-Frobenius theorem for deciding matrix growth. J. Log. Algebraic Methods Program. 100699 (2021)

    Google Scholar 

Download references

Acknowledgement

We thank Yves Bertot for feedback on earlier drafts of this paper. This research was supported in part by NSF Grants CCF-2219997 and CCF-2219757, by a US Department of Energy Computational Science Fellowship DE-SC0021110, and by the Chateaubriand fellowship program.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mohit Tekriwal .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Tekriwal, M., Appel, A.W., Kellison, A.E., Bindel, D., Jeannin, JB. (2023). Verified Correctness, Accuracy, and Convergence of a Stationary Iterative Linear Solver: Jacobi Method. In: Dubois, C., Kerber, M. (eds) Intelligent Computer Mathematics. CICM 2023. Lecture Notes in Computer Science(), vol 14101. Springer, Cham. https://doi.org/10.1007/978-3-031-42753-4_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-42753-4_14

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-42752-7

  • Online ISBN: 978-3-031-42753-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics