reserve m,j,p,q,n,l for Element of NAT;
reserve e1,e2 for ExtReal;
reserve i for Nat,
        k,k1,k2,j1 for Element of NAT,
        x,x1,x2,y for set;
reserve p1,p2 for FinSequence;
reserve q,q1,q2,q3,q4 for FinSubsequence,
        p1,p2 for FinSequence;
reserve l1 for Nat,
        j2 for Element of NAT;

theorem
 for f being non empty NAT-defined finite Function
 holds Shift(f +~ (x,y),i) = Shift(f,i) +~ (x,y)
 proof let f be non empty NAT-defined finite Function;
A1: dom f = dom(f +~ (x,y)) by FUNCT_4:99;
A2: dom(Shift(f,i) +~ (x,y))
    = dom Shift(f,i) by FUNCT_4:99
   .= { m+i where m is Nat:m in dom(f +~ (x,y)) } by A1,Def12;
  for m being Nat st m in dom(f +~ (x,y))
    holds (Shift(f,i) +~ (x,y)).(m+i) = (f +~ (x,y)).m
  proof let m be Nat;
   assume m in dom(f +~ (x,y));
    then
A3:  m+i in dom(Shift(f,i) +~ (x,y)) by A2;
    then
A4:  m+i in dom Shift(f,i) by FUNCT_4:99;
    consider mm being Nat such that
A5:  m+i = mm+i and
A6:  mm in dom(f +~ (x,y)) by A2,A3;
    m = mm by A5;
    then m in dom(f +~ (x,y)) by A6;
    then
A7:  m in dom f by FUNCT_4:99;
    then
A8:  Shift(f,i).(m+i) = f.m by Def12;
   per cases;
   suppose
A9:   Shift(f,i).(m+i) = x;
   hence (Shift(f,i) +~ (x,y)).(m+i) = y by A4,FUNCT_4:106
    .= (f +~ (x,y)).m by A7,FUNCT_4:106,A9,A8;
   end;
   suppose
A10:  Shift(f,i).(m+i) <> x;
   hence (Shift(f,i) +~ (x,y)).(m+i)
      = Shift(f,i).(m+i) by FUNCT_4:105
     .= (f +~ (x,y)).m by A10,A8,FUNCT_4:105;
   end;
  end;

  hence Shift(f +~ (x,y),i) = Shift(f,i) +~ (x,y) by A2,Def12;
 end;
