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
 for Ig being good really-closed MacroInstruction of SCM+FSA holds
  s1.intloc 0 = 1 & DataPart s1 = DataPart s2 &
   ProperBodyWhile>0 a,Ig,s1,p1 & WithVariantWhile>0 a,Ig,s1,p1
    implies WithVariantWhile>0 a,Ig,s2,p2
proof let Ig be good really-closed MacroInstruction of SCM+FSA;
  set I = Ig;
  assume that
A1: s1.intloc 0 = 1 and
A2: DataPart s1 = DataPart s2 and
A3: ProperBodyWhile>0 a,I,s1,p1 and
A4: WithVariantWhile>0 a,I,s1,p1;
  set SW1 = StepWhile>0(a,I,p1,s1);
  consider f being Function of product the_Values_of SCM+FSA, NAT such
  that
A5: f is on_data_only and
A6: for k being Nat holds (f.(SW1.(k+1)) < f.(SW1.k) or SW1.k
  .a <= 0 ) by A1,A3,A4,Th40;
  take f;
  let k be Nat;
  set SW2 = StepWhile>0(a,I,p2,s2);
  DataPart SW1.(k+1) = DataPart SW2.(k+1) by A2,A3,Th34;
  then
A7: f.(SW1.(k+1)) = f.(SW2.(k+1)) by A5;
A8: DataPart SW1.k = DataPart SW2.k by A2,A3,Th34;
  then
A9: SW1.k.a = SW2.k.a by SCMFSA_M:2;
  f.(SW1.k) = f.(SW2.k) by A5,A8;
  hence thesis by A6,A9,A7;
end;
