reserve x,A for set, i,j,k,m,n, l, l1, l2 for Nat;
reserve D for non empty set, z for Nat;
reserve S for COM-Struct;
reserve ins for Element of the InstructionsF of S;
reserve k, m for Nat,
  x, x1, x2, x3, y, y1, y2, y3, X,Y,Z for set;

theorem Th9:
  for S being COM-Struct, F being Program of S,
  G being non empty preProgram of S
  holds dom CutLastLoc F misses dom Reloc(G,card F -' 1)
proof
  let S be COM-Struct, F be Program of S, G be non empty preProgram of S;
  set k = card F -' 1;
  assume not thesis;
  then consider il being object such that
A1: il in dom CutLastLoc F /\ dom Reloc(G,k) by XBOOLE_0:4;
A2: il in dom CutLastLoc F by A1,XBOOLE_0:def 4;
A3: il in dom Reloc(G,k) by A1,XBOOLE_0:def 4;
  dom Reloc(G,k) = { (m+k) where m is Nat:
  m in dom IncAddr(G,k) } by VALUED_1:def 12;
  then consider m being Nat such that
A4: il = (m+k) and m in dom IncAddr(G,k) by A3;
  reconsider f = CutLastLoc F as non empty NAT-defined finite Function
  by A1;
  m+k <= LastLoc f by A2,A4,VALUED_1:32;
  then
A5: m+k <= card f -' 1 by AFINSQ_1:70;
A6: card f = card F - 1 by VALUED_1:38
    .= card F -' 1 by PRE_CIRC:20;
  per cases;
  suppose k - 1 >= 0;
    then m + k <= k - 1 by A5,A6,XREAL_0:def 2;
    then m + k - k <= k - 1 - k by XREAL_1:9;
    hence thesis by Lm4;
  end;
  suppose k - 1 < 0;
    then m + k = 0 or m + k < 0 by A5,A6,XREAL_0:def 2;
    hence thesis by A6;
  end;
end;
