reserve x,A for set, i,j,k,m,n, l, l1, l2 for Nat;
reserve D for non empty set, z for Nat;
reserve S for COM-Struct;
reserve ins for Element of the InstructionsF of S;
reserve k, m for Nat,
  x, x1, x2, x3, y, y1, y2, y3, X,Y,Z for set;
reserve i, j, k for Nat,
  n for Nat,
  l,il for Nat;

theorem Th22:
  for i,j being Nat holds
  for p being NAT-defined (the InstructionsF of S)-valued finite Function
  holds Shift(IncAddr(p,i),j) = IncAddr(Shift(p,j),i)
proof
  let i,j be Nat;
  let p be NAT-defined (the InstructionsF of S)-valued finite Function;
  set f = Shift(IncAddr(p,i),j);
  set g = IncAddr(Shift(p,j),i);
  dom(IncAddr(p,i)) = dom p by Def9;
  then dom(Shift(p,j)) = { m+j where m is Nat:
  m in dom (IncAddr(p,i)) } by VALUED_1:def 12
    .= dom f by VALUED_1:def 12;
  then
A1: dom f = dom g by Def9;
  now
    let x be object;
A2: dom f c= NAT by RELAT_1:def 18;
    assume
A3: x in dom f;
    then reconsider x9=x as Element of NAT by A2;
    reconsider xx=x9 as Element of NAT;
    x in { m+j where m is Nat:
    m in dom IncAddr(p,i) } by A3,VALUED_1:def 12;
    then consider m being Nat such that
A4: x = m+j and
A5: m in dom IncAddr(p,i);
A6: m in dom p by A5,Def9;
    dom Shift(p,j) = { mm+j where mm is Nat:
    mm in dom p} by VALUED_1:def 12;
    then
A7: x9 in dom Shift(p,j) by A4,A6;
    reconsider mm=m as Element of NAT by ORDINAL1:def 12;
A8: p/.mm = p.m by A6,PARTFUN1:def 6
      .= Shift(p,j).(m + j) by A6,VALUED_1:def 12
      .= Shift(p,j)/.xx by A4,A7,PARTFUN1:def 6;
    thus f.x = IncAddr(p,i).(m) by A5,A4,VALUED_1:def 12
      .= IncAddr(Shift(p,j)/.xx,i) by A6,A8,Def9
      .= g.x by A7,Def9;
  end;
  hence thesis by A1,FUNCT_1:2;
end;
