reserve n,m,k,k1,k2,i,j for Nat;
reserve x,y,z for object,X,Y,Z for set;
reserve A for Subset of X;
reserve B,A1,A2,A3 for SetSequence of X;
reserve Si for SigmaField of X;
reserve S,S1,S2,S3 for SetSequence of Si;

theorem Th2:
  for f being sequence of Y holds {f.k1: n <= k1} = {f.k2 : n+1
  <=k2} \/ {f.n}
proof
  let f be sequence of Y;
  set Z1 = {f.k1:n <= k1};
  set Z2 = {f.k2:(n+1) <= k2};
A1: Z2 \/ {f.n} c= Z1
  proof
    let x be object;
    assume
A2: x in Z2 \/ {f.n};
    now
      per cases by A2,XBOOLE_0:def 3;
      case
        x in Z2;
        then consider z such that
A3:     x = z and
A4:     z in Z2;
        consider k11 being Nat such that
A5:     z=f.k11 and
A6:     n+1 <= k11 by A4;
        n <= k11 by A6,NAT_1:13;
        hence thesis by A3,A5;
      end;
      case
        x in {f.n};
        then x = f.n by TARSKI:def 1;
        hence thesis;
      end;
    end;
    hence thesis;
  end;
  {f.k1: n <= k1} c= {f.k2 : n+1 <= k2} \/ {f.n}
  proof
    let x be object;
    assume x in Z1;
    then consider z such that
A7: x=z and
A8: z in Z1;
    consider k such that
A9: z = f.k & n <= k by A8;
    z = f.k & n+1 <= k or z = f.k & n = k by A9,Lm1;
    then z in Z2 or z in {f.n} by TARSKI:def 1;
    hence thesis by A7,XBOOLE_0:def 3;
  end;
  hence thesis by A1,XBOOLE_0:def 10;
end;
