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 a
because by the time Lean parsesC.map_neg
it doesn't know yet that the base type is aring
, not only asemiring
. Both(C : α →ₐ[α] _).map_neg a
andalg_hom.map_neg _ a
work. Similarly for other dot notation. congr
failed to go fromC a = 1
toa = 1
. I think thatconvert C_1
better describes what we want Lean to do.C 1
is 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: Dec 20 2023 at 11:08 UTC