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 Th18:
  p is dominated_by_0 implies <%0%>^p is dominated_by_0 &
  {N: 2*Sum((<%0%>^p)|N) = N & N > 0} = {}
proof
  reconsider q=1-->0 as XFinSequence of NAT;
  assume
A1: p is dominated_by_0;
  dom q = 1 & len q = dom q;
  then
A2: q = <%q.0%> by AFINSQ_1:34;
  q is dominated_by_0 by Lm2;
then  q is dominated_by_0 & q.0 = 0;
  hence <%0%>^p is dominated_by_0 by A1,A2,Th7;
  set M={N: 2*Sum((<%0%>^p)|N)=N & N>0};
  assume M<>{};
  then consider x being object such that
A3: x in M by XBOOLE_0:def 1;
  consider i be Nat such that
  x=i and
A4: 2*Sum((<%0%>^p)|i)=i and
A5: i>0 by A3;
  reconsider i1=i-1 as Nat by A5,NAT_1:20;
  dom <%0%>=1 by AFINSQ_1:33;
  then i=dom <%0%> +i1;
  then (<%0%>^p)|i=<%0%>^(p|i1) by AFINSQ_1:59;
  then
A6: Sum ((<%0%>^p)|i)=Sum <%0%>+ Sum (p|i1) by AFINSQ_2:55;
  Sum <%0%>=0 & i1<i1+1 by AFINSQ_2:53,NAT_1:13;
  hence thesis by A1,A4,A6,Th2;
end;
