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

theorem Th152:
  for G1, G2 being _Graph holds G2 is G1-isomorphic implies
    G1.allTrees(),G2.allTrees() are_isomorphic
proof
  let G1, G2 be _Graph;
  assume G2 is G1-isomorphic;
  then consider F being PGraphMapping of G1, G2 such that
    A1: F is isomorphism by GLIB_010:def 23;
  set f = SG2SGFunc(F) | G1.allTrees();
  A2: dom f = G1.allTrees() by FUNCT_2:def 1;
  A3: rng f = G2.allTrees() by A1, Th150;
  SG2SGFunc(F) is one-to-one by A1, Th31;
  then A4: f is one-to-one by FUNCT_1:52;
  now
    let G be _Graph;
    assume A5: G in G1.allTrees();
    then reconsider H = G as plain Tree-like Subgraph of G1 by Th138;
    reconsider F9 = F|H as PGraphMapping of H, rng(F|H) by GLIBPRE1:88;
    A6: f.G = (SG2SGFunc F).G by A5, FUNCT_1:49
      .= rng(F | H) by Def5;
    F9 is isomorphism by A1, GLIBPRE1:110;
    hence f.G is G-isomorphic _Graph
      by A6, GLIB_010:def 23;
  end;
  hence thesis by A2, A3, A4, GLIB_015:def 13;
end;
