Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thery/twosquare
A proof of Fermat's theorem on sum of two squares with mathcom using gaussian integers.
https://github.com/thery/twosquare
coq coq-formalization fermat-theorem sum-of-squares
Last synced: 8 days ago
JSON representation
A proof of Fermat's theorem on sum of two squares with mathcom using gaussian integers.
- Host: GitHub
- URL: https://github.com/thery/twosquare
- Owner: thery
- Created: 2016-02-18T14:34:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-11-02T12:46:08.000Z (about 1 year ago)
- Last Synced: 2024-10-11T21:51:48.728Z (about 1 month ago)
- Topics: coq, coq-formalization, fermat-theorem, sum-of-squares
- Language: Coq
- Size: 135 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# twoSquare
[![Docker CI][docker-action-shield]][docker-action-link]
[docker-action-shield]: https://github.com/thery/twoSquare/workflows/Docker%20CI/badge.svg?branch=master
[docker-action-link]: https://github.com/thery/twoSquare/actions?query=workflow:"Docker%20CI"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
- Author(s):
- Laurent Théry
- License: [MIT License](LICENSE)
- Compatible Coq versions: 8.18 or later
- Additional dependencies:
- [MathComp ssreflect 2.1 or later](https://math-comp.github.io)
- [MathComp algebra 2.1 or later](https://math-comp.github.io)
- [MathComp field 2.1 or later](https://math-comp.github.io)
- Coq namespace: `twoSquare`
- Related publication(s): none## Building and installation instructions
To build and install manually, do:
``` shell
git clone https://github.com/thery/twoSquare.git
cd twoSquare
make # or make -j
make install
```