reserve x for set,
  m,n for Nat,
  a,b for Int_position,
  i,j,k for Instruction of SCMPDS,
  s,s1,s2 for State of SCMPDS,
  k1,k2 for Integer,
  loc,l for Nat,
  I,J,K for Program of SCMPDS;
reserve P,P1,P2,Q for Instruction-Sequence of SCMPDS;

theorem Th48:
  for s being 0-started State of SCMPDS st s.GBP=0 holds for-down(GBP,2,1,
  Load AddTo(GBP,3,1)) is_closed_on s,P
   & for-down(GBP,2,1, Load AddTo(GBP,3,1)) is_halting_on s,P
proof
  set I= Load AddTo(GBP,3,1);
  let s be 0-started State of SCMPDS;
  assume
A1: s.GBP=0;
  per cases;
  suppose
    s.DataLoc(s.GBP,2) <= 0;
    hence thesis by Th42;
  end;
  suppose
A2: s.DataLoc(s.GBP,2) > 0;
A3: now
      set cv=DataLoc(s.GBP,2);
      let t be 0-started State of SCMPDS;
      let Q;
A4: Initialize t = t by MEMSTR_0:44;
      assume that
      for x be Int_position st x in {GBP} holds t.x=s.x and
A5:   t.GBP=s.GBP;
      set t0=Initialize t;
      t0.GBP=0 by A1,A5,SCMPDS_5:15;
      then
A6:   DataLoc(t0.GBP,3)=intpos((0 qua Nat)+3) by SCMP_GCD:1;
      thus
A7:   IExec(I,Q,t).GBP=Exec(AddTo(GBP,3,1),t0).GBP by A4,SCMPDS_5:40
        .=t0.GBP by A6,AMI_3:10,SCMPDS_2:48
        .=t.GBP by SCMPDS_5:15;
A8:   cv=intpos((0 qua Nat)+2) by A1,SCMP_GCD:1;
      thus IExec(I,Q,t).cv=Exec(AddTo(GBP,3,1),t0).cv by A4,SCMPDS_5:40
        .=t0.cv by A6,A8,AMI_3:10,SCMPDS_2:48
        .=t.cv by SCMPDS_5:15;
      thus I is_closed_on t,Q & I is_halting_on t,Q by SCMPDS_6:20,21;
        let y be Int_position;
        assume
        y in {GBP};
        then y=GBP by TARSKI:def 1;
        hence IExec(I,Q,t).y=t.y by A7;
    end;
    DataLoc(s.GBP,2)=intpos((0 qua Nat)+2) by A1,SCMP_GCD:1;
    then DataLoc(s.GBP,2) <> GBP by AMI_3:10;
    then not DataLoc(s.GBP,2) in {GBP} by TARSKI:def 1;
    hence thesis by A1,A2,A3,Th46;
  end;
end;
