reserve x,y,z, X,Y,Z for set,
  n for Element of NAT;
reserve A for set,
  D for non empty set,
  a,b,c,l,r for Element of D,
  o,o9 for BinOp of D,
  f,g,h for Function of A,D;
reserve G for non empty multMagma;
reserve A for non empty set,
  a for Element of A,
  p for FinSequence of A,
  m1,m2 for Multiset of A;
reserve p,q for FinSequence of A;
reserve fm for Element of finite-MultiSet_over A;
reserve a,b,c for Element of D;

theorem Th51:
  a is_a_unity_wrt o implies o.:[:{a},X:] = D /\ X & o.:[:X,{a}:] = D /\ X
proof
  assume
A1: a is_a_unity_wrt o;
  thus o.:[:{a},X:] c= D /\ X
  proof
    let x be object;
    assume x in o.:[:{a},X:];
    then consider y being object such that
A2: y in dom o and
A3: y in [:{a},X:] and
A4: x = o.y by FUNCT_1:def 6;
    reconsider y as Element of [:D,D:] by A2;
A5: x = o.(y`1,y`2) by A4,MCART_1:21;
A6: y = [y`1,y`2] by MCART_1:21;
    then y`1 in {a} by A3,ZFMISC_1:87;
    then
A7: y`1 = a by TARSKI:def 1;
A8: o.(a,y`2) = y`2 by A1,BINOP_1:3;
    y`2 in X by A3,A6,ZFMISC_1:87;
    hence thesis by A5,A8,A7,XBOOLE_0:def 4;
  end;
A9: dom o = [:D,D:] by FUNCT_2:def 1;
  thus D /\ X c= o.:[:{a},X:]
  proof
    let x be object;
A10: a in {a} by TARSKI:def 1;
    assume
A11: x in D /\ X;
    then reconsider d = x as Element of D by XBOOLE_0:def 4;
A12: x = o.(a,d) by A1,BINOP_1:3
      .= o.[a,x];
    x in X by A11,XBOOLE_0:def 4;
    then [a,d] in [:{a},X:] by A10,ZFMISC_1:87;
    hence thesis by A9,A12,FUNCT_1:def 6;
  end;
  thus o.:[:X,{a}:] c= D /\ X
  proof
    let x be object;
    assume x in o.:[:X,{a}:];
    then consider y being object such that
A13: y in dom o and
A14: y in [:X,{a}:] and
A15: x = o.y by FUNCT_1:def 6;
    reconsider y as Element of [:D,D:] by A13;
A16: x = o.(y`1,y`2) by A15,MCART_1:21;
A17: y = [y`1,y`2] by MCART_1:21;
    then y`2 in {a} by A14,ZFMISC_1:87;
    then
A18: y`2 = a by TARSKI:def 1;
A19: o.(y`1,a) = y`1 by A1,BINOP_1:3;
    y`1 in X by A14,A17,ZFMISC_1:87;
    hence thesis by A16,A19,A18,XBOOLE_0:def 4;
  end;
  thus D /\ X c= o.:[:X,{a}:]
  proof
    let x be object;
A20: a in {a} by TARSKI:def 1;
    assume
A21: x in D /\ X;
    then reconsider d = x as Element of D by XBOOLE_0:def 4;
A22: x = o.(d,a) by A1,BINOP_1:3
      .= o.[x,a];
    x in X by A21,XBOOLE_0:def 4;
    then [d,a] in [:X,{a}:] by A20,ZFMISC_1:87;
    hence thesis by A9,A22,FUNCT_1:def 6;
  end;
end;
