reserve G, G1, G2 for _Graph, H for Subgraph of G;

theorem
  the_Edges_of G = G.loops() iff for H being removeLoops of G
    holds G.allSpanningForests() = {H | _GraphSelectors}
proof
  hereby
    assume A1: the_Edges_of G = G.loops();
    let H be removeLoops of G;
    A2: H is edgeless by A1;
    now
      let x be object;
      hereby
        assume x in G.allSpanningForests();
        then reconsider H9 = x as plain spanning acyclic Subgraph of G by Th102
;
        now
          thus the_Vertices_of H9 = the_Vertices_of G by GLIB_000:def 33
            .= the_Vertices_of H by GLIB_000:def 33;
          A3: the_Edges_of H9 = {}
          proof
            assume the_Edges_of H9 <> {};
            then consider e being object such that
              A4: e in the_Edges_of H9 by XBOOLE_0:def 1;
            set v = (the_Source_of H9).e, w = (the_Target_of H9).e;
            A5: e Joins v,w,H9 by A4, GLIB_000:def 13;
            per cases;
            suppose v = w;
              then H9.walkOf(v,e,w) is Cycle-like by A5, GLIB_001:156;
              hence contradiction by GLIB_002:def 2;
            end;
            suppose A6: v <> w;
              e Joins v,w,G by A5, GLIB_000:72;
              hence contradiction by A1, A4, A6, GLIB_009:46;
            end;
          end;
          hence the_Edges_of H9 = the_Edges_of H by A2;
          hence the_Source_of H9 = the_Source_of H &
            the_Target_of H9 = the_Target_of H by A3;
        end;
        then A7: H9 == H by GLIB_000:def 34;
        H == H | _GraphSelectors by GLIB_000:128;
        hence x = H | _GraphSelectors by A7, GLIB_000:85, GLIB_009:44;
      end;
      assume x = H | _GraphSelectors;
      hence x in G.allSpanningForests() by A2, Th104;
    end;
    hence G.allSpanningForests() = {H | _GraphSelectors} by TARSKI:def 1;
  end;
  assume A8: for H being removeLoops of G
    holds G.allSpanningForests() = {H | _GraphSelectors};
  now
    let e be object;
    assume A9: e in the_Edges_of G & not e in G.loops();
    set H = the removeLoops of G, H9 = the removeEdges of G, the_Edges_of G;
    A10: H == H | _GraphSelectors & H9 == H9 | _GraphSelectors by GLIB_000:128;
    the_Edges_of H = the_Edges_of G \ G.loops() by GLIB_000:53;
    then e in the_Edges_of H by A9, XBOOLE_0:def 5;
    then A11: e in the_Edges_of (H | _GraphSelectors) by A10, GLIB_000:def 34;
    not e in the_Edges_of H9;
    then not e in the_Edges_of (H9 | _GraphSelectors) by A10, GLIB_000:def 34;
    then A12: H | _GraphSelectors <> H9 | _GraphSelectors by A11;
    A13: H | _GraphSelectors in {H | _GraphSelectors} by TARSKI:def 1;
    H9 | _GraphSelectors in G.allSpanningForests() by Th104;
    then H9 | _GraphSelectors in {H | _GraphSelectors} by A8;
    then {H | _GraphSelectors, H9 | _GraphSelectors} c= {H | _GraphSelectors}
      by A13, ZFMISC_1:32;
    hence contradiction by A12, ZFMISC_1:20;
  end;
  then the_Edges_of G c= G.loops() by TARSKI:def 3;
  hence thesis by XBOOLE_0:def 10;
end;
