
theorem Th130:
  for V being non empty set, E being Relation of V
  holds createGraph(V,E).loops() = E /\ id V
proof
  let V be non empty set, E be Relation of V;
  set G = createGraph(V,E);
  now
    let x be object;
    hereby
      assume x in G.loops();
      then consider v being object such that
        A1: x DJoins v,v,G by GLIB_009:45;
      x Joins v,v,G by A1, GLIB_000:16;
      then v in the_Vertices_of G by GLIB_000:13;
      then A2: v in V;
      x = [v,v] by A1, GLUNIR00:64;
      hence x in E & x in id V by A1, A2, GLUNIR00:63, RELAT_1:def 10;
    end;
    assume A3: x in E & x in id V;
    then consider y,z being object such that
      A4: x = [y,z] by RELAT_1:def 1;
    x = [y,y] by A3, A4, RELAT_1:def 10;
    hence x in G.loops() by A3, GLUNIR00:63, GLIB_009:45;
  end;
  hence thesis by XBOOLE_0:def 4;
end;
