reserve a,b,m,x,y,i1,i2,i3,i for Integer,
  k,p,q,n for Nat,
  c,c1,c2 for Element of NAT,
  z for set;
reserve fp,fp1 for FinSequence of NAT,

  b,c,d, n for Element of NAT,
  a for Nat;

theorem Th36:
  (for b being Nat st b in dom fp holds a divides fp.b) implies a
  divides Sum fp
proof
  defpred RP[FinSequence of NAT] means for b being Nat st b in dom $1 holds a
  divides $1.b;
  defpred CC[FinSequence of NAT] means a divides Sum $1;
  defpred TH[set] means ex f being FinSequence of NAT st f = $1 &
  (RP[f] implies CC[f]);
A1: now
    let fp,d such that
A2: TH[fp];
    set fp1=fp^<*d*>;
    now
      assume
A3:   RP[fp1];
A4:   RP[fp]
      proof
        let b be Nat such that
A5:     b in dom fp;
        dom fp c= dom fp1 & fp1.b = fp.b by A5,FINSEQ_1:26,def 7;
        hence thesis by A3,A5;
      end;
      len fp1 in dom fp1 by FINSEQ_5:6;
      then a divides fp1.(len fp1) by A3;
      then a divides fp1.(len fp + 1) by FINSEQ_2:16;
      then a divides d by FINSEQ_1:42;
      then a divides (Sum fp + d ) by A2,A4,NAT_D:8;
      hence CC[fp1] by RVSUM_1:74;
    end;
    hence TH[fp1];
  end;
A6: TH[<*>NAT] by NAT_D:6,RVSUM_1:72;
  for fp holds TH[fp] from FINSEQ_2:sch 2(A6,A1);
  then ex f being FinSequence of NAT st f = fp & (RP[f] implies CC[f]);
  hence thesis;
end;
