Zulip Chat Archive

Stream: Is there code for X?

Topic: polynomial/finsupp to list


Eric Rodriguez (Feb 09 2022 at 01:11):

do we have the function that sends a poly/finsupp from ℕ (or whatever sort of condition you need on this type for this to work, Yaël will know) to the list [highest_deg_coeff, ..., lowest_deg_coeff]? I don't mind whether zero terms are included or excluded (as in the zeros in between, not the ones outside the range!)

Yaël Dillies (Feb 09 2022 at 01:20):

The condition for the domain is linear_order+ locally_listable_order (doesn't exist yet, I've been working on it for a while! but you can use locally_finite_order + some glue in the meantime). In the wild, it's satisfied by N\N, Z\Z, fin n (and some with_bot/with_top of those).

Yakov Pechersky (Feb 09 2022 at 01:51):

Why not "(list.range p.nat_degree).map (fun x, coeff x p)"?


Last updated: Dec 20 2023 at 11:08 UTC