 reserve x,y,z for object,
   i,j,k,l,n,m for Nat,
   D,E for non empty set;
 reserve M for Matrix of D;
 reserve L for Matrix of E;
 reserve k,t,i,j,m,n for Nat,
   D for non empty set;
 reserve V for free Z_Module;
 reserve a for Element of INT.Ring,
   W for Element of V;
 reserve KL1,KL2,KL3 for Linear_Combination of V,
   X for Subset of V;
 reserve V for finite-rank free Z_Module,
   W for Element of V;
 reserve KL1,KL2,KL3 for Linear_Combination of V,
   X for Subset of V;
 reserve s for FinSequence,
   V1,V2,V3 for finite-rank free Z_Module,
   f,f1,f2 for Function of V1,V2,
   g for Function of V2,V3,
   b1 for OrdBasis of V1,
   b2 for OrdBasis of V2,
   b3 for OrdBasis of V3,
   v1,v2 for Vector of V2,
   v,w for Element of V1;
 reserve p2,F for FinSequence of V1,
   p1,d for FinSequence of INT.Ring,
   KL for Linear_Combination of V1;

theorem ThMBF1:
  for V1, V2 being finite-rank free Z_Module,
  b1 being OrdBasis of V1, b2 being OrdBasis of V2, b3 being OrdBasis of V2,
  f being bilinear-Form of V1, V2
  st 0 < rank V1 holds
  BilinearM(f, b1, b3) =
  BilinearM(f, b1, b2) * (AutMt(id(V2), b3, b2)@)
  proof
    let V1, V2 be finite-rank free Z_Module,
    b1 be OrdBasis of V1,
    b2 be OrdBasis of V2,
    b3 be OrdBasis of V2,
    f be bilinear-Form of V1, V2;
    assume AS: 0 < rank V1;
    set n = len b2;
    A2: len b2 = rank V2 by ThRank1;
    A3: len b3 = rank V2 by ThRank1;
    reconsider IM1 = AutMt(id(V2), b3, b2) as Matrix of n,INT.Ring
      by LMThMBF3,A2;
    reconsider M1 = IM1@ as Matrix of n,INT.Ring;
    set M2 = BilinearM(f, b1, b2) * M1;
    B1: len M1 = n & width M1 = n
    & Indices M1 = [:Seg n, Seg n:] by MATRIX_0:24;
    F1: len IM1 = n & width IM1 = n
    & Indices IM1 = [:Seg n, Seg n:] by MATRIX_0:24;
    B2: 0 < len b1 by AS,ThRank1; then
    B3: len BilinearM(f, b1, b2) = len b1
    & width BilinearM(f, b1, b2) = len b2 by MATRIX_0:23;
    C1: width BilinearM(f, b1, b2) = len M1 by B1,B2,MATRIX_0:23;
    len M2 = len b1 & width M2 = n by B1,B3,MATRIX_3:def 4;
    then reconsider M2 as Matrix of len b1,n,INT.Ring by B2,MATRIX_0:20;
    set FM1 = M1;
    set FBM = BilinearM(f, b1, b2);
    for i, j being Nat st [i,j] in Indices BilinearM(f, b1, b3)
    holds BilinearM(f, b1, b3)*(i,j) = M2*(i,j)
    proof
      let i, j be Nat;
      assume [i,j] in Indices BilinearM(f, b1, b3); then
      B6: [i,j] in [:Seg len b1,Seg len b3 :] by B2,MATRIX_0:23; then
      B7: i in Seg len b1 & j in Seg len b3 by ZFMISC_1:87; then
      B8:i in dom b1 & j in dom b3 by FINSEQ_1:def 3; then
      B9: (BilinearM(f, b1, b3))*(i,j) = f.(b1/.i, b3/.j) by defBilinearM;
      [i,j] in Indices M2 by B2,B6,A2,A3,MATRIX_0:23; then
      B11: M2*(i,j) = Line(FBM,i) "*" Col(FM1,j) by C1,MATRIX_3:def 4;
      B12: len Line(FBM,i) = len b2 by B3,MATRIX_0:def 7;
      B13:
      now
        let k be Nat;
        assume B131: k in Seg len b2; then
        B132: k in Seg width FBM by B2,MATRIX_0:23;
        B81: k in dom b2 by FINSEQ_1:def 3,B131;
        thus Line(FBM,i).k = FBM*(i,k) by B132,MATRIX_0:def 7
        .= f.(b1/.i, b2/.k) by B8,B81,defBilinearM;
      end;
      B14: len Col(FM1,j) = len b2 by B1,MATRIX_0:def 8;
      B135: j in Seg n by B6,A2,A3,ZFMISC_1:87;
      B15:
      now
        let k be Nat;
        assume 1 <= k & k <= len Col(FM1,j); then
        B131:k in Seg len b2 by FINSEQ_1:1,B14; then
        B132: k in dom FM1 by B1,FINSEQ_1:def 3;
        B132A: j in dom IM1 by B135,F1,FINSEQ_1:def 3;
        Y1: [j,k] in Indices IM1 by F1,B131,B135,ZFMISC_1:87;
        then consider p be FinSequence of INT such that
        B133: p = IM1.j & IM1*(j,k) = p.k by MATRIX_0:def 5;
        B81A: j in dom b3 by B7,FINSEQ_1:def 3;
        X0: Col(FM1,j).k = FM1*(k,j) by B132,MATRIX_0:def 8
        .= (AutMt(id(V2),b3,b2))*(j,k) by Y1,MATRIX_0:def 6;
        IM1.j = (AutMt(id(V2), b3, b2)) /.j by B132A,PARTFUN1:def 6
        .= (id(V2)).(b3/.j) |-- b2 by B81A,Def8;
        hence Col(FM1,j).k = ((b3/.j) |-- b2).k by B133,X0;
      end;
      len Col(FM1,j) = len ((b3/.j) |-- b2) by B14,Def7;
      hence thesis by B9,B11,B12,B13,B14,B15,LMThMBF1X,FINSEQ_1:def 18;
    end;
    hence thesis by MATRIX_0:27,A2,A3;
  end;
