reserve i,j,n,k,m for Nat,
     a,b,x,y,z for object,
     F,G for FinSequence-yielding FinSequence,
     f,g,p,q for FinSequence,
     X,Y for set,
     D for non empty set;
reserve
  B,A,M for BinOp of D,
  F,G for D* -valued FinSequence,
  f for FinSequence of D,
  d,d1,d2 for Element of D;
reserve
  F,G for non-empty non empty FinSequence of D*,
  f for non empty FinSequence of D;
reserve f,g for FinSequence of D,
        a,b,c for set,
        F,F1,F2 for finite set;

theorem Th140:
  M is commutative associative & len f=2
implies
  SignGenOp(f,M,A,{2}) = M.(A.(f.1,f.2), A.(f.1,(the_inverseOp_wrt A).(f.2)))
proof
  assume
A1: M is commutative associative & len f=2;
A2: bool {2} = { {}, {2}} by ZFMISC_1:24;
  set E = (1,2)-->({},{2});
  set I=the_inverseOp_wrt A;
A3: dom E={1,2}=Seg 2 by FUNCT_4:62,FINSEQ_1:2;
  then reconsider E as FinSequence by FINSEQ_1:def 2;
A4: rng E={ {}, {2}} by FUNCT_4:64;
  1 .--> {}= {1} --> {} & 2 .--> {2}= {2} --> {2} by FUNCOP_1:def 9;
  then rng (1 .--> {}) = {{}} & rng (2 .--> {2}) = {{2}} by FUNCOP_1:8;
  then (1 .--> {})+*(2 .--> {2}) is one-to-one by FUNCT_4:92,ZFMISC_1:11;
  then E is one-to-one by FUNCT_4:def 4;
  then reconsider E as Enumeration of bool {2} by A4,A2,RLAFFIN3:def 1;
  set C=SignGenOp(f,A,bool {2});
  card bool {2}= 2 by A2,CARD_2:57;
  then len (C*E)= len E = 2 by CARD_1:def 7;
  then
A5: dom (C * E) = dom E by FINSEQ_3:30;
  then 1 in dom (C * E) & 2 in dom (C * E) by A3;
  then reconsider O=1,T=2 as Element of [#]dom (C * E);
  E.O= {} by FUNCT_4:63;
  then (C * E).O = C.{} & {} in bool {2} by FUNCT_1:12,A2,TARSKI:def 2;
  then (C * E).O = SignGen(f,A,{}) by Def12;
  then (C * E).O = f by Th71;
  then (A "**" (C * E)).O = A "**" f by Def10;
  then
A6: (A "**" (C * E)).O = A.(f.1,f.2) by A1,FINSOP_1:21;
  f is non empty by A1;
  then
A7: f|1 = <*f.1*> by FINSEQ_5:20;
  then dom (f|1) = Seg 1 ={1} by FINSEQ_1:2,38;
  then
A8: SignGen(f|1,A,{2}) = <*f.1*> by A7,Th70,ZFMISC_1:11;
  E.T= {2} by FUNCT_4:63;
  then (C * E).T = C.{2} & {2} in bool {2} by FUNCT_1:12;
  then (C * E).T = SignGen(f,A,{2}) & 1+1 in {2} by Def12,TARSKI:def 1;
  then (C * E).T = <*f.1,I.(f.2)*> by A8,A1,Th73;
  then
A9: len ((C * E).T) = 2 & ((C * E).T).1 = f.1 & ((C * E).T).2 = I.(f.2)
  by FINSEQ_1:44;
  (A "**" (C * E)).T = A "**" ((C * E).T) by Def10;
  then
A10:(A "**" (C * E)).T = A.(f.1, I.(f.2)) by A9,FINSOP_1:21;
  SignGenOp(f,M,A,{2})= M $$ ([#]dom (C * E), A "**" (C * E)) by A1,Def13;
  hence thesis by A6,A10,A1,A5,A3,SETWOP_2:1;
end;
