Jump to ContentJump to Main Navigation
Show Summary Details
More options …

Formalized Mathematics

(a computer assisted approach)

Editor-in-Chief: Matuszewski, Roman

4 Issues per year

SCImago Journal Rank (SJR) 2016: 0.207
Source Normalized Impact per Paper (SNIP) 2016: 0.315

Open Access
See all formats and pricing
More options …
Volume 22, Issue 2


Lagrange’s Four-Square Theorem

Yasushige Watase
Published Online: 2014-06-30 | DOI: https://doi.org/10.2478/forma-2014-0012


This article provides a formalized proof of the so-called “the four-square theorem”, namely any natural number can be expressed by a sum of four squares, which was proved by Lagrange in 1770. An informal proof of the theorem can be found in the number theory literature, e.g. in [14], [1] or [23].

This theorem is item #19 from the “Formalizing 100 Theorems” list maintained by Freek Wiedijk at http://www.cs.ru.nl/F.Wiedijk/100/.

Keywords: Lagrange’s four-square theorem

MSC: 11P99; 03B35


  • [1] Alan Baker. A Concise Introduction to the Theory of Numbers. Cambridge University Press, 1984.Google Scholar

  • [2] Grzegorz Bancerek. Cardinal numbers. Formalized Mathematics, 1(2):377–382, 1990.Google Scholar

  • [3] Grzegorz Bancerek. Cardinal arithmetics. Formalized Mathematics, 1(3):543–547, 1990.Google Scholar

  • [4] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathematics, 1(1):41–46, 1990.Google Scholar

  • [5] Grzegorz Bancerek. The ordinal numbers. Formalized Mathematics, 1(1):91–96, 1990.Google Scholar

  • [6] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.Google Scholar

  • [7] Czesław Byliński. The complex numbers. Formalized Mathematics, 1(3):507–513, 1990.Google Scholar

  • [8] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1): 55–65, 1990.Google Scholar

  • [9] Czesław Byliński. Functions from a set to a set. Formalized Mathematics, 1(1):153–164, 1990.Google Scholar

  • [10] Czesław Byliński. Partial functions. Formalized Mathematics, 1(2):357–367, 1990.Google Scholar

  • [11] Czesław Byliński. Some basic properties of sets. Formalized Mathematics, 1(1):47–53, 1990.Google Scholar

  • [12] Agata Darmochwał. Finite sets. Formalized Mathematics, 1(1):165–167, 1990.Google Scholar

  • [13] Yoshinori Fujisawa, Yasushi Fuwa, and Hidetaka Shimizu. Public-key cryptography and Pepin’s test for the primality of Fermat numbers. Formalized Mathematics, 7(2):317–321, 1998.Google Scholar

  • [14] G.H. Hardy and E.M. Wright. An Introduction to the Theory of Numbers. Oxford University Press, 1980.Google Scholar

  • [15] Artur Korniłowicz and Piotr Rudnicki. Fundamental Theorem of Arithmetic. Formalized Mathematics, 12(2):179–186, 2004.Google Scholar

  • [16] Rafał Kwiatek. Factorial and Newton coefficients. Formalized Mathematics, 1(5):887–890, 1990.Google Scholar

  • [17] Rafał Kwiatek and Grzegorz Zwara. The divisibility of integers and integer relatively primes. Formalized Mathematics, 1(5):829–832, 1990.Google Scholar

  • [18] Xiquan Liang, Li Yan, and Junjie Zhao. Linear congruence relation and complete residue systems. Formalized Mathematics, 15(4):181–187, 2007. doi:10.2478/v10037-007-0022-7.CrossrefGoogle Scholar

  • [19] Piotr Rudnicki and Andrzej Trybulec. Abian’s fixed point theorem. Formalized Mathematics, 6(3):335–338, 1997.Google Scholar

  • [20] Christoph Schwarzweller. Modular integer arithmetic. Formalized Mathematics, 16(3): 247–252, 2008. doi:10.2478/v10037-008-0029-8.CrossrefGoogle Scholar

  • [21] Michał J. Trybulec. Integers. Formalized Mathematics, 1(3):501–505, 1990.Google Scholar

  • [22] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.Google Scholar

  • [23] Hideo Wada. The World of Numbers (in Japanese). Iwanami Shoten, 1984.Google Scholar

  • [24] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics, 1 (1):73–83, 1990.Google Scholar

  • [25] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.Google Scholar

About the article

Received: 2014-06-04

Published Online: 2014-06-30

Published in Print: 2014-06-30

Citation Information: Formalized Mathematics, Volume 22, Issue 2, Pages 105–110, ISSN (Online) 1898-9934, DOI: https://doi.org/10.2478/forma-2014-0012.

Export Citation

© 2014 Yasushige Watase. This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 License. (CC BY-SA 3.0) BY-SA 3.0

Comments (0)

Please log in or register to comment.
Log in