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] - refactor: generalize CharP+Prime
to ExpChar
in frobenius
#10016
Conversation
CharP
to ExpChar
in frobenius
CharP + Prime
to ExpChar
in frobenius
CharP + Prime
to ExpChar
in frobenius
CharP+Prime
to ExpChar
in frobenius
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Maybe we should also replace the |
You should not need to fix any file if you only replace CharP+Prime by ExpChar; I added an instance so that any declaration about ExpChar will continue to apply for CharP+Prime. If you replace CharP without an associated Nat.Prime assumption by ExpChar, then the declaration will be less general and may not apply in certain situations, and you'll need to keep the original lemma, but may still add an ExpChar version (for example Every CharP is associated with a Nat.Prime assumption in FieldTheory/Perfect though. However, there are declarations in the file that are tricky to generalize: for example |
In the end, I went ahead to generalize the whole file FieldTheory/Perfect, because it makes it smoother merging this into #9311. |
5ce1c06
to
ba5de88
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🎉
bors merge
Consequently, the part about `frobenius` in Algebra/CharP/Basic is moved to CharP/ExpChar, and imports are adjusted as necessary. + Add instances from `CharP+Fact(Nat.Prime)` and `CharZero` to `ExpChar`, to allow lemmas generalized to ExpChar still apply to CharP. + Remove lemmas in Algebra/CharP/ExpChar from [#9799](1e74fcf) because they coincide with the generalized lemmas, and golf the other lemmas (in Algebra/CharP/Basic). + Define the RingHom `iterateFrobenius` and the semilinear map `LinearMap.(iterate)Frobenius` for an algebra. When the characteristic is zero (ExpChar is 1), these are all equal to the identity map (· ^ 1). Also define `iterateFrobeniusEquiv` for perfect rings. + Fix and/or generalize other files. Co-authored-by: Junyan Xu <junyanxu.math@gmail.com> Co-authored-by: acmepjz <acme_pjz@hotmail.com>
Pull request successfully merged into master. Build succeeded: |
CharP+Prime
to ExpChar
in frobenius
CharP+Prime
to ExpChar
in frobenius
Consequently, the part about `frobenius` in Algebra/CharP/Basic is moved to CharP/ExpChar, and imports are adjusted as necessary. + Add instances from `CharP+Fact(Nat.Prime)` and `CharZero` to `ExpChar`, to allow lemmas generalized to ExpChar still apply to CharP. + Remove lemmas in Algebra/CharP/ExpChar from [#9799](1e74fcf) because they coincide with the generalized lemmas, and golf the other lemmas (in Algebra/CharP/Basic). + Define the RingHom `iterateFrobenius` and the semilinear map `LinearMap.(iterate)Frobenius` for an algebra. When the characteristic is zero (ExpChar is 1), these are all equal to the identity map (· ^ 1). Also define `iterateFrobeniusEquiv` for perfect rings. + Fix and/or generalize other files. Co-authored-by: Junyan Xu <junyanxu.math@gmail.com> Co-authored-by: acmepjz <acme_pjz@hotmail.com>
Consequently, the part about
frobenius
in Algebra/CharP/Basic is moved to CharP/ExpChar, and imports are adjusted as necessary.Add instances from
CharP+Fact(Nat.Prime)
andCharZero
toExpChar
, to allow lemmas generalized to ExpChar still apply to CharP.Remove lemmas in Algebra/CharP/ExpChar from #9799 because they coincide with the generalized lemmas, and golf the other lemmas (in Algebra/CharP/Basic).
Define the RingHom
iterateFrobenius
and the semilinear mapLinearMap.(iterate)Frobenius
for an algebra. When the characteristic is zero (ExpChar is 1), these are all equal to the identity map (· ^ 1). Also defineiterateFrobeniusEquiv
for perfect rings.Fix and/or generalize other files.