let X1, X2 be non empty non void strict StackSystem ; ( the carrier of X1 = A & the carrier' of X1 = A * & ( for s being stack of X1 holds
( ( emp s implies s is empty ) & ( s is empty implies emp s ) & ( for g being FinSequence st g = s holds
( ( not emp s implies ( top s = g . 1 & pop s = Del (g,1) ) ) & ( emp s implies ( top s = the Element of X1 & pop s = {} ) ) & ( for e being Element of X1 holds push (e,s) = <*e*> ^ g ) ) ) ) ) & the carrier of X2 = A & the carrier' of X2 = A * & ( for s being stack of X2 holds
( ( emp s implies s is empty ) & ( s is empty implies emp s ) & ( for g being FinSequence st g = s holds
( ( not emp s implies ( top s = g . 1 & pop s = Del (g,1) ) ) & ( emp s implies ( top s = the Element of X2 & pop s = {} ) ) & ( for e being Element of X2 holds push (e,s) = <*e*> ^ g ) ) ) ) ) implies X1 = X2 )
assume that
A1:
the carrier of X1 = A
and
B1:
the carrier' of X1 = A *
and
C1:
for s being stack of X1 holds
( ( emp s implies s is empty ) & ( s is empty implies emp s ) & ( for g being FinSequence st g = s holds
( ( not emp s implies ( top s = g . 1 & pop s = Del (g,1) ) ) & ( emp s implies ( top s = the Element of X1 & pop s = {} ) ) & ( for e being Element of X1 holds push (e,s) = <*e*> ^ g ) ) ) )
and
A2:
the carrier of X2 = A
and
B2:
the carrier' of X2 = A *
and
C2:
for s being stack of X2 holds
( ( emp s implies s is empty ) & ( s is empty implies emp s ) & ( for g being FinSequence st g = s holds
( ( not emp s implies ( top s = g . 1 & pop s = Del (g,1) ) ) & ( emp s implies ( top s = the Element of X2 & pop s = {} ) ) & ( for e being Element of X2 holds push (e,s) = <*e*> ^ g ) ) ) )
; X1 = X2
then A3:
the s_push of X1 = the s_push of X2
by A1, B1, A2, B2, BINOP_1:2;
then A4:
the s_pop of X1 = the s_pop of X2
by B1, B2, FUNCT_2:63;
the s_empty of X1 = the s_empty of X2
hence
X1 = X2
by A1, B1, A2, B2, A3, A4, K1, FUNCT_2:63; verum