reserve X for set;
reserve a,b,c,k,m,n for Nat;
reserve i,j for Integer;
reserve r,s for Real;
reserve p,p1,p2,p3 for Prime;

theorem Th32:
  for f1,f2 being integer-valued FinSequence st len f1 = len f2 &
  for n st 1 <= n <= len f1 holds f1.n divides f2.n holds
  Product f1 divides Product f2
  proof
    let f1,f2 be integer-valued FinSequence such that
A1: len f1 = len f2 and
A2: for n st 1 <= n <= len f1 holds f1.n divides f2.n;
    per cases by NAT_1:13;
    suppose len f1 = 0;
      then f1 = {} & f2 = {} by A1;
      hence thesis;
    end;
    suppose
A3:   0+1 <= len f1;
      defpred P[Nat] means
      1 <= $1 <= len f1 implies Product(f1|$1) divides Product(f2|$1);
A4:   P[0];
A5:   P[k] implies P[k+1]
      proof
        assume that
A6:     P[k] and
A7:     1 <= k+1 and
A8:     k+1 <= len f1;
A9:     k+0 < k+1 by XREAL_1:8;
        per cases;
        suppose
A10:      k = 0;
          f1 is non empty by A8;
          then
A11:      f1|1 = <*f1.1*> by FINSEQ_5:20;
          f2 is non empty by A1,A8;
          then f2|1 = <*f2.1*> by FINSEQ_5:20;
          hence thesis by A2,A3,A10,A11;
        end;
        suppose k > 0;
          then
A12:      k >= 0+1 by NAT_1:13;
          f1|(k+1) = f1|k ^ <*f1.(k+1)*> by A8,INT_6:5;
          then
A13:      Product(f1|(k+1)) = Product(f1|k) * f1.(k+1) by RVSUM_1:96;
          f2|(k+1) = f2|k ^ <*f2.(k+1)*> by A1,A8,INT_6:5;
          then
A14:      Product(f2|(k+1)) = Product(f2|k) * f2.(k+1) by RVSUM_1:96;
          f1.(k+1) divides f2.(k+1) by A2,A7,A8;
          hence thesis by A6,A8,A9,A12,A13,A14,NEWTON02:2,XXREAL_0:2;
        end;
      end;
A15:  P[k] from NAT_1:sch 2(A4,A5);
      f1|len f1 = f1 & f2|len f2 = f2 by FINSEQ_3:113;
      hence thesis by A1,A3,A15;
    end;
  end;
