
theorem
  for G2,G3 being _Graph, V, E being set, G1 being addVertices of G3, V
  for G4 being reverseEdgeDirections of G3, E
  holds G2 is reverseEdgeDirections of G1, E iff G2 is addVertices of G4, V
proof
  let G2, G3 be _Graph, V, E be set, G1 be addVertices of G3, V;
  let G4 be reverseEdgeDirections of G3, E;
  per cases;
  suppose A1: E c= the_Edges_of G3;
    then A2: E c= the_Edges_of G1 by GLIB_006:def 10;
    hereby
      assume A3: G2 is reverseEdgeDirections of G1, E;
      then A4: the_Vertices_of G2 = the_Vertices_of G1 by A2, GLIB_007:def 1
        .= the_Vertices_of G3 \/ V by GLIB_006:def 10
        .= the_Vertices_of G4 \/ V by A1, GLIB_007:def 1;
      then A5: the_Vertices_of G4 c= the_Vertices_of G2 by XBOOLE_1:7;
      now
        let e,v,w be object;
        assume A6: e DJoins v,w,G4;
        per cases;
        suppose A7: e in E;
          then e DJoins w,v,G3 by A1, A6, GLIB_007:7;
          then e DJoins w,v,G1 by GLIB_006:85;
          hence e DJoins v,w,G2 by A2, A3, A7, GLIB_007:7;
        end;
        suppose A8: not e in E;
          then e DJoins v,w,G3 by A1, A6, GLIB_007:8;
          then e DJoins v,w,G1 by GLIB_006:85;
          hence e DJoins v,w,G2 by A2, A3, A8, GLIB_007:8;
        end;
      end;
      then A9: G2 is Supergraph of G4 by A5, Th50;
      A10: the_Edges_of G2 = the_Edges_of G1 by A2, A3, GLIB_007:def 1
        .= the_Edges_of G3 by GLIB_006:def 10
        .= the_Edges_of G4 by A1, GLIB_007:def 1;
      A11: the_Source_of G2 = the_Source_of G1 +* ((the_Target_of G1) | E)
          by A2, A3, GLIB_007:def 1
        .= the_Source_of G3 +* ((the_Target_of G1) | E) by GLIB_006:def 10
        .= the_Source_of G3 +* ((the_Target_of G3) | E) by GLIB_006:def 10
        .= the_Source_of G4 by A1, GLIB_007:def 1;
      the_Target_of G2 = the_Target_of G1 +* ((the_Source_of G1) | E)
          by A2, A3, GLIB_007:def 1
        .= the_Target_of G3 +* ((the_Source_of G1) | E) by GLIB_006:def 10
        .= the_Target_of G3 +* ((the_Source_of G3) | E) by GLIB_006:def 10
        .= the_Target_of G4 by A1, GLIB_007:def 1;
      hence G2 is addVertices of G4, V by A4, A9, A10, A11, GLIB_006:def 10;
    end;
    assume A12: G2 is addVertices of G4, V;
    then A13: the_Vertices_of G2 = the_Vertices_of G4 \/ V by GLIB_006:def 10
      .= the_Vertices_of G3 \/ V by A1, GLIB_007:def 1
      .= the_Vertices_of G1 by GLIB_006:def 10;
    A14: the_Edges_of G2 = the_Edges_of G4 by A12, GLIB_006:def 10
      .= the_Edges_of G3 by A1, GLIB_007:def 1
      .= the_Edges_of G1 by GLIB_006:def 10;
    A15: the_Source_of G2 = the_Source_of G4 by A12, GLIB_006:def 10
      .= the_Source_of G3 +* ((the_Target_of G3)|E) by A1, GLIB_007:def 1
      .= the_Source_of G1 +* ((the_Target_of G3)|E) by GLIB_006:def 10
      .= the_Source_of G1 +* ((the_Target_of G1)|E) by GLIB_006:def 10;
    the_Target_of G2 = the_Target_of G4 by A12, GLIB_006:def 10
      .= the_Target_of G3 +* ((the_Source_of G3)|E) by A1, GLIB_007:def 1
      .= the_Target_of G1 +* ((the_Source_of G3)|E) by GLIB_006:def 10
      .= the_Target_of G1 +* ((the_Source_of G1)|E) by GLIB_006:def 10;
    hence thesis by A2, A13, A14, A15, GLIB_007:def 1;
  end;
  suppose A16: not E c= the_Edges_of G3;
    then A17: not E c= the_Edges_of G1 by GLIB_006:def 10;
    A18: G4 == G3 by A16, GLIB_007:def 1;
    hereby
      assume G2 is reverseEdgeDirections of G1, E;
      then G2 == G1 by A17, GLIB_007:def 1;
      then G2 is addVertices of G3, V by GLIB_006:80;
      hence G2 is addVertices of G4, V by A18, GLIB_008:32;
    end;
    assume G2 is addVertices of G4, V;
    then G2 is addVertices of G3, V by A18, GLIB_008:32;
    then G1 == G2 by GLIB_006:77;
    hence thesis by A17, GLIB_007:def 1;
  end;
end;
