reserve i,j,k,n for Nat;
reserve D for non empty set,
  p for Element of D,
  f,g for FinSequence of D;

theorem Th39:
  i in dom f implies f/.i..f <= i
proof
  set p = f/.i;
A1: p..f = Sgm(f"{p}).1 by FINSEQ_4:def 4;
  f"{p} c= dom f by RELAT_1:132;
  then f"{p} c= Seg len f by FINSEQ_1:def 3;
    then
a2: f"{p} is included_in_Seg;
  assume
A3: i in dom f;
  then f/.i = f.i by PARTFUN1:def 6;
  then f.i in {p} by TARSKI:def 1;
  then i in f"{p} by A3,FUNCT_1:def 7;
  then i in rng Sgm(f"{p}) by a2,FINSEQ_1:def 14;
  then consider l being object such that
A4: l in dom Sgm(f"{p}) and
A5: Sgm(f"{p}).l = i by FUNCT_1:def 3;
  reconsider l as Element of NAT by A4;
  1 <= l & l <= len(Sgm(f"{p})) by A4,FINSEQ_3:25;
  hence thesis by a2,A1,A5,FINSEQ_3:41;
end;
