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] - feat(data/equiv): define ring_equiv_class
#11977
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.
Thanks!
ext, | ||
exact congr_fun w a, | ||
end | ||
fun_like.coe_injective | ||
|
||
instance has_coe_to_ring_equiv : has_coe (A₁ ≃ₐ[R] A₂) (A₁ ≃+* A₂) := ⟨alg_equiv.to_ring_equiv⟩ |
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.
You can get rid of this one by adding the has_coe_t F (A₁ ≃+* A₂)
instance from ring_equiv_class
.
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.
I'd prefer to do so in a separate PR, since reviewing/debugging coercions is quite a bit harder than reviewing the new class.
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
@@ -382,7 +382,7 @@ begin | |||
(mv_polynomial.map_surjective f.to_ring_hom hf_surj).comp (alg_equiv.surjective _), | |||
ideal.fg_ker_comp _ _ _ _ (alg_equiv.surjective _)⟩, | |||
{ convert submodule.fg_bot, | |||
exact ring_hom.ker_coe_equiv _, }, | |||
exact ring_hom.ker_coe_equiv (mv_polynomial.sum_alg_equiv R ι ι').to_ring_equiv }, |
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.
The unifier had issues here because the goal contained (coe : alg_hom → ring_hom) sum_alg_equiv.to_alg_hom
which had to be unified with (coe : ring_equiv → ring_hom) sum_alg_equiv.to_ring_equiv
. Apparently the new generic coercion to ring_hom
deriving from ring_equiv.ring_hom_class
makes this unification slightly too hard without this hint.
In any case, we should be able to fix the requirement for unification entirely by generalizing ker
to a ring_hom_class
.
Thanks! |
This PR applies the morphism class pattern to `ring_equiv`, producing a new `ring_equiv_class` extending `mul_equiv_class` and `add_equiv_class`. It also provides a `ring_equiv_class` instance for `alg_equiv`s. Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
Pull request successfully merged into master. Build succeeded: |
ring_equiv_class
ring_equiv_class
This PR applies the morphism class pattern to
ring_equiv
, producing a newring_equiv_class
extendingmul_equiv_class
andadd_equiv_class
. It also provides aring_equiv_class
instance foralg_equiv
s.