How to denote the size of a list?

3.4k Views Asked by At

Suppose I have a list (not a set) with entries $[x, x, x, y, z]$. Then the list is size of $5$.

What is the mathematical function that returns the number of elements?

Does cardinality only work on sets?

1

There are 1 best solutions below

0
On BEST ANSWER

We usually write ordered lists with parentheses, e.g. $(x,x,x,y,z)$. It would be entirely clear what you mean if you said $|(x,x,x,y,z)|=5$, though if you were trying to be excruciatingly pedantic, you might want to introduce a length function $\mathrm{len}((x,x,x,y,z))$ = 5.