reserve x, y for object, X for set,
  i, j, k, l, n, m for Nat,
  D for non empty set,
  K for commutative Ring,
  a,b for Element of K,
  perm, p, q for Element of Permutations(n),
  Perm,P for Permutation of Seg n,
  F for Function of Seg n,Seg n,
  perm2, p2, q2, pq2 for Element of Permutations(n+2),
  Perm2 for Permutation of Seg (n+2);
reserve s for Element of 2Set Seg (n+2);
reserve pD for FinSequence of D,
  M for Matrix of n,m,D,
  pK,qK for FinSequence of K,
  A for Matrix of n,K;

theorem Th41:
  for p,Perm,q st q=p*Perm" holds (the multF of K) $$ (Path_matrix
  (p,A*Perm)) = (the multF of K) $$ (Path_matrix(q,A))
proof
  let p,Perm,q such that
A1: q=p*Perm";
  set mm=the multF of K;
  set P2= Path_matrix(q,A);
  set P1=Path_matrix(p,A*Perm);
  now
    per cases;
    case
A2:   n=0;
      then len P1=0 by MATRIX_3:def 7;
      then
A3:   mm $$ P1=the_unity_wrt mm by FINSOP_1:def 1;
      len P2=0 by A2,MATRIX_3:def 7;
      hence thesis by A3,FINSOP_1:def 1;
    end;
    case
      n+0>0;
      then
A4:   n>=1 by NAT_1:19;
A5:   len P2=n by MATRIX_3:def 7;
A6:   Perm is Element of Permutations(n) by MATRIX_1:def 12;
      P1 = P2*Perm by A1,Th40;
      hence thesis by A4,A5,A6,MATRIX_7:33;
    end;
  end;
  hence thesis;
end;
