
theorem ProdReplace:
  for f be positive real-valued FinSequence,
      i,j be Nat,
      a, b be positive Real st
     i in dom f & j in dom f & i <> j holds
    Product Replace (f,i,j,a,b) = (Product f) * a * b / ((f.i) * (f.j))
  proof
    let f be positive real-valued FinSequence,
        i,j be Nat,
        a, b be positive Real;
    for n being Nat st n in dom (f+*(i,a)) holds (f+*(i,a)).n > 0
    proof
      let n be Nat;
      assume n in dom (f+*(i,a)); then
A2:   n in dom f by FUNCT_7:30;
      per cases;
      suppose n = i;
        hence thesis by A2,FUNCT_7:31;
      end;
      suppose n <> i; then
        (f+*(i,a)).n = f.n by FUNCT_7:32;
        hence thesis by PosDef,A2;
      end;
    end; then
S1: f+*(i,a) is positive;
    assume
A0: i in dom f & j in dom f & i <> j;
A1: j in dom (f +* (i,a)) by A0,FUNCT_7:30;
    Product Replace (f,i,j,a,b)
        = Product (f +* (i,a)) * b / ((f +* (i,a)).j) by A1,ProductA,S1
       .= Product (f +* (i,a)) * b / (f.j) by FUNCT_7:32,A0
       .= (Product f * a / (f.i)) * b / (f.j) by A0,ProductA
       .= (Product f * a * (1 / (f.i))) * b / (f.j) by XCMPLX_1:99
       .= Product f * a * b * (1 / (f.i)) * (1 / (f.j)) by XCMPLX_1:99
       .= Product f * a * b / (f.i) * (1 / (f.j)) by XCMPLX_1:99
       .= Product f * a * b / (f.i) / (f.j) by XCMPLX_1:99
       .= (Product f) * a * b / ((f.i) * (f.j)) by XCMPLX_1:78;
    hence thesis;
  end;
