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;
