reserve x,y,z for object,
  i,j,n,m for Nat,
  D for non empty set,
  K for non empty doubleLoopStr,
  s,t for FinSequence,
  a,a1,a2,b1,b2,d for Element of D,
  p, p1,p2,q,r for FinSequence of D,
  F for add-associative right_zeroed
  right_complementable Abelian non empty doubleLoopStr;
reserve A,B for Matrix of n,K;

theorem Th2:
  x is Element of n-Matrices_over K iff x is Matrix of n,K
proof
  thus x is Element of (n-Matrices_over K) implies x is Matrix of n,K
  proof
    assume x is Element of (n-Matrices_over K);
    then reconsider
    x as Element of n-tuples_on (n-tuples_on the carrier of K);
A1: len x=n by CARD_1:def 7;
    ex m st for y st y in rng x ex q being FinSequence of K st y=q & len q =m
    proof
      take n;
      let y;
A2:   rng x c= (n-tuples_on the carrier of K) by FINSEQ_1:def 4;
      assume y in rng x;
      then reconsider q=y as Element of n-tuples_on the carrier of K by A2;
      reconsider q as FinSequence of K;
      take q;
      thus thesis by CARD_1:def 7;
    end;
    then reconsider x as Matrix of the carrier of K by MATRIX_0:9;
    for q be FinSequence of K st q in rng x holds len q = n
    proof
      let q be FinSequence of K;
A3:   rng x c= n-tuples_on the carrier of K by FINSEQ_1:def 4;
      assume q in rng x;
      then reconsider q as Element of n-tuples_on the carrier of K by A3;
      len q=n by CARD_1:def 7;
      hence thesis;
    end;
    hence thesis by A1,MATRIX_0:def 2;
  end;
  assume x is Matrix of n,K;
  then reconsider x as Matrix of n,K;
A4: len x = n by MATRIX_0:def 2;
  then reconsider x as Element of n-tuples_on ((the carrier of K)*) by
FINSEQ_2:92;
  rng x c= n-tuples_on the carrier of K
  proof
    let y be object;
    assume
A5: y in rng x;
    rng x c= (the carrier of K)* by FINSEQ_1:def 4;
    then reconsider p=y as FinSequence of K by A5,FINSEQ_1:def 11;
    len p =n by A5,MATRIX_0:def 2;
    then p is Element of n-tuples_on the carrier of K by FINSEQ_2:92;
    hence thesis;
  end;
  then x is FinSequence of n-tuples_on the carrier of K by FINSEQ_1:def 4;
  hence thesis by A4,FINSEQ_2:92;
end;
