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);
reserve D for non empty set,
  bD for FinSequence of D,
  b,f,g for FinSequence of K,
  MD for Matrix of D;

theorem
  for A be Matrix of n,n,K, B be Matrix of K st len A = width B & Det A
  <> 0.K holds the_rank_of (B*A) = the_rank_of B
proof
  let A be Matrix of n,n,K,B be Matrix of K such that
A1: width B = len A and
A2: Det A <> 0.K;
  set BA=B*A;
A3: len BA=len B by A1,MATRIX_3:def 4;
A4: width BA=width A by A1,MATRIX_3:def 4;
A5: len A=n & width A=n by MATRIX_0:24;
  per cases;
  suppose
    width BA=0;
    hence thesis by A1,A3,A4,A5,Lm3;
  end;
  suppose
A6: width BA>0;
    then
A7: width (A@)=len A & len (B@)=width B by A1,A4,A5,MATRIX_0:54;
A8: Det (A@)<>0.K by A2,MATRIXR2:43;
    thus the_rank_of (B*A) = the_rank_of ((B*A)@) by MATRIX13:84
      .= the_rank_of ((A@)*(B@)) by A1,A4,A6,MATRIX_3:22
      .= the_rank_of (B@) by A1,A8,A7,Th75
      .= the_rank_of B by MATRIX13:84;
  end;
end;
