
theorem NF300:
  for a being non empty at_most_one FinSequence of REAL holds
  ex k being Nat st
  ex f being non empty FinSequence of NAT st
  dom f = dom a &
  (for j being Nat st j in rng f holds SumBin (a, f, {j}) <= 1) &
  k = card rng f
  proof
    let a be non empty at_most_one FinSequence of REAL;
    set k1 = len a, f1 = idseq k1;
    L591: for j being Nat st j in rng f1 holds SumBin (a, f1, {j}) <= 1
    proof
      let j be Nat;

      assume L5910: j in rng f1; then

      L59115: {j} c= Seg k1 by ZFMISC_1:31;
      then L5913: f1 " {j} = {j} by FUNCT_2:94;
      then f1 " {j} c= dom a by L59115,FINSEQ_1:def 3;
      then L5918: a | (f1 " {j}) = {[j, a . j]}
      by L5913,ZFMISC_1:31,GRFUNC_1:28;

      dom {[j, a . j]} = {j} by RELAT_1:9;
      then {[j, a . j]} is FinSubsequence-like by L5910,ZFMISC_1:31;
      then reconsider jaj = {[j, a . j]} as FinSubsequence;

      Seq (a, (f1 " {j}))
       = Seq jaj by L5918
      .= <* a . j *> by FINSEQ_3:157;
      then L5919: SumBin (a, f1, {j}) = a . j by RVSUM_1:73;

      L59192: 1 <= j & j <= len a by L5910,FINSEQ_1:1;

      a is at_most_one;
      hence SumBin (a, f1, {j}) <= 1 by L5919,L59192;
    end;

    L592: rng f1 = Seg k1;

    take k1;

    ex f being non empty FinSequence of NAT st
    dom f = dom a &
    (for j being Nat st j in rng f holds SumBin (a, f, {j}) <= 1) &
    k1 = card rng f
    proof
      reconsider f1 as non empty FinSequence of NAT by L592,FINSEQ_1:def 4;

      take f1;

      thus thesis by FINSEQ_1:def 3,L591,FINSEQ_1:57;
    end;
    hence thesis;
  end;
