reserve x, x1, x2, y, X, D for set,
  i, j, k, l, m, n, N for Nat,
  p, q for XFinSequence of NAT,
  q9 for XFinSequence,
  pd, qd for XFinSequence of D;

theorem Th11:
  p is dominated_by_0 & 2*Sum (p|k)=k implies k <= len p & len (p| k) = k
proof
  assume
A1: p is dominated_by_0 & 2 * Sum (p|k)=k;
A2: k <= len p
  proof
A3: p|len p=p;
    assume
A4: k > len p;
    then Segm len p c= Segm k by NAT_1:39;
    then p|k=p by RELAT_1:68;
    hence thesis by A1,A4,A3;
  end;
  then Segm k c= Segm len p by NAT_1:39;
  then dom p/\k=k by XBOOLE_1:28;
  hence thesis by A2,RELAT_1:61;
end;
