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;
reserve X1,X2,X3 for StackAlgebra;
reserve F,F1,F2,G,G1,G2 for Function;

theorem Th45:
  F,G form_isomorphism_between X1,X2 implies
  for s1 being stack of X1, s2 being stack of X2 st s2 = G.s1
  holds |.s2.| = F*|.s1.|
  proof
    assume that
A1: dom F = the carrier of X1 & rng F = the carrier of X2 &
    F is one-to-one and
A2: dom G = the carrier' of X1 & rng G = the carrier' of X2 &
    G is one-to-one and
A3: for s1 being stack of X1, s2 being stack of X2 st s2 = G.s1
    holds (emp s1 iff emp s2) &
    (not emp s1 implies pop s2 = G.pop s1 & top s2 = F.top s1) &
    for e1 being Element of X1, e2 being Element of X2 st e2 = F.e1
    holds push(e2,s2) = G.push(e1,s1);
    reconsider F1 = F as Function of the carrier of X1, the carrier of X2
    by A1,FUNCT_2:2;
    reconsider G1 = G as Function of the carrier' of X1, the carrier' of X2
    by A2,FUNCT_2:2;
    let s1 be stack of X1;
    defpred P[stack of X1] means
    for s2 being stack of X2 st s2 = G.$1 holds |.s2.| = F*|.$1.|;
A4: for s1 being stack of X1 st emp s1 holds P[s1]
    proof
      let s1 be stack of X1;
      assume
A5:   emp s1;
      let s2 be stack of X2; assume s2 = G.s1;
      then emp s2 by A3,A5;
      then |.s2.| = {} & |.s1.| = {} by A5,Th5;
      hence |.s2.| = F*|.s1.|;
    end;
A6: for s1 being stack of X1, e being Element of X1 st P[s1]
    holds P[push(e,s1)]
    proof
      let s1 be stack of X1;
      let e be Element of X1;
      assume
A7:   P[s1];
      let s2 be stack of X2;
A8:   |.G1.s1.| = F*|.s1.| by A7;
A9:   <*F1.e*> = F*<*e*> by A1,FINSEQ_2:34;
      assume s2 = G.push(e,s1); then
      s2 = push(F1.e,G1.s1) by A3;
      hence |.s2.| = <*F1.e*>^|.G1.s1.| by Th8
      .= F*(<*e*>^|.s1.|) by A8,A9,FINSEQOP:9
      .= F*|.push(e,s1).| by Th8;
    end;
    thus P[s1] from INDsch(A4,A6);
  end;
