Skip to content

Refactor elementary number theory #1211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 100 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
f988936
squares of natural numbers
EgbertRijke Oct 25, 2024
c66773a
add file
EgbertRijke Oct 25, 2024
269e3d0
make pre-commit
EgbertRijke Oct 25, 2024
48b74ec
properties of squares
EgbertRijke Oct 26, 2024
7952fc4
some work on integer fractions
EgbertRijke Oct 26, 2024
156dd99
squares of integers
EgbertRijke Oct 26, 2024
defae26
make pre-commit
EgbertRijke Oct 26, 2024
9b917e7
parity integers
EgbertRijke Oct 26, 2024
01b1c33
parity integers
EgbertRijke Oct 26, 2024
70edf99
work
EgbertRijke Oct 27, 2024
e55cb69
work
EgbertRijke Oct 28, 2024
a12e652
generalizations to commutative rings
EgbertRijke Oct 29, 2024
39b6264
work
EgbertRijke Oct 29, 2024
02a81cf
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Oct 29, 2024
dec3433
implementing some algebra into the theory of integers
EgbertRijke Oct 30, 2024
22a5ace
edits
EgbertRijke Oct 30, 2024
aea9973
edits
EgbertRijke Oct 30, 2024
c0dfde5
work
EgbertRijke Oct 30, 2024
fbdb94c
moving decidability of divisibility into the file about divisibility
EgbertRijke Oct 31, 2024
9fa26d3
refactoring decidability of divisibility of integers
EgbertRijke Oct 31, 2024
3c12fb5
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Oct 31, 2024
19a1948
some work
EgbertRijke Nov 5, 2024
3c8f4fd
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Nov 5, 2024
de1f5b5
work
EgbertRijke Nov 5, 2024
15f9efa
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Nov 11, 2024
627cbb3
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Dec 4, 2024
032e45d
some improvements to number theory
EgbertRijke Dec 7, 2024
c8f84ad
refactoring the fundamental theorem of arithmetic
EgbertRijke Dec 16, 2024
5578aaa
further refactoring of fundamental theorem
EgbertRijke Dec 17, 2024
71f3b76
well-ordering principles for the integers
EgbertRijke Jan 2, 2025
6270496
Nicomachus's Theorem
EgbertRijke Jan 4, 2025
9d2836c
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Jan 4, 2025
405c30a
square pyramidal numbers
EgbertRijke Jan 4, 2025
adec8f0
sum of pronic numbers
EgbertRijke Jan 4, 2025
4f10aa5
The sum of the first n odd numbers is the nth square
EgbertRijke Jan 4, 2025
a4e411c
merge
EgbertRijke Jan 4, 2025
5dd2b23
number of divisors
EgbertRijke Jan 4, 2025
f94ad9d
LeVeque's strict bound on the growth of the Fibonacci numbers
EgbertRijke Jan 5, 2025
c6b25ed
generalizing LeVeque's upper bound for the Fibonacci sequence
EgbertRijke Jan 5, 2025
8b61eeb
edits
EgbertRijke Jan 6, 2025
2c3a0c1
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Jan 6, 2025
d484452
mersenne numbers and bounded natural numbers
EgbertRijke Jan 6, 2025
e031856
fixing citations
EgbertRijke Jan 6, 2025
9af5931
resolve merge conflicts
EgbertRijke Jan 6, 2025
aa6bb2e
resolve merge conflicts
EgbertRijke Jan 6, 2025
be13fbf
involution on the type of divisors
EgbertRijke Jan 7, 2025
ed68ab3
The formula for the distance of squares
EgbertRijke Jan 7, 2025
e0a8dee
refactoring exponentiation
EgbertRijke Jan 7, 2025
06035d1
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Jan 7, 2025
1e2dc89
strictly ordered sets and inflationary maps
EgbertRijke Jan 8, 2025
1535006
inflationary maps of strictly ordered types
EgbertRijke Jan 8, 2025
4b86dd1
lower and upper bounds of structured natural numbers
EgbertRijke Jan 9, 2025
03dd0cf
factoring out minimal and maximal structure natural numbers
EgbertRijke Jan 10, 2025
948d7c7
bounded maximal elements of decidable families
EgbertRijke Jan 10, 2025
0845585
setting up some files for maps on the natural numbers
EgbertRijke Jan 11, 2025
9ff5147
maximal value-bound input property
EgbertRijke Jan 11, 2025
f120698
finite subtypes of the natural numbers have maximal elements
EgbertRijke Jan 12, 2025
1d66e6e
structured maximal value-bound inputs
EgbertRijke Jan 14, 2025
89abe84
any two distinct Fermat numbers are relatively prime
EgbertRijke Jan 15, 2025
a686f18
Farey fractions
EgbertRijke Jan 15, 2025
fa5ced3
unbounded Farey fractions
EgbertRijke Jan 15, 2025
24c32f7
some properties of Farey fractions
EgbertRijke Jan 16, 2025
ae95d3c
Every positive natural number has a 2-adic decomposition
EgbertRijke Jan 17, 2025
a23ea64
work
EgbertRijke Jan 19, 2025
fb2ec5b
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Jan 19, 2025
f64232c
literature, exercises, and historical references
EgbertRijke Jan 21, 2025
b14fcab
literature, exercises, and historical references
EgbertRijke Jan 21, 2025
b66615e
formatting
EgbertRijke Jan 21, 2025
f80e569
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Jan 26, 2025
06f229d
refactoring divisibility
EgbertRijke Jan 27, 2025
5b637cb
ideals of semirings and iterated pronic numbers
EgbertRijke Feb 2, 2025
54a9a8e
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Feb 2, 2025
99fda92
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Feb 2, 2025
fd4c8aa
Saidak's proof
EgbertRijke Feb 3, 2025
c49bd09
typo
EgbertRijke Feb 3, 2025
65c2056
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Feb 3, 2025
c60e8b1
the largest power divisor is the largest power divisor
EgbertRijke Feb 3, 2025
160188a
parity results
EgbertRijke Feb 3, 2025
00448cc
some divisibility infrastructure
EgbertRijke Feb 4, 2025
8ba3c58
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Feb 4, 2025
2cf37d6
lemma about divisors of the form 2^k
EgbertRijke Feb 5, 2025
734528e
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Feb 5, 2025
1b7b9b3
Every nonzero natural number has a unique 2-adic decomposition
EgbertRijke Feb 5, 2025
acc6f20
resolve merge conflict
EgbertRijke Feb 5, 2025
cec430b
NZM exercise 53
EgbertRijke Feb 7, 2025
e64766c
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Feb 7, 2025
b4b86ac
refactoring up to the fundamental theorem
EgbertRijke Feb 7, 2025
0661b4b
some work towards Bezout's identity in the natural numbers
EgbertRijke Feb 9, 2025
c839ebe
edit
EgbertRijke Feb 9, 2025
e283a6d
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Feb 9, 2025
ee2c931
resolve merge conflict
EgbertRijke Feb 10, 2025
99add77
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Feb 10, 2025
f2ba05d
a few more merge conflicts
EgbertRijke Feb 10, 2025
e5c7b79
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Feb 11, 2025
7c9b3cc
edit?
EgbertRijke Feb 11, 2025
10b8d6e
Merge branch 'master' of github.com:UniMath/agda-unimath into irratio…
EgbertRijke Feb 11, 2025
c83c8f3
products of elements of lists
EgbertRijke Feb 11, 2025
df6c719
edits?
EgbertRijke Feb 11, 2025
595c7ae
merge
EgbertRijke Feb 11, 2025
3ea787e
address merge conflicts
EgbertRijke Feb 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 164 additions & 10 deletions references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ @online{100theorems
url = {https://www.cs.ru.nl/~freek/100/}
}

@book{AZ18,
author = {Aigner, Martin and Ziegler, G\"{u}nter M.},
title = {Proofs from THE BOOK},
year = {2018},
isbn = {3662572648},
publisher = {Springer Publishing Company, Incorporated},
edition = {6th},
abstract = {This revised and enlarged sixth edition of Proofs from THE BOOK features an entirely new chapter on Van der Waerdens permanent conjecture, as well as additional, highly original and delightful proofs in other chapters.}
}

@article{AKS15,
title = {Univalent Categories and the {{Rezk}} Completion},
author = {Ahrens, Benedikt and Kapulkin, Krzysztof and Shulman, Michael},
Expand Down Expand Up @@ -44,6 +54,16 @@ @article{AL19
langid = {english}
}

@book{Andrews94,
title = {Number Theory},
author = {Andrews, G.E.},
isbn = {9780486682525},
lccn = {lc94005243},
series = {Dover Books on Mathematics},
year = {1994},
publisher = {Dover Publications}
}

@misc{Anel24,
title = {The category of $\pi$-finite spaces},
author = {Mathieu Anel},
Expand All @@ -66,16 +86,16 @@ @misc{Awodey22
}

@article{BauerTaylor2009,
author = {Bauer, Andrej and Taylor, Paul},
title = {The {D}edekind Reals in Abstract {S}tone Duality},
journal = {Mathematical Structures in Computer Science},
publisher = {Cambridge University Press},
year = 2009,
volume = 19,
pages = {757--838},
doi = {10.1017/S0960129509007695},
url = {PaulTaylor.EU/ASD/dedras/},
amsclass = {03F60, 06E15, 18C20, 26E40, 54D45, 65G40}
author = {Bauer, Andrej and Taylor, Paul},
title = {The {D}edekind Reals in Abstract {S}tone Duality},
journal = {Mathematical Structures in Computer Science},
publisher = {Cambridge University Press},
year = 2009,
volume = 19,
pages = {757--838},
doi = {10.1017/S0960129509007695},
url = {https://paultaylor.eu/ASD/dedras/},
amsclass = {03F60, 06E15, 18C20, 26E40, 54D45, 65G40}
}

@online{BCDE21,
Expand Down Expand Up @@ -390,6 +410,15 @@ @article{Esc21b
url = {https://martinescardo.github.io/TypeTopology/InjectiveTypes.Article.html}
}

@book{Euler1748,
author = {Leonhard Euler},
title = {Introductio in analysin infinitorum},
year = {1748},
publisher = {Typographia Academiae Imperialis Petropolitanae},
url = {https://archive.org/details/introductioanaly00eule_0},
note = {Accessed: 2025-01-20}
}

@book{FBL73,
author = {Fraenkel, Abraham A. and Bar-Hillel, Yehoshua and Levy,
Azriel},
Expand All @@ -413,6 +442,28 @@ @online{Felixwellen/DCHoTT-Agda
howpublished = {{{GitHub}} repository}
}

@misc{Fibonacci1202,
author = {Fibonacci},
title = {Liber Abaci},
year = {1202},
note = {A scanned copy of Fibonacci's *Liber Abaci* is available through the Linda Hall Library Digital Collections.},
url = {https://old.maa.org/press/periodicals/convergence/mathematical-treasure-fibonacci-s-liber-abaci}
}

@book {Golan1999,
author = {Golan, Jonathan S.},
title = {Semirings and their applications},
publisher = {Kluwer Academic Publishers, Dordrecht},
year = {1999},
pages = {xii+381},
isbn = {0-7923-5786-8},
mrclass = {16Y60 (68Q01)},
mrnumber = {1746739},
mrreviewer = {Udo\ Hebisch},
doi = {10.1007/978-94-015-9333-5},
url = {https://doi.org/10.1007/978-94-015-9333-5},
}

@online{GGMS24,
title = {The {{Category}} of {{Iterative Sets}} in {{Homotopy Type Theory}} and {{Univalent Foundations}}},
author = {Gratzer, Daniel and Gylterud, Håkon and Mörtberg, Anders and Stenholm, Elisabeth},
Expand All @@ -427,6 +478,16 @@ @online{GGMS24
keywords = {Computer Science - Logic in Computer Science,Mathematics - Logic}
}

@book{HW08,
title = {{An Introduction to the Theory of Numbers (6th edition)}},
author = {Hardy, G. H. and Wright, Edward M. and Heath-Brown, D. R. and Silverman, Joseph H.},
isbn = {0199219869},
keywords = {congruences, primitive roots, residue systems, instructional exposition},
publisher = {Oxford University Press},
year = {2008},
abstract = {{The sixth edition of the classic undergraduate text in elementary number theory includes a new chapter on elliptic curves and their role in the proof of Fermat's Last Theorem, a foreword by Andrew Wiles and extensively revised and updated end-of-chapter notes.}},
}

@article{KECA17,
title = {{Notions of Anonymous Existence in {{Martin-L\"of}} Type Theory}},
author = {Nicolai Kraus and Martín Escardó and Thierry Coquand and Thorsten Altenkirch},
Expand Down Expand Up @@ -479,6 +540,41 @@ @misc{Lavenir23
primaryclass = {math.AT}
}

@book{Leibniz1693,
author = {Gottfried Wilhelm Leibniz},
title = {De geometria analysis},
year = {1693},
publisher = {Leibniz's own press, Vienna},
note = {This text is often cited as one of Leibniz's early works on calculus.}
}

@book{Leveque12volI,
title = {Topics in Number Theory, Volume I},
author = {LeVeque, W.J.},
isbn = {9780486152080},
series = {Dover Books on Mathematics},
year = {2012},
publisher = {Dover Publications}
}

@book{Leveque12volII,
title = {Topics in Number Theory, Volume II},
author = {LeVeque, W.J.},
isbn = {9780486152080},
series = {Dover Books on Mathematics},
year = {2012},
publisher = {Dover Publications}
}

@book{lucas1891,
title = {Théorie des Nombres},
author = {Lucas, Édouard},
year = {1891},
publisher = {Gauthier-Villars},
address = {Paris},
url = {https://archive.org/details/thoriedesnombr01lucauoft}
}

@incollection{Makkai98,
author = {Makkai, M.},
title = {Towards a categorical foundation of mathematics},
Expand Down Expand Up @@ -608,6 +704,32 @@ @misc{Mye21
primaryclass = {math.CT}
}

@article {NoronhaGalvao1978,
author = {{Noronha-Galv\~ao}, Maria Luísa},
title = {Ideals in the semiring {$N$}},
journal = {Portugal. Math.},
fjournal = {Portugaliae Mathematica},
volume = {37},
year = {1978},
number = {1-2},
pages = {113--117},
issn = {0032-5155,1662-2758},
mrclass = {16A78 (20M25)},
mrnumber = {620304},
}

@book {NZM,
author = {Niven, Ivan and Zuckerman, Herbert S. and Montgomery, Hugh L.},
title = {An introduction to the theory of numbers},
edition = {Fifth},
publisher = {John Wiley \& Sons, Inc., New York},
year = {1991},
pages = {xiv+529},
isbn = {0-471-62546-9},
mrclass = {11-01},
mrnumber = {1083765},
}

@online{oeis,
title = {The {{On-Line Encyclopedia}} of {{Integer Sequences}}},
author = {OEIS Foundation Inc.},
Expand All @@ -631,6 +753,15 @@ @phdthesis{Qui16
langid = {english}
}

@book{Recorde1557,
author = {Robert Recorde},
title = {The Whetstone of Witte},
year = {1557},
publisher = {Printed by John Daye, London},
note = {This work contains the first recorded use of the equals sign (=).},
url = {https://archive.org/embed/TheWhetstoneOfWitte}
}

@book{Rie17,
title = {Category {{Theory}} in {{Context}}},
author = {Riehl, Emily},
Expand Down Expand Up @@ -730,6 +861,18 @@ @article{RSS20
keywords = {Computer Science - Logic in Computer Science,F.3.1,F.3.1 F.4.1,F.4.1,Mathematics - Category Theory,Mathematics - Logic}
}

@article{Saidak2006,
author = {Saidak, Filip},
title = {A New Proof of Euclid's Theorem},
journal = {The American Mathematical Monthly},
volume = {113},
number = {10},
pages = {937--938},
year = {2006},
doi = {10.2307/27642094},
mrnumber = {2271540}
}

@online{Shu14SplittingIdempotents,
title = {Splitting {{Idempotents}}},
author = {Shulman, Mike},
Expand Down Expand Up @@ -938,3 +1081,14 @@ @online{Warn24
pubstate = {preprint},
keywords = {Mathematics - Algebraic Topology,Mathematics - Category Theory}
}

@book{Widmann1489,
author = {Johannes Widmann},
title = {Behende und hüpsche Rechenung auff allen Kauffmanschafft},
year = {1489},
publisher = {Conrad Kachelofen},
address = {Leipzig},
note = {First use of "+" and "−" symbols in printed mathematics},
language = {German},
url = {https://www.loc.gov/item/49038907}
}
33 changes: 31 additions & 2 deletions src/commutative-algebra/groups-of-units-commutative-rings.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ open import category-theory.functors-large-precategories

open import commutative-algebra.commutative-rings
open import commutative-algebra.homomorphisms-commutative-rings
open import commutative-algebra.invertible-elements-commutative-rings
open import commutative-algebra.precategory-of-commutative-rings

open import foundation.dependent-pair-types
Expand All @@ -35,8 +36,9 @@ open import ring-theory.groups-of-units-rings

## Idea

The **group of units** of a
[commutative ring](commutative-algebra.commutative-rings.md) `A` is the
The
{{#concept "group of units" Disambiguation="commutative ring" WD="unit" WDID=Q118084}}
of a [commutative ring](commutative-algebra.commutative-rings.md) `A` is the
[abelian group](group-theory.abelian-groups.md) consisting of all the
[invertible elements](commutative-algebra.invertible-elements-commutative-rings.md)
in `A`. Equivalently, the group of units of `A` is the
Expand Down Expand Up @@ -177,6 +179,14 @@ module _
inclusion-group-of-units-Commutative-Ring =
inclusion-group-of-units-Ring (ring-Commutative-Ring A)

is-invertible-element-inclusion-group-of-units-Commutative-Ring :
(x : type-group-of-units-Commutative-Ring) →
is-invertible-element-Commutative-Ring A
( inclusion-group-of-units-Commutative-Ring x)
is-invertible-element-inclusion-group-of-units-Commutative-Ring =
is-invertible-element-inclusion-group-of-units-Ring
( ring-Commutative-Ring A)

preserves-mul-inclusion-group-of-units-Commutative-Ring :
{x y : type-group-of-units-Commutative-Ring} →
inclusion-group-of-units-Commutative-Ring
Expand Down Expand Up @@ -324,3 +334,22 @@ preserves-id-functor-Large-Precategory
group-of-units-commutative-ring-functor-Large-Precategory {X = A} =
preserves-id-hom-group-of-units-hom-Commutative-Ring A
```

### Negatives of units

```agda
module _
{l : Level} (A : Commutative-Ring l)
where

neg-group-of-units-Commutative-Ring :
type-group-of-units-Commutative-Ring A →
type-group-of-units-Commutative-Ring A
neg-group-of-units-Commutative-Ring =
neg-group-of-units-Ring (ring-Commutative-Ring A)

neg-unit-group-of-units-Commutative-Ring :
type-group-of-units-Commutative-Ring A
neg-unit-group-of-units-Commutative-Ring =
neg-unit-group-of-units-Ring (ring-Commutative-Ring A)
```
Loading
Loading