reserve P,Q for Instruction-Sequence of SCM+FSA;
reserve m, n for Nat;
reserve f for FinSeq-Location,
  c for Int-Location;
reserve s for State of SCM+FSA,
  I for MacroInstruction of SCM+FSA,
  a for read-write Int-Location;
reserve i,k,m,n for Nat;
reserve s for State of SCM+FSA,
  I for MacroInstruction of SCM+FSA,
  a for read-write Int-Location;

theorem Th20:
  for I being parahalting really-closed MacroInstruction of SCM+FSA,
      a being read-write
  Int-Location, s being State of SCM+FSA st
  ex f being Function of product the_Values_of SCM+FSA,NAT st (for k being Nat
 holds (f.(StepWhile>0(a,I,P,s).(k+
  1)) < f.(StepWhile>0(a,I,P,s).k) or f.(StepWhile>0(a,I,P,s).k) = 0) & ( f.(
StepWhile>0(a,I,P,s).k)=0 iff (StepWhile>0(a,I,P,s).k).a <= 0 ) )
 holds while>0(a,I) is_halting_on s,P
proof
  let I be parahalting really-closed MacroInstruction of SCM+FSA,
      a be read-write Int-Location,s be State of SCM+FSA;
A1: for k being Nat holds
    I is_halting_on StepWhile>0(a,I,P,s).k,P+*while>0(a,I) by SCMFSA7B:19;
  assume ex f being Function of product the_Values_of SCM+FSA,NAT st for
k being Nat holds (f.(StepWhile>0(a,I,P,s).(k+1)) < f.(StepWhile>0(a,I,P,s).k)
 or f
.(StepWhile>0(a,I,P,s).k) = 0) & ( f.(StepWhile>0(a,I,P,s).k)=0
 iff (StepWhile>0(a,I,P,s).k).a <= 0 );
  hence thesis by A1,Th19;
end;
