Skip to content
theryPublic

About

A proof of Fermat's theorem on sum of two squares with mathcom using gaussian integers.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

31 Commits

Folders and files

Repository files navigation

twoSquare

Docker CI

A proof of Fermat's theorem on sum of two squares. It is the proof that uses gaussian integers. This is done in ssreflect. It contains two files :


gauss_int.v : the definition of gaussian integers

fermat2.v : the proof of Fermat's theorem


The final statement reads:

From mathcomp.contrib.sum_of_two_square Require Import fermat2.

Check sum2stest.

sum2stest :

reflect (forall p, prime p -> odd p -> p %| n -> odd (logn p n) -> p %% 4 = 1) (n is a sum_of_two_square).

Meta

Building and installation instructions

To build and install manually, you need to make sure that all the libraries this development depends on are installed. The easiest way to do that is still to rely on opam:

git clone https://github.com/thery/twoSquare.git
cd twoSquare
opam repo add rocq-released https://rocq-prover.org/opam/released
opam install --deps-only .
make   # or make -j <number-of-cores-on-your-machine> 
make install

About

A proof of Fermat's theorem on sum of two squares with mathcom using gaussian integers.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages