reserve GS for GraphStruct;
reserve G,G1,G2,G3 for _Graph;
reserve e,x,x1,x2,y,y1,y2,E,V,X,Y for set;
reserve n,n1,n2 for Nat;
reserve v,v1,v2 for Vertex of G;

theorem
  for G being _Graph, v being Vertex of G
  holds v is isolated iff not v in rng the_Source_of G \/ rng the_Target_of G
proof
  let G be _Graph, v be Vertex of G;
  hereby
    assume A1: v is isolated;
    assume v in rng the_Source_of G \/ rng the_Target_of G;
    then per cases by XBOOLE_0:def 3;
    suppose v in rng the_Source_of G;
      then consider e being object such that
        A2: e in dom the_Source_of G & (the_Source_of G).e=v by FUNCT_1:def 3;
      e DJoins v,(the_Target_of G).e,G by A2;
      hence contradiction by A1, Th144;
    end;
    suppose v in rng the_Target_of G;
      then consider e being object such that
        A3: e in dom the_Target_of G & (the_Target_of G).e=v by FUNCT_1:def 3;
      e DJoins (the_Source_of G).e,v,G by A3;
      hence contradiction by A1, Th144;
    end;
  end;
  assume A4: not v in rng the_Source_of G \/ rng the_Target_of G;
  assume v is non isolated;
  then v.edgesInOut() <> {};
  then consider e being object such that
    A5: e in v.edgesInOut() by XBOOLE_0:def 1;
  A6: e in the_Edges_of G &
    ((the_Source_of G).e = v or (the_Target_of G).e = v) by A5, Th61;
  then per cases;
  suppose A7: (the_Source_of G).e = v;
    e in dom the_Source_of G by A6, FUNCT_2:def 1;
    then v in rng the_Source_of G by A7, FUNCT_1:3;
    hence contradiction by A4, XBOOLE_0:def 3;
  end;
  suppose A8: (the_Target_of G).e = v;
    e in dom the_Target_of G by A6, FUNCT_2:def 1;
    then v in rng the_Target_of G by A8, FUNCT_1:3;
    hence contradiction by A4, XBOOLE_0:def 3;
  end;
end;
