I am studying "An Invitation to Applied Category Theory" book.
We have definition of join.
Let $(P, ≤)$ be a preorder, and let $A\subseteq P$ be a subset. We say that an element $p\in P$ is a join of A if
(a) for all $a \in A$ we have $a ≤ p$
(b) for all q such that $a ≤ q$ for all $a\in A$, we have that $p≤q$
Previosly the author told that division without remainder $n|m$ on $\mathbb{N}$ also can be seen as preorder. And now he tells that the join of two numbers on such preorder is least common multiple. The example is $4 \vee 6 = 12$. The problem is that it contradicts point (b) in definition of join. For example, if we choose q=7 we have that both 4 and 6 are ≤ 7 but not 12 ≤ 7.
I am totally confused. The book seems to have excellent reviews. It can't contain such a mistake. What I am missing?
Your confusion comes from the fact that you are thinking of the order as $$n \leq m \Longleftrightarrow \exists k \in \mathbb N (n + k = m),$$ but, from the context, it is $$n \leq m \Longleftrightarrow \exists k \in \mathbb N (n \cdot k = m),$$ (otherwise denoted by $n|m$).
Notice that it's not a total ordering (as it would with the first displayed formula), but still (both cases) more than just a pre-order (aka, a quasi-order).
Both formulas define partial order relations on the set of natural numbers, and moreover, they are distributive lattices (in the first case, it is obvious, since it's a chain, or total order; in the second case there are two proofs of it in this post).
Moreover, if you consider $0$ to be a natural number, then $(\mathbb N,|)$ is a complete lattice, with $1$ at the bottom and $0$ at the top, and in which the meet is given as the greatest common divisor and the join as the least common multiple: $$x \vee y = \mathrm{lcm}(x,y), \quad x \wedge y = \gcd(x,y).$$ (This characterization of join and meet works with or without the top element $0$.)
If you consider the same relation on the set of integers $\mathbb Z$ in place of $\mathbb N$, then it's no longer a partial order relation, but still a pre-order. Indeed, it's still reflexive and transitive, but no longer anti-symmetric: for example, $1|-1$ and $-1|1$, and more generally, for each $k \in \mathbb Z$, we have $k|-k$ and $-k|k$.