reserve n,m,i,j,k for Nat,
  x,y,e,X,V,U for set,
  W,f,g for Function;

theorem Th2:
  for D being finite set, n being Element of NAT, X being set st X
  = {x where x is Element of D* : 1 <= len x & len x <= n } holds X is finite
proof
  let D be finite set,n be Element of NAT, X be set;
  deffunc F(Element of NAT) = $1-tuples_on D;
  consider f being Function such that
A1: dom f = Seg n & for x being Element of NAT st x in Seg n holds f.x =
  F(x) from CLASSES1:sch 2;
  assume
A2: X = {x where x is Element of D* : 1 <= len x & len x <= n };
A3: X c= Union f
  proof
    let x be object;
    assume x in X;
    then consider y being Element of D* such that
A4: x=y and
A5: 1 <= len y & len y <= n by A2;
    consider m being Nat such that
A6: dom y = Seg m by FINSEQ_1:def 2;
    m in NAT by ORDINAL1:def 12;
    then
A7: len y = m by A6,FINSEQ_1:def 3;
    then
A8: m in dom f by A1,A5,FINSEQ_1:1;
    y in { s where s is Element of D*: len s = m } by A7;
    then y in m-tuples_on D by FINSEQ_2:def 4;
    then y in f.m by A1,A8;
    hence thesis by A4,A8,CARD_5:2;
  end;
  now
    let x be object;
    assume
A9: x in dom f;
    then reconsider z=x as Element of NAT by A1;
    f.z = F(z) by A1,A9;
    hence f.x is finite;
  end;
  then Union f is finite by A1,CARD_2:88;
  hence thesis by A3;
end;
