reserve x,y,y1,y2 for set,
  D for non empty set,
  d,d1,d2,d3 for Element of D,
  F,G,H,H1,H2 for FinSequence of D,
  f,f1,f2 for sequence of D,
  g for BinOp of D,
  k,n,i,l for Nat,
  P for Permutation of dom F;

theorem Th5:
  g is associative & (g is having_a_unity or len F >= 1 & len G >=
  1) implies g "**" (F ^ G) = g.(g "**" F,g "**" G)
proof
  defpred P[FinSequence of D] means for F,g st g is associative & (g is
having_a_unity or len F >= 1 & len $1 >= 1) holds g "**" (F ^ $1) = g.(g "**" F
  ,g "**" $1);
A1: for G,d st P[G] holds P[G ^ <* d *>]
  proof
    let G,d;
    assume
A2: P[G];
    let F,g;
    assume that
A3: g is associative and
A4: g is having_a_unity or len F >= 1 & len(G ^ <* d *>) >= 1;
A5: now
A6:   len(F ^ G) = len F + len G by FINSEQ_1:22;
      assume not g is having_a_unity;
      hence len(F ^ G) >= 1 by A4,A6,NAT_1:12;
    end;
A7: g "**" (F ^ (G ^ <* d *>)) = g "**" (F ^ G ^ <* d *>) by FINSEQ_1:32
      .= g.(g "**" (F ^ G),d) by A5,Th4;
    now
      per cases;
      suppose
A8:     len G <> 0;
        then len G >= 1 by NAT_1:14;
        hence
        g "**" (F ^ (G ^ <* d *>)) = g.(g.(g "**" F,g "**" G),d) by A2,A3,A4,A7
          .= g.(g "**" F,g.(g "**" G,d)) by A3,BINOP_1:def 3
          .= g.(g "**" F,g "**" (G ^ <* d *>)) by A8,Th4,NAT_1:14;
      end;
      suppose
        len G = 0;
        then
A9:     G = {};
        hence g "**" (F ^ (G ^ <* d *>)) = g "**" (F ^ <* d *>) by FINSEQ_1:34
          .= g.(g "**" F,d) by A4,Th4
          .= g.(g "**" F,g "**" <* d *>) by Lm4
          .= g.(g "**" F,g "**" (G ^ <* d *>)) by A9,FINSEQ_1:34;
      end;
    end;
    hence thesis;
  end;
A10: P[<*>D]
  proof
    let F,g;
    assume that
    g is associative and
A11: g is having_a_unity or len F >= 1 & len <*>D >= 1;
    thus g "**" (F ^ <*>D) = g "**" F by FINSEQ_1:34
      .= g.(g "**" F,the_unity_wrt g) by A11,SETWISEO:15
      .= g.(g "**" F,g "**" <*>D) by A11,Lm3;
  end;
  for G holds P[G] from FINSEQ_2:sch 2(A10,A1);
  hence thesis;
end;
