reserve n,m,i,j,k for Nat,
  x,y,e,X,V,U for set,
  W,f,g for Function;
reserve p,q for FinSequence;
reserve G for Graph,
  pe,qe for FinSequence of the carrier' of G;
reserve v,v1,v2,v3 for Element of G;
reserve p,q for oriented Chain of G;

theorem Th54:
  pe in AcyclicPaths(p) & W is_weight>=0of G implies cost(pe,W) <= cost(p,W)
proof
  assume that
A1: pe in AcyclicPaths(p) and
A2: W is_weight>=0of G;
A3: ex r being Simple oriented Chain of G st ( r=pe)&( r <> {})&( (the
Source of G).(r.1) = (the Source of G).(p.1))&( (the Target of G).(r .(len r))
  = (the Target of G).(p.(len p)))&( rng r c= rng p) by A1;
  then pe is one-to-one by Th15;
  hence thesis by A2,A3,Th53;
end;
