Proof: For a finite multiset S of integers, let σ(S) denote the sum of all elements in S (counting multiplicities), and let Σ(S)={σ(T)∣σ(T)=T⊆S}, where Σ(S) is treated as a set (ignoring multiplicities). Let Σn(S) denote the set of congruence classes modulo n of the elements in Σ(S). For x∈Z, let xˉ denote the congruence class of x modulo n. Under this notation, conditions (2) and (3) can be written as
Σn({a1,a2,…,ak})={1ˉ,2ˉ,…,ℓˉ}.
Step 1: The main idea is to add an element x to a nonempty multiset S, obtaining T=S∪{x}. Assuming that neither Σn(S) nor Σn(T) contains 0ˉ, we compare Σn(S) and Σn(T). In particular, if Σn(T) contains exactly one more element than Σn(S), we can deduce a very refined structure for Σn(S).
Observe that
Σ(T)=Σ(S)∪(Σ(S)+x)∪{x},
so Σn(S)⊂Σn(T). Moreover, σ(S)+x belongs to Σn(T) but not to Σn(S), since otherwise Σn(T) would contain 0ˉ. Hence, Σn(S)⊊Σn(T).
If Σn(T) contains exactly one more element than Σn(S), then this new element must be σ(S)+x. However, xˉ∈Σn(T), and xˉ=σ(S)+x, so xˉ∈Σn(S).
Let d=gcd(x,n)n, where d is the smallest positive integer such that dxˉ=0ˉ. Suppose xˉ,2xˉ,…,pxˉ∈Σn(S), but (p+1)xˉ∈/Σn(S). A set of the form
{aˉ,a+x,a+2x,…,a+(d−1)x}
is called a coset of xˉ. The congruence classes modulo n can be partitioned into dn cosets of xˉ.
If Σn(S) contains some elements of a coset C of xˉ but not the entire coset, then (Σn(S)∩C)+xˉ will produce new elements not in Σn(S)∩C. Since Σn(T) contains only one more element than Σn(S), it follows that Σn(S) must consist of several complete cosets of xˉ and one incomplete coset. This incomplete coset can only be {xˉ,2xˉ,…,pxˉ}, and the new element in Σn(T) is (p+1)xˉ, which must equal σ(S)+x. Therefore, σ(S)=pxˉ.
Step 2: Returning to the original problem, first add n−1−ℓ copies of 1 to {a1,a2,…,ak}, obtaining a multiset S. It is easy to see that m:=∣S∣=k+(n−1)−ℓ≥2n+1 (using condition (1)), and
Σn(S)={1ˉ,2ˉ,…,n−1}.
Let the elements of S be ordered as b1≤b2≤⋯≤bm. Then b1=1 (using condition (1), ℓ≤n−2, so S contains at least one 1), and bm<n.
If for every 2≤i≤m, we have bi≤1+b1+⋯+bi−1, then by induction, it follows that
Σ(S)={1,2,…,b1+b2+⋯+bm}.
Since Σn(S)={1ˉ,2ˉ,…,n−1}, it must be that b1+b2+⋯+bm=n−1. Removing the added n−1−ℓ copies of 1, we obtain
a1+a2+⋯+ak=ℓ.
Now suppose there exists 2≤i≤m (take the smallest such i) such that bi>1+b1+⋯+bi−1. Let s=b1+⋯+bi−1≥i−1. Then
Σ({b1,…,bi−1,bi})={1,2,…,s,bi,bi+1,…,bi+s}.
Since bi<n, we have bi+s<n (otherwise 0∈Σn(S)), so
∣Σn({b1,…,bi})∣=2s+1≥2i−1.
Now, iteratively add the remaining elements to {b1,…,bi} such that at each step, Σn gains at least two new elements, until no more can be added. Suppose we obtain T⊂S with ∣T∣=t≥i, satisfying
∣Σn(T)∣≥2i−1+2(t−i)=2t−1.
It follows that t<m, since otherwise ∣Σn(T)∣≥2m−1≥n, which is a contradiction. Now, the remaining elements must each add only one new element to Σn when included in T.
Claim: The remaining elements are all identical.
Suppose x and y are remaining elements, and both Σn(T∪{x}) and Σn(T∪{y}) contain exactly one more element than Σn(T). By the conclusion of Step 1, Σn(T) consists of several complete cosets of xˉ and one incomplete coset {xˉ,2xˉ,…,pxˉ}, with σ(T)=pxˉ.
Since Σn(T∪{y}) contains only one more element, σ(T)+y=yˉ+pxˉ, it follows that yˉ,yˉ+xˉ,…,yˉ+(p−1)xˉ∈Σn(T), but yˉ+pxˉ∈/Σn(T). Therefore, yˉ cannot belong to a complete coset of xˉ in Σn(T), so it must be in {xˉ,2xˉ,…,pxˉ}. Consequently,
{yˉ,yˉ+xˉ,…,yˉ+(p−1)xˉ}⊂{xˉ,2xˉ,…,pxˉ},
which implies yˉ=xˉ, i.e., x=y. The claim is proved.
Thus, the remaining elements are all equal to some x. Each time we add x, Σn gains exactly one new element, successively adding (p+1)xˉ,(p+2)xˉ,…,(d−1)xˉ. In the final step, S=T1∪{x}, and the new element added to Σn is (d−1)xˉ=σ(T1)+x=σ(S), so xˉ=−σ(S).
Earlier, when we added 1 to {a1,a2,…,ak} to obtain S, each addition also introduced exactly one new element to Σn. Considering the last addition, S=T2∪{1}, we similarly deduce 1=−σ(S), so x=1. This means that in the previous process, the remaining elements were all 1. However, this is impossible because we had already taken {b1,…,bi} with bi>1, which includes all the 1's. This contradiction completes the proof. □