-
Notifications
You must be signed in to change notification settings - Fork 297
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(ring_theory/perfection): remove coercion in the definition of the type #7583
Conversation
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.
bors d+
Up to you if you want to wait for a comment from Kenny
✌️ sgouezel can now approve this pull request. To approve and merge a pull request, simply reply with |
/-- The perfection of a ring `R` with characteristic `p`, as a subring, | ||
defined to be the projective limit of `R` using the Frobenius maps `R → R` | ||
indexed by the natural numbers, implemented as `{ f : ℕ → R | ∀ n, f (n + 1) ^ p = f n }`. -/ | ||
def ring.perfection_subring (R : Type u₁) [comm_ring R] | ||
(p : ℕ) [hp : fact p.prime] [char_p R p] : | ||
subring (ℕ → R) := | ||
(ring.perfection_subsemiring R p).to_subring $ λ n, by simp_rw [← frobenius_def, pi.neg_apply, | ||
pi.one_apply, ring_hom.map_neg, ring_hom.map_one] |
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.
Note that we actually had this definition before (https://github.com/leanprover-community/mathlib/pull/5386/files#r544380327) and with a shorter proof too; but it was deemed not useful and inlined into the two places that used it.
bors r+ |
…f the type (#7583) Defining the type `ring.perfection R p` as a plain subtype (but inheriting the semiring or ring instances from a `subsemiring` structure) removes several coercions and helps Lean a lot when elaborating or unifying.
Pull request successfully merged into master. Build succeeded: |
Defining the type
ring.perfection R p
as a plain subtype (but inheriting the semiring or ring instances from asubsemiring
structure) removes several coercions and helps Lean a lot when elaborating or unifying.