reserve n,m,k for Nat;
reserve a,p,r for Real;
reserve s,s1,s2,s3 for Real_Sequence;

theorem Th22:
  a <> 1 implies Partial_Sums(a GeoSeq).n = (1 - a to_power (n+1)) /(1-a)
proof
  defpred X[Nat] means
Partial_Sums(a GeoSeq).$1 = (1-a to_power ($1+1))/(1-a);
  assume a<>1;
  then
A1: 1-a <> 0;
A2: for n st X[n] holds X[n+1]
  proof
    let n;
    assume Partial_Sums(a GeoSeq).n = (1 - a to_power (n+1))/(1-a);
    hence Partial_Sums(a GeoSeq).(n+1) = (1 - a to_power (n+1))/(1-a) + a
    GeoSeq.(n+1) by Def1
      .= (1 - a to_power (n+1))/(1-a) + a to_power (n+1) * 1 by PREPOWER:def 1
      .= (1-a to_power (n+1))/(1-a)+a to_power (n+1)*((1-a)/(1-a)) by A1,
XCMPLX_1:60
      .= (1-a to_power (n+1))/(1-a)+(a to_power (n+1)*(1-a))/(1-a)
      .= (1-a to_power (n+1) + (a to_power (n+1)-a |^ (n+1)*a))/(1-a)
      .= (1-a to_power (n+1) + (a to_power (n+1)-a |^ (n+1+1)))/(1-a) by
NEWTON:6
      .= (1 - a to_power (n+1+1))/(1-a);
  end;
  Partial_Sums(a GeoSeq).0 = a GeoSeq.0 by Def1
    .= 1 by PREPOWER:3
    .= (1-a)/(1-a) by A1,XCMPLX_1:60
    .= (1-a to_power (0+1))/(1-a);
  then
A3: X[0];
  for n holds X[n] from NAT_1:sch 2(A3,A2);
  hence thesis;
end;
