reserve x,y for object,X,Y for set,
  D for non empty set,
  i,j,k,l,m,n,m9,n9 for Nat,
  i0,j0,n0,m0 for non zero Nat,
  K for Field,
  a,b for Element of K,
  p for FinSequence of K,
  M for Matrix of n,K;
reserve A for (Matrix of D),
  A9 for Matrix of n9,m9,D,
  M9 for Matrix of n9, m9,K,
  nt,nt1,nt2 for Element of n-tuples_on NAT,
  mt,mt1 for Element of m -tuples_on NAT,
  M for Matrix of K;
reserve P,P1,P2,Q,Q1,Q2 for without_zero finite Subset of NAT;

theorem Th89:
  a<>0.K implies the_rank_of M9 = the_rank_of RLine(M9,i,a*Line(M9 ,i))
proof
  set L=Line(M9,i);
  set aL=a*L;
  set R=RLine(M9,i,aL);
A1: Indices M9=Indices R by MATRIX_0:26;
  consider P,Q such that
A2: [:P,Q:] c= Indices M9 and
A3: card P = card Q and
A4: card P = the_rank_of M9 and
A5: Det EqSegm(M9,P,Q)<>0.K by Def4;
  assume
A6: a<>0.K;
A7: now
    per cases;
    suppose
A8:   i in P;
A9:   len L=width M9 by MATRIX_0:def 7;
      then
A10:  dom L=Seg width M9 by FINSEQ_1:def 3;
A11:  rng Sgm Q=Q by FINSEQ_1:def 14;
A13:  dom Sgm P=Seg card P by FINSEQ_3:40;
      rng Sgm P=P by FINSEQ_1:def 14;
      then consider x being object such that
A14:  x in dom Sgm P and
A15:  Sgm P.x=i by A8,FUNCT_1:def 3;
      reconsider x as Element of NAT by A14;
A16:  Q c= Seg width M9 by A2,A3,Th67;
      then Line(Segm(M9,P,Q),x) = L * Sgm Q by A14,A15,A13,Th47;
      then
A17:  (a*Line(Segm(M9,P,Q),x)) = aL * Sgm Q by A11,A16,A10,Th87;
A18:  len aL=len L by MATRIXR1:16;
      RLine(EqSegm(M9,P,Q),x,a*Line(EqSegm(M9,P,Q),x)) = RLine(Segm(M9,P,
      Q),x,a*Line(EqSegm(M9,P,Q),x)) by A3,Def3
        .= RLine(Segm(M9,P,Q),x,a*Line(Segm(M9,P,Q),x)) by A3,Def3
        .= Segm(R,P,Q) by A2,A15,A9,A17,A18,Th59
        .= EqSegm(R,P,Q) by A3,Def3;
      then Det EqSegm(R,P,Q)= a * Det EqSegm(M9,P,Q) by A14,A13,MATRIX11:35;
      then Det EqSegm(R,P,Q)<>0.K by A6,A5,VECTSP_1:12;
      hence the_rank_of R >= the_rank_of M9 by A2,A3,A4,A1,Def4;
    end;
    suppose
A19:  not i in P;
      EqSegm(M9,P,Q) = Segm(M9,P,Q) by A3,Def3
        .= Segm(R,P,Q) by A2,A19,Th60
        .= EqSegm(R,P,Q) by A3,Def3;
      hence the_rank_of R >= the_rank_of M9 by A2,A3,A4,A5,A1,Def4;
    end;
  end;
  consider P1,Q1 such that
A20: [:P1,Q1:] c= Indices R and
A21: card P1 = card Q1 and
A22: card P1 = the_rank_of R and
A23: Det EqSegm(R,P1,Q1)<>0.K by Def4;
  now
    per cases;
    suppose
A24:  i in P1;
A25:  len L=width M9 by MATRIX_0:def 7;
      then
A26:  dom L=Seg width M9 by FINSEQ_1:def 3;
A27:  rng Sgm Q1=Q1 by FINSEQ_1:def 14;
A29:  dom Sgm P1=Seg card P1 by FINSEQ_3:40;
      rng Sgm P1=P1 by FINSEQ_1:def 14;
      then consider x being object such that
A30:  x in dom Sgm P1 and
A31:  Sgm P1.x=i by A24,FUNCT_1:def 3;
      reconsider x as Element of NAT by A30;
A32:  Q1 c= Seg width M9 by A1,A20,A21,Th67;
      then Line(Segm(M9,P1,Q1),x) = L * Sgm Q1 by A30,A31,A29,Th47;
      then
A33:  (a*Line(Segm(M9,P1,Q1),x)) = aL * Sgm Q1 by A27,A32,A26,Th87;
A34:  len aL=len L by MATRIXR1:16;
      RLine(EqSegm(M9,P1,Q1),x,a*Line(EqSegm(M9,P1,Q1),x)) =RLine(Segm(M9
      ,P1,Q1),x,a*Line(EqSegm(M9,P1,Q1),x)) by A21,Def3
        .=RLine(Segm(M9,P1,Q1),x,a*Line(Segm(M9,P1,Q1),x)) by A21,Def3
        .=Segm(R,P1,Q1) by A1,A20,A31,A25,A33,A34,Th59
        .=EqSegm(R,P1,Q1) by A21,Def3;
      then Det EqSegm(R,P1,Q1)=a*Det EqSegm(M9,P1,Q1) by A30,A29,MATRIX11:35;
      then Det EqSegm(M9,P1,Q1)<>0.K by A23;
      hence the_rank_of M9 >= the_rank_of R by A1,A20,A21,A22,Def4;
    end;
    suppose
A35:  not i in P1;
      EqSegm(M9,P1,Q1) = Segm(M9,P1,Q1) by A21,Def3
        .= Segm(R,P1,Q1) by A1,A20,A35,Th60
        .= EqSegm(R,P1,Q1) by A21,Def3;
      hence the_rank_of M9 >= the_rank_of R by A1,A20,A21,A22,A23,Def4;
    end;
  end;
  hence thesis by A7,XXREAL_0:1;
end;
