reserve n for Nat,
        p,p1,p2 for Point of TOP-REAL n,
        x for Real;
reserve n,m for non zero Nat;
reserve i,j for Nat;
reserve f for PartFunc of REAL-NS m,REAL-NS n;
reserve g for PartFunc of REAL m,REAL n;
reserve h for PartFunc of REAL m,REAL;
reserve x for Point of REAL-NS m;
reserve y for Element of REAL m;
reserve X for set;

theorem Th9:
for x,y be Element of REAL,i be Nat st 1 <= i & i <= m
  holds Replace(0*m,i,x+y) = Replace(0*m,i,x) + Replace(0*m,i,y)
proof
   let x,y be Element of REAL;
   let i be Nat;
   assume A1: 1 <= i & i <= m;
    reconsider xy = x+y as Element of REAL;
A2:len Replace(0*m,i,xy) = m & len Replace(0*m,i,x) = m &
   len Replace(0*m,i,y) = m by Lm6;
then A3:len(Replace(0*m,i,x) + Replace(0*m,i,y))
    = len(Replace(0*m,i,xy)) by RVSUM_1:115;
    for j be Nat st 1 <= j & j <= len(Replace(0*m,i,xy)) holds
     Replace(0*m,i,xy).j = (Replace(0*m,i,x) + Replace(0*m,i,y)).j
   proof
    let j be Nat;
    assume A4: 1 <= j & j <= len(Replace(0*m,i,xy));
    reconsider j as Nat;
A5: dom(Replace(0*m,i,x) + Replace(0*m,i,y))
      = dom(Replace(0*m,i,x)) /\ dom(Replace(0*m,i,y)) by VALUED_1:def 1;
     j in dom(Replace(0*m,i,x)) &
    j in dom(Replace(0*m,i,y)) by A4,A2,FINSEQ_3:25;
    then j in dom(Replace(0*m,i,x) + Replace(0*m,i,y)) by A5,XBOOLE_0:def 4;
then A6: (Replace(0*m,i,x) + Replace(0*m,i,y)).j
      = Replace(0*m,i,x).j + Replace(0*m,i,y).j by VALUED_1:def 1;
    per cases;
    suppose A7: i = j;
     then (Replace((0*m),i,x) + Replace((0*m),i,y)).j
       = x + Replace((0*m),i,y).j by A1,A6,Lm7
      .= x + y by A1,A7,Lm7;
     hence thesis by A1,A7,Lm7;
    end;
    suppose A8: i <> j;
     then (Replace((0*m),i,x) + Replace((0*m),i,y)).j
       = 0 qua Real + Replace((0*m),i,y).j by A4,A6,A2,Lm7
      .= 0 by A4,A2,A8,Lm7;
     hence thesis by A4,A2,A8,Lm7;
    end;
   end;
   hence thesis by A3;
end;
