We prove the statement using the following lemmas.
Lemma 1. If ∣Ai∣+∣Aj∣=2n+1−r for a non-negative r, then there exist ai∈Ai,aj∈Aj such that 2n−1−r≤ai+aj≤2n−1+r.
Proof. Assume the contrary. Let Ai={x1≤x2≤⋯≤x∣Ai∣} and let yt=2n−1−xt be the complement of xt. Since Aj is non-empty, there exists y∈Aj.
If y>y1 then we also have y≥y1+r. Now consider the following values:
y∣Ai∣,y∣Ai∣−1,⋯,y2,y1,y1+1,y1+2,⋯,y1+r
They are ∣Ai∣+r distinct numbers; all of them belong to [0,2n−1]. Moreover Aj cannot contain any of them. So the size of Aj is at most 2n−(∣Ai∣+r) which is a contradiction.
If y<y1 then let t be the smallest index such that y<yt. Indeed, we also have y<yt−r. Now consider the following numbers:
y∣Ai∣,y∣Ai∣−1,…,yt+1,yt−r,yt−(r−1),…,yt,yt−1,yt−2,…,y1,
which are ∣Ai∣+r distinct numbers and all of them belong to [0,2n−1], moreover Aj cannot contain any of them. So the size of Aj is at most 2n−(∣Ai∣+r) which is a contradiction.
Lemma 2. If ∣Ai∣+∣Aj∣=2n+1+r for a non-negative r, then for every 2n−1−r≤s≤2n−1+r there exist ai∈Ai,aj∈Aj such that ai+aj=s.
Proof. First take a number s∈[2n−1−r,2n−1], and let h=2n−1−s. Ai,Aj in total at most have 2h elements from the set {s+1,s+2,…,2n−1}. So the number of elements of Ai,Aj in the interval [0,s] is at least 2n+1+r−2h≥s+2 in total. Applying Pigeonhole principle for s+1 pairs (0,s),(1,s−1),…,(s,0) we can easily get s as the sum of two elements, one from Ai and one from Aj. The proof for s∈[2n,2n+r] is similar.
Comment 1. This means we can cover the whole interval [2n−1−r,2n−1+r] by the bi-sums of elements, one from Ai and one from Aj.
Lemma 3. If we have 2k subsets such that the sum of their sizes is k(2n+1)+r for a non-negative r, then for every k(2n−1)−r≤s≤k(2n−1)+r there exist 2k elements, one from each subset, whose sum is s.
Comment 2. This means we can cover the whole interval [k(2n−1)−r,k(2n−1)+r] by the sums of elements of these 2k subsets.
Proof. We proceed the proof through induction k, with base k=1 being Lemma 2. As for the inductive step, we consider Ai,Aj as the two subsets with minimum size among those 2k subsets.
If ∣Ai∣+∣Aj∣=2n+1+r′ for a non-negative r′ then r′≤r and by Lemma 2 Ai,Aj can cover the interval [2n−1−r′,2n−1+r′]. Also by induction the other 2k−2 subsets cover the interval [(k−1)(2n−1)−(r−r′),(k−1)(2n−1)+(r−r′)]. By combining the two intervals we can cover the whole interval [k(2n−1)−r,k(2n−1)+r].
If ∣Ai∣+∣Aj∣=2n+1−r′ for a positive r′ then by Lemma 1 there exist ai∈Ai,aj∈Aj such that 2n−1−r′≤ai+aj=s≤2n−1+r′. Also by induction, the other 2k−2 subsets cover the interval [(k−1)(2n−1)−(r+r′),(k−1)(2n−1)+(r+r′)]. By adding s to the numbers in this interval we can cover the whole interval [k(2n−1)−r,k(2n−1)+r].
The statement of the problem is indeed a special case of Lemma 3 where k=n and r=0.