reserve s for State of SCM+FSA,
  a, c for read-write Int-Location,
  aa, bb, cc,
  dd, x for Int-Location,
  f for FinSeq-Location,
  I, J for MacroInstruction of SCM+FSA,
  Ig for good MacroInstruction of SCM+FSA,
  i, k for Nat,
  p for Instruction-Sequence of SCM+FSA;
reserve I for MacroInstruction of SCM+FSA;

theorem Th20:
  {aa, bb, cc} \/ UsedILoc I c= UsedILoc for-up(aa, bb, cc, I)
proof
  set aux = 1-stRWNotIn ({aa, bb, cc} \/ UsedILoc I);
  set i0 = aux := cc;
  set i1 = SubFrom(aux, bb);
  set i2 = AddTo(aux, intloc 0);
  set i3 = aa := bb;
  set I4 = while>0( aux, I ";" AddTo(aa, intloc 0) ";" SubFrom(aux, intloc 0));
A1: UsedILoc (i0 ";" i1 ";" i2 ";" i3) = UsedILoc (i0 ";" i1 ";" i2) \/
  UsedIntLoc i3 by SF_MASTR:30
    .= UsedILoc (i0 ";" i1) \/ (UsedIntLoc i2) \/ UsedIntLoc i3 by SF_MASTR:30
    .= (UsedIntLoc i0) \/ (UsedIntLoc i1) \/ (UsedIntLoc i2) \/ UsedIntLoc
  i3 by SF_MASTR:31
    .= {aux, cc} \/ (UsedIntLoc i1) \/ (UsedIntLoc i2) \/ UsedIntLoc i3 by
SF_MASTR:14
    .= {aux, cc} \/ {aux, bb} \/ (UsedIntLoc i2) \/ UsedIntLoc i3 by
SF_MASTR:14
    .= {aux, cc} \/ {aux, bb} \/ {aux, intloc 0} \/ UsedIntLoc i3 by
SF_MASTR:14
    .= {aux, cc} \/ {aux, bb} \/ {aux, intloc 0} \/ {aa, bb} by SF_MASTR:14;
  let x be object;
A2: UsedILoc I4 = {aux} \/ UsedILoc (I ";" AddTo(aa, intloc 0) ";"
  SubFrom(aux, intloc 0)) by SCMFSA9A:24
    .= {aux} \/ (UsedILoc (I ";" AddTo(aa, intloc 0)) \/ UsedIntLoc
  SubFrom(aux, intloc 0)) by SF_MASTR:30
    .= {aux} \/ (((UsedILoc I) \/ UsedIntLoc AddTo(aa, intloc 0)) \/
  UsedIntLoc SubFrom(aux, intloc 0)) by SF_MASTR:30
    .= {aux} \/ ((UsedILoc I) \/ ((UsedIntLoc AddTo(aa, intloc 0)) \/
  UsedIntLoc SubFrom(aux, intloc 0))) by XBOOLE_1:4
    .= (UsedILoc I) \/ ({aux} \/ (UsedIntLoc AddTo(aa, intloc 0) \/
  UsedIntLoc SubFrom(aux, intloc 0))) by XBOOLE_1:4;
  assume x in {aa, bb, cc} \/ UsedILoc I;
  then
A3: x in {aa, bb, cc} or x in UsedILoc I by XBOOLE_0:def 3;
A4: UsedILoc for-up(aa, bb, cc, I) = (UsedILoc (i0 ";" i1 ";" i2 ";" i3)
  ) \/ UsedILoc I4 by SF_MASTR:27;
  per cases by A3,ENUMSET1:def 1;
  suppose
    x = aa;
    then x in {aa, bb} by TARSKI:def 2;
    then x in UsedILoc (i0 ";" i1 ";" i2 ";" i3) by A1,XBOOLE_0:def 3;
    hence thesis by A4,XBOOLE_0:def 3;
  end;
  suppose
    x = bb;
    then x in {aa, bb} by TARSKI:def 2;
    then x in UsedILoc (i0 ";" i1 ";" i2 ";" i3) by A1,XBOOLE_0:def 3;
    hence thesis by A4,XBOOLE_0:def 3;
  end;
  suppose
    x = cc;
    then x in {aux, cc} by TARSKI:def 2;
    then x in {aux, cc} \/ {aux, bb} by XBOOLE_0:def 3;
    then x in {aux, cc} \/ {aux, bb} \/ {aux, intloc 0} by XBOOLE_0:def 3;
    then x in {aux, cc} \/ {aux, bb} \/ {aux, intloc 0} \/ {aa, bb}by
XBOOLE_0:def 3;
    hence thesis by A1,A4,XBOOLE_0:def 3;
  end;
  suppose
    x in UsedILoc I;
    then x in UsedILoc I4 by A2,XBOOLE_0:def 3;
    hence thesis by A4,XBOOLE_0:def 3;
  end;
end;
