let n be Nat; :: thesis: for s being Real_Sequence st ( for n being Nat holds s . n = n * ((1 / 2) |^ n) ) holds
() . n = 2 - ((2 + n) * ((1 / 2) |^ n))

let s be Real_Sequence; :: thesis: ( ( for n being Nat holds s . n = n * ((1 / 2) |^ n) ) implies () . n = 2 - ((2 + n) * ((1 / 2) |^ n)) )
defpred S1[ Nat] means () . \$1 = 2 - ((2 + \$1) * ((1 / 2) |^ \$1));
assume A1: for n being Nat holds s . n = n * ((1 / 2) |^ n) ; :: thesis: () . n = 2 - ((2 + n) * ((1 / 2) |^ n))
A2: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume (Partial_Sums s) . n = 2 - ((2 + n) * ((1 / 2) |^ n)) ; :: thesis: S1[n + 1]
then () . (n + 1) = (2 - ((2 + n) * ((1 / 2) |^ n))) + (s . (n + 1)) by SERIES_1:def 1
.= (2 - ((2 + n) * ((1 / 2) |^ n))) + ((n + 1) * ((1 / 2) |^ (n + 1))) by A1
.= (((2 - (2 * ((1 / 2) |^ n))) - (n * ((1 / 2) |^ n))) + (n * ((1 / 2) |^ (n + 1)))) + (1 * ((1 / 2) |^ (n + 1)))
.= (((2 - (((4 * 1) / 2) * ((1 / 2) |^ n))) - (n * ((1 / 2) |^ n))) + (n * (((1 / 2) |^ n) * (1 / 2)))) + (1 * ((1 / 2) |^ (n + 1))) by NEWTON:6
.= (((2 - (4 * (((1 / 2) |^ n) * (1 / 2)))) - (n * ((1 / 2) |^ n))) + ((n * ((1 / 2) |^ n)) * (1 / 2))) + (1 * ((1 / 2) |^ (n + 1)))
.= (((2 - (4 * ((1 / 2) |^ (n + 1)))) - (n * ((1 / 2) |^ n))) + ((n * ((1 / 2) |^ n)) * (1 / 2))) + (1 * ((1 / 2) |^ (n + 1))) by NEWTON:6
.= (2 - (3 * ((1 / 2) |^ (n + 1)))) - (n * (((1 / 2) |^ n) * (1 / 2)))
.= (2 - (3 * ((1 / 2) |^ (n + 1)))) - (n * ((1 / 2) |^ (n + 1))) by NEWTON:6
.= 2 - ((3 + n) * ((1 / 2) |^ (n + 1))) ;
hence S1[n + 1] ; :: thesis: verum
end;
() . 0 = s . 0 by SERIES_1:def 1
.= 0 * ((1 / 2) |^ 0) by A1
.= 2 - ((2 + 0) * 1)
.= 2 - ((2 + 0) * ((1 / 2) |^ 0)) by NEWTON:4 ;
then A3: S1[ 0 ] ;
for n being Nat holds S1[n] from NAT_1:sch 2(A3, A2);
hence (Partial_Sums s) . n = 2 - ((2 + n) * ((1 / 2) |^ n)) ; :: thesis: verum