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

theorem
  G1 == G2 iff G1.allComponents() = G2.allComponents()
proof
  hereby
    assume A1: G1 == G2;
    now
      let x be object;
      hereby
        assume x in G1.allComponents();
        then reconsider C = x as plain Component of G1 by Th189;
        C is Component of G2 by A1, GLIBPRE1:39;
        hence x in G2.allComponents() by Th189;
      end;
      assume x in G2.allComponents();
      then reconsider C = x as plain Component of G2 by Th189;
      C is Component of G1 by A1, GLIBPRE1:39;
      hence x in G1.allComponents() by Th189;
    end;
    hence G1.allComponents() = G2.allComponents() by TARSKI:2;
  end;
  assume G1.allComponents() = G2.allComponents();
  then G1 is Subgraph of G2 & G2 is Subgraph of G1 by Th193;
  hence thesis by GLIB_000:87;
end;
