reserve a, b, c, a1, a2, b1, b2 for Int-Location,
  l, l1, l2 for Nat,
  f, g, f1, f2 for FinSeq-Location,
  i, j for Instruction of SCM+FSA,
  X, Y for set;
reserve p, r for preProgram of SCM+FSA,
  I, J for Program of SCM+FSA,
  k, m, n for Nat;

theorem Th23:
  UsedIntLoc i = UsedIntLoc IncAddr(i, k)
proof
 InsCode i <= 12 by SCMFSA_2:16;
  then InsCode i = 0 or ... or InsCode i = 12;
  then per cases;
  suppose
    InsCode i = 0;
    then i = halt SCM+FSA by SCMFSA_2:95;
    hence thesis by COMPOS_0:4;
  end;
  suppose
    InsCode i = 1;
    then ex a, b st i = a:=b by SCMFSA_2:30;
    hence thesis by COMPOS_0:4;
  end;
  suppose
    InsCode i = 2;
    then ex a, b st i = AddTo(a,b) by SCMFSA_2:31;
    hence thesis by COMPOS_0:4;
  end;
  suppose
    InsCode i = 3;
    then ex a, b st i = SubFrom(a, b) by SCMFSA_2:32;
    hence thesis by COMPOS_0:4;
  end;
  suppose
    InsCode i = 4;
    then ex a, b st i = MultBy(a, b) by SCMFSA_2:33;
    hence thesis by COMPOS_0:4;
  end;
  suppose
    InsCode i = 5;
    then ex a, b st i = Divide(a, b) by SCMFSA_2:34;
    hence thesis by COMPOS_0:4;
  end;
  suppose
    InsCode i = 6;
    then consider l such that
A1: i = goto l by SCMFSA_2:35;
    IncAddr(i, k) = goto (l+k) by A1,SCMFSA_4:1;
    hence UsedIntLoc IncAddr(i, k) = {} by Th15
      .= UsedIntLoc i by A1,Th15;
  end;
  suppose
    InsCode i = 7;
    then consider l, a such that
A2: i = a=0_goto l by SCMFSA_2:36;
    IncAddr(i, k) = a=0_goto (l+k) by A2,SCMFSA_4:2;
    hence UsedIntLoc IncAddr(i, k) = {a} by Th16
      .= UsedIntLoc i by A2,Th16;
  end;
  suppose
    InsCode i = 8;
    then consider l, a such that
A3: i = a>0_goto l by SCMFSA_2:37;
    IncAddr(i, k) = a>0_goto (l+k) by A3,SCMFSA_4:3;
    hence UsedIntLoc IncAddr(i, k) = {a} by Th16
      .= UsedIntLoc i by A3,Th16;
  end;
  suppose
    InsCode i = 9;
    then ex a, b, f st i = b:=(f,a) by SCMFSA_2:38;
    hence thesis by COMPOS_0:4;
  end;
  suppose
    InsCode i = 10;
    then ex a, b, f st i = (f,a):=b by SCMFSA_2:39;
    hence thesis by COMPOS_0:4;
  end;
  suppose
    InsCode i = 11;
    then ex a, f st i = a:=len f by SCMFSA_2:40;
    hence thesis by COMPOS_0:4;
  end;
  suppose
    InsCode i = 12;
    then ex a,f st i = f:=<0,...,0>a by SCMFSA_2:41;
    hence thesis by COMPOS_0:4;
  end;
end;
