:: Binary Operations on Numbers
:: by Library Committee
::
:: Received June 21, 2004
:: Copyright (c) 2004-2021 Association of Mizar Users


scheme :: BINOP_2:sch 1
FuncDefUniq{ F1() -> non empty set , F2() -> non empty set , F3( Element of F1()) -> object } :
for f1, f2 being Function of F1(),F2() st ( for x being Element of F1() holds f1 . x = F3(x) ) & ( for x being Element of F1() holds f2 . x = F3(x) ) holds
f1 = f2
proof end;

scheme :: BINOP_2:sch 2
BinOpDefuniq{ F1() -> non empty set , F2( Element of F1(), Element of F1()) -> object } :
for o1, o2 being BinOp of F1() st ( for a, b being Element of F1() holds o1 . (a,b) = F2(a,b) ) & ( for a, b being Element of F1() holds o2 . (a,b) = F2(a,b) ) holds
o1 = o2
proof end;

scheme :: BINOP_2:sch 3
CFuncDefUniq{ F1( object ) -> object } :
for f1, f2 being Function of COMPLEX,COMPLEX st ( for x being Complex holds f1 . x = F1(x) ) & ( for x being Complex holds f2 . x = F1(x) ) holds
f1 = f2
proof end;

scheme :: BINOP_2:sch 4
RFuncDefUniq{ F1( Real) -> object } :
for f1, f2 being Function of REAL,REAL st ( for x being Real holds f1 . x = F1(x) ) & ( for x being Real holds f2 . x = F1(x) ) holds
f1 = f2
proof end;

registration
cluster -> rational for Element of RAT ;
coherence
for b1 being Element of RAT holds b1 is rational
by RAT_1:def 2;
end;

scheme :: BINOP_2:sch 5
WFuncDefUniq{ F1( Rational) -> object } :
for f1, f2 being Function of RAT,RAT st ( for x being Rational holds f1 . x = F1(x) ) & ( for x being Rational holds f2 . x = F1(x) ) holds
f1 = f2
proof end;

scheme :: BINOP_2:sch 6
IFuncDefUniq{ F1( Integer) -> object } :
for f1, f2 being Function of INT,INT st ( for x being Integer holds f1 . x = F1(x) ) & ( for x being Integer holds f2 . x = F1(x) ) holds
f1 = f2
proof end;

scheme :: BINOP_2:sch 7
NFuncDefUniq{ F1( Nat) -> object } :
for f1, f2 being sequence of NAT st ( for x being Nat holds f1 . x = F1(x) ) & ( for x being Nat holds f2 . x = F1(x) ) holds
f1 = f2
proof end;

scheme :: BINOP_2:sch 8
CBinOpDefuniq{ F1( Complex, Complex) -> object } :
for o1, o2 being BinOp of COMPLEX st ( for a, b being Complex holds o1 . (a,b) = F1(a,b) ) & ( for a, b being Complex holds o2 . (a,b) = F1(a,b) ) holds
o1 = o2
proof end;

scheme :: BINOP_2:sch 9
RBinOpDefuniq{ F1( Real, Real) -> object } :
for o1, o2 being BinOp of REAL st ( for a, b being Real holds o1 . (a,b) = F1(a,b) ) & ( for a, b being Real holds o2 . (a,b) = F1(a,b) ) holds
o1 = o2
proof end;

scheme :: BINOP_2:sch 10
WBinOpDefuniq{ F1( Rational, Rational) -> object } :
for o1, o2 being BinOp of RAT st ( for a, b being Rational holds o1 . (a,b) = F1(a,b) ) & ( for a, b being Rational holds o2 . (a,b) = F1(a,b) ) holds
o1 = o2
proof end;

scheme :: BINOP_2:sch 11
IBinOpDefuniq{ F1( Integer, Integer) -> object } :
for o1, o2 being BinOp of INT st ( for a, b being Integer holds o1 . (a,b) = F1(a,b) ) & ( for a, b being Integer holds o2 . (a,b) = F1(a,b) ) holds
o1 = o2
proof end;

scheme :: BINOP_2:sch 12
NBinOpDefuniq{ F1( Nat, Nat) -> object } :
for o1, o2 being BinOp of NAT st ( for a, b being Nat holds o1 . (a,b) = F1(a,b) ) & ( for a, b being Nat holds o2 . (a,b) = F1(a,b) ) holds
o1 = o2
proof end;

