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

theorem Th157:
  the_Edges_of G = G.loops() iff G.allTrees() is edgeless
proof
  hereby
    set H = the removeLoops of G;
    assume A1: the_Edges_of G = G.loops();
    now
      let H be _Graph;
      assume H in G.allTrees();
      then A2: H is Tree-like Subgraph of G by Th138;
      now
        assume the_Edges_of H <> {};
        then consider e being object such that
          A3: e in the_Edges_of H by XBOOLE_0:def 1;
        the_Edges_of H c= the_Edges_of G by A2, GLIB_000:def 32;
        then consider v being object such that
          A4: e Joins v,v,G by A1, A3, GLIB_009:def 2;
        e is set & v is set by TARSKI:1;
        then e Joins v,v,H by A2, A3, A4, GLIB_000:73;
        hence contradiction by A2, GLIB_000:18;
      end;
      hence H is edgeless;
    end;
    hence G.allTrees() is edgeless by GLIB_014:def 12;
  end;
  assume A5: G.allTrees() is edgeless;
  now
    let x be object;
    assume A6: x in the_Edges_of G;
    then reconsider G9 = G as non edgeless _Graph;
    reconsider e = x as Edge of G9 by A6;
    set H9 = createGraph(e);
    assume not x in G.loops();
    then H9 in G.allTrees() by Th143;
    hence contradiction by A5;
  end;
  then the_Edges_of G c= G.loops() by TARSKI:def 3;
  hence thesis by XBOOLE_0:def 10;
end;
