Step 1 (parallelogram identity). For square-integrable U,V, expanding pointwise and using linearity of expectation,
∥U+V∥22+∥U−V∥22=2∥U∥22+2∥V∥22.
Step 2 (a minimizing sequence and its limit). The set T={∥X−Z∥2:Z∈S} is a nonempty set of nonnegative reals (0∈S), so it has a greatest lower boundd≥0. For each n∈N: the number d2+1/n exceeds d (its square exceeds d2, and squaring preserves the order of nonnegative reals), so it is not a lower bound of T, and there is Zn∈S with ∥X−Zn∥2<d2+1/n; squaring gives
d2≤∥X−Zn∥22<d2+n1.
Apply Step 1 with U=X−Zn, V=X−Zm: since U+V=2(X−2Zn+Zm) and U−V=Zm−Zn,
where the last step uses d2+1/n≤d+1/n (both sides nonnegative, and the square of the right side is d2+1/n+2d1/n≥d2+1/n). The right side has limit d (for the middle term: given ε>0, 1/n<ε once n>1/ε2, by the Archimedean property and order-preservation of squaring), so the constant ∥X−Y∥2 satisfies d≤∥X−Y∥2≤d+ε for every ε>0, hence ∥X−Y∥2=d. Since d is a lower bound of T, property 1 holds for Y.
Step 4 (property 1 implies property 2). Let Y′∈S satisfy property 1; then ∥X−Y′∥2=d (it is at most every element of T and belongs to T). Fix Z∈S and set b=E[(X−Y′)Z], which is defined and finite by Square-Integrable Random Variables and the Mean-Square Inner Product. For every real t, Y′+tZ∈S, so expanding pointwise and using linearity,
If ∥Z∥2=0, then 0≤−2tb for all real t forces b=0. Otherwise take t=b/∥Z∥22, which yields 0≤−b2/∥Z∥22, so again b=0. Hence property 2 holds for Y′.
Step 5 (property 2 implies property 3). Let Y′∈S satisfy property 2 and let A∈G. The indicator 1A is G-measurable (its preimages are ∅, A, Ω∖A, or Ω) and square-integrable (1A2=1A has expectation P(A)≤1), so 1A∈S and property 2 gives E[(X−Y′)1A]=0. The products X1A and Y′1A are integrable by Square-Integrable Random Variables and the Mean-Square Inner Product, and (X−Y′)1A=X1A−Y′1A pointwise, so linearity yields E[X1A]=E[Y′1A], which is property 3.
Step 6 (property 3 implies property 1, closing the equivalence). Let Y′∈S satisfy property 3. We first show that any two members of S satisfying property 3 are almost surely equal; we then deduce property 1 for Y′.
Almost-sure uniqueness from property 3. Suppose Y1,Y2∈S both satisfy property 3. Fix n∈N and let A={Y1−Y2≥n1}. Then A∈G: Y1−Y2 is G-measurable by the preliminaries of Square-Integrable Random Variables and the Mean-Square Inner Product applied with G, and A is the preimage of the Borel set [n1,∞). Property 3 for both variables gives
Pointwise (Y1−Y2)1A≥n11A (on A by definition of A; off A both sides are 0), so monotonicity and linearity give 0≥n1P(A), hence P(A)=0. The event {Y1>Y2} is the union over n∈N of the events {Y1−Y2≥n1}, each of probability 0, so P(Y1>Y2)=0 by countable additivity (applied to a disjointified union, or by the monotone bound of the measure of a countable union by the sum of the measures as in Borel-Cantelli Lemmas). Exchanging Y1 and Y2 gives P(Y2>Y1)=0, so P(Y1=Y2)=0, i.e., P(Y1=Y2)=1.
Property 1 for Y′. By Steps 3-5, the random variable Y constructed in Step 2 lies in S and satisfies properties 1, 2, and 3. By the uniqueness just proved, P(Y′=Y)=1, so ∥Y′−Y∥2=0 by Square-Integrable Random Variables and the Mean-Square Inner Product. Then for every Z∈S, the triangle inequality gives
∥X−Y′∥2≤∥X−Y∥2+∥Y−Y′∥2=∥X−Y∥2≤∥X−Z∥2,
so Y′ satisfies property 1. This closes the cycle: property 1 implies 2 (Step 4), 2 implies 3 (Step 5), and 3 implies 1 (this step), so the three properties are equivalent for members of S.
Step 7 (conclusion). The random variable Y of Step 2 is G-measurable, square-integrable, and satisfies properties 1, 2, and 3 (Steps 3-5). The equivalence of the three properties for members of S was established in Steps 4-6, and the final uniqueness assertion is the almost-sure uniqueness proved in Step 6. ■