I am teaching myself set theory. I am at a point where the set of rationals, $\mathbb{Q}$, has been defined, along with its ordering relation, $<_\mathbb{Q}$. Now, working towards a definition of a Dedekind left set, the following definition has been provided:
$\mathbf{r}\subset\mathbb{Q}$ is closed to the left if for all $q\in\mathbf{r}$, if $p<_\mathbb{Q} q$, then $p\in\mathbf{r}$.
What I would like to do is write the above statement formally using the language of first-order logic. I have come up with the following:
$\forall p \forall q ((q \in \mathbf{r} ) \wedge (p <_\mathbb{Q} q) \rightarrow p \in \mathbf{r})$
However, what bothers me in the above statement is that it holds for all $p$ and $q$, but the ordering relation $<_\mathbb{Q}$ is not defined for all $p$ and $q$.
Is this OK? Is there a better way to write this statement?
What you've written is fine.
It says that for all p and q, If both $q\in r$ AND $p\lt_\mathbb Q q$, then...
It says nothing about what follows when the relation $<_\mathbb Q$ is not defined for $p, q$: the consequent in the implication follows for all $p, q$ that meet the criteria of the antecedent.
Just a simple example. If we let the domain of discourse to be the set of animals, and let $B(x)$ denote "x is an bird", and $F(x)$ denote "x has feathers", then $$\forall x(B(x)\rightarrow F(x))$$ What we are asserting is true whenever "x" is a bird. What is true about non-birds isn't in question here.
If you'd be more comfortable, perhaps add a third conjunct: $q\in r \land p\in \mathbb Q \land p<_\mathbb Q q$. That way, the conclusion is true for every $p, q$ that make the antecedent true.