Zulip Chat Archive

Stream: Is there code for X?

Topic: Name for iterated product


Thomas Browning (May 20 2025 at 21:00):

Does mathlib have a definition of the form

def iteratedProduct (α : Type u) : (n : )  Type u
  | 0 => PUnit
  | n + 1 => iteratedProduct α n × α

or is there nothing closer than Fin n → α?

Aaron Liu (May 20 2025 at 21:01):

I suppose Nat.below is something similar, but that's more of an implementation detail for structural recursion, not like an actual definition

Sébastien Gouëzel (May 21 2025 at 06:55):

docs#List.TProd (but normallywe try to avoid it unless there's a compelling reason)


Last updated: Dec 20 2025 at 21:32 UTC