reserve i,j,m,n,k for Nat,
  x,y for set,
  K for Field,
  a,L for Element of K;
reserve V1,V2 for finite-dimensional VectSp of K,
  W1,W2 for Subspace of V1,
  U1 ,U2 for Subspace of V2,
  b1 for OrdBasis of V1,
  B1 for FinSequence of V1,
  b2 for OrdBasis of V2,
  B2 for FinSequence of V2,
  bw1 for OrdBasis of W1,
  bw2 for OrdBasis of W2,
  Bu1 for FinSequence of U1,
  Bu2 for FinSequence of U2;

theorem
  for J be FinSequence_of_Jordan_block of L,K for M be Matrix of len b1,
  len b1,K st M = block_diagonal(J,0.K) holds Mx2Tran(M,b1,b1) is nilpotent iff
  len b1 = 0 or L = 0.K
proof
  let J be FinSequence_of_Jordan_block of L,K;
  let M be Matrix of len b1,len b1,K such that
A1: M = block_diagonal(J,0.K);
  set MT=Mx2Tran(M,b1,b1);
  thus MT is nilpotent implies len b1 = 0 or L = 0.K
  proof
    set B=len b1;
    set m=min(Len J,B);
    set S=Sum (Len J|m);
    assume MT is nilpotent;
    then reconsider MT as nilpotent linear-transformation of V1,V1;
    rng b1 is Basis of V1 by MATRLIN:def 2;
    then
A2: rng b1 is linearly-independent Subset of V1 by VECTSP_7:def 3;
    assume
A3: B<>0;
    then S in dom b1 by A1,Lm3;
    then b1.S in rng b1 & b1/.S=b1.S by FUNCT_1:def 3,PARTFUN1:def 6;
    then
A4: b1/.S <>0.V1 by A2,VECTSP_7:2;
    ((power K).(L,deg MT))*(b1/.S) = (MT|^(deg MT)).(b1/.S) by A1,A3,Lm3
      .= ZeroMap(V1,V1).(b1/.S) by Def5
      .= ((the carrier of V1)-->0.V1).(b1/.S) by GRCAT_1:def 7
      .= 0.V1
      .= 0.K * (b1/.S) by VECTSP_1:14;
    then 0.K = (power K).(L,deg MT) by A4,VECTSP10:4
      .= Product (deg MT|->L) by MATRIXJ1:5;
    then
A5: ex k be Nat st k in dom (deg MT|->L) & (deg MT|->L).k=0.K
    by FVSUM_1:82;
    dom (deg MT|->L)=Seg deg MT by FINSEQ_2:124;
    hence thesis by A5,FINSEQ_2:57;
  end;
  assume
A6: len b1=0 or L=0.K;
  per cases by A6;
  suppose
    len b1=0;
    then dim V1=0 by MATRLIN2:21;
    then (Omega).V1=(0).V1 by VECTSP_9:29;
    then
A7: the carrier of V1 = {0.V1} by VECTSP_4:def 3;
    rng (MT|^1) c= the carrier of V1 by RELAT_1:def 19;
    then rng (MT|^1)={0.V1} by A7,ZFMISC_1:33;
    then (MT|^1) = (dom (MT|^1))-->0.V1 by FUNCOP_1:9
      .= (the carrier of V1)-->0.V1 by FUNCT_2:def 1
      .= ZeroMap(V1,V1) by GRCAT_1:def 7;
    hence thesis by Th13;
  end;
  suppose
A8: L=0.K;
    now
A9:   dom J=dom (Len J) by MATRIXJ1:def 3;
      let i such that
A10:  i in dom J;
      len (J.i)=(Len J).i by A10,A9,MATRIXJ1:def 3;
      hence len (J.i) <= Sum Len J by A10,A9,POLYNOM3:4;
    end;
    then MT|^(Sum Len J)=ZeroMap(V1,V1) by A1,A8,Th25;
    hence thesis by Th13;
  end;
end;
