[Merged by Bors] - refactor(Rat): Streamline basic theory#11504
Closed
YaelDillies wants to merge 33 commits intomasterfrom
Closed
[Merged by Bors] - refactor(Rat): Streamline basic theory#11504YaelDillies wants to merge 33 commits intomasterfrom
YaelDillies wants to merge 33 commits intomasterfrom
Conversation
These lemmas are needed to define the semifield structure on `NNRat`, hence I am repurposing `Algebra.Order.Field.Defs` from avoiding a timeout (which I believe was solved long ago) to avoiding to import random stuff in the definition of the semifield structure on `NNRat` (although this PR doesn't actually reduce imports there, it will be in a later PR). Reduce the diff of #11203
`Rat` has a long history in (and before) mathlib and as such its development is full of cruft. Now that `NNRat` is a thing, there is a need for the theory of `Rat` to be mimickable to yield the theory of `NNRat`, which is not currently the case. Broadly, this PR aims at mirroring the `Rat` and `NNRat` declarations. It achieves this by: * Relying more on `Rat.num` and `Rat.den`, and less on the structure representation of `Rat` * Abandoning the vestigial `Rat.Nonneg` (which was replaced in Std by a new development of the order on `Rat`) * Renaming many `Rat` lemmas with dubious names. This creates quite a lot of conflicts with Std lemmas, whose names are themselves dubious. I am priming the relevant new mathlib names and leaving TODOs to fix the Std names. * Handling most of the `Rat` porting notes
12 tasks
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
These lemmas can be defined earlier, ridding us of an import in `Algebra.GroupPower.Order`
|
This PR/issue depends on: |
jcommelin
approved these changes
Apr 15, 2024
Mathlib/Data/Rat/Init.lean
Outdated
|
|
||
| /-! | ||
| # Notation for the rational numbers -/ | ||
| # Definition of the rational numbers |
Member
There was a problem hiding this comment.
Well... It's not really defined in this file...
Is this title strictly better than the old one?
Contributor
|
✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with |
Contributor
Author
|
bors merge |
mathlib-bors bot
pushed a commit
that referenced
this pull request
Apr 15, 2024
`Rat` has a long history in (and before) mathlib and as such its development is full of cruft. Now that `NNRat` is a thing, there is a need for the theory of `Rat` to be mimickable to yield the theory of `NNRat`, which is not currently the case. Broadly, this PR aims at mirroring the `Rat` and `NNRat` declarations. It achieves this by: * Relying more on `Rat.num` and `Rat.den`, and less on the structure representation of `Rat` * Abandoning the vestigial `Rat.Nonneg` (which was replaced in Std by a new development of the order on `Rat`) * Renaming many `Rat` lemmas with dubious names. This creates quite a lot of conflicts with Std lemmas, whose names are themselves dubious. I am priming the relevant new mathlib names and leaving TODOs to fix the Std names. * Handling most of the `Rat` porting notes Reduce the diff of #11203
Contributor
|
Pull request successfully merged into master. Build succeeded: |
atarnoam
pushed a commit
that referenced
this pull request
Apr 16, 2024
`Rat` has a long history in (and before) mathlib and as such its development is full of cruft. Now that `NNRat` is a thing, there is a need for the theory of `Rat` to be mimickable to yield the theory of `NNRat`, which is not currently the case. Broadly, this PR aims at mirroring the `Rat` and `NNRat` declarations. It achieves this by: * Relying more on `Rat.num` and `Rat.den`, and less on the structure representation of `Rat` * Abandoning the vestigial `Rat.Nonneg` (which was replaced in Std by a new development of the order on `Rat`) * Renaming many `Rat` lemmas with dubious names. This creates quite a lot of conflicts with Std lemmas, whose names are themselves dubious. I am priming the relevant new mathlib names and leaving TODOs to fix the Std names. * Handling most of the `Rat` porting notes Reduce the diff of #11203
uniwuni
pushed a commit
that referenced
this pull request
Apr 19, 2024
`Rat` has a long history in (and before) mathlib and as such its development is full of cruft. Now that `NNRat` is a thing, there is a need for the theory of `Rat` to be mimickable to yield the theory of `NNRat`, which is not currently the case. Broadly, this PR aims at mirroring the `Rat` and `NNRat` declarations. It achieves this by: * Relying more on `Rat.num` and `Rat.den`, and less on the structure representation of `Rat` * Abandoning the vestigial `Rat.Nonneg` (which was replaced in Std by a new development of the order on `Rat`) * Renaming many `Rat` lemmas with dubious names. This creates quite a lot of conflicts with Std lemmas, whose names are themselves dubious. I am priming the relevant new mathlib names and leaving TODOs to fix the Std names. * Handling most of the `Rat` porting notes Reduce the diff of #11203
callesonne
pushed a commit
that referenced
this pull request
Apr 22, 2024
`Rat` has a long history in (and before) mathlib and as such its development is full of cruft. Now that `NNRat` is a thing, there is a need for the theory of `Rat` to be mimickable to yield the theory of `NNRat`, which is not currently the case. Broadly, this PR aims at mirroring the `Rat` and `NNRat` declarations. It achieves this by: * Relying more on `Rat.num` and `Rat.den`, and less on the structure representation of `Rat` * Abandoning the vestigial `Rat.Nonneg` (which was replaced in Std by a new development of the order on `Rat`) * Renaming many `Rat` lemmas with dubious names. This creates quite a lot of conflicts with Std lemmas, whose names are themselves dubious. I am priming the relevant new mathlib names and leaving TODOs to fix the Std names. * Handling most of the `Rat` porting notes Reduce the diff of #11203
Jun2M
pushed a commit
that referenced
this pull request
Apr 24, 2024
`Rat` has a long history in (and before) mathlib and as such its development is full of cruft. Now that `NNRat` is a thing, there is a need for the theory of `Rat` to be mimickable to yield the theory of `NNRat`, which is not currently the case. Broadly, this PR aims at mirroring the `Rat` and `NNRat` declarations. It achieves this by: * Relying more on `Rat.num` and `Rat.den`, and less on the structure representation of `Rat` * Abandoning the vestigial `Rat.Nonneg` (which was replaced in Std by a new development of the order on `Rat`) * Renaming many `Rat` lemmas with dubious names. This creates quite a lot of conflicts with Std lemmas, whose names are themselves dubious. I am priming the relevant new mathlib names and leaving TODOs to fix the Std names. * Handling most of the `Rat` porting notes Reduce the diff of #11203
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rathas a long history in (and before) mathlib and as such its development is full of cruft. Now thatNNRatis a thing, there is a need for the theory ofRatto be mimickable to yield the theory ofNNRat, which is not currently the case.Broadly, this PR aims at mirroring the
RatandNNRatdeclarations. It achieves this by:Rat.numandRat.den, and less on the structure representation ofRatRat.Nonneg(which was replaced in Std by a new development of the order onRat)Ratlemmas with dubious names. This creates quite a lot of conflicts with Std lemmas, whose names are themselves dubious. I am priming the relevant new mathlib names and leaving TODOs to fix the Std names.Ratporting notesReduce the diff of #11203
Nat.xor_comm#11506