
theorem
  for G being vertex-finite non-multi _Graph
  holds G.size() <= (G.order()^2 + G.order())/2
proof
  let G be vertex-finite non-multi _Graph;
  set V1 = singletons the_Vertices_of G, V2 = 2Set the_Vertices_of G;
  consider f being one-to-one Function such that
    A1: dom f = the_Edges_of G & rng f c= V2 \/ V1 and
    for e being object st e in dom f holds
      f.e = {(the_Source_of G).e,(the_Target_of G).e} by Th4;
  reconsider n = G.order() - 1 as Nat by CHORD:1;
  A2: card (V2 \/ V1) = card V2 +` card V1 by CARD_2:35, GLIBPRE0:18
    .= card V2 +` card the_Vertices_of G by BSPACE:41
    .= ((n+1) choose 2) + (n+1) by GLIBPRE0:20;
  A3: ((n+1) choose 2) + (n+1) = n*(n+1)/2 + 2*(n+1)/2 by NUMPOLY1:72
    .= (G.order()*G.order() + G.order())/2
    .= (G.order()^2 + G.order())/2 by SQUARE_1:def 1;
  card rng f c= ((n+1) choose 2) + (n+1) by A1, A2, CARD_1:11;
  then Segm(G.size()) c= Segm(((n+1) choose 2) + (n+1)) by A1, CARD_1:70;
  hence thesis by A3, NAT_1:39;
end;
