Zulip Chat Archive

Stream: mathlib4

Topic: HahnSeries.orderTop


Violeta Hernández (Aug 28 2025 at 08:37):

Can anyone guess what docs#HahnSeries.orderTop is (or what its output type is) without looking?

Violeta Hernández (Aug 28 2025 at 08:38):

I hope it's not controversial to suggest this should be renamed to degree instead.

Violeta Hernández (Aug 28 2025 at 08:41):

Ohh wait, I just noticed. It's called orderTop not because of docs#OrderTop but rather because it's a version of docs#HahnSeries.order with a top.

Yaël Dillies (Aug 28 2025 at 08:42):

Yes, the name is very weird. And no it's not the degree either!

Yaël Dillies (Aug 28 2025 at 08:42):

I would rather have order/finOrder rather than orderTop/order

Violeta Hernández (Aug 28 2025 at 08:43):

I like that suggestion

Violeta Hernández (Aug 28 2025 at 08:43):

@Weiyi Wang since I think he's the Hahn series guy

Yakov Pechersky (Aug 28 2025 at 10:22):

"trailingDegree". But also, order makes sense from the valuation point of view.

Weiyi Wang (Aug 28 2025 at 11:40):

Renaming HahnSeries.orderTop to HahnSeries.order would make it more consistent with PowerSeries.order

Yakov Pechersky (Aug 28 2025 at 13:02):

And existing order can be natOrder a la natDegree

Weiyi Wang (Aug 28 2025 at 13:32):

But HahnSeries' order is not necessarily a Nat. It is any PartialOrder type

Yakov Pechersky (Aug 28 2025 at 13:45):

Do we need the not top version? Can users rely on untop instead?

Yaël Dillies (Aug 28 2025 at 14:51):

The not-top version is useful just as docs#Polynomial.natDegree is useful: Sometimes you want to use it as an exponent, and junk values align to make unified statements including the zero polynomial

Scott Carnahan (Aug 28 2025 at 16:48):

Sorry about the orderTop name. HahnSeries.order had been around for years by the time I found that I needed a version that didn’t assume the presence of a Zero. Yaël’s suggestion of order/finOrder seems good to me.


Last updated: Dec 20 2025 at 21:32 UTC