The article touches on sigma notation and such. So, I would expect that is largely how they would treat it.
The pitfall you will run into quickly, is that we have very loose definitions between operations and functions. Is akin to wanting a sharp distinction between expressions and terms or statements. There are widely accepted distinctions that typically work, but this is largely convention based with no real intrinsic quality that defines them.
Sigma, capital pi and the definite integral are interesting.
What counts for arity of an operator? For sigma you have 4 things I would argue.
- the low and high limits of the index
- the name of the index variable in the expression you're summing
- the expression itself
The name of the index variable doesn't seem to me to be of the same kind as the others in that it's sort of a dummy argument but it's generally needed to make the syntax work[1].
[1] yeah I know people sometimes just write the limits above and below and rely on convention for people to know the name is n or i in the same way they do for the square bracket or big pipe notation (I don't know what that's called) you learn when you learn to take definite integrals.
varargs are a thing for a reason. Same with keyword arguments.
The elephant in this discussion remains the idea that operations are somehow different from functions. This is akin to asking what makes a datatype a primitive. There are some that are typically included in that list, but there is no real intrinsic quality of any data that makes it more so.
Well yes completely agree. In TFA the author makes some distinctions which seem to me to be more or less arbitrary along these lines. eg Python's "range(min, max,step)" is a ternary operator as far as the author is concerned but but regex substitution "s/pat/subst/flags" is a "datatype constructor" rather than an operator. Not sure why a constructor isn't an operator if range is an operator, especially as the python documentation describes range() as creating an immutable sequence type.
> class range(start, stop, step=1)
>
> Rather than being a function, range is actually an immutable sequence type, as documented in Ranges and Sequence Types — list, tuple, range.
From a maths perspective as far as I can see for most "normal maths" an operator is just something which does a mapping between the input domain(s) to the output domain(s) ie it's almost exactly a function. I think when you get to functional analysis there's a more concrete definition in terms of operator algebras but I haven't got there yet myself.
The pitfall you will run into quickly, is that we have very loose definitions between operations and functions. Is akin to wanting a sharp distinction between expressions and terms or statements. There are widely accepted distinctions that typically work, but this is largely convention based with no real intrinsic quality that defines them.