Talk:Empty sum

question
Why is 0a used as an example? That involved multiplication, so surely should not be on a page about summation? a + 0 = a would seem more appropriate, but does not demonstrate the principle mentioned. Thelem (talk) 23:46, 13 February 2009 (UTC)

This needs editing
The article must be revised and shortened because it is full of repetitions. 129.132.45.233 (talk) 12:57, 6 August 2012 (UTC)

Fixed. MvH (talk) 18:46, 11 March 2014 (UTC)MvH

Sources and adoption
The subject seems to belong to basic math but a specialized book on prime numbers is given as a reference for the convention. If it is an adopted one a more basic math reference should be used. 88.45.48.50 (talk) 12:43, 26 June 2013 (UTC)

Suitability
Such a convention poses quite some doubts on practical use when e.g. a zero output of an empty sum is used in a product with other coefficients, how is it dealt with? 88.45.48.50 (talk) 12:43, 26 June 2013 (UTC)


 * Can you give an example of what you mean? This is in fact a very useful convention, which we'd chose for its practical suitability even if it did not seem so right... so I'm not sure what examples you mean, where it needs to be dealt with specifically. See also empty product. Shreevatsa (talk) 16:18, 26 June 2013 (UTC)

New section about the convention
The new section about the convention says "Sum of a set defines a homomorphism from the monoid of sets of numbers to […]". More than being unclear, this is incorrect in general: summation is not defined over a set, but either over a sequence of numbers or more generally, because the operation is commutative, over a multiset. Indeed, $$\sum_{x\in A} x$$ (written in this new section) is just a particular case. One often writes something like $$\sum_{x\in A} f(x)$$, where several $$f(x)$$ can take the same value, hence a multiset. So, the monoid in question would be the monoid of multisets of numbers with the sum operation (described in the article multiset, i.e. similar to the disjoint union of sets). Vincent Lefèvre (talk) 17:11, 27 July 2019 (UTC)


 * Phew! - But I guess, you are right. So, the empty sum is the sum over the empty multiset here. What about starting with a simplified reason, like aiming at the law $$\left( \sum_{i=a}^{b-1} x_i \right) + \left( \sum_{i=b}^{c} x_i \right) = \left( \sum_{i=a}^{c} x_i \right)$$ for all $$a \leq b \leq c$$, in particular, for $$b=c$$? This can also be understood by physicists. We could then continue like "More generally, in order to make Sum a homomorphism from the monoid of multisets of numbers to the additive monoid of numbers, ...". Would that be ok? - Btw: do you have an opinion about calling the general, or the specialized, law "associativity"? - Jochen Burghardt (talk) 18:09, 27 July 2019 (UTC)


 * $$b=c$$ is not enough to trigger an empty sum. Perhaps you meant $$a=b$$. But I think that this is too similar to the recursive definition (given in the introduction) to be worth a new section. The "Any other definition violates associativity of the addition which can be expressed as" is the wrong argument; what it would violate is the identity element of the monoid. BTW, with what is presented in this section, "monoid" is not enough for the target structure; one also needs commutativity, i.e. a "commutative monoid". By convention, one can use the word "addition" only when the operation is commutative, but the empty product is also mentioned here, and commutativity is not always implied by this term. Vincent Lefèvre (talk) 18:31, 27 July 2019 (UTC)


 * You are right with $$b=c$$ vs. $$a=b$$. I had in mind the C convention of using left-closed and right-open intervals, but forgot to apply it to all three sums: the law should read $$\left( \sum_{i=a}^{b-1} x_i \right) + \left( \sum_{i=b}^{c-1} x_i \right) = \left( \sum_{i=a}^{c-1} x_i \right)$$ for all $$a \leq b \leq c$$. Then, $$b=c$$ would yield an empty sum, too. &mdash;


 * Commutativity is needed if Sum is defined on multisets, but is not needed if Sum is defined on finite sequences, a.k.a. strings. I guess this is the algebraic backgound of defining the empty product as 1, even is multiplication isn't commutative.
 * Formally, for an arbitrary set M, let M* (the Kleene star of M) denote the set of all finite sequences of elements of M. It is well-known that (M*,ε,⋅) is always a monoid, where ε and ⋅ denotes the empty sequence and sequence concatenation, respectively. Now, if (M,0,+) itself is a monoid, then Sum: M* → M can be consistently defined such that
 * Sum(ε)=0 (empty sequence),
 * Sum(m)=m for each m∈M (singleton sequences), and
 * Sum(s⋅t)=Sum(s)+Sum(t) for each s,t∈M* (sequence concatenation)
 * hold. Obviously, Sum is a moniod homomorphism, and the usual definition of the empty sum is necessary for that. If M is even a commutative monoid, a commotative-monoid homomorphism from the set of multisets over M to M can be defined in a similar way. - Jochen Burghardt (talk) 12:18, 28 July 2019 (UTC)


 * I replaced sets with multisets, thanks. My main problem with the article that the word convention implies arbitrariness (i.e., we agreed to use 0 for empty sum but could have used something else, it's just that 0 is convenient). In fact, nothing else can possibly be used without violating associativity (and commutativity if we want to think sets and not just sequences). Sds57 (talk) 18:33, 31 July 2019 (UTC)


 * I don't like the word convention either in this context (for the reason you give). I think that the right word would be extension.
 * However, I disagree about the sentence "Any other definition violates the associative property of addition". The reason is that the sigma notation makes sense (i.e. can unambiguously be defined) only if the binary operation is associative. It would be better to say "Any other definition would lead to a contradiction". But in fact, it is not useful to say anything about "Any other definition" since one has a direct proof that the empty sum can only be 0. Vincent Lefèvre (talk) 20:46, 31 July 2019 (UTC)


 * I still have problems with the section:
 * The prefix "multi" shouldn't be in parantheses in the article. "Sum" cannot be made a homomorphism from sets (without "multi-") to any structure that doesn't obey the idempotency law.
 * The empty sum could as well be defined to yield any other value than 0, without running into logical problems. This is similar to e.g. defining a function f on the real numbers by f(x)=-2sin(x)/x for x≠0 and f(0)=-2 (cf. the picture at L'Hôpital's rule). The latter is most convenient as it leads to a continuous function f, but any other definition for f(0) is valid as well. In particular, without assuming the convenience properties (continuity, resp. homomorphy), there is no proof that f(0)=-2, and similarly there is no proof that the empty sum is 0.
 * Moreover I guess, defining the empty sum as 0 is a sufficient, but not a necessary condition for making "Sum" a monoid homomorphism. The argument in the article:
 * $$\sum_{x\in A}x = \sum_{x\in A\cup \empty}x = \sum_{x\in A}x + \sum_{x\in\empty}x$$, thus $$\sum_{x\in\empty}x = 0$$
 * is not valid, unless when + is assumed to be cancellative.
 * "The associative property of addition" usually refers to $$\forall x,y,z: (x+y)+z=x+(y+z)$$. Contrary to what the article says, this property is not violated if the empty sum is defined non-zero. Btw: Contrary to what the article says, associativity of "+" alone does not imply $$\sum_{x\in A\cup B}x =\sum_{x\in A}x + \sum_{x\in B}x$$; commutativity is needed also.
 * I suggest to dispense with multisets and commutativity of "+", and to use sequences/strings instead, as sketched in my comment of 28 Jul above. Alternatively, the whole section could be omitted, since the argument in the lead is sufficient as a motivation. - Jochen Burghardt (talk) 12:14, 1 August 2019 (UTC)


 * I globally agree with you, except that defining the empty sum as 0 is also a necessary condition (the proof needs to be fixed): The property needs to be valid for every multiset A, and in particular all singletons. This proves that the empty sum satisfies the property of the identity element, which is necessarily unique. Vincent Lefèvre (talk) 13:09, 1 August 2019 (UTC)


 * I agree to your argument for necessity. Your recent edits aren't much an improvement. The notion of "numeric" is not defined, and it appears you assign to it all properties you need for your proof. A proof that the empty sum must be 0 in order to obtain the formula $$s_{m}=s_{m-1}+a_{m}$$ for "numbers" has been given already in the lead, so the bottom section doesn't add any new insights, unless it is written in maximal generality, omitting the vague "numeric" property. Meanwhile, I favor to omit the section, except for the max/min paragraph. In the lead, we could add a sentence or footnote like "For $$m=2$$, $$a_1+a_2=s_2=s_1+a_2$$ implies $$a_1=s_1$$ by the right cancellation property; for $$m=1$$, $$a_1=s_1=s_0+a_1$$ implies $$0=s_0$$ by the same reason" to prove the necessity. - Jochen Burghardt (talk) 11:38, 2 August 2019 (UTC)


 * I agree that the lead already provides the proof that if an empty sum has a value, then it is necessarily the identity element, in order to satisfy the recurrence relation (which is a more general property than the monoid homomorphism). Note that you do not need the cancellation property. The recurrence relation yields $$s_0 + a_1 = s_1 = a_1$$ for every element $$a_1$$ of the set. This means that $$s_0$$ is a left identity element. And when there exists an identity element $$e$$ (which has been assumed here), a left identity element $$e_l$$ is necessarily this identity element: $$e_l = e_l + e = e$$. Thus I'm in favor of removing this section. I think that the notion of monoid homomorphism is interesting, but does not belong here; as it does not involve only the empty multiset (but any multiset), this is more something general about the article iterated binary operation (where summation is just a particular case). BTW, this article already covers the properties with the left identity, empty sequences, operations on multisets, and empty multisets; pointing to this article in the lead could be a good thing. Vincent Lefèvre (talk) 19:55, 14 August 2019 (UTC)


 * I agree, but it still appears to me that you would need the cancellation property to derive $$a_1=s_1$$. - As for iterated binary operation, we could add some stuff from our above discussion there, when/where appropriate (a text search for "morphism" in that article failed). More generally, I thought about integrating empty sum as a subsection into summation, in the long run. - Jochen Burghardt (talk) 10:34, 15 August 2019 (UTC)


 * I think that $$s_1 = a_1$$ should just be the obvious definition for a sequence of length 1, then use the recurrence relation to define the summation over longer sequences. The definition for a sequence of length 0 (empty sequence) is really particular as one needs, as seen, an identity element (at least a left identity element), which depends on the whole set that is considered (forming a semigroup with the binary operation) and may not exist in the general case. I agree that empty sum should be a subsection of summation since it is just part of the usual definition of a summation. Vincent Lefèvre (talk) 11:30, 15 August 2019 (UTC)


 * I made a suggestion in the lead. Since $$s_1 = a_1$$ is mentioned there, too, I also included its proof from cancellation. Following your argument, I tried to make clear that $$s_0=0$$ doesn't need cancellation, but only a neutral element. Feel free to improve. - Jochen Burghardt (talk) 19:51, 15 August 2019 (UTC)


 * I've made $$s_1 = a_1$$ part of the definition, since this is natural (BTW, this is an article about the empty sum, not about the empty or 1-element sum), and the cancellation property is not always satisfied in other contexts, such as products of matrices, for which the definition of iterated products is not an issue starting at 1 element. I've simplified the proof for $$s_0 = 0$$ as the unique possible definition with the recursion formula: just apply it to $$a_1 = 0$$. Vincent Lefèvre (talk) 10:35, 17 August 2019 (UTC)