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 Th12:
  for N st N c= Seg width A & for i st i in Seg width A \ N holds
Col(A,i) = len A |-> 0.K holds the_rank_of A = the_rank_of Segm(A,Seg len A,N)
proof
  let N such that
A1: N c= Seg width A and
A2: for i st i in Seg width A \ N holds Col(A,i) = len A |-> 0.K;
A3: dom A=Seg len A by FINSEQ_1:def 3;
  per cases;
  suppose
A4: card N=0;
    the_rank_of A = 0
    proof
A5:   N={} by A4;
      assume the_rank_of A <>0;
      then consider i,j such that
A6:   [i,j] in Indices A and
A7:   A*(i,j) <> 0.K by MATRIX13:94;
A8:   j in Seg width A by A6,ZFMISC_1:87;
A9:   i in dom A by A6,ZFMISC_1:87;
      then 0.K = (len A|-> 0.K).i by A3,FINSEQ_2:57
        .= Col(A,j).i by A2,A8,A5
        .= A*(i,j) by A9,MATRIX_0:def 8;
      hence thesis by A7;
    end;
    hence thesis by A4,MATRIX13:77;
  end;
  suppose
A10: card N>0;
    then N <> {};
    then Seg width A <> {} by A1,XBOOLE_1:3;
    then
A11: width A<>0;
    then
A12: len A<>0 by MATRIX_0:def 3;
    set AT=A@;
A13: [:dom A,N:] c= Indices A by A1,ZFMISC_1:95;
A14: width AT=len A by A11,MATRIX_0:54;
A15: len AT=width A by A11,MATRIX_0:54;
    then
A16: N c= dom AT by A1,FINSEQ_1:def 3;
A17: dom AT=Seg len AT by FINSEQ_1:def 3;
A18: now
      let i such that
A19:  i in dom AT \ N;
      i in dom AT by A19,XBOOLE_0:def 5;
      hence Line(AT,i) = Col(A,i) by A15,A17,MATRIX_0:59
        .= width AT |-> 0.K by A2,A15,A14,A17,A19;
    end;
    thus the_rank_of A = the_rank_of AT by MATRIX13:84
      .= the_rank_of Segm(AT, N,Seg len A) by A14,A16,A18,Th11
      .= the_rank_of (Segm(A,Seg len A,N)@) by A3,A10,A12,A13,MATRIX13:61
      .= the_rank_of Segm(A,Seg len A,N) by MATRIX13:84;
  end;
end;
