# Computing fundamental groups and singular cohomology of projective varieties

Are there any general methods for computing fundamental group or singular cohomology (including the ring structure, hopefully) of a projective variety (over C of course), if given the equations defining the variety?

I seem to recall that, if the variety is smooth, we can compute the H^{p,q}'s by computer -- and thus the H^n's by Hodge decomposition -- is this correct? However this won't work if the variety is not smooth -- are there any techniques that work even for non-smooth things?

Also I seem to recall some argument that, at least if we restrict our attention to smooth things only, all varieties defined by polynomials of the same degrees will be homotopy equivalent. The homotopy should be gotten by slowly changing the coefficients of the polynomials. Is something like this true? Does some kind of argument like this work?

• Just to clarify: are you primarily asking about the smooth case, or the non-smooth case? and are you asking for a theorem which says "singular coho is isomorphic to some coho theory for the coordinate ring", or actual algorithms? – Yemon Choi Feb 12 '10 at 9:00
• I am asking about anything that can be said about either case, but I am more interested in the non-smooth case. Algorithms are better, but I'd be interested in relevant non-algorithmic statements also. – Kevin H. Lin Feb 12 '10 at 9:05
• Well: in the smooth case you have the HKR theorem, whereby the Hochschild coho of the coordinate ring is isomorphic to the exterior powers of the Kahler module of said ring; so in principle I guess one could read off the de Rham cohomology of the original space as a real manifold. (But I'm rapidly straying away from what I know and into vague armchair-punditry) – Yemon Choi Feb 12 '10 at 9:20
• @Yemon: The Hochschild homology (the usual HKR involdes homology) vanishes above the complex dimension, yet a projective variery has non vanishing up to the real dimension. You need to compute the hypercohomology of the algebraic de Rham complex to get something useful. But there is very little gain in using HKR when you can start with the algebraic de Rham complex directly! – Mariano Suárez-Álvarez Feb 12 '10 at 14:18
• @Mariano: thanks for the corrections. I wasn't thinking very clearly when I wrote the above comment! – Yemon Choi Feb 12 '10 at 18:10

This is an interesting question. To repeat some of the earlier answers, one should be able to get one's hands on a triangulation algorithmically using real algebro-geometric methods, and thereby compute singular cohomology and (a presentation for) the fundamental group. But this should probably be a last resort in practice. For smooth projective varieties, as people have noted, one can compute the Hodge numbers by writing down a presentation for the sheaf p-forms and then apply standard Groebner basis techniques to compute sheaf cohomology. This does work pretty well on a computer. For specific classes, there are better methods. For smooth complete intersections, there is a generating function for Hodge numbers due to Hirzebruch (SGA 7, exp XI), which is extremely efficient to use.

As for the fundamental group, if I had to compute it for a general smooth projective variety, I would probably use a Lefschetz pencil to write down a presentation.

For singular varieties, one can still define Hodge numbers using the mixed Hodge structure on cohomology. The sum of these numbers are still the Betti numbers. I expect these Hodge numbers are still computable, but it would somewhat unpleasant to write down a general algorithm. The first step is to build a simplicial resolution using resolution of singularities. My colleagues who know about resolutions assure me that this can be done algorithmically now days.

(This is my first reply in this forum. Hopefully it'll go through.)

• Welcome to Math Overflow! Thanks for your response! – Kevin H. Lin Feb 22 '10 at 0:20

I just want to assure you that everything in this situation is computable. For any real semi-algebraic set, there is an algorithm called cylindrical decomposition which breaks it into contractible pieces, glued along contractible pieces. See Algorithms in Real Algebraic Geometry, by Basu, Pollack and Roy. The $\mathbb{C}$-points of a $\mathbb{C}$-variety are, in particular, a semi-algebraic set, by restriction of scalars.

So you can compute cohomology, and you can compute a presentation of $\pi_1$. Of course, as always when dealing with groups in terms of generators and relations, it will probably not be computable to determine whether that group is trivial, or is isomorphic to some other group given by generators and relations.

I am pretty sure that this is not how anyone actually computes these things though. I hope someone will give an answer that reflects the actual state of the art.

• David, do you happen to know what happens in characteristic $p>0$?Thanks. – Hailong Dao Feb 12 '10 at 15:03

Regarding your third paragraph, let p : X ---> B be a smooth, proper map of varieties over C, and for the heck of it say B is smooth. Here I'm thinking B is your space of possible coefficients in the equation, and the fibers of p are the varieties you're talking about. Then on complex points, p is proper submersion between manifolds, and hence a fibration of topological spaces; thus the fibers of p will be homotopy equivalent provided B is connected, canonically homotopy equivalent (up to 2nd order homotopy) if B is simply-connected, and really canonically homotopy equivalent if B is contractible, e.g. an affine space.

• Cool. That seems like it should work, though I should think about it some more to really convince myself. Question: are all affine varieties really contractible? I guess it'd be a similar argument...? – Kevin H. Lin Feb 12 '10 at 16:33
• Affine varieties are typically not contractible, e.g. a punctured positive genus curve. Affine spaces (as in Dustin's example) are contractible. – Emerton Feb 12 '10 at 16:46
• Yeah, ok, that's what I was thinking. What's an "affine space" then? Oh -- I guess you just mean A^n? Silly me. – Kevin H. Lin Feb 12 '10 at 17:11

The trick I know (learned it from Ron Livne) is to project it to some space with known homotopy / homology, throw away the ramification and branch loci to get a covering map (and you better pray it's Galois - otherwise the mess is even bigger) , and then bring the ramification back as extra relations.

e.g. here is a computation of the homotopy group of an elliptic curve E:

You have a degree 2 projection to a P1 with four ramification points. The homotopy group of P1 minus the four branch points is freely generated by loops about 3 of these points.

Claim: the homotopy group of E minus the ramification locus the kernel of the map from the free group on three generators: F(a,b,c) to Z / 2, given by adding the powers on all the letters and taking mod 2 (e.g. abbac-1b maps to 4 mod 2 = 0).

Sketch of proof: think of a,b,c, as paths in E minus the ramification points which have to glue to a closed loop, and to project to the generators of the homotopy of P1 minus the branch points (i.e. they are "half loops" / sheet interchange about the ramification points).

Finally we have "fill" the ramification points - i.e. to bring the extra relations a2, b2, c2. After adding these relations, our group is generated by ab, ba, ac, ca, bc, cb. Hence - since e.g. (bc)(cb) = 1 - it is generated by ab, ac, bc; hence - since (ab)(bc) = (ac) - it is generated by ab, ac. We now observe that the map which sends x to axa is the map sending an element to the inverse; which shows as that

(ab)(ca)(ab)-1 = (ab)(ca)(ba) = (bc)-1 ba = (cb)(ba) = ca.

Note that this is the simplest example one can give - this is a painful trick.

Apparently you can compute the h^{p,q}'s of smooth things in, for example, Macaulay. Here's an example: computing the h^{p,q}'s of a quintic hypersurface in P^4.

• The link is broken. – k76u4vkweek547v7 Dec 29 '17 at 22:36

Not the cleanest answer (if it's too messy to follow, I can clean it up a bit) but look at section 2.4 (starting on page 14) of these notes from a complex algebraic geometry course that I took. Also, section/chapter 6 on page 33 picks up the thread after some diversions about curves. But roughly, the cohomology (specifically, the Hodge decomposition) depends only on the Jacobian Ideal.

• Oh, and of course, computing the dimension of graded pieces of a zero-dimensional ring are pretty much what Groebner bases are best at. – Charles Siegel Feb 12 '10 at 13:36

First we assume that your equations have rational coefficients; if this is not so then you can probably 'approximate' your variety by a variety defined over rationals without changing its topology (though you have to be careful here).

Now, multiplying the equations by the common denominator, you obtain equations with integral coefficients. Then you can consider these equations over finite fields (and you get certain 'reductions mod p' of your variety).

I believe (and can probably prove) that for p large enough, then the etale cohomology of this reduction is isomorphic to those of the original variety; and the etale cohomology over complex numbers is isomorphic to the singular cohomology with l-adic coefficients.

Lastly, you can compute the Betti numbers over a finite field via computing the number of points of this variety over extensions of this field. I am not sure yet that this algorithm is optimal.:)

• Here you have to compute the number of solutions in all finite fields of char p. Is there an algorithm for that? – algori Feb 20 '10 at 13:50
• You don't actually have to count solutions in ALL fields of a given characteristic. These numbers of points are encoded into the zeta-function of the variety, which is a rational function by the results of Grothendieck and Dwork. So in order to compute all these numbers, you only need to know the first few of them (the quantity required seems to be the sum of dimensions of cohomology groups; probably some apriori bounds for this exist). So, everything is finite. Yet I am very far from being sure that this is the best possible algorithm, and do not know how to optimize it. – Mikhail Bondarko Feb 23 '10 at 20:39

Here's an interesting special case. If X is a simple convex polytope then the Betti numbers h(X) of the associated toric variety can be computed from the face vector f(X). In fact, h(X) = Cf(X) where C is a matrix of binomial coefficients. This is closely related to Peter McMullen's shelling argument for proving the Dehn-Sommerville equations.

Here's another special case. For certain general convex polytopes the Betti numbers are not a linear function of the flag vector. This was done using explicit calculations (using Macaulay as I recall) by Mark McConnell. However, the middle perversity intersection homology (mpih) Betti numbers of the associated toric variety are a linear function of the flag vector.

The ring structure on the homology of the toric variety associated with a simple polytope is closely associated with the volume of the polytope, as it varies when the facets are moved in and out.

Finally, if the variety is defined over say the rationals then one can reduce mod p and start counting points, and then apply the Weil conjectures to determine the Betti numbers. In fact, this is a quick way to determine the Betti numbers of a smooth toric variety.

I believe you can have a elliptic curve and a singular elliptic curve both described by equations of degree three. Some people who know more should be able to answer this. If you change the coefficients I guess the homotopy type can change, just imagine that some subvariety degenerates into something singular and then expands back out to something else on the other side.

Even at the algebraic level I think you can have (a minimal set of) polynomials of different degrees defining the same ideal.

Another thought (or variant of your question) ... if you start with some subvariety Y and take a hyperplane section X, then X is cut out by the same things that cut out Y together with another linear polynomial. All the cohomology of X is determined except in the middle dimension by the Lefschetz hyperplane theorem. How do the coefficients describing the hyperplane determine this middle cohomology, including the cup products? (I guess the answer is well known?)

• Yes, that's right, varieties defined by polynomials of the same degrees can have different homotopy types if we do not assume they are smooth, and your example illustrates that. At least intuitively, a singularity may change the homotopy type because it may shrink a cycle to say a point, and thus killing that cycle in homology or cohomology. – Kevin H. Lin Feb 12 '10 at 16:41
• Just to mention it: The Lefshetz hyperplane theorem does not only give you cohomology groups but also homotopy groups, especially the fundamental group, or more precisely, it reduces it to a lower-dimensional computation if you have sufficient smoothness. – Lennart Meier May 10 '15 at 14:02