reserve x,y,X for set,
  i,j,k,m,n for Nat,
  p for FinSequence of X,
  ii for Integer;
reserve G for Graph,
  pe,qe for FinSequence of the carrier' of G,
  p,q for oriented Chain of G,
  W for Function,
  U,V,e,ee for set,
  v1,v2,v3,v4 for Vertex of G;

theorem Th8:
  p is_shortestpath_of v1,v2,V,W iff p is_shortestpath_of v1,v2,V \/{v2},W
proof
  set V9=V \/ {v2};
  hereby
    assume
A1: p is_shortestpath_of v1,v2,V,W;
A2: now
      let q;
      assume q is_orientedpath_of v1,v2,V9;
      then q is_orientedpath_of v1,v2,V by Th7;
      hence cost(p,W) <= cost(q,W) by A1,GRAPH_5:def 18;
    end;
    p is_orientedpath_of v1,v2,V by A1,GRAPH_5:def 18;
    then p is_orientedpath_of v1,v2,V9 by Th7;
    hence p is_shortestpath_of v1,v2,V9,W by A2,GRAPH_5:def 18;
  end;
  assume
A3: p is_shortestpath_of v1,v2,V9,W;
A4: now
    let q;
    assume q is_orientedpath_of v1,v2,V;
    then q is_orientedpath_of v1,v2,V9 by Th7;
    hence cost(p,W) <= cost(q,W) by A3,GRAPH_5:def 18;
  end;
  p is_orientedpath_of v1,v2,V9 by A3,GRAPH_5:def 18;
  then p is_orientedpath_of v1,v2,V by Th7;
  hence thesis by A4,GRAPH_5:def 18;
end;
