Zulip Chat Archive
Stream: general
Topic: coe_fn
Yury G. Kudryashov (Jun 09 2020 at 09:14):
Making polynomial.C a bundled homomorphism had almost no side effects, thanks a lot @Gabriel Ebner !
The old code (or a substitution code I tried) failed in a few places:
- one can't write
C_neg [comm_ring α] (a : α) : C (-a) = -C a := C.map_neg abecause by the time Lean parsesC.map_negit doesn't know yet that the base type is aring, not only asemiring. Both(C : α →ₐ[α] _).map_neg aandalg_hom.map_neg _ awork. Similarly for other dot notation. congrfailed to go fromC a = 1toa = 1. I think thatconvert C_1better describes what we want Lean to do.C 1is apolynomial nat, notpolynomial ?m_1.
Johan Commelin (Jun 09 2020 at 09:17):
This is nice.
Johan Commelin (Jun 09 2020 at 09:18):
On the witt-vectors2 branch, I also worked a lot with C_hom, map_hom, rename_hom, and eval2_hom, all for mv_polynomial. It seems to work really well.
Johan Commelin (Jun 09 2020 at 09:18):
But I didn't yet integrate it into the library.
Last updated: May 02 2025 at 03:31 UTC