
theorem Th39:
  for G2 being _Graph, v1,v2 being Vertex of G2, e being object
  for G1 being addEdge of G2,v1,e,v2
  for w being Vertex of G1, v being Vertex of G2
  st v2 in G2.reachableFrom(v1) & v = w
  holds G1.reachableFrom(w) = G2.reachableFrom(v)
proof
  let G2 be _Graph, v1,v2 be Vertex of G2, e be object;
  let G1 be addEdge of G2,v1,e,v2;
  let w be Vertex of G1, v be Vertex of G2;
  assume that
    A1: v2 in G2.reachableFrom(v1) and
    A2: w = v;
  per cases;
  suppose A3: not e in the_Edges_of G2;
    G2 is Subgraph of G1 by GLIB_006:57;
    then A4: G2.reachableFrom(v) c= G1.reachableFrom(w) by A2, GLIB_002:14;
    for y being object holds y in G1.reachableFrom(w)
      implies y in G2.reachableFrom(v)
    proof
      let y be object;
      assume y in G1.reachableFrom(w);
      then consider W1 being Walk of G1 such that
        A5: W1 is_Walk_from w,y by GLIB_002:def 5;
      set T = the Trail of W1;
      y is set by TARSKI:1;
      then A6: T is_Walk_from w,y by A5, GLIB_001:160;
      per cases;
      suppose not e in T.edges();
        then reconsider W2 = T as Walk of G2 by GLIB_006:109;
        W2 is_Walk_from v,y by A6, A2, GLIB_001:19;
        hence y in G2.reachableFrom(v) by GLIB_002:def 5;
      end;
      suppose e in T.edges();
        then consider w1, w2 being Vertex of G1, n being odd Element of NAT
        such that
          A7: n+2 <= len T and
          A8: w1 = T.n & e = T.(n+1) & w2 = T.(n+2) and
          A9: e Joins w1,w2,G1 by GLIB_001:103;
        set E = G1.walkOf(w1,e,w2);
        A10: E is_odd_substring_of T,0 by A7, A8, GLIB_006:27;
        e DJoins v1,v2,G1 by A3, GLIB_006:105;
        then A11: e Joins v1,v2,G1 by GLIB_000:16;
        then per cases by A9, GLIB_000:15;
        suppose A12: v1 = w1 & v2 = w2;
          consider W2 being Walk of G2 such that
            A13: W2 is_Walk_from v1,v2 by A1, GLIB_002:def 5;
          reconsider W4 = W2 as Walk of G1 by GLIB_006:75;
          not e in W2.edges() by A3;
          then A14: not e in W4.edges() by GLIB_001:110;
          set W5 = T.replaceEdgeWith(e,W4);
          A15: W5 is_Walk_from v,y by A2, A6, GLIB_006:47;
          W2.first() = v1 & W2.last() = v2 by A13, GLIB_001:def 23;
          then W4.first() = v1 & W4.last() = v2 by GLIB_001:16;
          then not e in W5.edges() by A11, A14, GLIB_006:40, A10, A12;
          then reconsider W = W5 as Walk of G2 by GLIB_006:109;
          W is_Walk_from v,y by A15, GLIB_001:19;
          hence y in G2.reachableFrom(v) by GLIB_002:def 5;
        end;
        suppose A17: v1 = w2 & v2 = w1;
          consider W3 being Walk of G2 such that
            A18: W3 is_Walk_from v1,v2 by A1, GLIB_002:def 5;
          A19: W3.reverse() is_Walk_from v2,v1 by A18, GLIB_001:23;
          reconsider W4 = W3.reverse() as Walk of G1 by GLIB_006:75;
          not e in W3.reverse().edges() by A3;
          then A20: not e in W4.edges() by GLIB_001:110;
          set W5 = T.replaceEdgeWith(e,W4);
          A21: W5 is_Walk_from v,y by A2, A6, GLIB_006:47;
          W3.reverse().first() = v2 & W3.reverse().last() = v1
            by A19, GLIB_001:def 23;
          then W4.first() = v2 & W4.last() = v1 by GLIB_001:16;
          then not e in W5.edges()
            by A11, A20, GLIB_006:40, GLIB_000:14, A10, A17;
          then reconsider W = W5 as Walk of G2 by GLIB_006:109;
          W is_Walk_from v,y by A21, GLIB_001:19;
          hence y in G2.reachableFrom(v) by GLIB_002:def 5;
        end;
      end;
    end;
    then G1.reachableFrom(w) c= G2.reachableFrom(v) by TARSKI:def 3;
    hence G1.reachableFrom(w) = G2.reachableFrom(v) by A4, XBOOLE_0:def 10;
  end;
  suppose e in the_Edges_of G2;
    then G1 == G2 by GLIB_006:def 11;
    hence thesis by A2, GLIB_002:17;
  end;
end;
