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;
reserve s, s1, s2 for State of SCM+FSA,
  p, p1 for Instruction-Sequence of SCM+FSA,
  a, b for Int-Location,
  d for read-write Int-Location,
  f for FinSeq-Location,
  I for MacroInstruction of SCM+FSA,
  J for good MacroInstruction of SCM+FSA,
  k, m, n for Nat;
reserve a for read-write Int-Location;

theorem Th51:
 for J being good really-closed MacroInstruction of SCM+FSA holds
  J does not destroy a &
  ProperTimesBody a,J,s,p implies for k st k <= s.a holds
  StepTimes(a,J,p,s).k.intloc 0 = 1
proof let J be good really-closed MacroInstruction of SCM+FSA;
  set I = J;
  set ST = StepTimes(a,I,p,s);
  set Is = Initialized s;
  defpred X[Nat] means $1 <= s.a implies ST.$1.intloc 0 = 1;
  assume
A1: J does not destroy a;
  assume
A2: ProperTimesBody a,I,s,p;
A3: for k being Nat st X[k] holds X[k+1]
  proof
    let k be Nat;
    assume that
A4: k <= s.a implies ST.k.intloc 0 = 1 and
A5: k+1 <= s.a;
    reconsider sa = s.a as Element of NAT by A5,INT_1:3;
A6: k < sa by A5,NAT_1:13;
    then I is_halting_on ST.k,p+*Times(a,I) by A2;
    hence thesis by A4,A6,Th48,A1;
  end;
A7: X[0]
  proof
    assume 0 <= s.a;
    thus ST.0.intloc 0 = Is.intloc 0 by SCMFSA_9:def 5
      .= 1 by SCMFSA_M:9;
  end;
  thus for k holds X[k] from NAT_1:sch 2(A7, A3);
end;
