reserve p,p1,p2,h for Instruction-Sequence of SCM+FSA;
reserve k, l, n for Nat,
  j for Integer,
  i,i1 for Instruction of SCM+FSA;
reserve s, s1, s2 for State of SCM+FSA,
  a for read-write Int-Location,
  b for Int-Location,
  I, J for MacroInstruction of SCM+FSA,
  Ig for good MacroInstruction of SCM+FSA,
  i, j, k, m, n for Nat;

theorem Th33: :: GoodStep0:
 for Ig being good really-closed MacroInstruction of SCM+FSA holds
  (ProperBodyWhile>0 a,Ig,s,p or Ig is parahalting) & s.intloc 0 =
  1 implies for k holds StepWhile>0(a,Ig,p,s).k.intloc 0 = 1
proof let Ig be good really-closed MacroInstruction of SCM+FSA;
  set I = Ig;
  assume that
A1: ProperBodyWhile>0 a,I,s,p or I is parahalting and
A2: s.intloc 0 = 1;
  set SW = StepWhile>0(a,I,p,s),
      PW = p +* while>0(a,I);
  defpred X[Nat] means SW.$1.intloc 0 = 1;
A3: for k being Nat st X[k] holds X[k+1]
  proof
    let k be Nat such that
A4: SW.k.intloc 0 = 1;
    per cases;
    suppose
      SW.k.a <= 0;
      then DataPart SW.(k+1) = DataPart SW.k by Th31;
      hence thesis by A4,SCMFSA_M:2;
    end;
    suppose
A5:   SW.k.a > 0;
      set SWkI = Initialized SW.k, PWI = p +* while>0(a,I) +* I;
A6:   DataPart SW.k = DataPart SWkI by A4,SCMFSA_M:19;
      set Ins = NAT;
      set SWkIS = Initialize(SW.k),
          PWIS = PW +* I;
A7:   SWkI = SWkIS by A4,SCMFSA_M:18;
A8:   ProperBodyWhile>0 a,I,s,p by A1,Th26;
      I is_halting_on SW.k ,PW by A5,A8;
      then
A9:  I is_halting_on Initialized SW.k ,PW by A6,SCMFSA8B:5;
     Initialized SW.k = Initialize Initialized(SW.k) by MEMSTR_0:44;
    then
A10:  PW +* I halts_on Initialized SW.k by A9,SCMFSA7B:def 7;
A11:  PWI halts_on SWkI by A10;
A12:  DataPart IExec(I,PW,SW.k) = DataPart Result(PWI,SWkI) by SCMFSA6B:def 1
        .= DataPart Comput(PWIS,SWkIS,LifeSpan(PWIS,SWkIS))
         by A7,A11,EXTPRO_1:23;
      DataPart SW.(k+1) = DataPart IExec(I,PW,SW.k) by A4,A5,A9,Th32;
      hence
      SW.(k+1).intloc 0 = (Comput(PWIS,SWkIS,LifeSpan(PWIS,SWkIS))).intloc 0
            by A12,SCMFSA_M:2
        .= 1 by A4,SCMFSA8C:68;
    end;
  end;
A13: X[0] by A2,SCMFSA_9:def 5;
  thus for k being Nat holds X[k] from NAT_1:sch 2(A13,A3);
end;
