-
Notifications
You must be signed in to change notification settings - Fork 1k
[Merged by Bors] - chore(Algebra/Ring): shortcut IsDomain instances for Nat and Int
#30713
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
[Merged by Bors] - chore(Algebra/Ring): shortcut IsDomain instances for Nat and Int
#30713
Conversation
These instances are currently inferred from the `IsStrictOrderedRing` ones (see code snippet), but in leanprover-community#30563 I need these instances earlier than the `IsStrictOrderedRing` ones. ``` import Mathlib #synth IsDomain ℕ -- IsStrictOrderedRing.isDomain #synth IsDomain ℤ -- IsStrictOrderedRing.isDomain ```
PR summary 0d837987e5Import changes exceeding 2%
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Algebra.Ring.Nat | 135 | 155 | +20 (+14.81%) |
| Mathlib.Algebra.Ring.Int.Defs | 165 | 178 | +13 (+7.88%) |
Import changes for all files
| Files | Import difference |
|---|---|
8 filesMathlib.Algebra.CharZero.AddMonoidHom Mathlib.Algebra.Group.NatPowAssoc Mathlib.Algebra.Order.Ring.Unbundled.Rat Mathlib.Data.FP.Basic Mathlib.Data.Int.Bitwise Mathlib.Data.Int.ConditionallyCompleteOrder Mathlib.Data.Int.LeastGreatest Mathlib.Data.Nat.Cast.Basic |
1 |
Mathlib.Algebra.Ring.Int.Units |
8 |
Mathlib.Data.Int.NatAbs |
11 |
Mathlib.Algebra.Homology.Embedding.Basic |
12 |
Mathlib.Algebra.Ring.Int.Defs Mathlib.Data.Int.Cast.Field |
13 |
Mathlib.Algebra.Ring.Nat |
20 |
Declarations diff
++ instIsDomain
You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>The doc-module for script/declarations_diff.sh contains some details about this script.
No changes to technical debt.
You can run this locally as
./scripts/technical-debt-metrics.sh pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
|
This is causing quite an import increase in rather low-level files. Is there a different reorganization that makes sense? Possibly even a new file? |
|
Only 5 files see a significant import increase. Do you not think that's fine? I personally think it makes a lot of sense that |
|
Yeah, let's go. bors merge |
#30713) These instances are currently inferred from the `IsStrictOrderedRing` ones (see code snippet), but in #30563 I need these instances earlier than the `IsStrictOrderedRing` ones. ``` import Mathlib #synth IsDomain ℕ -- IsStrictOrderedRing.isDomain #synth IsDomain ℤ -- IsStrictOrderedRing.isDomain ```
|
Pull request successfully merged into master. Build succeeded: |
IsDomain instances for Nat and IntIsDomain instances for Nat and Int
leanprover-community#30713) These instances are currently inferred from the `IsStrictOrderedRing` ones (see code snippet), but in leanprover-community#30563 I need these instances earlier than the `IsStrictOrderedRing` ones. ``` import Mathlib #synth IsDomain ℕ -- IsStrictOrderedRing.isDomain #synth IsDomain ℤ -- IsStrictOrderedRing.isDomain ```
leanprover-community#30713) These instances are currently inferred from the `IsStrictOrderedRing` ones (see code snippet), but in leanprover-community#30563 I need these instances earlier than the `IsStrictOrderedRing` ones. ``` import Mathlib #synth IsDomain ℕ -- IsStrictOrderedRing.isDomain #synth IsDomain ℤ -- IsStrictOrderedRing.isDomain ```
These instances are currently inferred from the
IsStrictOrderedRingones (see code snippet), but in #30563 I need these instances earlier than theIsStrictOrderedRingones.