reserve i1 for Element of INT;
reserve j1,j2,j3 for Integer;
reserve p,s,k,n for Nat;
reserve x,y,xp,yp for set;
reserve G for Group;
reserve a,b for Element of G;
reserve F for FinSequence of G;
reserve I for FinSequence of INT;

theorem Th2:
  Sum I = addint $$ I
proof
  set g = addint, h = addcomplex;
  set i = [#](I,the_unity_wrt g);
  rng I c= COMPLEX by NUMBERS:11;
  then reconsider f = I as FinSequence of COMPLEX by FINSEQ_1:def 4;
  set j = [#](f,the_unity_wrt h);
  consider n being Nat such that
A1: dom f = Seg n by FINSEQ_1:def 2;
A2: g $$ I = g $$ (finSeg n,i) & h $$ f = h $$ (finSeg n,j) by A1,
SETWOP_2:def 2;
  defpred P[Nat] means g $$ (finSeg $1,i) = h $$ (finSeg $1,j);
A3: for k being Nat st P[k] holds P[k+1]
  proof
    let k be Nat;
    assume
A4: P[k];
    set b = g $$(finSeg k,i);
    set a = i.(k+1);
A5: not (k + 1) in Seg k by FINSEQ_3:8;
    g $$ (finSeg (k+1),i) = g $$ (finSeg k \/ {. k+1 .},i) by FINSEQ_1:9
      .= g.(b,a) by A5,SETWOP_2:2
      .= b + a by BINOP_2:def 20
      .= h.(h $$(finSeg k,j),j.(k+1)) by A4,BINOP_2:1,4,def 3
      .= h $$ (finSeg k \/ {. k+1 .},j) by A5,SETWOP_2:2
      .= h $$ (finSeg (k+1),j) by FINSEQ_1:9;
    hence thesis;
  end;
A6: Seg 0 = {}.NAT;
  then g $$ (finSeg 0,[#](I,the_unity_wrt g)) = the_unity_wrt h by BINOP_2:1,4
,SETWISEO:31
    .= h $$ (finSeg 0,[#](f,the_unity_wrt h)) by A6,SETWISEO:31;
  then
A7: P[0];
  for k being Nat holds P[k] from NAT_1:sch 2(A7,A3);
  then g $$ I = h $$ f by A2;
  hence thesis by RVSUM_1:def 10;
end;
