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;
reserve G for finite Graph,
  ps for Simple oriented Chain of G,
  P,Q for oriented Chain of G,
  v1,v2,v3 for Element of G,
  pe,qe for FinSequence of the carrier' of G;

theorem Th60:
  P is_orientedpath_of v1,v2,V & W is_weight>=0of G implies ex q
  being Simple oriented Chain of G st q is_shortestpath_of v1,v2,V,W
proof
  assume that
A1: P is_orientedpath_of v1,v2,V and
A2: W is_weight>=0of G;
  AcyclicPaths(v1,v2,V) <> {} by A1,Th42;
  then consider r being FinSequence of the carrier' of G such that
A3: r in AcyclicPaths(v1,v2,V) and
A4: for s being FinSequence of the carrier' of G st s in AcyclicPaths(v1
  ,v2,V) holds cost(r,W) <= cost(s,W) by Th51;
  consider t being Simple oriented Chain of G such that
A5: r=t and
A6: t is_acyclicpath_of v1,v2,V by A3;
  take t;
  thus t is_orientedpath_of v1,v2,V by A6;
  hereby
    let s be oriented Chain of G;
    assume
A7: s is_orientedpath_of v1,v2,V;
    then consider x being Element of ((the carrier' of G)*) such that
A8: x in AcyclicPaths(s) by Th42,SUBSET_1:4;
    AcyclicPaths(s) c= AcyclicPaths(v1,v2,V) by A7,Th39;
    then
A9: cost(r,W) <= cost(x,W) by A4,A8;
    cost(x,W) <= cost(s,W) by A2,A8,Th54;
    hence cost(t,W) <= cost(s,W) by A5,A9,XXREAL_0:2;
  end;
end;
