As far as I know, Morse theory yields much information on the topology of smooth manifolds; in particular, it can be used to prove Artin's vanishing (that the singular cohomology of smooth complex variety of dimension n vanishes in degrees >n). My question is: are there any ideas how to extend any of the consequences of Morse theory to (the study of the etale homology of) algebraic varieties (over fields of arbitrary characteristic)? In particular, what is the relation between Morse homology and Lefschetz pensils?
A Morse function is a map of a manifold to the real line locally equivalent to:
$$f(x_1,\ldots, x_n)=x_1^2\ldots x_k^2+ x_{k+1}^2+\ldots+x_n^2$$
for some $k$. In other words,
for which the singularities are as simple as possible.
While a Lefschetz pencil is a map of a smooth projective variety to the projective line local analytically given by $f=x_1^2+\ldots+x_n^2$.
So in this sense, they are very analogous. There are differences, however. Given
a Morse function $f:X\to \mathbb{R}$, the collection of the above numbers $k$, called indices,
determine Perhaps it would be more instructive give a Morselike pseudoproof of Artin's theorem.
By "pseudo" I mean that there is step which I can't justify without a lot more effort than this is worth. Let $X\subset \mathbb{A}^n$ be an irreducible affine variety of dimension $n$ over an algebraically closed field. By generic projection, we get a nonconstant morphism
$f:X\to \mathbb{A}^1$ which will play the role of our Morse function. Suppose that ( 

