-
Notifications
You must be signed in to change notification settings - Fork 74
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
Refactor elementary number theory #1211
base: master
Are you sure you want to change the base?
Conversation
Cool! I'll wait to submit the 100-theorems list to Freek until after this PR is merged :) #1203 |
Are you still planning to formalize the irrationality of 2 as part of this PR? |
Yes, definitely. I want to do it well, improving the infrastructure for divisibility of integers and setting up infrastructure for parity of integers. My changes to the divisibility of natural numbers led me to refactor a bunch of definitions depending on it, but at the end of this formalization in elementary number theory should feel a lot less ad-hoc. |
That's very nice. This namespace is well-deserving of some love and attention! |
I'm teaching a course on elementary number theory this semester, and I want to formalize some of it as I go. |
The biggest changes come from a change in the definition of the quotient of a divisible natural number. The updated definition defines the quotient of
n
byd
, provided thatd | n
is the unique natural numberq ≤ n
such thatq * d = n
. This change prevents some case analyses around the situation where the Curry-Howard interpretation of divisibility is not a proposition. An alternative definition of divisibility is also given: bounded divisibility. This is always a proposition. The poset of the natural numbers by divisibility is updated to use bounded divisibility in favor of propositional truncation.The change in the definition of the quotient by divisibility triggered changes in the fundamental theorem of arithmetic, which is thoroughly revised after discovering that the strong induction that we previously used was unnecessarily complicated.
New files include: