let S be Subset of R; ( S is with_squares & S is add-closed implies S is with_sums_of_squares )
assume AS:
( S is with_squares & S is add-closed )
; S is with_sums_of_squares
defpred S1[ Nat] means for f being FinSequence of R st len f = R & ( for i being Nat st i in dom f holds
ex x being Element of R st f . i = x ^2 ) holds
Sum f in S;
then A:
S1[ 0 ]
;
B:
now for k being Nat st S1[k] holds
S1[k + 1]let k be
Nat;
( S1[k] implies S1[k + 1] )assume IV:
S1[
k]
;
S1[k + 1]now for f being FinSequence of R st len f = k + 1 & ( for i being Nat st i in dom f holds
ex x being Element of R st f . i = x ^2 ) holds
Sum f in Slet f be
FinSequence of
R;
( len f = k + 1 & ( for i being Nat st i in dom f holds
ex x being Element of R st f . i = x ^2 ) implies Sum f in S )assume B0:
(
len f = k + 1 & ( for
i being
Nat st
i in dom f holds
ex
x being
Element of
R st
f . i = x ^2 ) )
;
Sum f in Sthen
f <> {}
;
then consider g being
FinSequence,
x being
object such that B1:
f = g ^ <*x*>
by FINSEQ_1:46;
reconsider g =
g,
h =
<*x*> as
FinSequence of
R by B1, FINSEQ_1:36;
len h = 1
by FINSEQ_1:39;
then B2:
len f = (len g) + 1
by B1, FINSEQ_1:22;
then B3:
Sum g in S
by IV, B2, B0;
C2:
dom f = Seg (k + 1)
by B0, FINSEQ_1:def 3;
B4:
1
<= k + 1
by NAT_1:11;
B5:
x = f . (k + 1)
by B0, B2, B1, FINSEQ_1:42;
then reconsider x =
x as
Element of
R by B4, C2, FINSEQ_1:1, FINSEQ_2:11;
consider z being
Element of
R such that B6:
x = z ^2
by B0, B4, B5, C2, FINSEQ_1:1;
x is
square
by B6;
then B7:
x in SQ R
;
(Sum g) + x =
(Sum g) + (Sum <*x*>)
by RLVECT_1:44
.=
Sum f
by B1, RLVECT_1:41
;
hence
Sum f in S
by B7, B3, AS;
verum end; hence
S1[
k + 1]
;
verum end;
I:
for k being Nat holds S1[k]
from NAT_1:sch 2(A, B);
hence
S is with_sums_of_squares
by TARSKI:def 3; verum