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
  for G2 being removeEdge of G1, e
  for G3 being removeVertex of G1, v, G4 being removeVertex of G2, v
  holds G4 is removeEdge of G3, e
proof
  let G1 be _Graph, v,e be set;
  let G2 be removeEdge of G1, e;
  let G3 be removeVertex of G1, v, G4 be removeVertex of G2, v;
  A1: the_Vertices_of G2 = the_Vertices_of G1 &
    the_Edges_of G2 = the_Edges_of G1 \ {e} by Th51;
  per cases;
  suppose A2: G1 is non _trivial & v in the_Vertices_of G1;
    then reconsider v1 = v as Vertex of G1;
    reconsider v2 = v1 as Vertex of G2 by A1;
    :: basic relations
    the_Vertices_of G3 = the_Vertices_of G1 \ {v} &
      the_Edges_of G3 = G1.edgesBetween(the_Vertices_of G1 \ {v})
      by A2, Th47;
    then A3: the_Edges_of G3
       = G1.edgesBetween(the_Vertices_of G1) \ v1.edgesInOut() by Th107
      .= the_Edges_of G1 \ v1.edgesInOut() by Th34;
    the_Vertices_of G4 = the_Vertices_of G2 \ {v} &
      the_Edges_of G4 = G2.edgesBetween(the_Vertices_of G2 \ {v})
      by A1, A2, Th47;
    then A4: the_Edges_of G4
       = G2.edgesBetween(the_Vertices_of G2) \ v2.edgesInOut() by Th107
      .= the_Edges_of G2 \ v2.edgesInOut() by Th34;
    :: G4 is subgraph of G3
    A5: the_Vertices_of G4 = the_Vertices_of G1 \ {v} by A1, A2, Th47
      .= the_Vertices_of G3 by A2, Th47;
    for x being object holds x in the_Edges_of G4
      implies x in the_Edges_of G3 \ {e}
    proof
      let x be object;
      assume x in the_Edges_of G4;
      then A6: x in the_Edges_of G2 & not x in v2.edgesInOut()
        by A4, XBOOLE_0:def 5;
      then A7: 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 per cases by Th61;
        suppose (the_Source_of G1).x = v1;
          then (the_Source_of G2).x = v1 by A6, Def32;
          hence contradiction by A6, Th61;
        end;
        suppose (the_Target_of G1).x = v1;
          then (the_Target_of G2).x = v1 by A6, Def32;
          hence contradiction by A6, Th61;
        end;
      end;
      then x in the_Edges_of G3 by A3, A6, XBOOLE_0:def 5;
      hence thesis by A7, XBOOLE_0:def 5;
    end;
    then A8: the_Edges_of G4 c= the_Edges_of G3 \ {e};
    the_Edges_of G3 \ {e} c= the_Edges_of G3 by XBOOLE_1:36;
    then A9: the_Edges_of G4 c= the_Edges_of G3 by A8;
    G4 is Subgraph of G1 by Th43;
    then A10: G4 is Subgraph of G3 by A5, A9, Th44;
    :: property assumptions for induced subgraph
    A11: now
      the_Vertices_of G3 c= the_Vertices_of G3;
      hence the_Vertices_of G3 is non empty Subset of the_Vertices_of G3;
      the_Edges_of G3 \ {e} c= the_Edges_of G3 by XBOOLE_1:36;
      hence the_Edges_of G3 \ {e} c= G3.edgesBetween(the_Vertices_of G3)
        by Th34;
    end;
    :: properties of removeEdge
    now
      thus the_Vertices_of G4 = the_Vertices_of G3 by A5;
      for x being object holds x in the_Edges_of G3 \ {e}
        implies x in the_Edges_of G4
      proof
        let x be object;
        assume x in the_Edges_of G3 \ {e};
        then A12: x in the_Edges_of G3 & not x in {e} by XBOOLE_0:def 5;
        then A13: x in the_Edges_of G1 & not x in v1.edgesInOut()
          by A3, XBOOLE_0:def 5;
        A14: x in the_Edges_of G2 by A1, A12, XBOOLE_0:def 5;
        not x in v2.edgesInOut() by A13, Th78, TARSKI:def 3;
        hence thesis by A4, A14, XBOOLE_0:def 5;
      end;
      then the_Edges_of G3 \ {e} c= the_Edges_of G4;
      hence the_Edges_of G4 = the_Edges_of G3 \ {e} by A8, XBOOLE_0:def 10;
    end;
    hence thesis by A10, A11, Def37;
  end;
  suppose A15: G1 is _trivial or not v in the_Vertices_of G1;
    then A16: G1 == G3 by Th114;
    G2 is _trivial or not v in the_Vertices_of G2
    proof
      per cases by A15;
      suppose G1 is _trivial;
        hence thesis;
      end;
      suppose not v in the_Vertices_of G1;
        hence thesis;
      end;
    end;
    then G2 == G4 by Th114;
    hence thesis by A16, Lm13;
  end;
end;
