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 Th37:
  StepWhile>0(a,I,p,s).k.a <= 0 implies for n being Nat
     st k <= n
    holds DataPart StepWhile>0(a,I,p,s).n = DataPart StepWhile>0(a,I,p,s).k
proof
  set SW = StepWhile>0(a,I,p,s),
      PW = p +* while>0(a,I);
  defpred P[Nat] means k <= $1 implies DataPart SW.$1 = DataPart SW.k;
  assume
A1: StepWhile>0(a,I,p,s).k.a <= 0;
A2: now
    let n be Nat such that
A3: P[n];
    thus P[n+1]
    proof
      assume
A4:   k <= n+1;
      per cases by A4,NAT_1:8;
      suppose
A5:     k <= n;
        then SW.n.a <= 0 by A1,A3,SCMFSA_M:2;
        hence thesis by A3,A5,Th31;
      end;
      suppose
        k = n+1;
        hence thesis;
      end;
    end;
  end;
A6: P[0];
  thus for n being Nat holds P[n] from NAT_1:sch 2(A6, A2 );
end;
