reserve a,b,c,k,m,n for Nat;
reserve i,j,x,y for Integer;
reserve p,q for Prime;
reserve r,s for Real;

theorem
  n > 0 implies
  ex f being positive-yielding FinSequence of NAT st
  len f = n & Sum f = Product f
  proof
    assume
A1: n > 0;
    (n = 0 or ... or n = 2) or n > 2;
    then per cases by A1;
    suppose
A2:   n = 1;
      set f = <*the positive Nat*>;
      reconsider f as positive-yielding FinSequence of NAT by FINSEQ_1:103;
      take f;
      thus len f = n by A2,FINSEQ_1:39;
      thus thesis;
    end;
    suppose n >= 2;
      then reconsider n2 = n-2 as Element of NAT by INT_1:5;
      set g = n2|->1;
      set f = g^<*2,n*>;
      reconsider f as positive-yielding FinSequence of NAT
      by A1,FINSEQ_1:102;
      take f;
      len <*2,n*> = 2 by FINSEQ_1:44;
      hence n = len g + len <*2,n*>
      .=  len f by FINSEQ_1:22;
A3:   Product <*2,n*> = 2*n by RVSUM_1:99;
A4:   Product g = 1 by RVSUM_1:102;
A5:   Sum <*2,n*> = 2+n by RVSUM_1:77;
A6:   Sum g = (n-2)*1 by RVSUM_1:80;
      thus Sum f = Sum g + Sum <*2,n*> by RVSUM_1:75
      .= Product g * Product <*2,n*> by A3,A4,A5,A6
      .= Product f by RVSUM_1:97;
    end;
  end;
