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 Th33:
  {aa, bb} c= UsedILoc swap(f, aa, bb)
proof
  set a = aa, b = bb;
  set aux1 = 1-stRWNotIn {a, b}, aux2 = 2-ndRWNotIn {a, b};
  set i0 = aux1 := (f,a), i1 = aux2 := (f,b), i2 = (f,a) := aux2;
  set i3 = (f,b) := aux1;
A1: UsedILoc swap(f, a, b) = 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
    .= {aux1, a} \/ (UsedIntLoc i1) \/ (UsedIntLoc i2) \/ UsedIntLoc i3 by
SF_MASTR:17
    .= {aux1, a} \/ {aux2, b} \/ (UsedIntLoc i2) \/ UsedIntLoc i3 by
SF_MASTR:17
    .= {aux1, a} \/ {aux2, b} \/ {aux2, a} \/ UsedIntLoc i3 by SF_MASTR:17
    .= {aux1, a} \/ {aux2, b} \/ {aux2, a} \/ {aux1, b} by SF_MASTR:17;
  let x be object;
  assume
A2: x in {a, b};
  per cases by A2,TARSKI:def 2;
  suppose
    x = a;
    then x in {aux2, a} by TARSKI:def 2;
    then x in {aux1, a} \/ {aux2, b} \/ {aux2, a} by XBOOLE_0:def 3;
    hence thesis by A1,XBOOLE_0:def 3;
  end;
  suppose
    x = b;
    then x in {aux1, b} by TARSKI:def 2;
    hence thesis by A1,XBOOLE_0:def 3;
  end;
end;
