I get what you're trying to say, that in Prolog you are able to lookup structures by their shape, and not by some pre-defined path, as in other languages, so you can do both `edge(1, A)` and `edge(A, 1)`.
But the graph in your example is still directed, simply by the virtue of predicate arguments being ordered.
But the graph in your example is still directed, simply by the virtue of predicate arguments being ordered.
So your example misses two rules to be correct.
Alternatively you could introduce