reserve i,j for Nat;
reserve x,y for set;
reserve A for non empty set;
reserve c for Element of StandardStackSystem A;
reserve m for stack of StandardStackSystem A;
reserve X for non empty non void StackSystem;
reserve s,s1,s2 for stack of X;
reserve e,e1,e2 for Element of X;
reserve X for StackAlgebra;
reserve s,s1,s2,s3 for stack of X;
reserve e,e1,e2,e3 for Element of X;

theorem Th6:
  not emp s implies |.s.| = <*top s*>^|.pop s.|
  proof
    consider F being Function of the carrier' of X, (the carrier of X)* such
    that
A1: |.s.| = F.s & (for s1 st emp s1 holds F.s1 = {}) &
    for s1, e holds F.push(e,s1) = <*e*>^(F.s1) by Def13;
A2: |.pop s.| = F.pop s by A1,Def13;
    assume not emp s; then
    s = push(top s, pop s) by Def9;
    hence thesis by A1,A2;
  end;
