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 Th36: :: IE_while_gt0:
 for I being really-closed MacroInstruction of SCM+FSA holds
  (ProperBodyWhile>0 a,I,Initialized s,p or I is parahalting) &
WithVariantWhile>0 a,I,Initialized s,p implies DataPart IExec(while>0(a,I),p,s)
  = DataPart
  StepWhile>0(a,I,p,Initialized s).ExitsAtWhile>0(a,I,p,Initialized s)
proof let I be really-closed MacroInstruction of SCM+FSA;
  set Ins = NAT;
  set WH = while>0(a, I);
  set Is = Initialized s, pds = p +* WH;
A1: Is = Initialize Is by MEMSTR_0:44;
  assume
A2: ( ProperBodyWhile>0 a,I,Initialized s,p or I is parahalting)&
  WithVariantWhile>0 a,I,Initialized s,p;
  then
A3: ex k being Nat st ExitsAtWhile>0(a,I,p,Is) = k &
 (StepWhile>0(a,I,p,Is).k).a <= 0 &
 ( for i being Nat st ( StepWhile>0(a,I,p,Is).i)
.a <= 0 holds k <= i)& DataPart (Comput(p +* while>0(a,I),
  Initialize Is, LifeSpan(p +* while>0(a,I),Initialize Is)))
  = DataPart StepWhile>0(a,I,p,Is).k
  by Def6;
  WH is_halting_on Is,p by A2,Th27,Th28;
  then
A4: pds halts_on Is by A1,SCMFSA7B:def 7;
  thus DataPart IExec(WH,p,s)
   = DataPart Result(p +* WH,Initialized s) by SCMFSA6B:def 1
    .= DataPart StepWhile>0(a,I,p,Is).ExitsAtWhile>0(a,I,p,Is) by A1,A4,A3,
EXTPRO_1:23;
end;
