reserve i,j,n,k,m for Nat,
     a,b,x,y,z for object,
     F,G for FinSequence-yielding FinSequence,
     f,g,p,q for FinSequence,
     X,Y for set,
     D for non empty set;

theorem
   card doms <*g*> = len g
proof
  set G=<* g *>;
A1: len G=1 by FINSEQ_1:40;
  defpred P[object,object] means
    for f be FinSequence st f=$1 holds f.1=$2;
A2: for x being object st x in doms G
  ex y being object st y in dom g & P[x,y]
  proof
    let x be object;
    assume
A3:   x in doms G;
    then consider p be FinSequence such that
A4:   p=x & len p = len G &
    for i st i in dom p holds p.i in dom (G.i) by Def8;
    take p.1;
    thus thesis by A4,A3,Th51;
  end;
  consider F be Function such that
A5:  dom F=doms G & rng F c= dom g and
A6:  for x being object st x in doms G holds P[x,F.x] from FUNCT_1:sch 6(A2);
A7:  F is one-to-one
  proof
    let x1,x2 be object such that
A8:   x1 in dom F & x2 in dom F & F.x1=F.x2;
    consider p1 be FinSequence such that
A9:   p1=x1 & len p1 = len G &
    for i st i in dom p1 holds p1.i in dom (G.i) by A5,A8,Def8;
    consider p2 be FinSequence such that
A10:  p2=x2 & len p2 = len G &
      for i st i in dom p2 holds p2.i in dom (G.i) by A5,A8,Def8;
    A11:p1=<*p1.1*> & p2=<*p2.1*> by A1,A9,A10,FINSEQ_1:40;
    F.x1= p1.1 & F.x2 =p2.1 by A9,A10,A6,A5,A8;
    hence thesis by A11,A8,A9,A10;
  end;
  dom g c= rng F
  proof
    let i be object;
    assume
A12:  i in dom g;
A13:  len <*i *>=1 &<*i *>.1 =i by FINSEQ_1:40;
    then
A14:  <* i*> in doms G by Th51,A12;
    F.(<*i*>) = <* i*>.1 by A6,Th51,A12,A13;
    hence thesis by A14,A5,FUNCT_1:def 3;
  end;
  then dom g = rng F by A5;
  then card doms G= card dom g by A5,A7,CARD_1:70;
  then card doms G = card Seg len g by FINSEQ_1:def 3;
  hence thesis;
end;
