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;
reserve A for (Matrix of D),
  A9 for Matrix of n9,m9,D,
  M9 for Matrix of n9, m9,K,
  nt,nt1,nt2 for Element of n-tuples_on NAT,
  mt,mt1 for Element of m -tuples_on NAT,
  M for Matrix of K;
reserve P,P1,P2,Q,Q1,Q2 for without_zero finite Subset of NAT;

theorem Th87:
  for p,pf be FinSequence of K, f be Function st pf = p * f & rng
  f c= dom p holds (a*p) * f = a * pf
proof
  let p,pf be FinSequence of K, f be Function such that
A1: pf = p * f and
A2: rng f c= dom p;
  len (a*p)=len p by MATRIXR1:16;
  then
A3: dom (a*p)=Seg len p by FINSEQ_1:def 3;
A4: Seg len p=dom p by FINSEQ_1:def 3;
  then
A5: dom (a*p*f)=dom f by A2,A3,RELAT_1:27;
  len (a*pf)=len pf by MATRIXR1:16;
  then
A6: dom (a*pf)=Seg len pf by FINSEQ_1:def 3;
A7: Seg len pf =dom pf by FINSEQ_1:def 3;
  then
A8: dom (a*pf)=dom f by A1,A2,A6,RELAT_1:27;
  now
    set KK=the carrier of K;
A9: rng pf c= KK by FINSEQ_1:def 4;
    let x being object such that
A10: x in dom (a*pf);
A11: f.x in rng f by A8,A10,FUNCT_1:def 3;
    then
A12: f.x in dom p by A2;
    pf.x in rng pf by A6,A7,A10,FUNCT_1:def 3;
    then reconsider pf9x=pf.x as Element of K by A9;
A13: p.(f.x) in rng p by A2,A11,FUNCT_1:def 3;
    thus (a*pf).x = a*pf9x by A10,FVSUM_1:50
      .= (a*p).(f.x) by A1,A3,A4,A6,A7,A10,A12,A13,FUNCT_1:12,FVSUM_1:50
      .= ((a*p)*f).x by A5,A8,A10,FUNCT_1:12;
  end;
  hence thesis by A1,A2,A6,A7,A5,FUNCT_1:2,RELAT_1:27;
end;
