reserve x for Int_position,
  n,p0 for Nat;
reserve P,Q,U,V for Instruction-Sequence of SCMPDS;

theorem Th11:
  for s being 0-started State of SCMPDS,I being halt-free shiftable
Program of SCMPDS, a,x,y be Int_position, i,c be Integer,n be Nat st
n > 0 & s.x >= s.y +c &
 for t be 0-started State of SCMPDS,Q st t.x >= t.y +c & t.a=s.a & t
  .DataLoc(s.a,i) > 0 holds
   IExec(I ';' AddTo(a,i,-n),Q,t).a=t.a & IExec(I ';'
  AddTo(a,i,-n),Q,t).DataLoc(s.a,i)=t.DataLoc(s.a,i)-n
   & I is_closed_on t,Q & I
is_halting_on t,Q
 & IExec(I ';' AddTo(a,i,-n),Q,t).x >=IExec(I ';' AddTo(a,i,-n),Q,t).y+c
  holds for-down(a,i,n,I) is_closed_on s,P &
        for-down(a,i,n,I) is_halting_on s,P
proof
  let s be 0-started State of SCMPDS,
      I be halt-free shiftable Program of SCMPDS, a,x,y
  be Int_position, i,c be Integer,n be Nat;
  set b=DataLoc(s.a,i), J=I ';' AddTo(a,i,-n);
  assume
A1: n > 0;
  defpred P[set] means ex t be State of SCMPDS st t=$1 & t.x >= t.y+c;
  assume
A2: s.x >= s.y +c;
A3: P[s] by A2;
  assume
A4: for t be 0-started State of SCMPDS,Q
   st t.x >= t.y +c & t.a=s.a & t.b > 0 holds
   IExec(J,Q,t).a=t.a & IExec(J,Q,t).b=t.b-n &
I is_closed_on t,Q
 & I is_halting_on t,Q &
  IExec(J,Q,t).x>=IExec(J,Q,t).y+c;
A5: now
    let t be 0-started State of SCMPDS, Q;
    assume that
A6: P[t] and
A7: t.a=s.a & t.b > 0;
    consider v be State of SCMPDS such that
A8: v= t and
A9: v.x>=v.y+c by A6;
    thus IExec(J,Q,t).a=t.a & IExec(J,Q,t).b=t.b-n &
    I is_closed_on t,Q & I
    is_halting_on t,Q by A4,A7,A8,A9;
    thus P[Initialize IExec(J,Q,t)]
    proof
      take v=Initialize  IExec(J,Q,t);
      thus v=Initialize  IExec(J,Q,t);
      v.x=IExec(J,Q,t).x by SCMPDS_5:15;
      then v.x>=IExec(J,Q,t).y+c by A4,A7,A8,A9;
      hence thesis by SCMPDS_5:15;
    end;
  end;
  for-down(a,i,n,I) is_closed_on s,P &
  for-down(a,i,n,I) is_halting_on s,P
   from ForDownHalt(A1,A3,A5);
  hence thesis;
end;
