Formal definition of a set of graphs according to diameter restriction I'm trying to find a formal way of defining the set of all directed graphs which their diameter is at most X, by formal definition I mean something of the following form:
{G | G=(V,E) , G is a directed graph, (∀v∈V ... )}
I've been thinking maybe I can write that, "for every vertex v in V, there exists a path v -> u for every u in V\{v} so that d(v,u) is less than or equals to X"
I'm assuming thats correct because its negation would imply there could be 2 vertices v and u which have a single path and d(v,u) > X which means the diameter is not restricted by X.
Am I wrong in any of my assumptions, and if not, how can I write it formally? (specifically, how do I express a path in a formal expression?)
In addition, I was wondering what is the definition of a diameter in an edge-less graph, the distance is considered infinity between every pair of vertices but is the diameter considered infinity? (only asking because the definition itself is longest shortest path but there is no path to start with).
 A: I'm not sure what you mean by formal definition, and why you need one. On the one hand, in mathematical papers, a formal definition for directed graphs of diameter at most $X$ is just directed graphs of diameter at most $X$, or if you're not assuming knowledge of the concept of diameter, directed graphs in which between any two vertices $x,y$ there is a path of length at most $X$. 
In logic, we are sometimes interested in more formal definitions. For example, you can consider the language of directed graphs. In this language, an interpretation is a directed graph, and the truth value of a formula depends on the interpretation. Variables range over vertices, and we have the edge relation $x\to y$ (there is a directed edge from $x$ to $y$). We also have equality. For every fixed $X$ you can construct a formula expressing your property, as follows:
$$
\forall x \forall y (x=y) \lor \bigvee_{\ell=0}^{|X|-1} \exists z_1 \cdots \exists z_\ell (x \to z_1) \land (z_1 \to z_2) \land \cdots \land (z_{\ell-1} \to z_{\ell}) \land (z_\ell \to y).
$$
You're right that the definition of diameter makes sense only for (strongly) connected graphs. If we define the diameter as the maximal directed distance between two vertices, define the directed distance between two vertices as the length of the shortest directed path between the vertices, and define the minimum of the empty set as $\infty$, then we can conclude that a graph which is not strongly connected has diameter $\infty$. But this is to some extent arbitrary, and we can also say that diameter isn't defined for such graphs.
