reserve x,y,z,X,Y for set;
reserve X,Y for non empty set,
  f for Function of X,Y;
reserve X, Y for non empty set,
  F for (BinOp of Y),
  B for (Element of Fin X),
  f for Function of X,Y;

theorem
  F is idempotent & F is commutative & F is associative & F is
having_a_unity implies for B1,B2 being Element of Fin X holds F $$ (B1 \/ B2,f)
  = F.(F $$ (B1,f),F $$ (B2,f))
proof
  assume that
A1: F is idempotent and
A2: F is commutative & F is associative and
A3: F is having_a_unity;
  let B1,B2 be Element of Fin X;
  now
A4: {} = {}.X;
    assume
A5: B1 = {} or B2 = {};
    per cases by A5;
    suppose
A6:   B2 = {};
      hence F $$ (B1 \/ B2,f) = F.(F$$(B1,f),the_unity_wrt F) by A3,Th12
        .= F.(F $$ (B1,f),F $$ (B2,f)) by A2,A3,A4,A6,Th28;
    end;
    suppose
A7:   B1 = {};
      hence F $$ (B1 \/ B2,f) = F.(the_unity_wrt F, F$$(B2,f)) by A3,Th12
        .= F.(F $$ (B1,f),F $$ (B2,f)) by A2,A3,A4,A7,Th28;
    end;
  end;
  hence thesis by A1,A2,Th18;
end;
