  Let $P$ be a set of $m$ points and $L$ a set of $n$ lines in $\mathbb R^4$,
such that the points of $P$ lie on an algebraic three-dimensional surface of
degree $D$ that does not contain hyperplane or quadric components, and no
2-flat contains more than $s$ lines of $L$. We show that the number of
incidences between $P$ and $L$ is $$ I(P,L) = O\left(m^{1/2}n^{1/2}D +
m^{2/3}n^{1/3}s^{1/3} + nD + m\right) , $$ for some absolute constant of
proportionality. This significantly improves the bound of the authors, for
arbitrary sets of points and lines in $\mathbb R^4$, when $D$ is not too large.
The same bound holds when the three-dimensional surface is embedded in any
higher dimensional space. For the proof of this bound, we revisit certain parts
of [Sharir-Solomon16], combined with the following new incidence bound. Let $P$
be a set of $m$ points and $L$ a set of $n$ lines in $\mathbb R^d$, for $d\ge
3$, which lie in a common two-dimensional algebraic surface of degree $D$
(assumed to be $\ll n^{1/2}$) that does not contain any 2-flat, so that no
2-flat contains more than $s$ lines of $L$ (here we require that the lines of
$L$ also be contained in the surface). Then the number of incidences between
$P$ and $L$ is $$ I(P,L) = O\left(m^{1/2}n^{1/2}D^{1/2} + m^{2/3}D^{2/3}s^{1/3}
+ m + n\right). $$ When $d=3$, this improves the bound of Guth and Katz for
this special case, when $D \ll n^{1/2}$. Moreover, the bound does not involve
the term $O(nD)$, that arises in most standard approaches, and its removal is a
significant aspect of our result. Finally, we also obtain (slightly weaker)
variants of both results over the complex field. For two-dimensional varieties,
the bound is as in the real case, with an added term of $O(D^3)$. For
three-dimensional varieties, the bound is as in the real case, with an added
term of $O(D^6)$.
