Commit 2024-04-15 14:21 28bea03d
View on Github →refactor(Rat): Streamline basic theory (#11504)
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
andRat.den
, and less on the structure representation ofRat
- Abandoning the vestigial
Rat.Nonneg
(which was replaced in Std by a new development of the order onRat
) - 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