scheme :: BINOP_2:sch 13
CLambda2D{ F1( Complex, Complex) -> Complex } :
ex f being Function of [:COMPLEX,COMPLEX:],COMPLEX st
for x, y being Complex holds f . (x,y) = F1(x,y)
proof end;

scheme :: BINOP_2:sch 14
RLambda2D{ F1( Real, Real) -> Real } :
ex f being Function of [:REAL,REAL:],REAL st
for x, y being Real holds f . (x,y) = F1(x,y)
proof end;

scheme :: BINOP_2:sch 15
WLambda2D{ F1( Rational, Rational) -> Rational } :
ex f being Function of [:RAT,RAT:],RAT st
for x, y being Rational holds f . (x,y) = F1(x,y)
proof end;

scheme :: BINOP_2:sch 16
ILambda2D{ F1( Integer, Integer) -> Integer } :
ex f being Function of [:INT,INT:],INT st
for x, y being Integer holds f . (x,y) = F1(x,y)
proof end;

scheme :: BINOP_2:sch 17
NLambda2D{ F1( Nat, Nat) -> Nat } :
ex f being Function of [:NAT,NAT:],NAT st
for x, y being Nat holds f . (x,y) = F1(x,y)
proof end;

scheme :: BINOP_2:sch 18
CLambdaD{ F1( Complex) -> Complex } :
ex f being Function of COMPLEX,COMPLEX st
for x being Complex holds f . x = F1(x)
proof end;

scheme :: BINOP_2:sch 19
RLambdaD{ F1( Real) -> Real } :
ex f being Function of REAL,REAL st
for x being Real holds f . x = F1(x)
proof end;

scheme :: BINOP_2:sch 20
WLambdaD{ F1( Rational) -> Rational } :
ex f being Function of RAT,RAT st
for x being Rational holds f . x = F1(x)
proof end;

scheme :: BINOP_2:sch 21
ILambdaD{ F1( Integer) -> Integer } :
ex f being Function of INT,INT st
for x being Integer holds f . x = F1(x)
proof end;

scheme :: BINOP_2:sch 22
NLambdaD{ F1( Nat) -> Nat } :
ex f being sequence of NAT st
for x being Nat holds f . x = F1(x)
proof end;

:: definition
:: let n1,n2;
:: redefine func n1+n2 -> Element of NAT;
:: coherence by ORDINAL1:def 12;
:: redefine func n1*n2 -> Element of NAT;
:: coherence by ORDINAL1:def 12;
:: end;
definition
func compcomplex -> UnOp of COMPLEX means :: BINOP_2:def 1
for c being Complex holds it . c = - c;
existence
ex b1 being UnOp of COMPLEX st
for c being Complex holds b1 . c = - c
from BINOP_2:sch 18();
uniqueness
for b1, b2 being UnOp of COMPLEX st ( for c being Complex holds b1 . c = - c ) & ( for c being Complex holds b2 . c = - c ) holds
b1 = b2
from BINOP_2:sch 3();
func invcomplex -> UnOp of COMPLEX means :: BINOP_2:def 2
for c being Complex holds it . c = c " ;
existence
ex b1 being UnOp of COMPLEX st
for c being Complex holds b1 . c = c "
from BINOP_2:sch 18();
uniqueness
for b1, b2 being UnOp of COMPLEX st ( for c being Complex holds b1 . c = c " ) & ( for c being Complex holds b2 . c = c " ) holds
b1 = b2
from BINOP_2:sch 3();
func addcomplex -> BinOp of COMPLEX means :Def3: :: BINOP_2:def 3
for c1, c2 being Complex holds it . (c1,c2) = c1 + c2;
existence
ex b1 being BinOp of COMPLEX st
for c1, c2 being Complex holds b1 . (c1,c2) = c1 + c2
from BINOP_2:sch 13();
uniqueness
for b1, b2 being BinOp of COMPLEX st ( for c1, c2 being Complex holds b1 . (c1,c2) = c1 + c2 ) & ( for c1, c2 being Complex holds b2 . (c1,c2) = c1 + c2 ) holds
b1 = b2
from BINOP_2:sch 8();
func diffcomplex -> BinOp of COMPLEX means :: BINOP_2:def 4
for c1, c2 being Complex holds it . (c1,c2) = c1 - c2;
existence
ex b1 being BinOp of COMPLEX st
for c1, c2 being Complex holds b1 . (c1,c2) = c1 - c2
from BINOP_2:sch 13();
uniqueness
for b1, b2 being BinOp of COMPLEX st ( for c1, c2 being Complex holds b1 . (c1,c2) = c1 - c2 ) & ( for c1, c2 being Complex holds b2 . (c1,c2) = c1 - c2 ) holds
b1 = b2
from BINOP_2:sch 8();
func multcomplex -> BinOp of COMPLEX means :Def5: :: BINOP_2:def 5
for c1, c2 being Complex holds it . (c1,c2) = c1 * c2;
existence
ex b1 being BinOp of COMPLEX st
for c1, c2 being Complex holds b1 . (c1,c2) = c1 * c2
from BINOP_2:sch 13();
uniqueness
for b1, b2 being BinOp of COMPLEX st ( for c1, c2 being Complex holds b1 . (c1,c2) = c1 * c2 ) & ( for c1, c2 being Complex holds b2 . (c1,c2) = c1 * c2 ) holds
b1 = b2
from BINOP_2:sch 8();
func divcomplex -> BinOp of COMPLEX means :: BINOP_2:def 6
for c1, c2 being Complex holds it . (c1,c2) = c1 / c2;
existence
ex b1 being BinOp of COMPLEX st
for c1, c2 being Complex holds b1 . (c1,c2) = c1 / c2
from BINOP_2:sch 13();
uniqueness
for b1, b2 being BinOp of COMPLEX st ( for c1, c2 being Complex holds b1 . (c1,c2) = c1 / c2 ) & ( for c1, c2 being Complex holds b2 . (c1,c2) = c1 / c2 ) holds
b1 = b2
from BINOP_2:sch 8();
end;

