 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 LmSign31:
  for V being finite-rank free Z_Module, b1 being OrdBasis of V
  st rank(V) > 0 holds
  AutMt(id(V), b1, b1) = 1.(INT.Ring,rank(V))
  proof
    let V be finite-rank free Z_Module, b1 be OrdBasis of V;
    assume AS:rank(V) > 0;
    B0: len b1 = rank(V) by ThRank1;
    B1: len AutMt(id(V), b1, b1) = rank(V) by B0,Def8;
    B3: width AutMt(id(V),b1,b1) = rank(V) by AS,B0,Th39;
    P1: len AutMt(id(V), b1, b1) = len 1.(INT.Ring,rank(V))
    by B1,MATRIX_0:24;
    P4: dom AutMt(id(V), b1, b1)
     = Seg len AutMt(id(V), b1, b1) by FINSEQ_1:def 3
    .= dom (1.(INT.Ring,rank(V))) by P1,FINSEQ_1:def 3;
    P2: width AutMt(id(V), b1, b1) = width (1.(INT.Ring,rank(V)))
    by B3,MATRIX_0:24;
    P5: Indices AutMt(id(V), b1, b1) = Indices (1.(INT.Ring,rank(V)))
    by B3,P4,MATRIX_0:24;
    X2:
    now
      let i, j be Nat;
      assume X20: [i,j] in Indices AutMt(id(V), b1, b1); then
      X21: i in dom AutMt(id(V), b1, b1)
      & j in Seg width AutMt(id(V), b1, b1) by ZFMISC_1:87;
      dom AutMt(id(V), b1, b1) = Seg len AutMt(id(V), b1, b1)
      by FINSEQ_1:def 3
      .= Seg len b1 by Def8
      .= dom b1 by FINSEQ_1:def 3;
      then
      X23: i in dom b1 by X20,ZFMISC_1:87;
      width AutMt(id(V),b1,b1) = len b1 by Th39,AS,B0;
      then
      Y23: j in dom b1 by X21,FINSEQ_1:def 3;
      X25: AutMt(id(V), b1, b1)/.i = id(V).(b1/.i) |-- b1 by Def8,X23;
      consider q be FinSequence of INT such that
      X26: q = AutMt(id(V), b1, b1).i
      & AutMt(id(V), b1, b1)*(i,j) = q.j by MATRIX_0:def 5,X20;
      X27: AutMt(id(V), b1, b1)*(i,j)
      = ((b1/.i) |-- b1).j by X21,X25,X26,PARTFUN1:def 6;
      thus i <> j implies AutMt(id(V), b1, b1)*(i,j) = 0
      by X23,X27,Y23,LmSign31X;
      thus i = j implies AutMt(id(V), b1, b1)*(i,j) = 1
      by X23,X27,LmSign31X;
    end;
    for i, j being Nat st [i,j] in Indices AutMt(id(V), b1, b1)
    holds AutMt(id(V), b1, b1)*(i,j) = 1.(INT.Ring,rank V)*(i,j)
    proof
      let i, j be Nat;
      assume P6: [i,j] in Indices AutMt(id(V), b1, b1);
      per cases;
      suppose P8: i <> j;
        then 1.(INT.Ring,rank(V))*(i,j) = 0.INT.Ring
           by P5,P6,MATRIX_1:def 3;
        hence AutMt(id(V), b1, b1)*(i,j) = 1.(INT.Ring,rank(V))*(i,j)
        by P6,P8,X2;
      end;
      suppose P10: i = j;
        then 1.(INT.Ring,rank(V))*(i,j) = 1.INT.Ring by P5,P6,
          MATRIX_1:def 3;
        hence AutMt(id(V), b1, b1)*(i,j) = 1.(INT.Ring,rank(V))*(i,j)
        by P6,P10,X2;
      end;
    end;
    hence thesis by P1,P2,EQ40;
  end;
