
theorem Th26:
  for G1 being loopless _Graph, V being set
  for G2 being addLoops of G1, V, G3 being removeLoops of G2
  holds G1 == G3
proof
  let G1 be loopless _Graph, V be set;
  let G2 be addLoops of G1, V, G3 be removeLoops of G2;
  per cases;
  suppose A1: V c= the_Vertices_of G1;
    then A2: the_Vertices_of G1 = the_Vertices_of G2 by Def5
      .= the_Vertices_of G3 by GLIB_000:53;
    A3: the_Edges_of G1
       = (the_Edges_of G1 \/ G2.loops()) \ G2.loops() by A1, Th25, XBOOLE_1:88
      .= the_Edges_of G2 \ G2.loops() by A1, Th25
      .= the_Edges_of G3 by GLIB_000:53;
    A4: dom the_Source_of G1 = the_Edges_of G3 by A3, FUNCT_2:def 1
      .= dom the_Source_of G3 by FUNCT_2:def 1;
    A5: dom the_Target_of G1 = the_Edges_of G3 by A3, FUNCT_2:def 1
      .= dom the_Target_of G3 by FUNCT_2:def 1;
    now
      let e be object;
      assume A6: e in dom the_Source_of G1;
      hence (the_Source_of G1).e
         = (the_Source_of G2).e by GLIB_006:def 9
        .= (the_Source_of G3).e by A3, A6, GLIB_000:def 32;
    end;
    then A7: the_Source_of G1 = the_Source_of G3 by A4, FUNCT_1:2;
    now
      let e be object;
      assume A8: e in dom the_Target_of G1;
      hence (the_Target_of G1).e
         = (the_Target_of G2).e by GLIB_006:def 9
        .= (the_Target_of G3).e by A3, A8, GLIB_000:def 32;
    end;
    then the_Target_of G1 = the_Target_of G3 by A5, FUNCT_1:2;
    hence thesis by A2, A3, A7, GLIB_000:def 34;
  end;
  suppose not V c= the_Vertices_of G1;
    then A9: G1 == G2 by Def5;
    then G2 is loopless by GLIB_000:89;
    then G2 == G3 by GLIB_009:58;
    hence thesis by A9, GLIB_000:85;
  end;
end;
