reserve x,y,z,x1,x2,y1,y2,z1,z2 for object,
  i,j,k,l,n,m for Nat,
  D for non empty set,
  K for Ring;

theorem Th32:
  for I, J being non empty set for F being BinOp of D for f being
Function of [:I,J:],D for g being Function of J,D for X being Element of Fin I
  for Y being Element of Fin J st (for j being Element of J holds g.j=F$$ (X, (
curry' f).j) )& F is having_a_unity & F is commutative & F is associative holds
  F$$([:X,Y:],f)=F$$(Y,g)
proof
  let I, J be non empty set;
  let F be BinOp of D;
  let f be Function of [:I,J:],D;
  let g be Function of J,D;
  let X be Element of Fin I;
  let Y be Element of Fin J;
  assume that
A1: for j being Element of J holds g.j=F$$(X,(curry' f).j) and
A2: F is having_a_unity & F is commutative & F is associative;
  defpred P[Element of Fin J] means F$$([:X,$1:],f)=F$$($1,g);
A3: for Y1 being Element of Fin J,y being Element of J holds P[Y1] implies P
  [Y1 \/ {.y.}]
  proof
    let Y1 be Element of Fin J,y be Element of J;
    assume
A4: F$$([:X,Y1:],f)=F$$(Y1,g);
    reconsider s={.y.} as Element of Fin J;
    per cases;
    suppose
      y in Y1;
      then Y1 \/ {y} = Y1 by ZFMISC_1:40;
      hence thesis by A4;
    end;
    suppose
      not y in Y1;
      then
A5:   Y1 misses {y} by ZFMISC_1:50;
      then
A6:   [:X,Y1:] misses [:X,s:] by ZFMISC_1:104;
      thus F$$([:X,Y1 \/ {.y.}:],f) =F$$([:X,Y1:] \/ [:X,s:],f)by ZFMISC_1:97
        .=F.(F $$([:X,Y1:],f),F $$([:X,s:],f)) by A2,A6,SETWOP_2:4
        .=F.(F$$(Y1,g),F$$(s,g)) by A1,A2,A4,Th31
        .=F$$(Y1 \/ {.y.},g) by A2,A5,SETWOP_2:4;
    end;
  end;
A7: P[{}.J]
  proof
    reconsider T={}.[:I,J:] as Element of Fin [:I,J:];
    T=[:X,{}.J:] by ZFMISC_1:90;
    then F $$([:X,{}.J:],f)= the_unity_wrt F by A2,SETWISEO:31;
    hence thesis by A2,SETWISEO:31;
  end;
  for Y1 being Element of Fin J holds P[Y1] from SETWISEO:sch 4(A7,A3 );
  hence thesis;
end;
