Is it true, that for any two non-isomorphic finite groups $G$ and $H$ there exists such a group word $w$, that $|V_w(G)| \neq |V_w(H)|$?
Is it true, that for any two non-isomorphic finite groups $G$ and $H$ there exists such a group word $w$, that $|V_w(G)| \neq |V_w(H)|$? Here $V_w(G)$ stands for the verbal subgroup of $H$, generated by the group word $w$.
Initially, the question I wanted to ask was: “Is it true, that for any two non-isomorphic finite groups $G$ and $H$ there exist such a one-word generated group variety $\mathfrak{U}$, such that $G$ is in $U$ and $H$ is not?” However, then I found an obvious counterexample: $C_2$ and $C_2 \times C_2$. So, I decided to require a stronger condition.
For the statement of the main question that counterexample already fails. Moreover, if $H$ and $G$ are counterexamples, then they are required to have following properties:
1) They are both non-abelian:
If one of the groups is abelian the other group is not, then their commutator subgroups have different orders. If both tho both are abelian, then by the classification of finite abelian groups they can be decomposed into direct products of primary cyclic groups.
$$G = (C_2^{g_2} \times ... \times C_{2^i}^{g_{2^i}} \times ...) \times ... \times (C_{p_j}^{g_{p_j}} \times ... \times C_{{p_j}^i}^{g_{{p_j}^i}} \times ...) \times ... $$
$$H = (C_2^{h_2} \times ... \times C_{2^i}^{h_{2^i}} \times ...) \times ... \times (C_{p_j}^{h_{p_j}} \times ... \times C_{{p_j}^i}^{h_{{p_j}^i}} \times ...) \times ... $$
where $$g_{{p_j}^i} = \log_p|V_{{p_j}^{i-1}}(G)| - 2\log_p|V_{{p_j}^{i}}(G)| + \log_p|V_{{p_j}^{i+1}}(G)|$$
$$h_{{p_j}^i} = \log_p|V_{{p_j}^{i-1}}(H)| - 2\log_p|V_{{p_j}^{i}}(H)| + \log_p|V_{{p_j}^{i+1}}(H)|$$
It is not hard to see, that if they satisfy the condition, they are isomorphic.
2) They have the same order: $$|G| = |V_x(G)| = |V_x(H)| = |H|$$
3) They have the same exponent: $$exp(G) = min\{n \in \mathbb{N}: |V_{x^n}(G)| = 1\} = min\{n \in \mathbb{N}: |V_{x^n}(H)| = 1\} = exp(H)$$
4) $var(G) = var(H)$:
A group $G$ satisfies an identity $w$ iff $|V_w(G)| = 1$.
5) $\forall w \in F_\infty \text{ } V_w(G) = G \iff V_w(H) = H$
Moreover, if $G$ and $H$ are counterexamples with the least possible order, they have to satisfy the additional condition:
For every group word $w$, if $V_w(G)$ is a non-trivial proper verbal subgroup, then $V_w(G) \cong V_w(H)$ and $\frac{G}{V_w(G)} \cong \frac{H}{V_w(H)}$.
If there is a group word $w$, such that $V_w(G)$ and $V_w(H)$ are non-trivial proper verbal subgroups of the corresponding groups and not isomorphic to each other, then they are the counterexample of lesser order, as $V_{u(x_1, ... , x_m)}(V_{w(x_1, ... , x_n}(G)) = V_{w(u(x_{11}, ... , x_{m1}), ..., u(x_{1n}, ... , x_{mn}))}(G)$.
If for every group word $w$, if $V_w(G)$ is a non-trivial proper verbal subgroup, then $V_w(G) \cong V_w(H)$ and there is a group word $w$, such that $V_w(G)$ and $V_w(H)$ are non-trivial proper subgroups of the corresponding groups and $\frac{G}{V_w(G)}$ and $\frac{H}{V_w(H)}$ are not isomorphic to each other, then $\frac{G}{V_w(G)}$ and $\frac{H}{V_w(H)}$ are a counterexample as $V_u(\frac{G}{V_w(G)}) \cong \frac{V_u(G)}{V_w(G) \cap V_u(G)}$
However, even with all those facts in my hands, I still failed to get the contradiction.
Solution 1:
$$Q_8 = \langle x, y | x^4 = e, x^2 = y^2, y^{-1}xy = x^{-1} \rangle$$ and $$D_4 = \langle a \rangle_4 \rtimes \langle b \rangle_2$$actually are, as was suggested by Eran in the comments, a counterexample to this conjecture. Moreover, if we replace the conjecture with a weaker one, with (possibly infinite) sets of group words $A$, instead of solitary group words $w$, this pair of groups will still remain a counterexample.
One can see, that both $D_4$ and $Q_8$ have the unique minimal nontrivial normal subgroup. In case of $Q_8$ it is $\langle x^2 \rangle$ and in case of $D_4$ it is $\langle a^2 \rangle$. And it is also quite obvious, that $\langle x^2 \rangle \cong \langle a^2 \rangle \cong C_2$ and that $\frac{Q_8}{\langle x^2 \rangle} \cong \frac{D_4}{\langle a^2 \rangle} \cong C_2 \times C_2$.
Now suppose $A$ is some set of group words. If they are all identities in $D_4$, then they are also identities in $Q_8$, as $Var(D_4) = Var(Q_8)$, which results in $|V_A(D_4)| = |V_A(Q_8)| = 1$. Now suppose, that some of them are not identities. Then $|V_A(D_4)| > 1$ and $|V_A(Q_8)| > 1$, which results in $\langle x^2 \rangle \leq V_A(Q_8)$ and $\langle a^2 \rangle \leq V_A(D_4)$. Now, as a homomorphic image of a verbal subgroup of a group is always the verbal subgroup of the homomorphic image of the group in respect to the same set of group words, we can conclude, that $$|V_A(D_4)| = |\langle a^2 \rangle||V_A(\frac{D_4}{\langle a^2 \rangle})| = 2|V_A(C_2 \times C_2)| = |\langle x^2 \rangle||V_A(\frac{Q_8}{\langle x^2 \rangle})| = |V_A(D_8)|$$