
theorem Th42:
  for G2 being _Graph, v1,v2 being Vertex of G2, e being object
  for G1 being addEdge of G2,v1,e,v2
  for w1 being Vertex of G1
  st not e in the_Edges_of G2 & w1 = v1
  holds G1.reachableFrom(w1) = G2.reachableFrom(v1) \/ G2.reachableFrom(v2)
proof
  let G2 be _Graph, v1,v2 be Vertex of G2, e be object;
  let G1 be addEdge of G2,v1,e,v2, w1 be Vertex of G1;
  assume A1: not e in the_Edges_of G2 & w1 = v1;
  A2: G2 is Subgraph of G1 by GLIB_006:57;
  e DJoins v1,v2,G1 by A1, GLIB_006:105;
  then A3: e Joins v1,v2,G1 by GLIB_000:16;
  for x being object holds x in G1.reachableFrom(w1)
    implies x in G2.reachableFrom(v1) \/ G2.reachableFrom(v2)
  proof
    let x be object;
    assume A4: x in G1.reachableFrom(w1);
    per cases;
    suppose x = w1;
      then x in G2.reachableFrom(v1) by GLIB_002:9, A1;
      hence thesis by XBOOLE_0:def 3;
    end;
    suppose A5: x <> w1;
      consider W1 being Walk of G1 such that
        A6: W1 is_Walk_from w1, x by A4, GLIB_002:def 5;
      set P1 = the Path of W1.reverse();
      A7: W1.reverse() is_Walk_from x, w1 by A6, GLIB_001:23;
      x is set by TARSKI:1;
      then A8: P1 is_Walk_from x, w1 by A7, GLIB_001:160;
      per cases;
      suppose not e in P1.edges();
        then reconsider W2 = P1 as Walk of G2 by GLIB_006:109;
        W2 is_Walk_from x, w1 by A8, GLIB_001:19;
        then W2.reverse() is_Walk_from v1, x by A1, GLIB_001:23;
        then x in G2.reachableFrom(v1) by GLIB_002:def 5;
        hence thesis by XBOOLE_0:def 3;
      end;
      suppose e in P1.edges();
        then consider u1, u2 being Vertex of G1, n being odd Element of NAT
          such that
          A9: n+2 <= len P1 & u1 = P1.n & e = P1.(n+1) & u2 = P1.(n+2) and
          A10: e Joins u1,u2,G1 by GLIB_001:103;
        A11: v2 = u1 & v1 = u2
        proof
          assume not (v2 = u1 & v1 = u2);
          then A12: v1 = P1.n by A3, A9, A10, GLIB_000:15;
          A13: P1.len P1 = P1.last() by GLIB_001:def 7
            .= v1 by A1, A8, GLIB_001:def 23;
          n+2-2 < len P1 - 0 by A9, XREAL_1:15;
          then n = 1 by A12, A13, GLIB_001:def 28;
          then v1 = P1.first() by A12, GLIB_001:def 6
            .= x by A8, GLIB_001:def 23;
          hence contradiction by A1, A5;
        end;
        set P2 = P1.cut(1,n);
        not e in P2.edges()
        proof
          assume e in P2.edges();
          then consider u3, u4 being Vertex of G1, m being odd Element of NAT
            such that
            A14: m+2 <= len P2 & u3 = P2.m & e = P2.(m+1) & u4 = P2.(m+2) and
            e Joins u3,u4,G1 by GLIB_001:103;
          n+2-2 <= len P1 - 0 by A9, XREAL_1:13;
          then A15: 1 <= n & n <= len P1 by ABIAN:12;
          A16: m+2-2 < len P2 - 0 by A14, XREAL_1:15;
          then A17: P1.(m+1) = P1.(n+1)
            by A9, A14, A15, POLYFORM:4, GLIB_001:36;
          A18: 1+0 <= m+1 & m < n by A15, A16, GLIB_001:45, XREAL_1:7;
          then A19: m+1 < n+1 by XREAL_1:6;
          n+2-1 <= len P1 - 0 by A9, XREAL_1:13;
          hence contradiction by A17, A18, A19, GLIB_001:138;
        end;
        then reconsider W2 = P2 as Walk of G2 by GLIB_006:109;
        n+2-2 <= len P1 - 0 by A9, XREAL_1:13;
        then 1 <= n & n <= len P1 by ABIAN:12;
        then P2 is_Walk_from P1.1, P1.n by POLYFORM:4, GLIB_001:37;
        then W2 is_Walk_from P1.1, P1.n by GLIB_001:19;
        then W2 is_Walk_from P1.first(), P1.n by GLIB_001:def 6;
        then W2 is_Walk_from x, v2 by A8, A9, A11, GLIB_001:def 23;
        then W2.reverse() is_Walk_from v2, x by GLIB_001:23;
        then x in G2.reachableFrom(v2) by GLIB_002:def 5;
        hence thesis by XBOOLE_0:def 3;
      end;
    end;
  end;
  then A20: G1.reachableFrom(w1)
    c= G2.reachableFrom(v1) \/ G2.reachableFrom(v2) by TARSKI:def 3;
  A21: G2.reachableFrom(v1) c= G1.reachableFrom(w1) by A1, A2, GLIB_002:14;
  reconsider w2 = v2 as Vertex of G1 by GLIB_006:68;
  G2.reachableFrom(v2) c= G1.reachableFrom(w2) by A2, GLIB_002:14;
  then G2.reachableFrom(v2) c= G1.reachableFrom(w1)
    by A1, Th41, GLIB_002:12;
  then G2.reachableFrom(v1) \/ G2.reachableFrom(v2)
    c= G1.reachableFrom(w1) by A21, XBOOLE_1:8;
  hence thesis by A20, XBOOLE_0:def 10;
end;
