reserve x,y for set,
  i,j,k,l,m,n for Nat,
  K for Field,
  N for without_zero finite Subset of NAT,
  a,b for Element of K,
  A,B,B1,B2,X,X1,X2 for (Matrix of K),
  A9 for (Matrix of m,n,K),
  B9 for (Matrix of m,k,K);

theorem Th20:
  for A,B be Matrix of K st len A = len B holds the_rank_of A <=
  the_rank_of (A^^B) & the_rank_of B <= the_rank_of (A^^B)
proof
  let A,B be Matrix of K such that
A1: len A = len B;
  set L=len A;
  reconsider B9=B as Matrix of L,width B,K by A1,MATRIX_0:51;
  reconsider A9=A as Matrix of L,width A,K by MATRIX_0:51;
  set AB=A9^^B9;
  per cases;
  suppose
    L=0;
    hence thesis by A1,MATRIX13:74;
  end;
  suppose
A2: L>0;
A3: Segm(AB,Seg L,Seg width A) = A by Th19;
A4: Indices AB=[:Seg L,Seg (width A+ width B):] by A2,MATRIX_0:23;
A5: width AB=width A+width B by A2,MATRIX_0:23;
    then width A <=width AB by NAT_1:11;
    then Seg width A c=Seg width AB by FINSEQ_1:5;
    then
A6: [:Seg L,Seg width A:] c= Indices AB by A5,A4,ZFMISC_1:95;
    Seg width AB\Seg width A c=Seg width AB by XBOOLE_1:36;
    then
A7: [:Seg L,Seg width AB\Seg width A:] c= Indices AB by A5,A4,ZFMISC_1:95;
    Segm(AB,Seg L,Seg width AB\Seg width A) = B by A5,Th19;
    hence thesis by A3,A6,A7,MATRIX13:79;
  end;
end;
