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 Th51:
  for D being non empty finite Subset of (the carrier' of G)* st D
= AcyclicPaths(v1,v2,V) holds ex pe st pe in D & for qe st qe in D holds cost(
  pe,W) <= cost(qe,W)
proof
  let D be non empty finite Subset of ((the carrier' of G)*);
  deffunc F(Element of D) = cost($1,W);
  consider x being Element of D such that
A1: for y being Element of D holds F(x) <= F(y) from PRE_CIRC:sch 5;
  assume D = AcyclicPaths(v1,v2,V);
  then x in AcyclicPaths(v1,v2,V);
  then consider p being Simple oriented Chain of G such that
A2: x=p and
  p is_acyclicpath_of v1,v2,V;
  take p;
  thus p in D by A2;
  let pe;
  assume pe in D;
  then reconsider y=pe as Element of D;
  F(x) <= F(y) by A1;
  hence thesis by A2;
end;
