
theorem Th57:
for X be non empty set, F be sequence of X, n be Nat
 holds rng(F|Segm(n+1)) = rng(F|Segm n) \/ {F.n}
proof
   let X be non empty set, F be sequence of X, n be Nat;
   now let y be object;
    assume y in rng(F|Segm(n+1)); then
    consider x be object such that
A1:  x in dom(F|Segm(n+1)) & y = (F|Segm(n+1)).x by FUNCT_1:def 3;
    reconsider x as Nat by A1;
A4: y = F.x by A1,FUNCT_1:47;
    x in dom F /\ Segm(n+1) by A1,RELAT_1:61; then
A2: x in dom F & x in Segm(n+1) by XBOOLE_0:def 4;
    x < n+1 by A2,NAT_1:44; then
A3: x <= n by NAT_1:13;
    per cases;
    suppose x = n; then
     y in {F.n} by A4,TARSKI:def 1;
     hence y in rng(F|Segm n) \/ {F.n} by XBOOLE_0:def 3;
    end;
    suppose x <> n; then
     x < n by A3,XXREAL_0:1; then
     x in Segm n by NAT_1:44; then
     x in dom F /\ Segm n by A2,XBOOLE_0:def 4; then
     x in dom(F|Segm n) by RELAT_1:61; then
     (F|Segm n).x in rng(F|Segm n) & (F|Segm n).x = F.x by FUNCT_1:3,47;
     hence y in rng(F|Segm n) \/ {F.n} by A4,XBOOLE_0:def 3;
    end;
   end; then
A5:rng(F|Segm(n+1)) c= rng(F|Segm n) \/ {F.n} by TARSKI:def 3;

   now let y be object;
    assume A6: y in rng(F|Segm n) \/ {F.n};
    per cases by A6,XBOOLE_0:def 3;
    suppose A7: y in rng(F|Segm n);
     n <= n+1 by NAT_1:11; then
     F|Segm n c= F|Segm(n+1) by NAT_1:39,RELAT_1:75; then
     rng(F|Segm n) c= rng(F|Segm(n+1)) by RELAT_1:11;
     hence y in rng(F|Segm(n+1)) by A7;
    end;
    suppose y in {F.n}; then
A8:  y = F.n by TARSKI:def 1;
     n in NAT by ORDINAL1:def 12; then
     n in dom F & n in Segm(n+1) by FUNCT_2:def 1,NAT_1:45; then
     n in dom F /\ Segm(n+1) by XBOOLE_0:def 4; then
A9:  n in dom(F|Segm(n+1)) by RELAT_1:61; then
     F.n = (F|Segm(n+1)).n by FUNCT_1:47;
     hence y in rng(F|Segm(n+1)) by A8,A9,FUNCT_1:3;
    end;
   end; then
   rng(F|Segm n) \/ {F.n} c= rng(F|Segm(n+1)) by TARSKI:def 3;
   hence thesis by A5,XBOOLE_0:def 10;
end;
