-
Notifications
You must be signed in to change notification settings - Fork 71
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
Rational real numbers #1034
Rational real numbers #1034
Conversation
This PR introduces the cannonical map from `ℚ` to `ℝ` as well as a characterisation of its image in terms of Dedekind cuts. To do so, I had to introduce a few properties on (strict) inequalities on the rational numbers, integer fractions and integers. - modified: elementary-number-theory/addition-integers.lagda.md - the sum of a nonnegative and a positive integer is positive - new file: elementary-number-theory/cross-mul-diff-integer-fractions.lagda.md - define the cross-multiplication difference of two integer fractions - computing properties (useful to work with comparison of integer fractions) - modified: elementary-number-theory/inequality-integer-fractions.lagda.md - generic properties of the (strict) order on integer fractions (asymmetricity, transitivity, etc.) - helper functions to construct inequal fractions - modified: elementary-number-theory/inequality-integers.lagda.md - fix the definition of `le-ℤ` - generic properties of `le-ℤ` - preservation/reflection properties of `le-ℤ` w.r.t `add-ℤ` - modified: elementary-number-theory/inequality-rational-numbers.lagda.md - generic properties of the (strict) order on rational numbers - compatibility between the orderings on integer fractions and rational numbers - no lower/upper bounds, decidability, trichotomy principle - density and of strict inequality on rational numbers - modified: elementary-number-theory/integers.lagda.md - decide positivity of integers - new file: elementary-number-theory/mediant-integer-fractions.lagda.md - define the mediant of two integer fractions - the mediant preserves cross-multiplication difference - modified: elementary-number-theory/multiplication-integers.lagda.md - multiplication by a positive integer preserves strict ordering - modified: elementary-number-theory/rational-numbers.lagda.md - accessor functions for rational numbers - define the mediant of two rational numbers - modified: real-numbers/dedekind-real-numbers.lagda.md - contructor and accessor functions for real numbers - properties of Dedekind cuts - real numbers are determined by their lower/upper cuts - new file: real-numbers/rational-real-numbers.lagda.md - define the Dedekind cut given by a rational number - define the subtype of rational real numbers - `ℚ` embeds in `ℝ` as the subtype of rational real numbers
Hey, @malarbol! Welcome back, and thank you for submitting the pull request. As you can see, our conventions have changed quite a bit since your last contribution. 😅 You will probably get a review from us by this time tomorrow, so just hang tight in the meanwhile. |
Hi @fredrik-bakke! Thank you for considering it 😊! I hope it's ok to submit a PR like this without warning. if it's not in the guidelines / conventions of the library, I understand. |
No no, any submission is great! It was only a light-hearted remark :) |
src/elementary-number-theory/cross-mul-diff-integer-fractions.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/cross-mul-diff-integer-fractions.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/cross-mul-diff-integer-fractions.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/cross-mul-diff-integer-fractions.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/cross-mul-diff-integer-fractions.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/cross-mul-diff-integer-fractions.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/inequality-rational-numbers.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/mediant-integer-fractions.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/inequality-rational-numbers.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/inequality-rational-numbers.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/inequality-rational-numbers.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/inequality-rational-numbers.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/inequality-rational-numbers.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/inequality-rational-numbers.lagda.md
Outdated
Show resolved
Hide resolved
…lagda.md Co-authored-by: Egbert Rijke <[email protected]>
src/elementary-number-theory/inequality-rational-numbers.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/mediant-integer-fractions.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/mediant-integer-fractions.lagda.md
Outdated
Show resolved
Hide resolved
src/elementary-number-theory/mediant-integer-fractions.lagda.md
Outdated
Show resolved
Hide resolved
Apologies for having even more nitpick. Your PR is already really good, and it is immediately ready to be merged after my last comments have been resolved. Thank you so much again for your patience! |
By the way, we have a file where we record names of contributors. Currently, you're displayed as "malarbol", which is your GitHub display name. There is no pressure, but if you want to go by your given name, you can edit your display name in our file |
I recorded an issue (#1043) about refactoring elementary number theory with what I could think of on the top of my head now. Feel free to have a look and comment about additional issues you find/have found there :) |
Co-authored-by: Fredrik Bakke <[email protected]>
Co-authored-by: Fredrik Bakke <[email protected]>
Co-authored-by: Fredrik Bakke <[email protected]>
Co-authored-by: Fredrik Bakke <[email protected]>
Co-authored-by: Fredrik Bakke <[email protected]>
Co-authored-by: Fredrik Bakke <[email protected]>
Co-authored-by: Fredrik Bakke <[email protected]>
Co-authored-by: Fredrik Bakke <[email protected]>
Co-authored-by: Fredrik Bakke <[email protected]>
Co-authored-by: Fredrik Bakke <[email protected]>
Co-authored-by: Fredrik Bakke <[email protected]>
Oh! on the contrary, think you for your patience ; I'm really sorry for all the indentation/parenthesis/etc. problems. I think I understand a bit better now, my next PR will be a lot cleaner, don't worry.
I think I'll keep malarbol for the moment if you don't mind; I might add myself later, when I feel more confident or something.
Cool! I do have a few ideas / comments / doubts so I'll definitely get in touch with you there to talk about it. There are still two points to discuss before merging, the Thank you again, for all, and see you for issue (#1043). |
Awesome! Thank you so much once again. Talk to you again soon :) |
This PR introduces the cannonical map from
ℚ
toℝ
as well as a characterisation of its image in terms of Dedekind cuts.To do so, I had to introduce a few properties on (strict) inequalities on the rational numbers, integer fractions and integers.
modified: elementary-number-theory/addition-integers.lagda.md
new file: elementary-number-theory/cross-mul-diff-integer-fractions.lagda.md
modified: elementary-number-theory/inequality-integer-fractions.lagda.md
(asymmetricity, transitivity, etc.)
modified: elementary-number-theory/inequality-integers.lagda.md
le-ℤ
le-ℤ
le-ℤ
w.r.tadd-ℤ
modified: elementary-number-theory/inequality-rational-numbers.lagda.md
rational numbers
modified: elementary-number-theory/integers.lagda.md
new file: elementary-number-theory/mediant-integer-fractions.lagda.md
modified: elementary-number-theory/multiplication-integers.lagda.md
modified: elementary-number-theory/rational-numbers.lagda.md
modified: real-numbers/dedekind-real-numbers.lagda.md
new file: real-numbers/rational-real-numbers.lagda.md
ℚ
embeds inℝ
as the subtype of rational real numbers