reserve x,y,z,a,b,c,X,X1,X2,Y,Z for set,
  W,W1,W2 for Tree,
  w,w9 for Element of W,
  f for Function,
  D,D9 for non empty set,
  i,k,k1,k2,l,m,n for Nat,
  v,v1,v2 for FinSequence,
  p,q,r,r1,r2 for FinSequence of NAT;
reserve C for Chain of W,
  B for Branch of W;

theorem Th24:
  for C holds { w: ex p st p in C & w is_a_prefix_of p } is Chain of W
proof
  let C;
 { w: ex p st p in C & w is_a_prefix_of p } c= W
  proof
    let x be object;
    assume x in { w: ex p st p in C & w is_a_prefix_of p };
then  ex w st x = w & ex p st p in C & w is_a_prefix_of p;
    hence thesis;
  end;
  then reconsider Z = { w: ex p st p in C & w is_a_prefix_of p } as Subset of
  W;
 Z is Chain of W
  proof
    let p,q;
    assume p in Z;
then  ex w st p = w & ex p st p in C & w is_a_prefix_of p;
    then consider r1 such that
A1: r1 in C and
A2: p is_a_prefix_of r1;
    assume q in Z;
then  ex w9 st q = w9 & ex p st p in C & w9 is_a_prefix_of p;
    then consider r2 such that
A3: r2 in C and
A4: q is_a_prefix_of r2;
 r1,r2 are_c=-comparable by A1,A3,Def3;
then  r1 is_a_prefix_of r2 or r2 is_a_prefix_of r1;
then  p is_a_prefix_of r2 or q is_a_prefix_of r1 by A2,A4;
    hence thesis by A2,A4,Th1;
  end;
  hence thesis;
end;
