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 Th30:
  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 I,D for X being Element of Fin I
  for Y being Element of Fin J st (for i being Element of I holds g.i=F$$(Y,(
curry f).i))& F is having_a_unity & F is commutative & F is associative holds F
  $$([:X,Y:],f)=F$$(X,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 I,D;
  let X be Element of Fin I;
  let Y be Element of Fin J;
  assume that
A1: for i being Element of I holds g.i=F$$(Y,(curry f).i) and
A2: F is having_a_unity & F is commutative & F is associative;
  defpred P[Element of Fin I] means F$$([:$1,Y:],f)=F$$($1,g);
A3: for X1 being Element of Fin I,x being Element of I holds P[X1] implies P
  [X1 \/ {.x.}]
  proof
    let X1 be Element of Fin I,x be Element of I;
    assume
A4: F$$([:X1,Y:],f)=F$$(X1,g);
    reconsider s={.x.} as Element of Fin I;
    per cases;
    suppose
      x in X1;
      then X1 \/ {x} = X1 by ZFMISC_1:40;
      hence thesis by A4;
    end;
    suppose
      not x in X1;
      then
A5:   X1 misses {x} by ZFMISC_1:50;
      then
A6:   [:X1,Y:] misses [:s,Y:] by ZFMISC_1:104;
      thus F$$([:X1 \/ {.x.},Y:],f) =F$$([:X1,Y:] \/ [:s,Y:],f)by ZFMISC_1:97
        .=F.(F $$([:X1,Y:],f),F $$([:s,Y:],f)) by A2,A6,SETWOP_2:4
        .=F.(F$$(X1,g),F$$(s,g)) by A1,A2,A4,Th29
        .=F$$(X1 \/ {.x.},g) by A2,A5,SETWOP_2:4;
    end;
  end;
A7: P[{}.I]
  proof
    reconsider T={}.[:I,J:] as Element of Fin [:I,J:];
    T=[:{}.I,Y:] by ZFMISC_1:90;
    then F $$([:{}.I,Y:],f)= the_unity_wrt F by A2,SETWISEO:31;
    hence thesis by A2,SETWISEO:31;
  end;
  for X1 being Element of Fin I holds P[X1] from SETWISEO:sch 4(A7,A3 );
  hence thesis;
end;
