reserve k,n for Nat,
  x,y,z,y1,y2 for object,X,Y for set,
  f,g for Function;
reserve p,q,r,s,t for XFinSequence;
reserve D for set;

theorem Th42:
  for x1, x2, x3, x4 being set st
   p = <%x1%>^<%x2%>^<%x3%>^<%x4%>
  holds len p = 4 & p.0 = x1 & p.1 = x2 & p.2 = x3 & p.3 = x4
proof
  let x1, x2, x3, x4 be set;
  assume
A1: p = <%x1%>^<%x2%>^<%x3%>^<%x4%>;
  set p13 = <%x1%>^<%x2%>^<%x3%>;
A2: p13 = <%x1, x2, x3%>;
  then
A3: len p13 = 3 by Th36;
A4: p13.0 = x1 & p13.1 = x2 by A2;
A5: p13.2 = x3 by A2;
  thus len p = len p13 + len <%x4%> by A1,Def3
    .= 3 + 1 by A3,Th30
    .= 4;
   0 in 3 & 1 in 3 & 2 in 3 by CARD_1:51,ENUMSET1:def 1;
  hence p.0 = x1 & p.1 = x2 & p.2 = x3 by A1,A4,A5,Def3,A3;
  thus p.3 = p.len p13 by A2,Th36
    .= x4 by A1,Th33;
end;