:: deftheorem defines compcomplex BINOP_2:def 1 :
for b1 being UnOp of COMPLEX holds
( b1 = compcomplex iff for c being Complex holds b1 . c = - c );

:: deftheorem defines invcomplex BINOP_2:def 2 :
for b1 being UnOp of COMPLEX holds
( b1 = invcomplex iff for c being Complex holds b1 . c = c " );

:: deftheorem Def3 defines addcomplex BINOP_2:def 3 :
for b1 being BinOp of COMPLEX holds
( b1 = addcomplex iff for c1, c2 being Complex holds b1 . (c1,c2) = c1 + c2 );

:: deftheorem defines diffcomplex BINOP_2:def 4 :
for b1 being BinOp of COMPLEX holds
( b1 = diffcomplex iff for c1, c2 being Complex holds b1 . (c1,c2) = c1 - c2 );

:: deftheorem Def5 defines multcomplex BINOP_2:def 5 :
for b1 being BinOp of COMPLEX holds
( b1 = multcomplex iff for c1, c2 being Complex holds b1 . (c1,c2) = c1 * c2 );

:: deftheorem defines divcomplex BINOP_2:def 6 :
for b1 being BinOp of COMPLEX holds
( b1 = divcomplex iff for c1, c2 being Complex holds b1 . (c1,c2) = c1 / c2 );

definition
func compreal -> UnOp of REAL means :: BINOP_2:def 7
for r being Real holds it . r = - r;
existence
ex b1 being UnOp of REAL st
for r being Real holds b1 . r = - r
from BINOP_2:sch 19();
uniqueness
for b1, b2 being UnOp of REAL st ( for r being Real holds b1 . r = - r ) & ( for r being Real holds b2 . r = - r ) holds
b1 = b2
from BINOP_2:sch 4();
func invreal -> UnOp of REAL means :: BINOP_2:def 8
for r being Real holds it . r = r " ;
existence
ex b1 being UnOp of REAL st
for r being Real holds b1 . r = r "
from BINOP_2:sch 19();
uniqueness
for b1, b2 being UnOp of REAL st ( for r being Real holds b1 . r = r " ) & ( for r being Real holds b2 . r = r " ) holds
b1 = b2
from BINOP_2:sch 4();
func addreal -> BinOp of REAL means :Def9: :: BINOP_2:def 9
for r1, r2 being Real holds it . (r1,r2) = r1 + r2;
existence
ex b1 being BinOp of REAL st
for r1, r2 being Real holds b1 . (r1,r2) = r1 + r2
from BINOP_2:sch 14();
uniqueness
for b1, b2 being BinOp of REAL st ( for r1, r2 being Real holds b1 . (r1,r2) = r1 + r2 ) & ( for r1, r2 being Real holds b2 . (r1,r2) = r1 + r2 ) holds
b1 = b2
from BINOP_2:sch 9();
func diffreal -> BinOp of REAL means :: BINOP_2:def 10
for r1, r2 being Real holds it . (r1,r2) = r1 - r2;
existence
ex b1 being BinOp of REAL st
for r1, r2 being Real holds b1 . (r1,r2) = r1 - r2
from BINOP_2:sch 14();
uniqueness
for b1, b2 being BinOp of REAL st ( for r1, r2 being Real holds b1 . (r1,r2) = r1 - r2 ) & ( for r1, r2 being Real holds b2 . (r1,r2) = r1 - r2 ) holds
b1 = b2
from BINOP_2:sch 9();
func multreal -> BinOp of REAL means :Def11: :: BINOP_2:def 11
for r1, r2 being Real holds it . (r1,r2) = r1 * r2;
existence
ex b1 being BinOp of REAL st
for r1, r2 being Real holds b1 . (r1,r2) = r1 * r2
from BINOP_2:sch 14();
uniqueness
for b1, b2 being BinOp of REAL st ( for r1, r2 being Real holds b1 . (r1,r2) = r1 * r2 ) & ( for r1, r2 being Real holds b2 . (r1,r2) = r1 * r2 ) holds
b1 = b2
from BINOP_2:sch 9();
func divreal -> BinOp of REAL means :: BINOP_2:def 12
for r1, r2 being Real holds it . (r1,r2) = r1 / r2;
existence
ex b1 being BinOp of REAL st
for r1, r2 being Real holds b1 . (r1,r2) = r1 / r2
from BINOP_2:sch 14();
uniqueness
for b1, b2 being BinOp of REAL st ( for r1, r2 being Real holds b1 . (r1,r2) = r1 / r2 ) & ( for r1, r2 being Real holds b2 . (r1,r2) = r1 / r2 ) holds
b1 = b2
from BINOP_2:sch 9();
end;

:: deftheorem defines compreal BINOP_2:def 7 :
for b1 being UnOp of REAL holds
( b1 = compreal iff for r being Real holds b1 . r = - r );

:: deftheorem defines invreal BINOP_2:def 8 :
for b1 being UnOp of REAL holds
( b1 = invreal iff for r being Real holds b1 . r = r " );

:: deftheorem Def9 defines addreal BINOP_2:def 9 :
for b1 being BinOp of REAL holds
( b1 = addreal iff for r1, r2 being Real holds b1 . (r1,r2) = r1 + r2 );

:: deftheorem defines diffreal BINOP_2:def 10 :
for b1 being BinOp of REAL holds
( b1 = diffreal iff for r1, r2 being Real holds b1 . (r1,r2) = r1 - r2 );

:: deftheorem Def11 defines multreal BINOP_2:def 11 :
for b1 being BinOp of REAL holds
( b1 = multreal iff for r1, r2 being Real holds b1 . (r1,r2) = r1 * r2 );

:: deftheorem defines divreal BINOP_2:def 12 :
for b1 being BinOp of REAL holds
( b1 = divreal iff for r1, r2 being Real holds b1 . (r1,r2) = r1 / r2 );

definition
func comprat -> UnOp of RAT means :: BINOP_2:def 13
for w being Rational holds it . w = - w;
existence
ex b1 being UnOp of RAT st
for w being Rational holds b1 . w = - w
from BINOP_2:sch 20();
uniqueness
for b1, b2 being UnOp of RAT st ( for w being Rational holds b1 . w = - w ) & ( for w being Rational holds b2 . w = - w ) holds
b1 = b2
from BINOP_2:sch 5();
func invrat -> UnOp of RAT means :: BINOP_2:def 14
for w being Rational holds it . w = w " ;
existence
ex b1 being UnOp of RAT st
for w being Rational holds b1 . w = w "
from BINOP_2:sch 20();
uniqueness
for b1, b2 being UnOp of RAT st ( for w being Rational holds b1 . w = w " ) & ( for w being Rational holds b2 . w = w " ) holds
b1 = b2
from BINOP_2:sch 5();
func addrat -> BinOp of RAT means :Def15: :: BINOP_2:def 15
for w1, w2 being Rational holds it . (w1,w2) = w1 + w2;
existence
ex b1 being BinOp of RAT st
for w1, w2 being Rational holds b1 . (w1,w2) = w1 + w2
from BINOP_2:sch 15();
uniqueness
for b1, b2 being BinOp of RAT st ( for w1, w2 being Rational holds b1 . (w1,w2) = w1 + w2 ) & ( for w1, w2 being Rational holds b2 . (w1,w2) = w1 + w2 ) holds
b1 = b2
from BINOP_2:sch 10();
func diffrat -> BinOp of RAT means :: BINOP_2:def 16
for w1, w2 being Rational holds it . (w1,w2) = w1 - w2;
existence
ex b1 being BinOp of RAT st
for w1, w2 being Rational holds b1 . (w1,w2) = w1 - w2
from BINOP_2:sch 15();
uniqueness
for b1, b2 being BinOp of RAT st ( for w1, w2 being Rational holds b1 . (w1,w2) = w1 - w2 ) & ( for w1, w2 being Rational holds b2 . (w1,w2) = w1 - w2 ) holds
b1 = b2
from BINOP_2:sch 10();
func multrat -> BinOp of RAT means :Def17: :: BINOP_2:def 17
for w1, w2 being Rational holds it . (w1,w2) = w1 * w2;
existence
ex b1 being BinOp of RAT st
for w1, w2 being Rational holds b1 . (w1,w2) = w1 * w2
from BINOP_2:sch 15();
uniqueness
for b1, b2 being BinOp of RAT st ( for w1, w2 being Rational holds b1 . (w1,w2) = w1 * w2 ) & ( for w1, w2 being Rational holds b2 . (w1,w2) = w1 * w2 ) holds
b1 = b2
from BINOP_2:sch 10();
func divrat -> BinOp of RAT means :: BINOP_2:def 18
for w1, w2 being Rational holds it . (w1,w2) = w1 / w2;
existence
ex b1 being BinOp of RAT st
for w1, w2 being Rational holds b1 . (w1,w2) = w1 / w2
from BINOP_2:sch 15();
uniqueness
for b1, b2 being BinOp of RAT st ( for w1, w2 being Rational holds b1 . (w1,w2) = w1 / w2 ) & ( for w1, w2 being Rational holds b2 . (w1,w2) = w1 / w2 ) holds
b1 = b2
from BINOP_2:sch 10();
end;

:: deftheorem defines comprat BINOP_2:def 13 :
for b1 being UnOp of RAT holds
( b1 = comprat iff for w being Rational holds b1 . w = - w );

:: deftheorem defines invrat BINOP_2:def 14 :
for b1 being UnOp of RAT holds
( b1 = invrat iff for w being Rational holds b1 . w = w " );

:: deftheorem Def15 defines addrat BINOP_2:def 15 :
for b1 being BinOp of RAT holds
( b1 = addrat iff for w1, w2 being Rational holds b1 . (w1,w2) = w1 + w2 );

:: deftheorem defines diffrat BINOP_2:def 16 :
for b1 being BinOp of RAT holds
( b1 = diffrat iff for w1, w2 being Rational holds b1 . (w1,w2) = w1 - w2 );

:: deftheorem Def17 defines multrat BINOP_2:def 17 :
for b1 being BinOp of RAT holds
( b1 = multrat iff for w1, w2 being Rational holds b1 . (w1,w2) = w1 * w2 );

:: deftheorem defines divrat BINOP_2:def 18 :
for b1 being BinOp of RAT holds
( b1 = divrat iff for w1, w2 being Rational holds b1 . (w1,w2) = w1 / w2 );

definition
func compint -> UnOp of INT means :: BINOP_2:def 19
for i being Integer holds it . i = - i;
existence
ex b1 being UnOp of INT st
for i being Integer holds b1 . i = - i
from BINOP_2:sch 21();
uniqueness
for b1, b2 being UnOp of INT st ( for i being Integer holds b1 . i = - i ) & ( for i being Integer holds b2 . i = - i ) holds
b1 = b2
from BINOP_2:sch 6();
func addint -> BinOp of INT means :Def20: :: BINOP_2:def 20
for i1, i2 being Integer holds it . (i1,i2) = i1 + i2;
existence
ex b1 being BinOp of INT st
for i1, i2 being Integer holds b1 . (i1,i2) = i1 + i2
from BINOP_2:sch 16();
uniqueness
for b1, b2 being BinOp of INT st ( for i1, i2 being Integer holds b1 . (i1,i2) = i1 + i2 ) & ( for i1, i2 being Integer holds b2 . (i1,i2) = i1 + i2 ) holds
b1 = b2
from BINOP_2:sch 11();
func diffint -> BinOp of INT means :: BINOP_2:def 21
for i1, i2 being Integer holds it . (i1,i2) = i1 - i2;
existence
ex b1 being BinOp of INT st
for i1, i2 being Integer holds b1 . (i1,i2) = i1 - i2
from BINOP_2:sch 16();
uniqueness
for b1, b2 being BinOp of INT st ( for i1, i2 being Integer holds b1 . (i1,i2) = i1 - i2 ) & ( for i1, i2 being Integer holds b2 . (i1,i2) = i1 - i2 ) holds
b1 = b2
from BINOP_2:sch 11();
func multint -> BinOp of INT means :Def22: :: BINOP_2:def 22
for i1, i2 being Integer holds it . (i1,i2) = i1 * i2;
existence
ex b1 being BinOp of INT st
for i1, i2 being Integer holds b1 . (i1,i2) = i1 * i2
from BINOP_2:sch 16();
uniqueness
for b1, b2 being BinOp of INT st ( for i1, i2 being Integer holds b1 . (i1,i2) = i1 * i2 ) & ( for i1, i2 being Integer holds b2 . (i1,i2) = i1 * i2 ) holds
b1 = b2
from BINOP_2:sch 11();
end;

:: deftheorem defines compint BINOP_2:def 19 :
for b1 being UnOp of INT holds
( b1 = compint iff for i being Integer holds b1 . i = - i );

:: deftheorem Def20 defines addint BINOP_2:def 20 :
for b1 being BinOp of INT holds
( b1 = addint iff for i1, i2 being Integer holds b1 . (i1,i2) = i1 + i2 );

:: deftheorem defines diffint BINOP_2:def 21 :
for b1 being BinOp of INT holds
( b1 = diffint iff for i1, i2 being Integer holds b1 . (i1,i2) = i1 - i2 );

:: deftheorem Def22 defines multint BINOP_2:def 22 :
for b1 being BinOp of INT holds
( b1 = multint iff for i1, i2 being Integer holds b1 . (i1,i2) = i1 * i2 );

definition
func addnat -> BinOp of NAT means :Def23: :: BINOP_2:def 23
for n1, n2 being Nat holds it . (n1,n2) = n1 + n2;
existence
ex b1 being BinOp of NAT st
for n1, n2 being Nat holds b1 . (n1,n2) = n1 + n2
from BINOP_2:sch 17();
uniqueness
for b1, b2 being BinOp of NAT st ( for n1, n2 being Nat holds b1 . (n1,n2) = n1 + n2 ) & ( for n1, n2 being Nat holds b2 . (n1,n2) = n1 + n2 ) holds
b1 = b2
from BINOP_2:sch 12();
func multnat -> BinOp of NAT means :Def24: :: BINOP_2:def 24
for n1, n2 being Nat holds it . (n1,n2) = n1 * n2;
existence
ex b1 being BinOp of NAT st
for n1, n2 being Nat holds b1 . (n1,n2) = n1 * n2
from BINOP_2:sch 17();
uniqueness
for b1, b2 being BinOp of NAT st ( for n1, n2 being Nat holds b1 . (n1,n2) = n1 * n2 ) & ( for n1, n2 being Nat holds b2 . (n1,n2) = n1 * n2 ) holds
b1 = b2
from BINOP_2:sch 12();
end;

:: deftheorem Def23 defines addnat BINOP_2:def 23 :
for b1 being BinOp of NAT holds
( b1 = addnat iff for n1, n2 being Nat holds b1 . (n1,n2) = n1 + n2 );

:: deftheorem Def24 defines multnat BINOP_2:def 24 :
for b1 being BinOp of NAT holds
( b1 = multnat iff for n1, n2 being Nat holds b1 . (n1,n2) = n1 * n2 );

registration
cluster addcomplex -> commutative associative ;
coherence
( addcomplex is commutative & addcomplex is associative )
proof end;
cluster multcomplex -> commutative associative ;
coherence
( multcomplex is commutative & multcomplex is associative )
proof end;
cluster addreal -> commutative associative ;
coherence
( addreal is commutative & addreal is associative )
proof end;
cluster multreal -> commutative associative ;
coherence
( multreal is commutative & multreal is associative )
proof end;
cluster addrat -> commutative associative ;
coherence
( addrat is commutative & addrat is associative )
proof end;
cluster multrat -> commutative associative ;
coherence
( multrat is commutative & multrat is associative )
proof end;
cluster addint -> commutative associative ;
coherence
( addint is commutative & addint is associative )
proof end;
cluster multint -> commutative associative ;
coherence
( multint is commutative & multint is associative )
proof end;
cluster addnat -> commutative associative ;
coherence
( addnat is commutative & addnat is associative )
proof end;
cluster multnat -> commutative associative ;
coherence
( multnat is commutative & multnat is associative )
proof end;
end;

Lm1: 0 in NAT
;

Lm2: 0 is_a_unity_wrt addcomplex
proof end;

Lm3: In (0,REAL) is_a_unity_wrt addreal
proof end;

Lm4: 0 is_a_unity_wrt addrat
proof end;

Lm5: 0 is_a_unity_wrt addint
proof end;

Lm6: 0 is_a_unity_wrt addnat
proof end;

Lm7: 1 in NAT
;

Lm8: 1 is_a_unity_wrt multcomplex
proof end;

Lm9: 1 is_a_unity_wrt multreal
proof end;

Lm10: 1 is_a_unity_wrt multrat
proof end;

Lm11: 1 is_a_unity_wrt multint
proof end;

Lm12: 1 is_a_unity_wrt multnat
proof end;

registration
cluster addcomplex -> having_a_unity ;
coherence
addcomplex is having_a_unity
by Lm1, NUMBERS:20, Lm2, SETWISEO:def 2;
cluster addreal -> having_a_unity ;
coherence
addreal is having_a_unity
by Lm3, SETWISEO:def 2;
cluster addrat -> having_a_unity ;
coherence
addrat is having_a_unity
by Lm1, NUMBERS:18, Lm4, SETWISEO:def 2;
cluster addint -> having_a_unity ;
coherence
addint is having_a_unity
by Lm1, NUMBERS:17, Lm5, SETWISEO:def 2;
cluster addnat -> having_a_unity ;
coherence
addnat is having_a_unity
by Lm6, SETWISEO:def 2;
cluster multcomplex -> having_a_unity ;
coherence
multcomplex is having_a_unity
by Lm7, NUMBERS:20, Lm8, SETWISEO:def 2;
cluster multreal -> having_a_unity ;
coherence
multreal is having_a_unity
by Lm7, NUMBERS:19, Lm9, SETWISEO:def 2;
cluster multrat -> having_a_unity ;
coherence
multrat is having_a_unity
by Lm7, NUMBERS:18, Lm10, SETWISEO:def 2;
cluster multint -> having_a_unity ;
coherence
multint is having_a_unity
by Lm7, NUMBERS:17, Lm11, SETWISEO:def 2;
cluster multnat -> having_a_unity ;
coherence
multnat is having_a_unity
by Lm12, SETWISEO:def 2;
end;

theorem :: BINOP_2:1
the_unity_wrt addcomplex = 0 by Lm1, NUMBERS:20, Lm2, BINOP_1:def 8;

theorem :: BINOP_2:2
the_unity_wrt addreal = 0 by Lm3, BINOP_1:def 8;

theorem :: BINOP_2:3
the_unity_wrt addrat = 0 by Lm1, NUMBERS:18, Lm4, BINOP_1:def 8;

theorem :: BINOP_2:4
the_unity_wrt addint = 0 by Lm1, NUMBERS:17, Lm5, BINOP_1:def 8;

theorem :: BINOP_2:5
the_unity_wrt addnat = 0 by Lm6, BINOP_1:def 8;

theorem :: BINOP_2:6
the_unity_wrt multcomplex = 1 by Lm7, NUMBERS:20, Lm8, BINOP_1:def 8;

theorem :: BINOP_2:7
the_unity_wrt multreal = 1 by Lm7, NUMBERS:19, Lm9, BINOP_1:def 8;

theorem :: BINOP_2:8
the_unity_wrt multrat = 1 by Lm7, NUMBERS:18, Lm10, BINOP_1:def 8;

theorem :: BINOP_2:9
the_unity_wrt multint = 1 by Lm7, NUMBERS:17, Lm11, BINOP_1:def 8;

theorem :: BINOP_2:10
the_unity_wrt multnat = 1 by Lm12, BINOP_1:def 8;

registration
let f be real-valued Function;
let a, b be object ;
cluster f . (a,b) -> real ;
coherence
f . (a,b) is real
;
end;