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.edgesIn() = (the_Target_of G)"{v} & v.edgesOut() = (the_Source_of G)"{v}
proof
  let G be _Graph, v be Vertex of G;
  now
    let e be object;
    hereby
      assume e in v.edgesIn();
      then A1: e in the_Edges_of G & (the_Target_of G).e = v by Lm7;
      then A2: e in dom the_Target_of G by FUNCT_2:def 1;
      (the_Target_of G).e in {v} by A1, TARSKI:def 1;
      hence e in (the_Target_of G)"{v} by A2, FUNCT_1:def 7;
    end;
    assume e in (the_Target_of G)"{v};
    then A3: e in dom the_Target_of G & (the_Target_of G).e in {v}
      by FUNCT_1:def 7;
    then (the_Target_of G).e = v by TARSKI:def 1;
    hence e in v.edgesIn() by A3, Lm7;
  end;
  hence v.edgesIn() = (the_Target_of G)"{v} by TARSKI:2;
  now
    let e be object;
    hereby
      assume e in v.edgesOut();
      then A4: e in the_Edges_of G & (the_Source_of G).e = v by Lm8;
      then A5: e in dom the_Source_of G by FUNCT_2:def 1;
      (the_Source_of G).e in {v} by A4, TARSKI:def 1;
      hence e in (the_Source_of G)"{v} by A5, FUNCT_1:def 7;
    end;
    assume e in (the_Source_of G)"{v};
    then A6: e in dom the_Source_of G & (the_Source_of G).e in {v}
      by FUNCT_1:def 7;
    then (the_Source_of G).e = v by TARSKI:def 1;
    hence e in v.edgesOut() by A6, Lm8;
  end;
  hence v.edgesOut() = (the_Source_of G)"{v} by TARSKI:2;
end;
