reserve GS for GraphStruct;
reserve G,G1,G2,G3 for _Graph;
reserve e,x,x1,x2,y,y1,y2,E,V,X,Y for set;
reserve n,n1,n2 for Nat;
reserve v,v1,v2 for Vertex of G;

theorem
  for G1 being _Graph, v,e being set, G2 being removeVertex of G1, v
  for G3 being removeEdge of G1, e, G4 being removeEdge of G2, e
  holds G4 is removeVertex of G3, v
proof
  let G1 be _Graph, v,e be set, G2 be removeVertex of G1, v;
  let G3 be removeEdge of G1, e, G4 be removeEdge of G2, e;
  A1: the_Vertices_of G3 = the_Vertices_of G1 &
    the_Edges_of G3 = the_Edges_of G1 \ {e} by Th51;
  A2: the_Vertices_of G4 = the_Vertices_of G2 &
    the_Edges_of G4 = the_Edges_of G2 \ {e} by Th51;
  per cases;
  suppose A3: G1 is non _trivial & v in the_Vertices_of G1;
    then reconsider v1 = v as Vertex of G1;
    :: basic relations
    reconsider v3 = v1 as Vertex of G3 by A1;
    A4: the_Vertices_of G2 = the_Vertices_of G1 \ {v} &
      the_Edges_of G2 = G1.edgesBetween(the_Vertices_of G1 \ {v})
      by A3, Th47;
    then A5: the_Edges_of G2
       = G1.edgesBetween(the_Vertices_of G1) \ v1.edgesInOut() by Th107
      .= the_Edges_of G1 \ v1.edgesInOut() by Th34;
    :: G4 is subgraph of G3
    A6: the_Vertices_of G4 c= the_Vertices_of G3 by A1, A2;
    A7: G4 is Subgraph of G1 by Th43;
    for x being object holds x in the_Edges_of G4 implies x in the_Edges_of G3
    proof
      let x be object;
      assume x in the_Edges_of G4;
      then x in the_Edges_of G2 & not x in {e} by A2, XBOOLE_0:def 5;
      hence thesis by A1, XBOOLE_0:def 5;
    end;
    then the_Edges_of G4 c= the_Edges_of G3;
    then A8: G4 is Subgraph of G3 by A6, A7, Th44;
    :: properties of removeVertex
    now
      thus the_Vertices_of G4 = the_Vertices_of G3 \ {v} by A1, A2, A4;
      for x being object holds x in the_Edges_of G4 iff
        x in G3.edgesBetween(the_Vertices_of G3 \ {v})
      proof
        let x be object;
        A9: G3.edgesBetween(the_Vertices_of G3 \ {v})
           = G3.edgesBetween(the_Vertices_of G3) \ v3.edgesInOut() by Th107
          .= the_Edges_of G3 \ v3.edgesInOut() by Th34;
        hereby
          assume x in the_Edges_of G4;
          then A10: x in the_Edges_of G2 & not x in {e} by A2, XBOOLE_0:def 5;
          then x in the_Edges_of G1 & not x in v1.edgesInOut()
            by A5, XBOOLE_0:def 5;
          then A11: not x in v3.edgesInOut() by Th78, TARSKI:def 3;
          x in the_Edges_of G3 by A1, A10, XBOOLE_0:def 5;
          hence x in G3.edgesBetween(the_Vertices_of G3 \ {v})
            by A9, A11, XBOOLE_0:def 5;
        end;
        assume x in G3.edgesBetween(the_Vertices_of G3 \ {v});
        then A12: x in the_Edges_of G3 & not x in v3.edgesInOut()
          by A9, XBOOLE_0:def 5;
        then A13: x in the_Edges_of G1 & not x in {e} by A1, XBOOLE_0:def 5;
        not x in v1.edgesInOut()
        proof
          assume x in v1.edgesInOut();
          then x in v1.edgesInOut() /\ (the_Edges_of G3)
            by A12, XBOOLE_0:def 4;
          hence contradiction by A12, Th79;
        end;
        then x in the_Edges_of G2 by A5, A13, XBOOLE_0:def 5;
        hence thesis by A2, A13, XBOOLE_0:def 5;
      end;
      hence the_Edges_of G4 = G3.edgesBetween(the_Vertices_of G3 \ {v})
        by TARSKI:2;
    end;
    hence thesis by A8, Def37;
  end;
  suppose A14: G1 is _trivial or not v in the_Vertices_of G1;
    then G1 == G2 by Th114;
    then A15: G3 == G4 by Lm12;
    G3 is _trivial or not v in the_Vertices_of G3 by A14;
    hence thesis by A15, Th115;
  end;
end;
