Repository navigation
Conversation
PR summary 28e36eb24dImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
| Current number | Change | Type (strong) |
|---|---|---|
| 485 | 2 | erw |
| 35 | -1 | disabled simpNF lints |
Current commit 28e36eb24d
Reference commit aa5dbf3cb5
This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py 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).
themathqueen
left a comment
There was a problem hiding this comment.
I'll have more comments, but for now the main question is whether we should wait to remove the coercion in a later PR?
|
When I started working on this PR I was replacing the use of the So instead I manually inserted |
|
Basically what Moritz wrote in the PR description. |
|
This pull request has conflicts, please merge |
|
This pull request has conflicts, please merge |
| theorem Submodule.IsPrincipal.map_ringHom (f : R →+* S) {I : Ideal R} | ||
| (hI : IsPrincipal I) : IsPrincipal (Ideal.map f I) := | ||
| ⟨⟨f (IsPrincipal.generator I), by | ||
| rw [Ideal.submodule_span_eq, ← Set.image_singleton, ← Ideal.map_span, | ||
| Ideal.span_singleton_generator]⟩⟩ | ||
|
|
||
| theorem Ideal.IsPrincipal.of_comap (f : F) (hf : Function.Surjective f) (I : Ideal S) | ||
| theorem Ideal.IsPrincipal.of_comap (f : R →+* S) (hf : Function.Surjective f) (I : Ideal S) | ||
| [hI : IsPrincipal (I.comap f)] : IsPrincipal I := by | ||
| rw [← map_comap_of_surjective f hf I] | ||
| exact hI.map_ringHom f | ||
|
|
||
| /-- The surjective image of a principal ideal ring is again a principal ideal ring. -/ | ||
| theorem IsPrincipalIdealRing.of_surjective [IsPrincipalIdealRing R] (f : F) | ||
| theorem IsPrincipalIdealRing.of_surjective [IsPrincipalIdealRing R] (f : R →+* S) |
There was a problem hiding this comment.
Maybe we should keep using the class here?
j-loreaux
left a comment
There was a problem hiding this comment.
I'm fine with the one step backward in order to make forward progress. However, I think the biggest issue is that we should use the type ascription everywhere (I've tried to mark most places) so that these get changed automatically when we switch the coercion over. However, if you want to exclude that if it appears in a proof, that's fine, but I think we should at least fix the places where we have RingHomClass.toRingHom in statements.
But overall I think this a major step in the right direction.
| @[simp] | ||
| theorem coe_toRingHom (f : R ≃+* S) : ⇑f.toRingHom = f := |
There was a problem hiding this comment.
Although this is what we want long term, I wonder if the fact that you changed the statement (without keeping the old version too, also marked @[simp]) is part of what caused some headaches in this PR.
There was a problem hiding this comment.
I think whatever we do we will have headaches. I did change my approach to changing these things a few times and I am not claiming I did things the most optimal way, but I am not sure whether that actually matters.
| def SplittingField (f : K[X]) := | ||
| MvPolynomial (SplittingFieldAux f.natDegree f) K ⧸ | ||
| RingHom.ker (MvPolynomial.aeval (R := K) id).toRingHom | ||
| RingHom.ker (RingHomClass.toRingHom <| MvPolynomial.aeval (R := K) id) |
There was a problem hiding this comment.
Let's write this with a type ascription so that when we change the coercion, this gets changed/flagged automatically.
|
Should |
|
I am not sure either, but my thought was that we generally simplify to bare functions, so if you have a lemma that takes |
|
After fixing the issues that Monica pointed out, I think I now understand a little bit better why |
The definitions
RingHom.kerandIdeal.comapnow take aRingHomand not an arbitrary type of classRingHomClass.Ideal.maptakes a plain function.We use the "wrong coercion"
RingHom.ofClassinstead ofAlgHom.toRingHom, because otherwise there are tons of coercion problems. Moving everything to usingAlgHom.toRingHomwill be a subsequent PR.Tech debt increase: We use
erwin 3 places since the is a mix ofAlgHom.toRingHomandRingHomClass.toRingHomthat should be untangled when removing the coercion from the later.