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 Th32:
  q=p^pe & len p >= 1 & len pe=1 & p is_orientedpath_of v1,v2,V &
  pe.1 orientedly_joins v2,v3 implies q is_orientedpath_of v1,v3,V \/{v2}
proof
  assume that
A1: q=p^pe and
A2: len p >= 1 & len pe=1 and
A3: p is_orientedpath_of v1,v2,V and
A4: pe.1 orientedly_joins v2,v3;
  p is_orientedpath_of v1,v2 by A3;
  then
A5: ex r being oriented Chain of G st r=p^pe & r is_orientedpath_of v1,v3 by A2
,A4,Th31;
  set FT=the Target of G;
  FT.(pe.1) = v3 by A4,GRAPH_4:def 1;
  then vertices(q) \ {v3} = vertices(p) \/ {v3} \ {v3} by A1,A2,Th25
    .=vertices(p) \ {v3} by XBOOLE_1:40;
  then
A6: vertices(q) \ {v3} c= vertices(p) by XBOOLE_1:36;
  vertices(p) \ {v2} c= V by A3;
  then vertices p c= V \/ {v2} by XBOOLE_1:44;
  then vertices(q) \ {v3} c= V \/ {v2} by A6;
  hence thesis by A1,A5;
end;
