reserve V for non empty RLSStruct;
reserve x,y,y1 for set;
reserve v for VECTOR of V;
reserve a,b for Real;
reserve V for non empty addLoopStr;
reserve F for FinSequence-like PartFunc of NAT,V;
reserve f,f9,g for sequence of V;
reserve v,u for Element of V;
reserve j,k,n for Nat;
reserve V for RealLinearSpace;
reserve v for VECTOR of V;
reserve F,G,H,I for FinSequence of V;

theorem
  for V being Abelian add-associative right_zeroed right_complementable
  non empty addLoopStr, F,G being FinSequence of V st len F = len G &
  (for k for v being Element of V st k in dom F & v = G.k holds F.k = - v)
  holds Sum(F) = - Sum(G)
proof
  let V be Abelian add-associative right_zeroed right_complementable non
  empty addLoopStr, F,G be FinSequence of V;
  defpred P[set] means for H,I being FinSequence of V st len H
= len I & len H = $1 & (for k for v being Element of V st k in Seg len H & v =
  I.k holds H.k = - v) holds Sum(H) = - Sum(I);
A1: dom F = Seg len F by FINSEQ_1:def 3;
  now
    let n;
    assume
A2: for H,I being FinSequence of V st len H = len I &
len H = n & for k for v being Element of V st k in Seg len H & v = I.k holds H.
    k = - v holds Sum(H) = - Sum(I);
    let H,I be FinSequence of V;
    assume that
A3: len H = len I and
A4: len H = n + 1 and
A5: for k for v being Element of V st k in Seg(len H) & v = I.k holds
    H.k = - v;
    reconsider p = H | (Seg n),q = I | (Seg n) as FinSequence of the carrier
    of V by FINSEQ_1:18;
A6: n <= n + 1 by NAT_1:12;
    then
A7: len q = n by A3,A4,FINSEQ_1:17;
A8: len p = n by A4,A6,FINSEQ_1:17;
A9: now
      len p <= len H by A4,A6,FINSEQ_1:17;
      then
A10:  Seg(len p) c= Seg(len H) by FINSEQ_1:5;
A11:  dom p = Seg n by A4,A6,FINSEQ_1:17;
      let k;
      let v be Element of V;
      assume that
A12:  k in Seg(len p) and
A13:  v = q.k;
      dom q = Seg n by A3,A4,A6,FINSEQ_1:17;
      then I.k = q.k by A8,A12,FUNCT_1:47;
      then H.k = - v by A5,A12,A13,A10;
      hence p.k = - v by A8,A12,A11,FUNCT_1:47;
    end;
    1 <= n + 1 by NAT_1:11;
    then n + 1 in dom H & n + 1 in dom I by A3,A4,FINSEQ_3:25;
    then reconsider v1 = H.(n + 1),v2 = I.(n + 1) as Element of V by
FUNCT_1:102;
A14: v1 = - v2 by A4,A5,FINSEQ_1:4;
A15: dom q = Seg len q by FINSEQ_1:def 3;
    dom p = Seg len p by FINSEQ_1:def 3;
    hence Sum(H) = Sum(p) + v1 by A4,A8,Th38
      .= - Sum(q) + - v2 by A2,A8,A7,A9,A14
      .= - (Sum(q) + v2) by Lm3
      .= - Sum(I) by A3,A4,A7,A15,Th38;
  end;
  then
A16: for n st P[n] holds P[n+1];
  now
    let H,I be FinSequence of V;
    assume that
A17: len H = len I & len H = 0 and
    for k for v being Element of V st k in Seg len H & v = I.k holds H.k = - v;
    Sum(H) = 0.V & Sum(I) = 0.V by A17,Lm5;
    hence Sum(H) = - Sum(I);
  end;
  then
A18: P[0];
  for n holds P[n] from NAT_1:sch 2(A18,A16);
  hence thesis by A1;
end;
