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;

theorem Th5:
  for M be (Matrix of n,K),perm being Element of Permutations n st
  perm <> idseq n & ( M is lower_triangular Matrix of n,K or M is
  upper_triangular Matrix of n,K ) holds (Path_product(M)).perm = 0.K
proof
  let M be (Matrix of n,K),p be Element of Permutations n such that
A1: p <> idseq n and
A2: M is lower_triangular Matrix of n,K or M is upper_triangular Matrix of n,K;
  reconsider p9=p as Permutation of Seg n by MATRIX_1:def 12;
  set PP=Path_product(M);
  set PATH=Path_matrix(p,M);
  now
    per cases by A2;
    suppose
A3:   M is lower_triangular Matrix of n,K;
A4:   rng p9=Seg n by FUNCT_2:def 3;
A5:   Indices M=[:Seg n,Seg n :] by MATRIX_0:24;
      consider i such that
A6:   i in Seg n and
A7:   p.i>i by A1,Th4;
      reconsider Pi=p.i as Nat;
      dom p9=Seg n by FUNCT_2:52;
      then p9.i in Seg n by A6,A4,FUNCT_1:def 3;
      then [i,Pi] in [:Seg n,Seg n:] by A6,ZFMISC_1:87;
      then
A8:   M*(i,Pi)=0.K by A3,A7,A5,MATRIX_1:def 9;
      len PATH=n by MATRIX_3:def 7;
      then
A9:   dom PATH=Seg n by FINSEQ_1:def 3;
      then PATH.i=M*(i,Pi) by A6,MATRIX_3:def 7;
      hence ex i st i in dom PATH & PATH.i=0.K by A6,A9,A8;
    end;
    suppose
A10:  M is upper_triangular Matrix of n,K;
A11:  rng p9=Seg n by FUNCT_2:def 3;
A12:  Indices M=[:Seg n,Seg n :] by MATRIX_0:24;
      consider i such that
A13:  i in Seg n and
A14:  p.i<i by A1,Th4;
      reconsider Pi=p.i as Nat;
      dom p9=Seg n by FUNCT_2:52;
      then p9.i in Seg n by A13,A11,FUNCT_1:def 3;
      then [i,Pi] in [:Seg n,Seg n:] by A13,ZFMISC_1:87;
      then
A15:  M*(i,Pi)=0.K by A10,A14,A12,MATRIX_1:def 8;
      len PATH=n by MATRIX_3:def 7;
      then
A16:  dom PATH=Seg n by FINSEQ_1:def 3;
      then PATH.i=M*(i,Pi) by A13,MATRIX_3:def 7;
      hence ex i st i in dom PATH & PATH.i=0.K by A13,A16,A15;
    end;
  end;
  then Product PATH=0.K by FVSUM_1:82;
  then
A17: PP.p=-(0.K,p) by MATRIX_3:def 8;
  -(0.K,p)=0.K or -(0.K,p)=-0.K by MATRIX_1:def 16;
  hence thesis by A17,RLVECT_1:12;
end;
