reserve a,b,c,k,m,n for Nat;
reserve i,j for Integer;
reserve p for Prime;

theorem Th22:
  for f being with_values_greater_or_equal_one real-valued FinSequence
  holds Product(f|n) <= Product f
  proof
    let f be with_values_greater_or_equal_one real-valued FinSequence;
    per cases;
    suppose
A1:   n <= len f;
      defpred P[FinSequence of REAL] means
      for g being with_values_greater_or_equal_one real-valued FinSequence st
      g = $1 & n <= len g holds Product(g|n) <= Product g;
A2:   P[<*>REAL];
A3:   for p being FinSequence of REAL for x being Element of REAL st
      P[p] holds P[p^<*x*>]
      proof
        let p be FinSequence of REAL;
        let x be Element of REAL such that
A4:     P[p];
        let g be with_values_greater_or_equal_one real-valued FinSequence
        such that
A5:     g = p^<*x*> and
A6:     n <= len g;
A7:     len g = len p + len <*x*> by A5,FINSEQ_1:22;
A8:     len <*x*> = 1 by FINSEQ_1:39;
        then per cases by A6,A7,XXREAL_0:1;
        suppose
A9:       n < len p + 1;
          then n <= len p by NAT_1:13;
          then
A10:      (p^<*x*>)|n = p|n by FINSEQ_5:22;
A11:      Product g = Product p * x by A5,RVSUM_1:96;
A12:      p is with_values_greater_or_equal_one real-valued by A5,Th19;
          then
A13:      Product(p|n) <= Product p by A4,A9,NAT_1:13;
          <*x*> is with_values_greater_or_equal_one real-valued by A5,Th19;
          then Product p * 1 <= Product p * x by A12,XREAL_1:64,Th20;
          hence Product(g|n) <= Product g by A5,A10,A11,A13,XXREAL_0:2;
        end;
        suppose n = len p + 1;
          hence Product(g|n) <= Product g by A7,A8;
        end;
      end;
A14:  for p being FinSequence of REAL holds P[p] from FINSEQ_2:sch 2(A2,A3);
      f is FinSequence of REAL by FINSEQ_1:106;
      hence thesis by A1,A14;
    end;
    suppose n > len f;
      hence thesis by FINSEQ_1:58;
    end;
  end;
