Zulip Chat Archive

Stream: general

Topic: ring_hom.of


Jeremy Avigad (Sep 11 2021 at 19:21):

Whatever happened to ring_hom.of? It used to upgrade a function to a ring_hom.

Kevin Buzzard (Sep 11 2021 at 19:23):

Did it want an is_ring_hom instance? Those got nuked

Jeremy Avigad (Sep 11 2021 at 19:24):

Ah. I have eval z : polynomial R -> R. How do I turn it into a ring homomorphism?

Chris Hughes (Sep 11 2021 at 19:27):

https://leanprover-community.github.io/mathlib_docs/data/polynomial/eval.html#polynomial.eval_ring_hom I think since some changes to the elaborator, we should just make eval a bundled ring hom.

Yury G. Kudryashov (Sep 11 2021 at 23:29):

@Chris Hughes Last time I tried to turn polynomial.eval into a bundled hom, I got bored by turning all p.eval x to eval x p.

Yury G. Kudryashov (Sep 11 2021 at 23:30):

Dot notation doesn't work well with this kind of bundled homs.

Kevin Buzzard (Sep 11 2021 at 23:30):

Will this be any different in Lean 4?

Kevin Buzzard (Sep 11 2021 at 23:31):

It seems to me that stuff like eval should be "maximally bundled" so the user can forget things later on if they want, rather than having to build up from a bare function.

Yakov Pechersky (Sep 12 2021 at 00:09):

For eval it might be easy. For things like det it is harder because the proofs about the monoid_homness aren't trivial.


Last updated: Dec 20 2023 at 11:08 UTC