I'm at chapter 7 of the book, in which Tao introduces the notion of series, I'll introduce 2 definitions below (as context) before getting to the problem.
First, Tao defines a finite series on a sequence as follows: (See [1] in the attached image)
And then he defines summations on a finite set X and a function f: X -> R as such: (See [2] in the attached image)
[It's also proven later that this definition is well-defined and gives off the same value for every bijective g]
So far so good, the problem is that on a lemma, he claims the following: (See [3] in the attached image)
I get the maths Tao is trying to convey, but shouldn't the left hand side of the equation be syntactically invalid? Regarding the inner sum, y in Y isn't a valid input for the function f(x,y) as it isn't an ordered pair (x,y).
I think a way to resolve this would be to define double-summation on a function through another 'intermediary' function (f_x)(y) (See [4] in the attached image)
and then we can proceed with proving the proposition by using the original definition of summations on a finite set.
Edit: Also the x subscript in f_x is (meant to be) purely notational, it has nothing to do with the actual input x. Note also that [3] is not a definition, it's presented as a lemma (so the fact that the LHS is syntactically invalid does matter here) and that the image above is not Tao's book, I only wrote the necessary definitions and the lemma (that I have a problem with) down for the sake of discussion.