::
deftheorem Def1 defines
BinOp STACKS_1:def 1 :
for C, D being non empty set
for R being Relation
for b4 being Function of [:C,D:],D holds
( b4 is BinOp of C,D,R iff for x being Element of C
for y1, y2 being Element of D st [y1,y2] in R holds
[(b4 . (x,y1)),(b4 . (x,y2))] in R );
definition
let C,
D be non
empty set ;
let R be
Equivalence_Relation of
D;
let b be
Function of
[:C,D:],
D;
assume A1:
b is
BinOp of
C,
D,
R
;
existence
ex b1 being Function of [:C,(Class R):],(Class R) st
for x, y, y1 being set st x in C & y in Class R & y1 in y holds
b1 . (x,y) = Class (R,(b . (x,y1)))
uniqueness
for b1, b2 being Function of [:C,(Class R):],(Class R) st ( for x, y, y1 being set st x in C & y in Class R & y1 in y holds
b1 . (x,y) = Class (R,(b . (x,y1))) ) & ( for x, y, y1 being set st x in C & y in Class R & y1 in y holds
b2 . (x,y) = Class (R,(b . (x,y1))) ) holds
b1 = b2
end;
::
deftheorem Def2 defines
/\/ STACKS_1:def 2 :
for C, D being non empty set
for R being Equivalence_Relation of D
for b being Function of [:C,D:],D st b is BinOp of C,D,R holds
for b5 being Function of [:C,(Class R):],(Class R) holds
( b5 = b /\/ R iff for x, y, y1 being set st x in C & y in Class R & y1 in y holds
b5 . (x,y) = Class (R,(b . (x,y1))) );
scheme
UNIQsch{
F1()
-> StackAlgebra,
F2()
-> stack of
F1(),
F3()
-> non
empty set ,
F4()
-> Element of
F3(),
F5(
set ,
set )
-> Element of
F3() } :
for
a1,
a2 being
Element of
F3() st ex
F being
Function of the
carrier' of
F1(),
F3() st
(
a1 = F . F2() & ( for
s1 being
stack of
F1() st
emp s1 holds
F . s1 = F4() ) & ( for
s1 being
stack of
F1()
for
e being
Element of
F1() holds
F . (push (e,s1)) = F5(
e,
(F . s1)) ) ) & ex
F being
Function of the
carrier' of
F1(),
F3() st
(
a2 = F . F2() & ( for
s1 being
stack of
F1() st
emp s1 holds
F . s1 = F4() ) & ( for
s1 being
stack of
F1()
for
e being
Element of
F1() holds
F . (push (e,s1)) = F5(
e,
(F . s1)) ) ) holds
a1 = a2
definition
let X be
StackAlgebra;
existence
ex b1 being Relation of the carrier' of X st
for s1, s2 being stack of X holds
( [s1,s2] in b1 iff ( ( not emp s1 & s2 = pop s1 ) or ex e being Element of X st s2 = push (e,s1) ) )
uniqueness
for b1, b2 being Relation of the carrier' of X st ( for s1, s2 being stack of X holds
( [s1,s2] in b1 iff ( ( not emp s1 & s2 = pop s1 ) or ex e being Element of X st s2 = push (e,s1) ) ) ) & ( for s1, s2 being stack of X holds
( [s1,s2] in b2 iff ( ( not emp s1 & s2 = pop s1 ) or ex e being Element of X st s2 = push (e,s1) ) ) ) holds
b1 = b2
end;
theorem Th44:
for
X1,
X2,
X3 being
StackAlgebra for
F1,
F2,
G1,
G2 being
Function st
F1,
G1 form_isomorphism_between X1,
X2 &
F2,
G2 form_isomorphism_between X2,
X3 holds
F2 * F1,
G2 * G1 form_isomorphism_between X1,
X3
definition
let X1,
X2 be
StackAlgebra;
reflexivity
for X1 being StackAlgebra ex F, G being Function st F,G form_isomorphism_between X1,X1
symmetry
for X1, X2 being StackAlgebra st ex F, G being Function st F,G form_isomorphism_between X1,X2 holds
ex F, G being Function st F,G form_isomorphism_between X2,X1
end;