reserve x,y,z for set;
reserve f,f1,f2,f3 for FinSequence,
  p,p1,p2,p3 for set,
  i,k for Nat;
reserve D for non empty set,
  p,p1,p2,p3 for Element of D,
  f,f1,f2 for FinSequence of D;

theorem Th48:
  k in dom f &
    (for i st 1 <= i & i < k holds f/.i <> f/.k) implies f/.k..f = k
proof
  assume that
A1: k in dom f and
A2: for i st 1 <= i & i < k holds f/.i <> f/.k;
A3: f/.k in rng f by A1,PARTFUN2:2;
  assume
A4: f/.k..f <> k;
  f/.k..f <= k by A1,FINSEQ_5:39;
  then f/.k..f < k by A4,XXREAL_0:1;
  then f/.(f/.k..f) <> f/.k by A2,A3,FINSEQ_4:21;
  hence contradiction by A3,FINSEQ_5:38;
end;
