reserve i,j,m,n,k for Nat,
  x,y for set,
  K for Field,
  a,a1,a2 for Element of K,
  D for non empty set,
  d,d1,d2 for Element of D,
  M,M1,M2 for (Matrix of D),
  A,A1,A2,B1,B2 for (Matrix of K),
  f,g for FinSequence of NAT;
reserve F,F1,F2 for FinSequence_of_Matrix of D,
  G,G9,G1,G2 for FinSequence_of_Matrix of K;
reserve S,S1,S2 for FinSequence_of_Square-Matrix of D,
  R,R1,R2 for FinSequence_of_Square-Matrix of K;
reserve N for (Matrix of n,K),
  N1 for (Matrix of m,K);
reserve p,p1 for FinSequence of K;

theorem
  a*block_diagonal(G,a1) = block_diagonal(mlt(len G|->a,G),a*a1)
proof
  defpred P[Nat] means for a,a1,G st len G=$1 holds a*block_diagonal(G,a1) =
  block_diagonal(mlt(len G|->a,G),a*a1);
A1: for n st P[n] holds P[n+1]
  proof
    let n such that
A2: P[n];
    set n1=n+1;
    let a,a1,G such that
A3: len G=n1;
A4: G=(G|n)^<*G.n1*> by A3,FINSEQ_3:55;
    n<=n1 by NAT_1:13;
    then
A5: len (G|n)=n by A3,FINSEQ_1:59;
    1 in Seg 1;
    then 1 in dom <*a*> by FINSEQ_1:def 8;
    then
A6: <*a*>.1=<*a*>/.1 by PARTFUN1:def 6;
A8: len <*a*>=1 by FINSEQ_1:39;
A9: len <*G.n1*>=1 by FINSEQ_1:39;
A10: len (n|->a)=n by CARD_1:def 7;
    n1|->a=(n|->a)^<*a*> by FINSEQ_2:60;
    hence
    block_diagonal(mlt(len G|->a,G),a*a1) = block_diagonal(mlt(n|->a,G|n)
    ^mlt(<*a*>,<*G.n1*>),a*a1) by A3,A4,A5,A10,A9,A8,Th64
      .= block_diagonal(mlt(n|->a,G|n)^<*a*(G.n1)*>,a*a1) by A6,Th63
      .= block_diagonal(<*block_diagonal(mlt(n|->a,G|n),a*a1)*>^<*a*G.n1*>,
    a*a1) by Th35
      .= block_diagonal(<*a*block_diagonal(G|n,a1),a*G.n1*>,a*a1) by A2,A5
      .= a*block_diagonal(<*block_diagonal(G|n,a1),G.n1*>,a1) by Lm7
      .= a*block_diagonal(G,a1) by A4,Th35;
  end;
A11: P[0]
  proof
    let a,a1,G such that
A12: len G=0;
    dom mlt(len G|->a,G)=dom G by Def9;
    then len mlt(len G|->a,G)=len G by FINSEQ_3:29;
    then Len mlt(len G|->a,G)={} by A12;
    then len block_diagonal(mlt(len G|->a,G),a*a1)=0 by Def5,RVSUM_1:72;
    then
A13: block_diagonal(mlt(len G|->a,G),a*a1)={};
    Len G={} by A12;
    then len block_diagonal(G,a1)=0 by Def5,RVSUM_1:72;
    then len (a*block_diagonal(G,a1))=0 by MATRIX_3:def 5;
    hence thesis by A13;
  end;
  for n holds P[n] from NAT_1:sch 2(A11,A1);
  hence thesis;
end;
