Repository navigation
Conversation
PR summary 316a0377d0Import changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diff
You can run this locally as follows## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>The doc-module for No changes to technical debt.You can run this locally as
|
|
!bench |
|
Benchmark results for 6d1376f against e06b88a are in. There are no significant changes. @JovanGerb
Small changes (1✅)
|
Vierkantor
left a comment
There was a problem hiding this comment.
Please note that the instance still appears in the module doc (instOfIsDomainOfFiniteInt).
Since this file is quite new, I don't think we should delete the instance just because no merged code uses is. @xroblot, could you indicate what you need it for?
| exact inferInstanceAs <| Finite (ℤ ⧸ Ideal.span {n}) | ||
|
|
||
| /-- A domain that is also a finite `ℤ`-module has finite quotients. -/ | ||
| instance [IsDomain R] [Module.Finite ℤ R] : HasFiniteQuotients R := |
There was a problem hiding this comment.
Module.Finite ℤ R is just AddGroup.FG, no? So I agree that this instance is a bit weird and might need to be restated.
|
One of the main use cases for the import Mathlib.RingTheory.Ideal.Quotient.HasFiniteQuotients
import Mathlib.NumberTheory.NumberField.Basic
open NumberField
variable {K : Type*} [Field K] [NumberField K]
#synth Ring.HasFiniteQuotients (𝓞 K)It is quite possible that this instance is not optimally stated. Also, if it causes a slowdown, it should be refactored or turned into a theorem, and then I can just add |
|
I suspected that it had to do with rings of integers :) What do you think about the following approach: check if replacing |
|
Sure. That's a nice solution. Then, we just need to add an instance, say: instance : AddGroup.FG (𝓞 K) := Finite.iff_addGroup_fg.mp <| IsNoetherian.finite ℤ (𝓞 K)somewhere in |
|
(I sent the other PR to bors before I noticed this conversation) A little test shows that trying to synthesize |
|
Oh and the measured performance improvement is small enough that it may well be noise. I guess that this is too niche of an instance to have a significant global performance effect. |
HasFiniteQuotients instance
|
bors r+ |
|
🔒 Permission denied Existing reviewers: click here to make JovanGerb a reviewer |
|
Pull request successfully merged into master. Build succeeded:
|
HasFiniteQuotients instanceHasFiniteQuotients instance
…ing of integers (#36899) This PR adds the instance `AddGroup.FG` for the ring of integers of a number field. This is a companion to #36535, which changed the `HasFiniteQuotients` instance for domains to use `AddGroup.FG` rather than `Module.Finite ℤ`. With this PR, `HasFiniteQuotients (𝓞 K)` can again be synthesized automatically for a number field `K`.
…ing of integers (leanprover-community#36899) This PR adds the instance `AddGroup.FG` for the ring of integers of a number field. This is a companion to leanprover-community#36535, which changed the `HasFiniteQuotients` instance for domains to use `AddGroup.FG` rather than `Module.Finite ℤ`. With this PR, `HasFiniteQuotients (𝓞 K)` can again be synthesized automatically for a number field `K`.
This instance was removed in #36395 for performance reasons. This PR restores the instance in a form that is more performant.