 reserve X,Y for set,
         n,m,k,i for Nat,
         r for Real,
         R for Element of F_Real,
         K for Field,
         f,f1,f2,g1,g2 for FinSequence,
         rf,rf1,rf2 for real-valued FinSequence,
         cf,cf1,cf2 for complex-valued FinSequence,
         F for Function;
reserve f,f1,f2 for n-element real-valued FinSequence,
        p,p1,p2 for Point of TOP-REAL n,
        M,M1,M2 for Matrix of n,m,F_Real,
        A,B for Matrix of n,F_Real;

theorem
  for P be Permutation of Seg n holds
   (Mx2Tran M).f = (Mx2Tran(M*P)).(f*P) & f*P is n-element FinSequence of REAL
proof
  let P be Permutation of Seg n;
A1: len f=n by CARD_1:def 7;
  then A2: rng P=Seg n & dom f=Seg n by FINSEQ_1:def 3,FUNCT_2:def 3;
  dom P=Seg n by FUNCT_2:52;
  then A3: dom(f*P)=Seg n by A2,RELAT_1:27;
  then reconsider fP=f*P as FinSequence by FINSEQ_1:def 2;
  rng(f*P)=rng f by A2,RELAT_1:28;
  then reconsider fP as FinSequence of REAL by FINSEQ_1:def 4;
  A4: len fP=n by A1,A3,FINSEQ_1:def 3;
  then A5: fP is n-element by CARD_1:def 7;
  (Mx2Tran M).f = (Mx2Tran(M*P)).(f*P)
  proof
   per cases;
   suppose A6: n<>0;
    then A7: width M=m by MATRIX13:1;
    set MP=M*P;
    A8: len M=n by A6,MATRIX13:1;
    A9: now let i be Nat;
    assume A10: 1<=i & i<=m;
    then i in Seg m;
    then A11: mlt(@fP,Col(MP,i))=(the multF of F_Real).:(fP,Col(M,i)*P)
    by A7,Th15
    .=mlt(@f,Col(M,i))*P by FUNCOP_1:25;
    len Col(M,i)=n by A8,CARD_1:def 7;
    then len mlt(@f,Col(M,i))=n by A1,MATRIX_3:6;
    then A12: dom mlt(@f,Col(M,i))=Seg n by FINSEQ_1:def 3;
    (Mx2Tran MP).fP.i=@fP"*"Col(MP,i) by A6,A5,A10,Th18
     .=(the addF of F_Real)"**"mlt(@fP,Col(MP,i));
    hence (Mx2Tran MP).fP.i = @f"*"Col(M,i) by A12,A11,FINSOP_1:7
     .=(Mx2Tran M).f.i by A6,A10,Th18;
     end;
     len((Mx2Tran M).f)=m & len((Mx2Tran MP).fP)=m by A5,CARD_1:def 7;
     hence thesis by A9;
   end;
   suppose
A13: n = 0;
    len fP = n by A4;
    then card fP = n;
    then
A14: fP is n-element FinSequence by CARD_1:def 7;
    thus (Mx2Tran M).f = 0.TOP-REAL m by Def3,A13
     .= (Mx2Tran(M*P)).fP by A13,Def3,A14
     .= (Mx2Tran(M*P)).(f*P);
   end;
  end;
  hence thesis by A4,CARD_1:def 7;
end;
