Understanding the definition of a weak homotopy equivalence between simplicial sets, and Joyal equivalences between Kan complexes. Let $f: X \longrightarrow Y$ be a map of simplicial sets.
Kerodon, definition 3.1.6.12,  defines $f$ to be a weak homotopy equivalence if for every Kan complex $Z$, the map induced by precomposition $\pi_{0}($Fun$(Y,Z)$ $) \longrightarrow \pi_{0}($Fun$(X,Z)$) is a bijection.
I would like to understand where this definition comes from?
Naively, one may define a weak homotopy equivalence to be a map that induces on realization $ |f|: |X| \longrightarrow |Y|$ a weak homotopy equivalence of topological spaces, but as the realisation of a simplicial set is always a CW complex, this naive definition seems too strong.
I would also like to understand what more (if anything) can be said when $X$ and $Y$ above are Kan complexes.
This question is motivated by Observation 2.2.11 in Land's "Introduction to $\infty$-categories", where he states without proof that a Joyal equivalence (i.e. an equivalence of $\infty$-categories) between Kan complexes is precisely a homotopy equivalence. I think the idea is that a Joyal equivalence between Kan complexes is a weak homotopy equivalence, and a weak homotopy equivalence between Kan complexes is a homotopy equivalence. But the precise details have so far eluded me, which is why I am asking this question.
Any help would be much appreciated!
 A: This style of definition is sometimes used to define the weak equivalences in a model category where all objects are cofibrant and you know what the fibrant objects are.
For example, in the category of simplicial sets:

*

*The weak equivalences in the Kan–Quillen model structure are the morphisms $X \to Y$ such that the induced map $\pi_0 [Y, Z] \to \pi_0 [X, Z]$ is a bijection for every Kan complex $Z$.

*The weak equivalences in the Joyal model structure are the morphisms $X \to Y$ such that the induced map $\tau_0 [Y, Z] \to \tau_0 [X, Z]$ is a bijection for every quasicategory $Z$.

Essentially, one is setting up the weak equivalences so that the class of fibrant objects becomes a reflective subcategory of the naïve homotopy category.
Incidentally, the above definitions make it fairly easy to extract a proof that every weak equivalence in the Joyal model structure is also a weak equivalence in the Kan–Quillen model structure: every  Kan complex is a quasicategory, and if $Z$ is a Kan complex then $\pi_0 [-, Z] \cong \tau_0 [-, Z]$, so we see that $\tau_0 [Y, Z] \to \tau_0 [X, Z]$ being bijective for all quasicategories $Z$ implies $\pi_0 [Y, Z] \to \pi_0 [X, Z]$ is bijective for all Kan complexes $Z$.
Here is a precise result:
Proposition.
Let $\mathcal{M}$ be a model category and let $K : \mathcal{M} \to \mathcal{K}$ be a functor with the following properties:

*

*Given fibrant objects $Z$ and $W$ in $\mathcal{M}$, a morphism $g : Z \to W$ in $\mathcal{M}$ is a weak equivalence if and only if the morphism $K g : K Z \to K W$ is an isomorphism in $\mathcal{K}$.


*Given cofibrant objects $X$ and $Y$ in $\mathcal{M}$ and a morphism $f : X \to Y$ in $\mathcal{M}$, there exist fibrant objects $\hat{X}$ and $\hat{Y}$, weak equivalences $i : X \to \hat{X}$ and $j : Y \to \hat{Y}$, and a morphism $\hat{f} : \hat{X} \to \hat{Y}$ in $\mathcal{M}$ such that $K i : K X \to K \hat{X}$ and $K j : K Y \to K \hat{Y}$ are isomorphisms in $\mathcal{K}$, and $\hat{f} \circ i = j \circ f$ in $\mathcal{M}$.
Then:

*

*Given cofibrant objects $X$ and $Y$ in $\mathcal{M}$, a morphism $f : X \to Y$ in $\mathcal{M}$ is a weak equivalence if and only if the map $\mathcal{K} (K f, K Z) : \mathcal{K} (K Y, K Z) \to \mathcal{K} (K X, K Z)$ is a bijection for every fibrant object $Z$ in $\mathcal{M}$.

Proof.
Suppose $f : X \to Y$ is a morphism between cofibrant objects in $\mathcal{M}$.
Then we can form a commutative diagram in $\mathcal{M}$ of the form below,
$$\require{AMScd}
\begin{CD}
X @>{i}>> \hat{X} \\
@V{f}VV @VV{\hat{f}}V \\
Y @>>{j}> \hat{Y}
\end{CD}$$
where $\hat{X}$ and $\hat{Y}$ are fibrant objects in $\mathcal{M}$ and $i : X \to \hat{X}$ and $j : Y \to \hat{Y}$ are weak equivalences in $\mathcal{M}$ such that $K i : K X \to K \hat{X}$ and $K j : K Y \to K \hat{Y}$ are isomorphisms in $\mathcal{K}$.
Then, $f : X \to Y$ is a weak equivalence if and only if $\hat{f} : \hat{X} \to \hat{Y}$ is a weak equivalence, and by hypothesis, $\hat{f} : \hat{X} \to \hat{Y}$ is a weak equivalence if and only if $K \hat{f} : K \hat{X} \to K \hat{Y}$ is an isomorphism.
But $K \hat{f} : K \hat{X} \to K \hat{Y}$ is an isomorphism if and only if the map $\mathcal{K} (K \hat{f}, K Z) : \mathcal{K} (K \hat{Y}, K Z) \to \mathcal{K} (K \hat{X}, K Z)$ is a bijection for every fibrant object $Z$ in $\mathcal{M}$, and we have the following commutative diagram,
$$\begin{CD}
\mathcal{K} (K \hat{Y}, K Z) @>{\mathcal{K} (K j, K Z)}>> \mathcal{K} (K Y, K Z) \\
@V{\mathcal{K} (K \hat{f}, K Z)}VV @VV{\mathcal{K} (K f, K Z)}V \\
\mathcal{K} (K \hat{X}, K Z) @>>{\mathcal{K} (K i, K Z)}> \mathcal{K} (K X, K Z)
\end{CD}$$
where the horizontal arrows are bijections, so $\mathcal{K} (K \hat{f}, K Z) : \mathcal{K} (K \hat{Y}, K Z) \to \mathcal{K} (K \hat{X}, K Z)$ is a bijection if and only if the map $\mathcal{K} (K f, K Z) : \mathcal{K} (K Y, K Z) \to \mathcal{K} (K X, K Z)$ is a bijection.　◼
We can always find a non-trivial functor $K : \mathcal{M} \to \mathcal{K}$ with the above properties: take $\mathcal{K}$ to be $\mathcal{M}$ localised with respect to the trivial fibrations and $K : \mathcal{M} \to \mathcal{K}$ to be the localisation functor.
However, this is not very explicit and may not be useful in practice.
In the case of the Kan–Quillen model structure and the Joyal model structure, we do have an explicit $K : \mathcal{M} \to \mathcal{K}$ that works: in both cases $\mathcal{K}$ is just the category of simplicial sets modulo a congruence – homotopy of morphisms in the former case and isomorphism of morphisms in the latter.
So we can do the "French trick" of turning a theorem into a definition, i.e. we can use this to define the weak equivalences of what will subsequently be shown to be a model structure.
