 reserve j for set;
 reserve p,r for Real;
 reserve S,T,F for RealNormSpace;
 reserve x0 for Point of S;
 reserve g for PartFunc of S,T;
 reserve c for constant sequence of S;
 reserve R for RestFunc of S,T;
 reserve G for RealNormSpace-Sequence;
 reserve i for Element of dom G;
 reserve f for PartFunc of product G,F;
 reserve x for Element of product G;
reserve G for RealNormSpace-Sequence;
reserve F for RealNormSpace;
reserve i for Element of dom G;
reserve f,f1,f2 for PartFunc of product G, F;
reserve x for Point of product G;
reserve X for set;

theorem Th55:
for G be RealNormSpace-Sequence,
    h be FinSequence of product G,
    y,x be Point of product G,
    y0,Z be Element of product carr G,
    j be Element of NAT
  st y=y0 & Z=0.(product G)
    & len h = (len G)+1 & 1 <= j & j <= len G &
  (for i be Nat st i in dom h holds h/.i=Z +* (y0| Seg (len G + 1-'i)))
  holds
 (proj(In((len G)+1-'j,dom G)).(x+y))
- proj(In((len G)+1-'j,dom G)).(x+h/.(j+1))
 = (proj(In((len G)+1-'j,dom G)).y)
proof
   let G be RealNormSpace-Sequence,
       h be FinSequence of product G,
       y,x be Point of product G,
       y0,Z be Element of product carr G,
       j be Element of NAT;
   assume that
A1: y = y0 and
A2: Z=0.(product G) and
A3: len h = (len G)+1 & 1 <= j & j <= len G and
A4: for i be Nat st i in dom h holds h/.i=Z +* (y0| Seg (len G + 1-'i));
   x + h/.j = reproj(In((len G)+1-'j,dom G),(x+h/.(j+1)))
           .(proj(In((len G)+1-'j,dom G)).(x+y)) by A1,A2,A3,A4,Th54; then
   proj(In((len G)+1-'j,dom G)).(x+h/.j)
     = proj(In((len G)+1-'j,dom G)).(x+y) by Th46; then
A5:proj(In((len G)+1-'j,dom G)).(x+y)
        - proj(In((len G)+1-'j,dom G)).(x+h/.(j+1))
     = proj(In((len G)+1-'j,dom G)).(x + h/.j - (x+h/.(j+1))) by Th37;
   x + h/.j - (x + h/.(j+1))
    = h/.j + x - x - h/.(j+1) by RLVECT_1:27
   .= h/.j + (x - x) - h/.(j+1) by RLVECT_1:28
   .= h/.j + 0.(product G) - h/.(j+1) by RLVECT_1:15
   .= h/.j - h/.(j+1) by RLVECT_1:4; then
A6:proj(In((len G)+1-'j,dom G)).(x+y)
        - proj(In((len G)+1-'j,dom G)).(x+h/.(j+1))
    = proj(In((len G)+1-'j,dom G)).(h/.j)
     - proj(In((len G)+1-'j,dom G)).(h/.(j+1)) by A5,Th37;
   y0 is Element of the carrier of product G by Th10; then
A7:dom y0 = Seg len G by FINSEQ_1:89;
   j in Seg len G by A3; then
   len G -'j + 1 in Seg len G by NAT_2:6; then
A8:len G + 1 -' j in Seg len G by A3,NAT_D:38;

A9:j < len G +1 by A3,NAT_1:13; then
   len G+1-'j in Seg(len G+1-'j) by FINSEQ_1:3,NAT_D:36; then
A10:len G+1-'j in dom (y0|Seg(len G+1-'j)) by A7,A8,RELAT_1:57;
   len G+1-'j = len G+1-'(j+1)+1 by A9,NAT_2:7; then
A11:len G+1-'(j+1) < len G+1-'j by NAT_1:13;
   dom (y0|Seg(len G+1-'(j+1))) c= Seg(len G+1-'(j+1)) by RELAT_1:58; then
A12:not len G+1-'j in dom (y0|Seg(len G+1-'(j+1))) by A11,FINSEQ_1:1;

   reconsider h1 = h/.j as Element of product carr G by Th10;
   reconsider h2 = h/.(j+1) as Element of product carr G by Th10;
   j in Seg len h by A3,A9; then
   j in dom h by FINSEQ_1:def 3; then
A13:h/.j = Z +* (y0|Seg(len G+1-'j)) by A4;
   len G + 1 -' j in dom G by A8,FINSEQ_1:def 3; then
A14:In((len G)+1-'j,dom G) = len G + 1 -' j by SUBSET_1:def 8; then
A15:proj(In((len G)+1-'j,dom G)).(h/.j)
    = h1.(len G+1-'j) by Def3
   .= (y0|Seg(len G+1-'j)).(len G+1-'j) by A10,A13,FUNCT_4:13
   .= y0.(len G +1-'j) by A10,FUNCT_1:47
   .= proj(In(len G+1-'j,dom G)).y by A1,A14,Def3;

   1 <= j+1 & j+1 <= len h by A3,NAT_1:12,XREAL_1:6; then
   j+1 in Seg len h; then
   j+1 in dom h by FINSEQ_1:def 3; then
A16:h/.(j+1) = Z +* (y0|Seg(len G+1-'(j+1))) by A4;

   proj(In((len G)+1-'j,dom G)).(h/.(j+1))
    = h2.(len G+1-'j) by A14,Def3
   .= Z.(len G+1-'j) by A16,A12,FUNCT_4:11
   .= proj(In(len G+1-'j,dom G)).(0.(product G)) by A14,A2,Def3;
   hence proj(In((len G)+1-'j,dom G)).(x+y)
        - proj(In((len G)+1-'j,dom G)).(x+h/.(j+1))
    = proj(In(len G+1-'j,dom G)).(y - 0.(product G)) by A6,A15,Th37
   .= proj(In(len G+1-'j,dom G)).y by RLVECT_1:13;
end;
