reserve D for non empty set,
  i,j,k for Nat,
  n,m for Nat,
  r for Real,
  e for real-valued FinSequence;

theorem Th10:
  for D being set, s being FinSequence holds (s is Matrix of D iff
ex n st for i st i in dom s holds ex p being FinSequence of D st s.i = p & len
  p = n)
proof
  let D be set, s be FinSequence;
  thus s is Matrix of D implies ex n st for i st i in dom s holds ex p being
  FinSequence of D st s.i = p & len p = n
  proof
    assume
A1: s is Matrix of D;
    then reconsider v=s as FinSequence of D*;
    consider n be Nat such that
A2: for x being object st x in rng v ex t being FinSequence st t=x & len
    t = n by A1,MATRIX_0:def 1;
A3: for i st i in dom v holds ex p being FinSequence of D st v.i = p & len
    p = n
    proof
      let i;
      assume i in dom v;
      then consider t being FinSequence such that
A4:   t=v.i & len t=n by A2,FUNCT_1:3;
      take t;
      thus thesis by A4;
    end;
    reconsider n as Nat;
    take n;
    thus thesis by A3;
  end;
  given n such that
A5: for i st i in dom s holds ex p being FinSequence of D st s.i = p &
  len p = n;
A6: for x being set st x in rng s holds (ex v being FinSequence st v=x & len
  v = n) & x in D*
  proof
    let x be set;
    assume x in rng s;
    then consider i be object such that
A7: i in dom s and
A8: x = s.i by FUNCT_1:def 3;
A9: ex p being FinSequence of D st s.i = p & len p = n by A5,A7;
    hence ex v being FinSequence st v=x & len v = n by A8;
    thus thesis by A8,A9,FINSEQ_1:def 11;
  end;
  then for x being object st x in rng s holds x in D*;
  then
A10: rng s c= D*;
  for x being object st x in rng s holds ex v being FinSequence st v=x & len
  v = n by A6;
  hence thesis by A10,FINSEQ_1:def 4,MATRIX_0:def 1;
end;
