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

theorem Th163:
  for G being loopless _Graph
  holds G is edgeless iff SubtreeRel(G) = id G.allTrees()
proof
  let G be loopless _Graph;
  hereby
    assume A1: G is edgeless;
    now
      let x,y be object;
      hereby
        assume A2: [x,y] in SubtreeRel(G);
        then x in field SubtreeRel(G) by RELAT_1:15;
        hence x in G.allTrees() by Th160;
        then reconsider T1 = x as plain Tree-like Subgraph of G by Th138;
        y in field SubtreeRel(G) by A2, RELAT_1:15;
        then y in G.allTrees() by Th160;
        then reconsider T2 = y as plain Tree-like Subgraph of G by Th138;
        A3: T2 is edgeless by A1;
        then consider v being Vertex of T2 such that
          A4: the_Vertices_of T2 = {v} by GLIB_000:22;
        A5: T1 is Subgraph of T2 by A2, Th159;
        then the_Vertices_of T1 c= the_Vertices_of T2 by GLIB_000:def 32;
        then A6: the_Vertices_of T2 c= the_Vertices_of T1 by A4, ZFMISC_1:33;
        the_Edges_of T2 = {} by A3;
        then the_Edges_of T2 c= the_Edges_of T1 by XBOOLE_1:2;
        then T2 is Subgraph of T1 by A6, GLIB_000:44;
        hence x = y by A5, GLIB_000:87, GLIB_009:44;
      end;
      assume A7: x in G.allTrees() & x = y;
      SubtreeRel(G) is_reflexive_in field SubtreeRel(G) by RELAT_2:def 9;
      then SubtreeRel(G) is_reflexive_in G.allTrees() by Th160;
      hence [x,y] in SubtreeRel(G) by A7, RELAT_2:def 1;
    end;
    hence SubtreeRel(G) = id G.allTrees() by RELAT_1:def 10;
  end;
  assume A8: SubtreeRel(G) = id G.allTrees();
  assume G is non edgeless;
  then reconsider G9 = G as non edgeless _Graph;
  set e = the Edge of G9;
  set v = (the_Source_of G9).e, w = (the_Target_of G9).e, V = {v,w};
  A9: e Joins v,w,G9 by GLIB_000:def 13;
  reconsider V as non empty Subset of the_Vertices_of G9;
  set S = e .--> v, T = e .--> w;
  dom S = dom{[e,v]} & dom T = dom{[e,w]} by FUNCT_4:82;
  then A10: dom S = {e} & dom T = {e} by RELAT_1:9;
  rng S = {v} & rng T = {w} by FUNCOP_1:88;
  then reconsider S, T as Function of {e}, V by A10, FUNCT_2:2, ZFMISC_1:7;
  set H9 = createGraph(e);
  not e in G9.loops();
  then A11: H9 in G.allTrees() by Th143;
  set H8 = the plain inducedSubgraph of H9, {v};
  the_Edges_of H9 = {e} by Th13;
  then A12: e in the_Edges_of H9 by TARSKI:def 1;
  e Joins v,w,H9 by A12, A9, GLIB_000:73;
  then A14: v is Vertex of H9 by GLIB_000:13;
  A15: H8 is Subgraph of G by GLIB_000:43;
  H8 is loopless _trivial by A14;
  then A16: H8 is _trivial edgeless;
  then A17: H8 is plain Tree-like Subgraph of G by A15;
  A18: H8 <> H9 by A16;
  [H8, H9] in SubtreeRel(G) by A11, A17, Th159;
  hence contradiction by A18, A8, RELAT_1:def 10;
end;
