let X be StackAlgebra; for s being stack of X
for S being stack of (X /==) st S = Class ((==_ X),s) & not emp s holds
( pop s in pop S & Class ((==_ X),(pop s)) = pop S )
let s be stack of X; for S being stack of (X /==) st S = Class ((==_ X),s) & not emp s holds
( pop s in pop S & Class ((==_ X),(pop s)) = pop S )
set p = the s_pop of X;
set i = id the s_empty of X;
let S be stack of (X /==); ( S = Class ((==_ X),s) & not emp s implies ( pop s in pop S & Class ((==_ X),(pop s)) = pop S ) )
assume Z0:
S = Class ((==_ X),s)
; ( emp s or ( pop s in pop S & Class ((==_ X),(pop s)) = pop S ) )
assume Z1:
not emp s
; ( pop s in pop S & Class ((==_ X),(pop s)) = pop S )
A1:
s in S
by Z0, EQREL_1:20;
A2:
S in Class (==_ X)
by Z0, EQREL_1:def 3;
A6:
dom (id the s_empty of X) = the s_empty of X
by RELAT_1:45;
A3:
the s_pop of X +* (id the s_empty of X) is UnOp of the carrier' of X, ==_ X
A8:
s nin the s_empty of X
by Z1, EMP;
pop S =
(( the s_pop of X +* (id the s_empty of X)) /\/ (==_ X)) . S
by QUOT
.=
Class ((==_ X),(( the s_pop of X +* (id the s_empty of X)) . s))
by A1, A2, A3, FILTER_1:def 3
.=
Class ((==_ X),(pop s))
by A6, A8, FUNCT_4:11
;
hence
( pop s in pop S & Class ((==_ X),(pop s)) = pop S )
by EQREL_1:20; verum